]> git.sur5r.net Git - openldap/blob - configure
c8d7156e2afdafa940009f23517c7a54936a8419
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.256 1999/09/10 00:10:20 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
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug        enable debugging (yes)"
32 ac_help="$ac_help
33   --enable-syslog       enable syslog support (auto)"
34 ac_help="$ac_help
35   --enable-proctitle    enable proctitle support (yes)"
36 ac_help="$ac_help
37   --enable-cache        enable caching (yes)"
38 ac_help="$ac_help
39   --enable-dns          enable V2 DX Referrals extension (no)"
40 ac_help="$ac_help
41   --enable-referrals    enable V2 Referrals extension (yes)"
42 ac_help="$ac_help
43   --enable-cldap        enable connectionless ldap (no)"
44 ac_help="$ac_help
45   --enable-x-compile    enable cross compiling (no)"
46 ac_help="$ac_help
47   --enable-dmalloc      enable debug malloc support (no)"
48 ac_help="$ac_help
49   --with-cyrus-sasl     with Cyrus SASL support (auto)"
50 ac_help="$ac_help
51   --with-fetch          with fetch URL support (auto)"
52 ac_help="$ac_help
53   --with-kerberos       with Kerberos support (auto)"
54 ac_help="$ac_help
55   --with-readline       with readline support (auto)"
56 ac_help="$ac_help
57   --with-threads        use threads (auto)"
58 ac_help="$ac_help
59   --with-tls            with TLS/SSL support (auto)"
60 ac_help="$ac_help
61   --with-yielding-select        with implicitly yielding select (auto)"
62 ac_help="$ac_help
63 LDAPD (X.500-to-LDAP Gateway) Options:"
64 ac_help="$ac_help
65   --enable-ldapd        enable building ldapd (no)"
66 ac_help="$ac_help
67 SLAPD (Standalone LDAP Daemon) Options:"
68 ac_help="$ac_help
69   --enable-slapd        enable building slapd (yes)"
70 ac_help="$ac_help
71     --enable-cleartext  enable cleartext passwords (yes)"
72 ac_help="$ac_help
73     --enable-crypt      enable crypt(3) passwords (auto)"
74 ac_help="$ac_help
75     --enable-modules    enable dynamic module support (no)"
76 ac_help="$ac_help
77     --enable-multimaster        enable multimaster replication (no)"
78 ac_help="$ac_help
79     --enable-phonetic   enable phonetic/soundex (no)"
80 ac_help="$ac_help
81     --enable-quipu      build quipu migration tools (no)"
82 ac_help="$ac_help
83     --enable-rlookups   enable reverse lookups (auto)"
84 ac_help="$ac_help
85     --enable-aci        enable per-object ACIs (no)"
86 ac_help="$ac_help
87     --enable-discreteaci        enable discrete rights in ACIs (no)"
88 ac_help="$ac_help
89     --enable-wrappers   enable tcp wrapper support (no)"
90 ac_help="$ac_help
91     --enable-bdb2       enable bdb2 backend (no)"
92 ac_help="$ac_help
93       --with-bdb2-module        module type (static)"
94 ac_help="$ac_help
95     --enable-ldap       enable ldap backend (no)"
96 ac_help="$ac_help
97       --with-ldap-module        module type (static)"
98 ac_help="$ac_help
99     --enable-ldbm       enable ldbm backend (yes)"
100 ac_help="$ac_help
101       --with-ldbm-api   use LDBM API (auto)"
102 ac_help="$ac_help
103       --with-ldbm-module        module type (static)"
104 ac_help="$ac_help
105       --with-ldbm-type  use LDBM type (auto)"
106 ac_help="$ac_help
107     --enable-passwd     enable passwd backend (no)"
108 ac_help="$ac_help
109       --with-passwd-module      module type (static)"
110 ac_help="$ac_help
111     --enable-perl       enable perl backend (no)"
112 ac_help="$ac_help
113       --with-perl-module        module type (static)"
114 ac_help="$ac_help
115     --enable-shell      enable shell backend (no)"
116 ac_help="$ac_help
117       --with-shell-module       module type (static)"
118 ac_help="$ac_help
119     --enable-tcl        enable tcl backend (no)"
120 ac_help="$ac_help
121       --with-tcl-module module type (static)"
122 ac_help="$ac_help
123 SLURPD (Replication Daemon) Options:"
124 ac_help="$ac_help
125   --enable-slurpd       enable building slurpd (auto)"
126 ac_help="$ac_help
127 Library Generation & Linking Options"
128 ac_help="$ac_help
129   --enable-static[=PKGS]  build static libraries [default=yes]"
130 ac_help="$ac_help
131   --enable-shared[=PKGS]  build shared libraries [default=yes]"
132 ac_help="$ac_help
133   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
134 ac_help="$ac_help
135   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
136 ac_help="$ac_help
137   --disable-libtool-lock  avoid locking (might break parallel builds)"
138
139 # Initialize some variables set by options.
140 # The variables have the same names as the options, with
141 # dashes changed to underlines.
142 build=NONE
143 cache_file=./config.cache
144 exec_prefix=NONE
145 host=NONE
146 no_create=
147 nonopt=NONE
148 no_recursion=
149 prefix=NONE
150 program_prefix=NONE
151 program_suffix=NONE
152 program_transform_name=s,x,x,
153 silent=
154 site=
155 srcdir=
156 target=NONE
157 verbose=
158 x_includes=NONE
159 x_libraries=NONE
160 bindir='${exec_prefix}/bin'
161 sbindir='${exec_prefix}/sbin'
162 libexecdir='${exec_prefix}/libexec'
163 datadir='${prefix}/share'
164 sysconfdir='${prefix}/etc'
165 sharedstatedir='${prefix}/com'
166 localstatedir='${prefix}/var'
167 libdir='${exec_prefix}/lib'
168 includedir='${prefix}/include'
169 oldincludedir='/usr/include'
170 infodir='${prefix}/info'
171 mandir='${prefix}/man'
172
173 # Initialize some other variables.
174 subdirs=
175 MFLAGS= MAKEFLAGS=
176 SHELL=${CONFIG_SHELL-/bin/sh}
177 # Maximum number of lines to put in a shell here document.
178 ac_max_here_lines=12
179
180 ac_prev=
181 for ac_option
182 do
183
184   # If the previous option needs an argument, assign it.
185   if test -n "$ac_prev"; then
186     eval "$ac_prev=\$ac_option"
187     ac_prev=
188     continue
189   fi
190
191   case "$ac_option" in
192   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
193   *) ac_optarg= ;;
194   esac
195
196   # Accept the important Cygnus configure options, so we can diagnose typos.
197
198   case "$ac_option" in
199
200   -bindir | --bindir | --bindi | --bind | --bin | --bi)
201     ac_prev=bindir ;;
202   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
203     bindir="$ac_optarg" ;;
204
205   -build | --build | --buil | --bui | --bu)
206     ac_prev=build ;;
207   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
208     build="$ac_optarg" ;;
209
210   -cache-file | --cache-file | --cache-fil | --cache-fi \
211   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
212     ac_prev=cache_file ;;
213   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
214   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
215     cache_file="$ac_optarg" ;;
216
217   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
218     ac_prev=datadir ;;
219   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
220   | --da=*)
221     datadir="$ac_optarg" ;;
222
223   -disable-* | --disable-*)
224     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
225     # Reject names that are not valid shell variable names.
226     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
227       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
228     fi
229     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
230     eval "enable_${ac_feature}=no" ;;
231
232   -enable-* | --enable-*)
233     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
234     # Reject names that are not valid shell variable names.
235     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
236       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
237     fi
238     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
239     case "$ac_option" in
240       *=*) ;;
241       *) ac_optarg=yes ;;
242     esac
243     eval "enable_${ac_feature}='$ac_optarg'" ;;
244
245   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
246   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
247   | --exec | --exe | --ex)
248     ac_prev=exec_prefix ;;
249   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
250   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
251   | --exec=* | --exe=* | --ex=*)
252     exec_prefix="$ac_optarg" ;;
253
254   -gas | --gas | --ga | --g)
255     # Obsolete; use --with-gas.
256     with_gas=yes ;;
257
258   -help | --help | --hel | --he)
259     # Omit some internal or obsolete options to make the list less imposing.
260     # This message is too long to be a string in the A/UX 3.1 sh.
261     cat << EOF
262 Usage: configure [options] [host]
263 Options: [defaults in brackets after descriptions]
264 Configuration:
265   --cache-file=FILE       cache test results in FILE
266   --help                  print this message
267   --no-create             do not create output files
268   --quiet, --silent       do not print \`checking...' messages
269   --version               print the version of autoconf that created configure
270 Directory and file names:
271   --prefix=PREFIX         install architecture-independent files in PREFIX
272                           [$ac_default_prefix]
273   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
274                           [same as prefix]
275   --bindir=DIR            user executables in DIR [EPREFIX/bin]
276   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
277   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
278   --datadir=DIR           read-only architecture-independent data in DIR
279                           [PREFIX/share]
280   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
281   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
282                           [PREFIX/com]
283   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
284   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
285   --includedir=DIR        C header files in DIR [PREFIX/include]
286   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
287   --infodir=DIR           info documentation in DIR [PREFIX/info]
288   --mandir=DIR            man documentation in DIR [PREFIX/man]
289   --srcdir=DIR            find the sources in DIR [configure dir or ..]
290   --program-prefix=PREFIX prepend PREFIX to installed program names
291   --program-suffix=SUFFIX append SUFFIX to installed program names
292   --program-transform-name=PROGRAM
293                           run sed PROGRAM on installed program names
294 EOF
295     cat << EOF
296 Host type:
297   --build=BUILD           configure for building on BUILD [BUILD=HOST]
298   --host=HOST             configure for HOST [guessed]
299   --target=TARGET         configure for TARGET [TARGET=HOST]
300 Features and packages:
301   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
302   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
303   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
304   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
305   --x-includes=DIR        X include files are in DIR
306   --x-libraries=DIR       X library files are in DIR
307 EOF
308     if test -n "$ac_help"; then
309       echo "--enable and --with options recognized:$ac_help"
310     fi
311     exit 0 ;;
312
313   -host | --host | --hos | --ho)
314     ac_prev=host ;;
315   -host=* | --host=* | --hos=* | --ho=*)
316     host="$ac_optarg" ;;
317
318   -includedir | --includedir | --includedi | --included | --include \
319   | --includ | --inclu | --incl | --inc)
320     ac_prev=includedir ;;
321   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
322   | --includ=* | --inclu=* | --incl=* | --inc=*)
323     includedir="$ac_optarg" ;;
324
325   -infodir | --infodir | --infodi | --infod | --info | --inf)
326     ac_prev=infodir ;;
327   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
328     infodir="$ac_optarg" ;;
329
330   -libdir | --libdir | --libdi | --libd)
331     ac_prev=libdir ;;
332   -libdir=* | --libdir=* | --libdi=* | --libd=*)
333     libdir="$ac_optarg" ;;
334
335   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
336   | --libexe | --libex | --libe)
337     ac_prev=libexecdir ;;
338   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
339   | --libexe=* | --libex=* | --libe=*)
340     libexecdir="$ac_optarg" ;;
341
342   -localstatedir | --localstatedir | --localstatedi | --localstated \
343   | --localstate | --localstat | --localsta | --localst \
344   | --locals | --local | --loca | --loc | --lo)
345     ac_prev=localstatedir ;;
346   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
347   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
348   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
349     localstatedir="$ac_optarg" ;;
350
351   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
352     ac_prev=mandir ;;
353   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
354     mandir="$ac_optarg" ;;
355
356   -nfp | --nfp | --nf)
357     # Obsolete; use --without-fp.
358     with_fp=no ;;
359
360   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
361   | --no-cr | --no-c)
362     no_create=yes ;;
363
364   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
365   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
366     no_recursion=yes ;;
367
368   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
369   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
370   | --oldin | --oldi | --old | --ol | --o)
371     ac_prev=oldincludedir ;;
372   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
373   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
374   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
375     oldincludedir="$ac_optarg" ;;
376
377   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
378     ac_prev=prefix ;;
379   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
380     prefix="$ac_optarg" ;;
381
382   -program-prefix | --program-prefix | --program-prefi | --program-pref \
383   | --program-pre | --program-pr | --program-p)
384     ac_prev=program_prefix ;;
385   -program-prefix=* | --program-prefix=* | --program-prefi=* \
386   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
387     program_prefix="$ac_optarg" ;;
388
389   -program-suffix | --program-suffix | --program-suffi | --program-suff \
390   | --program-suf | --program-su | --program-s)
391     ac_prev=program_suffix ;;
392   -program-suffix=* | --program-suffix=* | --program-suffi=* \
393   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
394     program_suffix="$ac_optarg" ;;
395
396   -program-transform-name | --program-transform-name \
397   | --program-transform-nam | --program-transform-na \
398   | --program-transform-n | --program-transform- \
399   | --program-transform | --program-transfor \
400   | --program-transfo | --program-transf \
401   | --program-trans | --program-tran \
402   | --progr-tra | --program-tr | --program-t)
403     ac_prev=program_transform_name ;;
404   -program-transform-name=* | --program-transform-name=* \
405   | --program-transform-nam=* | --program-transform-na=* \
406   | --program-transform-n=* | --program-transform-=* \
407   | --program-transform=* | --program-transfor=* \
408   | --program-transfo=* | --program-transf=* \
409   | --program-trans=* | --program-tran=* \
410   | --progr-tra=* | --program-tr=* | --program-t=*)
411     program_transform_name="$ac_optarg" ;;
412
413   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
414   | -silent | --silent | --silen | --sile | --sil)
415     silent=yes ;;
416
417   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
418     ac_prev=sbindir ;;
419   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
420   | --sbi=* | --sb=*)
421     sbindir="$ac_optarg" ;;
422
423   -sharedstatedir | --sharedstatedir | --sharedstatedi \
424   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
425   | --sharedst | --shareds | --shared | --share | --shar \
426   | --sha | --sh)
427     ac_prev=sharedstatedir ;;
428   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
429   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
430   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
431   | --sha=* | --sh=*)
432     sharedstatedir="$ac_optarg" ;;
433
434   -site | --site | --sit)
435     ac_prev=site ;;
436   -site=* | --site=* | --sit=*)
437     site="$ac_optarg" ;;
438
439   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
440     ac_prev=srcdir ;;
441   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
442     srcdir="$ac_optarg" ;;
443
444   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
445   | --syscon | --sysco | --sysc | --sys | --sy)
446     ac_prev=sysconfdir ;;
447   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
448   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
449     sysconfdir="$ac_optarg" ;;
450
451   -target | --target | --targe | --targ | --tar | --ta | --t)
452     ac_prev=target ;;
453   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
454     target="$ac_optarg" ;;
455
456   -v | -verbose | --verbose | --verbos | --verbo | --verb)
457     verbose=yes ;;
458
459   -version | --version | --versio | --versi | --vers)
460     echo "configure generated by autoconf version 2.13.1"
461     exit 0 ;;
462
463   -with-* | --with-*)
464     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
465     # Reject names that are not valid shell variable names.
466     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
467       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
468     fi
469     ac_package=`echo $ac_package| sed 's/-/_/g'`
470     case "$ac_option" in
471       *=*) ;;
472       *) ac_optarg=yes ;;
473     esac
474     eval "with_${ac_package}='$ac_optarg'" ;;
475
476   -without-* | --without-*)
477     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
478     # Reject names that are not valid shell variable names.
479     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
480       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
481     fi
482     ac_package=`echo $ac_package| sed 's/-/_/g'`
483     eval "with_${ac_package}=no" ;;
484
485   --x)
486     # Obsolete; use --with-x.
487     with_x=yes ;;
488
489   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
490   | --x-incl | --x-inc | --x-in | --x-i)
491     ac_prev=x_includes ;;
492   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
493   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
494     x_includes="$ac_optarg" ;;
495
496   -x-libraries | --x-libraries | --x-librarie | --x-librari \
497   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
498     ac_prev=x_libraries ;;
499   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
500   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
501     x_libraries="$ac_optarg" ;;
502
503   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
504     ;;
505
506   *)
507     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
508       echo "configure: warning: $ac_option: invalid host type" 1>&2
509     fi
510     if test "x$nonopt" != xNONE; then
511       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
512     fi
513     nonopt="$ac_option"
514     ;;
515
516   esac
517 done
518
519 if test -n "$ac_prev"; then
520   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
521 fi
522
523 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
524
525 # File descriptor usage:
526 # 0 standard input
527 # 1 file creation
528 # 2 errors and warnings
529 # 3 some systems may open it to /dev/tty
530 # 4 used on the Kubota Titan
531 # 6 checking for... messages and results
532 # 5 compiler messages saved in config.log
533 if test "$silent" = yes; then
534   exec 6>/dev/null
535 else
536   exec 6>&1
537 fi
538 exec 5>./config.log
539
540 echo "\
541 This file contains any messages produced by compilers while
542 running configure, to aid debugging if configure makes a mistake.
543 " 1>&5
544
545 # Strip out --no-create and --no-recursion so they do not pile up.
546 # Also quote any args containing shell metacharacters.
547 ac_configure_args=
548 for ac_arg
549 do
550   case "$ac_arg" in
551   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
552   | --no-cr | --no-c) ;;
553   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
554   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
555   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
556   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
557   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
558   esac
559 done
560
561 # NLS nuisances.
562 # Only set these to C if already set.  These must not be set unconditionally
563 # because not all systems understand e.g. LANG=C (notably SCO).
564 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
565 # Non-C LC_CTYPE values break the ctype check.
566 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
567 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
568 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
569 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
570
571 # confdefs.h avoids OS command line length limits that DEFS can exceed.
572 rm -rf conftest* confdefs.h
573 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
574 echo > confdefs.h
575
576 # A filename unique to this package, relative to the directory that
577 # configure is in, which we can look for to find out if srcdir is correct.
578 ac_unique_file=build/version
579
580 # Find the source files, if location was not specified.
581 if test -z "$srcdir"; then
582   ac_srcdir_defaulted=yes
583   # Try the directory containing this script, then its parent.
584   ac_prog=$0
585   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
586   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
587   srcdir=$ac_confdir
588   if test ! -r $srcdir/$ac_unique_file; then
589     srcdir=..
590   fi
591 else
592   ac_srcdir_defaulted=no
593 fi
594 if test ! -r $srcdir/$ac_unique_file; then
595   if test "$ac_srcdir_defaulted" = yes; then
596     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
597   else
598     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
599   fi
600 fi
601 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
602
603 # Prefer explicitly selected file to automatically selected ones.
604 if test -z "$CONFIG_SITE"; then
605   if test "x$prefix" != xNONE; then
606     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
607   else
608     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
609   fi
610 fi
611 for ac_site_file in $CONFIG_SITE; do
612   if test -r "$ac_site_file"; then
613     echo "loading site script $ac_site_file"
614     . "$ac_site_file"
615   fi
616 done
617
618
619 ac_ext=c
620 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
621 ac_cpp='$CPP $CPPFLAGS'
622 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
623 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
624 cross_compiling=$ac_cv_prog_cc_cross
625
626 ac_exeext=
627 ac_objext=o
628 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
629   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
630   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
631     ac_n= ac_c='
632 ' ac_t='        '
633   else
634     ac_n=-n ac_c= ac_t=
635   fi
636 else
637   ac_n= ac_c='\c' ac_t=
638 fi
639
640 ac_aux_dir=
641 for ac_dir in build $srcdir/build; do
642   if test -f $ac_dir/install-sh; then
643     ac_aux_dir=$ac_dir
644     ac_install_sh="$ac_aux_dir/install-sh -c"
645     break
646   elif test -f $ac_dir/install.sh; then
647     ac_aux_dir=$ac_dir
648     ac_install_sh="$ac_aux_dir/install.sh -c"
649     break
650   fi
651 done
652 if test -z "$ac_aux_dir"; then
653   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
654 fi
655 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
656 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
657 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
658
659 OL_VERSION=`cat $ac_aux_dir/version`
660 if test -z "$OL_VERSION"; then
661         { echo "configure: error: could not determine version" 1>&2; exit 1; }
662 fi
663
664 echo "Configuring OpenLDAP $OL_VERSION ..."
665
666
667 echo $ac_n "checking host system type""... $ac_c" 1>&6
668 echo "configure:669: checking host system type" >&5
669 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
670
671 # Make sure we can run config.sub.
672   if $ac_config_sub sun4 >/dev/null 2>&1; then :
673     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
674   fi
675
676   ac_cv_host_alias=$host
677   case "$ac_cv_host_alias" in
678   NONE)
679     case $nonopt in
680     NONE)
681       if ac_cv_host_alias=`$ac_config_guess`; then :
682       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
683       fi ;;
684     *) ac_cv_host_alias=$nonopt ;;
685     esac ;;
686   esac
687
688   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
689   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
690   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
691   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
692 else
693   echo $ac_n "(cached) $ac_c" 1>&6
694 fi
695
696 echo "$ac_t""$ac_cv_host" 1>&6
697
698 host=$ac_cv_host
699 host_alias=$ac_cv_host_alias
700 host_cpu=$ac_cv_host_cpu
701 host_vendor=$ac_cv_host_vendor
702 host_os=$ac_cv_host_os
703
704
705
706
707
708 echo $ac_n "checking target system type""... $ac_c" 1>&6
709 echo "configure:710: checking target system type" >&5
710 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
711
712 # Make sure we can run config.sub.
713   if $ac_config_sub sun4 >/dev/null 2>&1; then :
714     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
715   fi
716
717   ac_cv_target_alias=$target
718   case "$ac_cv_target_alias" in
719   NONE)
720     case $nonopt in
721     NONE)
722       ac_cv_target_alias=$host_alias ;;
723
724     *) ac_cv_target_alias=$nonopt ;;
725     esac ;;
726   esac
727
728   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
729   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
730   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
731   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
732 else
733   echo $ac_n "(cached) $ac_c" 1>&6
734 fi
735
736 echo "$ac_t""$ac_cv_target" 1>&6
737
738 target=$ac_cv_target
739 target_alias=$ac_cv_target_alias
740 target_cpu=$ac_cv_target_cpu
741 target_vendor=$ac_cv_target_vendor
742 target_os=$ac_cv_target_os
743
744
745
746
747
748 echo $ac_n "checking build system type""... $ac_c" 1>&6
749 echo "configure:750: checking build system type" >&5
750 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
751
752 # Make sure we can run config.sub.
753   if $ac_config_sub sun4 >/dev/null 2>&1; then :
754     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
755   fi
756
757   ac_cv_build_alias=$build
758   case "$ac_cv_build_alias" in
759   NONE)
760     case $nonopt in
761     NONE)
762       ac_cv_build_alias=$host_alias ;;
763
764     *) ac_cv_build_alias=$nonopt ;;
765     esac ;;
766   esac
767
768   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
769   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
770   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
771   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
772 else
773   echo $ac_n "(cached) $ac_c" 1>&6
774 fi
775
776 echo "$ac_t""$ac_cv_build" 1>&6
777
778 build=$ac_cv_build
779 build_alias=$ac_cv_build_alias
780 build_cpu=$ac_cv_build_cpu
781 build_vendor=$ac_cv_build_vendor
782 build_os=$ac_cv_build_os
783
784
785
786
787
788 # Do some error checking and defaulting for the host and target type.
789 # The inputs are:
790 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
791 #
792 # The rules are:
793 # 1. You are not allowed to specify --host, --target, and nonopt at the
794 #    same time.
795 # 2. Host defaults to nonopt.
796 # 3. If nonopt is not specified, then host defaults to the current host,
797 #    as determined by config.guess.
798 # 4. Target and build default to nonopt.
799 # 5. If nonopt is not specified, then target and build default to host.
800
801 # The aliases save the names the user supplied, while $host etc.
802 # will get canonicalized.
803 case $host---$target---$nonopt in
804 NONE---*---* | *---NONE---* | *---*---NONE) ;;
805 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
806 esac
807
808 test "$host_alias" != "$target_alias" &&
809   test "$program_prefix$program_suffix$program_transform_name" = \
810     NONENONEs,x,x, &&
811   program_prefix=${target_alias}-
812
813
814 # Find a good install program.  We prefer a C program (faster),
815 # so one script is as good as another.  But avoid the broken or
816 # incompatible versions:
817 # SysV /etc/install, /usr/sbin/install
818 # SunOS /usr/etc/install
819 # IRIX /sbin/install
820 # AIX /bin/install
821 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
822 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
823 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
824 # ./install, which can be erroneously created by make from ./install.sh.
825 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
826 echo "configure:827: checking for a BSD compatible install" >&5
827 if test -z "$INSTALL"; then
828 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
829   echo $ac_n "(cached) $ac_c" 1>&6
830 else
831     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
832   for ac_dir in $PATH; do
833     # Account for people who put trailing slashes in PATH elements.
834     case "$ac_dir/" in
835     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
836     *)
837       # OSF1 and SCO ODT 3.0 have their own names for install.
838       # Don't use installbsd from OSF since it installs stuff as root
839       # by default.
840       for ac_prog in ginstall scoinst install; do
841         if test -f $ac_dir/$ac_prog; then
842           if test $ac_prog = install &&
843             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
844             # AIX install.  It has an incompatible calling convention.
845             :
846           elif test $ac_prog = install &&
847             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
848             # program-specific install script used by HP pwplus--don't use.
849             :
850           else
851             ac_cv_path_install="$ac_dir/$ac_prog -c"
852             break 2
853           fi
854         fi
855       done
856       ;;
857     esac
858   done
859   IFS="$ac_save_IFS"
860
861 fi
862   if test "${ac_cv_path_install+set}" = set; then
863     INSTALL="$ac_cv_path_install"
864   else
865     # As a last resort, use the slow shell script.  We don't cache a
866     # path for INSTALL within a source directory, because that will
867     # break other packages using the cache if that directory is
868     # removed, or if the path is relative.
869     INSTALL="$ac_install_sh"
870   fi
871 fi
872 echo "$ac_t""$INSTALL" 1>&6
873
874 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
875 # It thinks the first close brace ends the variable substitution.
876 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
877
878 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
879
880 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
881
882 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
883 echo "configure:884: checking whether build environment is sane" >&5
884 # Just in case
885 sleep 1
886 echo timestamp > conftestfile
887 # Do `set' in a subshell so we don't clobber the current shell's
888 # arguments.  Must try -L first in case configure is actually a
889 # symlink; some systems play weird games with the mod time of symlinks
890 # (eg FreeBSD returns the mod time of the symlink's containing
891 # directory).
892 if (
893    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
894    if test "$*" = "X"; then
895       # -L didn't work.
896       set X `ls -t $srcdir/configure conftestfile`
897    fi
898    if test "$*" != "X $srcdir/configure conftestfile" \
899       && test "$*" != "X conftestfile $srcdir/configure"; then
900
901       # If neither matched, then we have a broken ls.  This can happen
902       # if, for instance, CONFIG_SHELL is bash and it inherits a
903       # broken ls alias from the environment.  This has actually
904       # happened.  Such a system could not be considered "sane".
905       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
906 alias in your environment" 1>&2; exit 1; }
907    fi
908
909    test "$2" = conftestfile
910    )
911 then
912    # Ok.
913    :
914 else
915    { echo "configure: error: newly created file is older than distributed files!
916 Check your system clock" 1>&2; exit 1; }
917 fi
918 rm -f conftest*
919 echo "$ac_t""yes" 1>&6
920 if test "$program_transform_name" = s,x,x,; then
921   program_transform_name=
922 else
923   # Double any \ or $.  echo might interpret backslashes.
924   cat <<\EOF_SED > conftestsed
925 s,\\,\\\\,g; s,\$,$$,g
926 EOF_SED
927   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
928   rm -f conftestsed
929 fi
930 test "$program_prefix" != NONE &&
931   program_transform_name="s,^,${program_prefix},;$program_transform_name"
932 # Use a double $ so make ignores it.
933 test "$program_suffix" != NONE &&
934   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
935
936 # sed with no file args requires a program.
937 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
938
939 for ac_prog in mawk gawk nawk awk
940 do
941 # Extract the first word of "$ac_prog", so it can be a program name with args.
942 set dummy $ac_prog; ac_word=$2
943 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
944 echo "configure:945: checking for $ac_word" >&5
945 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
946   echo $ac_n "(cached) $ac_c" 1>&6
947 else
948   if test -n "$AWK"; then
949   ac_cv_prog_AWK="$AWK" # Let the user override the test.
950 else
951   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
952   ac_dummy="$PATH"
953   for ac_dir in $ac_dummy; do
954     test -z "$ac_dir" && ac_dir=.
955     if test -f $ac_dir/$ac_word; then
956       ac_cv_prog_AWK="$ac_prog"
957       break
958     fi
959   done
960   IFS="$ac_save_ifs"
961 fi
962 fi
963 AWK="$ac_cv_prog_AWK"
964 if test -n "$AWK"; then
965   echo "$ac_t""$AWK" 1>&6
966 else
967   echo "$ac_t""no" 1>&6
968 fi
969
970 test -n "$AWK" && break
971 done
972
973 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
974 echo "configure:975: checking whether ${MAKE-make} sets \${MAKE}" >&5
975 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
976 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
977   echo $ac_n "(cached) $ac_c" 1>&6
978 else
979   cat > conftestmake <<\EOF
980 all:
981         @echo 'ac_maketemp="${MAKE}"'
982 EOF
983 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
984 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
985 if test -n "$ac_maketemp"; then
986   eval ac_cv_prog_make_${ac_make}_set=yes
987 else
988   eval ac_cv_prog_make_${ac_make}_set=no
989 fi
990 rm -f conftestmake
991 fi
992 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
993   echo "$ac_t""yes" 1>&6
994   SET_MAKE=
995 else
996   echo "$ac_t""no" 1>&6
997   SET_MAKE="MAKE=${MAKE-make}"
998 fi
999
1000
1001
1002 PACKAGE=OpenLDAP
1003
1004 VERSION=$OL_VERSION
1005
1006 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1007   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1008 fi
1009
1010
1011
1012 missing_dir=`cd $ac_aux_dir && pwd`
1013 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1014 echo "configure:1015: checking for working aclocal" >&5
1015 # Run test in a subshell; some versions of sh will print an error if
1016 # an executable is not found, even if stderr is redirected.
1017 # Redirect stdin to placate older versions of autoconf.  Sigh.
1018 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1019    ACLOCAL=aclocal
1020    echo "$ac_t""found" 1>&6
1021 else
1022    ACLOCAL="$missing_dir/missing aclocal"
1023    echo "$ac_t""missing" 1>&6
1024 fi
1025
1026 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1027 echo "configure:1028: checking for working autoconf" >&5
1028 # Run test in a subshell; some versions of sh will print an error if
1029 # an executable is not found, even if stderr is redirected.
1030 # Redirect stdin to placate older versions of autoconf.  Sigh.
1031 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1032    AUTOCONF=autoconf
1033    echo "$ac_t""found" 1>&6
1034 else
1035    AUTOCONF="$missing_dir/missing autoconf"
1036    echo "$ac_t""missing" 1>&6
1037 fi
1038
1039 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1040 echo "configure:1041: checking for working automake" >&5
1041 # Run test in a subshell; some versions of sh will print an error if
1042 # an executable is not found, even if stderr is redirected.
1043 # Redirect stdin to placate older versions of autoconf.  Sigh.
1044 if (automake --version) < /dev/null > /dev/null 2>&1; then
1045    AUTOMAKE=automake
1046    echo "$ac_t""found" 1>&6
1047 else
1048    AUTOMAKE="$missing_dir/missing automake"
1049    echo "$ac_t""missing" 1>&6
1050 fi
1051
1052 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1053 echo "configure:1054: checking for working autoheader" >&5
1054 # Run test in a subshell; some versions of sh will print an error if
1055 # an executable is not found, even if stderr is redirected.
1056 # Redirect stdin to placate older versions of autoconf.  Sigh.
1057 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1058    AUTOHEADER=autoheader
1059    echo "$ac_t""found" 1>&6
1060 else
1061    AUTOHEADER="$missing_dir/missing autoheader"
1062    echo "$ac_t""missing" 1>&6
1063 fi
1064
1065 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1066 echo "configure:1067: checking for working makeinfo" >&5
1067 # Run test in a subshell; some versions of sh will print an error if
1068 # an executable is not found, even if stderr is redirected.
1069 # Redirect stdin to placate older versions of autoconf.  Sigh.
1070 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1071    MAKEINFO=makeinfo
1072    echo "$ac_t""found" 1>&6
1073 else
1074    MAKEINFO="$missing_dir/missing makeinfo"
1075    echo "$ac_t""missing" 1>&6
1076 fi
1077
1078 install_sh="$missing_dir/install-sh"
1079 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1080
1081 for ac_prog in gnutar gtar tar
1082 do
1083 # Extract the first word of "$ac_prog", so it can be a program name with args.
1084 set dummy $ac_prog; ac_word=$2
1085 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1086 echo "configure:1087: checking for $ac_word" >&5
1087 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1088   echo $ac_n "(cached) $ac_c" 1>&6
1089 else
1090   if test -n "$AMTAR"; then
1091   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1092 else
1093   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1094   ac_dummy="$PATH"
1095   for ac_dir in $ac_dummy; do
1096     test -z "$ac_dir" && ac_dir=.
1097     if test -f $ac_dir/$ac_word; then
1098       ac_cv_prog_AMTAR="$ac_prog"
1099       break
1100     fi
1101   done
1102   IFS="$ac_save_ifs"
1103 fi
1104 fi
1105 AMTAR="$ac_cv_prog_AMTAR"
1106 if test -n "$AMTAR"; then
1107   echo "$ac_t""$AMTAR" 1>&6
1108 else
1109   echo "$ac_t""no" 1>&6
1110 fi
1111
1112 test -n "$AMTAR" && break
1113 done
1114
1115
1116 AMTARFLAGS=
1117 if test -n "$AMTAR"; then
1118   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1119         AMTARFLAGS=o
1120   fi
1121 fi
1122
1123
1124
1125 cat >> confdefs.h <<EOF
1126 #define OPENLDAP_PACKAGE "$PACKAGE"
1127 EOF
1128
1129 cat >> confdefs.h <<EOF
1130 #define OPENLDAP_VERSION "$VERSION"
1131 EOF
1132
1133
1134
1135
1136 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1137 echo "configure:1138: checking configure arguments" >&5
1138
1139
1140 top_builddir=`pwd`
1141
1142 ldap_subdir="/openldap"
1143
1144 # Check whether --with-subdir or --without-subdir was given.
1145 if test "${with_subdir+set}" = set; then
1146   withval="$with_subdir"
1147   case "$withval" in
1148         no) ldap_subdir=""
1149                 ;;
1150         yes)
1151                 ;;
1152         /*|\\*)
1153                 ldap_subdir="$withval"
1154                 ;;
1155         *)
1156                 ldap_subdir="/$withval"
1157                 ;;
1158 esac
1159
1160 fi
1161
1162
1163 # OpenLDAP --enable-debug
1164         # Check whether --enable-debug or --disable-debug was given.
1165 if test "${enable_debug+set}" = set; then
1166   enableval="$enable_debug"
1167   
1168         ol_arg=invalid
1169         for ol_val in auto yes no ; do
1170                 if test "$enableval" = "$ol_val" ; then
1171                         ol_arg="$ol_val"
1172                 fi
1173         done
1174         if test "$ol_arg" = "invalid" ; then
1175                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1176         fi
1177         ol_enable_debug="$ol_arg"
1178
1179 else
1180         ol_enable_debug="yes"
1181 fi
1182 # end --enable-debug
1183 # OpenLDAP --enable-syslog
1184         # Check whether --enable-syslog or --disable-syslog was given.
1185 if test "${enable_syslog+set}" = set; then
1186   enableval="$enable_syslog"
1187   
1188         ol_arg=invalid
1189         for ol_val in auto yes no ; do
1190                 if test "$enableval" = "$ol_val" ; then
1191                         ol_arg="$ol_val"
1192                 fi
1193         done
1194         if test "$ol_arg" = "invalid" ; then
1195                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1196         fi
1197         ol_enable_syslog="$ol_arg"
1198
1199 else
1200         ol_enable_syslog="auto"
1201 fi
1202 # end --enable-syslog
1203 # OpenLDAP --enable-proctitle
1204         # Check whether --enable-proctitle or --disable-proctitle was given.
1205 if test "${enable_proctitle+set}" = set; then
1206   enableval="$enable_proctitle"
1207   
1208         ol_arg=invalid
1209         for ol_val in auto yes no ; do
1210                 if test "$enableval" = "$ol_val" ; then
1211                         ol_arg="$ol_val"
1212                 fi
1213         done
1214         if test "$ol_arg" = "invalid" ; then
1215                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1216         fi
1217         ol_enable_proctitle="$ol_arg"
1218
1219 else
1220         ol_enable_proctitle="yes"
1221 fi
1222 # end --enable-proctitle
1223 # OpenLDAP --enable-cache
1224         # Check whether --enable-cache or --disable-cache was given.
1225 if test "${enable_cache+set}" = set; then
1226   enableval="$enable_cache"
1227   
1228         ol_arg=invalid
1229         for ol_val in auto yes no ; do
1230                 if test "$enableval" = "$ol_val" ; then
1231                         ol_arg="$ol_val"
1232                 fi
1233         done
1234         if test "$ol_arg" = "invalid" ; then
1235                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1236         fi
1237         ol_enable_cache="$ol_arg"
1238
1239 else
1240         ol_enable_cache="yes"
1241 fi
1242 # end --enable-cache
1243 # OpenLDAP --enable-dns
1244         # Check whether --enable-dns or --disable-dns was given.
1245 if test "${enable_dns+set}" = set; then
1246   enableval="$enable_dns"
1247   
1248         ol_arg=invalid
1249         for ol_val in auto yes no ; do
1250                 if test "$enableval" = "$ol_val" ; then
1251                         ol_arg="$ol_val"
1252                 fi
1253         done
1254         if test "$ol_arg" = "invalid" ; then
1255                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1256         fi
1257         ol_enable_dns="$ol_arg"
1258
1259 else
1260         ol_enable_dns="no"
1261 fi
1262 # end --enable-dns
1263 # OpenLDAP --enable-referrals
1264         # Check whether --enable-referrals or --disable-referrals was given.
1265 if test "${enable_referrals+set}" = set; then
1266   enableval="$enable_referrals"
1267   
1268         ol_arg=invalid
1269         for ol_val in auto yes no ; do
1270                 if test "$enableval" = "$ol_val" ; then
1271                         ol_arg="$ol_val"
1272                 fi
1273         done
1274         if test "$ol_arg" = "invalid" ; then
1275                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1276         fi
1277         ol_enable_referrals="$ol_arg"
1278
1279 else
1280         ol_enable_referrals="yes"
1281 fi
1282 # end --enable-referrals
1283 # OpenLDAP --enable-cldap
1284         # Check whether --enable-cldap or --disable-cldap was given.
1285 if test "${enable_cldap+set}" = set; then
1286   enableval="$enable_cldap"
1287   
1288         ol_arg=invalid
1289         for ol_val in auto yes no ; do
1290                 if test "$enableval" = "$ol_val" ; then
1291                         ol_arg="$ol_val"
1292                 fi
1293         done
1294         if test "$ol_arg" = "invalid" ; then
1295                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1296         fi
1297         ol_enable_cldap="$ol_arg"
1298
1299 else
1300         ol_enable_cldap="no"
1301 fi
1302 # end --enable-cldap
1303 # OpenLDAP --enable-x_compile
1304         # Check whether --enable-x_compile or --disable-x_compile was given.
1305 if test "${enable_x_compile+set}" = set; then
1306   enableval="$enable_x_compile"
1307   
1308         ol_arg=invalid
1309         for ol_val in yes no ; do
1310                 if test "$enableval" = "$ol_val" ; then
1311                         ol_arg="$ol_val"
1312                 fi
1313         done
1314         if test "$ol_arg" = "invalid" ; then
1315                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1316         fi
1317         ol_enable_x_compile="$ol_arg"
1318
1319 else
1320         ol_enable_x_compile="no"
1321 fi
1322 # end --enable-x_compile
1323
1324 # OpenLDAP --enable-dmalloc
1325         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1326 if test "${enable_dmalloc+set}" = set; then
1327   enableval="$enable_dmalloc"
1328   
1329         ol_arg=invalid
1330         for ol_val in auto yes no ; do
1331                 if test "$enableval" = "$ol_val" ; then
1332                         ol_arg="$ol_val"
1333                 fi
1334         done
1335         if test "$ol_arg" = "invalid" ; then
1336                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1337         fi
1338         ol_enable_dmalloc="$ol_arg"
1339
1340 else
1341         ol_enable_dmalloc="no"
1342 fi
1343 # end --enable-dmalloc
1344
1345 # OpenLDAP --with-cyrus_sasl
1346         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1347 if test "${with_cyrus_sasl+set}" = set; then
1348   withval="$with_cyrus_sasl"
1349   
1350         ol_arg=invalid
1351         for ol_val in auto yes no  ; do
1352                 if test "$withval" = "$ol_val" ; then
1353                         ol_arg="$ol_val"
1354                 fi
1355         done
1356         if test "$ol_arg" = "invalid" ; then
1357                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1358         fi
1359         ol_with_cyrus_sasl="$ol_arg"
1360
1361 else
1362         ol_with_cyrus_sasl="auto"
1363 fi
1364 # end --with-cyrus_sasl
1365
1366 # OpenLDAP --with-fetch
1367         # Check whether --with-fetch or --without-fetch was given.
1368 if test "${with_fetch+set}" = set; then
1369   withval="$with_fetch"
1370   
1371         ol_arg=invalid
1372         for ol_val in auto yes no  ; do
1373                 if test "$withval" = "$ol_val" ; then
1374                         ol_arg="$ol_val"
1375                 fi
1376         done
1377         if test "$ol_arg" = "invalid" ; then
1378                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1379         fi
1380         ol_with_fetch="$ol_arg"
1381
1382 else
1383         ol_with_fetch="auto"
1384 fi
1385 # end --with-fetch
1386
1387 # OpenLDAP --with-kerberos
1388         # Check whether --with-kerberos or --without-kerberos was given.
1389 if test "${with_kerberos+set}" = set; then
1390   withval="$with_kerberos"
1391   
1392         ol_arg=invalid
1393         for ol_val in auto k5 k4 afs yes no ; do
1394                 if test "$withval" = "$ol_val" ; then
1395                         ol_arg="$ol_val"
1396                 fi
1397         done
1398         if test "$ol_arg" = "invalid" ; then
1399                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1400         fi
1401         ol_with_kerberos="$ol_arg"
1402
1403 else
1404         ol_with_kerberos="auto"
1405 fi
1406 # end --with-kerberos
1407
1408 # OpenLDAP --with-readline
1409         # Check whether --with-readline or --without-readline was given.
1410 if test "${with_readline+set}" = set; then
1411   withval="$with_readline"
1412   
1413         ol_arg=invalid
1414         for ol_val in auto yes no  ; do
1415                 if test "$withval" = "$ol_val" ; then
1416                         ol_arg="$ol_val"
1417                 fi
1418         done
1419         if test "$ol_arg" = "invalid" ; then
1420                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1421         fi
1422         ol_with_readline="$ol_arg"
1423
1424 else
1425         ol_with_readline="auto"
1426 fi
1427 # end --with-readline
1428
1429 # OpenLDAP --with-threads
1430         # Check whether --with-threads or --without-threads was given.
1431 if test "${with_threads+set}" = set; then
1432   withval="$with_threads"
1433   
1434         ol_arg=invalid
1435         for ol_val in auto posix mach pth lwp yes no manual  ; do
1436                 if test "$withval" = "$ol_val" ; then
1437                         ol_arg="$ol_val"
1438                 fi
1439         done
1440         if test "$ol_arg" = "invalid" ; then
1441                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1442         fi
1443         ol_with_threads="$ol_arg"
1444
1445 else
1446         ol_with_threads="auto"
1447 fi
1448 # end --with-threads
1449
1450 # OpenLDAP --with-tls
1451         # Check whether --with-tls or --without-tls was given.
1452 if test "${with_tls+set}" = set; then
1453   withval="$with_tls"
1454   
1455         ol_arg=invalid
1456         for ol_val in auto ssleay openssl yes no  ; do
1457                 if test "$withval" = "$ol_val" ; then
1458                         ol_arg="$ol_val"
1459                 fi
1460         done
1461         if test "$ol_arg" = "invalid" ; then
1462                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1463         fi
1464         ol_with_tls="$ol_arg"
1465
1466 else
1467         ol_with_tls="auto"
1468 fi
1469 # end --with-tls
1470
1471 # OpenLDAP --with-yielding_select
1472         # Check whether --with-yielding_select or --without-yielding_select was given.
1473 if test "${with_yielding_select+set}" = set; then
1474   withval="$with_yielding_select"
1475   
1476         ol_arg=invalid
1477         for ol_val in auto yes no manual  ; do
1478                 if test "$withval" = "$ol_val" ; then
1479                         ol_arg="$ol_val"
1480                 fi
1481         done
1482         if test "$ol_arg" = "invalid" ; then
1483                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1484         fi
1485         ol_with_yielding_select="$ol_arg"
1486
1487 else
1488         ol_with_yielding_select="auto"
1489 fi
1490 # end --with-yielding_select
1491
1492
1493
1494 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1495 if test "${with_xxldapdoptions+set}" = set; then
1496   withval="$with_xxldapdoptions"
1497   :
1498 fi
1499
1500 # OpenLDAP --enable-ldapd
1501         # Check whether --enable-ldapd or --disable-ldapd was given.
1502 if test "${enable_ldapd+set}" = set; then
1503   enableval="$enable_ldapd"
1504   
1505         ol_arg=invalid
1506         for ol_val in auto yes no ; do
1507                 if test "$enableval" = "$ol_val" ; then
1508                         ol_arg="$ol_val"
1509                 fi
1510         done
1511         if test "$ol_arg" = "invalid" ; then
1512                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1513         fi
1514         ol_enable_ldapd="$ol_arg"
1515
1516 else
1517         ol_enable_ldapd="no"
1518 fi
1519 # end --enable-ldapd
1520
1521 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1522 if test "${with_xxslapdoptions+set}" = set; then
1523   withval="$with_xxslapdoptions"
1524   :
1525 fi
1526
1527 # OpenLDAP --enable-slapd
1528         # Check whether --enable-slapd or --disable-slapd was given.
1529 if test "${enable_slapd+set}" = set; then
1530   enableval="$enable_slapd"
1531   
1532         ol_arg=invalid
1533         for ol_val in auto yes no ; do
1534                 if test "$enableval" = "$ol_val" ; then
1535                         ol_arg="$ol_val"
1536                 fi
1537         done
1538         if test "$ol_arg" = "invalid" ; then
1539                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1540         fi
1541         ol_enable_slapd="$ol_arg"
1542
1543 else
1544         ol_enable_slapd="yes"
1545 fi
1546 # end --enable-slapd
1547 # OpenLDAP --enable-cleartext
1548         # Check whether --enable-cleartext or --disable-cleartext was given.
1549 if test "${enable_cleartext+set}" = set; then
1550   enableval="$enable_cleartext"
1551   
1552         ol_arg=invalid
1553         for ol_val in auto yes no ; do
1554                 if test "$enableval" = "$ol_val" ; then
1555                         ol_arg="$ol_val"
1556                 fi
1557         done
1558         if test "$ol_arg" = "invalid" ; then
1559                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1560         fi
1561         ol_enable_cleartext="$ol_arg"
1562
1563 else
1564         ol_enable_cleartext="yes"
1565 fi
1566 # end --enable-cleartext
1567 # OpenLDAP --enable-crypt
1568         # Check whether --enable-crypt or --disable-crypt was given.
1569 if test "${enable_crypt+set}" = set; then
1570   enableval="$enable_crypt"
1571   
1572         ol_arg=invalid
1573         for ol_val in auto yes no ; do
1574                 if test "$enableval" = "$ol_val" ; then
1575                         ol_arg="$ol_val"
1576                 fi
1577         done
1578         if test "$ol_arg" = "invalid" ; then
1579                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1580         fi
1581         ol_enable_crypt="$ol_arg"
1582
1583 else
1584         ol_enable_crypt="auto"
1585 fi
1586 # end --enable-crypt
1587 # OpenLDAP --enable-modules
1588         # Check whether --enable-modules or --disable-modules was given.
1589 if test "${enable_modules+set}" = set; then
1590   enableval="$enable_modules"
1591   
1592         ol_arg=invalid
1593         for ol_val in auto yes no ; do
1594                 if test "$enableval" = "$ol_val" ; then
1595                         ol_arg="$ol_val"
1596                 fi
1597         done
1598         if test "$ol_arg" = "invalid" ; then
1599                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1600         fi
1601         ol_enable_modules="$ol_arg"
1602
1603 else
1604         ol_enable_modules="no"
1605 fi
1606 # end --enable-modules
1607 # OpenLDAP --enable-multimaster
1608         # Check whether --enable-multimaster or --disable-multimaster was given.
1609 if test "${enable_multimaster+set}" = set; then
1610   enableval="$enable_multimaster"
1611   
1612         ol_arg=invalid
1613         for ol_val in auto yes no ; do
1614                 if test "$enableval" = "$ol_val" ; then
1615                         ol_arg="$ol_val"
1616                 fi
1617         done
1618         if test "$ol_arg" = "invalid" ; then
1619                 { echo "configure: error: bad value $enableval for --enable-multimaster" 1>&2; exit 1; }
1620         fi
1621         ol_enable_multimaster="$ol_arg"
1622
1623 else
1624         ol_enable_multimaster="no"
1625 fi
1626 # end --enable-multimaster
1627 # OpenLDAP --enable-phonetic
1628         # Check whether --enable-phonetic or --disable-phonetic was given.
1629 if test "${enable_phonetic+set}" = set; then
1630   enableval="$enable_phonetic"
1631   
1632         ol_arg=invalid
1633         for ol_val in auto yes no ; do
1634                 if test "$enableval" = "$ol_val" ; then
1635                         ol_arg="$ol_val"
1636                 fi
1637         done
1638         if test "$ol_arg" = "invalid" ; then
1639                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1640         fi
1641         ol_enable_phonetic="$ol_arg"
1642
1643 else
1644         ol_enable_phonetic="no"
1645 fi
1646 # end --enable-phonetic
1647 # OpenLDAP --enable-quipu
1648         # Check whether --enable-quipu or --disable-quipu was given.
1649 if test "${enable_quipu+set}" = set; then
1650   enableval="$enable_quipu"
1651   
1652         ol_arg=invalid
1653         for ol_val in auto yes no ; do
1654                 if test "$enableval" = "$ol_val" ; then
1655                         ol_arg="$ol_val"
1656                 fi
1657         done
1658         if test "$ol_arg" = "invalid" ; then
1659                 { echo "configure: error: bad value $enableval for --enable-quipu" 1>&2; exit 1; }
1660         fi
1661         ol_enable_quipu="$ol_arg"
1662
1663 else
1664         ol_enable_quipu="no"
1665 fi
1666 # end --enable-quipu
1667 # OpenLDAP --enable-rlookups
1668         # Check whether --enable-rlookups or --disable-rlookups was given.
1669 if test "${enable_rlookups+set}" = set; then
1670   enableval="$enable_rlookups"
1671   
1672         ol_arg=invalid
1673         for ol_val in auto yes no ; do
1674                 if test "$enableval" = "$ol_val" ; then
1675                         ol_arg="$ol_val"
1676                 fi
1677         done
1678         if test "$ol_arg" = "invalid" ; then
1679                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1680         fi
1681         ol_enable_rlookups="$ol_arg"
1682
1683 else
1684         ol_enable_rlookups="auto"
1685 fi
1686 # end --enable-rlookups
1687 # OpenLDAP --enable-aci
1688         # Check whether --enable-aci or --disable-aci was given.
1689 if test "${enable_aci+set}" = set; then
1690   enableval="$enable_aci"
1691   
1692         ol_arg=invalid
1693         for ol_val in auto yes no ; do
1694                 if test "$enableval" = "$ol_val" ; then
1695                         ol_arg="$ol_val"
1696                 fi
1697         done
1698         if test "$ol_arg" = "invalid" ; then
1699                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1700         fi
1701         ol_enable_aci="$ol_arg"
1702
1703 else
1704         ol_enable_aci="no"
1705 fi
1706 # end --enable-aci
1707 # OpenLDAP --enable-discreteaci
1708         # Check whether --enable-discreteaci or --disable-discreteaci was given.
1709 if test "${enable_discreteaci+set}" = set; then
1710   enableval="$enable_discreteaci"
1711   
1712         ol_arg=invalid
1713         for ol_val in auto yes no ; do
1714                 if test "$enableval" = "$ol_val" ; then
1715                         ol_arg="$ol_val"
1716                 fi
1717         done
1718         if test "$ol_arg" = "invalid" ; then
1719                 { echo "configure: error: bad value $enableval for --enable-discreteaci" 1>&2; exit 1; }
1720         fi
1721         ol_enable_discreteaci="$ol_arg"
1722
1723 else
1724         ol_enable_discreteaci="no"
1725 fi
1726 # end --enable-discreteaci
1727 # OpenLDAP --enable-wrappers
1728         # Check whether --enable-wrappers or --disable-wrappers was given.
1729 if test "${enable_wrappers+set}" = set; then
1730   enableval="$enable_wrappers"
1731   
1732         ol_arg=invalid
1733         for ol_val in auto yes no ; do
1734                 if test "$enableval" = "$ol_val" ; then
1735                         ol_arg="$ol_val"
1736                 fi
1737         done
1738         if test "$ol_arg" = "invalid" ; then
1739                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1740         fi
1741         ol_enable_wrappers="$ol_arg"
1742
1743 else
1744         ol_enable_wrappers="no"
1745 fi
1746 # end --enable-wrappers
1747
1748 # OpenLDAP --enable-bdb2
1749         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1750 if test "${enable_bdb2+set}" = set; then
1751   enableval="$enable_bdb2"
1752   
1753         ol_arg=invalid
1754         for ol_val in auto yes no ; do
1755                 if test "$enableval" = "$ol_val" ; then
1756                         ol_arg="$ol_val"
1757                 fi
1758         done
1759         if test "$ol_arg" = "invalid" ; then
1760                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1761         fi
1762         ol_enable_bdb2="$ol_arg"
1763
1764 else
1765         ol_enable_bdb2="no"
1766 fi
1767 # end --enable-bdb2
1768 # OpenLDAP --with-bdb2_module
1769         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1770 if test "${with_bdb2_module+set}" = set; then
1771   withval="$with_bdb2_module"
1772   
1773         ol_arg=invalid
1774         for ol_val in static dynamic ; do
1775                 if test "$withval" = "$ol_val" ; then
1776                         ol_arg="$ol_val"
1777                 fi
1778         done
1779         if test "$ol_arg" = "invalid" ; then
1780                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1781         fi
1782         ol_with_bdb2_module="$ol_arg"
1783
1784 else
1785         ol_with_bdb2_module="static"
1786 fi
1787 # end --with-bdb2_module
1788
1789 # OpenLDAP --enable-ldap
1790         # Check whether --enable-ldap or --disable-ldap was given.
1791 if test "${enable_ldap+set}" = set; then
1792   enableval="$enable_ldap"
1793   
1794         ol_arg=invalid
1795         for ol_val in auto yes no ; do
1796                 if test "$enableval" = "$ol_val" ; then
1797                         ol_arg="$ol_val"
1798                 fi
1799         done
1800         if test "$ol_arg" = "invalid" ; then
1801                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1802         fi
1803         ol_enable_ldap="$ol_arg"
1804
1805 else
1806         ol_enable_ldap="no"
1807 fi
1808 # end --enable-ldap
1809 # OpenLDAP --with-ldap_module
1810         # Check whether --with-ldap_module or --without-ldap_module was given.
1811 if test "${with_ldap_module+set}" = set; then
1812   withval="$with_ldap_module"
1813   
1814         ol_arg=invalid
1815         for ol_val in static dynamic ; do
1816                 if test "$withval" = "$ol_val" ; then
1817                         ol_arg="$ol_val"
1818                 fi
1819         done
1820         if test "$ol_arg" = "invalid" ; then
1821                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1822         fi
1823         ol_with_ldap_module="$ol_arg"
1824
1825 else
1826         ol_with_ldap_module="static"
1827 fi
1828 # end --with-ldap_module
1829
1830 # OpenLDAP --enable-ldbm
1831         # Check whether --enable-ldbm or --disable-ldbm was given.
1832 if test "${enable_ldbm+set}" = set; then
1833   enableval="$enable_ldbm"
1834   
1835         ol_arg=invalid
1836         for ol_val in auto yes no ; do
1837                 if test "$enableval" = "$ol_val" ; then
1838                         ol_arg="$ol_val"
1839                 fi
1840         done
1841         if test "$ol_arg" = "invalid" ; then
1842                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1843         fi
1844         ol_enable_ldbm="$ol_arg"
1845
1846 else
1847         ol_enable_ldbm="yes"
1848 fi
1849 # end --enable-ldbm
1850 # OpenLDAP --with-ldbm_api
1851         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1852 if test "${with_ldbm_api+set}" = set; then
1853   withval="$with_ldbm_api"
1854   
1855         ol_arg=invalid
1856         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1857                 if test "$withval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1863         fi
1864         ol_with_ldbm_api="$ol_arg"
1865
1866 else
1867         ol_with_ldbm_api="auto"
1868 fi
1869 # end --with-ldbm_api
1870
1871 # OpenLDAP --with-ldbm_module
1872         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1873 if test "${with_ldbm_module+set}" = set; then
1874   withval="$with_ldbm_module"
1875   
1876         ol_arg=invalid
1877         for ol_val in static dynamic ; do
1878                 if test "$withval" = "$ol_val" ; then
1879                         ol_arg="$ol_val"
1880                 fi
1881         done
1882         if test "$ol_arg" = "invalid" ; then
1883                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1884         fi
1885         ol_with_ldbm_module="$ol_arg"
1886
1887 else
1888         ol_with_ldbm_module="static"
1889 fi
1890 # end --with-ldbm_module
1891
1892 # OpenLDAP --with-ldbm_type
1893         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1894 if test "${with_ldbm_type+set}" = set; then
1895   withval="$with_ldbm_type"
1896   
1897         ol_arg=invalid
1898         for ol_val in auto btree hash ; do
1899                 if test "$withval" = "$ol_val" ; then
1900                         ol_arg="$ol_val"
1901                 fi
1902         done
1903         if test "$ol_arg" = "invalid" ; then
1904                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1905         fi
1906         ol_with_ldbm_type="$ol_arg"
1907
1908 else
1909         ol_with_ldbm_type="auto"
1910 fi
1911 # end --with-ldbm_type
1912
1913
1914 # OpenLDAP --enable-passwd
1915         # Check whether --enable-passwd or --disable-passwd was given.
1916 if test "${enable_passwd+set}" = set; then
1917   enableval="$enable_passwd"
1918   
1919         ol_arg=invalid
1920         for ol_val in auto yes no ; do
1921                 if test "$enableval" = "$ol_val" ; then
1922                         ol_arg="$ol_val"
1923                 fi
1924         done
1925         if test "$ol_arg" = "invalid" ; then
1926                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1927         fi
1928         ol_enable_passwd="$ol_arg"
1929
1930 else
1931         ol_enable_passwd="no"
1932 fi
1933 # end --enable-passwd
1934 # OpenLDAP --with-passwd_module
1935         # Check whether --with-passwd_module or --without-passwd_module was given.
1936 if test "${with_passwd_module+set}" = set; then
1937   withval="$with_passwd_module"
1938   
1939         ol_arg=invalid
1940         for ol_val in static dynamic ; do
1941                 if test "$withval" = "$ol_val" ; then
1942                         ol_arg="$ol_val"
1943                 fi
1944         done
1945         if test "$ol_arg" = "invalid" ; then
1946                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1947         fi
1948         ol_with_passwd_module="$ol_arg"
1949
1950 else
1951         ol_with_passwd_module="static"
1952 fi
1953 # end --with-passwd_module
1954
1955 # OpenLDAP --enable-perl
1956         # Check whether --enable-perl or --disable-perl was given.
1957 if test "${enable_perl+set}" = set; then
1958   enableval="$enable_perl"
1959   
1960         ol_arg=invalid
1961         for ol_val in auto yes no ; do
1962                 if test "$enableval" = "$ol_val" ; then
1963                         ol_arg="$ol_val"
1964                 fi
1965         done
1966         if test "$ol_arg" = "invalid" ; then
1967                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1968         fi
1969         ol_enable_perl="$ol_arg"
1970
1971 else
1972         ol_enable_perl="no"
1973 fi
1974 # end --enable-perl
1975 # OpenLDAP --with-perl_module
1976         # Check whether --with-perl_module or --without-perl_module was given.
1977 if test "${with_perl_module+set}" = set; then
1978   withval="$with_perl_module"
1979   
1980         ol_arg=invalid
1981         for ol_val in static dynamic ; do
1982                 if test "$withval" = "$ol_val" ; then
1983                         ol_arg="$ol_val"
1984                 fi
1985         done
1986         if test "$ol_arg" = "invalid" ; then
1987                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1988         fi
1989         ol_with_perl_module="$ol_arg"
1990
1991 else
1992         ol_with_perl_module="static"
1993 fi
1994 # end --with-perl_module
1995
1996 # OpenLDAP --enable-shell
1997         # Check whether --enable-shell or --disable-shell was given.
1998 if test "${enable_shell+set}" = set; then
1999   enableval="$enable_shell"
2000   
2001         ol_arg=invalid
2002         for ol_val in auto yes no ; do
2003                 if test "$enableval" = "$ol_val" ; then
2004                         ol_arg="$ol_val"
2005                 fi
2006         done
2007         if test "$ol_arg" = "invalid" ; then
2008                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2009         fi
2010         ol_enable_shell="$ol_arg"
2011
2012 else
2013         ol_enable_shell="no"
2014 fi
2015 # end --enable-shell
2016 # OpenLDAP --with-shell_module
2017         # Check whether --with-shell_module or --without-shell_module was given.
2018 if test "${with_shell_module+set}" = set; then
2019   withval="$with_shell_module"
2020   
2021         ol_arg=invalid
2022         for ol_val in static dynamic ; do
2023                 if test "$withval" = "$ol_val" ; then
2024                         ol_arg="$ol_val"
2025                 fi
2026         done
2027         if test "$ol_arg" = "invalid" ; then
2028                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2029         fi
2030         ol_with_shell_module="$ol_arg"
2031
2032 else
2033         ol_with_shell_module="static"
2034 fi
2035 # end --with-shell_module
2036
2037 # OpenLDAP --enable-tcl
2038         # Check whether --enable-tcl or --disable-tcl was given.
2039 if test "${enable_tcl+set}" = set; then
2040   enableval="$enable_tcl"
2041   
2042         ol_arg=invalid
2043         for ol_val in auto yes no ; do
2044                 if test "$enableval" = "$ol_val" ; then
2045                         ol_arg="$ol_val"
2046                 fi
2047         done
2048         if test "$ol_arg" = "invalid" ; then
2049                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2050         fi
2051         ol_enable_tcl="$ol_arg"
2052
2053 else
2054         ol_enable_tcl="no"
2055 fi
2056 # end --enable-tcl
2057 # OpenLDAP --with-tcl_module
2058         # Check whether --with-tcl_module or --without-tcl_module was given.
2059 if test "${with_tcl_module+set}" = set; then
2060   withval="$with_tcl_module"
2061   
2062         ol_arg=invalid
2063         for ol_val in static dynamic ; do
2064                 if test "$withval" = "$ol_val" ; then
2065                         ol_arg="$ol_val"
2066                 fi
2067         done
2068         if test "$ol_arg" = "invalid" ; then
2069                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2070         fi
2071         ol_with_tcl_module="$ol_arg"
2072
2073 else
2074         ol_with_tcl_module="static"
2075 fi
2076 # end --with-tcl_module
2077
2078
2079 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2080 if test "${with_xxslurpdoptions+set}" = set; then
2081   withval="$with_xxslurpdoptions"
2082   :
2083 fi
2084
2085 # OpenLDAP --enable-slurpd
2086         # Check whether --enable-slurpd or --disable-slurpd was given.
2087 if test "${enable_slurpd+set}" = set; then
2088   enableval="$enable_slurpd"
2089   
2090         ol_arg=invalid
2091         for ol_val in auto yes no ; do
2092                 if test "$enableval" = "$ol_val" ; then
2093                         ol_arg="$ol_val"
2094                 fi
2095         done
2096         if test "$ol_arg" = "invalid" ; then
2097                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2098         fi
2099         ol_enable_slurpd="$ol_arg"
2100
2101 else
2102         ol_enable_slurpd="auto"
2103 fi
2104 # end --enable-slurpd
2105
2106 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2107 if test "${with_xxliboptions+set}" = set; then
2108   withval="$with_xxliboptions"
2109   :
2110 fi
2111
2112 # Check whether --enable-static or --disable-static was given.
2113 if test "${enable_static+set}" = set; then
2114   enableval="$enable_static"
2115   p=${PACKAGE-default}
2116 case "$enableval" in
2117 yes) enable_static=yes ;;
2118 no) enable_static=no ;;
2119 *)
2120   enable_static=no
2121   # Look at the argument we got.  We use all the common list separators.
2122   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2123   for pkg in $enableval; do
2124     if test "X$pkg" = "X$p"; then
2125       enable_static=yes
2126     fi
2127   done
2128   IFS="$ac_save_ifs"
2129   ;;
2130 esac
2131 else
2132   enable_static=yes
2133 fi
2134
2135 # Check whether --enable-shared or --disable-shared was given.
2136 if test "${enable_shared+set}" = set; then
2137   enableval="$enable_shared"
2138   p=${PACKAGE-default}
2139 case "$enableval" in
2140 yes) enable_shared=yes ;;
2141 no) enable_shared=no ;;
2142 *)
2143   enable_shared=no
2144   # Look at the argument we got.  We use all the common list separators.
2145   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2146   for pkg in $enableval; do
2147     if test "X$pkg" = "X$p"; then
2148       enable_shared=yes
2149     fi
2150   done
2151   IFS="$ac_save_ifs"
2152   ;;
2153 esac
2154 else
2155   enable_shared=yes
2156 fi
2157
2158
2159 # validate options
2160 if test $ol_enable_dns = yes ; then
2161         if test $ol_enable_referrals = no ; then
2162                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
2163         fi
2164         if test $ol_enable_referrals = auto ; then
2165                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
2166                 ol_enable_referrals=yes
2167         fi
2168 fi
2169
2170 if test $ol_enable_slapd = no ; then
2171                 if test $ol_enable_bdb2 = yes ; then
2172                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
2173         fi
2174         if test $ol_enable_ldap = yes ; then
2175                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2176         fi
2177         if test $ol_enable_ldbm = yes ; then
2178                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2179         fi
2180         if test $ol_enable_passwd = yes ; then
2181                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2182         fi
2183         if test $ol_enable_perl = yes ; then
2184                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2185         fi
2186         if test $ol_enable_shell = yes ; then
2187                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2188         fi
2189         if test $ol_enable_tcl = yes ; then
2190                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2191         fi
2192         if test $ol_enable_modules = yes ; then
2193                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2194         fi
2195         if test $ol_enable_multimaster = yes ; then
2196                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2197         fi
2198         if test $ol_enable_wrappers = yes ; then
2199                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2200         fi
2201         if test $ol_enable_phonetic = yes ; then
2202                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2203         fi
2204         if test $ol_enable_quipu = yes ; then
2205                 echo "configure: warning: slapd disabled, ignoring --enable-quipu argument" 1>&2
2206         fi
2207         if test $ol_enable_rlookups = yes ; then
2208                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2209         fi
2210         if test $ol_enable_aci = yes ; then
2211                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2212         fi
2213         if test $ol_enable_discreteaci = yes ; then
2214                 echo "configure: warning: slapd disabled, ignoring --enable-discreteaci argument" 1>&2
2215         fi
2216         if test $ol_with_ldbm_api != auto ; then
2217                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2218         fi
2219         if test $ol_with_ldbm_type != auto ; then
2220                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2221         fi
2222         if test $ol_with_bdb2_module != static ; then
2223                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2224         fi
2225         if test $ol_with_ldap_module != static ; then
2226                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2227         fi
2228         if test $ol_with_ldbm_module != static ; then
2229                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2230         fi
2231         if test $ol_with_passwd_module != static ; then
2232                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2233         fi
2234         if test $ol_with_perl_module != static ; then
2235                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2236         fi
2237         if test $ol_with_shell_module != static ; then
2238                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2239         fi
2240         if test $ol_with_tcl_module != static ; then
2241                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2242         fi
2243         if test $ol_enable_slurpd = yes ; then
2244                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2245         fi
2246
2247         # force settings to no
2248         ol_enable_bdb2=no
2249         ol_enable_ldap=no
2250         ol_enable_ldbm=no
2251         ol_enable_passwd=no
2252         ol_enable_perl=no
2253         ol_enable_shell=no
2254         ol_enable_tcl=no
2255
2256         ol_enable_modules=no
2257         ol_enable_multimaster=no
2258         ol_enable_phonetic=no
2259         ol_enable_quipu=no
2260         ol_enable_rlookups=no
2261         ol_enable_aci=no
2262         ol_enable_discreteaci=no
2263         ol_enable_wrappers=no
2264
2265         ol_with_ldbm_api=no
2266         ol_with_ldbm_type=no
2267
2268         ol_with_bdb2_module=static
2269         ol_with_ldap_module=static
2270         ol_with_ldbm_module=static
2271         ol_with_passwd_module=static
2272         ol_with_perl_module=static
2273         ol_with_shell_module=static
2274         ol_with_tcl_module=static
2275
2276         ol_enable_slurpd=no
2277
2278 elif test $ol_enable_ldbm = no ; then
2279         
2280         if test $ol_with_ldbm_api != auto ; then
2281                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2282         fi
2283
2284         if test $ol_with_ldbm_type != auto ; then
2285                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2286         fi
2287
2288         if test $ol_with_ldbm_module != static ; then
2289                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2290         fi
2291
2292         if test $ol_enable_bdb2 = yes ; then
2293                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2294         fi
2295
2296         if test $ol_enable_modules != yes -a \
2297                 $ol_enable_ldap = no -a \
2298                 $ol_enable_passwd = no -a \
2299                 $ol_enable_perl = no -a \
2300                 $ol_enable_shell = no -a \
2301                 $ol_enable_tcl = no ; then
2302                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2303         fi
2304
2305         ol_with_ldbm_api=no
2306         ol_with_ldbm_type=no
2307         ol_with_ldbm_module=static
2308
2309 elif test $ol_enable_bdb2 = yes ; then
2310         
2311         if test $ol_with_ldbm_api != auto -a \
2312                 $ol_with_ldbm_api != db2 ; then
2313                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2314         fi
2315
2316         ol_with_ldbm_api=db2
2317
2318 else
2319         
2320         if test $ol_enable_bdb2 != no ; then
2321                 if test $ol_with_ldbm_api != auto -a \
2322                         $ol_with_ldbm_api != db2 ; then
2323                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2324                         ol_enable_bdb2=no
2325                 fi
2326         fi
2327
2328         if test $ol_with_ldbm_api = gdbm -a \
2329                 $ol_with_ldbm_type = btree ; then
2330                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2331         fi
2332         if test $ol_with_ldbm_api = mdbm -a \
2333                 $ol_with_ldbm_type = btree ; then
2334                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2335         fi
2336         if test $ol_with_ldbm_api = ndbm -a \
2337                 $ol_with_ldbm_type = btree ; then
2338                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2339         fi
2340 fi
2341
2342 if test $ol_enable_slurpd = yes ; then
2343                 if test $ol_with_threads = no ; then
2344                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2345         fi
2346 fi
2347
2348 echo "$ac_t""done" 1>&6
2349
2350 ## Initialize vars
2351 LDAP_LIBS=
2352 LDIF_LIBS=
2353 LDBM_LIBS=
2354 LTHREAD_LIBS=
2355 LUTIL_LIBS=
2356
2357 LDAPD_LIBS=
2358 SLAPD_LIBS=
2359 SLURPD_LIBS=
2360
2361 BUILD_LDAPD=no
2362 BUILD_SLAPD=no
2363 BUILD_SLURPD=no
2364
2365 BUILD_BDB2=no
2366 BUILD_LDAP=no
2367 BUILD_LDBM=no
2368 BUILD_PASSWD=no
2369 BUILD_PERL=no
2370 BUILD_QUIPU=no
2371 BUILD_SHELL=no
2372 BUILD_TCL=no
2373 BUILD_THREAD=no
2374
2375 BUILD_BDB2_DYNAMIC=static
2376 BUILD_LDAP_DYNAMIC=static
2377 BUILD_LDBM_DYNAMIC=static
2378 BUILD_PASSWD_DYNAMIC=static
2379 BUILD_PERL_DYNAMIC=static
2380 BUILD_SHELL_DYNAMIC=static
2381 BUILD_TCL_DYNAMIC=static
2382
2383 SLAPD_MODULES_LDFLAGS=
2384 SLAPD_MODULES_CPPFLAGS=
2385 SLAPD_MODULES_LIST=
2386
2387 SLAPD_PERL_LDFLAGS=
2388 SLAPD_PERL_CPPFLAGS=
2389
2390 KRB_LIBS=
2391 READLINE_LIBS=
2392 SASL_LIBS=
2393 TERMCAP_LIBS=
2394 TLS_LIBS=
2395 MODULES_LIBS=
2396
2397
2398
2399 cat >> confdefs.h <<\EOF
2400 #define HAVE_MKVERSION 1
2401 EOF
2402
2403
2404
2405
2406 ol_aix_threads=no
2407 case "$target" in
2408 *-*-aix*)       if test -z "$CC" ; then
2409                 case "$ol_with_threads" in
2410                 auto | yes |  posix) ol_aix_threads=yes ;;
2411                 esac
2412         fi
2413 ;;
2414 esac
2415
2416 if test $ol_aix_threads = yes ; then
2417         if test -z "${CC}" ; then
2418                 for ac_prog in cc_r xlc_r cc
2419 do
2420 # Extract the first word of "$ac_prog", so it can be a program name with args.
2421 set dummy $ac_prog; ac_word=$2
2422 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2423 echo "configure:2424: checking for $ac_word" >&5
2424 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2425   echo $ac_n "(cached) $ac_c" 1>&6
2426 else
2427   if test -n "$CC"; then
2428   ac_cv_prog_CC="$CC" # Let the user override the test.
2429 else
2430   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2431   ac_dummy="$PATH"
2432   for ac_dir in $ac_dummy; do
2433     test -z "$ac_dir" && ac_dir=.
2434     if test -f $ac_dir/$ac_word; then
2435       ac_cv_prog_CC="$ac_prog"
2436       break
2437     fi
2438   done
2439   IFS="$ac_save_ifs"
2440 fi
2441 fi
2442 CC="$ac_cv_prog_CC"
2443 if test -n "$CC"; then
2444   echo "$ac_t""$CC" 1>&6
2445 else
2446   echo "$ac_t""no" 1>&6
2447 fi
2448
2449 test -n "$CC" && break
2450 done
2451
2452
2453                 if test "$CC" = cc ; then
2454                                                 if test $ol_with_threads != auto ; then
2455                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2456                         else
2457                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2458                         fi
2459                         ol_with_threads=no
2460                 fi
2461         fi
2462
2463         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2464                 ol_with_threads=posix
2465                 ol_cv_pthread_create=yes
2466         fi
2467 fi
2468
2469 if test -z "${CC}"; then
2470         for ac_prog in cc
2471 do
2472 # Extract the first word of "$ac_prog", so it can be a program name with args.
2473 set dummy $ac_prog; ac_word=$2
2474 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2475 echo "configure:2476: checking for $ac_word" >&5
2476 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2477   echo $ac_n "(cached) $ac_c" 1>&6
2478 else
2479   if test -n "$CC"; then
2480   ac_cv_prog_CC="$CC" # Let the user override the test.
2481 else
2482   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2483   ac_dummy="$PATH"
2484   for ac_dir in $ac_dummy; do
2485     test -z "$ac_dir" && ac_dir=.
2486     if test -f $ac_dir/$ac_word; then
2487       ac_cv_prog_CC="$ac_prog"
2488       break
2489     fi
2490   done
2491   IFS="$ac_save_ifs"
2492 fi
2493 fi
2494 CC="$ac_cv_prog_CC"
2495 if test -n "$CC"; then
2496   echo "$ac_t""$CC" 1>&6
2497 else
2498   echo "$ac_t""no" 1>&6
2499 fi
2500
2501 test -n "$CC" && break
2502 done
2503
2504 fi
2505
2506
2507
2508 # Check whether --enable-fast-install or --disable-fast-install was given.
2509 if test "${enable_fast_install+set}" = set; then
2510   enableval="$enable_fast_install"
2511   p=${PACKAGE-default}
2512 case "$enableval" in
2513 yes) enable_fast_install=yes ;;
2514 no) enable_fast_install=no ;;
2515 *)
2516   enable_fast_install=no
2517   # Look at the argument we got.  We use all the common list separators.
2518   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2519   for pkg in $enableval; do
2520     if test "X$pkg" = "X$p"; then
2521       enable_fast_install=yes
2522     fi
2523   done
2524   IFS="$ac_save_ifs"
2525   ;;
2526 esac
2527 else
2528   enable_fast_install=yes
2529 fi
2530
2531 # Extract the first word of "ranlib", so it can be a program name with args.
2532 set dummy ranlib; ac_word=$2
2533 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2534 echo "configure:2535: checking for $ac_word" >&5
2535 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2536   echo $ac_n "(cached) $ac_c" 1>&6
2537 else
2538   if test -n "$RANLIB"; then
2539   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2540 else
2541   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2542   ac_dummy="$PATH"
2543   for ac_dir in $ac_dummy; do
2544     test -z "$ac_dir" && ac_dir=.
2545     if test -f $ac_dir/$ac_word; then
2546       ac_cv_prog_RANLIB="ranlib"
2547       break
2548     fi
2549   done
2550   IFS="$ac_save_ifs"
2551   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2552 fi
2553 fi
2554 RANLIB="$ac_cv_prog_RANLIB"
2555 if test -n "$RANLIB"; then
2556   echo "$ac_t""$RANLIB" 1>&6
2557 else
2558   echo "$ac_t""no" 1>&6
2559 fi
2560
2561 # Extract the first word of "gcc", so it can be a program name with args.
2562 set dummy gcc; ac_word=$2
2563 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2564 echo "configure:2565: checking for $ac_word" >&5
2565 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2566   echo $ac_n "(cached) $ac_c" 1>&6
2567 else
2568   if test -n "$CC"; then
2569   ac_cv_prog_CC="$CC" # Let the user override the test.
2570 else
2571   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2572   ac_dummy="$PATH"
2573   for ac_dir in $ac_dummy; do
2574     test -z "$ac_dir" && ac_dir=.
2575     if test -f $ac_dir/$ac_word; then
2576       ac_cv_prog_CC="gcc"
2577       break
2578     fi
2579   done
2580   IFS="$ac_save_ifs"
2581 fi
2582 fi
2583 CC="$ac_cv_prog_CC"
2584 if test -n "$CC"; then
2585   echo "$ac_t""$CC" 1>&6
2586 else
2587   echo "$ac_t""no" 1>&6
2588 fi
2589
2590 if test -z "$CC"; then
2591   # Extract the first word of "cc", so it can be a program name with args.
2592 set dummy cc; ac_word=$2
2593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2594 echo "configure:2595: checking for $ac_word" >&5
2595 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2596   echo $ac_n "(cached) $ac_c" 1>&6
2597 else
2598   if test -n "$CC"; then
2599   ac_cv_prog_CC="$CC" # Let the user override the test.
2600 else
2601   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2602   ac_prog_rejected=no
2603   ac_dummy="$PATH"
2604   for ac_dir in $ac_dummy; do
2605     test -z "$ac_dir" && ac_dir=.
2606     if test -f $ac_dir/$ac_word; then
2607       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2608         ac_prog_rejected=yes
2609         continue
2610       fi
2611       ac_cv_prog_CC="cc"
2612       break
2613     fi
2614   done
2615   IFS="$ac_save_ifs"
2616 if test $ac_prog_rejected = yes; then
2617   # We found a bogon in the path, so make sure we never use it.
2618   set dummy $ac_cv_prog_CC
2619   shift
2620   if test $# -gt 0; then
2621     # We chose a different compiler from the bogus one.
2622     # However, it has the same basename, so the bogon will be chosen
2623     # first if we set CC to just the basename; use the full file name.
2624     shift
2625     set dummy "$ac_dir/$ac_word" "$@"
2626     shift
2627     ac_cv_prog_CC="$@"
2628   fi
2629 fi
2630 fi
2631 fi
2632 CC="$ac_cv_prog_CC"
2633 if test -n "$CC"; then
2634   echo "$ac_t""$CC" 1>&6
2635 else
2636   echo "$ac_t""no" 1>&6
2637 fi
2638
2639   if test -z "$CC"; then
2640     case "`uname -s`" in
2641     *win32* | *WIN32* | *CYGWIN*)
2642       # Extract the first word of "cl", so it can be a program name with args.
2643 set dummy cl; ac_word=$2
2644 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2645 echo "configure:2646: checking for $ac_word" >&5
2646 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2647   echo $ac_n "(cached) $ac_c" 1>&6
2648 else
2649   if test -n "$CC"; then
2650   ac_cv_prog_CC="$CC" # Let the user override the test.
2651 else
2652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2653   ac_dummy="$PATH"
2654   for ac_dir in $ac_dummy; do
2655     test -z "$ac_dir" && ac_dir=.
2656     if test -f $ac_dir/$ac_word; then
2657       ac_cv_prog_CC="cl"
2658       break
2659     fi
2660   done
2661   IFS="$ac_save_ifs"
2662 fi
2663 fi
2664 CC="$ac_cv_prog_CC"
2665 if test -n "$CC"; then
2666   echo "$ac_t""$CC" 1>&6
2667 else
2668   echo "$ac_t""no" 1>&6
2669 fi
2670  ;;
2671     esac
2672   fi
2673   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2674 fi
2675
2676 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2677 echo "configure:2678: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2678
2679 ac_ext=c
2680 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2681 ac_cpp='$CPP $CPPFLAGS'
2682 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2683 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2684 cross_compiling=$ac_cv_prog_cc_cross
2685
2686 cat > conftest.$ac_ext << EOF
2687
2688 #line 2689 "configure"
2689 #include "confdefs.h"
2690
2691 main(){return(0);}
2692 EOF
2693 if { (eval echo configure:2694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2694   ac_cv_prog_cc_works=yes
2695   # If we can't run a trivial program, we are probably using a cross compiler.
2696   if (./conftest; exit) 2>/dev/null; then
2697     ac_cv_prog_cc_cross=no
2698   else
2699     ac_cv_prog_cc_cross=yes
2700   fi
2701 else
2702   echo "configure: failed program was:" >&5
2703   cat conftest.$ac_ext >&5
2704   ac_cv_prog_cc_works=no
2705 fi
2706 rm -fr conftest*
2707 ac_ext=c
2708 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2709 ac_cpp='$CPP $CPPFLAGS'
2710 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2711 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2712 cross_compiling=$ac_cv_prog_cc_cross
2713
2714 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2715 if test $ac_cv_prog_cc_works = no; then
2716   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2717 fi
2718 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2719 echo "configure:2720: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2720 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2721 cross_compiling=$ac_cv_prog_cc_cross
2722
2723 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2724 echo "configure:2725: checking whether we are using GNU C" >&5
2725 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2726   echo $ac_n "(cached) $ac_c" 1>&6
2727 else
2728   cat > conftest.c <<EOF
2729 #ifdef __GNUC__
2730   yes;
2731 #endif
2732 EOF
2733 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2734   ac_cv_prog_gcc=yes
2735 else
2736   ac_cv_prog_gcc=no
2737 fi
2738 fi
2739
2740 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2741
2742 if test $ac_cv_prog_gcc = yes; then
2743   GCC=yes
2744 else
2745   GCC=
2746 fi
2747
2748 ac_test_CFLAGS="${CFLAGS+set}"
2749 ac_save_CFLAGS="$CFLAGS"
2750 CFLAGS=
2751 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2752 echo "configure:2753: checking whether ${CC-cc} accepts -g" >&5
2753 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2754   echo $ac_n "(cached) $ac_c" 1>&6
2755 else
2756   echo 'void f(){}' > conftest.c
2757 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2758   ac_cv_prog_cc_g=yes
2759 else
2760   ac_cv_prog_cc_g=no
2761 fi
2762 rm -f conftest*
2763
2764 fi
2765
2766 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2767 if test "$ac_test_CFLAGS" = set; then
2768   CFLAGS="$ac_save_CFLAGS"
2769 elif test $ac_cv_prog_cc_g = yes; then
2770   if test "$GCC" = yes; then
2771     CFLAGS="-g -O2"
2772   else
2773     CFLAGS="-g"
2774   fi
2775 else
2776   if test "$GCC" = yes; then
2777     CFLAGS="-O2"
2778   else
2779     CFLAGS=
2780   fi
2781 fi
2782
2783 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2784 if test "${with_gnu_ld+set}" = set; then
2785   withval="$with_gnu_ld"
2786   test "$withval" = no || with_gnu_ld=yes
2787 else
2788   with_gnu_ld=no
2789 fi
2790
2791 ac_prog=ld
2792 if test "$ac_cv_prog_gcc" = yes; then
2793   # Check if gcc -print-prog-name=ld gives a path.
2794   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2795 echo "configure:2796: checking for ld used by GCC" >&5
2796   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2797   case "$ac_prog" in
2798     # Accept absolute paths.
2799     [\\/]* | [A-Za-z]:[\\/]*)
2800       re_direlt='/[^/][^/]*/\.\./'
2801       # Canonicalize the path of ld
2802       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2803       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2804         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2805       done
2806       test -z "$LD" && LD="$ac_prog"
2807       ;;
2808   "")
2809     # If it fails, then pretend we aren't using GCC.
2810     ac_prog=ld
2811     ;;
2812   *)
2813     # If it is relative, then search for the first ld in PATH.
2814     with_gnu_ld=unknown
2815     ;;
2816   esac
2817 elif test "$with_gnu_ld" = yes; then
2818   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2819 echo "configure:2820: checking for GNU ld" >&5
2820 else
2821   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2822 echo "configure:2823: checking for non-GNU ld" >&5
2823 fi
2824 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2825   echo $ac_n "(cached) $ac_c" 1>&6
2826 else
2827   if test -z "$LD"; then
2828   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2829   for ac_dir in $PATH; do
2830     test -z "$ac_dir" && ac_dir=.
2831     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2832       ac_cv_path_LD="$ac_dir/$ac_prog"
2833       # Check to see if the program is GNU ld.  I'd rather use --version,
2834       # but apparently some GNU ld's only accept -v.
2835       # Break only if it was the GNU/non-GNU ld that we prefer.
2836       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2837         test "$with_gnu_ld" != no && break
2838       else
2839         test "$with_gnu_ld" != yes && break
2840       fi
2841     fi
2842   done
2843   IFS="$ac_save_ifs"
2844 else
2845   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2846 fi
2847 fi
2848
2849 LD="$ac_cv_path_LD"
2850 if test -n "$LD"; then
2851   echo "$ac_t""$LD" 1>&6
2852 else
2853   echo "$ac_t""no" 1>&6
2854 fi
2855 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2856
2857 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2858 echo "configure:2859: checking if the linker ($LD) is GNU ld" >&5
2859 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2860   echo $ac_n "(cached) $ac_c" 1>&6
2861 else
2862   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2863 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2864   ac_cv_prog_gnu_ld=yes
2865 else
2866   ac_cv_prog_gnu_ld=no
2867 fi
2868 fi
2869
2870 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2871
2872
2873 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2874 echo "configure:2875: checking for BSD-compatible nm" >&5
2875 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2876   echo $ac_n "(cached) $ac_c" 1>&6
2877 else
2878   if test -n "$NM"; then
2879   # Let the user override the test.
2880   ac_cv_path_NM="$NM"
2881 else
2882   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2883   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2884     test -z "$ac_dir" && ac_dir=.
2885     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
2886       # Check to see if the nm accepts a BSD-compat flag.
2887       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2888       #   nm: unknown option "B" ignored
2889       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2890         ac_cv_path_NM="$ac_dir/nm -B"
2891         break
2892       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2893         ac_cv_path_NM="$ac_dir/nm -p"
2894         break
2895       else
2896         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
2897         continue # so that we can try to find one that supports BSD flags
2898       fi
2899     fi
2900   done
2901   IFS="$ac_save_ifs"
2902   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2903 fi
2904 fi
2905
2906 NM="$ac_cv_path_NM"
2907 echo "$ac_t""$NM" 1>&6
2908
2909
2910 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2911 echo "configure:2912: checking whether ln -s works" >&5
2912 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2913   echo $ac_n "(cached) $ac_c" 1>&6
2914 else
2915   rm -f conftestdata
2916 if ln -s X conftestdata 2>/dev/null
2917 then
2918   rm -f conftestdata
2919   ac_cv_prog_LN_S="ln -s"
2920 else
2921   ac_cv_prog_LN_S=ln
2922 fi
2923 fi
2924 LN_S="$ac_cv_prog_LN_S"
2925 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2926   echo "$ac_t""yes" 1>&6
2927 else
2928   echo "$ac_t""no" 1>&6
2929 fi
2930
2931
2932 # Check for any special flags to pass to ltconfig.
2933 libtool_flags="--cache-file=$cache_file"
2934 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2935 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2936 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2937 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2938 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2939 libtool_flags="$libtool_flags --enable-dlopen"
2940
2941 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2942 if test "${enable_libtool_lock+set}" = set; then
2943   enableval="$enable_libtool_lock"
2944   :
2945 fi
2946
2947 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2948 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2949
2950 # Some flags need to be propagated to the compiler or linker for good
2951 # libtool support.
2952 case "$host" in
2953 *-*-irix6*)
2954   # Find out which ABI we are using.
2955   echo '#line 2956 "configure"' > conftest.$ac_ext
2956   if { (eval echo configure:2957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2957     case "`/usr/bin/file conftest.o`" in
2958     *32-bit*)
2959       LD="${LD-ld} -32"
2960       ;;
2961     *N32*)
2962       LD="${LD-ld} -n32"
2963       ;;
2964     *64-bit*)
2965       LD="${LD-ld} -64"
2966       ;;
2967     esac
2968   fi
2969   rm -rf conftest*
2970   ;;
2971
2972 *-*-sco3.2v5*)
2973   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2974   SAVE_CFLAGS="$CFLAGS"
2975   CFLAGS="$CFLAGS -belf"
2976   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2977 echo "configure:2978: checking whether the C compiler needs -belf" >&5
2978 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
2979   echo $ac_n "(cached) $ac_c" 1>&6
2980 else
2981   cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2984
2985 int main() {
2986
2987 ; return 0; }
2988 EOF
2989 if { (eval echo configure:2990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2990   rm -rf conftest*
2991   lt_cv_cc_needs_belf=yes
2992 else
2993   echo "configure: failed program was:" >&5
2994   cat conftest.$ac_ext >&5
2995   rm -rf conftest*
2996   lt_cv_cc_needs_belf=no
2997 fi
2998 rm -f conftest*
2999 fi
3000
3001 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
3002   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3003     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3004     CFLAGS="$SAVE_CFLAGS"
3005   fi
3006   ;;
3007
3008
3009 esac
3010
3011
3012 # Save cache, so that ltconfig can load it
3013
3014
3015 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
3016 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3017 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3018 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
3019 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
3020 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
3021 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
3022 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
3023
3024 # Reload cache, that may have been modified by ltconfig
3025
3026
3027 # This can be used to rebuild libtool when needed
3028 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
3029
3030 # Always use our own libtool.
3031 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3032
3033 # Redirect the config.log output again, so that the ltconfig log is not
3034 # clobbered by the next message.
3035 exec 5>>./config.log
3036
3037
3038 for ac_prog in mawk gawk nawk awk
3039 do
3040 # Extract the first word of "$ac_prog", so it can be a program name with args.
3041 set dummy $ac_prog; ac_word=$2
3042 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3043 echo "configure:3044: checking for $ac_word" >&5
3044 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
3045   echo $ac_n "(cached) $ac_c" 1>&6
3046 else
3047   if test -n "$AWK"; then
3048   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3049 else
3050   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3051   ac_dummy="$PATH"
3052   for ac_dir in $ac_dummy; do
3053     test -z "$ac_dir" && ac_dir=.
3054     if test -f $ac_dir/$ac_word; then
3055       ac_cv_prog_AWK="$ac_prog"
3056       break
3057     fi
3058   done
3059   IFS="$ac_save_ifs"
3060 fi
3061 fi
3062 AWK="$ac_cv_prog_AWK"
3063 if test -n "$AWK"; then
3064   echo "$ac_t""$AWK" 1>&6
3065 else
3066   echo "$ac_t""no" 1>&6
3067 fi
3068
3069 test -n "$AWK" && break
3070 done
3071
3072 # test for ln hardlink support
3073 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
3074 echo "configure:3075: checking whether ln works" >&5
3075 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
3076   echo $ac_n "(cached) $ac_c" 1>&6
3077 else
3078   rm -f conftest.src conftest.dst
3079 echo "conftest" > conftest.src
3080 if ln conftest.src conftest.dst 2>/dev/null
3081 then
3082   ol_cv_prog_LN_H="ln"
3083 else
3084   ol_cv_prog_LN_H="cp"
3085 fi
3086 rm -f conftest.src conftest.dst
3087
3088 fi
3089 LN_H="$ol_cv_prog_LN_H"
3090 if test "$ol_cv_prog_LN_H" = "ln"; then
3091         echo "$ac_t""yes" 1>&6
3092 else
3093         echo "$ac_t""no" 1>&6
3094 fi
3095
3096 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3097 echo "configure:3098: checking whether ln -s works" >&5
3098 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3099   echo $ac_n "(cached) $ac_c" 1>&6
3100 else
3101   rm -f conftestdata
3102 if ln -s X conftestdata 2>/dev/null
3103 then
3104   rm -f conftestdata
3105   ac_cv_prog_LN_S="ln -s"
3106 else
3107   ac_cv_prog_LN_S=ln
3108 fi
3109 fi
3110 LN_S="$ac_cv_prog_LN_S"
3111 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3112   echo "$ac_t""yes" 1>&6
3113 else
3114   echo "$ac_t""no" 1>&6
3115 fi
3116
3117
3118 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
3119         LN_S="$LN_H"
3120 fi
3121
3122 # Extract the first word of "sendmail", so it can be a program name with args.
3123 set dummy sendmail; ac_word=$2
3124 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3125 echo "configure:3126: checking for $ac_word" >&5
3126 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
3127   echo $ac_n "(cached) $ac_c" 1>&6
3128 else
3129   case "$SENDMAIL" in
3130   /*)
3131   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
3132   ;;
3133   ?:/*)                  
3134   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
3135   ;;
3136   *)
3137   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3138   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
3139   for ac_dir in $ac_dummy; do 
3140     test -z "$ac_dir" && ac_dir=.
3141     if test -f $ac_dir/$ac_word; then
3142       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
3143       break
3144     fi
3145   done
3146   IFS="$ac_save_ifs"
3147   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
3148   ;;
3149 esac
3150 fi
3151 SENDMAIL="$ac_cv_path_SENDMAIL"
3152 if test -n "$SENDMAIL"; then
3153   echo "$ac_t""$SENDMAIL" 1>&6
3154 else
3155   echo "$ac_t""no" 1>&6
3156 fi
3157
3158 # Extract the first word of "vi", so it can be a program name with args.
3159 set dummy vi; ac_word=$2
3160 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3161 echo "configure:3162: checking for $ac_word" >&5
3162 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
3163   echo $ac_n "(cached) $ac_c" 1>&6
3164 else
3165   case "$EDITOR" in
3166   /*)
3167   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
3168   ;;
3169   ?:/*)                  
3170   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
3171   ;;
3172   *)
3173   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3174   ac_dummy="$PATH:/usr/ucb"
3175   for ac_dir in $ac_dummy; do 
3176     test -z "$ac_dir" && ac_dir=.
3177     if test -f $ac_dir/$ac_word; then
3178       ac_cv_path_EDITOR="$ac_dir/$ac_word"
3179       break
3180     fi
3181   done
3182   IFS="$ac_save_ifs"
3183   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
3184   ;;
3185 esac
3186 fi
3187 EDITOR="$ac_cv_path_EDITOR"
3188 if test -n "$EDITOR"; then
3189   echo "$ac_t""$EDITOR" 1>&6
3190 else
3191   echo "$ac_t""no" 1>&6
3192 fi
3193
3194 # Extract the first word of "finger", so it can be a program name with args.
3195 set dummy finger; ac_word=$2
3196 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3197 echo "configure:3198: checking for $ac_word" >&5
3198 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
3199   echo $ac_n "(cached) $ac_c" 1>&6
3200 else
3201   case "$FINGER" in
3202   /*)
3203   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
3204   ;;
3205   ?:/*)                  
3206   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
3207   ;;
3208   *)
3209   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3210   ac_dummy="$PATH:/usr/ucb"
3211   for ac_dir in $ac_dummy; do 
3212     test -z "$ac_dir" && ac_dir=.
3213     if test -f $ac_dir/$ac_word; then
3214       ac_cv_path_FINGER="$ac_dir/$ac_word"
3215       break
3216     fi
3217   done
3218   IFS="$ac_save_ifs"
3219   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
3220   ;;
3221 esac
3222 fi
3223 FINGER="$ac_cv_path_FINGER"
3224 if test -n "$FINGER"; then
3225   echo "$ac_t""$FINGER" 1>&6
3226 else
3227   echo "$ac_t""no" 1>&6
3228 fi
3229
3230
3231 ol_link_perl=no
3232 if test $ol_enable_perl != no ; then
3233         # Extract the first word of "perl", so it can be a program name with args.
3234 set dummy perl; ac_word=$2
3235 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3236 echo "configure:3237: checking for $ac_word" >&5
3237 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
3238   echo $ac_n "(cached) $ac_c" 1>&6
3239 else
3240   case "$PERLBIN" in
3241   /*)
3242   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
3243   ;;
3244   ?:/*)                  
3245   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
3246   ;;
3247   *)
3248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3249   ac_dummy="$PATH"
3250   for ac_dir in $ac_dummy; do 
3251     test -z "$ac_dir" && ac_dir=.
3252     if test -f $ac_dir/$ac_word; then
3253       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
3254       break
3255     fi
3256   done
3257   IFS="$ac_save_ifs"
3258   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
3259   ;;
3260 esac
3261 fi
3262 PERLBIN="$ac_cv_path_PERLBIN"
3263 if test -n "$PERLBIN"; then
3264   echo "$ac_t""$PERLBIN" 1>&6
3265 else
3266   echo "$ac_t""no" 1>&6
3267 fi
3268
3269
3270         if test "no$PERLBIN" = "no" ; then
3271                 if test $ol_enable_perl = yes ; then
3272                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3273                 fi
3274
3275         else
3276                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3277                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3278
3279                                 ol_link_perl=yes
3280         fi
3281 fi
3282
3283 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3284 echo "configure:3285: checking how to run the C preprocessor" >&5
3285 # On Suns, sometimes $CPP names a directory.
3286 if test -n "$CPP" && test -d "$CPP"; then
3287   CPP=
3288 fi
3289 if test -z "$CPP"; then
3290 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3291   echo $ac_n "(cached) $ac_c" 1>&6
3292 else
3293     # This must be in double quotes, not single quotes, because CPP may get
3294   # substituted into the Makefile and "${CC-cc}" will confuse make.
3295   CPP="${CC-cc} -E"
3296   # On the NeXT, cc -E runs the code through the compiler's parser,
3297   # not just through cpp.
3298   cat > conftest.$ac_ext <<EOF
3299 #line 3300 "configure"
3300 #include "confdefs.h"
3301 #include <assert.h>
3302 Syntax Error
3303 EOF
3304 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3305 { (eval echo configure:3306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3307 if test -z "$ac_err"; then
3308   :
3309 else
3310   echo "$ac_err" >&5
3311   echo "configure: failed program was:" >&5
3312   cat conftest.$ac_ext >&5
3313   rm -rf conftest*
3314   CPP="${CC-cc} -E -traditional-cpp"
3315   cat > conftest.$ac_ext <<EOF
3316 #line 3317 "configure"
3317 #include "confdefs.h"
3318 #include <assert.h>
3319 Syntax Error
3320 EOF
3321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3322 { (eval echo configure:3323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3324 if test -z "$ac_err"; then
3325   :
3326 else
3327   echo "$ac_err" >&5
3328   echo "configure: failed program was:" >&5
3329   cat conftest.$ac_ext >&5
3330   rm -rf conftest*
3331   CPP="${CC-cc} -nologo -E"
3332   cat > conftest.$ac_ext <<EOF
3333 #line 3334 "configure"
3334 #include "confdefs.h"
3335 #include <assert.h>
3336 Syntax Error
3337 EOF
3338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3339 { (eval echo configure:3340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3341 if test -z "$ac_err"; then
3342   :
3343 else
3344   echo "$ac_err" >&5
3345   echo "configure: failed program was:" >&5
3346   cat conftest.$ac_ext >&5
3347   rm -rf conftest*
3348   CPP=/lib/cpp
3349 fi
3350 rm -f conftest*
3351 fi
3352 rm -f conftest*
3353 fi
3354 rm -f conftest*
3355   ac_cv_prog_CPP="$CPP"
3356 fi
3357   CPP="$ac_cv_prog_CPP"
3358 else
3359   ac_cv_prog_CPP="$CPP"
3360 fi
3361 echo "$ac_t""$CPP" 1>&6
3362
3363
3364 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3365         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3366
3367 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3368         echo "configure: warning: programs compiled here do run here..." 1>&2
3369         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3370
3371 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3372         echo "configure: warning: programs compiled here do not run here..." 1>&2
3373         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3374 fi
3375
3376 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3377 echo "configure:3378: checking for AIX" >&5
3378 cat > conftest.$ac_ext <<EOF
3379 #line 3380 "configure"
3380 #include "confdefs.h"
3381 #ifdef _AIX
3382   yes
3383 #endif
3384
3385 EOF
3386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3387   egrep "yes" >/dev/null 2>&1; then
3388   rm -rf conftest*
3389   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3390 #define _ALL_SOURCE 1
3391 EOF
3392
3393 else
3394   rm -rf conftest*
3395   echo "$ac_t""no" 1>&6
3396 fi
3397 rm -f conftest*
3398
3399
3400 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3401 echo "configure:3402: checking for POSIXized ISC" >&5
3402 if test -d /etc/conf/kconfig.d &&
3403   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3404 then
3405   echo "$ac_t""yes" 1>&6
3406   ISC=yes # If later tests want to check for ISC.
3407   cat >> confdefs.h <<\EOF
3408 #define _POSIX_SOURCE 1
3409 EOF
3410
3411   if test "$GCC" = yes; then
3412     CC="$CC -posix"
3413   else
3414     CC="$CC -Xp"
3415   fi
3416 else
3417   echo "$ac_t""no" 1>&6
3418   ISC=
3419 fi
3420
3421 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3422 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3423 echo "configure:3424: checking for minix/config.h" >&5
3424 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3425   echo $ac_n "(cached) $ac_c" 1>&6
3426 else
3427   cat > conftest.$ac_ext <<EOF
3428 #line 3429 "configure"
3429 #include "confdefs.h"
3430 #include <minix/config.h>
3431 EOF
3432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3433 { (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3435 if test -z "$ac_err"; then
3436   rm -rf conftest*
3437   eval "ac_cv_header_$ac_safe=yes"
3438 else
3439   echo "$ac_err" >&5
3440   echo "configure: failed program was:" >&5
3441   cat conftest.$ac_ext >&5
3442   rm -rf conftest*
3443   eval "ac_cv_header_$ac_safe=no"
3444 fi
3445 rm -f conftest*
3446 fi
3447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3448   echo "$ac_t""yes" 1>&6
3449   MINIX=yes
3450 else
3451   echo "$ac_t""no" 1>&6
3452 MINIX=
3453 fi
3454
3455 if test "$MINIX" = yes; then
3456   cat >> confdefs.h <<\EOF
3457 #define _POSIX_SOURCE 1
3458 EOF
3459
3460   cat >> confdefs.h <<\EOF
3461 #define _POSIX_1_SOURCE 2
3462 EOF
3463
3464   cat >> confdefs.h <<\EOF
3465 #define _MINIX 1
3466 EOF
3467
3468 fi
3469
3470
3471 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3472 echo "configure:3473: checking for Cygwin environment" >&5
3473 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3474   echo $ac_n "(cached) $ac_c" 1>&6
3475 else
3476   cat > conftest.$ac_ext <<EOF
3477 #line 3478 "configure"
3478 #include "confdefs.h"
3479
3480 int main() {
3481
3482 #ifndef __CYGWIN__
3483 #define __CYGWIN__ __CYGWIN32__
3484 #endif
3485 return __CYGWIN__;
3486 ; return 0; }
3487 EOF
3488 if { (eval echo configure:3489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3489   rm -rf conftest*
3490   ac_cv_cygwin=yes
3491 else
3492   echo "configure: failed program was:" >&5
3493   cat conftest.$ac_ext >&5
3494   rm -rf conftest*
3495   ac_cv_cygwin=no
3496 fi
3497 rm -f conftest*
3498 fi
3499
3500 echo "$ac_t""$ac_cv_cygwin" 1>&6
3501 CYGWIN=
3502 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3503 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3504 echo "configure:3505: checking for mingw32 environment" >&5
3505 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3506   echo $ac_n "(cached) $ac_c" 1>&6
3507 else
3508   cat > conftest.$ac_ext <<EOF
3509 #line 3510 "configure"
3510 #include "confdefs.h"
3511
3512 int main() {
3513 return __MINGW32__;
3514 ; return 0; }
3515 EOF
3516 if { (eval echo configure:3517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3517   rm -rf conftest*
3518   ac_cv_mingw32=yes
3519 else
3520   echo "configure: failed program was:" >&5
3521   cat conftest.$ac_ext >&5
3522   rm -rf conftest*
3523   ac_cv_mingw32=no
3524 fi
3525 rm -f conftest*
3526 fi
3527
3528 echo "$ac_t""$ac_cv_mingw32" 1>&6
3529 MINGW32=
3530 test "$ac_cv_mingw32" = yes && MINGW32=yes
3531 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3532 echo "configure:3533: checking for EMX OS/2 environment" >&5
3533 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3534   echo $ac_n "(cached) $ac_c" 1>&6
3535 else
3536   cat > conftest.$ac_ext <<EOF
3537 #line 3538 "configure"
3538 #include "confdefs.h"
3539
3540 int main() {
3541 return __EMX__;
3542 ; return 0; }
3543 EOF
3544 if { (eval echo configure:3545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3545   rm -rf conftest*
3546   ac_cv_emxos2=yes
3547 else
3548   echo "configure: failed program was:" >&5
3549   cat conftest.$ac_ext >&5
3550   rm -rf conftest*
3551   ac_cv_emxos2=no
3552 fi
3553 rm -f conftest*
3554 fi
3555
3556 echo "$ac_t""$ac_cv_emxos2" 1>&6
3557 EMXOS2=
3558 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3559
3560
3561
3562 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3563 echo "configure:3564: checking for executable suffix" >&5
3564 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3565   echo $ac_n "(cached) $ac_c" 1>&6
3566 else
3567   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3568   ac_cv_exeext=.exe
3569 else
3570   rm -f conftest*
3571   echo 'int main () { return 0; }' > conftest.$ac_ext
3572   ac_cv_exeext=
3573   if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3574     for file in conftest.*; do
3575       case $file in
3576       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3577       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3578       esac
3579     done
3580   else
3581     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3582   fi
3583   rm -f conftest*
3584   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3585 fi
3586 fi
3587
3588 EXEEXT=""
3589 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3590 echo "$ac_t""${ac_cv_exeext}" 1>&6
3591 ac_exeext=$EXEEXT
3592
3593 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3594 echo "configure:3595: checking for object suffix" >&5
3595 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3596   echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598   rm -f conftest*
3599 echo 'int i = 1;' > conftest.$ac_ext
3600 if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3601   for ac_file in conftest.*; do
3602     case $ac_file in
3603     *.c) ;;
3604     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3605     esac
3606   done
3607 else
3608   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3609 fi
3610 rm -f conftest*
3611 fi
3612
3613 echo "$ac_t""$ac_cv_objext" 1>&6
3614 OBJEXT=$ac_cv_objext
3615 ac_objext=$ac_cv_objext
3616
3617
3618 cat >> confdefs.h <<EOF
3619 #define EXEEXT "${EXEEXT}"
3620 EOF
3621
3622
3623 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3624 echo "configure:3625: checking for be_app in -lbe" >&5
3625 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
3626 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3627   echo $ac_n "(cached) $ac_c" 1>&6
3628 else
3629   ac_save_LIBS="$LIBS"
3630 LIBS="-lbe -lroot -lnet $LIBS"
3631 cat > conftest.$ac_ext <<EOF
3632 #line 3633 "configure"
3633 #include "confdefs.h"
3634 /* Override any gcc2 internal prototype to avoid an error.  */
3635 /* We use char because int might match the return type of a gcc2
3636     builtin and then its argument prototype would still apply.  */
3637 char be_app();
3638
3639 int main() {
3640 be_app()
3641 ; return 0; }
3642 EOF
3643 if { (eval echo configure:3644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3644   rm -rf conftest*
3645   eval "ac_cv_lib_$ac_lib_var=yes"
3646 else
3647   echo "configure: failed program was:" >&5
3648   cat conftest.$ac_ext >&5
3649   rm -rf conftest*
3650   eval "ac_cv_lib_$ac_lib_var=no"
3651 fi
3652 rm -f conftest*
3653 LIBS="$ac_save_LIBS"
3654
3655 fi
3656 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3657   echo "$ac_t""yes" 1>&6
3658   LIBS="$LIBS -lbe -lroot -lnet"
3659 else
3660   echo "$ac_t""no" 1>&6
3661 :
3662 fi
3663
3664
3665
3666
3667
3668 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3669 echo "configure:3670: checking for ${CC-cc} option to accept ANSI C" >&5
3670 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3671   echo $ac_n "(cached) $ac_c" 1>&6
3672 else
3673   am_cv_prog_cc_stdc=no
3674 ac_save_CC="$CC"
3675 # Don't try gcc -ansi; that turns off useful extensions and
3676 # breaks some systems' header files.
3677 # AIX                   -qlanglvl=ansi
3678 # Ultrix and OSF/1      -std1
3679 # HP-UX 10.20 and later -Ae
3680 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3681 # SVR4                  -Xc -D__EXTENSIONS__
3682 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3683 do
3684   CC="$ac_save_CC $ac_arg"
3685   cat > conftest.$ac_ext <<EOF
3686 #line 3687 "configure"
3687 #include "confdefs.h"
3688 #include <stdarg.h>
3689 #include <stdio.h>
3690 #include <sys/types.h>
3691 #include <sys/stat.h>
3692 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3693 struct buf { int x; };
3694 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3695 static char *e (p, i)
3696      char **p;
3697      int i;
3698 {
3699   return p[i];
3700 }
3701 static char *f (char * (*g) (char **, int), char **p, ...)
3702 {
3703   char *s;
3704   va_list v;
3705   va_start (v,p);
3706   s = g (p, va_arg (v,int));
3707   va_end (v);
3708   return s;
3709 }
3710 int test (int i, double x);
3711 struct s1 {int (*f) (int a);};
3712 struct s2 {int (*f) (double a);};
3713 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3714 int argc;
3715 char **argv;
3716
3717 int main() {
3718
3719 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3720
3721 ; return 0; }
3722 EOF
3723 if { (eval echo configure:3724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3724   rm -rf conftest*
3725   am_cv_prog_cc_stdc="$ac_arg"; break
3726 else
3727   echo "configure: failed program was:" >&5
3728   cat conftest.$ac_ext >&5
3729 fi
3730 rm -f conftest*
3731 done
3732 CC="$ac_save_CC"
3733
3734 fi
3735
3736 if test -z "$am_cv_prog_cc_stdc"; then
3737   echo "$ac_t""none needed" 1>&6
3738 else
3739   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3740 fi
3741 case "x$am_cv_prog_cc_stdc" in
3742   x|xno) ;;
3743   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3744 esac
3745
3746 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3747         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3748 fi
3749
3750 # test for make depend flag
3751 OL_MKDEP=
3752 OL_MKDEP_FLAGS=
3753 if test -z "${MKDEP}"; then
3754         OL_MKDEP="${CC-cc}"
3755         if test -z "${MKDEP_FLAGS}"; then
3756                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3757 echo "configure:3758: checking for ${OL_MKDEP} depend flag" >&5
3758 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3759   echo $ac_n "(cached) $ac_c" 1>&6
3760 else
3761   
3762                         ol_cv_mkdep=no
3763                         for flag in "-M" "-xM"; do
3764                                 cat > conftest.c <<EOF
3765  noCode;
3766 EOF
3767                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3768                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3769                                 then
3770                                         if test ! -f conftest."${ac_object}" ; then
3771                                                 ol_cv_mkdep=$flag
3772                                                 OL_MKDEP_FLAGS="$flag"
3773                                                 break
3774                                         fi
3775                                 fi
3776                         done
3777                         rm -f conftest*
3778                 
3779 fi
3780
3781 echo "$ac_t""$ol_cv_mkdep" 1>&6
3782         else
3783                 cc_cv_mkdep=yes
3784                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3785         fi
3786 else
3787         cc_cv_mkdep=yes
3788         OL_MKDEP="${MKDEP}"
3789         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3790 fi
3791
3792
3793
3794 if test "${ol_cv_mkdep}" = no ; then
3795         # this will soon become an error
3796         echo "configure: warning: do not know how to generate dependencies" 1>&2
3797 fi
3798
3799 ol_link_modules=no
3800 if test $ol_enable_modules != no ; then
3801         for ac_hdr in ltdl.h
3802 do
3803 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3804 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3805 echo "configure:3806: checking for $ac_hdr" >&5
3806 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3807   echo $ac_n "(cached) $ac_c" 1>&6
3808 else
3809   cat > conftest.$ac_ext <<EOF
3810 #line 3811 "configure"
3811 #include "confdefs.h"
3812 #include <$ac_hdr>
3813 EOF
3814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3815 { (eval echo configure:3816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3817 if test -z "$ac_err"; then
3818   rm -rf conftest*
3819   eval "ac_cv_header_$ac_safe=yes"
3820 else
3821   echo "$ac_err" >&5
3822   echo "configure: failed program was:" >&5
3823   cat conftest.$ac_ext >&5
3824   rm -rf conftest*
3825   eval "ac_cv_header_$ac_safe=no"
3826 fi
3827 rm -f conftest*
3828 fi
3829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3830   echo "$ac_t""yes" 1>&6
3831     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3832   cat >> confdefs.h <<EOF
3833 #define $ac_tr_hdr 1
3834 EOF
3835  
3836 else
3837   echo "$ac_t""no" 1>&6
3838 fi
3839 done
3840
3841
3842         if test $ac_cv_header_ltdl_h = no ; then
3843                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
3844
3845         fi
3846
3847         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
3848 echo "configure:3849: checking for lt_dlinit in -lltdl" >&5
3849 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
3850 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3851   echo $ac_n "(cached) $ac_c" 1>&6
3852 else
3853   ac_save_LIBS="$LIBS"
3854 LIBS="-lltdl  $LIBS"
3855 cat > conftest.$ac_ext <<EOF
3856 #line 3857 "configure"
3857 #include "confdefs.h"
3858 /* Override any gcc2 internal prototype to avoid an error.  */
3859 /* We use char because int might match the return type of a gcc2
3860     builtin and then its argument prototype would still apply.  */
3861 char lt_dlinit();
3862
3863 int main() {
3864 lt_dlinit()
3865 ; return 0; }
3866 EOF
3867 if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3868   rm -rf conftest*
3869   eval "ac_cv_lib_$ac_lib_var=yes"
3870 else
3871   echo "configure: failed program was:" >&5
3872   cat conftest.$ac_ext >&5
3873   rm -rf conftest*
3874   eval "ac_cv_lib_$ac_lib_var=no"
3875 fi
3876 rm -f conftest*
3877 LIBS="$ac_save_LIBS"
3878
3879 fi
3880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3881   echo "$ac_t""yes" 1>&6
3882     ac_tr_lib=HAVE_LIB`echo ltdl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3883     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3884   cat >> confdefs.h <<EOF
3885 #define $ac_tr_lib 1
3886 EOF
3887
3888   LIBS="-lltdl $LIBS"
3889
3890 else
3891   echo "$ac_t""no" 1>&6
3892 fi
3893
3894         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
3895                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
3896         fi
3897         ol_link_modules=yes
3898 else
3899         ol_with_bdb2_module=static
3900         ol_with_ldap_module=static
3901         ol_with_ldbm_module=static
3902         ol_with_passwd_module=static
3903         ol_with_perl_module=static
3904         ol_with_shell_module=static
3905         ol_with_tcl_module=static
3906 fi
3907
3908 # test for EBCDIC
3909 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
3910 echo "configure:3911: checking for EBCDIC" >&5
3911 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   
3915         cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918
3919 #if !('M' == 0xd4)
3920 #include <__ASCII__/generate_error.h>
3921 #endif
3922
3923 EOF
3924 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3925 { (eval echo configure:3926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3926 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3927 if test -z "$ac_err"; then
3928   rm -rf conftest*
3929   ol_cv_cpp_ebcdic=yes
3930 else
3931   echo "$ac_err" >&5
3932   echo "configure: failed program was:" >&5
3933   cat conftest.$ac_ext >&5
3934   rm -rf conftest*
3935   ol_cv_cpp_ebcdic=no
3936 fi
3937 rm -f conftest*
3938 fi
3939
3940 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
3941 if test $ol_cv_cpp_ebcdic = yes ; then
3942         cat >> confdefs.h <<\EOF
3943 #define HAVE_EBCDIC 1
3944 EOF
3945
3946 fi
3947
3948 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3949 echo "configure:3950: checking for ANSI C header files" >&5
3950 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
3951   echo $ac_n "(cached) $ac_c" 1>&6
3952 else
3953   cat > conftest.$ac_ext <<EOF
3954 #line 3955 "configure"
3955 #include "confdefs.h"
3956 #include <stdlib.h>
3957 #include <stdarg.h>
3958 #include <string.h>
3959 #include <float.h>
3960 EOF
3961 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3962 { (eval echo configure:3963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3963 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3964 if test -z "$ac_err"; then
3965   rm -rf conftest*
3966   ol_cv_header_stdc=yes
3967 else
3968   echo "$ac_err" >&5
3969   echo "configure: failed program was:" >&5
3970   cat conftest.$ac_ext >&5
3971   rm -rf conftest*
3972   ol_cv_header_stdc=no
3973 fi
3974 rm -f conftest*
3975
3976 if test $ol_cv_header_stdc = yes; then
3977   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3978 cat > conftest.$ac_ext <<EOF
3979 #line 3980 "configure"
3980 #include "confdefs.h"
3981 #include <string.h>
3982 EOF
3983 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3984   egrep "memchr" >/dev/null 2>&1; then
3985   :
3986 else
3987   rm -rf conftest*
3988   ol_cv_header_stdc=no
3989 fi
3990 rm -f conftest*
3991
3992 fi
3993
3994 if test $ol_cv_header_stdc = yes; then
3995   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3996 cat > conftest.$ac_ext <<EOF
3997 #line 3998 "configure"
3998 #include "confdefs.h"
3999 #include <stdlib.h>
4000 EOF
4001 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4002   egrep "free" >/dev/null 2>&1; then
4003   :
4004 else
4005   rm -rf conftest*
4006   ol_cv_header_stdc=no
4007 fi
4008 rm -f conftest*
4009
4010 fi
4011
4012 if test $ol_cv_header_stdc = yes; then
4013   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4014 if test "$cross_compiling" = yes; then
4015   :
4016 else
4017   cat > conftest.$ac_ext <<EOF
4018 #line 4019 "configure"
4019 #include "confdefs.h"
4020 #include <ctype.h>
4021 #ifndef HAVE_EBCDIC
4022 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4023 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4024 #else
4025 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4026                 || ('j' <= (c) && (c) <= 'r') \
4027                 || ('s' <= (c) && (c) <= 'z'))
4028 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
4029 #endif
4030 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4031 int main () { int i; for (i = 0; i < 256; i++)
4032 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4033 exit (0); }
4034
4035 EOF
4036 if { (eval echo configure:4037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4037 then
4038   :
4039 else
4040   echo "configure: failed program was:" >&5
4041   cat conftest.$ac_ext >&5
4042   rm -fr conftest*
4043   ol_cv_header_stdc=no
4044 fi
4045 rm -fr conftest*
4046 fi
4047
4048 fi
4049 fi
4050
4051 echo "$ac_t""$ol_cv_header_stdc" 1>&6
4052 if test $ol_cv_header_stdc = yes; then
4053   cat >> confdefs.h <<\EOF
4054 #define STDC_HEADERS 1
4055 EOF
4056
4057 fi
4058 ac_cv_header_stdc=disable
4059
4060
4061 if test $ol_cv_header_stdc != yes; then
4062         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
4063 fi
4064
4065 ac_header_dirent=no
4066 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4067 do
4068 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4069 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4070 echo "configure:4071: checking for $ac_hdr that defines DIR" >&5
4071 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
4072   echo $ac_n "(cached) $ac_c" 1>&6
4073 else
4074   cat > conftest.$ac_ext <<EOF
4075 #line 4076 "configure"
4076 #include "confdefs.h"
4077 #include <sys/types.h>
4078 #include <$ac_hdr>
4079 int main() {
4080 DIR *dirp = 0;
4081 ; return 0; }
4082 EOF
4083 if { (eval echo configure:4084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4084   rm -rf conftest*
4085   eval "ac_cv_header_dirent_$ac_safe=yes"
4086 else
4087   echo "configure: failed program was:" >&5
4088   cat conftest.$ac_ext >&5
4089   rm -rf conftest*
4090   eval "ac_cv_header_dirent_$ac_safe=no"
4091 fi
4092 rm -f conftest*
4093 fi
4094 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4095   echo "$ac_t""yes" 1>&6
4096     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4097   cat >> confdefs.h <<EOF
4098 #define $ac_tr_hdr 1
4099 EOF
4100  ac_header_dirent=$ac_hdr; break
4101 else
4102   echo "$ac_t""no" 1>&6
4103 fi
4104 done
4105 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4106 if test $ac_header_dirent = dirent.h; then
4107 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4108 echo "configure:4109: checking for opendir in -ldir" >&5
4109 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
4110 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4111   echo $ac_n "(cached) $ac_c" 1>&6
4112 else
4113   ac_save_LIBS="$LIBS"
4114 LIBS="-ldir  $LIBS"
4115 cat > conftest.$ac_ext <<EOF
4116 #line 4117 "configure"
4117 #include "confdefs.h"
4118 /* Override any gcc2 internal prototype to avoid an error.  */
4119 /* We use char because int might match the return type of a gcc2
4120     builtin and then its argument prototype would still apply.  */
4121 char opendir();
4122
4123 int main() {
4124 opendir()
4125 ; return 0; }
4126 EOF
4127 if { (eval echo configure:4128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4128   rm -rf conftest*
4129   eval "ac_cv_lib_$ac_lib_var=yes"
4130 else
4131   echo "configure: failed program was:" >&5
4132   cat conftest.$ac_ext >&5
4133   rm -rf conftest*
4134   eval "ac_cv_lib_$ac_lib_var=no"
4135 fi
4136 rm -f conftest*
4137 LIBS="$ac_save_LIBS"
4138
4139 fi
4140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4141   echo "$ac_t""yes" 1>&6
4142   LIBS="$LIBS -ldir"
4143 else
4144   echo "$ac_t""no" 1>&6
4145 fi
4146
4147 else
4148 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4149 echo "configure:4150: checking for opendir in -lx" >&5
4150 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
4151 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4152   echo $ac_n "(cached) $ac_c" 1>&6
4153 else
4154   ac_save_LIBS="$LIBS"
4155 LIBS="-lx  $LIBS"
4156 cat > conftest.$ac_ext <<EOF
4157 #line 4158 "configure"
4158 #include "confdefs.h"
4159 /* Override any gcc2 internal prototype to avoid an error.  */
4160 /* We use char because int might match the return type of a gcc2
4161     builtin and then its argument prototype would still apply.  */
4162 char opendir();
4163
4164 int main() {
4165 opendir()
4166 ; return 0; }
4167 EOF
4168 if { (eval echo configure:4169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4169   rm -rf conftest*
4170   eval "ac_cv_lib_$ac_lib_var=yes"
4171 else
4172   echo "configure: failed program was:" >&5
4173   cat conftest.$ac_ext >&5
4174   rm -rf conftest*
4175   eval "ac_cv_lib_$ac_lib_var=no"
4176 fi
4177 rm -f conftest*
4178 LIBS="$ac_save_LIBS"
4179
4180 fi
4181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4182   echo "$ac_t""yes" 1>&6
4183   LIBS="$LIBS -lx"
4184 else
4185   echo "$ac_t""no" 1>&6
4186 fi
4187
4188 fi
4189
4190 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4191 echo "configure:4192: checking for sys/wait.h that is POSIX.1 compatible" >&5
4192 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
4193   echo $ac_n "(cached) $ac_c" 1>&6
4194 else
4195   cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198 #include <sys/types.h>
4199 #include <sys/wait.h>
4200 #ifndef WEXITSTATUS
4201 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4202 #endif
4203 #ifndef WIFEXITED
4204 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4205 #endif
4206 int main() {
4207 int s;
4208 wait (&s);
4209 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4210 ; return 0; }
4211 EOF
4212 if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4213   rm -rf conftest*
4214   ac_cv_header_sys_wait_h=yes
4215 else
4216   echo "configure: failed program was:" >&5
4217   cat conftest.$ac_ext >&5
4218   rm -rf conftest*
4219   ac_cv_header_sys_wait_h=no
4220 fi
4221 rm -f conftest*
4222 fi
4223
4224 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4225 if test $ac_cv_header_sys_wait_h = yes; then
4226   cat >> confdefs.h <<\EOF
4227 #define HAVE_SYS_WAIT_H 1
4228 EOF
4229
4230 fi
4231
4232 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
4233 echo "configure:4234: checking POSIX termios" >&5
4234 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
4235   echo $ac_n "(cached) $ac_c" 1>&6
4236 else
4237   cat > conftest.$ac_ext <<EOF
4238 #line 4239 "configure"
4239 #include "confdefs.h"
4240 #include <sys/types.h>
4241 #include <unistd.h>
4242 #include <termios.h>
4243 int main() {
4244 /* SunOS 4.0.3 has termios.h but not the library calls.  */
4245    tcgetattr(0, 0);
4246 ; return 0; }
4247 EOF
4248 if { (eval echo configure:4249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4249   rm -rf conftest*
4250   am_cv_sys_posix_termios=yes
4251 else
4252   echo "configure: failed program was:" >&5
4253   cat conftest.$ac_ext >&5
4254   rm -rf conftest*
4255   am_cv_sys_posix_termios=no
4256 fi
4257 rm -f conftest*
4258 fi
4259
4260 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
4261
4262
4263  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
4264 echo "configure:4265: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
4265 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
4266   echo $ac_n "(cached) $ac_c" 1>&6
4267 else
4268   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
4269
4270   gwinsz_in_termios_h=no
4271   if test $am_cv_sys_posix_termios = yes; then
4272     cat > conftest.$ac_ext <<EOF
4273 #line 4274 "configure"
4274 #include "confdefs.h"
4275 #include <sys/types.h>
4276 #     include <termios.h>
4277 #     ifdef TIOCGWINSZ
4278         yes
4279 #     endif
4280     
4281 EOF
4282 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4283   egrep "yes" >/dev/null 2>&1; then
4284   rm -rf conftest*
4285   gwinsz_in_termios_h=yes
4286 fi
4287 rm -f conftest*
4288
4289   fi
4290
4291   if test $gwinsz_in_termios_h = no; then
4292     cat > conftest.$ac_ext <<EOF
4293 #line 4294 "configure"
4294 #include "confdefs.h"
4295 #include <sys/types.h>
4296 #     include <sys/ioctl.h>
4297 #     ifdef TIOCGWINSZ
4298         yes
4299 #     endif
4300     
4301 EOF
4302 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4303   egrep "yes" >/dev/null 2>&1; then
4304   rm -rf conftest*
4305   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
4306 fi
4307 rm -f conftest*
4308
4309   fi
4310   
4311 fi
4312
4313 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
4314   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
4315     cat >> confdefs.h <<\EOF
4316 #define GWINSZ_IN_SYS_IOCTL 1
4317 EOF
4318
4319   fi
4320
4321 if test $am_cv_sys_posix_termios = yes ; then
4322         cat >> confdefs.h <<\EOF
4323 #define HAVE_POSIX_TERMIOS 1
4324 EOF
4325
4326 fi
4327
4328 for ac_hdr in \
4329         arpa/inet.h             \
4330         arpa/nameser.h  \
4331         assert.h                \
4332         crypt.h                 \
4333         errno.h                 \
4334         fcntl.h                 \
4335         filio.h                 \
4336         getopt.h                \
4337         grp.h                   \
4338         libutil.h               \
4339         limits.h                \
4340         locale.h                \
4341         netinet/tcp.h   \
4342         malloc.h                \
4343         memory.h                \
4344         psap.h                  \
4345         pwd.h                   \
4346         resolv.h                \
4347         sgtty.h                 \
4348         shadow.h                \
4349         stddef.h                \
4350         string.h                \
4351         strings.h               \
4352         sysexits.h              \
4353         sys/file.h              \
4354         sys/filio.h             \
4355         sys/errno.h             \
4356         sys/ioctl.h             \
4357         sys/param.h             \
4358         sys/resource.h  \
4359         sys/select.h    \
4360         sys/socket.h    \
4361         sys/syslog.h    \
4362         sys/time.h              \
4363         sys/types.h             \
4364         syslog.h                \
4365         termios.h               \
4366         unistd.h                \
4367
4368 do
4369 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4370 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4371 echo "configure:4372: checking for $ac_hdr" >&5
4372 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4373   echo $ac_n "(cached) $ac_c" 1>&6
4374 else
4375   cat > conftest.$ac_ext <<EOF
4376 #line 4377 "configure"
4377 #include "confdefs.h"
4378 #include <$ac_hdr>
4379 EOF
4380 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4381 { (eval echo configure:4382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4382 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4383 if test -z "$ac_err"; then
4384   rm -rf conftest*
4385   eval "ac_cv_header_$ac_safe=yes"
4386 else
4387   echo "$ac_err" >&5
4388   echo "configure: failed program was:" >&5
4389   cat conftest.$ac_ext >&5
4390   rm -rf conftest*
4391   eval "ac_cv_header_$ac_safe=no"
4392 fi
4393 rm -f conftest*
4394 fi
4395 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4396   echo "$ac_t""yes" 1>&6
4397     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4398   cat >> confdefs.h <<EOF
4399 #define $ac_tr_hdr 1
4400 EOF
4401  
4402 else
4403   echo "$ac_t""no" 1>&6
4404 fi
4405 done
4406
4407
4408
4409
4410 echo $ac_n "checking for socket""... $ac_c" 1>&6
4411 echo "configure:4412: checking for socket" >&5
4412 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
4413   echo $ac_n "(cached) $ac_c" 1>&6
4414 else
4415   cat > conftest.$ac_ext <<EOF
4416 #line 4417 "configure"
4417 #include "confdefs.h"
4418 /* System header to define __stub macros and hopefully few prototypes,
4419     which can conflict with char socket(); below.  */
4420 #include <assert.h>
4421 /* Override any gcc2 internal prototype to avoid an error.  */
4422 /* We use char because int might match the return type of a gcc2
4423     builtin and then its argument prototype would still apply.  */
4424 char socket();
4425 char (*f)();
4426
4427 int main() {
4428
4429 /* The GNU C library defines this for functions which it implements
4430     to always fail with ENOSYS.  Some functions are actually named
4431     something starting with __ and the normal name is an alias.  */
4432 #if defined (__stub_socket) || defined (__stub___socket)
4433 choke me
4434 #else
4435 f = socket;
4436 #endif
4437
4438 ; return 0; }
4439 EOF
4440 if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4441   rm -rf conftest*
4442   eval "ac_cv_func_socket=yes"
4443 else
4444   echo "configure: failed program was:" >&5
4445   cat conftest.$ac_ext >&5
4446   rm -rf conftest*
4447   eval "ac_cv_func_socket=no"
4448 fi
4449 rm -f conftest*
4450 fi
4451
4452 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
4453   echo "$ac_t""yes" 1>&6
4454   :
4455 else
4456   echo "$ac_t""no" 1>&6
4457         
4458         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4459 echo "configure:4460: checking for main in -lsocket" >&5
4460 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
4461 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4462   echo $ac_n "(cached) $ac_c" 1>&6
4463 else
4464   ac_save_LIBS="$LIBS"
4465 LIBS="-lsocket  $LIBS"
4466 cat > conftest.$ac_ext <<EOF
4467 #line 4468 "configure"
4468 #include "confdefs.h"
4469
4470 int main() {
4471 main()
4472 ; return 0; }
4473 EOF
4474 if { (eval echo configure:4475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4475   rm -rf conftest*
4476   eval "ac_cv_lib_$ac_lib_var=yes"
4477 else
4478   echo "configure: failed program was:" >&5
4479   cat conftest.$ac_ext >&5
4480   rm -rf conftest*
4481   eval "ac_cv_lib_$ac_lib_var=no"
4482 fi
4483 rm -f conftest*
4484 LIBS="$ac_save_LIBS"
4485
4486 fi
4487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4488   echo "$ac_t""yes" 1>&6
4489     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4490     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4491   cat >> confdefs.h <<EOF
4492 #define $ac_tr_lib 1
4493 EOF
4494
4495   LIBS="-lsocket $LIBS"
4496
4497 else
4498   echo "$ac_t""no" 1>&6
4499 fi
4500
4501         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
4502 echo "configure:4503: checking for main in -lnet" >&5
4503 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
4504 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4505   echo $ac_n "(cached) $ac_c" 1>&6
4506 else
4507   ac_save_LIBS="$LIBS"
4508 LIBS="-lnet  $LIBS"
4509 cat > conftest.$ac_ext <<EOF
4510 #line 4511 "configure"
4511 #include "confdefs.h"
4512
4513 int main() {
4514 main()
4515 ; return 0; }
4516 EOF
4517 if { (eval echo configure:4518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4518   rm -rf conftest*
4519   eval "ac_cv_lib_$ac_lib_var=yes"
4520 else
4521   echo "configure: failed program was:" >&5
4522   cat conftest.$ac_ext >&5
4523   rm -rf conftest*
4524   eval "ac_cv_lib_$ac_lib_var=no"
4525 fi
4526 rm -f conftest*
4527 LIBS="$ac_save_LIBS"
4528
4529 fi
4530 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4531   echo "$ac_t""yes" 1>&6
4532     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4533     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4534   cat >> confdefs.h <<EOF
4535 #define $ac_tr_lib 1
4536 EOF
4537
4538   LIBS="-lnet $LIBS"
4539
4540 else
4541   echo "$ac_t""no" 1>&6
4542 fi
4543
4544         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
4545 echo "configure:4546: checking for socket in -lnet" >&5
4546 ac_lib_var=`echo net'_'socket | sed 'y%./+-:%__p__%'`
4547 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4548   echo $ac_n "(cached) $ac_c" 1>&6
4549 else
4550   ac_save_LIBS="$LIBS"
4551 LIBS="-lnet  $LIBS"
4552 cat > conftest.$ac_ext <<EOF
4553 #line 4554 "configure"
4554 #include "confdefs.h"
4555 /* Override any gcc2 internal prototype to avoid an error.  */
4556 /* We use char because int might match the return type of a gcc2
4557     builtin and then its argument prototype would still apply.  */
4558 char socket();
4559
4560 int main() {
4561 socket()
4562 ; return 0; }
4563 EOF
4564 if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4565   rm -rf conftest*
4566   eval "ac_cv_lib_$ac_lib_var=yes"
4567 else
4568   echo "configure: failed program was:" >&5
4569   cat conftest.$ac_ext >&5
4570   rm -rf conftest*
4571   eval "ac_cv_lib_$ac_lib_var=no"
4572 fi
4573 rm -f conftest*
4574 LIBS="$ac_save_LIBS"
4575
4576 fi
4577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4578   echo "$ac_t""yes" 1>&6
4579     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4580     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4581   cat >> confdefs.h <<EOF
4582 #define $ac_tr_lib 1
4583 EOF
4584
4585   LIBS="-lnet $LIBS"
4586
4587 else
4588   echo "$ac_t""no" 1>&6
4589 fi
4590
4591         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
4592 echo "configure:4593: checking for main in -lnsl_s" >&5
4593 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
4594 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4595   echo $ac_n "(cached) $ac_c" 1>&6
4596 else
4597   ac_save_LIBS="$LIBS"
4598 LIBS="-lnsl_s  $LIBS"
4599 cat > conftest.$ac_ext <<EOF
4600 #line 4601 "configure"
4601 #include "confdefs.h"
4602
4603 int main() {
4604 main()
4605 ; return 0; }
4606 EOF
4607 if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4608   rm -rf conftest*
4609   eval "ac_cv_lib_$ac_lib_var=yes"
4610 else
4611   echo "configure: failed program was:" >&5
4612   cat conftest.$ac_ext >&5
4613   rm -rf conftest*
4614   eval "ac_cv_lib_$ac_lib_var=no"
4615 fi
4616 rm -f conftest*
4617 LIBS="$ac_save_LIBS"
4618
4619 fi
4620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4621   echo "$ac_t""yes" 1>&6
4622     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4623     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4624   cat >> confdefs.h <<EOF
4625 #define $ac_tr_lib 1
4626 EOF
4627
4628   LIBS="-lnsl_s $LIBS"
4629
4630 else
4631   echo "$ac_t""no" 1>&6
4632 fi
4633
4634         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4635 echo "configure:4636: checking for main in -lnsl" >&5
4636 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
4637 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4638   echo $ac_n "(cached) $ac_c" 1>&6
4639 else
4640   ac_save_LIBS="$LIBS"
4641 LIBS="-lnsl  $LIBS"
4642 cat > conftest.$ac_ext <<EOF
4643 #line 4644 "configure"
4644 #include "confdefs.h"
4645
4646 int main() {
4647 main()
4648 ; return 0; }
4649 EOF
4650 if { (eval echo configure:4651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4651   rm -rf conftest*
4652   eval "ac_cv_lib_$ac_lib_var=yes"
4653 else
4654   echo "configure: failed program was:" >&5
4655   cat conftest.$ac_ext >&5
4656   rm -rf conftest*
4657   eval "ac_cv_lib_$ac_lib_var=no"
4658 fi
4659 rm -f conftest*
4660 LIBS="$ac_save_LIBS"
4661
4662 fi
4663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4664   echo "$ac_t""yes" 1>&6
4665     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4666     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4667   cat >> confdefs.h <<EOF
4668 #define $ac_tr_lib 1
4669 EOF
4670
4671   LIBS="-lnsl $LIBS"
4672
4673 else
4674   echo "$ac_t""no" 1>&6
4675 fi
4676
4677         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
4678 echo "configure:4679: checking for socket in -linet" >&5
4679 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
4680 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4681   echo $ac_n "(cached) $ac_c" 1>&6
4682 else
4683   ac_save_LIBS="$LIBS"
4684 LIBS="-linet  $LIBS"
4685 cat > conftest.$ac_ext <<EOF
4686 #line 4687 "configure"
4687 #include "confdefs.h"
4688 /* Override any gcc2 internal prototype to avoid an error.  */
4689 /* We use char because int might match the return type of a gcc2
4690     builtin and then its argument prototype would still apply.  */
4691 char socket();
4692
4693 int main() {
4694 socket()
4695 ; return 0; }
4696 EOF
4697 if { (eval echo configure:4698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4698   rm -rf conftest*
4699   eval "ac_cv_lib_$ac_lib_var=yes"
4700 else
4701   echo "configure: failed program was:" >&5
4702   cat conftest.$ac_ext >&5
4703   rm -rf conftest*
4704   eval "ac_cv_lib_$ac_lib_var=no"
4705 fi
4706 rm -f conftest*
4707 LIBS="$ac_save_LIBS"
4708
4709 fi
4710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4711   echo "$ac_t""yes" 1>&6
4712     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4713     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4714   cat >> confdefs.h <<EOF
4715 #define $ac_tr_lib 1
4716 EOF
4717
4718   LIBS="-linet $LIBS"
4719
4720 else
4721   echo "$ac_t""no" 1>&6
4722 fi
4723
4724         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
4725 echo "configure:4726: checking for main in -lgen" >&5
4726 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
4727 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4728   echo $ac_n "(cached) $ac_c" 1>&6
4729 else
4730   ac_save_LIBS="$LIBS"
4731 LIBS="-lgen  $LIBS"
4732 cat > conftest.$ac_ext <<EOF
4733 #line 4734 "configure"
4734 #include "confdefs.h"
4735
4736 int main() {
4737 main()
4738 ; return 0; }
4739 EOF
4740 if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4741   rm -rf conftest*
4742   eval "ac_cv_lib_$ac_lib_var=yes"
4743 else
4744   echo "configure: failed program was:" >&5
4745   cat conftest.$ac_ext >&5
4746   rm -rf conftest*
4747   eval "ac_cv_lib_$ac_lib_var=no"
4748 fi
4749 rm -f conftest*
4750 LIBS="$ac_save_LIBS"
4751
4752 fi
4753 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4754   echo "$ac_t""yes" 1>&6
4755     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4756     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4757   cat >> confdefs.h <<EOF
4758 #define $ac_tr_lib 1
4759 EOF
4760
4761   LIBS="-lgen $LIBS"
4762
4763 else
4764   echo "$ac_t""no" 1>&6
4765 fi
4766
4767
4768 fi
4769
4770
4771 echo $ac_n "checking for select""... $ac_c" 1>&6
4772 echo "configure:4773: checking for select" >&5
4773 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4774   echo $ac_n "(cached) $ac_c" 1>&6
4775 else
4776   cat > conftest.$ac_ext <<EOF
4777 #line 4778 "configure"
4778 #include "confdefs.h"
4779 /* System header to define __stub macros and hopefully few prototypes,
4780     which can conflict with char select(); below.  */
4781 #include <assert.h>
4782 /* Override any gcc2 internal prototype to avoid an error.  */
4783 /* We use char because int might match the return type of a gcc2
4784     builtin and then its argument prototype would still apply.  */
4785 char select();
4786 char (*f)();
4787
4788 int main() {
4789
4790 /* The GNU C library defines this for functions which it implements
4791     to always fail with ENOSYS.  Some functions are actually named
4792     something starting with __ and the normal name is an alias.  */
4793 #if defined (__stub_select) || defined (__stub___select)
4794 choke me
4795 #else
4796 f = select;
4797 #endif
4798
4799 ; return 0; }
4800 EOF
4801 if { (eval echo configure:4802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4802   rm -rf conftest*
4803   eval "ac_cv_func_select=yes"
4804 else
4805   echo "configure: failed program was:" >&5
4806   cat conftest.$ac_ext >&5
4807   rm -rf conftest*
4808   eval "ac_cv_func_select=no"
4809 fi
4810 rm -f conftest*
4811 fi
4812
4813 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4814   echo "$ac_t""yes" 1>&6
4815   :
4816 else
4817   echo "$ac_t""no" 1>&6
4818 { echo "configure: error: select() required." 1>&2; exit 1; }
4819 fi
4820
4821
4822 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4823 echo "configure:4824: checking types of arguments for select()" >&5
4824  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4825   echo $ac_n "(cached) $ac_c" 1>&6
4826 else
4827    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4828   echo $ac_n "(cached) $ac_c" 1>&6
4829 else
4830     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4831   echo $ac_n "(cached) $ac_c" 1>&6
4832 else
4833      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4834      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4835       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4836        cat > conftest.$ac_ext <<EOF
4837 #line 4838 "configure"
4838 #include "confdefs.h"
4839 #ifdef HAVE_SYS_TYPES_H
4840 #include <sys/types.h>
4841 #endif
4842 #ifdef HAVE_SYS_TIME_H
4843 #include <sys/time.h>
4844 #endif
4845 #ifdef HAVE_SYS_SELECT_H
4846 #include <sys/select.h>
4847 #endif
4848 #ifdef HAVE_SYS_SOCKET_H
4849 #include <sys/socket.h>
4850 #endif
4851 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);
4852 int main() {
4853
4854 ; return 0; }
4855 EOF
4856 if { (eval echo configure:4857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4857   rm -rf conftest*
4858           ac_not_found=no ; break 3
4859 else
4860   echo "configure: failed program was:" >&5
4861   cat conftest.$ac_ext >&5
4862   rm -rf conftest*
4863   ac_not_found=yes
4864 fi
4865 rm -f conftest*
4866       done
4867      done
4868     done
4869    
4870 fi
4871   
4872 fi
4873  
4874 fi
4875  if test "$ac_not_found" = yes; then
4876   ac_cv_func_select_arg1=int 
4877   ac_cv_func_select_arg234='int *' 
4878   ac_cv_func_select_arg5='struct timeval *'
4879  fi
4880  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4881  cat >> confdefs.h <<EOF
4882 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4883 EOF
4884
4885  cat >> confdefs.h <<EOF
4886 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4887 EOF
4888
4889  cat >> confdefs.h <<EOF
4890 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4891 EOF
4892
4893
4894
4895
4896 for ac_hdr in regex.h 
4897 do
4898 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4899 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4900 echo "configure:4901: checking for $ac_hdr" >&5
4901 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4902   echo $ac_n "(cached) $ac_c" 1>&6
4903 else
4904   cat > conftest.$ac_ext <<EOF
4905 #line 4906 "configure"
4906 #include "confdefs.h"
4907 #include <$ac_hdr>
4908 EOF
4909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4910 { (eval echo configure:4911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4912 if test -z "$ac_err"; then
4913   rm -rf conftest*
4914   eval "ac_cv_header_$ac_safe=yes"
4915 else
4916   echo "$ac_err" >&5
4917   echo "configure: failed program was:" >&5
4918   cat conftest.$ac_ext >&5
4919   rm -rf conftest*
4920   eval "ac_cv_header_$ac_safe=no"
4921 fi
4922 rm -f conftest*
4923 fi
4924 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4925   echo "$ac_t""yes" 1>&6
4926     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4927   cat >> confdefs.h <<EOF
4928 #define $ac_tr_hdr 1
4929 EOF
4930  
4931 else
4932   echo "$ac_t""no" 1>&6
4933 fi
4934 done
4935
4936 if test "$ac_cv_header_regex_h" != yes ; then
4937         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4938 fi
4939 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4940 echo "configure:4941: checking for regfree" >&5
4941 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4942   echo $ac_n "(cached) $ac_c" 1>&6
4943 else
4944   cat > conftest.$ac_ext <<EOF
4945 #line 4946 "configure"
4946 #include "confdefs.h"
4947 /* System header to define __stub macros and hopefully few prototypes,
4948     which can conflict with char regfree(); below.  */
4949 #include <assert.h>
4950 /* Override any gcc2 internal prototype to avoid an error.  */
4951 /* We use char because int might match the return type of a gcc2
4952     builtin and then its argument prototype would still apply.  */
4953 char regfree();
4954 char (*f)();
4955
4956 int main() {
4957
4958 /* The GNU C library defines this for functions which it implements
4959     to always fail with ENOSYS.  Some functions are actually named
4960     something starting with __ and the normal name is an alias.  */
4961 #if defined (__stub_regfree) || defined (__stub___regfree)
4962 choke me
4963 #else
4964 f = regfree;
4965 #endif
4966
4967 ; return 0; }
4968 EOF
4969 if { (eval echo configure:4970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4970   rm -rf conftest*
4971   eval "ac_cv_func_regfree=yes"
4972 else
4973   echo "configure: failed program was:" >&5
4974   cat conftest.$ac_ext >&5
4975   rm -rf conftest*
4976   eval "ac_cv_func_regfree=no"
4977 fi
4978 rm -f conftest*
4979 fi
4980
4981 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4982   echo "$ac_t""yes" 1>&6
4983   :
4984 else
4985   echo "$ac_t""no" 1>&6
4986 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4987 fi
4988
4989
4990
4991 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4992 echo "configure:4993: checking for compatible POSIX regex" >&5
4993 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4994   echo $ac_n "(cached) $ac_c" 1>&6
4995 else
4996   
4997         if test "$cross_compiling" = yes; then
4998   ol_cv_c_posix_regex=cross
4999 else
5000   cat > conftest.$ac_ext <<EOF
5001 #line 5002 "configure"
5002 #include "confdefs.h"
5003
5004 #include <sys/types.h>
5005 #include <regex.h>
5006 static char *pattern, *string;
5007 main()
5008 {
5009         int rc;
5010         regex_t re;
5011
5012         pattern = "^A";
5013
5014         if(regcomp(&re, pattern, 0)) {
5015                 return -1;
5016         }
5017         
5018         string = "ALL MATCH";
5019         
5020         rc = regexec(&re, string, 0, (void*)0, 0);
5021
5022         regfree(&re);
5023
5024         return rc;
5025 }
5026 EOF
5027 if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5028 then
5029   ol_cv_c_posix_regex=yes
5030 else
5031   echo "configure: failed program was:" >&5
5032   cat conftest.$ac_ext >&5
5033   rm -fr conftest*
5034   ol_cv_c_posix_regex=no
5035 fi
5036 rm -fr conftest*
5037 fi
5038
5039 fi
5040
5041 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
5042
5043 if test "$ol_cv_c_posix_regex" = no ; then
5044         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
5045 fi
5046
5047 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
5048 echo "configure:5049: checking for sigset in -lV3" >&5
5049 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
5050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5051   echo $ac_n "(cached) $ac_c" 1>&6
5052 else
5053   ac_save_LIBS="$LIBS"
5054 LIBS="-lV3  $LIBS"
5055 cat > conftest.$ac_ext <<EOF
5056 #line 5057 "configure"
5057 #include "confdefs.h"
5058 /* Override any gcc2 internal prototype to avoid an error.  */
5059 /* We use char because int might match the return type of a gcc2
5060     builtin and then its argument prototype would still apply.  */
5061 char sigset();
5062
5063 int main() {
5064 sigset()
5065 ; return 0; }
5066 EOF
5067 if { (eval echo configure:5068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5068   rm -rf conftest*
5069   eval "ac_cv_lib_$ac_lib_var=yes"
5070 else
5071   echo "configure: failed program was:" >&5
5072   cat conftest.$ac_ext >&5
5073   rm -rf conftest*
5074   eval "ac_cv_lib_$ac_lib_var=no"
5075 fi
5076 rm -f conftest*
5077 LIBS="$ac_save_LIBS"
5078
5079 fi
5080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5081   echo "$ac_t""yes" 1>&6
5082     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5083     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5084   cat >> confdefs.h <<EOF
5085 #define $ac_tr_lib 1
5086 EOF
5087
5088   LIBS="-lV3 $LIBS"
5089
5090 else
5091   echo "$ac_t""no" 1>&6
5092 fi
5093
5094
5095 echo $ac_n "checking for res_search""... $ac_c" 1>&6
5096 echo "configure:5097: checking for res_search" >&5
5097 if eval "test \"\${ac_cv_func_res_search+set}\" = set"; then
5098   echo $ac_n "(cached) $ac_c" 1>&6
5099 else
5100   cat > conftest.$ac_ext <<EOF
5101 #line 5102 "configure"
5102 #include "confdefs.h"
5103 /* System header to define __stub macros and hopefully few prototypes,
5104     which can conflict with char res_search(); below.  */
5105 #include <assert.h>
5106 /* Override any gcc2 internal prototype to avoid an error.  */
5107 /* We use char because int might match the return type of a gcc2
5108     builtin and then its argument prototype would still apply.  */
5109 char res_search();
5110 char (*f)();
5111
5112 int main() {
5113
5114 /* The GNU C library defines this for functions which it implements
5115     to always fail with ENOSYS.  Some functions are actually named
5116     something starting with __ and the normal name is an alias.  */
5117 #if defined (__stub_res_search) || defined (__stub___res_search)
5118 choke me
5119 #else
5120 f = res_search;
5121 #endif
5122
5123 ; return 0; }
5124 EOF
5125 if { (eval echo configure:5126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5126   rm -rf conftest*
5127   eval "ac_cv_func_res_search=yes"
5128 else
5129   echo "configure: failed program was:" >&5
5130   cat conftest.$ac_ext >&5
5131   rm -rf conftest*
5132   eval "ac_cv_func_res_search=no"
5133 fi
5134 rm -f conftest*
5135 fi
5136
5137 if eval "test \"`echo '$ac_cv_func_'res_search`\" = yes"; then
5138   echo "$ac_t""yes" 1>&6
5139   :
5140 else
5141   echo "$ac_t""no" 1>&6
5142 fi
5143
5144 if test $ac_cv_func_res_search = no ; then 
5145         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
5146 echo "configure:5147: checking for res_search in -lbind" >&5
5147 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-:%__p__%'`
5148 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5149   echo $ac_n "(cached) $ac_c" 1>&6
5150 else
5151   ac_save_LIBS="$LIBS"
5152 LIBS="-lbind  $LIBS"
5153 cat > conftest.$ac_ext <<EOF
5154 #line 5155 "configure"
5155 #include "confdefs.h"
5156 /* Override any gcc2 internal prototype to avoid an error.  */
5157 /* We use char because int might match the return type of a gcc2
5158     builtin and then its argument prototype would still apply.  */
5159 char res_search();
5160
5161 int main() {
5162 res_search()
5163 ; return 0; }
5164 EOF
5165 if { (eval echo configure:5166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5166   rm -rf conftest*
5167   eval "ac_cv_lib_$ac_lib_var=yes"
5168 else
5169   echo "configure: failed program was:" >&5
5170   cat conftest.$ac_ext >&5
5171   rm -rf conftest*
5172   eval "ac_cv_lib_$ac_lib_var=no"
5173 fi
5174 rm -f conftest*
5175 LIBS="$ac_save_LIBS"
5176
5177 fi
5178 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5179   echo "$ac_t""yes" 1>&6
5180     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5181     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5182   cat >> confdefs.h <<EOF
5183 #define $ac_tr_lib 1
5184 EOF
5185
5186   LIBS="-lbind $LIBS"
5187
5188 else
5189   echo "$ac_t""no" 1>&6
5190 fi
5191
5192         ac_cv_func_res_search=$ac_cv_lib_bind_res_search
5193 fi
5194
5195 if test $ac_cv_func_res_search = no ; then 
5196         echo $ac_n "checking for __res_search in -lbind""... $ac_c" 1>&6
5197 echo "configure:5198: checking for __res_search in -lbind" >&5
5198 ac_lib_var=`echo bind'_'__res_search | sed 'y%./+-:%__p__%'`
5199 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5200   echo $ac_n "(cached) $ac_c" 1>&6
5201 else
5202   ac_save_LIBS="$LIBS"
5203 LIBS="-lbind  $LIBS"
5204 cat > conftest.$ac_ext <<EOF
5205 #line 5206 "configure"
5206 #include "confdefs.h"
5207 /* Override any gcc2 internal prototype to avoid an error.  */
5208 /* We use char because int might match the return type of a gcc2
5209     builtin and then its argument prototype would still apply.  */
5210 char __res_search();
5211
5212 int main() {
5213 __res_search()
5214 ; return 0; }
5215 EOF
5216 if { (eval echo configure:5217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5217   rm -rf conftest*
5218   eval "ac_cv_lib_$ac_lib_var=yes"
5219 else
5220   echo "configure: failed program was:" >&5
5221   cat conftest.$ac_ext >&5
5222   rm -rf conftest*
5223   eval "ac_cv_lib_$ac_lib_var=no"
5224 fi
5225 rm -f conftest*
5226 LIBS="$ac_save_LIBS"
5227
5228 fi
5229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5230   echo "$ac_t""yes" 1>&6
5231     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5232     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5233   cat >> confdefs.h <<EOF
5234 #define $ac_tr_lib 1
5235 EOF
5236
5237   LIBS="-lbind $LIBS"
5238
5239 else
5240   echo "$ac_t""no" 1>&6
5241 fi
5242
5243         ac_cv_func_res_search=$ac_cv_lib_bind___res_search
5244 fi
5245
5246 if test $ac_cv_func_res_search = no ; then 
5247         echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
5248 echo "configure:5249: checking for res_search in -lresolv" >&5
5249 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-:%__p__%'`
5250 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5251   echo $ac_n "(cached) $ac_c" 1>&6
5252 else
5253   ac_save_LIBS="$LIBS"
5254 LIBS="-lresolv  $LIBS"
5255 cat > conftest.$ac_ext <<EOF
5256 #line 5257 "configure"
5257 #include "confdefs.h"
5258 /* Override any gcc2 internal prototype to avoid an error.  */
5259 /* We use char because int might match the return type of a gcc2
5260     builtin and then its argument prototype would still apply.  */
5261 char res_search();
5262
5263 int main() {
5264 res_search()
5265 ; return 0; }
5266 EOF
5267 if { (eval echo configure:5268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5268   rm -rf conftest*
5269   eval "ac_cv_lib_$ac_lib_var=yes"
5270 else
5271   echo "configure: failed program was:" >&5
5272   cat conftest.$ac_ext >&5
5273   rm -rf conftest*
5274   eval "ac_cv_lib_$ac_lib_var=no"
5275 fi
5276 rm -f conftest*
5277 LIBS="$ac_save_LIBS"
5278
5279 fi
5280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5281   echo "$ac_t""yes" 1>&6
5282     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5283     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5284   cat >> confdefs.h <<EOF
5285 #define $ac_tr_lib 1
5286 EOF
5287
5288   LIBS="-lresolv $LIBS"
5289
5290 else
5291   echo "$ac_t""no" 1>&6
5292 fi
5293
5294         ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
5295 fi
5296
5297 if test "$ac_cv_func_res_search" = yes ; then
5298         cat >> confdefs.h <<\EOF
5299 #define HAVE_RES_SEARCH 1
5300 EOF
5301
5302 elif test $ol_enable_dns = yes ; then
5303         { echo "configure: error: --enable-dns requires res_search" 1>&2; exit 1; }
5304 elif test $ol_enable_dns != no ; then
5305         echo "configure: warning: no res_search, disabling DNS support" 1>&2
5306 fi
5307
5308
5309 # ISODE tests
5310 ol_link_isode=no
5311 if test $ol_enable_ldapd != no ; then
5312         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
5313
5314                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
5315 echo "configure:5316: checking for main in -lxtpp" >&5
5316 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-:%__p__%'`
5317 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5318   echo $ac_n "(cached) $ac_c" 1>&6
5319 else
5320   ac_save_LIBS="$LIBS"
5321 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
5322 cat > conftest.$ac_ext <<EOF
5323 #line 5324 "configure"
5324 #include "confdefs.h"
5325
5326 int main() {
5327 main()
5328 ; return 0; }
5329 EOF
5330 if { (eval echo configure:5331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5331   rm -rf conftest*
5332   eval "ac_cv_lib_$ac_lib_var=yes"
5333 else
5334   echo "configure: failed program was:" >&5
5335   cat conftest.$ac_ext >&5
5336   rm -rf conftest*
5337   eval "ac_cv_lib_$ac_lib_var=no"
5338 fi
5339 rm -f conftest*
5340 LIBS="$ac_save_LIBS"
5341
5342 fi
5343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5344   echo "$ac_t""yes" 1>&6
5345   
5346                 ol_link_isode=yes
5347                 cat >> confdefs.h <<\EOF
5348 #define HAVE_XTPP 1
5349 EOF
5350
5351                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
5352                 
5353 else
5354   echo "$ac_t""no" 1>&6
5355 :
5356 fi
5357
5358         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
5359 echo "configure:5360: checking for main in -ldsap" >&5
5360 ac_lib_var=`echo dsap'_'main | sed 'y%./+-:%__p__%'`
5361 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5362   echo $ac_n "(cached) $ac_c" 1>&6
5363 else
5364   ac_save_LIBS="$LIBS"
5365 LIBS="-ldsap -lisode $LIBS"
5366 cat > conftest.$ac_ext <<EOF
5367 #line 5368 "configure"
5368 #include "confdefs.h"
5369
5370 int main() {
5371 main()
5372 ; return 0; }
5373 EOF
5374 if { (eval echo configure:5375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5375   rm -rf conftest*
5376   eval "ac_cv_lib_$ac_lib_var=yes"
5377 else
5378   echo "configure: failed program was:" >&5
5379   cat conftest.$ac_ext >&5
5380   rm -rf conftest*
5381   eval "ac_cv_lib_$ac_lib_var=no"
5382 fi
5383 rm -f conftest*
5384 LIBS="$ac_save_LIBS"
5385
5386 fi
5387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5388   echo "$ac_t""yes" 1>&6
5389   
5390                 ol_link_isode=yes
5391                 cat >> confdefs.h <<\EOF
5392 #define HAVE_DSAP 1
5393 EOF
5394
5395                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
5396                 
5397 else
5398   echo "$ac_t""no" 1>&6
5399 :
5400 fi
5401
5402         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
5403 echo "configure:5404: checking for main in -lisode" >&5
5404 ac_lib_var=`echo isode'_'main | sed 'y%./+-:%__p__%'`
5405 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5406   echo $ac_n "(cached) $ac_c" 1>&6
5407 else
5408   ac_save_LIBS="$LIBS"
5409 LIBS="-lisode  $LIBS"
5410 cat > conftest.$ac_ext <<EOF
5411 #line 5412 "configure"
5412 #include "confdefs.h"
5413
5414 int main() {
5415 main()
5416 ; return 0; }
5417 EOF
5418 if { (eval echo configure:5419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5419   rm -rf conftest*
5420   eval "ac_cv_lib_$ac_lib_var=yes"
5421 else
5422   echo "configure: failed program was:" >&5
5423   cat conftest.$ac_ext >&5
5424   rm -rf conftest*
5425   eval "ac_cv_lib_$ac_lib_var=no"
5426 fi
5427 rm -f conftest*
5428 LIBS="$ac_save_LIBS"
5429
5430 fi
5431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5432   echo "$ac_t""yes" 1>&6
5433   
5434                 ol_link_isode=yes
5435                 cat >> confdefs.h <<\EOF
5436 #define HAVE_ISODE 1
5437 EOF
5438
5439                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
5440                 
5441 else
5442   echo "$ac_t""no" 1>&6
5443 :
5444 fi
5445
5446 fi
5447
5448 if test $ol_link_isode != no; then
5449         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
5450 echo "configure:5451: checking for main in -lpp" >&5
5451 ac_lib_var=`echo pp'_'main | sed 'y%./+-:%__p__%'`
5452 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5453   echo $ac_n "(cached) $ac_c" 1>&6
5454 else
5455   ac_save_LIBS="$LIBS"
5456 LIBS="-lpp  $LIBS"
5457 cat > conftest.$ac_ext <<EOF
5458 #line 5459 "configure"
5459 #include "confdefs.h"
5460
5461 int main() {
5462 main()
5463 ; return 0; }
5464 EOF
5465 if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5466   rm -rf conftest*
5467   eval "ac_cv_lib_$ac_lib_var=yes"
5468 else
5469   echo "configure: failed program was:" >&5
5470   cat conftest.$ac_ext >&5
5471   rm -rf conftest*
5472   eval "ac_cv_lib_$ac_lib_var=no"
5473 fi
5474 rm -f conftest*
5475 LIBS="$ac_save_LIBS"
5476
5477 fi
5478 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5479   echo "$ac_t""yes" 1>&6
5480   
5481                 cat >> confdefs.h <<\EOF
5482 #define HAVE_PP 1
5483 EOF
5484
5485                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
5486                 
5487 else
5488   echo "$ac_t""no" 1>&6
5489 :
5490 fi
5491
5492
5493         # Extract the first word of "pepsy", so it can be a program name with args.
5494 set dummy pepsy; ac_word=$2
5495 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5496 echo "configure:5497: checking for $ac_word" >&5
5497 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
5498   echo $ac_n "(cached) $ac_c" 1>&6
5499 else
5500   case "$PEPSY" in
5501   /*)
5502   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
5503   ;;
5504   ?:/*)                  
5505   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
5506   ;;
5507   *)
5508   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5509   ac_dummy="$PATH"
5510   for ac_dir in $ac_dummy; do 
5511     test -z "$ac_dir" && ac_dir=.
5512     if test -f $ac_dir/$ac_word; then
5513       ac_cv_path_PEPSY="$ac_dir/$ac_word"
5514       break
5515     fi
5516   done
5517   IFS="$ac_save_ifs"
5518   ;;
5519 esac
5520 fi
5521 PEPSY="$ac_cv_path_PEPSY"
5522 if test -n "$PEPSY"; then
5523   echo "$ac_t""$PEPSY" 1>&6
5524 else
5525   echo "$ac_t""no" 1>&6
5526 fi
5527
5528 fi
5529
5530 if test $ol_enable_quipu != no ; then
5531         for ac_hdr in quipu/commonarg.h
5532 do
5533 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5534 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5535 echo "configure:5536: checking for $ac_hdr" >&5
5536 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5537   echo $ac_n "(cached) $ac_c" 1>&6
5538 else
5539   cat > conftest.$ac_ext <<EOF
5540 #line 5541 "configure"
5541 #include "confdefs.h"
5542 #include <$ac_hdr>
5543 EOF
5544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5545 { (eval echo configure:5546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5547 if test -z "$ac_err"; then
5548   rm -rf conftest*
5549   eval "ac_cv_header_$ac_safe=yes"
5550 else
5551   echo "$ac_err" >&5
5552   echo "configure: failed program was:" >&5
5553   cat conftest.$ac_ext >&5
5554   rm -rf conftest*
5555   eval "ac_cv_header_$ac_safe=no"
5556 fi
5557 rm -f conftest*
5558 fi
5559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5560   echo "$ac_t""yes" 1>&6
5561     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5562   cat >> confdefs.h <<EOF
5563 #define $ac_tr_hdr 1
5564 EOF
5565  
5566 else
5567   echo "$ac_t""no" 1>&6
5568 fi
5569 done
5570
5571
5572         if test $ac_cv_header_quipu_commonarg_h = yes ; then
5573                 BUILD_QUIPU=yes
5574         elif test $ol_enable_quipu = auto ; then
5575                 echo "configure: warning: no quipu for --enable-quipu=auto, disabling" 1>&2
5576         else
5577                 { echo "configure: error: no quipu for --enable-quipu=$ol_enable_quipu" 1>&2; exit 1; }
5578         fi
5579 fi
5580
5581 ol_link_kerberos=no
5582
5583 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
5584         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
5585 do
5586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5587 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5588 echo "configure:5589: checking for $ac_hdr" >&5
5589 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5590   echo $ac_n "(cached) $ac_c" 1>&6
5591 else
5592   cat > conftest.$ac_ext <<EOF
5593 #line 5594 "configure"
5594 #include "confdefs.h"
5595 #include <$ac_hdr>
5596 EOF
5597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5598 { (eval echo configure:5599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5600 if test -z "$ac_err"; then
5601   rm -rf conftest*
5602   eval "ac_cv_header_$ac_safe=yes"
5603 else
5604   echo "$ac_err" >&5
5605   echo "configure: failed program was:" >&5
5606   cat conftest.$ac_ext >&5
5607   rm -rf conftest*
5608   eval "ac_cv_header_$ac_safe=no"
5609 fi
5610 rm -f conftest*
5611 fi
5612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5613   echo "$ac_t""yes" 1>&6
5614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5615   cat >> confdefs.h <<EOF
5616 #define $ac_tr_hdr 1
5617 EOF
5618  
5619 else
5620   echo "$ac_t""no" 1>&6
5621 fi
5622 done
5623
5624
5625         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
5626                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
5627 echo "configure:5628: checking for main in -lkrb4" >&5
5628 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
5629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5630   echo $ac_n "(cached) $ac_c" 1>&6
5631 else
5632   ac_save_LIBS="$LIBS"
5633 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
5634 cat > conftest.$ac_ext <<EOF
5635 #line 5636 "configure"
5636 #include "confdefs.h"
5637
5638 int main() {
5639 main()
5640 ; return 0; }
5641 EOF
5642 if { (eval echo configure:5643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5643   rm -rf conftest*
5644   eval "ac_cv_lib_$ac_lib_var=yes"
5645 else
5646   echo "configure: failed program was:" >&5
5647   cat conftest.$ac_ext >&5
5648   rm -rf conftest*
5649   eval "ac_cv_lib_$ac_lib_var=no"
5650 fi
5651 rm -f conftest*
5652 LIBS="$ac_save_LIBS"
5653
5654 fi
5655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5656   echo "$ac_t""yes" 1>&6
5657   have_k5=yes
5658 else
5659   echo "$ac_t""no" 1>&6
5660 have_k5=no
5661 fi
5662
5663
5664                 if test $have_k5 = yes ; then
5665                         ol_with_kerberos=found
5666                         ol_link_kerberos=yes
5667
5668                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
5669
5670                         LIBS="$KRB_LIBS $LIBS"
5671
5672                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
5673 echo "configure:5674: checking for des_debug in Kerberos libraries" >&5
5674 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
5675   echo $ac_n "(cached) $ac_c" 1>&6
5676 else
5677   
5678                                                                 save_LIBS="$LIBS"
5679                                 LIBS="$KRB_LIBS $LIBS"
5680                                 cat > conftest.$ac_ext <<EOF
5681 #line 5682 "configure"
5682 #include "confdefs.h"
5683
5684 #include <kerberosIV/krb.h>
5685 #include <kerberosIV/des.h>
5686 extern int des_debug;
5687
5688 int main() {
5689
5690 des_debug = 1;
5691
5692 ; return 0; }
5693 EOF
5694 if { (eval echo configure:5695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5695   rm -rf conftest*
5696   ol_cv_var_des_debug=yes
5697 else
5698   echo "configure: failed program was:" >&5
5699   cat conftest.$ac_ext >&5
5700   rm -rf conftest*
5701   ol_cv_var_des_debug=no
5702 fi
5703 rm -f conftest*
5704                                                                 LIBS="$save_LIBS"
5705                         
5706 fi
5707
5708 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
5709
5710                         if test $ol_cv_var_des_debug = yes ; then
5711                                 cat >> confdefs.h <<\EOF
5712 #define HAVE_DES_DEBUG 1
5713 EOF
5714
5715                         fi
5716
5717                         LIBS="$save_LIBS"
5718                 fi
5719         fi
5720 fi
5721
5722 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
5723         for ac_hdr in krb.h des.h
5724 do
5725 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5726 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5727 echo "configure:5728: checking for $ac_hdr" >&5
5728 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5729   echo $ac_n "(cached) $ac_c" 1>&6
5730 else
5731   cat > conftest.$ac_ext <<EOF
5732 #line 5733 "configure"
5733 #include "confdefs.h"
5734 #include <$ac_hdr>
5735 EOF
5736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5737 { (eval echo configure:5738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5738 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5739 if test -z "$ac_err"; then
5740   rm -rf conftest*
5741   eval "ac_cv_header_$ac_safe=yes"
5742 else
5743   echo "$ac_err" >&5
5744   echo "configure: failed program was:" >&5
5745   cat conftest.$ac_ext >&5
5746   rm -rf conftest*
5747   eval "ac_cv_header_$ac_safe=no"
5748 fi
5749 rm -f conftest*
5750 fi
5751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5752   echo "$ac_t""yes" 1>&6
5753     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5754   cat >> confdefs.h <<EOF
5755 #define $ac_tr_hdr 1
5756 EOF
5757  
5758 else
5759   echo "$ac_t""no" 1>&6
5760 fi
5761 done
5762
5763
5764         if test $ac_cv_header_krb_h = yes ; then
5765                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
5766 echo "configure:5767: checking for main in -lkrb" >&5
5767 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
5768 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5769   echo $ac_n "(cached) $ac_c" 1>&6
5770 else
5771   ac_save_LIBS="$LIBS"
5772 LIBS="-lkrb -ldes $LIBS"
5773 cat > conftest.$ac_ext <<EOF
5774 #line 5775 "configure"
5775 #include "confdefs.h"
5776
5777 int main() {
5778 main()
5779 ; return 0; }
5780 EOF
5781 if { (eval echo configure:5782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5782   rm -rf conftest*
5783   eval "ac_cv_lib_$ac_lib_var=yes"
5784 else
5785   echo "configure: failed program was:" >&5
5786   cat conftest.$ac_ext >&5
5787   rm -rf conftest*
5788   eval "ac_cv_lib_$ac_lib_var=no"
5789 fi
5790 rm -f conftest*
5791 LIBS="$ac_save_LIBS"
5792
5793 fi
5794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5795   echo "$ac_t""yes" 1>&6
5796   have_k4=yes
5797 else
5798   echo "$ac_t""no" 1>&6
5799 have_k4=no
5800 fi
5801
5802
5803                 if test $have_k4 = yes ; then
5804                         ol_with_kerberos=found
5805                         ol_link_kerberos=yes
5806
5807                         KRB_LIBS="-lkrb -ldes"
5808                 fi
5809         fi
5810 fi
5811
5812 if test $ol_link_kerberos = yes ; then
5813         cat >> confdefs.h <<\EOF
5814 #define HAVE_KERBEROS 1
5815 EOF
5816
5817 fi
5818
5819 ol_link_tls=no
5820 if test $ol_with_tls != no ; then
5821         
5822         for ac_hdr in openssl/ssl.h ssl.h
5823 do
5824 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5825 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5826 echo "configure:5827: checking for $ac_hdr" >&5
5827 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5828   echo $ac_n "(cached) $ac_c" 1>&6
5829 else
5830   cat > conftest.$ac_ext <<EOF
5831 #line 5832 "configure"
5832 #include "confdefs.h"
5833 #include <$ac_hdr>
5834 EOF
5835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5836 { (eval echo configure:5837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5838 if test -z "$ac_err"; then
5839   rm -rf conftest*
5840   eval "ac_cv_header_$ac_safe=yes"
5841 else
5842   echo "$ac_err" >&5
5843   echo "configure: failed program was:" >&5
5844   cat conftest.$ac_ext >&5
5845   rm -rf conftest*
5846   eval "ac_cv_header_$ac_safe=no"
5847 fi
5848 rm -f conftest*
5849 fi
5850 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5851   echo "$ac_t""yes" 1>&6
5852     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5853   cat >> confdefs.h <<EOF
5854 #define $ac_tr_hdr 1
5855 EOF
5856  
5857 else
5858   echo "$ac_t""no" 1>&6
5859 fi
5860 done
5861
5862         
5863         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
5864                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
5865 echo "configure:5866: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
5866 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
5867 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5868   echo $ac_n "(cached) $ac_c" 1>&6
5869 else
5870   ac_save_LIBS="$LIBS"
5871 LIBS="-lssl -lcrypto $LIBS"
5872 cat > conftest.$ac_ext <<EOF
5873 #line 5874 "configure"
5874 #include "confdefs.h"
5875 /* Override any gcc2 internal prototype to avoid an error.  */
5876 /* We use char because int might match the return type of a gcc2
5877     builtin and then its argument prototype would still apply.  */
5878 char SSLeay_add_ssl_algorithms();
5879
5880 int main() {
5881 SSLeay_add_ssl_algorithms()
5882 ; return 0; }
5883 EOF
5884 if { (eval echo configure:5885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5885   rm -rf conftest*
5886   eval "ac_cv_lib_$ac_lib_var=yes"
5887 else
5888   echo "configure: failed program was:" >&5
5889   cat conftest.$ac_ext >&5
5890   rm -rf conftest*
5891   eval "ac_cv_lib_$ac_lib_var=no"
5892 fi
5893 rm -f conftest*
5894 LIBS="$ac_save_LIBS"
5895
5896 fi
5897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5898   echo "$ac_t""yes" 1>&6
5899   have_ssleay=yes
5900                         need_rsaref=no
5901 else
5902   echo "$ac_t""no" 1>&6
5903 have_ssleay=no
5904 fi
5905
5906                         
5907                 if test $have_ssleay = no ; then
5908                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
5909 echo "configure:5910: checking for SSL_library_init in -lssl" >&5
5910 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
5911 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5912   echo $ac_n "(cached) $ac_c" 1>&6
5913 else
5914   ac_save_LIBS="$LIBS"
5915 LIBS="-lssl -lcrypto $LIBS"
5916 cat > conftest.$ac_ext <<EOF
5917 #line 5918 "configure"
5918 #include "confdefs.h"
5919 /* Override any gcc2 internal prototype to avoid an error.  */
5920 /* We use char because int might match the return type of a gcc2
5921     builtin and then its argument prototype would still apply.  */
5922 char SSL_library_init();
5923
5924 int main() {
5925 SSL_library_init()
5926 ; return 0; }
5927 EOF
5928 if { (eval echo configure:5929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5929   rm -rf conftest*
5930   eval "ac_cv_lib_$ac_lib_var=yes"
5931 else
5932   echo "configure: failed program was:" >&5
5933   cat conftest.$ac_ext >&5
5934   rm -rf conftest*
5935   eval "ac_cv_lib_$ac_lib_var=no"
5936 fi
5937 rm -f conftest*
5938 LIBS="$ac_save_LIBS"
5939
5940 fi
5941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5942   echo "$ac_t""yes" 1>&6
5943   have_ssleay=yes
5944                                 need_rsaref=no
5945 else
5946   echo "$ac_t""no" 1>&6
5947 have_ssleay=no
5948 fi
5949
5950                 fi
5951
5952                 if test $have_ssleay = no ; then
5953                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
5954 echo "configure:5955: checking for ssl3_accept in -lssl" >&5
5955 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
5956 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
5957   echo $ac_n "(cached) $ac_c" 1>&6
5958 else
5959   ac_save_LIBS="$LIBS"
5960 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
5961 cat > conftest.$ac_ext <<EOF
5962 #line 5963 "configure"
5963 #include "confdefs.h"
5964 /* Override any gcc2 internal prototype to avoid an error.  */
5965 /* We use char because int might match the return type of a gcc2
5966     builtin and then its argument prototype would still apply.  */
5967 char ssl3_accept();
5968
5969 int main() {
5970 ssl3_accept()
5971 ; return 0; }
5972 EOF
5973 if { (eval echo configure:5974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5974   rm -rf conftest*
5975   eval "ac_cv_lib_$ac_lib_var=yes"
5976 else
5977   echo "configure: failed program was:" >&5
5978   cat conftest.$ac_ext >&5
5979   rm -rf conftest*
5980   eval "ac_cv_lib_$ac_lib_var=no"
5981 fi
5982 rm -f conftest*
5983 LIBS="$ac_save_LIBS"
5984
5985 fi
5986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5987   echo "$ac_t""yes" 1>&6
5988   have_ssleay=yes
5989                                 need_rsaref=yes
5990 else
5991   echo "$ac_t""no" 1>&6
5992 have_ssleay=no
5993 fi
5994
5995                 fi
5996
5997                 if test $have_ssleay = yes ; then
5998                         ol_with_tls=found
5999                         ol_link_tls=yes
6000
6001                         cat >> confdefs.h <<\EOF
6002 #define HAVE_SSLEAY 1
6003 EOF
6004
6005
6006                         if test $need_rsaref = yes; then
6007                                 cat >> confdefs.h <<\EOF
6008 #define HAVE_RSAREF 1
6009 EOF
6010
6011
6012                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
6013                         else
6014                                 TLS_LIBS="-lssl -lcrypto"
6015                         fi
6016                 fi
6017         fi
6018 fi
6019
6020 if test $ol_link_tls = yes ; then
6021         cat >> confdefs.h <<\EOF
6022 #define HAVE_TLS 1
6023 EOF
6024
6025 fi      
6026
6027 for ac_func in \
6028         ctime_r                 \
6029         gethostbyname_r gethostbyaddr_r \
6030
6031 do
6032 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6033 echo "configure:6034: checking for $ac_func" >&5
6034 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6035   echo $ac_n "(cached) $ac_c" 1>&6
6036 else
6037   cat > conftest.$ac_ext <<EOF
6038 #line 6039 "configure"
6039 #include "confdefs.h"
6040 /* System header to define __stub macros and hopefully few prototypes,
6041     which can conflict with char $ac_func(); below.  */
6042 #include <assert.h>
6043 /* Override any gcc2 internal prototype to avoid an error.  */
6044 /* We use char because int might match the return type of a gcc2
6045     builtin and then its argument prototype would still apply.  */
6046 char $ac_func();
6047 char (*f)();
6048
6049 int main() {
6050
6051 /* The GNU C library defines this for functions which it implements
6052     to always fail with ENOSYS.  Some functions are actually named
6053     something starting with __ and the normal name is an alias.  */
6054 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6055 choke me
6056 #else
6057 f = $ac_func;
6058 #endif
6059
6060 ; return 0; }
6061 EOF
6062 if { (eval echo configure:6063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6063   rm -rf conftest*
6064   eval "ac_cv_func_$ac_func=yes"
6065 else
6066   echo "configure: failed program was:" >&5
6067   cat conftest.$ac_ext >&5
6068   rm -rf conftest*
6069   eval "ac_cv_func_$ac_func=no"
6070 fi
6071 rm -f conftest*
6072 fi
6073
6074 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6075   echo "$ac_t""yes" 1>&6
6076     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6077   cat >> confdefs.h <<EOF
6078 #define $ac_tr_func 1
6079 EOF
6080  
6081 else
6082   echo "$ac_t""no" 1>&6
6083 fi
6084 done
6085
6086
6087 if test "$ac_cv_func_ctime_r" = no ; then
6088         ol_cv_func_ctime_r_nargs=0
6089 else
6090         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
6091 echo "configure:6092: checking number of arguments of ctime_r" >&5
6092 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
6093   echo $ac_n "(cached) $ac_c" 1>&6
6094 else
6095   cat > conftest.$ac_ext <<EOF
6096 #line 6097 "configure"
6097 #include "confdefs.h"
6098 #include <time.h>
6099 int main() {
6100 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
6101 ; return 0; }
6102 EOF
6103 if { (eval echo configure:6104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6104   rm -rf conftest*
6105   ol_cv_func_ctime_r_nargs=3
6106 else
6107   echo "configure: failed program was:" >&5
6108   cat conftest.$ac_ext >&5
6109   rm -rf conftest*
6110   cat > conftest.$ac_ext <<EOF
6111 #line 6112 "configure"
6112 #include "confdefs.h"
6113 #include <time.h>
6114 int main() {
6115 time_t ti; char *buffer; ctime_r(&ti,buffer);
6116 ; return 0; }
6117 EOF
6118 if { (eval echo configure:6119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6119   rm -rf conftest*
6120   ol_cv_func_ctime_r_nargs=2
6121 else
6122   echo "configure: failed program was:" >&5
6123   cat conftest.$ac_ext >&5
6124   rm -rf conftest*
6125   ol_cv_func_ctime_r_nargs=0
6126 fi
6127 rm -f conftest*
6128 fi
6129 rm -f conftest*
6130 fi
6131
6132 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
6133   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
6134     cat >> confdefs.h <<EOF
6135 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
6136 EOF
6137
6138   fi
6139
6140 fi
6141
6142 if test "$ac_cv_func_gethostbyname_r" = yes ; then
6143         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
6144 echo "configure:6145: checking number of arguments of gethostbyname_r" >&5
6145 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
6146   echo $ac_n "(cached) $ac_c" 1>&6
6147 else
6148   cat > conftest.$ac_ext <<EOF
6149 #line 6150 "configure"
6150 #include "confdefs.h"
6151 #include <sys/types.h>
6152 #include <sys/socket.h>
6153 #include <netinet/in.h>
6154 #include <netdb.h>
6155 #define BUFSIZE (sizeof(struct hostent)+10)
6156 int main() {
6157 struct hostent hent; char buffer[BUFSIZE];
6158                 int bufsize=BUFSIZE;int h_errno;
6159                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
6160                         buffer, bufsize, &h_errno);
6161 ; return 0; }
6162 EOF
6163 if { (eval echo configure:6164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6164   rm -rf conftest*
6165   ol_cv_func_gethostbyname_r_nargs=5
6166 else
6167   echo "configure: failed program was:" >&5
6168   cat conftest.$ac_ext >&5
6169   rm -rf conftest*
6170   cat > conftest.$ac_ext <<EOF
6171 #line 6172 "configure"
6172 #include "confdefs.h"
6173 #include <sys/types.h>
6174 #include <sys/socket.h>
6175 #include <netinet/in.h>
6176 #include <netdb.h>
6177 #define BUFSIZE (sizeof(struct hostent)+10)
6178 int main() {
6179 struct hostent hent;struct hostent *rhent;
6180                         char buffer[BUFSIZE];
6181                         int bufsize=BUFSIZE;int h_errno;
6182                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
6183                                 &rhent, &h_errno);
6184 ; return 0; }
6185 EOF
6186 if { (eval echo configure:6187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6187   rm -rf conftest*
6188   ol_cv_func_gethostbyname_r_nargs=6
6189 else
6190   echo "configure: failed program was:" >&5
6191   cat conftest.$ac_ext >&5
6192   rm -rf conftest*
6193   ol_cv_func_gethostbyname_r_nargs=0
6194 fi
6195 rm -f conftest*
6196 fi
6197 rm -f conftest*
6198 fi
6199
6200 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
6201   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
6202         cat >> confdefs.h <<EOF
6203 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
6204 EOF
6205
6206   fi
6207
6208 else
6209         ol_cv_func_gethostbyname_r_nargs=0
6210 fi
6211  
6212 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
6213         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
6214 echo "configure:6215: checking number of arguments of gethostbyaddr_r" >&5
6215 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
6216   echo $ac_n "(cached) $ac_c" 1>&6
6217 else
6218   cat > conftest.$ac_ext <<EOF
6219 #line 6220 "configure"
6220 #include "confdefs.h"
6221 #include <sys/types.h>
6222 #include <sys/socket.h>
6223 #include <netinet/in.h>
6224 #include <netdb.h>
6225 #define BUFSIZE (sizeof(struct hostent)+10)
6226 int main() {
6227 struct hostent hent; char buffer[BUFSIZE]; 
6228             struct in_addr add;
6229             size_t alen=sizeof(struct in_addr);
6230             int bufsize=BUFSIZE;int h_errno;
6231                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
6232                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
6233 ; return 0; }
6234 EOF
6235 if { (eval echo configure:6236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6236   rm -rf conftest*
6237   ol_cv_func_gethostbyaddr_r_nargs=7
6238 else
6239   echo "configure: failed program was:" >&5
6240   cat conftest.$ac_ext >&5
6241   rm -rf conftest*
6242   cat > conftest.$ac_ext <<EOF
6243 #line 6244 "configure"
6244 #include "confdefs.h"
6245 #include <sys/types.h>
6246 #include <sys/socket.h>
6247 #include <netinet/in.h>
6248 #include <netdb.h>
6249 #define BUFSIZE (sizeof(struct hostent)+10)
6250 int main() {
6251 struct hostent hent;
6252                         struct hostent *rhent; char buffer[BUFSIZE]; 
6253                         struct in_addr add;
6254                         size_t alen=sizeof(struct in_addr);
6255                         int bufsize=BUFSIZE;int h_errno;
6256                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
6257                                 alen, AF_INET, &hent, buffer, bufsize, 
6258                                 &rhent, &h_errno);
6259 ; return 0; }
6260 EOF
6261 if { (eval echo configure:6262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6262   rm -rf conftest*
6263   ol_cv_func_gethostbyaddr_r_nargs=8
6264 else
6265   echo "configure: failed program was:" >&5
6266   cat conftest.$ac_ext >&5
6267   rm -rf conftest*
6268   ol_cv_func_gethostbyaddr_r_nargs=0
6269 fi
6270 rm -f conftest*
6271 fi
6272 rm -f conftest*
6273 fi
6274
6275 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
6276   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
6277     cat >> confdefs.h <<EOF
6278 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
6279 EOF
6280
6281   fi
6282
6283 else
6284         ol_cv_func_gethostbyaddr_r_nargs=0
6285 fi
6286
6287 if test "$ac_cv_func_ctime_r" = yes \
6288         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
6289         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
6290         -a "$ac_cv_func_gethostbyname_r" = yes \
6291         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
6292         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
6293         -a "$ac_cv_func_gethostbyaddr_r" = yes \
6294         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
6295         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
6296         ; then
6297  
6298         cat >> confdefs.h <<\EOF
6299 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
6300 EOF
6301
6302 fi
6303
6304 ol_link_threads=no
6305 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6306         -o $ol_with_threads = posix ; then
6307
6308         for ac_hdr in pthread.h
6309 do
6310 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6311 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6312 echo "configure:6313: checking for $ac_hdr" >&5
6313 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6314   echo $ac_n "(cached) $ac_c" 1>&6
6315 else
6316   cat > conftest.$ac_ext <<EOF
6317 #line 6318 "configure"
6318 #include "confdefs.h"
6319 #include <$ac_hdr>
6320 EOF
6321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6322 { (eval echo configure:6323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6324 if test -z "$ac_err"; then
6325   rm -rf conftest*
6326   eval "ac_cv_header_$ac_safe=yes"
6327 else
6328   echo "$ac_err" >&5
6329   echo "configure: failed program was:" >&5
6330   cat conftest.$ac_ext >&5
6331   rm -rf conftest*
6332   eval "ac_cv_header_$ac_safe=no"
6333 fi
6334 rm -f conftest*
6335 fi
6336 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6337   echo "$ac_t""yes" 1>&6
6338     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6339   cat >> confdefs.h <<EOF
6340 #define $ac_tr_hdr 1
6341 EOF
6342  
6343 else
6344   echo "$ac_t""no" 1>&6
6345 fi
6346 done
6347
6348
6349         if test $ac_cv_header_pthread_h = yes ; then
6350                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
6351 echo "configure:6352: checking POSIX thread version" >&5
6352 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
6353   echo $ac_n "(cached) $ac_c" 1>&6
6354 else
6355   
6356         cat > conftest.$ac_ext <<EOF
6357 #line 6358 "configure"
6358 #include "confdefs.h"
6359
6360 #               include <pthread.h>
6361                 /* this check could be improved */
6362 #               ifdef PTHREAD_ONCE_INIT
6363                         pthread_version_final
6364 #               endif
6365         
6366 EOF
6367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6368   egrep "pthread_version_final" >/dev/null 2>&1; then
6369   rm -rf conftest*
6370   ol_pthread_final=yes
6371 else
6372   rm -rf conftest*
6373   ol_pthread_final=no
6374 fi
6375 rm -f conftest*
6376
6377
6378         cat > conftest.$ac_ext <<EOF
6379 #line 6380 "configure"
6380 #include "confdefs.h"
6381
6382 #               include <pthread.h>
6383                 /* this check could be improved */
6384 #               ifdef pthread_once_init
6385                         pthread_version_draft4
6386 #               endif
6387         
6388 EOF
6389 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6390   egrep "pthread_version_draft4" >/dev/null 2>&1; then
6391   rm -rf conftest*
6392   ol_pthread_draft4=yes
6393 else
6394   rm -rf conftest*
6395   ol_pthread_draft4=no
6396 fi
6397 rm -f conftest*
6398
6399
6400         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
6401                 ol_cv_pthread_version=final
6402         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
6403                 ol_cv_pthread_version=draft4
6404         else
6405                 ol_cv_pthread_version=unknown
6406         fi
6407
6408 fi
6409
6410 echo "$ac_t""$ol_cv_pthread_version" 1>&6
6411
6412
6413                 if test $ol_cv_pthread_version = final ; then
6414                         cat >> confdefs.h <<\EOF
6415 #define HAVE_PTHREADS_FINAL 1
6416 EOF
6417
6418                 elif test $ol_cv_pthread_version = draft4 ; then
6419                         cat >> confdefs.h <<\EOF
6420 #define HAVE_PTHREADS_D4 1
6421 EOF
6422
6423                 else
6424                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
6425                 fi
6426
6427                 # consider threads found
6428                 ol_with_threads=found
6429
6430                 
6431         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6432 echo "configure:6433: checking for LinuxThreads pthread.h" >&5
6433 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
6434   echo $ac_n "(cached) $ac_c" 1>&6
6435 else
6436   cat > conftest.$ac_ext <<EOF
6437 #line 6438 "configure"
6438 #include "confdefs.h"
6439 #include <pthread.h>
6440 EOF
6441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6442   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6443   rm -rf conftest*
6444   ol_cv_header_linux_threads=yes
6445 else
6446   rm -rf conftest*
6447   ol_cv_header_linux_threads=no
6448 fi
6449 rm -f conftest*
6450
6451                 
6452 fi
6453
6454 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6455         if test $ol_cv_header_linux_threads = yes; then
6456                 cat >> confdefs.h <<\EOF
6457 #define HAVE_LINUX_THREADS 1
6458 EOF
6459
6460         fi
6461
6462                 
6463         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
6464 echo "configure:6465: checking for GNU Pth pthread.h" >&5
6465 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
6466   echo $ac_n "(cached) $ac_c" 1>&6
6467 else
6468   cat > conftest.$ac_ext <<EOF
6469 #line 6470 "configure"
6470 #include "confdefs.h"
6471 #include <pthread.h>
6472 #ifdef _POSIX_THREAD_IS_GNU_PTH
6473         __gnu_pth__
6474 #endif
6475
6476 EOF
6477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6478   egrep "__gnu_pth__" >/dev/null 2>&1; then
6479   rm -rf conftest*
6480   ol_cv_header_gnu_pth_pthread_h=yes
6481 else
6482   rm -rf conftest*
6483   ol_cv_header_gnu_pth_pthread_h=no
6484 fi
6485 rm -f conftest*
6486
6487                 
6488 fi
6489
6490 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
6491
6492
6493                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
6494                         for ac_hdr in sched.h
6495 do
6496 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6497 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6498 echo "configure:6499: checking for $ac_hdr" >&5
6499 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
6500   echo $ac_n "(cached) $ac_c" 1>&6
6501 else
6502   cat > conftest.$ac_ext <<EOF
6503 #line 6504 "configure"
6504 #include "confdefs.h"
6505 #include <$ac_hdr>
6506 EOF
6507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6508 { (eval echo configure:6509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6510 if test -z "$ac_err"; then
6511   rm -rf conftest*
6512   eval "ac_cv_header_$ac_safe=yes"
6513 else
6514   echo "$ac_err" >&5
6515   echo "configure: failed program was:" >&5
6516   cat conftest.$ac_ext >&5
6517   rm -rf conftest*
6518   eval "ac_cv_header_$ac_safe=no"
6519 fi
6520 rm -f conftest*
6521 fi
6522 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6523   echo "$ac_t""yes" 1>&6
6524     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6525   cat >> confdefs.h <<EOF
6526 #define $ac_tr_hdr 1
6527 EOF
6528  
6529 else
6530   echo "$ac_t""no" 1>&6
6531 fi
6532 done
6533
6534                 fi
6535
6536                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
6537                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
6538 echo "configure:6539: checking for pthread_create in default libraries" >&5
6539 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
6540   echo $ac_n "(cached) $ac_c" 1>&6
6541 else
6542   
6543                 if test "$cross_compiling" = yes; then
6544   cat > conftest.$ac_ext <<EOF
6545 #line 6546 "configure"
6546 #include "confdefs.h"
6547 /* pthread test headers */
6548 #include <pthread.h>
6549 #ifndef NULL
6550 #define NULL (void*)0
6551 #endif
6552
6553 static void *task(p)
6554         void *p;
6555 {
6556         return (void *) (p == NULL);
6557 }
6558
6559 int main() {
6560
6561         /* pthread test function */
6562         pthread_t t;
6563         int status;
6564
6565         /* make sure pthread_create() isn't just a stub */
6566 #if HAVE_PTHREADS_D4
6567         status = pthread_create(&t, pthread_attr_default, task, NULL);
6568 #else
6569         status = pthread_create(&t, NULL, task, NULL);
6570 #endif
6571
6572         if( status ) exit( status );
6573
6574         /* make sure pthread_detach() isn't just a stub */
6575 #if HAVE_PTHREADS_D4
6576         status = pthread_detach( &t );
6577 #else
6578         status = pthread_detach( t );
6579 #endif
6580
6581 #ifdef HAVE_LINUX_THREADS
6582         pthread_kill_other_threads_np();
6583 #endif
6584
6585         exit( status );
6586
6587 ; return 0; }
6588 EOF
6589 if { (eval echo configure:6590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6590   rm -rf conftest*
6591   ol_cv_pthread_create=yes
6592 else
6593   echo "configure: failed program was:" >&5
6594   cat conftest.$ac_ext >&5
6595   rm -rf conftest*
6596   ol_cv_pthread_create=no
6597 fi
6598 rm -f conftest*
6599 else
6600   cat > conftest.$ac_ext <<EOF
6601 #line 6602 "configure"
6602 #include "confdefs.h"
6603 /* pthread test headers */
6604 #include <pthread.h>
6605 #ifndef NULL
6606 #define NULL (void*)0
6607 #endif
6608
6609 static void *task(p)
6610         void *p;
6611 {
6612         return (void *) (p == NULL);
6613 }
6614
6615
6616 int main(argc, argv)
6617         int argc;
6618         char **argv;
6619 {
6620
6621         /* pthread test function */
6622         pthread_t t;
6623         int status;
6624
6625         /* make sure pthread_create() isn't just a stub */
6626 #if HAVE_PTHREADS_D4
6627         status = pthread_create(&t, pthread_attr_default, task, NULL);
6628 #else
6629         status = pthread_create(&t, NULL, task, NULL);
6630 #endif
6631
6632         if( status ) exit( status );
6633
6634         /* make sure pthread_detach() isn't just a stub */
6635 #if HAVE_PTHREADS_D4
6636         status = pthread_detach( &t );
6637 #else
6638         status = pthread_detach( t );
6639 #endif
6640
6641 #ifdef HAVE_LINUX_THREADS
6642         pthread_kill_other_threads_np();
6643 #endif
6644
6645         exit( status );
6646
6647 }
6648
6649 EOF
6650 if { (eval echo configure:6651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6651 then
6652   ol_cv_pthread_create=yes
6653 else
6654   echo "configure: failed program was:" >&5
6655   cat conftest.$ac_ext >&5
6656   rm -fr conftest*
6657   ol_cv_pthread_create=no
6658 fi
6659 rm -fr conftest*
6660 fi
6661
6662 fi
6663
6664 echo "$ac_t""$ol_cv_pthread_create" 1>&6
6665
6666                 if test $ol_cv_pthread_create != no ; then
6667                         ol_link_threads=posix
6668                         ol_link_pthreads=""
6669                 fi
6670                 
6671                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
6672 if test "$ol_link_threads" = no ; then
6673         # try -kthread
6674         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
6675 echo "configure:6676: checking for pthread link with -kthread" >&5
6676 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
6677   echo $ac_n "(cached) $ac_c" 1>&6
6678 else
6679   
6680                 # save the flags
6681                 ol_LIBS="$LIBS"
6682                 LIBS="-kthread $LIBS"
6683
6684                 if test "$cross_compiling" = yes; then
6685   cat > conftest.$ac_ext <<EOF
6686 #line 6687 "configure"
6687 #include "confdefs.h"
6688 /* pthread test headers */
6689 #include <pthread.h>
6690 #ifndef NULL
6691 #define NULL (void*)0
6692 #endif
6693
6694 static void *task(p)
6695         void *p;
6696 {
6697         return (void *) (p == NULL);
6698 }
6699
6700 int main() {
6701
6702         /* pthread test function */
6703         pthread_t t;
6704         int status;
6705
6706         /* make sure pthread_create() isn't just a stub */
6707 #if HAVE_PTHREADS_D4
6708         status = pthread_create(&t, pthread_attr_default, task, NULL);
6709 #else
6710         status = pthread_create(&t, NULL, task, NULL);
6711 #endif
6712
6713         if( status ) exit( status );
6714
6715         /* make sure pthread_detach() isn't just a stub */
6716 #if HAVE_PTHREADS_D4
6717         status = pthread_detach( &t );
6718 #else
6719         status = pthread_detach( t );
6720 #endif
6721
6722 #ifdef HAVE_LINUX_THREADS
6723         pthread_kill_other_threads_np();
6724 #endif
6725
6726         exit( status );
6727
6728 ; return 0; }
6729 EOF
6730 if { (eval echo configure:6731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6731   rm -rf conftest*
6732   ol_cv_pthread_kthread=yes
6733 else
6734   echo "configure: failed program was:" >&5
6735   cat conftest.$ac_ext >&5
6736   rm -rf conftest*
6737   ol_cv_pthread_kthread=no
6738 fi
6739 rm -f conftest*
6740 else
6741   cat > conftest.$ac_ext <<EOF
6742 #line 6743 "configure"
6743 #include "confdefs.h"
6744 /* pthread test headers */
6745 #include <pthread.h>
6746 #ifndef NULL
6747 #define NULL (void*)0
6748 #endif
6749
6750 static void *task(p)
6751         void *p;
6752 {
6753         return (void *) (p == NULL);
6754 }
6755
6756
6757 int main(argc, argv)
6758         int argc;
6759         char **argv;
6760 {
6761
6762         /* pthread test function */
6763         pthread_t t;
6764         int status;
6765
6766         /* make sure pthread_create() isn't just a stub */
6767 #if HAVE_PTHREADS_D4
6768         status = pthread_create(&t, pthread_attr_default, task, NULL);
6769 #else
6770         status = pthread_create(&t, NULL, task, NULL);
6771 #endif
6772
6773         if( status ) exit( status );
6774
6775         /* make sure pthread_detach() isn't just a stub */
6776 #if HAVE_PTHREADS_D4
6777         status = pthread_detach( &t );
6778 #else
6779         status = pthread_detach( t );
6780 #endif
6781
6782 #ifdef HAVE_LINUX_THREADS
6783         pthread_kill_other_threads_np();
6784 #endif
6785
6786         exit( status );
6787
6788 }
6789
6790 EOF
6791 if { (eval echo configure:6792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6792 then
6793   ol_cv_pthread_kthread=yes
6794 else
6795   echo "configure: failed program was:" >&5
6796   cat conftest.$ac_ext >&5
6797   rm -fr conftest*
6798   ol_cv_pthread_kthread=no
6799 fi
6800 rm -fr conftest*
6801 fi
6802
6803
6804                 # restore the LIBS
6805                 LIBS="$ol_LIBS"
6806         
6807 fi
6808
6809 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
6810
6811         if test $ol_cv_pthread_kthread = yes ; then
6812                 ol_link_pthreads="-kthread"
6813                 ol_link_threads=posix
6814         fi
6815 fi
6816
6817                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
6818 if test "$ol_link_threads" = no ; then
6819         # try -pthread
6820         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
6821 echo "configure:6822: checking for pthread link with -pthread" >&5
6822 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
6823   echo $ac_n "(cached) $ac_c" 1>&6
6824 else
6825   
6826                 # save the flags
6827                 ol_LIBS="$LIBS"
6828                 LIBS="-pthread $LIBS"
6829
6830                 if test "$cross_compiling" = yes; then
6831   cat > conftest.$ac_ext <<EOF
6832 #line 6833 "configure"
6833 #include "confdefs.h"
6834 /* pthread test headers */
6835 #include <pthread.h>
6836 #ifndef NULL
6837 #define NULL (void*)0
6838 #endif
6839
6840 static void *task(p)
6841         void *p;
6842 {
6843         return (void *) (p == NULL);
6844 }
6845
6846 int main() {
6847
6848         /* pthread test function */
6849         pthread_t t;
6850         int status;
6851
6852         /* make sure pthread_create() isn't just a stub */
6853 #if HAVE_PTHREADS_D4
6854         status = pthread_create(&t, pthread_attr_default, task, NULL);
6855 #else
6856         status = pthread_create(&t, NULL, task, NULL);
6857 #endif
6858
6859         if( status ) exit( status );
6860
6861         /* make sure pthread_detach() isn't just a stub */
6862 #if HAVE_PTHREADS_D4
6863         status = pthread_detach( &t );
6864 #else
6865         status = pthread_detach( t );
6866 #endif
6867
6868 #ifdef HAVE_LINUX_THREADS
6869         pthread_kill_other_threads_np();
6870 #endif
6871
6872         exit( status );
6873
6874 ; return 0; }
6875 EOF
6876 if { (eval echo configure:6877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6877   rm -rf conftest*
6878   ol_cv_pthread_pthread=yes
6879 else
6880   echo "configure: failed program was:" >&5
6881   cat conftest.$ac_ext >&5
6882   rm -rf conftest*
6883   ol_cv_pthread_pthread=no
6884 fi
6885 rm -f conftest*
6886 else
6887   cat > conftest.$ac_ext <<EOF
6888 #line 6889 "configure"
6889 #include "confdefs.h"
6890 /* pthread test headers */
6891 #include <pthread.h>
6892 #ifndef NULL
6893 #define NULL (void*)0
6894 #endif
6895
6896 static void *task(p)
6897         void *p;
6898 {
6899         return (void *) (p == NULL);
6900 }
6901
6902
6903 int main(argc, argv)
6904         int argc;
6905         char **argv;
6906 {
6907
6908         /* pthread test function */
6909         pthread_t t;
6910         int status;
6911
6912         /* make sure pthread_create() isn't just a stub */
6913 #if HAVE_PTHREADS_D4
6914         status = pthread_create(&t, pthread_attr_default, task, NULL);
6915 #else
6916         status = pthread_create(&t, NULL, task, NULL);
6917 #endif
6918
6919         if( status ) exit( status );
6920
6921         /* make sure pthread_detach() isn't just a stub */
6922 #if HAVE_PTHREADS_D4
6923         status = pthread_detach( &t );
6924 #else
6925         status = pthread_detach( t );
6926 #endif
6927
6928 #ifdef HAVE_LINUX_THREADS
6929         pthread_kill_other_threads_np();
6930 #endif
6931
6932         exit( status );
6933
6934 }
6935
6936 EOF
6937 if { (eval echo configure:6938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6938 then
6939   ol_cv_pthread_pthread=yes
6940 else
6941   echo "configure: failed program was:" >&5
6942   cat conftest.$ac_ext >&5
6943   rm -fr conftest*
6944   ol_cv_pthread_pthread=no
6945 fi
6946 rm -fr conftest*
6947 fi
6948
6949
6950                 # restore the LIBS
6951                 LIBS="$ol_LIBS"
6952         
6953 fi
6954
6955 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
6956
6957         if test $ol_cv_pthread_pthread = yes ; then
6958                 ol_link_pthreads="-pthread"
6959                 ol_link_threads=posix
6960         fi
6961 fi
6962
6963                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
6964 if test "$ol_link_threads" = no ; then
6965         # try -pthreads
6966         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
6967 echo "configure:6968: checking for pthread link with -pthreads" >&5
6968 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
6969   echo $ac_n "(cached) $ac_c" 1>&6
6970 else
6971   
6972                 # save the flags
6973                 ol_LIBS="$LIBS"
6974                 LIBS="-pthreads $LIBS"
6975
6976                 if test "$cross_compiling" = yes; then
6977   cat > conftest.$ac_ext <<EOF
6978 #line 6979 "configure"
6979 #include "confdefs.h"
6980 /* pthread test headers */
6981 #include <pthread.h>
6982 #ifndef NULL
6983 #define NULL (void*)0
6984 #endif
6985
6986 static void *task(p)
6987         void *p;
6988 {
6989         return (void *) (p == NULL);
6990 }
6991
6992 int main() {
6993
6994         /* pthread test function */
6995         pthread_t t;
6996         int status;
6997
6998         /* make sure pthread_create() isn't just a stub */
6999 #if HAVE_PTHREADS_D4
7000         status = pthread_create(&t, pthread_attr_default, task, NULL);
7001 #else
7002         status = pthread_create(&t, NULL, task, NULL);
7003 #endif
7004
7005         if( status ) exit( status );
7006
7007         /* make sure pthread_detach() isn't just a stub */
7008 #if HAVE_PTHREADS_D4
7009         status = pthread_detach( &t );
7010 #else
7011         status = pthread_detach( t );
7012 #endif
7013
7014 #ifdef HAVE_LINUX_THREADS
7015         pthread_kill_other_threads_np();
7016 #endif
7017
7018         exit( status );
7019
7020 ; return 0; }
7021 EOF
7022 if { (eval echo configure:7023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7023   rm -rf conftest*
7024   ol_cv_pthread_pthreads=yes
7025 else
7026   echo "configure: failed program was:" >&5
7027   cat conftest.$ac_ext >&5
7028   rm -rf conftest*
7029   ol_cv_pthread_pthreads=no
7030 fi
7031 rm -f conftest*
7032 else
7033   cat > conftest.$ac_ext <<EOF
7034 #line 7035 "configure"
7035 #include "confdefs.h"
7036 /* pthread test headers */
7037 #include <pthread.h>
7038 #ifndef NULL
7039 #define NULL (void*)0
7040 #endif
7041
7042 static void *task(p)
7043         void *p;
7044 {
7045         return (void *) (p == NULL);
7046 }
7047
7048
7049 int main(argc, argv)
7050         int argc;
7051         char **argv;
7052 {
7053
7054         /* pthread test function */
7055         pthread_t t;
7056         int status;
7057
7058         /* make sure pthread_create() isn't just a stub */
7059 #if HAVE_PTHREADS_D4
7060         status = pthread_create(&t, pthread_attr_default, task, NULL);
7061 #else
7062         status = pthread_create(&t, NULL, task, NULL);
7063 #endif
7064
7065         if( status ) exit( status );
7066
7067         /* make sure pthread_detach() isn't just a stub */
7068 #if HAVE_PTHREADS_D4
7069         status = pthread_detach( &t );
7070 #else
7071         status = pthread_detach( t );
7072 #endif
7073
7074 #ifdef HAVE_LINUX_THREADS
7075         pthread_kill_other_threads_np();
7076 #endif
7077
7078         exit( status );
7079
7080 }
7081
7082 EOF
7083 if { (eval echo configure:7084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7084 then
7085   ol_cv_pthread_pthreads=yes
7086 else
7087   echo "configure: failed program was:" >&5
7088   cat conftest.$ac_ext >&5
7089   rm -fr conftest*
7090   ol_cv_pthread_pthreads=no
7091 fi
7092 rm -fr conftest*
7093 fi
7094
7095
7096                 # restore the LIBS
7097                 LIBS="$ol_LIBS"
7098         
7099 fi
7100
7101 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
7102
7103         if test $ol_cv_pthread_pthreads = yes ; then
7104                 ol_link_pthreads="-pthreads"
7105                 ol_link_threads=posix
7106         fi
7107 fi
7108
7109                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
7110 if test "$ol_link_threads" = no ; then
7111         # try -mthreads
7112         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
7113 echo "configure:7114: checking for pthread link with -mthreads" >&5
7114 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
7115   echo $ac_n "(cached) $ac_c" 1>&6
7116 else
7117   
7118                 # save the flags
7119                 ol_LIBS="$LIBS"
7120                 LIBS="-mthreads $LIBS"
7121
7122                 if test "$cross_compiling" = yes; then
7123   cat > conftest.$ac_ext <<EOF
7124 #line 7125 "configure"
7125 #include "confdefs.h"
7126 /* pthread test headers */
7127 #include <pthread.h>
7128 #ifndef NULL
7129 #define NULL (void*)0
7130 #endif
7131
7132 static void *task(p)
7133         void *p;
7134 {
7135         return (void *) (p == NULL);
7136 }
7137
7138 int main() {
7139
7140         /* pthread test function */
7141         pthread_t t;
7142         int status;
7143
7144         /* make sure pthread_create() isn't just a stub */
7145 #if HAVE_PTHREADS_D4
7146         status = pthread_create(&t, pthread_attr_default, task, NULL);
7147 #else
7148         status = pthread_create(&t, NULL, task, NULL);
7149 #endif
7150
7151         if( status ) exit( status );
7152
7153         /* make sure pthread_detach() isn't just a stub */
7154 #if HAVE_PTHREADS_D4
7155         status = pthread_detach( &t );
7156 #else
7157         status = pthread_detach( t );
7158 #endif
7159
7160 #ifdef HAVE_LINUX_THREADS
7161         pthread_kill_other_threads_np();
7162 #endif
7163
7164         exit( status );
7165
7166 ; return 0; }
7167 EOF
7168 if { (eval echo configure:7169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7169   rm -rf conftest*
7170   ol_cv_pthread_mthreads=yes
7171 else
7172   echo "configure: failed program was:" >&5
7173   cat conftest.$ac_ext >&5
7174   rm -rf conftest*
7175   ol_cv_pthread_mthreads=no
7176 fi
7177 rm -f conftest*
7178 else
7179   cat > conftest.$ac_ext <<EOF
7180 #line 7181 "configure"
7181 #include "confdefs.h"
7182 /* pthread test headers */
7183 #include <pthread.h>
7184 #ifndef NULL
7185 #define NULL (void*)0
7186 #endif
7187
7188 static void *task(p)
7189         void *p;
7190 {
7191         return (void *) (p == NULL);
7192 }
7193
7194
7195 int main(argc, argv)
7196         int argc;
7197         char **argv;
7198 {
7199
7200         /* pthread test function */
7201         pthread_t t;
7202         int status;
7203
7204         /* make sure pthread_create() isn't just a stub */
7205 #if HAVE_PTHREADS_D4
7206         status = pthread_create(&t, pthread_attr_default, task, NULL);
7207 #else
7208         status = pthread_create(&t, NULL, task, NULL);
7209 #endif
7210
7211         if( status ) exit( status );
7212
7213         /* make sure pthread_detach() isn't just a stub */
7214 #if HAVE_PTHREADS_D4
7215         status = pthread_detach( &t );
7216 #else
7217         status = pthread_detach( t );
7218 #endif
7219
7220 #ifdef HAVE_LINUX_THREADS
7221         pthread_kill_other_threads_np();
7222 #endif
7223
7224         exit( status );
7225
7226 }
7227
7228 EOF
7229 if { (eval echo configure:7230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7230 then
7231   ol_cv_pthread_mthreads=yes
7232 else
7233   echo "configure: failed program was:" >&5
7234   cat conftest.$ac_ext >&5
7235   rm -fr conftest*
7236   ol_cv_pthread_mthreads=no
7237 fi
7238 rm -fr conftest*
7239 fi
7240
7241
7242                 # restore the LIBS
7243                 LIBS="$ol_LIBS"
7244         
7245 fi
7246
7247 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
7248
7249         if test $ol_cv_pthread_mthreads = yes ; then
7250                 ol_link_pthreads="-mthreads"
7251                 ol_link_threads=posix
7252         fi
7253 fi
7254
7255                 # Pthread try link: -thread (ol_cv_pthread_thread)
7256 if test "$ol_link_threads" = no ; then
7257         # try -thread
7258         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
7259 echo "configure:7260: checking for pthread link with -thread" >&5
7260 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
7261   echo $ac_n "(cached) $ac_c" 1>&6
7262 else
7263   
7264                 # save the flags
7265                 ol_LIBS="$LIBS"
7266                 LIBS="-thread $LIBS"
7267
7268                 if test "$cross_compiling" = yes; then
7269   cat > conftest.$ac_ext <<EOF
7270 #line 7271 "configure"
7271 #include "confdefs.h"
7272 /* pthread test headers */
7273 #include <pthread.h>
7274 #ifndef NULL
7275 #define NULL (void*)0
7276 #endif
7277
7278 static void *task(p)
7279         void *p;
7280 {
7281         return (void *) (p == NULL);
7282 }
7283
7284 int main() {
7285
7286         /* pthread test function */
7287         pthread_t t;
7288         int status;
7289
7290         /* make sure pthread_create() isn't just a stub */
7291 #if HAVE_PTHREADS_D4
7292         status = pthread_create(&t, pthread_attr_default, task, NULL);
7293 #else
7294         status = pthread_create(&t, NULL, task, NULL);
7295 #endif
7296
7297         if( status ) exit( status );
7298
7299         /* make sure pthread_detach() isn't just a stub */
7300 #if HAVE_PTHREADS_D4
7301         status = pthread_detach( &t );
7302 #else
7303         status = pthread_detach( t );
7304 #endif
7305
7306 #ifdef HAVE_LINUX_THREADS
7307         pthread_kill_other_threads_np();
7308 #endif
7309
7310         exit( status );
7311
7312 ; return 0; }
7313 EOF
7314 if { (eval echo configure:7315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7315   rm -rf conftest*
7316   ol_cv_pthread_thread=yes
7317 else
7318   echo "configure: failed program was:" >&5
7319   cat conftest.$ac_ext >&5
7320   rm -rf conftest*
7321   ol_cv_pthread_thread=no
7322 fi
7323 rm -f conftest*
7324 else
7325   cat > conftest.$ac_ext <<EOF
7326 #line 7327 "configure"
7327 #include "confdefs.h"
7328 /* pthread test headers */
7329 #include <pthread.h>
7330 #ifndef NULL
7331 #define NULL (void*)0
7332 #endif
7333
7334 static void *task(p)
7335         void *p;
7336 {
7337         return (void *) (p == NULL);
7338 }
7339
7340
7341 int main(argc, argv)
7342         int argc;
7343         char **argv;
7344 {
7345
7346         /* pthread test function */
7347         pthread_t t;
7348         int status;
7349
7350         /* make sure pthread_create() isn't just a stub */
7351 #if HAVE_PTHREADS_D4
7352         status = pthread_create(&t, pthread_attr_default, task, NULL);
7353 #else
7354         status = pthread_create(&t, NULL, task, NULL);
7355 #endif
7356
7357         if( status ) exit( status );
7358
7359         /* make sure pthread_detach() isn't just a stub */
7360 #if HAVE_PTHREADS_D4
7361         status = pthread_detach( &t );
7362 #else
7363         status = pthread_detach( t );
7364 #endif
7365
7366 #ifdef HAVE_LINUX_THREADS
7367         pthread_kill_other_threads_np();
7368 #endif
7369
7370         exit( status );
7371
7372 }
7373
7374 EOF
7375 if { (eval echo configure:7376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7376 then
7377   ol_cv_pthread_thread=yes
7378 else
7379   echo "configure: failed program was:" >&5
7380   cat conftest.$ac_ext >&5
7381   rm -fr conftest*
7382   ol_cv_pthread_thread=no
7383 fi
7384 rm -fr conftest*
7385 fi
7386
7387
7388                 # restore the LIBS
7389                 LIBS="$ol_LIBS"
7390         
7391 fi
7392
7393 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
7394
7395         if test $ol_cv_pthread_thread = yes ; then
7396                 ol_link_pthreads="-thread"
7397                 ol_link_threads=posix
7398         fi
7399 fi
7400
7401
7402                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
7403 if test "$ol_link_threads" = no ; then
7404         # try -lpthread -lmach -lexc -lc_r
7405         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
7406 echo "configure:7407: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
7407 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
7408   echo $ac_n "(cached) $ac_c" 1>&6
7409 else
7410   
7411                 # save the flags
7412                 ol_LIBS="$LIBS"
7413                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
7414
7415                 if test "$cross_compiling" = yes; then
7416   cat > conftest.$ac_ext <<EOF
7417 #line 7418 "configure"
7418 #include "confdefs.h"
7419 /* pthread test headers */
7420 #include <pthread.h>
7421 #ifndef NULL
7422 #define NULL (void*)0
7423 #endif
7424
7425 static void *task(p)
7426         void *p;
7427 {
7428         return (void *) (p == NULL);
7429 }
7430
7431 int main() {
7432
7433         /* pthread test function */
7434         pthread_t t;
7435         int status;
7436
7437         /* make sure pthread_create() isn't just a stub */
7438 #if HAVE_PTHREADS_D4
7439         status = pthread_create(&t, pthread_attr_default, task, NULL);
7440 #else
7441         status = pthread_create(&t, NULL, task, NULL);
7442 #endif
7443
7444         if( status ) exit( status );
7445
7446         /* make sure pthread_detach() isn't just a stub */
7447 #if HAVE_PTHREADS_D4
7448         status = pthread_detach( &t );
7449 #else
7450         status = pthread_detach( t );
7451 #endif
7452
7453 #ifdef HAVE_LINUX_THREADS
7454         pthread_kill_other_threads_np();
7455 #endif
7456
7457         exit( status );
7458
7459 ; return 0; }
7460 EOF
7461 if { (eval echo configure:7462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7462   rm -rf conftest*
7463   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7464 else
7465   echo "configure: failed program was:" >&5
7466   cat conftest.$ac_ext >&5
7467   rm -rf conftest*
7468   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7469 fi
7470 rm -f conftest*
7471 else
7472   cat > conftest.$ac_ext <<EOF
7473 #line 7474 "configure"
7474 #include "confdefs.h"
7475 /* pthread test headers */
7476 #include <pthread.h>
7477 #ifndef NULL
7478 #define NULL (void*)0
7479 #endif
7480
7481 static void *task(p)
7482         void *p;
7483 {
7484         return (void *) (p == NULL);
7485 }
7486
7487
7488 int main(argc, argv)
7489         int argc;
7490         char **argv;
7491 {
7492
7493         /* pthread test function */
7494         pthread_t t;
7495         int status;
7496
7497         /* make sure pthread_create() isn't just a stub */
7498 #if HAVE_PTHREADS_D4
7499         status = pthread_create(&t, pthread_attr_default, task, NULL);
7500 #else
7501         status = pthread_create(&t, NULL, task, NULL);
7502 #endif
7503
7504         if( status ) exit( status );
7505
7506         /* make sure pthread_detach() isn't just a stub */
7507 #if HAVE_PTHREADS_D4
7508         status = pthread_detach( &t );
7509 #else
7510         status = pthread_detach( t );
7511 #endif
7512
7513 #ifdef HAVE_LINUX_THREADS
7514         pthread_kill_other_threads_np();
7515 #endif
7516
7517         exit( status );
7518
7519 }
7520
7521 EOF
7522 if { (eval echo configure:7523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7523 then
7524   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
7525 else
7526   echo "configure: failed program was:" >&5
7527   cat conftest.$ac_ext >&5
7528   rm -fr conftest*
7529   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
7530 fi
7531 rm -fr conftest*
7532 fi
7533
7534
7535                 # restore the LIBS
7536                 LIBS="$ol_LIBS"
7537         
7538 fi
7539
7540 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
7541
7542         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
7543                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
7544                 ol_link_threads=posix
7545         fi
7546 fi
7547
7548                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
7549 if test "$ol_link_threads" = no ; then
7550         # try -lpthread -lmach -lexc
7551         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
7552 echo "configure:7553: checking for pthread link with -lpthread -lmach -lexc" >&5
7553 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
7554   echo $ac_n "(cached) $ac_c" 1>&6
7555 else
7556   
7557                 # save the flags
7558                 ol_LIBS="$LIBS"
7559                 LIBS="-lpthread -lmach -lexc $LIBS"
7560
7561                 if test "$cross_compiling" = yes; then
7562   cat > conftest.$ac_ext <<EOF
7563 #line 7564 "configure"
7564 #include "confdefs.h"
7565 /* pthread test headers */
7566 #include <pthread.h>
7567 #ifndef NULL
7568 #define NULL (void*)0
7569 #endif
7570
7571 static void *task(p)
7572         void *p;
7573 {
7574         return (void *) (p == NULL);
7575 }
7576
7577 int main() {
7578
7579         /* pthread test function */
7580         pthread_t t;
7581         int status;
7582
7583         /* make sure pthread_create() isn't just a stub */
7584 #if HAVE_PTHREADS_D4
7585         status = pthread_create(&t, pthread_attr_default, task, NULL);
7586 #else
7587         status = pthread_create(&t, NULL, task, NULL);
7588 #endif
7589
7590         if( status ) exit( status );
7591
7592         /* make sure pthread_detach() isn't just a stub */
7593 #if HAVE_PTHREADS_D4
7594         status = pthread_detach( &t );
7595 #else
7596         status = pthread_detach( t );
7597 #endif
7598
7599 #ifdef HAVE_LINUX_THREADS
7600         pthread_kill_other_threads_np();
7601 #endif
7602
7603         exit( status );
7604
7605 ; return 0; }
7606 EOF
7607 if { (eval echo configure:7608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7608   rm -rf conftest*
7609   ol_cv_pthread_lpthread_lmach_lexc=yes
7610 else
7611   echo "configure: failed program was:" >&5
7612   cat conftest.$ac_ext >&5
7613   rm -rf conftest*
7614   ol_cv_pthread_lpthread_lmach_lexc=no
7615 fi
7616 rm -f conftest*
7617 else
7618   cat > conftest.$ac_ext <<EOF
7619 #line 7620 "configure"
7620 #include "confdefs.h"
7621 /* pthread test headers */
7622 #include <pthread.h>
7623 #ifndef NULL
7624 #define NULL (void*)0
7625 #endif
7626
7627 static void *task(p)
7628         void *p;
7629 {
7630         return (void *) (p == NULL);
7631 }
7632
7633
7634 int main(argc, argv)
7635         int argc;
7636         char **argv;
7637 {
7638
7639         /* pthread test function */
7640         pthread_t t;
7641         int status;
7642
7643         /* make sure pthread_create() isn't just a stub */
7644 #if HAVE_PTHREADS_D4
7645         status = pthread_create(&t, pthread_attr_default, task, NULL);
7646 #else
7647         status = pthread_create(&t, NULL, task, NULL);
7648 #endif
7649
7650         if( status ) exit( status );
7651
7652         /* make sure pthread_detach() isn't just a stub */
7653 #if HAVE_PTHREADS_D4
7654         status = pthread_detach( &t );
7655 #else
7656         status = pthread_detach( t );
7657 #endif
7658
7659 #ifdef HAVE_LINUX_THREADS
7660         pthread_kill_other_threads_np();
7661 #endif
7662
7663         exit( status );
7664
7665 }
7666
7667 EOF
7668 if { (eval echo configure:7669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7669 then
7670   ol_cv_pthread_lpthread_lmach_lexc=yes
7671 else
7672   echo "configure: failed program was:" >&5
7673   cat conftest.$ac_ext >&5
7674   rm -fr conftest*
7675   ol_cv_pthread_lpthread_lmach_lexc=no
7676 fi
7677 rm -fr conftest*
7678 fi
7679
7680
7681                 # restore the LIBS
7682                 LIBS="$ol_LIBS"
7683         
7684 fi
7685
7686 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
7687
7688         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
7689                 ol_link_pthreads="-lpthread -lmach -lexc"
7690                 ol_link_threads=posix
7691         fi
7692 fi
7693
7694
7695                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
7696 if test "$ol_link_threads" = no ; then
7697         # try -lpthread -Wl,-woff,85
7698         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
7699 echo "configure:7700: checking for pthread link with -lpthread -Wl,-woff,85" >&5
7700 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
7701   echo $ac_n "(cached) $ac_c" 1>&6
7702 else
7703   
7704                 # save the flags
7705                 ol_LIBS="$LIBS"
7706                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
7707
7708                 if test "$cross_compiling" = yes; then
7709   cat > conftest.$ac_ext <<EOF
7710 #line 7711 "configure"
7711 #include "confdefs.h"
7712 /* pthread test headers */
7713 #include <pthread.h>
7714 #ifndef NULL
7715 #define NULL (void*)0
7716 #endif
7717
7718 static void *task(p)
7719         void *p;
7720 {
7721         return (void *) (p == NULL);
7722 }
7723
7724 int main() {
7725
7726         /* pthread test function */
7727         pthread_t t;
7728         int status;
7729
7730         /* make sure pthread_create() isn't just a stub */
7731 #if HAVE_PTHREADS_D4
7732         status = pthread_create(&t, pthread_attr_default, task, NULL);
7733 #else
7734         status = pthread_create(&t, NULL, task, NULL);
7735 #endif
7736
7737         if( status ) exit( status );
7738
7739         /* make sure pthread_detach() isn't just a stub */
7740 #if HAVE_PTHREADS_D4
7741         status = pthread_detach( &t );
7742 #else
7743         status = pthread_detach( t );
7744 #endif
7745
7746 #ifdef HAVE_LINUX_THREADS
7747         pthread_kill_other_threads_np();
7748 #endif
7749
7750         exit( status );
7751
7752 ; return 0; }
7753 EOF
7754 if { (eval echo configure:7755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7755   rm -rf conftest*
7756   ol_cv_pthread_lib_lpthread_woff=yes
7757 else
7758   echo "configure: failed program was:" >&5
7759   cat conftest.$ac_ext >&5
7760   rm -rf conftest*
7761   ol_cv_pthread_lib_lpthread_woff=no
7762 fi
7763 rm -f conftest*
7764 else
7765   cat > conftest.$ac_ext <<EOF
7766 #line 7767 "configure"
7767 #include "confdefs.h"
7768 /* pthread test headers */
7769 #include <pthread.h>
7770 #ifndef NULL
7771 #define NULL (void*)0
7772 #endif
7773
7774 static void *task(p)
7775         void *p;
7776 {
7777         return (void *) (p == NULL);
7778 }
7779
7780
7781 int main(argc, argv)
7782         int argc;
7783         char **argv;
7784 {
7785
7786         /* pthread test function */
7787         pthread_t t;
7788         int status;
7789
7790         /* make sure pthread_create() isn't just a stub */
7791 #if HAVE_PTHREADS_D4
7792         status = pthread_create(&t, pthread_attr_default, task, NULL);
7793 #else
7794         status = pthread_create(&t, NULL, task, NULL);
7795 #endif
7796
7797         if( status ) exit( status );
7798
7799         /* make sure pthread_detach() isn't just a stub */
7800 #if HAVE_PTHREADS_D4
7801         status = pthread_detach( &t );
7802 #else
7803         status = pthread_detach( t );
7804 #endif
7805
7806 #ifdef HAVE_LINUX_THREADS
7807         pthread_kill_other_threads_np();
7808 #endif
7809
7810         exit( status );
7811
7812 }
7813
7814 EOF
7815 if { (eval echo configure:7816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7816 then
7817   ol_cv_pthread_lib_lpthread_woff=yes
7818 else
7819   echo "configure: failed program was:" >&5
7820   cat conftest.$ac_ext >&5
7821   rm -fr conftest*
7822   ol_cv_pthread_lib_lpthread_woff=no
7823 fi
7824 rm -fr conftest*
7825 fi
7826
7827
7828                 # restore the LIBS
7829                 LIBS="$ol_LIBS"
7830         
7831 fi
7832
7833 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
7834
7835         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
7836                 ol_link_pthreads="-lpthread -Wl,-woff,85"
7837                 ol_link_threads=posix
7838         fi
7839 fi
7840
7841
7842                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
7843 if test "$ol_link_threads" = no ; then
7844         # try -lpthread
7845         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
7846 echo "configure:7847: checking for pthread link with -lpthread" >&5
7847 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
7848   echo $ac_n "(cached) $ac_c" 1>&6
7849 else
7850   
7851                 # save the flags
7852                 ol_LIBS="$LIBS"
7853                 LIBS="-lpthread $LIBS"
7854
7855                 if test "$cross_compiling" = yes; then
7856   cat > conftest.$ac_ext <<EOF
7857 #line 7858 "configure"
7858 #include "confdefs.h"
7859 /* pthread test headers */
7860 #include <pthread.h>
7861 #ifndef NULL
7862 #define NULL (void*)0
7863 #endif
7864
7865 static void *task(p)
7866         void *p;
7867 {
7868         return (void *) (p == NULL);
7869 }
7870
7871 int main() {
7872
7873         /* pthread test function */
7874         pthread_t t;
7875         int status;
7876
7877         /* make sure pthread_create() isn't just a stub */
7878 #if HAVE_PTHREADS_D4
7879         status = pthread_create(&t, pthread_attr_default, task, NULL);
7880 #else
7881         status = pthread_create(&t, NULL, task, NULL);
7882 #endif
7883
7884         if( status ) exit( status );
7885
7886         /* make sure pthread_detach() isn't just a stub */
7887 #if HAVE_PTHREADS_D4
7888         status = pthread_detach( &t );
7889 #else
7890         status = pthread_detach( t );
7891 #endif
7892
7893 #ifdef HAVE_LINUX_THREADS
7894         pthread_kill_other_threads_np();
7895 #endif
7896
7897         exit( status );
7898
7899 ; return 0; }
7900 EOF
7901 if { (eval echo configure:7902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7902   rm -rf conftest*
7903   ol_cv_pthread_lpthread=yes
7904 else
7905   echo "configure: failed program was:" >&5
7906   cat conftest.$ac_ext >&5
7907   rm -rf conftest*
7908   ol_cv_pthread_lpthread=no
7909 fi
7910 rm -f conftest*
7911 else
7912   cat > conftest.$ac_ext <<EOF
7913 #line 7914 "configure"
7914 #include "confdefs.h"
7915 /* pthread test headers */
7916 #include <pthread.h>
7917 #ifndef NULL
7918 #define NULL (void*)0
7919 #endif
7920
7921 static void *task(p)
7922         void *p;
7923 {
7924         return (void *) (p == NULL);
7925 }
7926
7927
7928 int main(argc, argv)
7929         int argc;
7930         char **argv;
7931 {
7932
7933         /* pthread test function */
7934         pthread_t t;
7935         int status;
7936
7937         /* make sure pthread_create() isn't just a stub */
7938 #if HAVE_PTHREADS_D4
7939         status = pthread_create(&t, pthread_attr_default, task, NULL);
7940 #else
7941         status = pthread_create(&t, NULL, task, NULL);
7942 #endif
7943
7944         if( status ) exit( status );
7945
7946         /* make sure pthread_detach() isn't just a stub */
7947 #if HAVE_PTHREADS_D4
7948         status = pthread_detach( &t );
7949 #else
7950         status = pthread_detach( t );
7951 #endif
7952
7953 #ifdef HAVE_LINUX_THREADS
7954         pthread_kill_other_threads_np();
7955 #endif
7956
7957         exit( status );
7958
7959 }
7960
7961 EOF
7962 if { (eval echo configure:7963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7963 then
7964   ol_cv_pthread_lpthread=yes
7965 else
7966   echo "configure: failed program was:" >&5
7967   cat conftest.$ac_ext >&5
7968   rm -fr conftest*
7969   ol_cv_pthread_lpthread=no
7970 fi
7971 rm -fr conftest*
7972 fi
7973
7974
7975                 # restore the LIBS
7976                 LIBS="$ol_LIBS"
7977         
7978 fi
7979
7980 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
7981
7982         if test $ol_cv_pthread_lpthread = yes ; then
7983                 ol_link_pthreads="-lpthread"
7984                 ol_link_threads=posix
7985         fi
7986 fi
7987
7988                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
7989 if test "$ol_link_threads" = no ; then
7990         # try -lc_r
7991         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
7992 echo "configure:7993: checking for pthread link with -lc_r" >&5
7993 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
7994   echo $ac_n "(cached) $ac_c" 1>&6
7995 else
7996   
7997                 # save the flags
7998                 ol_LIBS="$LIBS"
7999                 LIBS="-lc_r $LIBS"
8000
8001                 if test "$cross_compiling" = yes; then
8002   cat > conftest.$ac_ext <<EOF
8003 #line 8004 "configure"
8004 #include "confdefs.h"
8005 /* pthread test headers */
8006 #include <pthread.h>
8007 #ifndef NULL
8008 #define NULL (void*)0
8009 #endif
8010
8011 static void *task(p)
8012         void *p;
8013 {
8014         return (void *) (p == NULL);
8015 }
8016
8017 int main() {
8018
8019         /* pthread test function */
8020         pthread_t t;
8021         int status;
8022
8023         /* make sure pthread_create() isn't just a stub */
8024 #if HAVE_PTHREADS_D4
8025         status = pthread_create(&t, pthread_attr_default, task, NULL);
8026 #else
8027         status = pthread_create(&t, NULL, task, NULL);
8028 #endif
8029
8030         if( status ) exit( status );
8031
8032         /* make sure pthread_detach() isn't just a stub */
8033 #if HAVE_PTHREADS_D4
8034         status = pthread_detach( &t );
8035 #else
8036         status = pthread_detach( t );
8037 #endif
8038
8039 #ifdef HAVE_LINUX_THREADS
8040         pthread_kill_other_threads_np();
8041 #endif
8042
8043         exit( status );
8044
8045 ; return 0; }
8046 EOF
8047 if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8048   rm -rf conftest*
8049   ol_cv_pthread_lc_r=yes
8050 else
8051   echo "configure: failed program was:" >&5
8052   cat conftest.$ac_ext >&5
8053   rm -rf conftest*
8054   ol_cv_pthread_lc_r=no
8055 fi
8056 rm -f conftest*
8057 else
8058   cat > conftest.$ac_ext <<EOF
8059 #line 8060 "configure"
8060 #include "confdefs.h"
8061 /* pthread test headers */
8062 #include <pthread.h>
8063 #ifndef NULL
8064 #define NULL (void*)0
8065 #endif
8066
8067 static void *task(p)
8068         void *p;
8069 {
8070         return (void *) (p == NULL);
8071 }
8072
8073
8074 int main(argc, argv)
8075         int argc;
8076         char **argv;
8077 {
8078
8079         /* pthread test function */
8080         pthread_t t;
8081         int status;
8082
8083         /* make sure pthread_create() isn't just a stub */
8084 #if HAVE_PTHREADS_D4
8085         status = pthread_create(&t, pthread_attr_default, task, NULL);
8086 #else
8087         status = pthread_create(&t, NULL, task, NULL);
8088 #endif
8089
8090         if( status ) exit( status );
8091
8092         /* make sure pthread_detach() isn't just a stub */
8093 #if HAVE_PTHREADS_D4
8094         status = pthread_detach( &t );
8095 #else
8096         status = pthread_detach( t );
8097 #endif
8098
8099 #ifdef HAVE_LINUX_THREADS
8100         pthread_kill_other_threads_np();
8101 #endif
8102
8103         exit( status );
8104
8105 }
8106
8107 EOF
8108 if { (eval echo configure:8109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8109 then
8110   ol_cv_pthread_lc_r=yes
8111 else
8112   echo "configure: failed program was:" >&5
8113   cat conftest.$ac_ext >&5
8114   rm -fr conftest*
8115   ol_cv_pthread_lc_r=no
8116 fi
8117 rm -fr conftest*
8118 fi
8119
8120
8121                 # restore the LIBS
8122                 LIBS="$ol_LIBS"
8123         
8124 fi
8125
8126 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
8127
8128         if test $ol_cv_pthread_lc_r = yes ; then
8129                 ol_link_pthreads="-lc_r"
8130                 ol_link_threads=posix
8131         fi
8132 fi
8133
8134
8135                 # Pthread try link: -threads (ol_cv_pthread_threads)
8136 if test "$ol_link_threads" = no ; then
8137         # try -threads
8138         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
8139 echo "configure:8140: checking for pthread link with -threads" >&5
8140 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
8141   echo $ac_n "(cached) $ac_c" 1>&6
8142 else
8143   
8144                 # save the flags
8145                 ol_LIBS="$LIBS"
8146                 LIBS="-threads $LIBS"
8147
8148                 if test "$cross_compiling" = yes; then
8149   cat > conftest.$ac_ext <<EOF
8150 #line 8151 "configure"
8151 #include "confdefs.h"
8152 /* pthread test headers */
8153 #include <pthread.h>
8154 #ifndef NULL
8155 #define NULL (void*)0
8156 #endif
8157
8158 static void *task(p)
8159         void *p;
8160 {
8161         return (void *) (p == NULL);
8162 }
8163
8164 int main() {
8165
8166         /* pthread test function */
8167         pthread_t t;
8168         int status;
8169
8170         /* make sure pthread_create() isn't just a stub */
8171 #if HAVE_PTHREADS_D4
8172         status = pthread_create(&t, pthread_attr_default, task, NULL);
8173 #else
8174         status = pthread_create(&t, NULL, task, NULL);
8175 #endif
8176
8177         if( status ) exit( status );
8178
8179         /* make sure pthread_detach() isn't just a stub */
8180 #if HAVE_PTHREADS_D4
8181         status = pthread_detach( &t );
8182 #else
8183         status = pthread_detach( t );
8184 #endif
8185
8186 #ifdef HAVE_LINUX_THREADS
8187         pthread_kill_other_threads_np();
8188 #endif
8189
8190         exit( status );
8191
8192 ; return 0; }
8193 EOF
8194 if { (eval echo configure:8195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8195   rm -rf conftest*
8196   ol_cv_pthread_threads=yes
8197 else
8198   echo "configure: failed program was:" >&5
8199   cat conftest.$ac_ext >&5
8200   rm -rf conftest*
8201   ol_cv_pthread_threads=no
8202 fi
8203 rm -f conftest*
8204 else
8205   cat > conftest.$ac_ext <<EOF
8206 #line 8207 "configure"
8207 #include "confdefs.h"
8208 /* pthread test headers */
8209 #include <pthread.h>
8210 #ifndef NULL
8211 #define NULL (void*)0
8212 #endif
8213
8214 static void *task(p)
8215         void *p;
8216 {
8217         return (void *) (p == NULL);
8218 }
8219
8220
8221 int main(argc, argv)
8222         int argc;
8223         char **argv;
8224 {
8225
8226         /* pthread test function */
8227         pthread_t t;
8228         int status;
8229
8230         /* make sure pthread_create() isn't just a stub */
8231 #if HAVE_PTHREADS_D4
8232         status = pthread_create(&t, pthread_attr_default, task, NULL);
8233 #else
8234         status = pthread_create(&t, NULL, task, NULL);
8235 #endif
8236
8237         if( status ) exit( status );
8238
8239         /* make sure pthread_detach() isn't just a stub */
8240 #if HAVE_PTHREADS_D4
8241         status = pthread_detach( &t );
8242 #else
8243         status = pthread_detach( t );
8244 #endif
8245
8246 #ifdef HAVE_LINUX_THREADS
8247         pthread_kill_other_threads_np();
8248 #endif
8249
8250         exit( status );
8251
8252 }
8253
8254 EOF
8255 if { (eval echo configure:8256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8256 then
8257   ol_cv_pthread_threads=yes
8258 else
8259   echo "configure: failed program was:" >&5
8260   cat conftest.$ac_ext >&5
8261   rm -fr conftest*
8262   ol_cv_pthread_threads=no
8263 fi
8264 rm -fr conftest*
8265 fi
8266
8267
8268                 # restore the LIBS
8269                 LIBS="$ol_LIBS"
8270         
8271 fi
8272
8273 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
8274
8275         if test $ol_cv_pthread_threads = yes ; then
8276                 ol_link_pthreads="-threads"
8277                 ol_link_threads=posix
8278         fi
8279 fi
8280
8281
8282                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
8283 if test "$ol_link_threads" = no ; then
8284         # try -lpthreads -lmach -lexc -lc_r
8285         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
8286 echo "configure:8287: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
8287 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
8288   echo $ac_n "(cached) $ac_c" 1>&6
8289 else
8290   
8291                 # save the flags
8292                 ol_LIBS="$LIBS"
8293                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
8294
8295                 if test "$cross_compiling" = yes; then
8296   cat > conftest.$ac_ext <<EOF
8297 #line 8298 "configure"
8298 #include "confdefs.h"
8299 /* pthread test headers */
8300 #include <pthread.h>
8301 #ifndef NULL
8302 #define NULL (void*)0
8303 #endif
8304
8305 static void *task(p)
8306         void *p;
8307 {
8308         return (void *) (p == NULL);
8309 }
8310
8311 int main() {
8312
8313         /* pthread test function */
8314         pthread_t t;
8315         int status;
8316
8317         /* make sure pthread_create() isn't just a stub */
8318 #if HAVE_PTHREADS_D4
8319         status = pthread_create(&t, pthread_attr_default, task, NULL);
8320 #else
8321         status = pthread_create(&t, NULL, task, NULL);
8322 #endif
8323
8324         if( status ) exit( status );
8325
8326         /* make sure pthread_detach() isn't just a stub */
8327 #if HAVE_PTHREADS_D4
8328         status = pthread_detach( &t );
8329 #else
8330         status = pthread_detach( t );
8331 #endif
8332
8333 #ifdef HAVE_LINUX_THREADS
8334         pthread_kill_other_threads_np();
8335 #endif
8336
8337         exit( status );
8338
8339 ; return 0; }
8340 EOF
8341 if { (eval echo configure:8342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8342   rm -rf conftest*
8343   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8344 else
8345   echo "configure: failed program was:" >&5
8346   cat conftest.$ac_ext >&5
8347   rm -rf conftest*
8348   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8349 fi
8350 rm -f conftest*
8351 else
8352   cat > conftest.$ac_ext <<EOF
8353 #line 8354 "configure"
8354 #include "confdefs.h"
8355 /* pthread test headers */
8356 #include <pthread.h>
8357 #ifndef NULL
8358 #define NULL (void*)0
8359 #endif
8360
8361 static void *task(p)
8362         void *p;
8363 {
8364         return (void *) (p == NULL);
8365 }
8366
8367
8368 int main(argc, argv)
8369         int argc;
8370         char **argv;
8371 {
8372
8373         /* pthread test function */
8374         pthread_t t;
8375         int status;
8376
8377         /* make sure pthread_create() isn't just a stub */
8378 #if HAVE_PTHREADS_D4
8379         status = pthread_create(&t, pthread_attr_default, task, NULL);
8380 #else
8381         status = pthread_create(&t, NULL, task, NULL);
8382 #endif
8383
8384         if( status ) exit( status );
8385
8386         /* make sure pthread_detach() isn't just a stub */
8387 #if HAVE_PTHREADS_D4
8388         status = pthread_detach( &t );
8389 #else
8390         status = pthread_detach( t );
8391 #endif
8392
8393 #ifdef HAVE_LINUX_THREADS
8394         pthread_kill_other_threads_np();
8395 #endif
8396
8397         exit( status );
8398
8399 }
8400
8401 EOF
8402 if { (eval echo configure:8403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8403 then
8404   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
8405 else
8406   echo "configure: failed program was:" >&5
8407   cat conftest.$ac_ext >&5
8408   rm -fr conftest*
8409   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
8410 fi
8411 rm -fr conftest*
8412 fi
8413
8414
8415                 # restore the LIBS
8416                 LIBS="$ol_LIBS"
8417         
8418 fi
8419
8420 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
8421
8422         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
8423                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
8424                 ol_link_threads=posix
8425         fi
8426 fi
8427
8428                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
8429 if test "$ol_link_threads" = no ; then
8430         # try -lpthreads -lmach -lexc
8431         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
8432 echo "configure:8433: checking for pthread link with -lpthreads -lmach -lexc" >&5
8433 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
8434   echo $ac_n "(cached) $ac_c" 1>&6
8435 else
8436   
8437                 # save the flags
8438                 ol_LIBS="$LIBS"
8439                 LIBS="-lpthreads -lmach -lexc $LIBS"
8440
8441                 if test "$cross_compiling" = yes; then
8442   cat > conftest.$ac_ext <<EOF
8443 #line 8444 "configure"
8444 #include "confdefs.h"
8445 /* pthread test headers */
8446 #include <pthread.h>
8447 #ifndef NULL
8448 #define NULL (void*)0
8449 #endif
8450
8451 static void *task(p)
8452         void *p;
8453 {
8454         return (void *) (p == NULL);
8455 }
8456
8457 int main() {
8458
8459         /* pthread test function */
8460         pthread_t t;
8461         int status;
8462
8463         /* make sure pthread_create() isn't just a stub */
8464 #if HAVE_PTHREADS_D4
8465         status = pthread_create(&t, pthread_attr_default, task, NULL);
8466 #else
8467         status = pthread_create(&t, NULL, task, NULL);
8468 #endif
8469
8470         if( status ) exit( status );
8471
8472         /* make sure pthread_detach() isn't just a stub */
8473 #if HAVE_PTHREADS_D4
8474         status = pthread_detach( &t );
8475 #else
8476         status = pthread_detach( t );
8477 #endif
8478
8479 #ifdef HAVE_LINUX_THREADS
8480         pthread_kill_other_threads_np();
8481 #endif
8482
8483         exit( status );
8484
8485 ; return 0; }
8486 EOF
8487 if { (eval echo configure:8488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8488   rm -rf conftest*
8489   ol_cv_pthread_lpthreads_lmach_lexc=yes
8490 else
8491   echo "configure: failed program was:" >&5
8492   cat conftest.$ac_ext >&5
8493   rm -rf conftest*
8494   ol_cv_pthread_lpthreads_lmach_lexc=no
8495 fi
8496 rm -f conftest*
8497 else
8498   cat > conftest.$ac_ext <<EOF
8499 #line 8500 "configure"
8500 #include "confdefs.h"
8501 /* pthread test headers */
8502 #include <pthread.h>
8503 #ifndef NULL
8504 #define NULL (void*)0
8505 #endif
8506
8507 static void *task(p)
8508         void *p;
8509 {
8510         return (void *) (p == NULL);
8511 }
8512
8513
8514 int main(argc, argv)
8515         int argc;
8516         char **argv;
8517 {
8518
8519         /* pthread test function */
8520         pthread_t t;
8521         int status;
8522
8523         /* make sure pthread_create() isn't just a stub */
8524 #if HAVE_PTHREADS_D4
8525         status = pthread_create(&t, pthread_attr_default, task, NULL);
8526 #else
8527         status = pthread_create(&t, NULL, task, NULL);
8528 #endif
8529
8530         if( status ) exit( status );
8531
8532         /* make sure pthread_detach() isn't just a stub */
8533 #if HAVE_PTHREADS_D4
8534         status = pthread_detach( &t );
8535 #else
8536         status = pthread_detach( t );
8537 #endif
8538
8539 #ifdef HAVE_LINUX_THREADS
8540         pthread_kill_other_threads_np();
8541 #endif
8542
8543         exit( status );
8544
8545 }
8546
8547 EOF
8548 if { (eval echo configure:8549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8549 then
8550   ol_cv_pthread_lpthreads_lmach_lexc=yes
8551 else
8552   echo "configure: failed program was:" >&5
8553   cat conftest.$ac_ext >&5
8554   rm -fr conftest*
8555   ol_cv_pthread_lpthreads_lmach_lexc=no
8556 fi
8557 rm -fr conftest*
8558 fi
8559
8560
8561                 # restore the LIBS
8562                 LIBS="$ol_LIBS"
8563         
8564 fi
8565
8566 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
8567
8568         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
8569                 ol_link_pthreads="-lpthreads -lmach -lexc"
8570                 ol_link_threads=posix
8571         fi
8572 fi
8573
8574                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
8575 if test "$ol_link_threads" = no ; then
8576         # try -lpthreads -lexc
8577         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
8578 echo "configure:8579: checking for pthread link with -lpthreads -lexc" >&5
8579 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
8580   echo $ac_n "(cached) $ac_c" 1>&6
8581 else
8582   
8583                 # save the flags
8584                 ol_LIBS="$LIBS"
8585                 LIBS="-lpthreads -lexc $LIBS"
8586
8587                 if test "$cross_compiling" = yes; then
8588   cat > conftest.$ac_ext <<EOF
8589 #line 8590 "configure"
8590 #include "confdefs.h"
8591 /* pthread test headers */
8592 #include <pthread.h>
8593 #ifndef NULL
8594 #define NULL (void*)0
8595 #endif
8596
8597 static void *task(p)
8598         void *p;
8599 {
8600         return (void *) (p == NULL);
8601 }
8602
8603 int main() {
8604
8605         /* pthread test function */
8606         pthread_t t;
8607         int status;
8608
8609         /* make sure pthread_create() isn't just a stub */
8610 #if HAVE_PTHREADS_D4
8611         status = pthread_create(&t, pthread_attr_default, task, NULL);
8612 #else
8613         status = pthread_create(&t, NULL, task, NULL);
8614 #endif
8615
8616         if( status ) exit( status );
8617
8618         /* make sure pthread_detach() isn't just a stub */
8619 #if HAVE_PTHREADS_D4
8620         status = pthread_detach( &t );
8621 #else
8622         status = pthread_detach( t );
8623 #endif
8624
8625 #ifdef HAVE_LINUX_THREADS
8626         pthread_kill_other_threads_np();
8627 #endif
8628
8629         exit( status );
8630
8631 ; return 0; }
8632 EOF
8633 if { (eval echo configure:8634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8634   rm -rf conftest*
8635   ol_cv_pthread_lpthreads_lexc=yes
8636 else
8637   echo "configure: failed program was:" >&5
8638   cat conftest.$ac_ext >&5
8639   rm -rf conftest*
8640   ol_cv_pthread_lpthreads_lexc=no
8641 fi
8642 rm -f conftest*
8643 else
8644   cat > conftest.$ac_ext <<EOF
8645 #line 8646 "configure"
8646 #include "confdefs.h"
8647 /* pthread test headers */
8648 #include <pthread.h>
8649 #ifndef NULL
8650 #define NULL (void*)0
8651 #endif
8652
8653 static void *task(p)
8654         void *p;
8655 {
8656         return (void *) (p == NULL);
8657 }
8658
8659
8660 int main(argc, argv)
8661         int argc;
8662         char **argv;
8663 {
8664
8665         /* pthread test function */
8666         pthread_t t;
8667         int status;
8668
8669         /* make sure pthread_create() isn't just a stub */
8670 #if HAVE_PTHREADS_D4
8671         status = pthread_create(&t, pthread_attr_default, task, NULL);
8672 #else
8673         status = pthread_create(&t, NULL, task, NULL);
8674 #endif
8675
8676         if( status ) exit( status );
8677
8678         /* make sure pthread_detach() isn't just a stub */
8679 #if HAVE_PTHREADS_D4
8680         status = pthread_detach( &t );
8681 #else
8682         status = pthread_detach( t );
8683 #endif
8684
8685 #ifdef HAVE_LINUX_THREADS
8686         pthread_kill_other_threads_np();
8687 #endif
8688
8689         exit( status );
8690
8691 }
8692
8693 EOF
8694 if { (eval echo configure:8695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8695 then
8696   ol_cv_pthread_lpthreads_lexc=yes
8697 else
8698   echo "configure: failed program was:" >&5
8699   cat conftest.$ac_ext >&5
8700   rm -fr conftest*
8701   ol_cv_pthread_lpthreads_lexc=no
8702 fi
8703 rm -fr conftest*
8704 fi
8705
8706
8707                 # restore the LIBS
8708                 LIBS="$ol_LIBS"
8709         
8710 fi
8711
8712 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
8713
8714         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
8715                 ol_link_pthreads="-lpthreads -lexc"
8716                 ol_link_threads=posix
8717         fi
8718 fi
8719
8720
8721                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
8722 if test "$ol_link_threads" = no ; then
8723         # try -lpthreads
8724         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
8725 echo "configure:8726: checking for pthread link with -lpthreads" >&5
8726 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
8727   echo $ac_n "(cached) $ac_c" 1>&6
8728 else
8729   
8730                 # save the flags
8731                 ol_LIBS="$LIBS"
8732                 LIBS="-lpthreads $LIBS"
8733
8734                 if test "$cross_compiling" = yes; then
8735   cat > conftest.$ac_ext <<EOF
8736 #line 8737 "configure"
8737 #include "confdefs.h"
8738 /* pthread test headers */
8739 #include <pthread.h>
8740 #ifndef NULL
8741 #define NULL (void*)0
8742 #endif
8743
8744 static void *task(p)
8745         void *p;
8746 {
8747         return (void *) (p == NULL);
8748 }
8749
8750 int main() {
8751
8752         /* pthread test function */
8753         pthread_t t;
8754         int status;
8755
8756         /* make sure pthread_create() isn't just a stub */
8757 #if HAVE_PTHREADS_D4
8758         status = pthread_create(&t, pthread_attr_default, task, NULL);
8759 #else
8760         status = pthread_create(&t, NULL, task, NULL);
8761 #endif
8762
8763         if( status ) exit( status );
8764
8765         /* make sure pthread_detach() isn't just a stub */
8766 #if HAVE_PTHREADS_D4
8767         status = pthread_detach( &t );
8768 #else
8769         status = pthread_detach( t );
8770 #endif
8771
8772 #ifdef HAVE_LINUX_THREADS
8773         pthread_kill_other_threads_np();
8774 #endif
8775
8776         exit( status );
8777
8778 ; return 0; }
8779 EOF
8780 if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8781   rm -rf conftest*
8782   ol_cv_pthread_lib_lpthreads=yes
8783 else
8784   echo "configure: failed program was:" >&5
8785   cat conftest.$ac_ext >&5
8786   rm -rf conftest*
8787   ol_cv_pthread_lib_lpthreads=no
8788 fi
8789 rm -f conftest*
8790 else
8791   cat > conftest.$ac_ext <<EOF
8792 #line 8793 "configure"
8793 #include "confdefs.h"
8794 /* pthread test headers */
8795 #include <pthread.h>
8796 #ifndef NULL
8797 #define NULL (void*)0
8798 #endif
8799
8800 static void *task(p)
8801         void *p;
8802 {
8803         return (void *) (p == NULL);
8804 }
8805
8806
8807 int main(argc, argv)
8808         int argc;
8809         char **argv;
8810 {
8811
8812         /* pthread test function */
8813         pthread_t t;
8814         int status;
8815
8816         /* make sure pthread_create() isn't just a stub */
8817 #if HAVE_PTHREADS_D4
8818         status = pthread_create(&t, pthread_attr_default, task, NULL);
8819 #else
8820         status = pthread_create(&t, NULL, task, NULL);
8821 #endif
8822
8823         if( status ) exit( status );
8824
8825         /* make sure pthread_detach() isn't just a stub */
8826 #if HAVE_PTHREADS_D4
8827         status = pthread_detach( &t );
8828 #else
8829         status = pthread_detach( t );
8830 #endif
8831
8832 #ifdef HAVE_LINUX_THREADS
8833         pthread_kill_other_threads_np();
8834 #endif
8835
8836         exit( status );
8837
8838 }
8839
8840 EOF
8841 if { (eval echo configure:8842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8842 then
8843   ol_cv_pthread_lib_lpthreads=yes
8844 else
8845   echo "configure: failed program was:" >&5
8846   cat conftest.$ac_ext >&5
8847   rm -fr conftest*
8848   ol_cv_pthread_lib_lpthreads=no
8849 fi
8850 rm -fr conftest*
8851 fi
8852
8853
8854                 # restore the LIBS
8855                 LIBS="$ol_LIBS"
8856         
8857 fi
8858
8859 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
8860
8861         if test $ol_cv_pthread_lib_lpthreads = yes ; then
8862                 ol_link_pthreads="-lpthreads"
8863                 ol_link_threads=posix
8864         fi
8865 fi
8866
8867
8868                 if test $ol_link_threads != no ; then
8869                         cat >> confdefs.h <<\EOF
8870 #define HAVE_PTHREADS 1
8871 EOF
8872
8873
8874                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
8875
8876                                                 save_CPPFLAGS="$CPPFLAGS"
8877                         save_LIBS="$LIBS"
8878                         LIBS="$LTHREAD_LIBS $LIBS"
8879
8880                                                                                                 for ac_func in sched_yield pthread_yield
8881 do
8882 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8883 echo "configure:8884: checking for $ac_func" >&5
8884 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8885   echo $ac_n "(cached) $ac_c" 1>&6
8886 else
8887   cat > conftest.$ac_ext <<EOF
8888 #line 8889 "configure"
8889 #include "confdefs.h"
8890 /* System header to define __stub macros and hopefully few prototypes,
8891     which can conflict with char $ac_func(); below.  */
8892 #include <assert.h>
8893 /* Override any gcc2 internal prototype to avoid an error.  */
8894 /* We use char because int might match the return type of a gcc2
8895     builtin and then its argument prototype would still apply.  */
8896 char $ac_func();
8897 char (*f)();
8898
8899 int main() {
8900
8901 /* The GNU C library defines this for functions which it implements
8902     to always fail with ENOSYS.  Some functions are actually named
8903     something starting with __ and the normal name is an alias.  */
8904 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8905 choke me
8906 #else
8907 f = $ac_func;
8908 #endif
8909
8910 ; return 0; }
8911 EOF
8912 if { (eval echo configure:8913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8913   rm -rf conftest*
8914   eval "ac_cv_func_$ac_func=yes"
8915 else
8916   echo "configure: failed program was:" >&5
8917   cat conftest.$ac_ext >&5
8918   rm -rf conftest*
8919   eval "ac_cv_func_$ac_func=no"
8920 fi
8921 rm -f conftest*
8922 fi
8923
8924 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8925   echo "$ac_t""yes" 1>&6
8926     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8927   cat >> confdefs.h <<EOF
8928 #define $ac_tr_func 1
8929 EOF
8930  
8931 else
8932   echo "$ac_t""no" 1>&6
8933 fi
8934 done
8935
8936
8937                         if test $ac_cv_func_sched_yield = no -a \
8938                                 $ac_cv_func_pthread_yield = no ; then
8939                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
8940 echo "configure:8941: checking for sched_yield in -lrt" >&5
8941 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
8942 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8943   echo $ac_n "(cached) $ac_c" 1>&6
8944 else
8945   ac_save_LIBS="$LIBS"
8946 LIBS="-lrt  $LIBS"
8947 cat > conftest.$ac_ext <<EOF
8948 #line 8949 "configure"
8949 #include "confdefs.h"
8950 /* Override any gcc2 internal prototype to avoid an error.  */
8951 /* We use char because int might match the return type of a gcc2
8952     builtin and then its argument prototype would still apply.  */
8953 char sched_yield();
8954
8955 int main() {
8956 sched_yield()
8957 ; return 0; }
8958 EOF
8959 if { (eval echo configure:8960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8960   rm -rf conftest*
8961   eval "ac_cv_lib_$ac_lib_var=yes"
8962 else
8963   echo "configure: failed program was:" >&5
8964   cat conftest.$ac_ext >&5
8965   rm -rf conftest*
8966   eval "ac_cv_lib_$ac_lib_var=no"
8967 fi
8968 rm -f conftest*
8969 LIBS="$ac_save_LIBS"
8970
8971 fi
8972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8973   echo "$ac_t""yes" 1>&6
8974   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
8975                                         cat >> confdefs.h <<\EOF
8976 #define HAVE_SCHED_YIELD 1
8977 EOF
8978
8979                                         ac_cv_func_sched_yield=yes
8980 else
8981   echo "$ac_t""no" 1>&6
8982 ac_cv_func_sched_yield=no
8983 fi
8984
8985                         fi
8986                         if test $ac_cv_func_sched_yield = no -a \
8987                                 $ac_cv_func_pthread_yield = no ; then
8988                                                                                                 for ac_func in thr_yield
8989 do
8990 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8991 echo "configure:8992: checking for $ac_func" >&5
8992 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8993   echo $ac_n "(cached) $ac_c" 1>&6
8994 else
8995   cat > conftest.$ac_ext <<EOF
8996 #line 8997 "configure"
8997 #include "confdefs.h"
8998 /* System header to define __stub macros and hopefully few prototypes,
8999     which can conflict with char $ac_func(); below.  */
9000 #include <assert.h>
9001 /* Override any gcc2 internal prototype to avoid an error.  */
9002 /* We use char because int might match the return type of a gcc2
9003     builtin and then its argument prototype would still apply.  */
9004 char $ac_func();
9005 char (*f)();
9006
9007 int main() {
9008
9009 /* The GNU C library defines this for functions which it implements
9010     to always fail with ENOSYS.  Some functions are actually named
9011     something starting with __ and the normal name is an alias.  */
9012 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9013 choke me
9014 #else
9015 f = $ac_func;
9016 #endif
9017
9018 ; return 0; }
9019 EOF
9020 if { (eval echo configure:9021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9021   rm -rf conftest*
9022   eval "ac_cv_func_$ac_func=yes"
9023 else
9024   echo "configure: failed program was:" >&5
9025   cat conftest.$ac_ext >&5
9026   rm -rf conftest*
9027   eval "ac_cv_func_$ac_func=no"
9028 fi
9029 rm -f conftest*
9030 fi
9031
9032 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9033   echo "$ac_t""yes" 1>&6
9034     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9035   cat >> confdefs.h <<EOF
9036 #define $ac_tr_func 1
9037 EOF
9038  
9039 else
9040   echo "$ac_t""no" 1>&6
9041 fi
9042 done
9043
9044                         fi
9045                         if test $ac_cv_func_sched_yield = no -a \
9046                                 $ac_cv_func_pthread_yield = no -a \
9047                                 "$ac_cv_func_thr_yield" = no ; then
9048                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
9049                         fi
9050
9051                                                 for ac_func in pthread_kill
9052 do
9053 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9054 echo "configure:9055: checking for $ac_func" >&5
9055 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9056   echo $ac_n "(cached) $ac_c" 1>&6
9057 else
9058   cat > conftest.$ac_ext <<EOF
9059 #line 9060 "configure"
9060 #include "confdefs.h"
9061 /* System header to define __stub macros and hopefully few prototypes,
9062     which can conflict with char $ac_func(); below.  */
9063 #include <assert.h>
9064 /* Override any gcc2 internal prototype to avoid an error.  */
9065 /* We use char because int might match the return type of a gcc2
9066     builtin and then its argument prototype would still apply.  */
9067 char $ac_func();
9068 char (*f)();
9069
9070 int main() {
9071
9072 /* The GNU C library defines this for functions which it implements
9073     to always fail with ENOSYS.  Some functions are actually named
9074     something starting with __ and the normal name is an alias.  */
9075 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9076 choke me
9077 #else
9078 f = $ac_func;
9079 #endif
9080
9081 ; return 0; }
9082 EOF
9083 if { (eval echo configure:9084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9084   rm -rf conftest*
9085   eval "ac_cv_func_$ac_func=yes"
9086 else
9087   echo "configure: failed program was:" >&5
9088   cat conftest.$ac_ext >&5
9089   rm -rf conftest*
9090   eval "ac_cv_func_$ac_func=no"
9091 fi
9092 rm -f conftest*
9093 fi
9094
9095 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9096   echo "$ac_t""yes" 1>&6
9097     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9098   cat >> confdefs.h <<EOF
9099 #define $ac_tr_func 1
9100 EOF
9101  
9102 else
9103   echo "$ac_t""no" 1>&6
9104 fi
9105 done
9106
9107
9108                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
9109 echo "configure:9110: checking for pthread_detach with <pthread.h>" >&5
9110 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
9111   echo $ac_n "(cached) $ac_c" 1>&6
9112 else
9113   
9114                                                                 cat > conftest.$ac_ext <<EOF
9115 #line 9116 "configure"
9116 #include "confdefs.h"
9117
9118 #include <pthread.h>
9119 #ifndef NULL
9120 #define NULL (void*)0
9121 #endif
9122
9123 int main() {
9124 pthread_detach(NULL);
9125 ; return 0; }
9126 EOF
9127 if { (eval echo configure:9128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9128   rm -rf conftest*
9129   ol_cv_func_pthread_detach=yes
9130 else
9131   echo "configure: failed program was:" >&5
9132   cat conftest.$ac_ext >&5
9133   rm -rf conftest*
9134   ol_cv_func_pthread_detach=no
9135 fi
9136 rm -f conftest*
9137                         
9138 fi
9139
9140 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
9141
9142                         if test $ol_cv_func_pthread_detach = no ; then
9143                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
9144                         fi
9145
9146                         cat >> confdefs.h <<\EOF
9147 #define HAVE_PTHREAD_DETACH 1
9148 EOF
9149
9150
9151                                                 for ac_func in \
9152                                 pthread_setconcurrency \
9153                                 pthread_getconcurrency \
9154                                 thr_setconcurrency \
9155                                 thr_getconcurrency \
9156                         
9157 do
9158 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9159 echo "configure:9160: checking for $ac_func" >&5
9160 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9161   echo $ac_n "(cached) $ac_c" 1>&6
9162 else
9163   cat > conftest.$ac_ext <<EOF
9164 #line 9165 "configure"
9165 #include "confdefs.h"
9166 /* System header to define __stub macros and hopefully few prototypes,
9167     which can conflict with char $ac_func(); below.  */
9168 #include <assert.h>
9169 /* Override any gcc2 internal prototype to avoid an error.  */
9170 /* We use char because int might match the return type of a gcc2
9171     builtin and then its argument prototype would still apply.  */
9172 char $ac_func();
9173 char (*f)();
9174
9175 int main() {
9176
9177 /* The GNU C library defines this for functions which it implements
9178     to always fail with ENOSYS.  Some functions are actually named
9179     something starting with __ and the normal name is an alias.  */
9180 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9181 choke me
9182 #else
9183 f = $ac_func;
9184 #endif
9185
9186 ; return 0; }
9187 EOF
9188 if { (eval echo configure:9189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9189   rm -rf conftest*
9190   eval "ac_cv_func_$ac_func=yes"
9191 else
9192   echo "configure: failed program was:" >&5
9193   cat conftest.$ac_ext >&5
9194   rm -rf conftest*
9195   eval "ac_cv_func_$ac_func=no"
9196 fi
9197 rm -f conftest*
9198 fi
9199
9200 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9201   echo "$ac_t""yes" 1>&6
9202     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9203   cat >> confdefs.h <<EOF
9204 #define $ac_tr_func 1
9205 EOF
9206  
9207 else
9208   echo "$ac_t""no" 1>&6
9209 fi
9210 done
9211
9212
9213                         
9214         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
9215 echo "configure:9216: checking for pthread_kill_other_threads_np" >&5
9216 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
9217   echo $ac_n "(cached) $ac_c" 1>&6
9218 else
9219   cat > conftest.$ac_ext <<EOF
9220 #line 9221 "configure"
9221 #include "confdefs.h"
9222 /* System header to define __stub macros and hopefully few prototypes,
9223     which can conflict with char pthread_kill_other_threads_np(); below.  */
9224 #include <assert.h>
9225 /* Override any gcc2 internal prototype to avoid an error.  */
9226 /* We use char because int might match the return type of a gcc2
9227     builtin and then its argument prototype would still apply.  */
9228 char pthread_kill_other_threads_np();
9229 char (*f)();
9230
9231 int main() {
9232
9233 /* The GNU C library defines this for functions which it implements
9234     to always fail with ENOSYS.  Some functions are actually named
9235     something starting with __ and the normal name is an alias.  */
9236 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
9237 choke me
9238 #else
9239 f = pthread_kill_other_threads_np;
9240 #endif
9241
9242 ; return 0; }
9243 EOF
9244 if { (eval echo configure:9245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9245   rm -rf conftest*
9246   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
9247 else
9248   echo "configure: failed program was:" >&5
9249   cat conftest.$ac_ext >&5
9250   rm -rf conftest*
9251   eval "ac_cv_func_pthread_kill_other_threads_np=no"
9252 fi
9253 rm -f conftest*
9254 fi
9255
9256 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
9257   echo "$ac_t""yes" 1>&6
9258   :
9259 else
9260   echo "$ac_t""no" 1>&6
9261 fi
9262
9263         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
9264 echo "configure:9265: checking for LinuxThreads implementation" >&5
9265 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
9266   echo $ac_n "(cached) $ac_c" 1>&6
9267 else
9268   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
9269 fi
9270
9271 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
9272
9273                         
9274         
9275         
9276         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
9277 echo "configure:9278: checking for LinuxThreads consistency" >&5
9278 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
9279   echo $ac_n "(cached) $ac_c" 1>&6
9280 else
9281   
9282                 if test $ol_cv_header_linux_threads = yes -a \
9283                         $ol_cv_sys_linux_threads = yes; then
9284                         ol_cv_linux_threads=yes
9285                 elif test $ol_cv_header_linux_threads = no -a \
9286                         $ol_cv_sys_linux_threads = no; then
9287                         ol_cv_linux_threads=no
9288                 else
9289                         ol_cv_linux_threads=error
9290                 fi
9291         
9292 fi
9293
9294 echo "$ac_t""$ol_cv_linux_threads" 1>&6
9295
9296
9297                         if test $ol_cv_linux_threads = error; then
9298                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
9299                         fi
9300
9301                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
9302 echo "configure:9303: checking if pthread_create() works" >&5
9303 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
9304   echo $ac_n "(cached) $ac_c" 1>&6
9305 else
9306   
9307                         if test "$cross_compiling" = yes; then
9308                                 ol_cv_pthread_create_works=yes
9309 else
9310   cat > conftest.$ac_ext <<EOF
9311 #line 9312 "configure"
9312 #include "confdefs.h"
9313 /* pthread test headers */
9314 #include <pthread.h>
9315 #ifndef NULL
9316 #define NULL (void*)0
9317 #endif
9318
9319 static void *task(p)
9320         void *p;
9321 {
9322         return (void *) (p == NULL);
9323 }
9324
9325
9326 int main(argc, argv)
9327         int argc;
9328         char **argv;
9329 {
9330
9331         /* pthread test function */
9332         pthread_t t;
9333         int status;
9334
9335         /* make sure pthread_create() isn't just a stub */
9336 #if HAVE_PTHREADS_D4
9337         status = pthread_create(&t, pthread_attr_default, task, NULL);
9338 #else
9339         status = pthread_create(&t, NULL, task, NULL);
9340 #endif
9341
9342         if( status ) exit( status );
9343
9344         /* make sure pthread_detach() isn't just a stub */
9345 #if HAVE_PTHREADS_D4
9346         status = pthread_detach( &t );
9347 #else
9348         status = pthread_detach( t );
9349 #endif
9350
9351 #ifdef HAVE_LINUX_THREADS
9352         pthread_kill_other_threads_np();
9353 #endif
9354
9355         exit( status );
9356
9357 }
9358
9359 EOF
9360 if { (eval echo configure:9361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9361 then
9362   ol_cv_pthread_create_works=yes
9363 else
9364   echo "configure: failed program was:" >&5
9365   cat conftest.$ac_ext >&5
9366   rm -fr conftest*
9367   ol_cv_pthread_create_works=no
9368 fi
9369 rm -fr conftest*
9370 fi
9371
9372 fi
9373
9374 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
9375
9376                         if test $ol_cv_pthread_create_works = no ; then
9377                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
9378                         fi
9379
9380                                                 if test $ol_with_yielding_select = auto ; then
9381                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
9382 echo "configure:9383: checking if select yields when using pthreads" >&5
9383 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
9384   echo $ac_n "(cached) $ac_c" 1>&6
9385 else
9386   
9387                                 if test "$cross_compiling" = yes; then
9388   ol_cv_pthread_select_yields=cross
9389 else
9390   cat > conftest.$ac_ext <<EOF
9391 #line 9392 "configure"
9392 #include "confdefs.h"
9393
9394 #include <sys/types.h>
9395 #include <sys/time.h>
9396 #include <unistd.h>
9397 #include <pthread.h>
9398 #ifndef NULL
9399 #define NULL (void*) 0
9400 #endif
9401
9402 static int fildes[2];
9403
9404 static void *task(p)
9405         void *p;
9406 {
9407         int i;
9408         struct timeval tv;
9409
9410         fd_set rfds;
9411
9412         tv.tv_sec=10;
9413         tv.tv_usec=0;
9414
9415         FD_ZERO(&rfds);
9416         FD_SET(fildes[0], &rfds);
9417
9418         /* we're not interested in any fds */
9419         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
9420
9421         if(i < 0) {
9422                 perror("select");
9423                 exit(10);
9424         }
9425
9426         exit(0); /* if we exit here, the select blocked the whole process */
9427 }
9428
9429 int main(argc, argv)
9430         int argc;
9431         char **argv;
9432 {
9433         pthread_t t;
9434
9435         /* create a pipe to select */
9436         if(pipe(&fildes[0])) {
9437                 perror("select");
9438                 exit(1);
9439         }
9440
9441 #ifdef HAVE_PTHREAD_SETCONCURRENCY
9442         (void) pthread_setconcurrency(2);
9443 #else
9444 #ifdef HAVE_THR_SETCONCURRENCY
9445         /* Set Solaris LWP concurrency to 2 */
9446         thr_setconcurrency(2);
9447 #endif
9448 #endif
9449
9450 #if HAVE_PTHREADS_D4
9451         pthread_create(&t, pthread_attr_default, task, NULL);
9452 #else
9453         pthread_create(&t, NULL, task, NULL);
9454 #endif
9455
9456 #if HAVE_SCHED_YIELD
9457         sched_yield();  /* make sure task runs first */
9458 #else
9459 #ifdef HAVE_PTHREAD_YIELD
9460         pthread_yield();        /* make sure task runs first */
9461 #endif
9462 #endif
9463
9464         exit(2);
9465 }
9466 EOF
9467 if { (eval echo configure:9468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9468 then
9469   ol_cv_pthread_select_yields=no
9470 else
9471   echo "configure: failed program was:" >&5
9472   cat conftest.$ac_ext >&5
9473   rm -fr conftest*
9474   ol_cv_pthread_select_yields=yes
9475 fi
9476 rm -fr conftest*
9477 fi
9478
9479 fi
9480
9481 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
9482
9483                                 if test $ol_cv_pthread_select_yields = cross ; then
9484                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
9485                                 fi
9486
9487                                 if test $ol_cv_pthread_select_yields = yes ; then
9488                                         ol_with_yielding_select=yes
9489                                 fi
9490                         fi
9491
9492                                                 CPPFLAGS="$save_CPPFLAGS"
9493                         LIBS="$save_LIBS"
9494                 else
9495                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
9496                 fi
9497         fi
9498
9499         if test $ol_with_threads = posix ; then
9500                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
9501         fi
9502 fi
9503
9504 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9505         -o $ol_with_threads = mach ; then
9506
9507                 for ac_hdr in mach/cthreads.h
9508 do
9509 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9510 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9511 echo "configure:9512: checking for $ac_hdr" >&5
9512 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9513   echo $ac_n "(cached) $ac_c" 1>&6
9514 else
9515   cat > conftest.$ac_ext <<EOF
9516 #line 9517 "configure"
9517 #include "confdefs.h"
9518 #include <$ac_hdr>
9519 EOF
9520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9521 { (eval echo configure:9522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9523 if test -z "$ac_err"; then
9524   rm -rf conftest*
9525   eval "ac_cv_header_$ac_safe=yes"
9526 else
9527   echo "$ac_err" >&5
9528   echo "configure: failed program was:" >&5
9529   cat conftest.$ac_ext >&5
9530   rm -rf conftest*
9531   eval "ac_cv_header_$ac_safe=no"
9532 fi
9533 rm -f conftest*
9534 fi
9535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9536   echo "$ac_t""yes" 1>&6
9537     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9538   cat >> confdefs.h <<EOF
9539 #define $ac_tr_hdr 1
9540 EOF
9541  
9542 else
9543   echo "$ac_t""no" 1>&6
9544 fi
9545 done
9546
9547         if test $ac_cv_header_mach_cthreads_h = yes ; then
9548                 ol_with_threads=found
9549
9550                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
9551 echo "configure:9552: checking for cthread_fork" >&5
9552 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
9553   echo $ac_n "(cached) $ac_c" 1>&6
9554 else
9555   cat > conftest.$ac_ext <<EOF
9556 #line 9557 "configure"
9557 #include "confdefs.h"
9558 /* System header to define __stub macros and hopefully few prototypes,
9559     which can conflict with char cthread_fork(); below.  */
9560 #include <assert.h>
9561 /* Override any gcc2 internal prototype to avoid an error.  */
9562 /* We use char because int might match the return type of a gcc2
9563     builtin and then its argument prototype would still apply.  */
9564 char cthread_fork();
9565 char (*f)();
9566
9567 int main() {
9568
9569 /* The GNU C library defines this for functions which it implements
9570     to always fail with ENOSYS.  Some functions are actually named
9571     something starting with __ and the normal name is an alias.  */
9572 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
9573 choke me
9574 #else
9575 f = cthread_fork;
9576 #endif
9577
9578 ; return 0; }
9579 EOF
9580 if { (eval echo configure:9581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9581   rm -rf conftest*
9582   eval "ac_cv_func_cthread_fork=yes"
9583 else
9584   echo "configure: failed program was:" >&5
9585   cat conftest.$ac_ext >&5
9586   rm -rf conftest*
9587   eval "ac_cv_func_cthread_fork=no"
9588 fi
9589 rm -f conftest*
9590 fi
9591
9592 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
9593   echo "$ac_t""yes" 1>&6
9594   ol_link_threads=yes
9595 else
9596   echo "$ac_t""no" 1>&6
9597 fi
9598
9599
9600                 if test $ol_link_threads = no ; then
9601                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
9602 echo "configure:9603: checking for cthread_fork with -all_load" >&5
9603 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
9604   echo $ac_n "(cached) $ac_c" 1>&6
9605 else
9606   
9607                                                                 save_LIBS="$LIBS"
9608                                 LIBS="-all_load $LIBS"
9609                                 cat > conftest.$ac_ext <<EOF
9610 #line 9611 "configure"
9611 #include "confdefs.h"
9612 #include <mach/cthreads.h>
9613 int main() {
9614
9615                                         cthread_fork((void *)0, (void *)0);
9616                                         
9617 ; return 0; }
9618 EOF
9619 if { (eval echo configure:9620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9620   rm -rf conftest*
9621   ol_cv_cthread_all_load=yes
9622 else
9623   echo "configure: failed program was:" >&5
9624   cat conftest.$ac_ext >&5
9625   rm -rf conftest*
9626   ol_cv_cthread_all_load=no
9627 fi
9628 rm -f conftest*
9629                                                                 LIBS="$save_LIBS"
9630                         
9631 fi
9632
9633 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
9634
9635                         if test $ol_cv_cthread_all_load = yes ; then
9636                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
9637                                 ol_link_threads=mach
9638                         fi
9639                 fi
9640
9641                 if test $ol_link_threads != no ; then
9642                         : check for cthread specific functionality here
9643                         cat >> confdefs.h <<\EOF
9644 #define HAVE_MACH_CTHREADS 1
9645 EOF
9646
9647                 else
9648                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
9649                 fi
9650         fi
9651
9652         if test $ol_with_threads = mach ; then
9653                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
9654         fi
9655 fi
9656
9657 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9658         -o $ol_with_threads = pth ; then
9659
9660         for ac_hdr in pth.h
9661 do
9662 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9663 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9664 echo "configure:9665: checking for $ac_hdr" >&5
9665 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9666   echo $ac_n "(cached) $ac_c" 1>&6
9667 else
9668   cat > conftest.$ac_ext <<EOF
9669 #line 9670 "configure"
9670 #include "confdefs.h"
9671 #include <$ac_hdr>
9672 EOF
9673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9674 { (eval echo configure:9675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9676 if test -z "$ac_err"; then
9677   rm -rf conftest*
9678   eval "ac_cv_header_$ac_safe=yes"
9679 else
9680   echo "$ac_err" >&5
9681   echo "configure: failed program was:" >&5
9682   cat conftest.$ac_ext >&5
9683   rm -rf conftest*
9684   eval "ac_cv_header_$ac_safe=no"
9685 fi
9686 rm -f conftest*
9687 fi
9688 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9689   echo "$ac_t""yes" 1>&6
9690     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9691   cat >> confdefs.h <<EOF
9692 #define $ac_tr_hdr 1
9693 EOF
9694  
9695 else
9696   echo "$ac_t""no" 1>&6
9697 fi
9698 done
9699
9700
9701         if test $ac_cv_header_pth_h = yes ; then
9702                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
9703 echo "configure:9704: checking for pth_version in -lpth" >&5
9704 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
9705 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9706   echo $ac_n "(cached) $ac_c" 1>&6
9707 else
9708   ac_save_LIBS="$LIBS"
9709 LIBS="-lpth  $LIBS"
9710 cat > conftest.$ac_ext <<EOF
9711 #line 9712 "configure"
9712 #include "confdefs.h"
9713 /* Override any gcc2 internal prototype to avoid an error.  */
9714 /* We use char because int might match the return type of a gcc2
9715     builtin and then its argument prototype would still apply.  */
9716 char pth_version();
9717
9718 int main() {
9719 pth_version()
9720 ; return 0; }
9721 EOF
9722 if { (eval echo configure:9723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9723   rm -rf conftest*
9724   eval "ac_cv_lib_$ac_lib_var=yes"
9725 else
9726   echo "configure: failed program was:" >&5
9727   cat conftest.$ac_ext >&5
9728   rm -rf conftest*
9729   eval "ac_cv_lib_$ac_lib_var=no"
9730 fi
9731 rm -f conftest*
9732 LIBS="$ac_save_LIBS"
9733
9734 fi
9735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9736   echo "$ac_t""yes" 1>&6
9737   have_pth=yes
9738 else
9739   echo "$ac_t""no" 1>&6
9740 have_pth=no
9741 fi
9742
9743
9744                 if test $have_pth = yes ; then
9745                         cat >> confdefs.h <<\EOF
9746 #define HAVE_GNU_PTH 1
9747 EOF
9748
9749                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
9750                         ol_link_threads=pth
9751
9752                         if test $ol_with_yielding_select = auto ; then
9753                                 ol_with_yielding_select=yes
9754                         fi
9755                 fi
9756         fi
9757 fi
9758
9759 if test $ol_with_threads = auto -o $ol_with_threads = yes \
9760         -o $ol_with_threads = lwp ; then
9761
9762                 for ac_hdr in thread.h synch.h
9763 do
9764 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9765 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9766 echo "configure:9767: checking for $ac_hdr" >&5
9767 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9768   echo $ac_n "(cached) $ac_c" 1>&6
9769 else
9770   cat > conftest.$ac_ext <<EOF
9771 #line 9772 "configure"
9772 #include "confdefs.h"
9773 #include <$ac_hdr>
9774 EOF
9775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9776 { (eval echo configure:9777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9778 if test -z "$ac_err"; then
9779   rm -rf conftest*
9780   eval "ac_cv_header_$ac_safe=yes"
9781 else
9782   echo "$ac_err" >&5
9783   echo "configure: failed program was:" >&5
9784   cat conftest.$ac_ext >&5
9785   rm -rf conftest*
9786   eval "ac_cv_header_$ac_safe=no"
9787 fi
9788 rm -f conftest*
9789 fi
9790 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9791   echo "$ac_t""yes" 1>&6
9792     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9793   cat >> confdefs.h <<EOF
9794 #define $ac_tr_hdr 1
9795 EOF
9796  
9797 else
9798   echo "$ac_t""no" 1>&6
9799 fi
9800 done
9801
9802         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
9803                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
9804 echo "configure:9805: checking for thr_create in -lthread" >&5
9805 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
9806 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9807   echo $ac_n "(cached) $ac_c" 1>&6
9808 else
9809   ac_save_LIBS="$LIBS"
9810 LIBS="-lthread  $LIBS"
9811 cat > conftest.$ac_ext <<EOF
9812 #line 9813 "configure"
9813 #include "confdefs.h"
9814 /* Override any gcc2 internal prototype to avoid an error.  */
9815 /* We use char because int might match the return type of a gcc2
9816     builtin and then its argument prototype would still apply.  */
9817 char thr_create();
9818
9819 int main() {
9820 thr_create()
9821 ; return 0; }
9822 EOF
9823 if { (eval echo configure:9824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9824   rm -rf conftest*
9825   eval "ac_cv_lib_$ac_lib_var=yes"
9826 else
9827   echo "configure: failed program was:" >&5
9828   cat conftest.$ac_ext >&5
9829   rm -rf conftest*
9830   eval "ac_cv_lib_$ac_lib_var=no"
9831 fi
9832 rm -f conftest*
9833 LIBS="$ac_save_LIBS"
9834
9835 fi
9836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9837   echo "$ac_t""yes" 1>&6
9838   have_thr=yes
9839 else
9840   echo "$ac_t""no" 1>&6
9841 have_thr=no
9842 fi
9843
9844
9845                 if test $have_thr = yes ; then
9846                         cat >> confdefs.h <<\EOF
9847 #define HAVE_THR 1
9848 EOF
9849
9850                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
9851                         ol_link_threads=thr
9852
9853                         if test $ol_with_yielding_select = auto ; then
9854                                 ol_with_yielding_select=yes
9855                         fi
9856
9857                                                 for ac_func in \
9858                                 thr_setconcurrency \
9859                                 thr_getconcurrency \
9860                         
9861 do
9862 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9863 echo "configure:9864: checking for $ac_func" >&5
9864 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9865   echo $ac_n "(cached) $ac_c" 1>&6
9866 else
9867   cat > conftest.$ac_ext <<EOF
9868 #line 9869 "configure"
9869 #include "confdefs.h"
9870 /* System header to define __stub macros and hopefully few prototypes,
9871     which can conflict with char $ac_func(); below.  */
9872 #include <assert.h>
9873 /* Override any gcc2 internal prototype to avoid an error.  */
9874 /* We use char because int might match the return type of a gcc2
9875     builtin and then its argument prototype would still apply.  */
9876 char $ac_func();
9877 char (*f)();
9878
9879 int main() {
9880
9881 /* The GNU C library defines this for functions which it implements
9882     to always fail with ENOSYS.  Some functions are actually named
9883     something starting with __ and the normal name is an alias.  */
9884 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9885 choke me
9886 #else
9887 f = $ac_func;
9888 #endif
9889
9890 ; return 0; }
9891 EOF
9892 if { (eval echo configure:9893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9893   rm -rf conftest*
9894   eval "ac_cv_func_$ac_func=yes"
9895 else
9896   echo "configure: failed program was:" >&5
9897   cat conftest.$ac_ext >&5
9898   rm -rf conftest*
9899   eval "ac_cv_func_$ac_func=no"
9900 fi
9901 rm -f conftest*
9902 fi
9903
9904 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9905   echo "$ac_t""yes" 1>&6
9906     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9907   cat >> confdefs.h <<EOF
9908 #define $ac_tr_func 1
9909 EOF
9910  
9911 else
9912   echo "$ac_t""no" 1>&6
9913 fi
9914 done
9915
9916                 fi
9917         fi
9918
9919                 for ac_hdr in lwp/lwp.h
9920 do
9921 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9922 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9923 echo "configure:9924: checking for $ac_hdr" >&5
9924 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9925   echo $ac_n "(cached) $ac_c" 1>&6
9926 else
9927   cat > conftest.$ac_ext <<EOF
9928 #line 9929 "configure"
9929 #include "confdefs.h"
9930 #include <$ac_hdr>
9931 EOF
9932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9933 { (eval echo configure:9934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9935 if test -z "$ac_err"; then
9936   rm -rf conftest*
9937   eval "ac_cv_header_$ac_safe=yes"
9938 else
9939   echo "$ac_err" >&5
9940   echo "configure: failed program was:" >&5
9941   cat conftest.$ac_ext >&5
9942   rm -rf conftest*
9943   eval "ac_cv_header_$ac_safe=no"
9944 fi
9945 rm -f conftest*
9946 fi
9947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9948   echo "$ac_t""yes" 1>&6
9949     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9950   cat >> confdefs.h <<EOF
9951 #define $ac_tr_hdr 1
9952 EOF
9953  
9954 else
9955   echo "$ac_t""no" 1>&6
9956 fi
9957 done
9958
9959         if test $ac_cv_header_lwp_lwp_h = yes ; then
9960                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
9961 echo "configure:9962: checking for lwp_create in -llwp" >&5
9962 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
9963 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9964   echo $ac_n "(cached) $ac_c" 1>&6
9965 else
9966   ac_save_LIBS="$LIBS"
9967 LIBS="-llwp  $LIBS"
9968 cat > conftest.$ac_ext <<EOF
9969 #line 9970 "configure"
9970 #include "confdefs.h"
9971 /* Override any gcc2 internal prototype to avoid an error.  */
9972 /* We use char because int might match the return type of a gcc2
9973     builtin and then its argument prototype would still apply.  */
9974 char lwp_create();
9975
9976 int main() {
9977 lwp_create()
9978 ; return 0; }
9979 EOF
9980 if { (eval echo configure:9981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9981   rm -rf conftest*
9982   eval "ac_cv_lib_$ac_lib_var=yes"
9983 else
9984   echo "configure: failed program was:" >&5
9985   cat conftest.$ac_ext >&5
9986   rm -rf conftest*
9987   eval "ac_cv_lib_$ac_lib_var=no"
9988 fi
9989 rm -f conftest*
9990 LIBS="$ac_save_LIBS"
9991
9992 fi
9993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9994   echo "$ac_t""yes" 1>&6
9995   have_lwp=yes
9996 else
9997   echo "$ac_t""no" 1>&6
9998 have_lwp=no
9999 fi
10000
10001
10002                 if test $have_lwp = yes ; then
10003                         cat >> confdefs.h <<\EOF
10004 #define HAVE_LWP 1
10005 EOF
10006
10007                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
10008                         ol_link_threads=lwp
10009
10010                         if test $ol_with_yielding_select = auto ; then
10011                                 ol_with_yielding_select=no
10012                         fi
10013                 fi
10014         fi
10015 fi
10016
10017 if test $ol_with_yielding_select = yes ; then
10018         cat >> confdefs.h <<\EOF
10019 #define HAVE_YIELDING_SELECT 1
10020 EOF
10021
10022 fi
10023
10024 if test $ol_with_threads = manual ; then
10025                 ol_link_threads=yes
10026
10027         echo "configure: warning: thread defines and link options must be set manually" 1>&2
10028
10029         for ac_hdr in pthread.h sched.h
10030 do
10031 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10032 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10033 echo "configure:10034: checking for $ac_hdr" >&5
10034 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10035   echo $ac_n "(cached) $ac_c" 1>&6
10036 else
10037   cat > conftest.$ac_ext <<EOF
10038 #line 10039 "configure"
10039 #include "confdefs.h"
10040 #include <$ac_hdr>
10041 EOF
10042 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10043 { (eval echo configure:10044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10044 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10045 if test -z "$ac_err"; then
10046   rm -rf conftest*
10047   eval "ac_cv_header_$ac_safe=yes"
10048 else
10049   echo "$ac_err" >&5
10050   echo "configure: failed program was:" >&5
10051   cat conftest.$ac_ext >&5
10052   rm -rf conftest*
10053   eval "ac_cv_header_$ac_safe=no"
10054 fi
10055 rm -f conftest*
10056 fi
10057 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10058   echo "$ac_t""yes" 1>&6
10059     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10060   cat >> confdefs.h <<EOF
10061 #define $ac_tr_hdr 1
10062 EOF
10063  
10064 else
10065   echo "$ac_t""no" 1>&6
10066 fi
10067 done
10068
10069         for ac_func in sched_yield pthread_yield
10070 do
10071 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10072 echo "configure:10073: checking for $ac_func" >&5
10073 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10074   echo $ac_n "(cached) $ac_c" 1>&6
10075 else
10076   cat > conftest.$ac_ext <<EOF
10077 #line 10078 "configure"
10078 #include "confdefs.h"
10079 /* System header to define __stub macros and hopefully few prototypes,
10080     which can conflict with char $ac_func(); below.  */
10081 #include <assert.h>
10082 /* Override any gcc2 internal prototype to avoid an error.  */
10083 /* We use char because int might match the return type of a gcc2
10084     builtin and then its argument prototype would still apply.  */
10085 char $ac_func();
10086 char (*f)();
10087
10088 int main() {
10089
10090 /* The GNU C library defines this for functions which it implements
10091     to always fail with ENOSYS.  Some functions are actually named
10092     something starting with __ and the normal name is an alias.  */
10093 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10094 choke me
10095 #else
10096 f = $ac_func;
10097 #endif
10098
10099 ; return 0; }
10100 EOF
10101 if { (eval echo configure:10102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10102   rm -rf conftest*
10103   eval "ac_cv_func_$ac_func=yes"
10104 else
10105   echo "configure: failed program was:" >&5
10106   cat conftest.$ac_ext >&5
10107   rm -rf conftest*
10108   eval "ac_cv_func_$ac_func=no"
10109 fi
10110 rm -f conftest*
10111 fi
10112
10113 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10114   echo "$ac_t""yes" 1>&6
10115     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10116   cat >> confdefs.h <<EOF
10117 #define $ac_tr_func 1
10118 EOF
10119  
10120 else
10121   echo "$ac_t""no" 1>&6
10122 fi
10123 done
10124
10125         
10126         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
10127 echo "configure:10128: checking for LinuxThreads pthread.h" >&5
10128 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
10129   echo $ac_n "(cached) $ac_c" 1>&6
10130 else
10131   cat > conftest.$ac_ext <<EOF
10132 #line 10133 "configure"
10133 #include "confdefs.h"
10134 #include <pthread.h>
10135 EOF
10136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10137   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
10138   rm -rf conftest*
10139   ol_cv_header_linux_threads=yes
10140 else
10141   rm -rf conftest*
10142   ol_cv_header_linux_threads=no
10143 fi
10144 rm -f conftest*
10145
10146                 
10147 fi
10148
10149 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
10150         if test $ol_cv_header_linux_threads = yes; then
10151                 cat >> confdefs.h <<\EOF
10152 #define HAVE_LINUX_THREADS 1
10153 EOF
10154
10155         fi
10156
10157
10158         for ac_hdr in mach/cthreads.h
10159 do
10160 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10161 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10162 echo "configure:10163: checking for $ac_hdr" >&5
10163 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10164   echo $ac_n "(cached) $ac_c" 1>&6
10165 else
10166   cat > conftest.$ac_ext <<EOF
10167 #line 10168 "configure"
10168 #include "confdefs.h"
10169 #include <$ac_hdr>
10170 EOF
10171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10172 { (eval echo configure:10173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10174 if test -z "$ac_err"; then
10175   rm -rf conftest*
10176   eval "ac_cv_header_$ac_safe=yes"
10177 else
10178   echo "$ac_err" >&5
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   eval "ac_cv_header_$ac_safe=no"
10183 fi
10184 rm -f conftest*
10185 fi
10186 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10187   echo "$ac_t""yes" 1>&6
10188     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10189   cat >> confdefs.h <<EOF
10190 #define $ac_tr_hdr 1
10191 EOF
10192  
10193 else
10194   echo "$ac_t""no" 1>&6
10195 fi
10196 done
10197
10198         for ac_hdr in lwp/lwp.h
10199 do
10200 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10201 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10202 echo "configure:10203: checking for $ac_hdr" >&5
10203 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10204   echo $ac_n "(cached) $ac_c" 1>&6
10205 else
10206   cat > conftest.$ac_ext <<EOF
10207 #line 10208 "configure"
10208 #include "confdefs.h"
10209 #include <$ac_hdr>
10210 EOF
10211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10212 { (eval echo configure:10213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10214 if test -z "$ac_err"; then
10215   rm -rf conftest*
10216   eval "ac_cv_header_$ac_safe=yes"
10217 else
10218   echo "$ac_err" >&5
10219   echo "configure: failed program was:" >&5
10220   cat conftest.$ac_ext >&5
10221   rm -rf conftest*
10222   eval "ac_cv_header_$ac_safe=no"
10223 fi
10224 rm -f conftest*
10225 fi
10226 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10227   echo "$ac_t""yes" 1>&6
10228     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10229   cat >> confdefs.h <<EOF
10230 #define $ac_tr_hdr 1
10231 EOF
10232  
10233 else
10234   echo "$ac_t""no" 1>&6
10235 fi
10236 done
10237
10238         for ac_hdr in thread.h synch.h
10239 do
10240 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10241 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10242 echo "configure:10243: checking for $ac_hdr" >&5
10243 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10244   echo $ac_n "(cached) $ac_c" 1>&6
10245 else
10246   cat > conftest.$ac_ext <<EOF
10247 #line 10248 "configure"
10248 #include "confdefs.h"
10249 #include <$ac_hdr>
10250 EOF
10251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10252 { (eval echo configure:10253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10254 if test -z "$ac_err"; then
10255   rm -rf conftest*
10256   eval "ac_cv_header_$ac_safe=yes"
10257 else
10258   echo "$ac_err" >&5
10259   echo "configure: failed program was:" >&5
10260   cat conftest.$ac_ext >&5
10261   rm -rf conftest*
10262   eval "ac_cv_header_$ac_safe=no"
10263 fi
10264 rm -f conftest*
10265 fi
10266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10267   echo "$ac_t""yes" 1>&6
10268     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10269   cat >> confdefs.h <<EOF
10270 #define $ac_tr_hdr 1
10271 EOF
10272  
10273 else
10274   echo "$ac_t""no" 1>&6
10275 fi
10276 done
10277
10278 fi
10279
10280 if test $ol_link_threads != no ; then  
10281                         cat >> confdefs.h <<\EOF
10282 #define REENTRANT 1
10283 EOF
10284
10285         cat >> confdefs.h <<\EOF
10286 #define _REENTRANT 1
10287 EOF
10288
10289         cat >> confdefs.h <<\EOF
10290 #define THREAD_SAFE 1
10291 EOF
10292
10293         cat >> confdefs.h <<\EOF
10294 #define _THREAD_SAFE 1
10295 EOF
10296
10297         cat >> confdefs.h <<\EOF
10298 #define THREADSAFE 1
10299 EOF
10300
10301         cat >> confdefs.h <<\EOF
10302 #define _THREADSAFE 1
10303 EOF
10304
10305         cat >> confdefs.h <<\EOF
10306 #define _SGI_MP_SOURCE 1
10307 EOF
10308
10309
10310                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
10311 echo "configure:10312: checking for thread specific errno" >&5
10312 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
10313   echo $ac_n "(cached) $ac_c" 1>&6
10314 else
10315   
10316                 cat > conftest.$ac_ext <<EOF
10317 #line 10318 "configure"
10318 #include "confdefs.h"
10319 #include <errno.h>
10320 int main() {
10321 errno = 0;
10322 ; return 0; }
10323 EOF
10324 if { (eval echo configure:10325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10325   rm -rf conftest*
10326   ol_cv_errno_thread_specific=yes
10327 else
10328   echo "configure: failed program was:" >&5
10329   cat conftest.$ac_ext >&5
10330   rm -rf conftest*
10331   ol_cv_errno_thread_specific=no
10332 fi
10333 rm -f conftest*
10334         
10335 fi
10336
10337 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
10338
10339                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
10340 echo "configure:10341: checking for thread specific h_errno" >&5
10341 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
10342   echo $ac_n "(cached) $ac_c" 1>&6
10343 else
10344   
10345                 cat > conftest.$ac_ext <<EOF
10346 #line 10347 "configure"
10347 #include "confdefs.h"
10348 #include <netdb.h>
10349 int main() {
10350 h_errno = 0;
10351 ; return 0; }
10352 EOF
10353 if { (eval echo configure:10354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10354   rm -rf conftest*
10355   ol_cv_h_errno_thread_specific=yes
10356 else
10357   echo "configure: failed program was:" >&5
10358   cat conftest.$ac_ext >&5
10359   rm -rf conftest*
10360   ol_cv_h_errno_thread_specific=no
10361 fi
10362 rm -f conftest*
10363         
10364 fi
10365
10366 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
10367
10368         if test $ol_cv_errno_thread_specific != yes \
10369                 -o $ol_cv_h_errno_thread_specific != yes ; then
10370                 LIBS="$LTHREAD_LIBS $LIBS"
10371                 LTHREAD_LIBS=""
10372         fi
10373
10374 fi  
10375
10376 if test $ol_link_threads = no ; then
10377         if test $ol_with_threads = yes ; then
10378                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
10379         fi
10380
10381         if test $ol_with_threads = auto ; then
10382                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
10383                 ol_with_threads=no
10384         fi
10385
10386         cat >> confdefs.h <<\EOF
10387 #define NO_THREADS 1
10388 EOF
10389
10390         LTHREAD_LIBS=""
10391 fi
10392
10393 if test $ol_link_threads != no ; then
10394         cat >> confdefs.h <<\EOF
10395 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
10396 EOF
10397
10398 fi
10399
10400
10401 ol_link_ldbm=no 
10402 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
10403         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
10404 echo "configure:10405: checking for DB2 library" >&5
10405 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
10406   echo $ac_n "(cached) $ac_c" 1>&6
10407 else
10408         ol_LIBS="$LIBS"
10409         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
10410 echo "configure:10411: checking for db_open in -ldb" >&5
10411 ac_lib_var=`echo db'_'db_open | sed 'y%./+-:%__p__%'`
10412 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10413   echo $ac_n "(cached) $ac_c" 1>&6
10414 else
10415   ac_save_LIBS="$LIBS"
10416 LIBS="-ldb  $LIBS"
10417 cat > conftest.$ac_ext <<EOF
10418 #line 10419 "configure"
10419 #include "confdefs.h"
10420 /* Override any gcc2 internal prototype to avoid an error.  */
10421 /* We use char because int might match the return type of a gcc2
10422     builtin and then its argument prototype would still apply.  */
10423 char db_open();
10424
10425 int main() {
10426 db_open()
10427 ; return 0; }
10428 EOF
10429 if { (eval echo configure:10430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10430   rm -rf conftest*
10431   eval "ac_cv_lib_$ac_lib_var=yes"
10432 else
10433   echo "configure: failed program was:" >&5
10434   cat conftest.$ac_ext >&5
10435   rm -rf conftest*
10436   eval "ac_cv_lib_$ac_lib_var=no"
10437 fi
10438 rm -f conftest*
10439 LIBS="$ac_save_LIBS"
10440
10441 fi
10442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10443   echo "$ac_t""yes" 1>&6
10444   ol_cv_lib_db2=-ldb
10445 else
10446   echo "$ac_t""no" 1>&6
10447 ol_cv_lib_db2=no
10448 fi
10449
10450         LIBS="$ol_LIBS"
10451
10452 fi
10453
10454 echo "$ac_t""$ol_cv_lib_db2" 1>&6
10455
10456 for ac_hdr in db.h
10457 do
10458 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10459 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10460 echo "configure:10461: checking for $ac_hdr" >&5
10461 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10462   echo $ac_n "(cached) $ac_c" 1>&6
10463 else
10464   cat > conftest.$ac_ext <<EOF
10465 #line 10466 "configure"
10466 #include "confdefs.h"
10467 #include <$ac_hdr>
10468 EOF
10469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10470 { (eval echo configure:10471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10471 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10472 if test -z "$ac_err"; then
10473   rm -rf conftest*
10474   eval "ac_cv_header_$ac_safe=yes"
10475 else
10476   echo "$ac_err" >&5
10477   echo "configure: failed program was:" >&5
10478   cat conftest.$ac_ext >&5
10479   rm -rf conftest*
10480   eval "ac_cv_header_$ac_safe=no"
10481 fi
10482 rm -f conftest*
10483 fi
10484 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10485   echo "$ac_t""yes" 1>&6
10486     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10487   cat >> confdefs.h <<EOF
10488 #define $ac_tr_hdr 1
10489 EOF
10490  
10491 else
10492   echo "$ac_t""no" 1>&6
10493 fi
10494 done
10495
10496 if test $ac_cv_header_db_h = yes ; then
10497         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
10498 echo "configure:10499: checking if db.h is DB2" >&5
10499 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
10500   echo $ac_n "(cached) $ac_c" 1>&6
10501 else
10502   
10503                 cat > conftest.$ac_ext <<EOF
10504 #line 10505 "configure"
10505 #include "confdefs.h"
10506
10507 #                       include <db.h>
10508                         /* this check could be improved */
10509 #                       ifdef DB_VERSION_MAJOR
10510 #                               if DB_VERSION_MAJOR == 2
10511                                         __db_version_2
10512 #                               endif
10513 #                       endif
10514                 
10515 EOF
10516 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10517   egrep "__db_version_2" >/dev/null 2>&1; then
10518   rm -rf conftest*
10519   ol_cv_header_db2=yes
10520 else
10521   rm -rf conftest*
10522   ol_cv_header_db2=no
10523 fi
10524 rm -f conftest*
10525
10526 fi
10527
10528 echo "$ac_t""$ol_cv_header_db2" 1>&6
10529 else
10530         ol_cv_header_db2=no
10531 fi
10532
10533
10534  
10535  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
10536 echo "configure:10537: checking for Berkeley DB2" >&5
10537 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
10538   echo $ac_n "(cached) $ac_c" 1>&6
10539 else
10540   
10541         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
10542                 ol_cv_berkeley_db2=no
10543         else
10544                 ol_cv_berkeley_db2=yes
10545         fi
10546
10547 fi
10548
10549 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
10550  if test $ol_cv_berkeley_db2 = yes ; then
10551         cat >> confdefs.h <<\EOF
10552 #define HAVE_BERKELEY_DB2 1
10553 EOF
10554
10555  fi
10556
10557
10558         if test $ol_cv_berkeley_db2 = yes ; then
10559                 ol_link_ldbm=db2
10560                 ol_with_ldbm_api=db2
10561
10562                 if test $ol_with_ldbm_type = hash ; then
10563                         cat >> confdefs.h <<\EOF
10564 #define LDBM_USE_DBHASH 1
10565 EOF
10566
10567                 else
10568                         cat >> confdefs.h <<\EOF
10569 #define LDBM_USE_DBBTREE 1
10570 EOF
10571
10572                 fi
10573
10574                                                 if test $ol_cv_lib_db2 != yes ; then
10575                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
10576                 fi
10577         fi
10578 fi
10579
10580 ol_link_bdb2=no
10581 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
10582         ol_link_bdb2=yes
10583 fi
10584
10585 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
10586         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
10587 echo "configure:10588: checking for Berkeley DB library" >&5
10588 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
10589   echo $ac_n "(cached) $ac_c" 1>&6
10590 else
10591   
10592         for ac_hdr in db1/db.h
10593 do
10594 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10595 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10596 echo "configure:10597: checking for $ac_hdr" >&5
10597 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10598   echo $ac_n "(cached) $ac_c" 1>&6
10599 else
10600   cat > conftest.$ac_ext <<EOF
10601 #line 10602 "configure"
10602 #include "confdefs.h"
10603 #include <$ac_hdr>
10604 EOF
10605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10606 { (eval echo configure:10607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10608 if test -z "$ac_err"; then
10609   rm -rf conftest*
10610   eval "ac_cv_header_$ac_safe=yes"
10611 else
10612   echo "$ac_err" >&5
10613   echo "configure: failed program was:" >&5
10614   cat conftest.$ac_ext >&5
10615   rm -rf conftest*
10616   eval "ac_cv_header_$ac_safe=no"
10617 fi
10618 rm -f conftest*
10619 fi
10620 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10621   echo "$ac_t""yes" 1>&6
10622     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10623   cat >> confdefs.h <<EOF
10624 #define $ac_tr_hdr 1
10625 EOF
10626  
10627 else
10628   echo "$ac_t""no" 1>&6
10629 fi
10630 done
10631
10632         ol_LIBS="$LIBS"
10633         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
10634 echo "configure:10635: checking for dbopen" >&5
10635 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
10636   echo $ac_n "(cached) $ac_c" 1>&6
10637 else
10638   cat > conftest.$ac_ext <<EOF
10639 #line 10640 "configure"
10640 #include "confdefs.h"
10641 /* System header to define __stub macros and hopefully few prototypes,
10642     which can conflict with char dbopen(); below.  */
10643 #include <assert.h>
10644 /* Override any gcc2 internal prototype to avoid an error.  */
10645 /* We use char because int might match the return type of a gcc2
10646     builtin and then its argument prototype would still apply.  */
10647 char dbopen();
10648 char (*f)();
10649
10650 int main() {
10651
10652 /* The GNU C library defines this for functions which it implements
10653     to always fail with ENOSYS.  Some functions are actually named
10654     something starting with __ and the normal name is an alias.  */
10655 #if defined (__stub_dbopen) || defined (__stub___dbopen)
10656 choke me
10657 #else
10658 f = dbopen;
10659 #endif
10660
10661 ; return 0; }
10662 EOF
10663 if { (eval echo configure:10664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10664   rm -rf conftest*
10665   eval "ac_cv_func_dbopen=yes"
10666 else
10667   echo "configure: failed program was:" >&5
10668   cat conftest.$ac_ext >&5
10669   rm -rf conftest*
10670   eval "ac_cv_func_dbopen=no"
10671 fi
10672 rm -f conftest*
10673 fi
10674
10675 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
10676   echo "$ac_t""yes" 1>&6
10677   ol_cv_lib_db=yes
10678 else
10679   echo "$ac_t""no" 1>&6
10680
10681                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
10682 echo "configure:10683: checking for dbopen in -ldb1" >&5
10683 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-:%__p__%'`
10684 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10685   echo $ac_n "(cached) $ac_c" 1>&6
10686 else
10687   ac_save_LIBS="$LIBS"
10688 LIBS="-ldb1  $LIBS"
10689 cat > conftest.$ac_ext <<EOF
10690 #line 10691 "configure"
10691 #include "confdefs.h"
10692 /* Override any gcc2 internal prototype to avoid an error.  */
10693 /* We use char because int might match the return type of a gcc2
10694     builtin and then its argument prototype would still apply.  */
10695 char dbopen();
10696
10697 int main() {
10698 dbopen()
10699 ; return 0; }
10700 EOF
10701 if { (eval echo configure:10702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10702   rm -rf conftest*
10703   eval "ac_cv_lib_$ac_lib_var=yes"
10704 else
10705   echo "configure: failed program was:" >&5
10706   cat conftest.$ac_ext >&5
10707   rm -rf conftest*
10708   eval "ac_cv_lib_$ac_lib_var=no"
10709 fi
10710 rm -f conftest*
10711 LIBS="$ac_save_LIBS"
10712
10713 fi
10714 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10715   echo "$ac_t""yes" 1>&6
10716   ol_cv_lib_db=-ldb1
10717 else
10718   echo "$ac_t""no" 1>&6
10719
10720                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
10721 echo "configure:10722: checking for dbopen in -ldb" >&5
10722 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-:%__p__%'`
10723 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10724   echo $ac_n "(cached) $ac_c" 1>&6
10725 else
10726   ac_save_LIBS="$LIBS"
10727 LIBS="-ldb  $LIBS"
10728 cat > conftest.$ac_ext <<EOF
10729 #line 10730 "configure"
10730 #include "confdefs.h"
10731 /* Override any gcc2 internal prototype to avoid an error.  */
10732 /* We use char because int might match the return type of a gcc2
10733     builtin and then its argument prototype would still apply.  */
10734 char dbopen();
10735
10736 int main() {
10737 dbopen()
10738 ; return 0; }
10739 EOF
10740 if { (eval echo configure:10741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10741   rm -rf conftest*
10742   eval "ac_cv_lib_$ac_lib_var=yes"
10743 else
10744   echo "configure: failed program was:" >&5
10745   cat conftest.$ac_ext >&5
10746   rm -rf conftest*
10747   eval "ac_cv_lib_$ac_lib_var=no"
10748 fi
10749 rm -f conftest*
10750 LIBS="$ac_save_LIBS"
10751
10752 fi
10753 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10754   echo "$ac_t""yes" 1>&6
10755   ol_cv_lib_db=-ldb
10756 else
10757   echo "$ac_t""no" 1>&6
10758 ol_cv_lib_db=no
10759 fi
10760
10761                 
10762 fi
10763
10764         
10765 fi
10766
10767         LIBS="$ol_LIBS"
10768
10769 fi
10770
10771 echo "$ac_t""$ol_cv_lib_db" 1>&6
10772
10773
10774 for ac_hdr in db_185.h
10775 do
10776 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10777 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10778 echo "configure:10779: checking for $ac_hdr" >&5
10779 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10780   echo $ac_n "(cached) $ac_c" 1>&6
10781 else
10782   cat > conftest.$ac_ext <<EOF
10783 #line 10784 "configure"
10784 #include "confdefs.h"
10785 #include <$ac_hdr>
10786 EOF
10787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10788 { (eval echo configure:10789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10789 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10790 if test -z "$ac_err"; then
10791   rm -rf conftest*
10792   eval "ac_cv_header_$ac_safe=yes"
10793 else
10794   echo "$ac_err" >&5
10795   echo "configure: failed program was:" >&5
10796   cat conftest.$ac_ext >&5
10797   rm -rf conftest*
10798   eval "ac_cv_header_$ac_safe=no"
10799 fi
10800 rm -f conftest*
10801 fi
10802 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10803   echo "$ac_t""yes" 1>&6
10804     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10805   cat >> confdefs.h <<EOF
10806 #define $ac_tr_hdr 1
10807 EOF
10808  
10809 else
10810   echo "$ac_t""no" 1>&6
10811 fi
10812 done
10813
10814 if test "$ol_cv_header_db2" = yes ; then
10815         
10816         ol_cv_header_db=$ac_cv_header_db_185_h
10817 else
10818         ol_cv_header_db=$ac_cv_header_db_h
10819 fi
10820
10821
10822  
10823  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
10824 echo "configure:10825: checking for Berkeley DB" >&5
10825 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
10826   echo $ac_n "(cached) $ac_c" 1>&6
10827 else
10828   
10829         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
10830                 ol_cv_berkeley_db=no
10831         else
10832                 ol_cv_berkeley_db=yes
10833         fi
10834
10835 fi
10836
10837 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
10838  if test $ol_cv_berkeley_db = yes ; then
10839         cat >> confdefs.h <<\EOF
10840 #define HAVE_BERKELEY_DB 1
10841 EOF
10842
10843  fi
10844
10845
10846         if test $ol_cv_berkeley_db = yes ; then
10847                 ol_link_ldbm=db
10848                 ol_with_ldbm_api=db
10849
10850                 if test $ol_with_ldbm_type = hash ; then
10851                         cat >> confdefs.h <<\EOF
10852 #define LDBM_USE_DBHASH 1
10853 EOF
10854
10855                 else
10856                         cat >> confdefs.h <<\EOF
10857 #define LDBM_USE_DBBTREE 1
10858 EOF
10859
10860                 fi
10861
10862                                                 if test $ol_cv_lib_db != yes ; then
10863                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
10864                 fi
10865         fi
10866 fi
10867
10868 if test $ol_with_ldbm_api = manual ; then
10869                 ol_link_ldbm=yes
10870
10871         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
10872
10873         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
10874 do
10875 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10876 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10877 echo "configure:10878: checking for $ac_hdr" >&5
10878 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10879   echo $ac_n "(cached) $ac_c" 1>&6
10880 else
10881   cat > conftest.$ac_ext <<EOF
10882 #line 10883 "configure"
10883 #include "confdefs.h"
10884 #include <$ac_hdr>
10885 EOF
10886 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10887 { (eval echo configure:10888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10888 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10889 if test -z "$ac_err"; then
10890   rm -rf conftest*
10891   eval "ac_cv_header_$ac_safe=yes"
10892 else
10893   echo "$ac_err" >&5
10894   echo "configure: failed program was:" >&5
10895   cat conftest.$ac_ext >&5
10896   rm -rf conftest*
10897   eval "ac_cv_header_$ac_safe=no"
10898 fi
10899 rm -f conftest*
10900 fi
10901 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10902   echo "$ac_t""yes" 1>&6
10903     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10904   cat >> confdefs.h <<EOF
10905 #define $ac_tr_hdr 1
10906 EOF
10907  
10908 else
10909   echo "$ac_t""no" 1>&6
10910 fi
10911 done
10912
10913 fi
10914
10915 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
10916         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
10917         ol_with_ldbm_api=none
10918 fi
10919
10920 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
10921         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
10922 echo "configure:10923: checking for MDBM library" >&5
10923 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
10924   echo $ac_n "(cached) $ac_c" 1>&6
10925 else
10926         ol_LIBS="$LIBS"
10927         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
10928 echo "configure:10929: checking for mdbm_set_chain" >&5
10929 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
10930   echo $ac_n "(cached) $ac_c" 1>&6
10931 else
10932   cat > conftest.$ac_ext <<EOF
10933 #line 10934 "configure"
10934 #include "confdefs.h"
10935 /* System header to define __stub macros and hopefully few prototypes,
10936     which can conflict with char mdbm_set_chain(); below.  */
10937 #include <assert.h>
10938 /* Override any gcc2 internal prototype to avoid an error.  */
10939 /* We use char because int might match the return type of a gcc2
10940     builtin and then its argument prototype would still apply.  */
10941 char mdbm_set_chain();
10942 char (*f)();
10943
10944 int main() {
10945
10946 /* The GNU C library defines this for functions which it implements
10947     to always fail with ENOSYS.  Some functions are actually named
10948     something starting with __ and the normal name is an alias.  */
10949 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
10950 choke me
10951 #else
10952 f = mdbm_set_chain;
10953 #endif
10954
10955 ; return 0; }
10956 EOF
10957 if { (eval echo configure:10958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10958   rm -rf conftest*
10959   eval "ac_cv_func_mdbm_set_chain=yes"
10960 else
10961   echo "configure: failed program was:" >&5
10962   cat conftest.$ac_ext >&5
10963   rm -rf conftest*
10964   eval "ac_cv_func_mdbm_set_chain=no"
10965 fi
10966 rm -f conftest*
10967 fi
10968
10969 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
10970   echo "$ac_t""yes" 1>&6
10971   ol_cv_lib_mdbm=yes
10972 else
10973   echo "$ac_t""no" 1>&6
10974
10975                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
10976 echo "configure:10977: checking for mdbm_set_chain in -lmdbm" >&5
10977 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
10978 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10979   echo $ac_n "(cached) $ac_c" 1>&6
10980 else
10981   ac_save_LIBS="$LIBS"
10982 LIBS="-lmdbm  $LIBS"
10983 cat > conftest.$ac_ext <<EOF
10984 #line 10985 "configure"
10985 #include "confdefs.h"
10986 /* Override any gcc2 internal prototype to avoid an error.  */
10987 /* We use char because int might match the return type of a gcc2
10988     builtin and then its argument prototype would still apply.  */
10989 char mdbm_set_chain();
10990
10991 int main() {
10992 mdbm_set_chain()
10993 ; return 0; }
10994 EOF
10995 if { (eval echo configure:10996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10996   rm -rf conftest*
10997   eval "ac_cv_lib_$ac_lib_var=yes"
10998 else
10999   echo "configure: failed program was:" >&5
11000   cat conftest.$ac_ext >&5
11001   rm -rf conftest*
11002   eval "ac_cv_lib_$ac_lib_var=no"
11003 fi
11004 rm -f conftest*
11005 LIBS="$ac_save_LIBS"
11006
11007 fi
11008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11009   echo "$ac_t""yes" 1>&6
11010   ol_cv_lib_mdbm=-lmdbm
11011 else
11012   echo "$ac_t""no" 1>&6
11013 ol_cv_lib_mdbm=no
11014 fi
11015
11016         
11017 fi
11018
11019         LIBS="$ol_LIBS"
11020
11021 fi
11022
11023 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
11024
11025
11026  for ac_hdr in mdbm.h
11027 do
11028 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11029 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11030 echo "configure:11031: checking for $ac_hdr" >&5
11031 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11032   echo $ac_n "(cached) $ac_c" 1>&6
11033 else
11034   cat > conftest.$ac_ext <<EOF
11035 #line 11036 "configure"
11036 #include "confdefs.h"
11037 #include <$ac_hdr>
11038 EOF
11039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11040 { (eval echo configure:11041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11042 if test -z "$ac_err"; then
11043   rm -rf conftest*
11044   eval "ac_cv_header_$ac_safe=yes"
11045 else
11046   echo "$ac_err" >&5
11047   echo "configure: failed program was:" >&5
11048   cat conftest.$ac_ext >&5
11049   rm -rf conftest*
11050   eval "ac_cv_header_$ac_safe=no"
11051 fi
11052 rm -f conftest*
11053 fi
11054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11055   echo "$ac_t""yes" 1>&6
11056     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11057   cat >> confdefs.h <<EOF
11058 #define $ac_tr_hdr 1
11059 EOF
11060  
11061 else
11062   echo "$ac_t""no" 1>&6
11063 fi
11064 done
11065
11066  echo $ac_n "checking for db""... $ac_c" 1>&6
11067 echo "configure:11068: checking for db" >&5
11068 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
11069   echo $ac_n "(cached) $ac_c" 1>&6
11070 else
11071   
11072         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
11073                 ol_cv_mdbm=no
11074         else
11075                 ol_cv_mdbm=yes
11076         fi
11077
11078 fi
11079
11080 echo "$ac_t""$ol_cv_mdbm" 1>&6
11081  if test $ol_cv_mdbm = yes ; then
11082         cat >> confdefs.h <<\EOF
11083 #define HAVE_MDBM 1
11084 EOF
11085
11086  fi
11087
11088
11089         if test $ol_cv_mdbm = yes ; then
11090                 ol_link_ldbm=mdbm
11091                 ol_with_ldbm_api=mdbm
11092                 if test $ol_cv_lib_mdbm != yes ; then
11093                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
11094                 fi
11095         fi
11096 fi
11097
11098 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
11099         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
11100 echo "configure:11101: checking for GDBM library" >&5
11101 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
11102   echo $ac_n "(cached) $ac_c" 1>&6
11103 else
11104         ol_LIBS="$LIBS"
11105         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
11106 echo "configure:11107: checking for gdbm_open" >&5
11107 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
11108   echo $ac_n "(cached) $ac_c" 1>&6
11109 else
11110   cat > conftest.$ac_ext <<EOF
11111 #line 11112 "configure"
11112 #include "confdefs.h"
11113 /* System header to define __stub macros and hopefully few prototypes,
11114     which can conflict with char gdbm_open(); below.  */
11115 #include <assert.h>
11116 /* Override any gcc2 internal prototype to avoid an error.  */
11117 /* We use char because int might match the return type of a gcc2
11118     builtin and then its argument prototype would still apply.  */
11119 char gdbm_open();
11120 char (*f)();
11121
11122 int main() {
11123
11124 /* The GNU C library defines this for functions which it implements
11125     to always fail with ENOSYS.  Some functions are actually named
11126     something starting with __ and the normal name is an alias.  */
11127 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
11128 choke me
11129 #else
11130 f = gdbm_open;
11131 #endif
11132
11133 ; return 0; }
11134 EOF
11135 if { (eval echo configure:11136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11136   rm -rf conftest*
11137   eval "ac_cv_func_gdbm_open=yes"
11138 else
11139   echo "configure: failed program was:" >&5
11140   cat conftest.$ac_ext >&5
11141   rm -rf conftest*
11142   eval "ac_cv_func_gdbm_open=no"
11143 fi
11144 rm -f conftest*
11145 fi
11146
11147 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
11148   echo "$ac_t""yes" 1>&6
11149   ol_cv_lib_gdbm=yes
11150 else
11151   echo "$ac_t""no" 1>&6
11152
11153                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
11154 echo "configure:11155: checking for gdbm_open in -lgdbm" >&5
11155 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
11156 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11157   echo $ac_n "(cached) $ac_c" 1>&6
11158 else
11159   ac_save_LIBS="$LIBS"
11160 LIBS="-lgdbm  $LIBS"
11161 cat > conftest.$ac_ext <<EOF
11162 #line 11163 "configure"
11163 #include "confdefs.h"
11164 /* Override any gcc2 internal prototype to avoid an error.  */
11165 /* We use char because int might match the return type of a gcc2
11166     builtin and then its argument prototype would still apply.  */
11167 char gdbm_open();
11168
11169 int main() {
11170 gdbm_open()
11171 ; return 0; }
11172 EOF
11173 if { (eval echo configure:11174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11174   rm -rf conftest*
11175   eval "ac_cv_lib_$ac_lib_var=yes"
11176 else
11177   echo "configure: failed program was:" >&5
11178   cat conftest.$ac_ext >&5
11179   rm -rf conftest*
11180   eval "ac_cv_lib_$ac_lib_var=no"
11181 fi
11182 rm -f conftest*
11183 LIBS="$ac_save_LIBS"
11184
11185 fi
11186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11187   echo "$ac_t""yes" 1>&6
11188   ol_cv_lib_gdbm=-lgdbm
11189 else
11190   echo "$ac_t""no" 1>&6
11191 ol_cv_lib_gdbm=no
11192 fi
11193
11194         
11195 fi
11196
11197         LIBS="$ol_LIBS"
11198
11199 fi
11200
11201 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
11202
11203
11204  for ac_hdr in gdbm.h
11205 do
11206 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11207 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11208 echo "configure:11209: checking for $ac_hdr" >&5
11209 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11210   echo $ac_n "(cached) $ac_c" 1>&6
11211 else
11212   cat > conftest.$ac_ext <<EOF
11213 #line 11214 "configure"
11214 #include "confdefs.h"
11215 #include <$ac_hdr>
11216 EOF
11217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11218 { (eval echo configure:11219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11220 if test -z "$ac_err"; then
11221   rm -rf conftest*
11222   eval "ac_cv_header_$ac_safe=yes"
11223 else
11224   echo "$ac_err" >&5
11225   echo "configure: failed program was:" >&5
11226   cat conftest.$ac_ext >&5
11227   rm -rf conftest*
11228   eval "ac_cv_header_$ac_safe=no"
11229 fi
11230 rm -f conftest*
11231 fi
11232 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11233   echo "$ac_t""yes" 1>&6
11234     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11235   cat >> confdefs.h <<EOF
11236 #define $ac_tr_hdr 1
11237 EOF
11238  
11239 else
11240   echo "$ac_t""no" 1>&6
11241 fi
11242 done
11243
11244  echo $ac_n "checking for db""... $ac_c" 1>&6
11245 echo "configure:11246: checking for db" >&5
11246 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
11247   echo $ac_n "(cached) $ac_c" 1>&6
11248 else
11249   
11250         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
11251                 ol_cv_gdbm=no
11252         else
11253                 ol_cv_gdbm=yes
11254         fi
11255
11256 fi
11257
11258 echo "$ac_t""$ol_cv_gdbm" 1>&6
11259  if test $ol_cv_gdbm = yes ; then
11260         cat >> confdefs.h <<\EOF
11261 #define HAVE_GDBM 1
11262 EOF
11263
11264  fi
11265
11266
11267         if test $ol_cv_gdbm = yes ; then
11268                 ol_link_ldbm=gdbm
11269                 ol_with_ldbm_api=gdbm
11270
11271                 if test $ol_cv_lib_gdbm != yes ; then
11272                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
11273                 fi
11274         fi
11275 fi
11276
11277 if test $ol_with_ldbm_api = auto ; then
11278         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
11279 elif test $ol_with_ldbm_api = ndbm ; then
11280         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
11281 echo "configure:11282: checking for NDBM library" >&5
11282 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
11283   echo $ac_n "(cached) $ac_c" 1>&6
11284 else
11285         ol_LIBS="$LIBS"
11286         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11287 echo "configure:11288: checking for dbm_open" >&5
11288 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
11289   echo $ac_n "(cached) $ac_c" 1>&6
11290 else
11291   cat > conftest.$ac_ext <<EOF
11292 #line 11293 "configure"
11293 #include "confdefs.h"
11294 /* System header to define __stub macros and hopefully few prototypes,
11295     which can conflict with char dbm_open(); below.  */
11296 #include <assert.h>
11297 /* Override any gcc2 internal prototype to avoid an error.  */
11298 /* We use char because int might match the return type of a gcc2
11299     builtin and then its argument prototype would still apply.  */
11300 char dbm_open();
11301 char (*f)();
11302
11303 int main() {
11304
11305 /* The GNU C library defines this for functions which it implements
11306     to always fail with ENOSYS.  Some functions are actually named
11307     something starting with __ and the normal name is an alias.  */
11308 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11309 choke me
11310 #else
11311 f = dbm_open;
11312 #endif
11313
11314 ; return 0; }
11315 EOF
11316 if { (eval echo configure:11317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11317   rm -rf conftest*
11318   eval "ac_cv_func_dbm_open=yes"
11319 else
11320   echo "configure: failed program was:" >&5
11321   cat conftest.$ac_ext >&5
11322   rm -rf conftest*
11323   eval "ac_cv_func_dbm_open=no"
11324 fi
11325 rm -f conftest*
11326 fi
11327
11328 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11329   echo "$ac_t""yes" 1>&6
11330   ol_cv_lib_ndbm=yes
11331 else
11332   echo "$ac_t""no" 1>&6
11333
11334                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
11335 echo "configure:11336: checking for dbm_open in -lndbm" >&5
11336 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11337 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11338   echo $ac_n "(cached) $ac_c" 1>&6
11339 else
11340   ac_save_LIBS="$LIBS"
11341 LIBS="-lndbm  $LIBS"
11342 cat > conftest.$ac_ext <<EOF
11343 #line 11344 "configure"
11344 #include "confdefs.h"
11345 /* Override any gcc2 internal prototype to avoid an error.  */
11346 /* We use char because int might match the return type of a gcc2
11347     builtin and then its argument prototype would still apply.  */
11348 char dbm_open();
11349
11350 int main() {
11351 dbm_open()
11352 ; return 0; }
11353 EOF
11354 if { (eval echo configure:11355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11355   rm -rf conftest*
11356   eval "ac_cv_lib_$ac_lib_var=yes"
11357 else
11358   echo "configure: failed program was:" >&5
11359   cat conftest.$ac_ext >&5
11360   rm -rf conftest*
11361   eval "ac_cv_lib_$ac_lib_var=no"
11362 fi
11363 rm -f conftest*
11364 LIBS="$ac_save_LIBS"
11365
11366 fi
11367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11368   echo "$ac_t""yes" 1>&6
11369   ol_cv_lib_ndbm=-lndbm
11370 else
11371   echo "$ac_t""no" 1>&6
11372
11373                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11374 echo "configure:11375: checking for dbm_open in -ldbm" >&5
11375 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
11376 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11377   echo $ac_n "(cached) $ac_c" 1>&6
11378 else
11379   ac_save_LIBS="$LIBS"
11380 LIBS="-ldbm  $LIBS"
11381 cat > conftest.$ac_ext <<EOF
11382 #line 11383 "configure"
11383 #include "confdefs.h"
11384 /* Override any gcc2 internal prototype to avoid an error.  */
11385 /* We use char because int might match the return type of a gcc2
11386     builtin and then its argument prototype would still apply.  */
11387 char dbm_open();
11388
11389 int main() {
11390 dbm_open()
11391 ; return 0; }
11392 EOF
11393 if { (eval echo configure:11394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11394   rm -rf conftest*
11395   eval "ac_cv_lib_$ac_lib_var=yes"
11396 else
11397   echo "configure: failed program was:" >&5
11398   cat conftest.$ac_ext >&5
11399   rm -rf conftest*
11400   eval "ac_cv_lib_$ac_lib_var=no"
11401 fi
11402 rm -f conftest*
11403 LIBS="$ac_save_LIBS"
11404
11405 fi
11406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11407   echo "$ac_t""yes" 1>&6
11408   ol_cv_lib_ndbm=-ldbm
11409 else
11410   echo "$ac_t""no" 1>&6
11411 ol_cv_lib_ndbm=no
11412 fi
11413                 
11414 fi
11415
11416         
11417 fi
11418
11419         LIBS="$ol_LIBS"
11420
11421 fi
11422
11423 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
11424
11425
11426  for ac_hdr in ndbm.h
11427 do
11428 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11429 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11430 echo "configure:11431: checking for $ac_hdr" >&5
11431 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11432   echo $ac_n "(cached) $ac_c" 1>&6
11433 else
11434   cat > conftest.$ac_ext <<EOF
11435 #line 11436 "configure"
11436 #include "confdefs.h"
11437 #include <$ac_hdr>
11438 EOF
11439 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11440 { (eval echo configure:11441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11441 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11442 if test -z "$ac_err"; then
11443   rm -rf conftest*
11444   eval "ac_cv_header_$ac_safe=yes"
11445 else
11446   echo "$ac_err" >&5
11447   echo "configure: failed program was:" >&5
11448   cat conftest.$ac_ext >&5
11449   rm -rf conftest*
11450   eval "ac_cv_header_$ac_safe=no"
11451 fi
11452 rm -f conftest*
11453 fi
11454 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11455   echo "$ac_t""yes" 1>&6
11456     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11457   cat >> confdefs.h <<EOF
11458 #define $ac_tr_hdr 1
11459 EOF
11460  
11461 else
11462   echo "$ac_t""no" 1>&6
11463 fi
11464 done
11465
11466  echo $ac_n "checking for db""... $ac_c" 1>&6
11467 echo "configure:11468: checking for db" >&5
11468 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
11469   echo $ac_n "(cached) $ac_c" 1>&6
11470 else
11471   
11472         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
11473                 ol_cv_ndbm=no
11474         else
11475                 ol_cv_ndbm=yes
11476         fi
11477
11478 fi
11479
11480 echo "$ac_t""$ol_cv_ndbm" 1>&6
11481  if test $ol_cv_ndbm = yes ; then
11482         cat >> confdefs.h <<\EOF
11483 #define HAVE_NDBM 1
11484 EOF
11485
11486  fi
11487
11488
11489         if test $ol_cv_ndbm = yes ; then
11490                 ol_link_ldbm=ndbm
11491                 ol_with_ldbm_api=ndbm
11492
11493                 if test $ol_cv_lib_ndbm != yes ; then
11494                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
11495                 fi
11496         fi
11497 fi
11498
11499 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
11500         echo "configure: warning: could not find suitable LDBM backend" 1>&2
11501         if test $ol_enable_ldbm = yes ; then
11502                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
11503         fi
11504
11505         echo "configure: warning: disabling LDBM" 1>&2
11506         ol_enable_ldbm=no
11507 fi
11508
11509 if test $ol_enable_wrappers != no ; then
11510         for ac_hdr in tcpd.h
11511 do
11512 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11513 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11514 echo "configure:11515: checking for $ac_hdr" >&5
11515 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11516   echo $ac_n "(cached) $ac_c" 1>&6
11517 else
11518   cat > conftest.$ac_ext <<EOF
11519 #line 11520 "configure"
11520 #include "confdefs.h"
11521 #include <$ac_hdr>
11522 EOF
11523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11524 { (eval echo configure:11525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11526 if test -z "$ac_err"; then
11527   rm -rf conftest*
11528   eval "ac_cv_header_$ac_safe=yes"
11529 else
11530   echo "$ac_err" >&5
11531   echo "configure: failed program was:" >&5
11532   cat conftest.$ac_ext >&5
11533   rm -rf conftest*
11534   eval "ac_cv_header_$ac_safe=no"
11535 fi
11536 rm -f conftest*
11537 fi
11538 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11539   echo "$ac_t""yes" 1>&6
11540     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11541   cat >> confdefs.h <<EOF
11542 #define $ac_tr_hdr 1
11543 EOF
11544  
11545 else
11546   echo "$ac_t""no" 1>&6
11547 fi
11548 done
11549
11550
11551         if test $ac_cv_header_tcpd_h != yes ; then
11552                 have_wrappers=no
11553         else
11554                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
11555 echo "configure:11556: checking for main in -lwrap" >&5
11556 ac_lib_var=`echo wrap'_'main | sed 'y%./+-:%__p__%'`
11557 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11558   echo $ac_n "(cached) $ac_c" 1>&6
11559 else
11560   ac_save_LIBS="$LIBS"
11561 LIBS="-lwrap  $LIBS"
11562 cat > conftest.$ac_ext <<EOF
11563 #line 11564 "configure"
11564 #include "confdefs.h"
11565
11566 int main() {
11567 main()
11568 ; return 0; }
11569 EOF
11570 if { (eval echo configure:11571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11571   rm -rf conftest*
11572   eval "ac_cv_lib_$ac_lib_var=yes"
11573 else
11574   echo "configure: failed program was:" >&5
11575   cat conftest.$ac_ext >&5
11576   rm -rf conftest*
11577   eval "ac_cv_lib_$ac_lib_var=no"
11578 fi
11579 rm -f conftest*
11580 LIBS="$ac_save_LIBS"
11581
11582 fi
11583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11584   echo "$ac_t""yes" 1>&6
11585   have_wrappers=yes
11586 else
11587   echo "$ac_t""no" 1>&6
11588 have_wrappers=no
11589 fi
11590
11591         fi
11592
11593         if test $have_wrappers = yes ; then
11594                 cat >> confdefs.h <<\EOF
11595 #define HAVE_TCPD 1
11596 EOF
11597
11598                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
11599
11600                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
11601 echo "configure:11602: checking for main in -lnsl" >&5
11602 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
11603 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11604   echo $ac_n "(cached) $ac_c" 1>&6
11605 else
11606   ac_save_LIBS="$LIBS"
11607 LIBS="-lnsl  $LIBS"
11608 cat > conftest.$ac_ext <<EOF
11609 #line 11610 "configure"
11610 #include "confdefs.h"
11611
11612 int main() {
11613 main()
11614 ; return 0; }
11615 EOF
11616 if { (eval echo configure:11617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11617   rm -rf conftest*
11618   eval "ac_cv_lib_$ac_lib_var=yes"
11619 else
11620   echo "configure: failed program was:" >&5
11621   cat conftest.$ac_ext >&5
11622   rm -rf conftest*
11623   eval "ac_cv_lib_$ac_lib_var=no"
11624 fi
11625 rm -f conftest*
11626 LIBS="$ac_save_LIBS"
11627
11628 fi
11629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11630   echo "$ac_t""yes" 1>&6
11631     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11632     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11633   cat >> confdefs.h <<EOF
11634 #define $ac_tr_lib 1
11635 EOF
11636
11637   LIBS="-lnsl $LIBS"
11638
11639 else
11640   echo "$ac_t""no" 1>&6
11641 fi
11642
11643         else
11644                 echo "configure: warning: could not find -lwrap" 1>&2
11645                 if test $ol_enable_wrappers = yes ; then
11646                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
11647                 fi
11648
11649                 echo "configure: warning: disabling wrappers support" 1>&2
11650                 ol_enable_wrappers=no
11651         fi
11652 fi
11653
11654 if test $ol_enable_syslog != no ; then
11655         echo $ac_n "checking for openlog""... $ac_c" 1>&6
11656 echo "configure:11657: checking for openlog" >&5
11657 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
11658   echo $ac_n "(cached) $ac_c" 1>&6
11659 else
11660   cat > conftest.$ac_ext <<EOF
11661 #line 11662 "configure"
11662 #include "confdefs.h"
11663 /* System header to define __stub macros and hopefully few prototypes,
11664     which can conflict with char openlog(); below.  */
11665 #include <assert.h>
11666 /* Override any gcc2 internal prototype to avoid an error.  */
11667 /* We use char because int might match the return type of a gcc2
11668     builtin and then its argument prototype would still apply.  */
11669 char openlog();
11670 char (*f)();
11671
11672 int main() {
11673
11674 /* The GNU C library defines this for functions which it implements
11675     to always fail with ENOSYS.  Some functions are actually named
11676     something starting with __ and the normal name is an alias.  */
11677 #if defined (__stub_openlog) || defined (__stub___openlog)
11678 choke me
11679 #else
11680 f = openlog;
11681 #endif
11682
11683 ; return 0; }
11684 EOF
11685 if { (eval echo configure:11686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11686   rm -rf conftest*
11687   eval "ac_cv_func_openlog=yes"
11688 else
11689   echo "configure: failed program was:" >&5
11690   cat conftest.$ac_ext >&5
11691   rm -rf conftest*
11692   eval "ac_cv_func_openlog=no"
11693 fi
11694 rm -f conftest*
11695 fi
11696
11697 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
11698   echo "$ac_t""yes" 1>&6
11699   :
11700 else
11701   echo "$ac_t""no" 1>&6
11702 fi
11703
11704         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
11705                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
11706         fi
11707         ol_enable_syslog=$ac_cv_func_openlog
11708 fi
11709
11710 if test $ol_enable_dmalloc != no ; then
11711         for ac_hdr in dmalloc.h
11712 do
11713 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11714 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11715 echo "configure:11716: checking for $ac_hdr" >&5
11716 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11717   echo $ac_n "(cached) $ac_c" 1>&6
11718 else
11719   cat > conftest.$ac_ext <<EOF
11720 #line 11721 "configure"
11721 #include "confdefs.h"
11722 #include <$ac_hdr>
11723 EOF
11724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11725 { (eval echo configure:11726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11727 if test -z "$ac_err"; then
11728   rm -rf conftest*
11729   eval "ac_cv_header_$ac_safe=yes"
11730 else
11731   echo "$ac_err" >&5
11732   echo "configure: failed program was:" >&5
11733   cat conftest.$ac_ext >&5
11734   rm -rf conftest*
11735   eval "ac_cv_header_$ac_safe=no"
11736 fi
11737 rm -f conftest*
11738 fi
11739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11740   echo "$ac_t""yes" 1>&6
11741     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11742   cat >> confdefs.h <<EOF
11743 #define $ac_tr_hdr 1
11744 EOF
11745  
11746 else
11747   echo "$ac_t""no" 1>&6
11748 fi
11749 done
11750
11751         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
11752 echo "configure:11753: checking for dmalloc_shutdown in -ldmalloc" >&5
11753 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-:%__p__%'`
11754 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11755   echo $ac_n "(cached) $ac_c" 1>&6
11756 else
11757   ac_save_LIBS="$LIBS"
11758 LIBS="-ldmalloc  $LIBS"
11759 cat > conftest.$ac_ext <<EOF
11760 #line 11761 "configure"
11761 #include "confdefs.h"
11762 /* Override any gcc2 internal prototype to avoid an error.  */
11763 /* We use char because int might match the return type of a gcc2
11764     builtin and then its argument prototype would still apply.  */
11765 char dmalloc_shutdown();
11766
11767 int main() {
11768 dmalloc_shutdown()
11769 ; return 0; }
11770 EOF
11771 if { (eval echo configure:11772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11772   rm -rf conftest*
11773   eval "ac_cv_lib_$ac_lib_var=yes"
11774 else
11775   echo "configure: failed program was:" >&5
11776   cat conftest.$ac_ext >&5
11777   rm -rf conftest*
11778   eval "ac_cv_lib_$ac_lib_var=no"
11779 fi
11780 rm -f conftest*
11781 LIBS="$ac_save_LIBS"
11782
11783 fi
11784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11785   echo "$ac_t""yes" 1>&6
11786     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11787     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11788   cat >> confdefs.h <<EOF
11789 #define $ac_tr_lib 1
11790 EOF
11791
11792   LIBS="-ldmalloc $LIBS"
11793
11794 else
11795   echo "$ac_t""no" 1>&6
11796 fi
11797
11798 fi
11799
11800 if test $ol_enable_tcl != no ; then
11801         for ac_hdr in tcl.h
11802 do
11803 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11804 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11805 echo "configure:11806: checking for $ac_hdr" >&5
11806 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11807   echo $ac_n "(cached) $ac_c" 1>&6
11808 else
11809   cat > conftest.$ac_ext <<EOF
11810 #line 11811 "configure"
11811 #include "confdefs.h"
11812 #include <$ac_hdr>
11813 EOF
11814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11815 { (eval echo configure:11816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11817 if test -z "$ac_err"; then
11818   rm -rf conftest*
11819   eval "ac_cv_header_$ac_safe=yes"
11820 else
11821   echo "$ac_err" >&5
11822   echo "configure: failed program was:" >&5
11823   cat conftest.$ac_ext >&5
11824   rm -rf conftest*
11825   eval "ac_cv_header_$ac_safe=no"
11826 fi
11827 rm -f conftest*
11828 fi
11829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11830   echo "$ac_t""yes" 1>&6
11831     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11832   cat >> confdefs.h <<EOF
11833 #define $ac_tr_hdr 1
11834 EOF
11835  
11836 else
11837   echo "$ac_t""no" 1>&6
11838 fi
11839 done
11840
11841
11842         if test $ac_cv_header_tcl_h != yes ; then
11843                 have_tcl=no
11844         else
11845                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
11846 echo "configure:11847: checking for main in -ltcl" >&5
11847 ac_lib_var=`echo tcl'_'main | sed 'y%./+-:%__p__%'`
11848 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11849   echo $ac_n "(cached) $ac_c" 1>&6
11850 else
11851   ac_save_LIBS="$LIBS"
11852 LIBS="-ltcl  $LIBS"
11853 cat > conftest.$ac_ext <<EOF
11854 #line 11855 "configure"
11855 #include "confdefs.h"
11856
11857 int main() {
11858 main()
11859 ; return 0; }
11860 EOF
11861 if { (eval echo configure:11862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11862   rm -rf conftest*
11863   eval "ac_cv_lib_$ac_lib_var=yes"
11864 else
11865   echo "configure: failed program was:" >&5
11866   cat conftest.$ac_ext >&5
11867   rm -rf conftest*
11868   eval "ac_cv_lib_$ac_lib_var=no"
11869 fi
11870 rm -f conftest*
11871 LIBS="$ac_save_LIBS"
11872
11873 fi
11874 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11875   echo "$ac_t""yes" 1>&6
11876   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
11877 else
11878   echo "$ac_t""no" 1>&6
11879 have_tcl=no
11880 fi
11881
11882
11883                 if test $have_tcl != yes; then
11884                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
11885 echo "configure:11886: checking for main in -ltcl7.6" >&5
11886 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-:%__p__%'`
11887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11888   echo $ac_n "(cached) $ac_c" 1>&6
11889 else
11890   ac_save_LIBS="$LIBS"
11891 LIBS="-ltcl7.6  $LIBS"
11892 cat > conftest.$ac_ext <<EOF
11893 #line 11894 "configure"
11894 #include "confdefs.h"
11895
11896 int main() {
11897 main()
11898 ; return 0; }
11899 EOF
11900 if { (eval echo configure:11901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11901   rm -rf conftest*
11902   eval "ac_cv_lib_$ac_lib_var=yes"
11903 else
11904   echo "configure: failed program was:" >&5
11905   cat conftest.$ac_ext >&5
11906   rm -rf conftest*
11907   eval "ac_cv_lib_$ac_lib_var=no"
11908 fi
11909 rm -f conftest*
11910 LIBS="$ac_save_LIBS"
11911
11912 fi
11913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11914   echo "$ac_t""yes" 1>&6
11915   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
11916 else
11917   echo "$ac_t""no" 1>&6
11918 have_tcl=no
11919 fi
11920
11921                 fi
11922
11923                 if test $have_tcl != yes; then
11924                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
11925 echo "configure:11926: checking for main in -ltcl8.0" >&5
11926 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-:%__p__%'`
11927 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11928   echo $ac_n "(cached) $ac_c" 1>&6
11929 else
11930   ac_save_LIBS="$LIBS"
11931 LIBS="-ltcl8.0  $LIBS"
11932 cat > conftest.$ac_ext <<EOF
11933 #line 11934 "configure"
11934 #include "confdefs.h"
11935
11936 int main() {
11937 main()
11938 ; return 0; }
11939 EOF
11940 if { (eval echo configure:11941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11941   rm -rf conftest*
11942   eval "ac_cv_lib_$ac_lib_var=yes"
11943 else
11944   echo "configure: failed program was:" >&5
11945   cat conftest.$ac_ext >&5
11946   rm -rf conftest*
11947   eval "ac_cv_lib_$ac_lib_var=no"
11948 fi
11949 rm -f conftest*
11950 LIBS="$ac_save_LIBS"
11951
11952 fi
11953 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11954   echo "$ac_t""yes" 1>&6
11955   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
11956 else
11957   echo "$ac_t""no" 1>&6
11958 have_tcl=no
11959 fi
11960
11961                 fi
11962         fi
11963
11964         if test $have_tcl != yes ; then
11965                 echo "configure: warning: could not find -ltcl" 1>&2
11966                 if test $ol_enable_tcl = yes ; then
11967                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
11968                 fi
11969
11970                 ol_enable_tcl=no
11971         fi
11972 fi
11973
11974 # ud needs termcap (should insert check here)
11975 ol_link_termcap=no
11976 for ac_hdr in termcap.h ncurses.h
11977 do
11978 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11979 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11980 echo "configure:11981: checking for $ac_hdr" >&5
11981 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11982   echo $ac_n "(cached) $ac_c" 1>&6
11983 else
11984   cat > conftest.$ac_ext <<EOF
11985 #line 11986 "configure"
11986 #include "confdefs.h"
11987 #include <$ac_hdr>
11988 EOF
11989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11990 { (eval echo configure:11991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11992 if test -z "$ac_err"; then
11993   rm -rf conftest*
11994   eval "ac_cv_header_$ac_safe=yes"
11995 else
11996   echo "$ac_err" >&5
11997   echo "configure: failed program was:" >&5
11998   cat conftest.$ac_ext >&5
11999   rm -rf conftest*
12000   eval "ac_cv_header_$ac_safe=no"
12001 fi
12002 rm -f conftest*
12003 fi
12004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12005   echo "$ac_t""yes" 1>&6
12006     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12007   cat >> confdefs.h <<EOF
12008 #define $ac_tr_hdr 1
12009 EOF
12010  
12011 else
12012   echo "$ac_t""no" 1>&6
12013 fi
12014 done
12015
12016
12017 if test $ol_link_termcap = no ; then
12018         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
12019 echo "configure:12020: checking for tputs in -ltermcap" >&5
12020 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
12021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12022   echo $ac_n "(cached) $ac_c" 1>&6
12023 else
12024   ac_save_LIBS="$LIBS"
12025 LIBS="-ltermcap  $LIBS"
12026 cat > conftest.$ac_ext <<EOF
12027 #line 12028 "configure"
12028 #include "confdefs.h"
12029 /* Override any gcc2 internal prototype to avoid an error.  */
12030 /* We use char because int might match the return type of a gcc2
12031     builtin and then its argument prototype would still apply.  */
12032 char tputs();
12033
12034 int main() {
12035 tputs()
12036 ; return 0; }
12037 EOF
12038 if { (eval echo configure:12039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12039   rm -rf conftest*
12040   eval "ac_cv_lib_$ac_lib_var=yes"
12041 else
12042   echo "configure: failed program was:" >&5
12043   cat conftest.$ac_ext >&5
12044   rm -rf conftest*
12045   eval "ac_cv_lib_$ac_lib_var=no"
12046 fi
12047 rm -f conftest*
12048 LIBS="$ac_save_LIBS"
12049
12050 fi
12051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12052   echo "$ac_t""yes" 1>&6
12053   have_termcap=yes
12054 else
12055   echo "$ac_t""no" 1>&6
12056 have_termcap=no
12057 fi
12058
12059         if test $have_termcap = yes ; then
12060                 cat >> confdefs.h <<\EOF
12061 #define HAVE_TERMCAP 1
12062 EOF
12063
12064                 ol_link_termcap=yes
12065                 TERMCAP_LIBS=-ltermcap
12066         fi
12067 fi
12068
12069 if test $ol_link_termcap = no ; then
12070         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
12071 echo "configure:12072: checking for initscr in -lncurses" >&5
12072 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
12073 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12074   echo $ac_n "(cached) $ac_c" 1>&6
12075 else
12076   ac_save_LIBS="$LIBS"
12077 LIBS="-lncurses  $LIBS"
12078 cat > conftest.$ac_ext <<EOF
12079 #line 12080 "configure"
12080 #include "confdefs.h"
12081 /* Override any gcc2 internal prototype to avoid an error.  */
12082 /* We use char because int might match the return type of a gcc2
12083     builtin and then its argument prototype would still apply.  */
12084 char initscr();
12085
12086 int main() {
12087 initscr()
12088 ; return 0; }
12089 EOF
12090 if { (eval echo configure:12091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12091   rm -rf conftest*
12092   eval "ac_cv_lib_$ac_lib_var=yes"
12093 else
12094   echo "configure: failed program was:" >&5
12095   cat conftest.$ac_ext >&5
12096   rm -rf conftest*
12097   eval "ac_cv_lib_$ac_lib_var=no"
12098 fi
12099 rm -f conftest*
12100 LIBS="$ac_save_LIBS"
12101
12102 fi
12103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12104   echo "$ac_t""yes" 1>&6
12105   have_ncurses=yes
12106 else
12107   echo "$ac_t""no" 1>&6
12108 have_ncurses=no
12109 fi
12110
12111         if test $have_ncurses = yes ; then
12112                 cat >> confdefs.h <<\EOF
12113 #define HAVE_NCURSES 1
12114 EOF
12115
12116                 ol_link_termcap=yes
12117                 TERMCAP_LIBS=-lncurses
12118         fi
12119 fi
12120
12121 if test $ol_link_termcap = no ; then
12122         cat >> confdefs.h <<\EOF
12123 #define NO_TERMCAP 1
12124 EOF
12125
12126         TERMCAP_LIBS=
12127 fi
12128
12129 ol_link_sasl=no
12130 if test $ol_with_cyrus_sasl != no ; then
12131         ac_safe=`echo "sasl.h" | sed 'y%./+-%__p_%'`
12132 echo $ac_n "checking for sasl.h""... $ac_c" 1>&6
12133 echo "configure:12134: checking for sasl.h" >&5
12134 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12135   echo $ac_n "(cached) $ac_c" 1>&6
12136 else
12137   cat > conftest.$ac_ext <<EOF
12138 #line 12139 "configure"
12139 #include "confdefs.h"
12140 #include <sasl.h>
12141 EOF
12142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12143 { (eval echo configure:12144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12145 if test -z "$ac_err"; then
12146   rm -rf conftest*
12147   eval "ac_cv_header_$ac_safe=yes"
12148 else
12149   echo "$ac_err" >&5
12150   echo "configure: failed program was:" >&5
12151   cat conftest.$ac_ext >&5
12152   rm -rf conftest*
12153   eval "ac_cv_header_$ac_safe=no"
12154 fi
12155 rm -f conftest*
12156 fi
12157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12158   echo "$ac_t""yes" 1>&6
12159   :
12160 else
12161   echo "$ac_t""no" 1>&6
12162 fi
12163
12164
12165         if test $ac_cv_header_sasl_h = yes ; then
12166                 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
12167 echo "configure:12168: checking for sasl_client_init in -lsasl" >&5
12168 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
12169 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12170   echo $ac_n "(cached) $ac_c" 1>&6
12171 else
12172   ac_save_LIBS="$LIBS"
12173 LIBS="-lsasl  $LIBS"
12174 cat > conftest.$ac_ext <<EOF
12175 #line 12176 "configure"
12176 #include "confdefs.h"
12177 /* Override any gcc2 internal prototype to avoid an error.  */
12178 /* We use char because int might match the return type of a gcc2
12179     builtin and then its argument prototype would still apply.  */
12180 char sasl_client_init();
12181
12182 int main() {
12183 sasl_client_init()
12184 ; return 0; }
12185 EOF
12186 if { (eval echo configure:12187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12187   rm -rf conftest*
12188   eval "ac_cv_lib_$ac_lib_var=yes"
12189 else
12190   echo "configure: failed program was:" >&5
12191   cat conftest.$ac_ext >&5
12192   rm -rf conftest*
12193   eval "ac_cv_lib_$ac_lib_var=no"
12194 fi
12195 rm -f conftest*
12196 LIBS="$ac_save_LIBS"
12197
12198 fi
12199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12200   echo "$ac_t""yes" 1>&6
12201   have_cyrus_sasl=yes
12202 else
12203   echo "$ac_t""no" 1>&6
12204 have_cyrus_sasl=no
12205 fi
12206
12207
12208                 if test $have_cyrus_sasl != no ; then
12209                         SASL_LIBS="-lsasl"
12210                         cat >> confdefs.h <<\EOF
12211 #define HAVE_CYRUS_SASL 1
12212 EOF
12213
12214                         ol_link_sasl=yes
12215                 fi
12216         fi
12217
12218         if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
12219                 { echo "configure: error: no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl" 1>&2; exit 1; }
12220         fi
12221 fi
12222
12223 ol_link_fetch=no
12224 if test $ol_with_fetch != no ; then
12225         ol=$LIBS
12226 LIBS="-lfetch -lcom_err $LIBS"
12227 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
12228 echo "configure:12229: checking fetch(3) library" >&5
12229 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
12230   echo $ac_n "(cached) $ac_c" 1>&6
12231 else
12232   
12233         cat > conftest.$ac_ext <<EOF
12234 #line 12235 "configure"
12235 #include "confdefs.h"
12236
12237 #include <sys/param.h>
12238 #include <stdio.h>
12239 #include <fetch.h>
12240 int main() {
12241 struct url *u = fetchParseURL("file:///"); 
12242 ; return 0; }
12243 EOF
12244 if { (eval echo configure:12245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12245   rm -rf conftest*
12246   ol_cv_lib_fetch=yes
12247 else
12248   echo "configure: failed program was:" >&5
12249   cat conftest.$ac_ext >&5
12250   rm -rf conftest*
12251   ol_cv_lib_fetch=no
12252 fi
12253 rm -f conftest*
12254 fi
12255
12256 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
12257 LIBS=$ol_LIBS
12258 if test $ol_cv_lib_fetch != no ; then
12259         ol_link_fetch="-lfetch -lcom_err"
12260         cat >> confdefs.h <<\EOF
12261 #define HAVE_FETCH 1
12262 EOF
12263
12264 fi
12265
12266
12267         if test $ol_cv_lib_fetch != no ; then
12268                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
12269                 ol_link_fetch=freebsd
12270
12271         elif test $ol_with_fetch != auto ; then
12272                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
12273         fi 
12274 fi
12275
12276 ol_link_readline=no
12277 if test $ol_with_readline != no ; then
12278         for ac_hdr in readline/readline.h readline/history.h
12279 do
12280 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12281 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12282 echo "configure:12283: checking for $ac_hdr" >&5
12283 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
12284   echo $ac_n "(cached) $ac_c" 1>&6
12285 else
12286   cat > conftest.$ac_ext <<EOF
12287 #line 12288 "configure"
12288 #include "confdefs.h"
12289 #include <$ac_hdr>
12290 EOF
12291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12292 { (eval echo configure:12293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12294 if test -z "$ac_err"; then
12295   rm -rf conftest*
12296   eval "ac_cv_header_$ac_safe=yes"
12297 else
12298   echo "$ac_err" >&5
12299   echo "configure: failed program was:" >&5
12300   cat conftest.$ac_ext >&5
12301   rm -rf conftest*
12302   eval "ac_cv_header_$ac_safe=no"
12303 fi
12304 rm -f conftest*
12305 fi
12306 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12307   echo "$ac_t""yes" 1>&6
12308     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12309   cat >> confdefs.h <<EOF
12310 #define $ac_tr_hdr 1
12311 EOF
12312  
12313 else
12314   echo "$ac_t""no" 1>&6
12315 fi
12316 done
12317
12318
12319         if test $ac_cv_header_readline_readline_h = yes ; then
12320                 save_LIBS="$LIBS"
12321                 LIBS="$TERMCAP_LIBS $LIBS"
12322                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
12323 echo "configure:12324: checking for readline in -lreadline" >&5
12324 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
12325 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12326   echo $ac_n "(cached) $ac_c" 1>&6
12327 else
12328   ac_save_LIBS="$LIBS"
12329 LIBS="-lreadline  $LIBS"
12330 cat > conftest.$ac_ext <<EOF
12331 #line 12332 "configure"
12332 #include "confdefs.h"
12333 /* Override any gcc2 internal prototype to avoid an error.  */
12334 /* We use char because int might match the return type of a gcc2
12335     builtin and then its argument prototype would still apply.  */
12336 char readline();
12337
12338 int main() {
12339 readline()
12340 ; return 0; }
12341 EOF
12342 if { (eval echo configure:12343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12343   rm -rf conftest*
12344   eval "ac_cv_lib_$ac_lib_var=yes"
12345 else
12346   echo "configure: failed program was:" >&5
12347   cat conftest.$ac_ext >&5
12348   rm -rf conftest*
12349   eval "ac_cv_lib_$ac_lib_var=no"
12350 fi
12351 rm -f conftest*
12352 LIBS="$ac_save_LIBS"
12353
12354 fi
12355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12356   echo "$ac_t""yes" 1>&6
12357   have_readline=yes
12358 else
12359   echo "$ac_t""no" 1>&6
12360 have_readline=no
12361 fi
12362
12363                 LIBS="$save_LIBS"
12364                         
12365                 if test $have_readline = yes ; then
12366                         ol_with_readline=found
12367                         ol_link_readline=yes
12368
12369                         READLINE_LIBS="-lreadline"
12370                 fi
12371         fi
12372 fi
12373
12374 if test $ol_link_readline = yes ; then
12375         cat >> confdefs.h <<\EOF
12376 #define HAVE_READLINE 1
12377 EOF
12378
12379 fi
12380
12381
12382 # FreeBSD (and others) have crypt(3) in -lcrypt
12383 if test $ol_enable_crypt != no ; then
12384         echo $ac_n "checking for crypt""... $ac_c" 1>&6
12385 echo "configure:12386: checking for crypt" >&5
12386 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
12387   echo $ac_n "(cached) $ac_c" 1>&6
12388 else
12389   cat > conftest.$ac_ext <<EOF
12390 #line 12391 "configure"
12391 #include "confdefs.h"
12392 /* System header to define __stub macros and hopefully few prototypes,
12393     which can conflict with char crypt(); below.  */
12394 #include <assert.h>
12395 /* Override any gcc2 internal prototype to avoid an error.  */
12396 /* We use char because int might match the return type of a gcc2
12397     builtin and then its argument prototype would still apply.  */
12398 char crypt();
12399 char (*f)();
12400
12401 int main() {
12402
12403 /* The GNU C library defines this for functions which it implements
12404     to always fail with ENOSYS.  Some functions are actually named
12405     something starting with __ and the normal name is an alias.  */
12406 #if defined (__stub_crypt) || defined (__stub___crypt)
12407 choke me
12408 #else
12409 f = crypt;
12410 #endif
12411
12412 ; return 0; }
12413 EOF
12414 if { (eval echo configure:12415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12415   rm -rf conftest*
12416   eval "ac_cv_func_crypt=yes"
12417 else
12418   echo "configure: failed program was:" >&5
12419   cat conftest.$ac_ext >&5
12420   rm -rf conftest*
12421   eval "ac_cv_func_crypt=no"
12422 fi
12423 rm -f conftest*
12424 fi
12425
12426 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
12427   echo "$ac_t""yes" 1>&6
12428   have_crypt=yes
12429 else
12430   echo "$ac_t""no" 1>&6
12431
12432                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12433 echo "configure:12434: checking for crypt in -lcrypt" >&5
12434 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
12435 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12436   echo $ac_n "(cached) $ac_c" 1>&6
12437 else
12438   ac_save_LIBS="$LIBS"
12439 LIBS="-lcrypt  $LIBS"
12440 cat > conftest.$ac_ext <<EOF
12441 #line 12442 "configure"
12442 #include "confdefs.h"
12443 /* Override any gcc2 internal prototype to avoid an error.  */
12444 /* We use char because int might match the return type of a gcc2
12445     builtin and then its argument prototype would still apply.  */
12446 char crypt();
12447
12448 int main() {
12449 crypt()
12450 ; return 0; }
12451 EOF
12452 if { (eval echo configure:12453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12453   rm -rf conftest*
12454   eval "ac_cv_lib_$ac_lib_var=yes"
12455 else
12456   echo "configure: failed program was:" >&5
12457   cat conftest.$ac_ext >&5
12458   rm -rf conftest*
12459   eval "ac_cv_lib_$ac_lib_var=no"
12460 fi
12461 rm -f conftest*
12462 LIBS="$ac_save_LIBS"
12463
12464 fi
12465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12466   echo "$ac_t""yes" 1>&6
12467   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
12468                         have_crypt=yes
12469 else
12470   echo "$ac_t""no" 1>&6
12471 have_crypt=no
12472 fi
12473
12474 fi
12475
12476
12477         if test $have_crypt = yes ; then
12478                 cat >> confdefs.h <<\EOF
12479 #define HAVE_CRYPT 1
12480 EOF
12481
12482         else
12483                 echo "configure: warning: could not find crypt" 1>&2
12484                 if test $ol_enable_crypt = yes ; then
12485                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
12486                 fi
12487
12488                 echo "configure: warning: disabling crypt support" 1>&2
12489                 ol_enable_crypt=no
12490         fi
12491 fi
12492
12493 # FreeBSD (and others) have setproctitle(3) in -lutil
12494 if test $ol_enable_proctitle != no ; then
12495         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
12496 echo "configure:12497: checking for setproctitle" >&5
12497 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
12498   echo $ac_n "(cached) $ac_c" 1>&6
12499 else
12500   cat > conftest.$ac_ext <<EOF
12501 #line 12502 "configure"
12502 #include "confdefs.h"
12503 /* System header to define __stub macros and hopefully few prototypes,
12504     which can conflict with char setproctitle(); below.  */
12505 #include <assert.h>
12506 /* Override any gcc2 internal prototype to avoid an error.  */
12507 /* We use char because int might match the return type of a gcc2
12508     builtin and then its argument prototype would still apply.  */
12509 char setproctitle();
12510 char (*f)();
12511
12512 int main() {
12513
12514 /* The GNU C library defines this for functions which it implements
12515     to always fail with ENOSYS.  Some functions are actually named
12516     something starting with __ and the normal name is an alias.  */
12517 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
12518 choke me
12519 #else
12520 f = setproctitle;
12521 #endif
12522
12523 ; return 0; }
12524 EOF
12525 if { (eval echo configure:12526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12526   rm -rf conftest*
12527   eval "ac_cv_func_setproctitle=yes"
12528 else
12529   echo "configure: failed program was:" >&5
12530   cat conftest.$ac_ext >&5
12531   rm -rf conftest*
12532   eval "ac_cv_func_setproctitle=no"
12533 fi
12534 rm -f conftest*
12535 fi
12536
12537 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
12538   echo "$ac_t""yes" 1>&6
12539   have_setproctitle=yes
12540 else
12541   echo "$ac_t""no" 1>&6
12542
12543                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
12544 echo "configure:12545: checking for setproctitle in -lutil" >&5
12545 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
12546 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
12547   echo $ac_n "(cached) $ac_c" 1>&6
12548 else
12549   ac_save_LIBS="$LIBS"
12550 LIBS="-lutil  $LIBS"
12551 cat > conftest.$ac_ext <<EOF
12552 #line 12553 "configure"
12553 #include "confdefs.h"
12554 /* Override any gcc2 internal prototype to avoid an error.  */
12555 /* We use char because int might match the return type of a gcc2
12556     builtin and then its argument prototype would still apply.  */
12557 char setproctitle();
12558
12559 int main() {
12560 setproctitle()
12561 ; return 0; }
12562 EOF
12563 if { (eval echo configure:12564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12564   rm -rf conftest*
12565   eval "ac_cv_lib_$ac_lib_var=yes"
12566 else
12567   echo "configure: failed program was:" >&5
12568   cat conftest.$ac_ext >&5
12569   rm -rf conftest*
12570   eval "ac_cv_lib_$ac_lib_var=no"
12571 fi
12572 rm -f conftest*
12573 LIBS="$ac_save_LIBS"
12574
12575 fi
12576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12577   echo "$ac_t""yes" 1>&6
12578   have_setproctitle=yes
12579                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
12580 else
12581   echo "$ac_t""no" 1>&6
12582 have_setproctitle=no
12583                         LIBOBJS="$LIBOBJS setproctitle.o"
12584 fi
12585
12586 fi
12587
12588
12589         if test $have_setproctitle = yes ; then
12590                 cat >> confdefs.h <<\EOF
12591 #define HAVE_SETPROCTITLE 1
12592 EOF
12593
12594         fi
12595 fi
12596
12597 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
12598 echo "configure:12599: checking for uid_t in sys/types.h" >&5
12599 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
12600   echo $ac_n "(cached) $ac_c" 1>&6
12601 else
12602   cat > conftest.$ac_ext <<EOF
12603 #line 12604 "configure"
12604 #include "confdefs.h"
12605 #include <sys/types.h>
12606 EOF
12607 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12608   egrep "uid_t" >/dev/null 2>&1; then
12609   rm -rf conftest*
12610   ac_cv_type_uid_t=yes
12611 else
12612   rm -rf conftest*
12613   ac_cv_type_uid_t=no
12614 fi
12615 rm -f conftest*
12616
12617 fi
12618
12619 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
12620 if test $ac_cv_type_uid_t = no; then
12621   cat >> confdefs.h <<\EOF
12622 #define uid_t int
12623 EOF
12624
12625   cat >> confdefs.h <<\EOF
12626 #define gid_t int
12627 EOF
12628
12629 fi
12630
12631 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
12632 echo "configure:12633: checking type of array argument to getgroups" >&5
12633 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
12634   echo $ac_n "(cached) $ac_c" 1>&6
12635 else
12636   if test "$cross_compiling" = yes; then
12637   ac_cv_type_getgroups=cross
12638 else
12639   cat > conftest.$ac_ext <<EOF
12640 #line 12641 "configure"
12641 #include "confdefs.h"
12642
12643 /* Thanks to Mike Rendell for this test.  */
12644 #include <sys/types.h>
12645 #define NGID 256
12646 #undef MAX
12647 #define MAX(x, y) ((x) > (y) ? (x) : (y))
12648 main()
12649 {
12650   gid_t gidset[NGID];
12651   int i, n;
12652   union { gid_t gval; long lval; }  val;
12653
12654   val.lval = -1;
12655   for (i = 0; i < NGID; i++)
12656     gidset[i] = val.gval;
12657   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
12658                  gidset);
12659   /* Exit non-zero if getgroups seems to require an array of ints.  This
12660      happens when gid_t is short but getgroups modifies an array of ints.  */
12661   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
12662 }
12663
12664 EOF
12665 if { (eval echo configure:12666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12666 then
12667     ac_cv_type_getgroups=gid_t
12668 else
12669   echo "configure: failed program was:" >&5
12670   cat conftest.$ac_ext >&5
12671   rm -fr conftest*
12672   ac_cv_type_getgroups=int
12673 fi
12674 rm -fr conftest*
12675 fi
12676
12677 if test $ac_cv_type_getgroups = cross; then
12678         cat > conftest.$ac_ext <<EOF
12679 #line 12680 "configure"
12680 #include "confdefs.h"
12681 #include <unistd.h>
12682 EOF
12683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12684   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
12685   rm -rf conftest*
12686   ac_cv_type_getgroups=gid_t
12687 else
12688   rm -rf conftest*
12689   ac_cv_type_getgroups=int
12690 fi
12691 rm -f conftest*
12692
12693 fi
12694 fi
12695
12696 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
12697 cat >> confdefs.h <<EOF
12698 #define GETGROUPS_T $ac_cv_type_getgroups
12699 EOF
12700
12701  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
12702 echo "configure:12703: checking for ANSI C header files" >&5
12703 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
12704   echo $ac_n "(cached) $ac_c" 1>&6
12705 else
12706   cat > conftest.$ac_ext <<EOF
12707 #line 12708 "configure"
12708 #include "confdefs.h"
12709 #include <stdlib.h>
12710 #include <stdarg.h>
12711 #include <string.h>
12712 #include <float.h>
12713 EOF
12714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12715 { (eval echo configure:12716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12717 if test -z "$ac_err"; then
12718   rm -rf conftest*
12719   ac_cv_header_stdc=yes
12720 else
12721   echo "$ac_err" >&5
12722   echo "configure: failed program was:" >&5
12723   cat conftest.$ac_ext >&5
12724   rm -rf conftest*
12725   ac_cv_header_stdc=no
12726 fi
12727 rm -f conftest*
12728
12729 if test $ac_cv_header_stdc = yes; then
12730   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12731 cat > conftest.$ac_ext <<EOF
12732 #line 12733 "configure"
12733 #include "confdefs.h"
12734 #include <string.h>
12735 EOF
12736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12737   egrep "memchr" >/dev/null 2>&1; then
12738   :
12739 else
12740   rm -rf conftest*
12741   ac_cv_header_stdc=no
12742 fi
12743 rm -f conftest*
12744
12745 fi
12746
12747 if test $ac_cv_header_stdc = yes; then
12748   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12749 cat > conftest.$ac_ext <<EOF
12750 #line 12751 "configure"
12751 #include "confdefs.h"
12752 #include <stdlib.h>
12753 EOF
12754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12755   egrep "free" >/dev/null 2>&1; then
12756   :
12757 else
12758   rm -rf conftest*
12759   ac_cv_header_stdc=no
12760 fi
12761 rm -f conftest*
12762
12763 fi
12764
12765 if test $ac_cv_header_stdc = yes; then
12766   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12767 if test "$cross_compiling" = yes; then
12768   :
12769 else
12770   cat > conftest.$ac_ext <<EOF
12771 #line 12772 "configure"
12772 #include "confdefs.h"
12773 #include <ctype.h>
12774 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12775 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12776 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12777 int main () { int i; for (i = 0; i < 256; i++)
12778 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12779 exit (0); }
12780
12781 EOF
12782 if { (eval echo configure:12783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12783 then
12784   :
12785 else
12786   echo "configure: failed program was:" >&5
12787   cat conftest.$ac_ext >&5
12788   rm -fr conftest*
12789   ac_cv_header_stdc=no
12790 fi
12791 rm -fr conftest*
12792 fi
12793
12794 fi
12795 fi
12796
12797 echo "$ac_t""$ac_cv_header_stdc" 1>&6
12798 if test $ac_cv_header_stdc = yes; then
12799   cat >> confdefs.h <<\EOF
12800 #define STDC_HEADERS 1
12801 EOF
12802
12803 fi
12804
12805 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12806 echo "configure:12807: checking for mode_t" >&5
12807 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
12808   echo $ac_n "(cached) $ac_c" 1>&6
12809 else
12810   cat > conftest.$ac_ext <<EOF
12811 #line 12812 "configure"
12812 #include "confdefs.h"
12813 #include <sys/types.h>
12814 #if STDC_HEADERS
12815 #include <stdlib.h>
12816 #include <stddef.h>
12817 #endif
12818 EOF
12819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12820   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12821   rm -rf conftest*
12822   eval "ac_cv_type_mode_t=yes"
12823 else
12824   rm -rf conftest*
12825   eval "ac_cv_type_mode_t=no"
12826 fi
12827 rm -f conftest*
12828
12829 fi
12830 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
12831   echo "$ac_t""yes" 1>&6
12832 else
12833   echo "$ac_t""no" 1>&6
12834   cat >> confdefs.h <<EOF
12835 #define mode_t int
12836 EOF
12837
12838 fi
12839
12840 echo $ac_n "checking for off_t""... $ac_c" 1>&6
12841 echo "configure:12842: checking for off_t" >&5
12842 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
12843   echo $ac_n "(cached) $ac_c" 1>&6
12844 else
12845   cat > conftest.$ac_ext <<EOF
12846 #line 12847 "configure"
12847 #include "confdefs.h"
12848 #include <sys/types.h>
12849 #if STDC_HEADERS
12850 #include <stdlib.h>
12851 #include <stddef.h>
12852 #endif
12853 EOF
12854 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12855   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12856   rm -rf conftest*
12857   eval "ac_cv_type_off_t=yes"
12858 else
12859   rm -rf conftest*
12860   eval "ac_cv_type_off_t=no"
12861 fi
12862 rm -f conftest*
12863
12864 fi
12865 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
12866   echo "$ac_t""yes" 1>&6
12867 else
12868   echo "$ac_t""no" 1>&6
12869   cat >> confdefs.h <<EOF
12870 #define off_t long
12871 EOF
12872
12873 fi
12874
12875 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
12876 echo "configure:12877: checking for pid_t" >&5
12877 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
12878   echo $ac_n "(cached) $ac_c" 1>&6
12879 else
12880   cat > conftest.$ac_ext <<EOF
12881 #line 12882 "configure"
12882 #include "confdefs.h"
12883 #include <sys/types.h>
12884 #if STDC_HEADERS
12885 #include <stdlib.h>
12886 #include <stddef.h>
12887 #endif
12888 EOF
12889 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12890   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12891   rm -rf conftest*
12892   eval "ac_cv_type_pid_t=yes"
12893 else
12894   rm -rf conftest*
12895   eval "ac_cv_type_pid_t=no"
12896 fi
12897 rm -f conftest*
12898
12899 fi
12900 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
12901   echo "$ac_t""yes" 1>&6
12902 else
12903   echo "$ac_t""no" 1>&6
12904   cat >> confdefs.h <<EOF
12905 #define pid_t int
12906 EOF
12907
12908 fi
12909
12910 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
12911 echo "configure:12912: checking for ptrdiff_t" >&5
12912 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
12913   echo $ac_n "(cached) $ac_c" 1>&6
12914 else
12915   cat > conftest.$ac_ext <<EOF
12916 #line 12917 "configure"
12917 #include "confdefs.h"
12918 #include <stddef.h>
12919 int main() {
12920 ptrdiff_t p
12921 ; return 0; }
12922 EOF
12923 if { (eval echo configure:12924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12924   rm -rf conftest*
12925   am_cv_type_ptrdiff_t=yes
12926 else
12927   echo "configure: failed program was:" >&5
12928   cat conftest.$ac_ext >&5
12929   rm -rf conftest*
12930   am_cv_type_ptrdiff_t=no
12931 fi
12932 rm -f conftest*
12933 fi
12934
12935 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
12936    if test $am_cv_type_ptrdiff_t = yes; then
12937      cat >> confdefs.h <<\EOF
12938 #define HAVE_PTRDIFF_T 1
12939 EOF
12940
12941    fi
12942
12943 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
12944 echo "configure:12945: checking return type of signal handlers" >&5
12945 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
12946   echo $ac_n "(cached) $ac_c" 1>&6
12947 else
12948   cat > conftest.$ac_ext <<EOF
12949 #line 12950 "configure"
12950 #include "confdefs.h"
12951 #include <sys/types.h>
12952 #include <signal.h>
12953 #ifdef signal
12954 #undef signal
12955 #endif
12956 #ifdef __cplusplus
12957 extern "C" void (*signal (int, void (*)(int)))(int);
12958 #else
12959 void (*signal ()) ();
12960 #endif
12961
12962 int main() {
12963 int i;
12964 ; return 0; }
12965 EOF
12966 if { (eval echo configure:12967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12967   rm -rf conftest*
12968   ac_cv_type_signal=void
12969 else
12970   echo "configure: failed program was:" >&5
12971   cat conftest.$ac_ext >&5
12972   rm -rf conftest*
12973   ac_cv_type_signal=int
12974 fi
12975 rm -f conftest*
12976 fi
12977
12978 echo "$ac_t""$ac_cv_type_signal" 1>&6
12979 cat >> confdefs.h <<EOF
12980 #define RETSIGTYPE $ac_cv_type_signal
12981 EOF
12982
12983
12984 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
12985 echo "configure:12986: checking for sig_atomic_t" >&5
12986 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
12987   echo $ac_n "(cached) $ac_c" 1>&6
12988 else
12989   cat > conftest.$ac_ext <<EOF
12990 #line 12991 "configure"
12991 #include "confdefs.h"
12992 #include <signal.h>
12993 int main() {
12994 sig_atomic_t atomic;
12995 ; return 0; }
12996 EOF
12997 if { (eval echo configure:12998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12998   rm -rf conftest*
12999   ol_cv_type_sig_atomic_t=yes
13000 else
13001   echo "configure: failed program was:" >&5
13002   cat conftest.$ac_ext >&5
13003   rm -rf conftest*
13004   ol_cv_type_sig_atomic_t=no
13005 fi
13006 rm -f conftest*
13007 fi
13008
13009 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
13010   if test $ol_cv_type_sig_atomic_t = no; then
13011     cat >> confdefs.h <<\EOF
13012 #define sig_atomic_t int
13013 EOF
13014
13015   fi
13016  
13017 echo $ac_n "checking for size_t""... $ac_c" 1>&6
13018 echo "configure:13019: checking for size_t" >&5
13019 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
13020   echo $ac_n "(cached) $ac_c" 1>&6
13021 else
13022   cat > conftest.$ac_ext <<EOF
13023 #line 13024 "configure"
13024 #include "confdefs.h"
13025 #include <sys/types.h>
13026 #if STDC_HEADERS
13027 #include <stdlib.h>
13028 #include <stddef.h>
13029 #endif
13030 EOF
13031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13032   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13033   rm -rf conftest*
13034   eval "ac_cv_type_size_t=yes"
13035 else
13036   rm -rf conftest*
13037   eval "ac_cv_type_size_t=no"
13038 fi
13039 rm -f conftest*
13040
13041 fi
13042 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
13043   echo "$ac_t""yes" 1>&6
13044 else
13045   echo "$ac_t""no" 1>&6
13046   cat >> confdefs.h <<EOF
13047 #define size_t unsigned
13048 EOF
13049
13050 fi
13051
13052 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
13053 echo "configure:13054: checking for socklen_t" >&5
13054 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
13055   echo $ac_n "(cached) $ac_c" 1>&6
13056 else
13057   cat > conftest.$ac_ext <<EOF
13058 #line 13059 "configure"
13059 #include "confdefs.h"
13060
13061 #ifdef HAVE_SYS_TYPES_H
13062 #include <sys/types.h>
13063 #endif
13064 #ifdef HAVE_SYS_SOCKET_H
13065 #include <sys/socket.h>
13066 #endif
13067
13068 int main() {
13069 socklen_t len;
13070 ; return 0; }
13071 EOF
13072 if { (eval echo configure:13073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13073   rm -rf conftest*
13074   ol_cv_type_socklen_t=yes
13075 else
13076   echo "configure: failed program was:" >&5
13077   cat conftest.$ac_ext >&5
13078   rm -rf conftest*
13079   ol_cv_type_socklen_t=no
13080 fi
13081 rm -f conftest*
13082 fi
13083
13084 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
13085   if test $ol_cv_type_socklen_t = no; then
13086     cat >> confdefs.h <<\EOF
13087 #define socklen_t int
13088 EOF
13089
13090   fi
13091  
13092 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
13093 echo "configure:13094: checking for member st_blksize in aggregate type struct stat" >&5
13094 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
13095   echo $ac_n "(cached) $ac_c" 1>&6
13096 else
13097   cat > conftest.$ac_ext <<EOF
13098 #line 13099 "configure"
13099 #include "confdefs.h"
13100 #include <sys/types.h>
13101 #include <sys/stat.h>
13102 int main() {
13103 struct stat foo; foo.st_blksize;
13104 ; return 0; }
13105 EOF
13106 if { (eval echo configure:13107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13107   rm -rf conftest*
13108   ac_cv_c_struct_member_st_blksize=yes
13109 else
13110   echo "configure: failed program was:" >&5
13111   cat conftest.$ac_ext >&5
13112   rm -rf conftest*
13113   ac_cv_c_struct_member_st_blksize=no
13114 fi
13115 rm -f conftest*
13116 fi
13117
13118 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
13119 st_blksize="$ac_cv_c_struct_member_st_blksize"
13120 if test $ac_cv_c_struct_member_st_blksize = yes; then
13121   cat >> confdefs.h <<\EOF
13122 #define HAVE_ST_BLKSIZE 1
13123 EOF
13124
13125 fi
13126
13127 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13128 echo "configure:13129: checking whether time.h and sys/time.h may both be included" >&5
13129 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
13130   echo $ac_n "(cached) $ac_c" 1>&6
13131 else
13132   cat > conftest.$ac_ext <<EOF
13133 #line 13134 "configure"
13134 #include "confdefs.h"
13135 #include <sys/types.h>
13136 #include <sys/time.h>
13137 #include <time.h>
13138 int main() {
13139 struct tm *tp;
13140 ; return 0; }
13141 EOF
13142 if { (eval echo configure:13143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13143   rm -rf conftest*
13144   ac_cv_header_time=yes
13145 else
13146   echo "configure: failed program was:" >&5
13147   cat conftest.$ac_ext >&5
13148   rm -rf conftest*
13149   ac_cv_header_time=no
13150 fi
13151 rm -f conftest*
13152 fi
13153
13154 echo "$ac_t""$ac_cv_header_time" 1>&6
13155 if test $ac_cv_header_time = yes; then
13156   cat >> confdefs.h <<\EOF
13157 #define TIME_WITH_SYS_TIME 1
13158 EOF
13159
13160 fi
13161
13162 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
13163 echo "configure:13164: checking whether struct tm is in sys/time.h or time.h" >&5
13164 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
13165   echo $ac_n "(cached) $ac_c" 1>&6
13166 else
13167   cat > conftest.$ac_ext <<EOF
13168 #line 13169 "configure"
13169 #include "confdefs.h"
13170 #include <sys/types.h>
13171 #include <time.h>
13172 int main() {
13173 struct tm *tp; tp->tm_sec;
13174 ; return 0; }
13175 EOF
13176 if { (eval echo configure:13177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13177   rm -rf conftest*
13178   ac_cv_struct_tm=time.h
13179 else
13180   echo "configure: failed program was:" >&5
13181   cat conftest.$ac_ext >&5
13182   rm -rf conftest*
13183   ac_cv_struct_tm=sys/time.h
13184 fi
13185 rm -f conftest*
13186 fi
13187
13188 echo "$ac_t""$ac_cv_struct_tm" 1>&6
13189 if test $ac_cv_struct_tm = sys/time.h; then
13190   cat >> confdefs.h <<\EOF
13191 #define TM_IN_SYS_TIME 1
13192 EOF
13193
13194 fi
13195
13196 # test for pw_gecos in struct passwd
13197 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
13198 echo "configure:13199: checking struct passwd for pw_gecos" >&5
13199 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
13200   echo $ac_n "(cached) $ac_c" 1>&6
13201 else
13202   
13203         cat > conftest.$ac_ext <<EOF
13204 #line 13205 "configure"
13205 #include "confdefs.h"
13206 #include <pwd.h>
13207 int main() {
13208
13209         struct passwd pwd;
13210         pwd.pw_gecos = pwd.pw_name;
13211
13212 ; return 0; }
13213 EOF
13214 if { (eval echo configure:13215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13215   rm -rf conftest*
13216   ol_cv_struct_passwd_pw_gecos=yes
13217 else
13218   echo "configure: failed program was:" >&5
13219   cat conftest.$ac_ext >&5
13220   rm -rf conftest*
13221   ol_cv_struct_passwd_pw_gecos=no
13222 fi
13223 rm -f conftest*
13224 fi
13225
13226 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
13227 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
13228         cat >> confdefs.h <<\EOF
13229 #define HAVE_PW_GECOS 1
13230 EOF
13231
13232 fi
13233
13234 # test for pw_passwd in struct passwd
13235 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
13236 echo "configure:13237: checking struct passwd for pw_passwd" >&5
13237 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
13238   echo $ac_n "(cached) $ac_c" 1>&6
13239 else
13240   
13241         cat > conftest.$ac_ext <<EOF
13242 #line 13243 "configure"
13243 #include "confdefs.h"
13244 #include <pwd.h>
13245 int main() {
13246
13247         struct passwd pwd;
13248         pwd.pw_passwd = pwd.pw_name;
13249
13250 ; return 0; }
13251 EOF
13252 if { (eval echo configure:13253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13253   rm -rf conftest*
13254   ol_cv_struct_passwd_pw_passwd=yes
13255 else
13256   echo "configure: failed program was:" >&5
13257   cat conftest.$ac_ext >&5
13258   rm -rf conftest*
13259   ol_cv_struct_passwd_pw_passwd=no
13260 fi
13261 rm -f conftest*
13262 fi
13263
13264 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
13265 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
13266         cat >> confdefs.h <<\EOF
13267 #define HAVE_PW_PASSWD 1
13268 EOF
13269
13270 fi
13271
13272
13273 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
13274 echo "configure:13275: checking if toupper() requires islower()" >&5
13275 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
13276   echo $ac_n "(cached) $ac_c" 1>&6
13277 else
13278   
13279         if test "$cross_compiling" = yes; then
13280   ol_cv_c_upper_lower=safe
13281 else
13282   cat > conftest.$ac_ext <<EOF
13283 #line 13284 "configure"
13284 #include "confdefs.h"
13285
13286 #include <ctype.h>
13287 main()
13288 {
13289         if ('C' == toupper('C'))
13290                 exit(0);
13291         else
13292                 exit(1);
13293 }
13294 EOF
13295 if { (eval echo configure:13296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13296 then
13297   ol_cv_c_upper_lower=no
13298 else
13299   echo "configure: failed program was:" >&5
13300   cat conftest.$ac_ext >&5
13301   rm -fr conftest*
13302   ol_cv_c_upper_lower=yes
13303 fi
13304 rm -fr conftest*
13305 fi
13306
13307 fi
13308
13309 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
13310 if test $ol_cv_c_upper_lower != no ; then
13311         cat >> confdefs.h <<\EOF
13312 #define C_UPPER_LOWER 1
13313 EOF
13314
13315 fi
13316
13317 echo $ac_n "checking for working const""... $ac_c" 1>&6
13318 echo "configure:13319: checking for working const" >&5
13319 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
13320   echo $ac_n "(cached) $ac_c" 1>&6
13321 else
13322   cat > conftest.$ac_ext <<EOF
13323 #line 13324 "configure"
13324 #include "confdefs.h"
13325
13326 int main() {
13327
13328 /* Ultrix mips cc rejects this.  */
13329 typedef int charset[2]; const charset x;
13330 /* SunOS 4.1.1 cc rejects this.  */
13331 char const *const *ccp;
13332 char **p;
13333 /* NEC SVR4.0.2 mips cc rejects this.  */
13334 struct point {int x, y;};
13335 static struct point const zero = {0,0};
13336 /* AIX XL C 1.02.0.0 rejects this.
13337    It does not let you subtract one const X* pointer from another in an arm
13338    of an if-expression whose if-part is not a constant expression */
13339 const char *g = "string";
13340 ccp = &g + (g ? g-g : 0);
13341 /* HPUX 7.0 cc rejects these. */
13342 ++ccp;
13343 p = (char**) ccp;
13344 ccp = (char const *const *) p;
13345 { /* SCO 3.2v4 cc rejects this.  */
13346   char *t;
13347   char const *s = 0 ? (char *) 0 : (char const *) 0;
13348
13349   *t++ = 0;
13350 }
13351 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13352   int x[] = {25, 17};
13353   const int *foo = &x[0];
13354   ++foo;
13355 }
13356 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13357   typedef const int *iptr;
13358   iptr p = 0;
13359   ++p;
13360 }
13361 { /* AIX XL C 1.02.0.0 rejects this saying
13362      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13363   struct s { int j; const int *ap[3]; };
13364   struct s *b; b->j = 5;
13365 }
13366 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13367   const int foo = 10;
13368 }
13369
13370 ; return 0; }
13371 EOF
13372 if { (eval echo configure:13373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13373   rm -rf conftest*
13374   ac_cv_c_const=yes
13375 else
13376   echo "configure: failed program was:" >&5
13377   cat conftest.$ac_ext >&5
13378   rm -rf conftest*
13379   ac_cv_c_const=no
13380 fi
13381 rm -f conftest*
13382 fi
13383
13384 echo "$ac_t""$ac_cv_c_const" 1>&6
13385 if test $ac_cv_c_const = no; then
13386   cat >> confdefs.h <<\EOF
13387 #define const 
13388 EOF
13389
13390 fi
13391
13392 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
13393 echo "configure:13394: checking if compiler understands volatile" >&5
13394 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
13395   echo $ac_n "(cached) $ac_c" 1>&6
13396 else
13397   cat > conftest.$ac_ext <<EOF
13398 #line 13399 "configure"
13399 #include "confdefs.h"
13400 int x, y, z;
13401 int main() {
13402 volatile int a; int * volatile b = x ? &y : &z;
13403       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
13404       *b = 0;
13405 ; return 0; }
13406 EOF
13407 if { (eval echo configure:13408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13408   rm -rf conftest*
13409   ol_cv_c_volatile=yes
13410 else
13411   echo "configure: failed program was:" >&5
13412   cat conftest.$ac_ext >&5
13413   rm -rf conftest*
13414   ol_cv_c_volatile=no
13415 fi
13416 rm -f conftest*
13417 fi
13418
13419 echo "$ac_t""$ol_cv_c_volatile" 1>&6
13420   if test $ol_cv_c_volatile = yes; then
13421     : 
13422   else
13423     cat >> confdefs.h <<\EOF
13424 #define volatile 
13425 EOF
13426
13427   fi
13428  
13429
13430 if test $cross_compiling = yes ; then
13431         cat >> confdefs.h <<\EOF
13432 #define CROSS_COMPILING 1
13433 EOF
13434
13435
13436         cat >> confdefs.h <<\EOF
13437 #define LBER_INT_T long
13438 EOF
13439
13440         cat >> confdefs.h <<\EOF
13441 #define LBER_TAG_T long
13442 EOF
13443
13444         cat >> confdefs.h <<\EOF
13445 #define LBER_SOCKET_T int
13446 EOF
13447
13448
13449 else
13450         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
13451 echo "configure:13452: checking whether byte ordering is bigendian" >&5
13452 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
13453   echo $ac_n "(cached) $ac_c" 1>&6
13454 else
13455   ac_cv_c_bigendian=unknown
13456 # See if sys/param.h defines the BYTE_ORDER macro.
13457 cat > conftest.$ac_ext <<EOF
13458 #line 13459 "configure"
13459 #include "confdefs.h"
13460 #include <sys/types.h>
13461 #include <sys/param.h>
13462 int main() {
13463
13464 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
13465  bogus endian macros
13466 #endif
13467 ; return 0; }
13468 EOF
13469 if { (eval echo configure:13470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13470   rm -rf conftest*
13471   # It does; now see whether it defined to BIG_ENDIAN or not.
13472 cat > conftest.$ac_ext <<EOF
13473 #line 13474 "configure"
13474 #include "confdefs.h"
13475 #include <sys/types.h>
13476 #include <sys/param.h>
13477 int main() {
13478
13479 #if BYTE_ORDER != BIG_ENDIAN
13480  not big endian
13481 #endif
13482 ; return 0; }
13483 EOF
13484 if { (eval echo configure:13485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13485   rm -rf conftest*
13486   ac_cv_c_bigendian=yes
13487 else
13488   echo "configure: failed program was:" >&5
13489   cat conftest.$ac_ext >&5
13490   rm -rf conftest*
13491   ac_cv_c_bigendian=no
13492 fi
13493 rm -f conftest*
13494 else
13495   echo "configure: failed program was:" >&5
13496   cat conftest.$ac_ext >&5
13497 fi
13498 rm -f conftest*
13499 if test $ac_cv_c_bigendian = unknown; then
13500 if test "$cross_compiling" = yes; then
13501     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13502 else
13503   cat > conftest.$ac_ext <<EOF
13504 #line 13505 "configure"
13505 #include "confdefs.h"
13506 main () {
13507   /* Are we little or big endian?  From Harbison&Steele.  */
13508   union
13509   {
13510     long l;
13511     char c[sizeof (long)];
13512   } u;
13513   u.l = 1;
13514   exit (u.c[sizeof (long) - 1] == 1);
13515 }
13516 EOF
13517 if { (eval echo configure:13518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13518 then
13519   ac_cv_c_bigendian=no
13520 else
13521   echo "configure: failed program was:" >&5
13522   cat conftest.$ac_ext >&5
13523   rm -fr conftest*
13524   ac_cv_c_bigendian=yes
13525 fi
13526 rm -fr conftest*
13527 fi
13528
13529 fi
13530 fi
13531
13532 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
13533 if test $ac_cv_c_bigendian = yes; then
13534   cat >> confdefs.h <<\EOF
13535 #define WORDS_BIGENDIAN 1
13536 EOF
13537
13538 fi
13539
13540         echo $ac_n "checking size of short""... $ac_c" 1>&6
13541 echo "configure:13542: checking size of short" >&5
13542 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
13543   echo $ac_n "(cached) $ac_c" 1>&6
13544 else
13545   if test "$cross_compiling" = yes; then
13546     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13547 else
13548   cat > conftest.$ac_ext <<EOF
13549 #line 13550 "configure"
13550 #include "confdefs.h"
13551 #include <stdio.h>
13552 main()
13553 {
13554   FILE *f=fopen("conftestval", "w");
13555   if (!f) exit(1);
13556   fprintf(f, "%d\n", sizeof(short));
13557   exit(0);
13558 }
13559 EOF
13560 if { (eval echo configure:13561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13561 then
13562   ac_cv_sizeof_short=`cat conftestval`
13563 else
13564   echo "configure: failed program was:" >&5
13565   cat conftest.$ac_ext >&5
13566   rm -fr conftest*
13567   ac_cv_sizeof_short=0
13568 fi
13569 rm -fr conftest*
13570 fi
13571
13572 fi
13573 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
13574 cat >> confdefs.h <<EOF
13575 #define SIZEOF_SHORT $ac_cv_sizeof_short
13576 EOF
13577
13578  
13579         echo $ac_n "checking size of int""... $ac_c" 1>&6
13580 echo "configure:13581: checking size of int" >&5
13581 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
13582   echo $ac_n "(cached) $ac_c" 1>&6
13583 else
13584   if test "$cross_compiling" = yes; then
13585     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13586 else
13587   cat > conftest.$ac_ext <<EOF
13588 #line 13589 "configure"
13589 #include "confdefs.h"
13590 #include <stdio.h>
13591 main()
13592 {
13593   FILE *f=fopen("conftestval", "w");
13594   if (!f) exit(1);
13595   fprintf(f, "%d\n", sizeof(int));
13596   exit(0);
13597 }
13598 EOF
13599 if { (eval echo configure:13600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13600 then
13601   ac_cv_sizeof_int=`cat conftestval`
13602 else
13603   echo "configure: failed program was:" >&5
13604   cat conftest.$ac_ext >&5
13605   rm -fr conftest*
13606   ac_cv_sizeof_int=0
13607 fi
13608 rm -fr conftest*
13609 fi
13610
13611 fi
13612 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
13613 cat >> confdefs.h <<EOF
13614 #define SIZEOF_INT $ac_cv_sizeof_int
13615 EOF
13616
13617  
13618         echo $ac_n "checking size of long""... $ac_c" 1>&6
13619 echo "configure:13620: checking size of long" >&5
13620 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
13621   echo $ac_n "(cached) $ac_c" 1>&6
13622 else
13623   if test "$cross_compiling" = yes; then
13624     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
13625 else
13626   cat > conftest.$ac_ext <<EOF
13627 #line 13628 "configure"
13628 #include "confdefs.h"
13629 #include <stdio.h>
13630 main()
13631 {
13632   FILE *f=fopen("conftestval", "w");
13633   if (!f) exit(1);
13634   fprintf(f, "%d\n", sizeof(long));
13635   exit(0);
13636 }
13637 EOF
13638 if { (eval echo configure:13639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13639 then
13640   ac_cv_sizeof_long=`cat conftestval`
13641 else
13642   echo "configure: failed program was:" >&5
13643   cat conftest.$ac_ext >&5
13644   rm -fr conftest*
13645   ac_cv_sizeof_long=0
13646 fi
13647 rm -fr conftest*
13648 fi
13649
13650 fi
13651 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
13652 cat >> confdefs.h <<EOF
13653 #define SIZEOF_LONG $ac_cv_sizeof_long
13654 EOF
13655
13656
13657
13658         if test "$ac_cv_sizeof_int" -lt 4 ; then
13659                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
13660
13661                 cat >> confdefs.h <<\EOF
13662 #define LBER_INT_T long
13663 EOF
13664
13665                 cat >> confdefs.h <<\EOF
13666 #define LBER_TAG_T long
13667 EOF
13668
13669                 cat >> confdefs.h <<\EOF
13670 #define LBER_SOCKET_T int
13671 EOF
13672
13673         else
13674                 cat >> confdefs.h <<\EOF
13675 #define LBER_INT_T int
13676 EOF
13677
13678                 cat >> confdefs.h <<\EOF
13679 #define LBER_TAG_T long
13680 EOF
13681
13682                 cat >> confdefs.h <<\EOF
13683 #define LBER_SOCKET_T int
13684 EOF
13685
13686         fi
13687 fi
13688
13689 cat >> confdefs.h <<\EOF
13690 #define LBER_LEN_T long
13691 EOF
13692
13693
13694 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
13695 echo "configure:13696: checking for 8-bit clean memcmp" >&5
13696 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
13697   echo $ac_n "(cached) $ac_c" 1>&6
13698 else
13699   if test "$cross_compiling" = yes; then
13700   ac_cv_func_memcmp_clean=no
13701 else
13702   cat > conftest.$ac_ext <<EOF
13703 #line 13704 "configure"
13704 #include "confdefs.h"
13705
13706 main()
13707 {
13708   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
13709   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
13710 }
13711
13712 EOF
13713 if { (eval echo configure:13714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13714 then
13715   ac_cv_func_memcmp_clean=yes
13716 else
13717   echo "configure: failed program was:" >&5
13718   cat conftest.$ac_ext >&5
13719   rm -fr conftest*
13720   ac_cv_func_memcmp_clean=no
13721 fi
13722 rm -fr conftest*
13723 fi
13724
13725 fi
13726
13727 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
13728 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
13729
13730 echo $ac_n "checking for strftime""... $ac_c" 1>&6
13731 echo "configure:13732: checking for strftime" >&5
13732 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
13733   echo $ac_n "(cached) $ac_c" 1>&6
13734 else
13735   cat > conftest.$ac_ext <<EOF
13736 #line 13737 "configure"
13737 #include "confdefs.h"
13738 /* System header to define __stub macros and hopefully few prototypes,
13739     which can conflict with char strftime(); below.  */
13740 #include <assert.h>
13741 /* Override any gcc2 internal prototype to avoid an error.  */
13742 /* We use char because int might match the return type of a gcc2
13743     builtin and then its argument prototype would still apply.  */
13744 char strftime();
13745 char (*f)();
13746
13747 int main() {
13748
13749 /* The GNU C library defines this for functions which it implements
13750     to always fail with ENOSYS.  Some functions are actually named
13751     something starting with __ and the normal name is an alias.  */
13752 #if defined (__stub_strftime) || defined (__stub___strftime)
13753 choke me
13754 #else
13755 f = strftime;
13756 #endif
13757
13758 ; return 0; }
13759 EOF
13760 if { (eval echo configure:13761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13761   rm -rf conftest*
13762   eval "ac_cv_func_strftime=yes"
13763 else
13764   echo "configure: failed program was:" >&5
13765   cat conftest.$ac_ext >&5
13766   rm -rf conftest*
13767   eval "ac_cv_func_strftime=no"
13768 fi
13769 rm -f conftest*
13770 fi
13771
13772 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
13773   echo "$ac_t""yes" 1>&6
13774   cat >> confdefs.h <<\EOF
13775 #define HAVE_STRFTIME 1
13776 EOF
13777
13778 else
13779   echo "$ac_t""no" 1>&6
13780 # strftime is in -lintl on SCO UNIX.
13781 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
13782 echo "configure:13783: checking for strftime in -lintl" >&5
13783 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
13784 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
13785   echo $ac_n "(cached) $ac_c" 1>&6
13786 else
13787   ac_save_LIBS="$LIBS"
13788 LIBS="-lintl  $LIBS"
13789 cat > conftest.$ac_ext <<EOF
13790 #line 13791 "configure"
13791 #include "confdefs.h"
13792 /* Override any gcc2 internal prototype to avoid an error.  */
13793 /* We use char because int might match the return type of a gcc2
13794     builtin and then its argument prototype would still apply.  */
13795 char strftime();
13796
13797 int main() {
13798 strftime()
13799 ; return 0; }
13800 EOF
13801 if { (eval echo configure:13802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13802   rm -rf conftest*
13803   eval "ac_cv_lib_$ac_lib_var=yes"
13804 else
13805   echo "configure: failed program was:" >&5
13806   cat conftest.$ac_ext >&5
13807   rm -rf conftest*
13808   eval "ac_cv_lib_$ac_lib_var=no"
13809 fi
13810 rm -f conftest*
13811 LIBS="$ac_save_LIBS"
13812
13813 fi
13814 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13815   echo "$ac_t""yes" 1>&6
13816   cat >> confdefs.h <<\EOF
13817 #define HAVE_STRFTIME 1
13818 EOF
13819
13820 LIBS="-lintl $LIBS"
13821 else
13822   echo "$ac_t""no" 1>&6
13823 fi
13824
13825 fi
13826
13827
13828 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
13829 echo "configure:13830: checking for inet_aton()" >&5
13830 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
13831   echo $ac_n "(cached) $ac_c" 1>&6
13832 else
13833   cat > conftest.$ac_ext <<EOF
13834 #line 13835 "configure"
13835 #include "confdefs.h"
13836
13837 #ifdef HAVE_SYS_TYPES_H
13838 #       include <sys/types.h>
13839 #endif
13840 #ifdef HAVE_SYS_SOCKET_H
13841 #       include <sys/socket.h>
13842 #       ifdef HAVE_SYS_SELECT_H
13843 #               include <sys/select.h>
13844 #       endif
13845 #       include <netinet/in.h>
13846 #       ifdef HAVE_ARPA_INET_H
13847 #               include <arpa/inet.h>
13848 #       endif
13849 #endif
13850
13851 int main() {
13852 struct in_addr in;
13853 int rc = inet_aton( "255.255.255.255", &in );
13854 ; return 0; }
13855 EOF
13856 if { (eval echo configure:13857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13857   rm -rf conftest*
13858   ol_cv_func_inet_aton=yes
13859 else
13860   echo "configure: failed program was:" >&5
13861   cat conftest.$ac_ext >&5
13862   rm -rf conftest*
13863   ol_cv_func_inet_aton=no
13864 fi
13865 rm -f conftest*
13866 fi
13867
13868 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
13869   if test $ol_cv_func_inet_aton != no; then
13870     cat >> confdefs.h <<\EOF
13871 #define HAVE_INET_ATON 1
13872 EOF
13873
13874   fi
13875  
13876
13877 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
13878 echo "configure:13879: checking for vprintf" >&5
13879 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
13880   echo $ac_n "(cached) $ac_c" 1>&6
13881 else
13882   cat > conftest.$ac_ext <<EOF
13883 #line 13884 "configure"
13884 #include "confdefs.h"
13885 /* System header to define __stub macros and hopefully few prototypes,
13886     which can conflict with char vprintf(); below.  */
13887 #include <assert.h>
13888 /* Override any gcc2 internal prototype to avoid an error.  */
13889 /* We use char because int might match the return type of a gcc2
13890     builtin and then its argument prototype would still apply.  */
13891 char vprintf();
13892 char (*f)();
13893
13894 int main() {
13895
13896 /* The GNU C library defines this for functions which it implements
13897     to always fail with ENOSYS.  Some functions are actually named
13898     something starting with __ and the normal name is an alias.  */
13899 #if defined (__stub_vprintf) || defined (__stub___vprintf)
13900 choke me
13901 #else
13902 f = vprintf;
13903 #endif
13904
13905 ; return 0; }
13906 EOF
13907 if { (eval echo configure:13908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13908   rm -rf conftest*
13909   eval "ac_cv_func_vprintf=yes"
13910 else
13911   echo "configure: failed program was:" >&5
13912   cat conftest.$ac_ext >&5
13913   rm -rf conftest*
13914   eval "ac_cv_func_vprintf=no"
13915 fi
13916 rm -f conftest*
13917 fi
13918
13919 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
13920   echo "$ac_t""yes" 1>&6
13921   cat >> confdefs.h <<\EOF
13922 #define HAVE_VPRINTF 1
13923 EOF
13924
13925 else
13926   echo "$ac_t""no" 1>&6
13927 fi
13928
13929 if test "$ac_cv_func_vprintf" != yes; then
13930 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
13931 echo "configure:13932: checking for _doprnt" >&5
13932 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
13933   echo $ac_n "(cached) $ac_c" 1>&6
13934 else
13935   cat > conftest.$ac_ext <<EOF
13936 #line 13937 "configure"
13937 #include "confdefs.h"
13938 /* System header to define __stub macros and hopefully few prototypes,
13939     which can conflict with char _doprnt(); below.  */
13940 #include <assert.h>
13941 /* Override any gcc2 internal prototype to avoid an error.  */
13942 /* We use char because int might match the return type of a gcc2
13943     builtin and then its argument prototype would still apply.  */
13944 char _doprnt();
13945 char (*f)();
13946
13947 int main() {
13948
13949 /* The GNU C library defines this for functions which it implements
13950     to always fail with ENOSYS.  Some functions are actually named
13951     something starting with __ and the normal name is an alias.  */
13952 #if defined (__stub__doprnt) || defined (__stub____doprnt)
13953 choke me
13954 #else
13955 f = _doprnt;
13956 #endif
13957
13958 ; return 0; }
13959 EOF
13960 if { (eval echo configure:13961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13961   rm -rf conftest*
13962   eval "ac_cv_func__doprnt=yes"
13963 else
13964   echo "configure: failed program was:" >&5
13965   cat conftest.$ac_ext >&5
13966   rm -rf conftest*
13967   eval "ac_cv_func__doprnt=no"
13968 fi
13969 rm -f conftest*
13970 fi
13971
13972 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
13973   echo "$ac_t""yes" 1>&6
13974   cat >> confdefs.h <<\EOF
13975 #define HAVE_DOPRNT 1
13976 EOF
13977
13978 else
13979   echo "$ac_t""no" 1>&6
13980 fi
13981
13982 fi
13983
13984
13985 if test $ac_cv_func_vprintf = yes ; then
13986                 for ac_func in vsnprintf vsprintf
13987 do
13988 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13989 echo "configure:13990: checking for $ac_func" >&5
13990 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
13991   echo $ac_n "(cached) $ac_c" 1>&6
13992 else
13993   cat > conftest.$ac_ext <<EOF
13994 #line 13995 "configure"
13995 #include "confdefs.h"
13996 /* System header to define __stub macros and hopefully few prototypes,
13997     which can conflict with char $ac_func(); below.  */
13998 #include <assert.h>
13999 /* Override any gcc2 internal prototype to avoid an error.  */
14000 /* We use char because int might match the return type of a gcc2
14001     builtin and then its argument prototype would still apply.  */
14002 char $ac_func();
14003 char (*f)();
14004
14005 int main() {
14006
14007 /* The GNU C library defines this for functions which it implements
14008     to always fail with ENOSYS.  Some functions are actually named
14009     something starting with __ and the normal name is an alias.  */
14010 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14011 choke me
14012 #else
14013 f = $ac_func;
14014 #endif
14015
14016 ; return 0; }
14017 EOF
14018 if { (eval echo configure:14019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14019   rm -rf conftest*
14020   eval "ac_cv_func_$ac_func=yes"
14021 else
14022   echo "configure: failed program was:" >&5
14023   cat conftest.$ac_ext >&5
14024   rm -rf conftest*
14025   eval "ac_cv_func_$ac_func=no"
14026 fi
14027 rm -f conftest*
14028 fi
14029
14030 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14031   echo "$ac_t""yes" 1>&6
14032     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14033   cat >> confdefs.h <<EOF
14034 #define $ac_tr_func 1
14035 EOF
14036  
14037 else
14038   echo "$ac_t""no" 1>&6
14039 fi
14040 done
14041
14042 fi
14043
14044 for ac_func in \
14045         bcopy                   \
14046         closesocket             \
14047         endgrent                \
14048         endpwent                \
14049         flock                   \
14050         getdtablesize   \
14051         getgrgid                \
14052         gethostname             \
14053         getpass                 \
14054         getpwuid                \
14055         getpwnam                \
14056         getspnam                \
14057         gettimeofday    \
14058         initgroups              \
14059         lockf                   \
14060         memcpy                  \
14061         memmove                 \
14062         mkstemp                 \
14063         pipe                    \
14064         read                    \
14065         recv                    \
14066         recvfrom                \
14067         setpwfile               \
14068         setgid                  \
14069         setegid                 \
14070         setsid                  \
14071         setuid                  \
14072         seteuid                 \
14073         sigaction               \
14074         signal                  \
14075         sigset                  \
14076         snprintf                \
14077         strdup                  \
14078         strerror                \
14079         strpbrk                 \
14080         strrchr                 \
14081         strsep                  \
14082         strstr                  \
14083         strtol                  \
14084         strtoul                 \
14085         strspn                  \
14086         sysconf                 \
14087         waitpid                 \
14088         wait4                   \
14089         write                   \
14090         send                    \
14091         sendto                  \
14092
14093 do
14094 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14095 echo "configure:14096: checking for $ac_func" >&5
14096 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14097   echo $ac_n "(cached) $ac_c" 1>&6
14098 else
14099   cat > conftest.$ac_ext <<EOF
14100 #line 14101 "configure"
14101 #include "confdefs.h"
14102 /* System header to define __stub macros and hopefully few prototypes,
14103     which can conflict with char $ac_func(); below.  */
14104 #include <assert.h>
14105 /* Override any gcc2 internal prototype to avoid an error.  */
14106 /* We use char because int might match the return type of a gcc2
14107     builtin and then its argument prototype would still apply.  */
14108 char $ac_func();
14109 char (*f)();
14110
14111 int main() {
14112
14113 /* The GNU C library defines this for functions which it implements
14114     to always fail with ENOSYS.  Some functions are actually named
14115     something starting with __ and the normal name is an alias.  */
14116 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14117 choke me
14118 #else
14119 f = $ac_func;
14120 #endif
14121
14122 ; return 0; }
14123 EOF
14124 if { (eval echo configure:14125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14125   rm -rf conftest*
14126   eval "ac_cv_func_$ac_func=yes"
14127 else
14128   echo "configure: failed program was:" >&5
14129   cat conftest.$ac_ext >&5
14130   rm -rf conftest*
14131   eval "ac_cv_func_$ac_func=no"
14132 fi
14133 rm -f conftest*
14134 fi
14135
14136 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14137   echo "$ac_t""yes" 1>&6
14138     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14139   cat >> confdefs.h <<EOF
14140 #define $ac_tr_func 1
14141 EOF
14142  
14143 else
14144   echo "$ac_t""no" 1>&6
14145 fi
14146 done
14147
14148
14149 for ac_func in getopt tempnam
14150 do
14151 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14152 echo "configure:14153: checking for $ac_func" >&5
14153 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14154   echo $ac_n "(cached) $ac_c" 1>&6
14155 else
14156   cat > conftest.$ac_ext <<EOF
14157 #line 14158 "configure"
14158 #include "confdefs.h"
14159 /* System header to define __stub macros and hopefully few prototypes,
14160     which can conflict with char $ac_func(); below.  */
14161 #include <assert.h>
14162 /* Override any gcc2 internal prototype to avoid an error.  */
14163 /* We use char because int might match the return type of a gcc2
14164     builtin and then its argument prototype would still apply.  */
14165 char $ac_func();
14166 char (*f)();
14167
14168 int main() {
14169
14170 /* The GNU C library defines this for functions which it implements
14171     to always fail with ENOSYS.  Some functions are actually named
14172     something starting with __ and the normal name is an alias.  */
14173 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14174 choke me
14175 #else
14176 f = $ac_func;
14177 #endif
14178
14179 ; return 0; }
14180 EOF
14181 if { (eval echo configure:14182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14182   rm -rf conftest*
14183   eval "ac_cv_func_$ac_func=yes"
14184 else
14185   echo "configure: failed program was:" >&5
14186   cat conftest.$ac_ext >&5
14187   rm -rf conftest*
14188   eval "ac_cv_func_$ac_func=no"
14189 fi
14190 rm -f conftest*
14191 fi
14192
14193 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14194   echo "$ac_t""yes" 1>&6
14195     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14196   cat >> confdefs.h <<EOF
14197 #define $ac_tr_func 1
14198 EOF
14199  
14200 else
14201   echo "$ac_t""no" 1>&6
14202 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
14203 fi
14204 done
14205
14206
14207
14208 # Check Configuration
14209 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
14210 echo "configure:14211: checking declaration of sys_errlist" >&5
14211 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
14212   echo $ac_n "(cached) $ac_c" 1>&6
14213 else
14214   
14215         cat > conftest.$ac_ext <<EOF
14216 #line 14217 "configure"
14217 #include "confdefs.h"
14218
14219 #include <stdio.h>
14220 #include <sys/types.h>
14221 #include <errno.h> 
14222 int main() {
14223 char *c = (char *) *sys_errlist
14224 ; return 0; }
14225 EOF
14226 if { (eval echo configure:14227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14227   rm -rf conftest*
14228   ol_cv_dcl_sys_errlist=yes
14229         ol_cv_have_sys_errlist=yes
14230 else
14231   echo "configure: failed program was:" >&5
14232   cat conftest.$ac_ext >&5
14233   rm -rf conftest*
14234   ol_cv_dcl_sys_errlist=no
14235 fi
14236 rm -f conftest*
14237 fi
14238
14239 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
14240 #
14241 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14242 if test $ol_cv_dcl_sys_errlist = no ; then
14243         cat >> confdefs.h <<\EOF
14244 #define DECL_SYS_ERRLIST 1
14245 EOF
14246
14247
14248         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
14249 echo "configure:14250: checking existence of sys_errlist" >&5
14250 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
14251   echo $ac_n "(cached) $ac_c" 1>&6
14252 else
14253   
14254                 cat > conftest.$ac_ext <<EOF
14255 #line 14256 "configure"
14256 #include "confdefs.h"
14257 #include <errno.h>
14258 int main() {
14259 char *c = (char *) *sys_errlist
14260 ; return 0; }
14261 EOF
14262 if { (eval echo configure:14263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14263   rm -rf conftest*
14264   ol_cv_have_sys_errlist=yes
14265 else
14266   echo "configure: failed program was:" >&5
14267   cat conftest.$ac_ext >&5
14268   rm -rf conftest*
14269   ol_cv_have_sys_errlist=no
14270 fi
14271 rm -f conftest*
14272 fi
14273
14274 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
14275 fi
14276 if test $ol_cv_have_sys_errlist = yes ; then
14277         cat >> confdefs.h <<\EOF
14278 #define HAVE_SYS_ERRLIST 1
14279 EOF
14280
14281 fi
14282
14283
14284
14285 if test "$ol_enable_debug" != no ; then
14286         cat >> confdefs.h <<\EOF
14287 #define LDAP_DEBUG 1
14288 EOF
14289
14290 fi
14291 if test "$ol_enable_syslog" = yes ; then
14292         cat >> confdefs.h <<\EOF
14293 #define LDAP_SYSLOG 1
14294 EOF
14295
14296 fi
14297 if test "$ol_enable_libui" = yes ; then
14298         cat >> confdefs.h <<\EOF
14299 #define LDAP_LIBUI 1
14300 EOF
14301
14302 fi
14303 if test "$ol_enable_cache" = no ; then
14304         cat >> confdefs.h <<\EOF
14305 #define LDAP_NOCACHE 1
14306 EOF
14307
14308 fi
14309 if test "$ol_enable_dns" != no ; then
14310         cat >> confdefs.h <<\EOF
14311 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
14312 EOF
14313
14314 fi
14315 if test "$ol_enable_proctitle" != no ; then
14316         cat >> confdefs.h <<\EOF
14317 #define LDAP_PROCTITLE 1
14318 EOF
14319
14320 fi
14321 if test "$ol_enable_referrals" != no ; then
14322         cat >> confdefs.h <<\EOF
14323 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
14324 EOF
14325
14326 fi
14327 if test "$ol_enable_cldap" != no ; then
14328         cat >> confdefs.h <<\EOF
14329 #define LDAP_CONNECTIONLESS 1
14330 EOF
14331
14332 fi
14333
14334 if test "$ol_enable_crypt" != no ; then
14335         cat >> confdefs.h <<\EOF
14336 #define SLAPD_CRYPT 1
14337 EOF
14338
14339 fi
14340 if test "$ol_enable_cleartext" != no ; then
14341         cat >> confdefs.h <<\EOF
14342 #define SLAPD_CLEARTEXT 1
14343 EOF
14344
14345 fi
14346 if test "$ol_enable_multimaster" != no ; then
14347         cat >> confdefs.h <<\EOF
14348 #define SLAPD_MULTIMASTER 1
14349 EOF
14350
14351 fi
14352 if test "$ol_enable_phonetic" != no ; then
14353         cat >> confdefs.h <<\EOF
14354 #define SLAPD_PHONETIC 1
14355 EOF
14356
14357 fi
14358 if test "$ol_enable_rlookups" != no ; then
14359         cat >> confdefs.h <<\EOF
14360 #define SLAPD_RLOOKUPS 1
14361 EOF
14362
14363 fi
14364 if test "$ol_enable_aci" != no ; then
14365         cat >> confdefs.h <<\EOF
14366 #define SLAPD_ACI_ENABLED 1
14367 EOF
14368
14369 fi
14370 if test "$ol_enable_discreteaci" != no ; then
14371         cat >> confdefs.h <<\EOF
14372 #define SLAPD_ACI_DISCRETE_RIGHTS 1
14373 EOF
14374
14375 fi
14376
14377 if test "$ol_link_modules" != no ; then
14378         cat >> confdefs.h <<\EOF
14379 #define SLAPD_MODULES 1
14380 EOF
14381
14382         BUILD_SLAPD=yes
14383         MODULES_LIBS=-lltdl
14384         SLAPD_MODULES_LDFLAGS="-dlopen self"
14385 fi
14386
14387 if test "$ol_link_bdb2" != no ; then
14388         cat >> confdefs.h <<\EOF
14389 #define SLAPD_BDB2 1
14390 EOF
14391
14392         BUILD_SLAPD=yes
14393         BUILD_BDB2=yes
14394         if test "$ol_with_bdb2_module" != static ; then
14395                 cat >> confdefs.h <<\EOF
14396 #define SLAPD_BDB2_DYNAMIC 1
14397 EOF
14398
14399                 BUILD_BDB2=mod
14400                 BUILD_BDB2_DYNAMIC=shared
14401                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
14402         fi
14403 fi
14404
14405 if test "$ol_enable_ldap" != no ; then
14406         cat >> confdefs.h <<\EOF
14407 #define SLAPD_LDAP 1
14408 EOF
14409
14410         BUILD_SLAPD=yes
14411         BUILD_LDAP=yes
14412         if test "$ol_with_ldap_module" != static ; then
14413                 cat >> confdefs.h <<\EOF
14414 #define SLAPD_LDAP_DYNAMIC 1
14415 EOF
14416
14417                 BUILD_LDAP=mod
14418                 BUILD_LDAP_DYNAMIC=shared
14419                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
14420         fi
14421 fi
14422
14423 if test "$ol_link_ldbm" != no ; then
14424         cat >> confdefs.h <<\EOF
14425 #define SLAPD_LDBM 1
14426 EOF
14427
14428         BUILD_SLAPD=yes
14429         BUILD_LDBM=yes
14430         if test "$ol_with_ldbm_module" != static ; then
14431                 cat >> confdefs.h <<\EOF
14432 #define SLAPD_LDBM_DYNAMIC 1
14433 EOF
14434
14435                 BUILD_LDBM=mod
14436                 BUILD_LDBM_DYNAMIC=shared
14437                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
14438         fi
14439 fi
14440
14441 if test "$ol_enable_passwd" != no ; then
14442         cat >> confdefs.h <<\EOF
14443 #define SLAPD_PASSWD 1
14444 EOF
14445
14446         BUILD_SLAPD=yes
14447         BUILD_PASSWD=yes
14448         if test "$ol_with_passwd_module" != static ; then
14449                 cat >> confdefs.h <<\EOF
14450 #define SLAPD_PASSWD_DYNAMIC 1
14451 EOF
14452
14453                 BUILD_PASSWD=mod
14454                 BUILD_PASSWD_DYNAMIC=shared
14455                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
14456         fi
14457 fi
14458
14459 if test "$ol_link_perl" != no ; then
14460         cat >> confdefs.h <<\EOF
14461 #define SLAPD_PERL 1
14462 EOF
14463
14464         BUILD_SLAPD=yes
14465         BUILD_PERL=yes
14466         if test "$ol_with_perl_module" != static ; then
14467                 cat >> confdefs.h <<\EOF
14468 #define SLAPD_PERL_DYNAMIC 1
14469 EOF
14470
14471                 BUILD_PERL=mod
14472                 BUILD_PERL_DYNAMIC=shared
14473                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
14474         fi
14475 fi
14476
14477 if test "$ol_enable_shell" != no ; then
14478         cat >> confdefs.h <<\EOF
14479 #define SLAPD_SHELL 1
14480 EOF
14481
14482         BUILD_SLAPD=yes
14483         BUILD_SHELL=yes
14484         if test "$ol_with_shell_module" != static ; then
14485                 cat >> confdefs.h <<\EOF
14486 #define SLAPD_SHELL_DYNAMIC 1
14487 EOF
14488
14489                 BUILD_SHELL=mod
14490                 BUILD_SHELL_DYNAMIC=shared
14491                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
14492         fi
14493 fi
14494
14495 if test "$ol_enable_tcl" != no ; then
14496         cat >> confdefs.h <<\EOF
14497 #define SLAPD_TCL 1
14498 EOF
14499
14500         BUILD_SLAPD=yes
14501         BUILD_TCL=yes
14502         if test "$ol_with_tcl_module" != static; then
14503                 cat >> confdefs.h <<\EOF
14504 #define SLAPD_TCL_DYNAMIC 1
14505 EOF
14506
14507                 BUILD_TCL=mod
14508                 BUILD_TCL_DYNAMIC=shared
14509                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
14510         fi
14511 fi
14512
14513 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
14514         $BUILD_SLAPD = yes ; then
14515         BUILD_SLURPD=yes
14516 fi
14517
14518 if test "$ol_link_isode" != no ; then
14519         BUILD_LDAPD=yes
14520 fi
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
14566 trap '' 1 2 15
14567
14568 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14569
14570 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14571 # Let make expand exec_prefix.
14572 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14573
14574 # Any assignment to VPATH causes Sun make to only execute
14575 # the first set of double-colon rules, so remove it if not needed.
14576 # If there is a colon in the path, we need to keep it.
14577 if test "x$srcdir" = x.; then
14578   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14579 fi
14580
14581 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14582
14583 DEFS=-DHAVE_CONFIG_H
14584
14585 # Without the "./", some shells look in PATH for config.status.
14586 : ${CONFIG_STATUS=./config.status}
14587
14588 echo creating $CONFIG_STATUS
14589 rm -f $CONFIG_STATUS
14590 cat > $CONFIG_STATUS <<EOF
14591 #! /bin/sh
14592 # Generated automatically by configure.
14593 # Run this file to recreate the current configuration.
14594 # This directory was configured as follows,
14595 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14596 #
14597 # $0 $ac_configure_args
14598 #
14599 # Compiler output produced by configure, useful for debugging
14600 # configure, is in ./config.log if it exists.
14601
14602 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14603 for ac_option
14604 do
14605   case "\$ac_option" in
14606   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14607     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14608     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14609   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14610     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
14611     exit 0 ;;
14612   -help | --help | --hel | --he | --h)
14613     echo "\$ac_cs_usage"; exit 0 ;;
14614   *) echo "\$ac_cs_usage"; exit 1 ;;
14615   esac
14616 done
14617
14618 ac_given_srcdir=$srcdir
14619 ac_given_INSTALL="$INSTALL"
14620
14621 trap 'rm -fr `echo "\
14622 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14623 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14624 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14625 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14626 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14627 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14628 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14629 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14630 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14631 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14632 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14633 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14634 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14635 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14636 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14637 include/Makefile:build/top.mk:include/Makefile.in \
14638 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14639 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14640 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14641 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14642 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14643 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14644 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14645 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14646 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14647 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14648 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14649 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14650 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14651 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14652 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14653 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14654 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14655 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14656 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14657 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14658 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14659 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14660 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14661 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14662 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14663 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14664  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14665 EOF
14666 cat >> $CONFIG_STATUS <<EOF
14667
14668 # Protect against being on the right side of a sed subst in config.status.
14669 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14670  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14671 $ac_vpsub
14672 $extrasub
14673 s%@SHELL@%$SHELL%g
14674 s%@CFLAGS@%$CFLAGS%g
14675 s%@CPPFLAGS@%$CPPFLAGS%g
14676 s%@CXXFLAGS@%$CXXFLAGS%g
14677 s%@FFLAGS@%$FFLAGS%g
14678 s%@DEFS@%$DEFS%g
14679 s%@LDFLAGS@%$LDFLAGS%g
14680 s%@LIBS@%$LIBS%g
14681 s%@exec_prefix@%$exec_prefix%g
14682 s%@prefix@%$prefix%g
14683 s%@program_transform_name@%$program_transform_name%g
14684 s%@bindir@%$bindir%g
14685 s%@sbindir@%$sbindir%g
14686 s%@libexecdir@%$libexecdir%g
14687 s%@datadir@%$datadir%g
14688 s%@sysconfdir@%$sysconfdir%g
14689 s%@sharedstatedir@%$sharedstatedir%g
14690 s%@localstatedir@%$localstatedir%g
14691 s%@libdir@%$libdir%g
14692 s%@includedir@%$includedir%g
14693 s%@oldincludedir@%$oldincludedir%g
14694 s%@infodir@%$infodir%g
14695 s%@mandir@%$mandir%g
14696 s%@host@%$host%g
14697 s%@host_alias@%$host_alias%g
14698 s%@host_cpu@%$host_cpu%g
14699 s%@host_vendor@%$host_vendor%g
14700 s%@host_os@%$host_os%g
14701 s%@target@%$target%g
14702 s%@target_alias@%$target_alias%g
14703 s%@target_cpu@%$target_cpu%g
14704 s%@target_vendor@%$target_vendor%g
14705 s%@target_os@%$target_os%g
14706 s%@build@%$build%g
14707 s%@build_alias@%$build_alias%g
14708 s%@build_cpu@%$build_cpu%g
14709 s%@build_vendor@%$build_vendor%g
14710 s%@build_os@%$build_os%g
14711 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14712 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14713 s%@INSTALL_DATA@%$INSTALL_DATA%g
14714 s%@PACKAGE@%$PACKAGE%g
14715 s%@VERSION@%$VERSION%g
14716 s%@ACLOCAL@%$ACLOCAL%g
14717 s%@AUTOCONF@%$AUTOCONF%g
14718 s%@AUTOMAKE@%$AUTOMAKE%g
14719 s%@AUTOHEADER@%$AUTOHEADER%g
14720 s%@MAKEINFO@%$MAKEINFO%g
14721 s%@install_sh@%$install_sh%g
14722 s%@AMTAR@%$AMTAR%g
14723 s%@AWK@%$AWK%g
14724 s%@AMTARFLAGS@%$AMTARFLAGS%g
14725 s%@SET_MAKE@%$SET_MAKE%g
14726 s%@top_builddir@%$top_builddir%g
14727 s%@ldap_subdir@%$ldap_subdir%g
14728 s%@CC@%$CC%g
14729 s%@RANLIB@%$RANLIB%g
14730 s%@LD@%$LD%g
14731 s%@NM@%$NM%g
14732 s%@LN_S@%$LN_S%g
14733 s%@LIBTOOL@%$LIBTOOL%g
14734 s%@LN_H@%$LN_H%g
14735 s%@SENDMAIL@%$SENDMAIL%g
14736 s%@EDITOR@%$EDITOR%g
14737 s%@FINGER@%$FINGER%g
14738 s%@PERLBIN@%$PERLBIN%g
14739 s%@CPP@%$CPP%g
14740 s%@EXEEXT@%$EXEEXT%g
14741 s%@OBJEXT@%$OBJEXT%g
14742 s%@OL_MKDEP@%$OL_MKDEP%g
14743 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
14744 s%@PEPSY@%$PEPSY%g
14745 s%@LIBOBJS@%$LIBOBJS%g
14746 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
14747 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
14748 s%@BUILD_BDB2@%$BUILD_BDB2%g
14749 s%@BUILD_LDAP@%$BUILD_LDAP%g
14750 s%@BUILD_LDBM@%$BUILD_LDBM%g
14751 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
14752 s%@BUILD_PERL@%$BUILD_PERL%g
14753 s%@BUILD_QUIPU@%$BUILD_QUIPU%g
14754 s%@BUILD_SHELL@%$BUILD_SHELL%g
14755 s%@BUILD_TCL@%$BUILD_TCL%g
14756 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
14757 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
14758 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
14759 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
14760 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
14761 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
14762 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
14763 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
14764 s%@LDAP_LIBS@%$LDAP_LIBS%g
14765 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
14766 s%@LDIF_LIBS@%$LDIF_LIBS%g
14767 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
14768 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
14769 s%@LDBM_LIBS@%$LDBM_LIBS%g
14770 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
14771 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
14772 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
14773 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
14774 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
14775 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
14776 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
14777 s%@KRB_LIBS@%$KRB_LIBS%g
14778 s%@READLINE_LIBS@%$READLINE_LIBS%g
14779 s%@SASL_LIBS@%$SASL_LIBS%g
14780 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
14781 s%@TLS_LIBS@%$TLS_LIBS%g
14782 s%@MODULES_LIBS@%$MODULES_LIBS%g
14783
14784 CEOF
14785 EOF
14786
14787 cat >> $CONFIG_STATUS <<\EOF
14788
14789 # Split the substitutions into bite-sized pieces for seds with
14790 # small command number limits, like on Digital OSF/1 and HP-UX.
14791 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14792 ac_file=1 # Number of current file.
14793 ac_beg=1 # First line for current file.
14794 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14795 ac_more_lines=:
14796 ac_sed_cmds=""
14797 while $ac_more_lines; do
14798   if test $ac_beg -gt 1; then
14799     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14800   else
14801     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14802   fi
14803   if test ! -s conftest.s$ac_file; then
14804     ac_more_lines=false
14805     rm -f conftest.s$ac_file
14806   else
14807     if test -z "$ac_sed_cmds"; then
14808       ac_sed_cmds="sed -f conftest.s$ac_file"
14809     else
14810       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14811     fi
14812     ac_file=`expr $ac_file + 1`
14813     ac_beg=$ac_end
14814     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14815   fi
14816 done
14817 if test -z "$ac_sed_cmds"; then
14818   ac_sed_cmds=cat
14819 fi
14820 EOF
14821
14822 cat >> $CONFIG_STATUS <<EOF
14823
14824 CONFIG_FILES=\${CONFIG_FILES-"\
14825 Makefile:build/top.mk:Makefile.in:build/dir.mk \
14826 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
14827 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
14828 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
14829 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
14830 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
14831 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
14832 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
14833 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
14834 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
14835 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
14836 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
14837 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
14838 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
14839 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
14840 include/Makefile:build/top.mk:include/Makefile.in \
14841 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
14842 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
14843 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14844 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
14845 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
14846 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
14847 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
14848 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
14849 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
14850 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
14851 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
14852 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
14853 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
14854 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
14855 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
14856 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
14857 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
14858 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
14859 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
14860 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
14861 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
14862 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
14863 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
14864 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
14865 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
14866 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
14867 "}
14868 EOF
14869 cat >> $CONFIG_STATUS <<\EOF
14870 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14871   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14872   case "$ac_file" in
14873   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14874        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14875   *) ac_file_in="${ac_file}.in" ;;
14876   esac
14877
14878   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14879
14880   # Remove last slash and all that follows it.  Not all systems have dirname.
14881   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14882   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14883     # The file is in a subdirectory.
14884     test ! -d "$ac_dir" && mkdir "$ac_dir"
14885     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14886     # A "../" for each directory in $ac_dir_suffix.
14887     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14888   else
14889     ac_dir_suffix= ac_dots=
14890   fi
14891
14892   case "$ac_given_srcdir" in
14893   .)  srcdir=.
14894       if test -z "$ac_dots"; then top_srcdir=.
14895       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14896   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14897   *) # Relative path.
14898     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14899     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14900   esac
14901
14902   case "$ac_given_INSTALL" in
14903   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14904   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14905   esac
14906
14907   echo creating "$ac_file"
14908   rm -f "$ac_file"
14909   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14910   case "$ac_file" in
14911   *Makefile*) ac_comsub="1i\\
14912 # $configure_input" ;;
14913   *) ac_comsub= ;;
14914   esac
14915
14916   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14917   sed -e "$ac_comsub
14918 s%@configure_input@%$configure_input%g
14919 s%@srcdir@%$srcdir%g
14920 s%@top_srcdir@%$top_srcdir%g
14921 s%@INSTALL@%$INSTALL%g
14922 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14923 fi; done
14924 rm -f conftest.s*
14925
14926 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14927 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14928 #
14929 # ac_d sets the value in "#define NAME VALUE" lines.
14930 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14931 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14932 ac_dC='\3'
14933 ac_dD='%g'
14934 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14935 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14936 ac_uB='\([      ]\)%\1#\2define\3'
14937 ac_uC=' '
14938 ac_uD='\4%g'
14939 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14940 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14941 ac_eB='$%\1#\2define\3'
14942 ac_eC=' '
14943 ac_eD='%g'
14944
14945 if test "${CONFIG_HEADERS+set}" != set; then
14946 EOF
14947 cat >> $CONFIG_STATUS <<EOF
14948   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
14949 EOF
14950 cat >> $CONFIG_STATUS <<\EOF
14951 fi
14952 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14953   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14954   case "$ac_file" in
14955   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14956        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14957   *) ac_file_in="${ac_file}.in" ;;
14958   esac
14959
14960   echo creating $ac_file
14961
14962   rm -f conftest.frag conftest.in conftest.out
14963   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14964   cat $ac_file_inputs > conftest.in
14965
14966 EOF
14967
14968 # Transform confdefs.h into a sed script conftest.vals that substitutes
14969 # the proper values into config.h.in to produce config.h.  And first:
14970 # Protect against being on the right side of a sed subst in config.status.
14971 # Protect against being in an unquoted here document in config.status.
14972 rm -f conftest.vals
14973 cat > conftest.hdr <<\EOF
14974 s/[\\&%]/\\&/g
14975 s%[\\$`]%\\&%g
14976 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14977 s%ac_d%ac_u%gp
14978 s%ac_u%ac_e%gp
14979 EOF
14980 sed -n -f conftest.hdr confdefs.h > conftest.vals
14981 rm -f conftest.hdr
14982
14983 # This sed command replaces #undef with comments.  This is necessary, for
14984 # example, in the case of _POSIX_SOURCE, which is predefined and required
14985 # on some systems where configure will not decide to define it.
14986 cat >> conftest.vals <<\EOF
14987 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14988 EOF
14989
14990 # Break up conftest.vals because some shells have a limit on
14991 # the size of here documents, and old seds have small limits too.
14992
14993 rm -f conftest.tail
14994 while :
14995 do
14996   ac_lines=`grep -c . conftest.vals`
14997   # grep -c gives empty output for an empty file on some AIX systems.
14998   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14999   # Write a limited-size here document to conftest.frag.
15000   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15001   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15002   echo 'CEOF
15003   sed -f conftest.frag conftest.in > conftest.out
15004   rm -f conftest.in
15005   mv conftest.out conftest.in
15006 ' >> $CONFIG_STATUS
15007   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15008   rm -f conftest.vals
15009   mv conftest.tail conftest.vals
15010 done
15011 rm -f conftest.vals
15012
15013 cat >> $CONFIG_STATUS <<\EOF
15014   rm -f conftest.frag conftest.h
15015   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15016   cat conftest.in >> conftest.h
15017   rm -f conftest.in
15018   if cmp -s $ac_file conftest.h 2>/dev/null; then
15019     echo "$ac_file is unchanged"
15020     rm -f conftest.h
15021   else
15022     # Remove last slash and all that follows it.  Not all systems have dirname.
15023       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15024       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15025       # The file is in a subdirectory.
15026       test ! -d "$ac_dir" && mkdir "$ac_dir"
15027     fi
15028     rm -f $ac_file
15029     mv conftest.h $ac_file
15030   fi
15031 fi; done
15032
15033 EOF
15034 cat >> $CONFIG_STATUS <<EOF
15035
15036 EOF
15037 cat >> $CONFIG_STATUS <<\EOF
15038
15039 date > stamp-h
15040 echo Please \"make depend\" to build dependencies
15041
15042 exit 0
15043 EOF
15044 chmod +x $CONFIG_STATUS
15045 rm -fr confdefs* $ac_clean_files
15046 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
15047