]> git.sur5r.net Git - openldap/blob - configure
Unexpand spaces for tabs in prior commit before merging to rel_eng_1_1.
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-proctitle    enable proctitle support (yes)"
21 ac_help="$ac_help
22   --enable-libui        enable library user interface (yes)"
23 ac_help="$ac_help
24   --enable-cache        enable caching (yes)"
25 ac_help="$ac_help
26   --enable-dns          enable V2 DNS  extension (no)"
27 ac_help="$ac_help
28   --enable-referrals    enable V2 Referrals extension (yes)"
29 ac_help="$ac_help
30   --enable-cldap        enable connectionless ldap (no)"
31 ac_help="$ac_help
32   --enable-x-compile    enable cross compiling (no)"
33 ac_help="$ac_help
34   --enable-dmalloc      enable debug malloc support (no)"
35 ac_help="$ac_help
36   --with-kerberos       use Kerberos (auto)"
37 ac_help="$ac_help
38   --with-threads        use threads (auto)"
39 ac_help="$ac_help
40   --with-yielding-select        with implicitly yielding select (auto)"
41 ac_help="$ac_help
42 LDAPD Options:"
43 ac_help="$ac_help
44   --enable-ldapd        enable building ldapd (no)"
45 ac_help="$ac_help
46 SLAPD Options:"
47 ac_help="$ac_help
48   --enable-slapd        enable building slapd (yes)"
49 ac_help="$ac_help
50     --enable-aclgroups  enable ACL group support (auto)"
51 ac_help="$ac_help
52     --enable-cleartext  enable cleartext passwords (yes)"
53 ac_help="$ac_help
54     --enable-crypt      enable crypt(3) passwords (auto)"
55 ac_help="$ac_help
56     --enable-wrappers   enable tcp wrapper support (no)"
57 ac_help="$ac_help
58     --enable-phonetic   enable phonetic/soundex (no)"
59 ac_help="$ac_help
60     --enable-rlookups   enable reverse lookups (auto)"
61 ac_help="$ac_help
62     --enable-ldbm       enable ldbm backend (yes)"
63 ac_help="$ac_help
64       --with-ldbm-api   use LDBM API (auto)"
65 ac_help="$ac_help
66       --with-ldbm-type  use LDBM type (auto)"
67 ac_help="$ac_help
68     --enable-passwd     enable passwd backend (no)"
69 ac_help="$ac_help
70     --enable-shell      enable shell backend (no)"
71 ac_help="$ac_help
72 SLURPD Options:"
73 ac_help="$ac_help
74   --enable-slurpd       enable building slurpd (auto)"
75 ac_help="$ac_help
76 Library Generation & Linking Options"
77 ac_help="$ac_help
78   --enable-static         build static libraries [default=yes]
79   --enable-static=PKGS    only build shared libraries if the current package
80                           appears as an element in the PKGS list"
81 ac_help="$ac_help
82   --enable-shared         build shared libraries [default=yes]
83   --enable-shared=PKGS    only build shared libraries if the current package
84                           appears as an element in the PKGS list"
85 ac_help="$ac_help
86   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
87
88 # Initialize some variables set by options.
89 # The variables have the same names as the options, with
90 # dashes changed to underlines.
91 build=NONE
92 cache_file=./config.cache
93 exec_prefix=NONE
94 host=NONE
95 no_create=
96 nonopt=NONE
97 no_recursion=
98 prefix=NONE
99 program_prefix=NONE
100 program_suffix=NONE
101 program_transform_name=s,x,x,
102 silent=
103 site=
104 srcdir=
105 target=NONE
106 verbose=
107 x_includes=NONE
108 x_libraries=NONE
109 bindir='${exec_prefix}/bin'
110 sbindir='${exec_prefix}/sbin'
111 libexecdir='${exec_prefix}/libexec'
112 datadir='${prefix}/share'
113 sysconfdir='${prefix}/etc'
114 sharedstatedir='${prefix}/com'
115 localstatedir='${prefix}/var'
116 libdir='${exec_prefix}/lib'
117 includedir='${prefix}/include'
118 oldincludedir='/usr/include'
119 infodir='${prefix}/info'
120 mandir='${prefix}/man'
121
122 # Initialize some other variables.
123 subdirs=
124 MFLAGS= MAKEFLAGS=
125 # Maximum number of lines to put in a shell here document.
126 ac_max_here_lines=12
127
128 ac_prev=
129 for ac_option
130 do
131
132   # If the previous option needs an argument, assign it.
133   if test -n "$ac_prev"; then
134     eval "$ac_prev=\$ac_option"
135     ac_prev=
136     continue
137   fi
138
139   case "$ac_option" in
140   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
141   *) ac_optarg= ;;
142   esac
143
144   # Accept the important Cygnus configure options, so we can diagnose typos.
145
146   case "$ac_option" in
147
148   -bindir | --bindir | --bindi | --bind | --bin | --bi)
149     ac_prev=bindir ;;
150   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
151     bindir="$ac_optarg" ;;
152
153   -build | --build | --buil | --bui | --bu)
154     ac_prev=build ;;
155   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
156     build="$ac_optarg" ;;
157
158   -cache-file | --cache-file | --cache-fil | --cache-fi \
159   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
160     ac_prev=cache_file ;;
161   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
162   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
163     cache_file="$ac_optarg" ;;
164
165   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
166     ac_prev=datadir ;;
167   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
168   | --da=*)
169     datadir="$ac_optarg" ;;
170
171   -disable-* | --disable-*)
172     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
173     # Reject names that are not valid shell variable names.
174     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
175       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
176     fi
177     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
178     eval "enable_${ac_feature}=no" ;;
179
180   -enable-* | --enable-*)
181     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
182     # Reject names that are not valid shell variable names.
183     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
184       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
185     fi
186     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
187     case "$ac_option" in
188       *=*) ;;
189       *) ac_optarg=yes ;;
190     esac
191     eval "enable_${ac_feature}='$ac_optarg'" ;;
192
193   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
194   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
195   | --exec | --exe | --ex)
196     ac_prev=exec_prefix ;;
197   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
198   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
199   | --exec=* | --exe=* | --ex=*)
200     exec_prefix="$ac_optarg" ;;
201
202   -gas | --gas | --ga | --g)
203     # Obsolete; use --with-gas.
204     with_gas=yes ;;
205
206   -help | --help | --hel | --he)
207     # Omit some internal or obsolete options to make the list less imposing.
208     # This message is too long to be a string in the A/UX 3.1 sh.
209     cat << EOF
210 Usage: configure [options] [host]
211 Options: [defaults in brackets after descriptions]
212 Configuration:
213   --cache-file=FILE       cache test results in FILE
214   --help                  print this message
215   --no-create             do not create output files
216   --quiet, --silent       do not print \`checking...' messages
217   --version               print the version of autoconf that created configure
218 Directory and file names:
219   --prefix=PREFIX         install architecture-independent files in PREFIX
220                           [$ac_default_prefix]
221   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
222                           [same as prefix]
223   --bindir=DIR            user executables in DIR [EPREFIX/bin]
224   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
225   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
226   --datadir=DIR           read-only architecture-independent data in DIR
227                           [PREFIX/share]
228   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
229   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
230                           [PREFIX/com]
231   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
232   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
233   --includedir=DIR        C header files in DIR [PREFIX/include]
234   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
235   --infodir=DIR           info documentation in DIR [PREFIX/info]
236   --mandir=DIR            man documentation in DIR [PREFIX/man]
237   --srcdir=DIR            find the sources in DIR [configure dir or ..]
238   --program-prefix=PREFIX prepend PREFIX to installed program names
239   --program-suffix=SUFFIX append SUFFIX to installed program names
240   --program-transform-name=PROGRAM
241                           run sed PROGRAM on installed program names
242 EOF
243     cat << EOF
244 Host type:
245   --build=BUILD           configure for building on BUILD [BUILD=HOST]
246   --host=HOST             configure for HOST [guessed]
247   --target=TARGET         configure for TARGET [TARGET=HOST]
248 Features and packages:
249   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
250   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
251   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
252   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
253   --x-includes=DIR        X include files are in DIR
254   --x-libraries=DIR       X library files are in DIR
255 EOF
256     if test -n "$ac_help"; then
257       echo "--enable and --with options recognized:$ac_help"
258     fi
259     exit 0 ;;
260
261   -host | --host | --hos | --ho)
262     ac_prev=host ;;
263   -host=* | --host=* | --hos=* | --ho=*)
264     host="$ac_optarg" ;;
265
266   -includedir | --includedir | --includedi | --included | --include \
267   | --includ | --inclu | --incl | --inc)
268     ac_prev=includedir ;;
269   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
270   | --includ=* | --inclu=* | --incl=* | --inc=*)
271     includedir="$ac_optarg" ;;
272
273   -infodir | --infodir | --infodi | --infod | --info | --inf)
274     ac_prev=infodir ;;
275   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
276     infodir="$ac_optarg" ;;
277
278   -libdir | --libdir | --libdi | --libd)
279     ac_prev=libdir ;;
280   -libdir=* | --libdir=* | --libdi=* | --libd=*)
281     libdir="$ac_optarg" ;;
282
283   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
284   | --libexe | --libex | --libe)
285     ac_prev=libexecdir ;;
286   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
287   | --libexe=* | --libex=* | --libe=*)
288     libexecdir="$ac_optarg" ;;
289
290   -localstatedir | --localstatedir | --localstatedi | --localstated \
291   | --localstate | --localstat | --localsta | --localst \
292   | --locals | --local | --loca | --loc | --lo)
293     ac_prev=localstatedir ;;
294   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
295   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
296   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
297     localstatedir="$ac_optarg" ;;
298
299   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
300     ac_prev=mandir ;;
301   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
302     mandir="$ac_optarg" ;;
303
304   -nfp | --nfp | --nf)
305     # Obsolete; use --without-fp.
306     with_fp=no ;;
307
308   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
309   | --no-cr | --no-c)
310     no_create=yes ;;
311
312   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
313   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
314     no_recursion=yes ;;
315
316   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
317   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
318   | --oldin | --oldi | --old | --ol | --o)
319     ac_prev=oldincludedir ;;
320   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
321   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
322   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
323     oldincludedir="$ac_optarg" ;;
324
325   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
326     ac_prev=prefix ;;
327   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
328     prefix="$ac_optarg" ;;
329
330   -program-prefix | --program-prefix | --program-prefi | --program-pref \
331   | --program-pre | --program-pr | --program-p)
332     ac_prev=program_prefix ;;
333   -program-prefix=* | --program-prefix=* | --program-prefi=* \
334   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
335     program_prefix="$ac_optarg" ;;
336
337   -program-suffix | --program-suffix | --program-suffi | --program-suff \
338   | --program-suf | --program-su | --program-s)
339     ac_prev=program_suffix ;;
340   -program-suffix=* | --program-suffix=* | --program-suffi=* \
341   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
342     program_suffix="$ac_optarg" ;;
343
344   -program-transform-name | --program-transform-name \
345   | --program-transform-nam | --program-transform-na \
346   | --program-transform-n | --program-transform- \
347   | --program-transform | --program-transfor \
348   | --program-transfo | --program-transf \
349   | --program-trans | --program-tran \
350   | --progr-tra | --program-tr | --program-t)
351     ac_prev=program_transform_name ;;
352   -program-transform-name=* | --program-transform-name=* \
353   | --program-transform-nam=* | --program-transform-na=* \
354   | --program-transform-n=* | --program-transform-=* \
355   | --program-transform=* | --program-transfor=* \
356   | --program-transfo=* | --program-transf=* \
357   | --program-trans=* | --program-tran=* \
358   | --progr-tra=* | --program-tr=* | --program-t=*)
359     program_transform_name="$ac_optarg" ;;
360
361   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
362   | -silent | --silent | --silen | --sile | --sil)
363     silent=yes ;;
364
365   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
366     ac_prev=sbindir ;;
367   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
368   | --sbi=* | --sb=*)
369     sbindir="$ac_optarg" ;;
370
371   -sharedstatedir | --sharedstatedir | --sharedstatedi \
372   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
373   | --sharedst | --shareds | --shared | --share | --shar \
374   | --sha | --sh)
375     ac_prev=sharedstatedir ;;
376   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
377   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
378   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
379   | --sha=* | --sh=*)
380     sharedstatedir="$ac_optarg" ;;
381
382   -site | --site | --sit)
383     ac_prev=site ;;
384   -site=* | --site=* | --sit=*)
385     site="$ac_optarg" ;;
386
387   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
388     ac_prev=srcdir ;;
389   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
390     srcdir="$ac_optarg" ;;
391
392   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
393   | --syscon | --sysco | --sysc | --sys | --sy)
394     ac_prev=sysconfdir ;;
395   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
396   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
397     sysconfdir="$ac_optarg" ;;
398
399   -target | --target | --targe | --targ | --tar | --ta | --t)
400     ac_prev=target ;;
401   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
402     target="$ac_optarg" ;;
403
404   -v | -verbose | --verbose | --verbos | --verbo | --verb)
405     verbose=yes ;;
406
407   -version | --version | --versio | --versi | --vers)
408     echo "configure generated by autoconf version 2.12"
409     exit 0 ;;
410
411   -with-* | --with-*)
412     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
413     # Reject names that are not valid shell variable names.
414     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
415       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
416     fi
417     ac_package=`echo $ac_package| sed 's/-/_/g'`
418     case "$ac_option" in
419       *=*) ;;
420       *) ac_optarg=yes ;;
421     esac
422     eval "with_${ac_package}='$ac_optarg'" ;;
423
424   -without-* | --without-*)
425     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
426     # Reject names that are not valid shell variable names.
427     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
428       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
429     fi
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     eval "with_${ac_package}=no" ;;
432
433   --x)
434     # Obsolete; use --with-x.
435     with_x=yes ;;
436
437   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
438   | --x-incl | --x-inc | --x-in | --x-i)
439     ac_prev=x_includes ;;
440   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
441   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
442     x_includes="$ac_optarg" ;;
443
444   -x-libraries | --x-libraries | --x-librarie | --x-librari \
445   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
446     ac_prev=x_libraries ;;
447   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
448   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
449     x_libraries="$ac_optarg" ;;
450
451   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
452     ;;
453
454   *)
455     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
456       echo "configure: warning: $ac_option: invalid host type" 1>&2
457     fi
458     if test "x$nonopt" != xNONE; then
459       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
460     fi
461     nonopt="$ac_option"
462     ;;
463
464   esac
465 done
466
467 if test -n "$ac_prev"; then
468   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
469 fi
470
471 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
472
473 # File descriptor usage:
474 # 0 standard input
475 # 1 file creation
476 # 2 errors and warnings
477 # 3 some systems may open it to /dev/tty
478 # 4 used on the Kubota Titan
479 # 6 checking for... messages and results
480 # 5 compiler messages saved in config.log
481 if test "$silent" = yes; then
482   exec 6>/dev/null
483 else
484   exec 6>&1
485 fi
486 exec 5>./config.log
487
488 echo "\
489 This file contains any messages produced by compilers while
490 running configure, to aid debugging if configure makes a mistake.
491 " 1>&5
492
493 # Strip out --no-create and --no-recursion so they do not pile up.
494 # Also quote any args containing shell metacharacters.
495 ac_configure_args=
496 for ac_arg
497 do
498   case "$ac_arg" in
499   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
500   | --no-cr | --no-c) ;;
501   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
502   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
503   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
504   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
505   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
506   esac
507 done
508
509 # NLS nuisances.
510 # Only set these to C if already set.  These must not be set unconditionally
511 # because not all systems understand e.g. LANG=C (notably SCO).
512 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
513 # Non-C LC_CTYPE values break the ctype check.
514 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
515 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
516 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
517 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
518
519 # confdefs.h avoids OS command line length limits that DEFS can exceed.
520 rm -rf conftest* confdefs.h
521 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
522 echo > confdefs.h
523
524 # A filename unique to this package, relative to the directory that
525 # configure is in, which we can look for to find out if srcdir is correct.
526 ac_unique_file=include/ldap.h
527
528 # Find the source files, if location was not specified.
529 if test -z "$srcdir"; then
530   ac_srcdir_defaulted=yes
531   # Try the directory containing this script, then its parent.
532   ac_prog=$0
533   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
534   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
535   srcdir=$ac_confdir
536   if test ! -r $srcdir/$ac_unique_file; then
537     srcdir=..
538   fi
539 else
540   ac_srcdir_defaulted=no
541 fi
542 if test ! -r $srcdir/$ac_unique_file; then
543   if test "$ac_srcdir_defaulted" = yes; then
544     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
545   else
546     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
547   fi
548 fi
549 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
550
551 # Prefer explicitly selected file to automatically selected ones.
552 if test -z "$CONFIG_SITE"; then
553   if test "x$prefix" != xNONE; then
554     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
555   else
556     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
557   fi
558 fi
559 for ac_site_file in $CONFIG_SITE; do
560   if test -r "$ac_site_file"; then
561     echo "loading site script $ac_site_file"
562     . "$ac_site_file"
563   fi
564 done
565
566 if test -r "$cache_file"; then
567   echo "loading cache $cache_file"
568   . $cache_file
569 else
570   echo "creating cache $cache_file"
571   > $cache_file
572 fi
573
574 ac_ext=c
575 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
576 ac_cpp='$CPP $CPPFLAGS'
577 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
578 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
579 cross_compiling=$ac_cv_prog_cc_cross
580
581 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
582   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
583   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
584     ac_n= ac_c='
585 ' ac_t='        '
586   else
587     ac_n=-n ac_c= ac_t=
588   fi
589 else
590   ac_n= ac_c='\c' ac_t=
591 fi
592
593 ac_aux_dir=
594 for ac_dir in build $srcdir/build; do
595   if test -f $ac_dir/install-sh; then
596     ac_aux_dir=$ac_dir
597     ac_install_sh="$ac_aux_dir/install-sh -c"
598     break
599   elif test -f $ac_dir/install.sh; then
600     ac_aux_dir=$ac_dir
601     ac_install_sh="$ac_aux_dir/install.sh -c"
602     break
603   fi
604 done
605 if test -z "$ac_aux_dir"; then
606   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
607 fi
608 ac_config_guess=$ac_aux_dir/config.guess
609 ac_config_sub=$ac_aux_dir/config.sub
610 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
611 # Find a good install program.  We prefer a C program (faster),
612 # so one script is as good as another.  But avoid the broken or
613 # incompatible versions:
614 # SysV /etc/install, /usr/sbin/install
615 # SunOS /usr/etc/install
616 # IRIX /sbin/install
617 # AIX /bin/install
618 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
619 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
620 # ./install, which can be erroneously created by make from ./install.sh.
621 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
622 echo "configure:623: checking for a BSD compatible install" >&5
623 if test -z "$INSTALL"; then
624 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
625   echo $ac_n "(cached) $ac_c" 1>&6
626 else
627     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
628   for ac_dir in $PATH; do
629     # Account for people who put trailing slashes in PATH elements.
630     case "$ac_dir/" in
631     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
632     *)
633       # OSF1 and SCO ODT 3.0 have their own names for install.
634       for ac_prog in ginstall installbsd scoinst install; do
635         if test -f $ac_dir/$ac_prog; then
636           if test $ac_prog = install &&
637             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
638             # AIX install.  It has an incompatible calling convention.
639             # OSF/1 installbsd also uses dspmsg, but is usable.
640             :
641           else
642             ac_cv_path_install="$ac_dir/$ac_prog -c"
643             break 2
644           fi
645         fi
646       done
647       ;;
648     esac
649   done
650   IFS="$ac_save_IFS"
651
652 fi
653   if test "${ac_cv_path_install+set}" = set; then
654     INSTALL="$ac_cv_path_install"
655   else
656     # As a last resort, use the slow shell script.  We don't cache a
657     # path for INSTALL within a source directory, because that will
658     # break other packages using the cache if that directory is
659     # removed, or if the path is relative.
660     INSTALL="$ac_install_sh"
661   fi
662 fi
663 echo "$ac_t""$INSTALL" 1>&6
664
665 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
666 # It thinks the first close brace ends the variable substitution.
667 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
668
669 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
670
671
672 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
673
674 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
675 echo "configure:676: checking whether build environment is sane" >&5
676 # Just in case
677 sleep 1
678 echo timestamp > conftestfile
679 # Do `set' in a subshell so we don't clobber the current shell's
680 # arguments.  Must try -L first in case configure is actually a
681 # symlink; some systems play weird games with the mod time of symlinks
682 # (eg FreeBSD returns the mod time of the symlink's containing
683 # directory).
684 if (
685    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
686    if test "$*" = "X"; then
687       # -L didn't work.
688       set X `ls -t $srcdir/configure conftestfile`
689    fi
690    if test "$*" != "X $srcdir/configure conftestfile" \
691       && test "$*" != "X conftestfile $srcdir/configure"; then
692
693       # If neither matched, then we have a broken ls.  This can happen
694       # if, for instance, CONFIG_SHELL is bash and it inherits a
695       # broken ls alias from the environment.  This has actually
696       # happened.  Such a system could not be considered "sane".
697       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
698 alias in your environment" 1>&2; exit 1; }
699    fi
700
701    test "$2" = conftestfile
702    )
703 then
704    # Ok.
705    :
706 else
707    { echo "configure: error: newly created file is older than distributed files!
708 Check your system clock" 1>&2; exit 1; }
709 fi
710 rm -f conftest*
711 echo "$ac_t""yes" 1>&6
712 if test "$program_transform_name" = s,x,x,; then
713   program_transform_name=
714 else
715   # Double any \ or $.  echo might interpret backslashes.
716   cat <<\EOF_SED > conftestsed
717 s,\\,\\\\,g; s,\$,$$,g
718 EOF_SED
719   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
720   rm -f conftestsed
721 fi
722 test "$program_prefix" != NONE &&
723   program_transform_name="s,^,${program_prefix},; $program_transform_name"
724 # Use a double $ so make ignores it.
725 test "$program_suffix" != NONE &&
726   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
727
728 # sed with no file args requires a program.
729 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
730
731 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
732 echo "configure:733: checking whether ${MAKE-make} sets \${MAKE}" >&5
733 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
734 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
735   echo $ac_n "(cached) $ac_c" 1>&6
736 else
737   cat > conftestmake <<\EOF
738 all:
739         @echo 'ac_maketemp="${MAKE}"'
740 EOF
741 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
742 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
743 if test -n "$ac_maketemp"; then
744   eval ac_cv_prog_make_${ac_make}_set=yes
745 else
746   eval ac_cv_prog_make_${ac_make}_set=no
747 fi
748 rm -f conftestmake
749 fi
750 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
751   echo "$ac_t""yes" 1>&6
752   SET_MAKE=
753 else
754   echo "$ac_t""no" 1>&6
755   SET_MAKE="MAKE=${MAKE-make}"
756 fi
757
758
759 PACKAGE=OpenLDAP
760
761 VERSION=2.0-devel
762
763 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
764   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
765 fi
766
767
768
769 missing_dir=`cd $ac_aux_dir && pwd`
770 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
771 echo "configure:772: checking for working aclocal" >&5
772 # Run test in a subshell; some versions of sh will print an error if
773 # an executable is not found, even if stderr is redirected.
774 # Redirect stdin to placate older versions of autoconf.  Sigh.
775 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
776    ACLOCAL=aclocal
777    echo "$ac_t""found" 1>&6
778 else
779    ACLOCAL="$missing_dir/missing aclocal"
780    echo "$ac_t""missing" 1>&6
781 fi
782
783 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
784 echo "configure:785: checking for working autoconf" >&5
785 # Run test in a subshell; some versions of sh will print an error if
786 # an executable is not found, even if stderr is redirected.
787 # Redirect stdin to placate older versions of autoconf.  Sigh.
788 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
789    AUTOCONF=autoconf
790    echo "$ac_t""found" 1>&6
791 else
792    AUTOCONF="$missing_dir/missing autoconf"
793    echo "$ac_t""missing" 1>&6
794 fi
795
796 echo $ac_n "checking for working automake""... $ac_c" 1>&6
797 echo "configure:798: checking for working automake" >&5
798 # Run test in a subshell; some versions of sh will print an error if
799 # an executable is not found, even if stderr is redirected.
800 # Redirect stdin to placate older versions of autoconf.  Sigh.
801 if (automake --version) < /dev/null > /dev/null 2>&1; then
802    AUTOMAKE=automake
803    echo "$ac_t""found" 1>&6
804 else
805    AUTOMAKE="$missing_dir/missing automake"
806    echo "$ac_t""missing" 1>&6
807 fi
808
809 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
810 echo "configure:811: checking for working autoheader" >&5
811 # Run test in a subshell; some versions of sh will print an error if
812 # an executable is not found, even if stderr is redirected.
813 # Redirect stdin to placate older versions of autoconf.  Sigh.
814 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
815    AUTOHEADER=autoheader
816    echo "$ac_t""found" 1>&6
817 else
818    AUTOHEADER="$missing_dir/missing autoheader"
819    echo "$ac_t""missing" 1>&6
820 fi
821
822 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
823 echo "configure:824: checking for working makeinfo" >&5
824 # Run test in a subshell; some versions of sh will print an error if
825 # an executable is not found, even if stderr is redirected.
826 # Redirect stdin to placate older versions of autoconf.  Sigh.
827 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
828    MAKEINFO=makeinfo
829    echo "$ac_t""found" 1>&6
830 else
831    MAKEINFO="$missing_dir/missing makeinfo"
832    echo "$ac_t""missing" 1>&6
833 fi
834
835
836
837
838 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
839 echo "configure:840: checking configure arguments" >&5
840
841
842 top_builddir=`pwd`
843
844 ldap_subdir="openldap"
845
846 # Check whether --with-subdir or --without-subdir was given.
847 if test "${with_subdir+set}" = set; then
848   withval="$with_subdir"
849   
850         if test "$withval" = "no"; then
851                 ldap_subdir=""
852         elif test "$withval" != "yes"; then
853                 ldap_subdir="$withval"
854         fi
855
856 fi
857
858
859 # OpenLDAP --enable-debug
860         # Check whether --enable-debug or --disable-debug was given.
861 if test "${enable_debug+set}" = set; then
862   enableval="$enable_debug"
863   
864         ol_arg=invalid
865         for ol_val in auto yes no ; do
866                 if test "$enableval" = "$ol_val" ; then
867                         ol_arg="$ol_val"
868                 fi
869         done
870         if test "$ol_arg" = "invalid" ; then
871                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
872         fi
873         ol_enable_debug="$ol_arg"
874
875 else
876         ol_enable_debug="yes"
877 fi
878 # end --enable-debug
879 # OpenLDAP --enable-proctitle
880         # Check whether --enable-proctitle or --disable-proctitle was given.
881 if test "${enable_proctitle+set}" = set; then
882   enableval="$enable_proctitle"
883   
884         ol_arg=invalid
885         for ol_val in auto yes no ; do
886                 if test "$enableval" = "$ol_val" ; then
887                         ol_arg="$ol_val"
888                 fi
889         done
890         if test "$ol_arg" = "invalid" ; then
891                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
892         fi
893         ol_enable_proctitle="$ol_arg"
894
895 else
896         ol_enable_proctitle="yes"
897 fi
898 # end --enable-proctitle
899 # OpenLDAP --enable-libui
900         # Check whether --enable-libui or --disable-libui was given.
901 if test "${enable_libui+set}" = set; then
902   enableval="$enable_libui"
903   
904         ol_arg=invalid
905         for ol_val in auto yes no ; do
906                 if test "$enableval" = "$ol_val" ; then
907                         ol_arg="$ol_val"
908                 fi
909         done
910         if test "$ol_arg" = "invalid" ; then
911                 { echo "configure: error: bad value $enableval for --enable-libui" 1>&2; exit 1; }
912         fi
913         ol_enable_libui="$ol_arg"
914
915 else
916         ol_enable_libui="yes"
917 fi
918 # end --enable-libui
919 # OpenLDAP --enable-cache
920         # Check whether --enable-cache or --disable-cache was given.
921 if test "${enable_cache+set}" = set; then
922   enableval="$enable_cache"
923   
924         ol_arg=invalid
925         for ol_val in auto yes no ; do
926                 if test "$enableval" = "$ol_val" ; then
927                         ol_arg="$ol_val"
928                 fi
929         done
930         if test "$ol_arg" = "invalid" ; then
931                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
932         fi
933         ol_enable_cache="$ol_arg"
934
935 else
936         ol_enable_cache="yes"
937 fi
938 # end --enable-cache
939 # OpenLDAP --enable-dns
940         # Check whether --enable-dns or --disable-dns was given.
941 if test "${enable_dns+set}" = set; then
942   enableval="$enable_dns"
943   
944         ol_arg=invalid
945         for ol_val in auto yes no ; do
946                 if test "$enableval" = "$ol_val" ; then
947                         ol_arg="$ol_val"
948                 fi
949         done
950         if test "$ol_arg" = "invalid" ; then
951                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
952         fi
953         ol_enable_dns="$ol_arg"
954
955 else
956         ol_enable_dns="no"
957 fi
958 # end --enable-dns
959 # OpenLDAP --enable-referrals
960         # Check whether --enable-referrals or --disable-referrals was given.
961 if test "${enable_referrals+set}" = set; then
962   enableval="$enable_referrals"
963   
964         ol_arg=invalid
965         for ol_val in auto yes no ; do
966                 if test "$enableval" = "$ol_val" ; then
967                         ol_arg="$ol_val"
968                 fi
969         done
970         if test "$ol_arg" = "invalid" ; then
971                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
972         fi
973         ol_enable_referrals="$ol_arg"
974
975 else
976         ol_enable_referrals="yes"
977 fi
978 # end --enable-referrals
979 # OpenLDAP --enable-cldap
980         # Check whether --enable-cldap or --disable-cldap was given.
981 if test "${enable_cldap+set}" = set; then
982   enableval="$enable_cldap"
983   
984         ol_arg=invalid
985         for ol_val in auto yes no ; do
986                 if test "$enableval" = "$ol_val" ; then
987                         ol_arg="$ol_val"
988                 fi
989         done
990         if test "$ol_arg" = "invalid" ; then
991                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
992         fi
993         ol_enable_cldap="$ol_arg"
994
995 else
996         ol_enable_cldap="no"
997 fi
998 # end --enable-cldap
999 # OpenLDAP --enable-x_compile
1000         # Check whether --enable-x_compile or --disable-x_compile was given.
1001 if test "${enable_x_compile+set}" = set; then
1002   enableval="$enable_x_compile"
1003   
1004         ol_arg=invalid
1005         for ol_val in yes no ; do
1006                 if test "$enableval" = "$ol_val" ; then
1007                         ol_arg="$ol_val"
1008                 fi
1009         done
1010         if test "$ol_arg" = "invalid" ; then
1011                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1012         fi
1013         ol_enable_x_compile="$ol_arg"
1014
1015 else
1016         ol_enable_x_compile="no"
1017 fi
1018 # end --enable-x_compile
1019
1020
1021 # OpenLDAP --enable-dmalloc
1022         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1023 if test "${enable_dmalloc+set}" = set; then
1024   enableval="$enable_dmalloc"
1025   
1026         ol_arg=invalid
1027         for ol_val in auto yes no ; do
1028                 if test "$enableval" = "$ol_val" ; then
1029                         ol_arg="$ol_val"
1030                 fi
1031         done
1032         if test "$ol_arg" = "invalid" ; then
1033                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1034         fi
1035         ol_enable_dmalloc="$ol_arg"
1036
1037 else
1038         ol_enable_dmalloc="no"
1039 fi
1040 # end --enable-dmalloc
1041
1042 # OpenLDAP --with-kerberos
1043         # Check whether --with-kerberos or --without-kerberos was given.
1044 if test "${with_kerberos+set}" = set; then
1045   withval="$with_kerberos"
1046   
1047         ol_arg=invalid
1048         for ol_val in auto k5 k4 afs yes no ; do
1049                 if test "$withval" = "$ol_val" ; then
1050                         ol_arg="$ol_val"
1051                 fi
1052         done
1053         if test "$ol_arg" = "invalid" ; then
1054                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1055         fi
1056         ol_with_kerberos="$ol_arg"
1057
1058 else
1059         ol_with_kerberos="auto"
1060 fi
1061 # end --with-kerberos
1062
1063 # OpenLDAP --with-threads
1064         # Check whether --with-threads or --without-threads was given.
1065 if test "${with_threads+set}" = set; then
1066   withval="$with_threads"
1067   
1068         ol_arg=invalid
1069         for ol_val in auto posix mach lwp yes no manual  ; do
1070                 if test "$withval" = "$ol_val" ; then
1071                         ol_arg="$ol_val"
1072                 fi
1073         done
1074         if test "$ol_arg" = "invalid" ; then
1075                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1076         fi
1077         ol_with_threads="$ol_arg"
1078
1079 else
1080         ol_with_threads="auto"
1081 fi
1082 # end --with-threads
1083
1084 # OpenLDAP --with-yielding_select
1085         # Check whether --with-yielding_select or --without-yielding_select was given.
1086 if test "${with_yielding_select+set}" = set; then
1087   withval="$with_yielding_select"
1088   
1089         ol_arg=invalid
1090         for ol_val in auto yes no manual  ; do
1091                 if test "$withval" = "$ol_val" ; then
1092                         ol_arg="$ol_val"
1093                 fi
1094         done
1095         if test "$ol_arg" = "invalid" ; then
1096                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1097         fi
1098         ol_with_yielding_select="$ol_arg"
1099
1100 else
1101         ol_with_yielding_select="auto"
1102 fi
1103 # end --with-yielding_select
1104
1105
1106
1107 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1108 if test "${with_xxldapdoptions+set}" = set; then
1109   withval="$with_xxldapdoptions"
1110   :
1111 fi
1112
1113 # OpenLDAP --enable-ldapd
1114         # Check whether --enable-ldapd or --disable-ldapd was given.
1115 if test "${enable_ldapd+set}" = set; then
1116   enableval="$enable_ldapd"
1117   
1118         ol_arg=invalid
1119         for ol_val in auto yes no ; do
1120                 if test "$enableval" = "$ol_val" ; then
1121                         ol_arg="$ol_val"
1122                 fi
1123         done
1124         if test "$ol_arg" = "invalid" ; then
1125                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1126         fi
1127         ol_enable_ldapd="$ol_arg"
1128
1129 else
1130         ol_enable_ldapd="no"
1131 fi
1132 # end --enable-ldapd
1133
1134 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1135 if test "${with_xxslapdoptions+set}" = set; then
1136   withval="$with_xxslapdoptions"
1137   :
1138 fi
1139
1140 # OpenLDAP --enable-slapd
1141         # Check whether --enable-slapd or --disable-slapd was given.
1142 if test "${enable_slapd+set}" = set; then
1143   enableval="$enable_slapd"
1144   
1145         ol_arg=invalid
1146         for ol_val in auto yes no ; do
1147                 if test "$enableval" = "$ol_val" ; then
1148                         ol_arg="$ol_val"
1149                 fi
1150         done
1151         if test "$ol_arg" = "invalid" ; then
1152                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1153         fi
1154         ol_enable_slapd="$ol_arg"
1155
1156 else
1157         ol_enable_slapd="yes"
1158 fi
1159 # end --enable-slapd
1160 # OpenLDAP --enable-aclgroups
1161         # Check whether --enable-aclgroups or --disable-aclgroups was given.
1162 if test "${enable_aclgroups+set}" = set; then
1163   enableval="$enable_aclgroups"
1164   
1165         ol_arg=invalid
1166         for ol_val in auto yes no ; do
1167                 if test "$enableval" = "$ol_val" ; then
1168                         ol_arg="$ol_val"
1169                 fi
1170         done
1171         if test "$ol_arg" = "invalid" ; then
1172                 { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; }
1173         fi
1174         ol_enable_aclgroups="$ol_arg"
1175
1176 else
1177         ol_enable_aclgroups="auto"
1178 fi
1179 # end --enable-aclgroups
1180 # OpenLDAP --enable-cleartext
1181         # Check whether --enable-cleartext or --disable-cleartext was given.
1182 if test "${enable_cleartext+set}" = set; then
1183   enableval="$enable_cleartext"
1184   
1185         ol_arg=invalid
1186         for ol_val in auto yes no ; do
1187                 if test "$enableval" = "$ol_val" ; then
1188                         ol_arg="$ol_val"
1189                 fi
1190         done
1191         if test "$ol_arg" = "invalid" ; then
1192                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1193         fi
1194         ol_enable_cleartext="$ol_arg"
1195
1196 else
1197         ol_enable_cleartext="yes"
1198 fi
1199 # end --enable-cleartext
1200 # OpenLDAP --enable-crypt
1201         # Check whether --enable-crypt or --disable-crypt was given.
1202 if test "${enable_crypt+set}" = set; then
1203   enableval="$enable_crypt"
1204   
1205         ol_arg=invalid
1206         for ol_val in auto yes no ; do
1207                 if test "$enableval" = "$ol_val" ; then
1208                         ol_arg="$ol_val"
1209                 fi
1210         done
1211         if test "$ol_arg" = "invalid" ; then
1212                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1213         fi
1214         ol_enable_crypt="$ol_arg"
1215
1216 else
1217         ol_enable_crypt="auto"
1218 fi
1219 # end --enable-crypt
1220 # OpenLDAP --enable-wrappers
1221         # Check whether --enable-wrappers or --disable-wrappers was given.
1222 if test "${enable_wrappers+set}" = set; then
1223   enableval="$enable_wrappers"
1224   
1225         ol_arg=invalid
1226         for ol_val in auto yes no ; do
1227                 if test "$enableval" = "$ol_val" ; then
1228                         ol_arg="$ol_val"
1229                 fi
1230         done
1231         if test "$ol_arg" = "invalid" ; then
1232                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1233         fi
1234         ol_enable_wrappers="$ol_arg"
1235
1236 else
1237         ol_enable_wrappers="no"
1238 fi
1239 # end --enable-wrappers
1240 # OpenLDAP --enable-phonetic
1241         # Check whether --enable-phonetic or --disable-phonetic was given.
1242 if test "${enable_phonetic+set}" = set; then
1243   enableval="$enable_phonetic"
1244   
1245         ol_arg=invalid
1246         for ol_val in auto yes no ; do
1247                 if test "$enableval" = "$ol_val" ; then
1248                         ol_arg="$ol_val"
1249                 fi
1250         done
1251         if test "$ol_arg" = "invalid" ; then
1252                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1253         fi
1254         ol_enable_phonetic="$ol_arg"
1255
1256 else
1257         ol_enable_phonetic="no"
1258 fi
1259 # end --enable-phonetic
1260 # OpenLDAP --enable-rlookups
1261         # Check whether --enable-rlookups or --disable-rlookups was given.
1262 if test "${enable_rlookups+set}" = set; then
1263   enableval="$enable_rlookups"
1264   
1265         ol_arg=invalid
1266         for ol_val in auto yes no ; do
1267                 if test "$enableval" = "$ol_val" ; then
1268                         ol_arg="$ol_val"
1269                 fi
1270         done
1271         if test "$ol_arg" = "invalid" ; then
1272                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1273         fi
1274         ol_enable_rlookups="$ol_arg"
1275
1276 else
1277         ol_enable_rlookups="auto"
1278 fi
1279 # end --enable-rlookups
1280
1281 # OpenLDAP --enable-ldbm
1282         # Check whether --enable-ldbm or --disable-ldbm was given.
1283 if test "${enable_ldbm+set}" = set; then
1284   enableval="$enable_ldbm"
1285   
1286         ol_arg=invalid
1287         for ol_val in auto yes no ; do
1288                 if test "$enableval" = "$ol_val" ; then
1289                         ol_arg="$ol_val"
1290                 fi
1291         done
1292         if test "$ol_arg" = "invalid" ; then
1293                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1294         fi
1295         ol_enable_ldbm="$ol_arg"
1296
1297 else
1298         ol_enable_ldbm="yes"
1299 fi
1300 # end --enable-ldbm
1301 # OpenLDAP --with-ldbm_api
1302         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1303 if test "${with_ldbm_api+set}" = set; then
1304   withval="$with_ldbm_api"
1305   
1306         ol_arg=invalid
1307         for ol_val in auto db2 db gdbm ndbm manual ; do
1308                 if test "$withval" = "$ol_val" ; then
1309                         ol_arg="$ol_val"
1310                 fi
1311         done
1312         if test "$ol_arg" = "invalid" ; then
1313                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1314         fi
1315         ol_with_ldbm_api="$ol_arg"
1316
1317 else
1318         ol_with_ldbm_api="auto"
1319 fi
1320 # end --with-ldbm_api
1321
1322 # OpenLDAP --with-ldbm_type
1323         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1324 if test "${with_ldbm_type+set}" = set; then
1325   withval="$with_ldbm_type"
1326   
1327         ol_arg=invalid
1328         for ol_val in auto btree hash ; do
1329                 if test "$withval" = "$ol_val" ; then
1330                         ol_arg="$ol_val"
1331                 fi
1332         done
1333         if test "$ol_arg" = "invalid" ; then
1334                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1335         fi
1336         ol_with_ldbm_type="$ol_arg"
1337
1338 else
1339         ol_with_ldbm_type="auto"
1340 fi
1341 # end --with-ldbm_type
1342
1343
1344 # OpenLDAP --enable-passwd
1345         # Check whether --enable-passwd or --disable-passwd was given.
1346 if test "${enable_passwd+set}" = set; then
1347   enableval="$enable_passwd"
1348   
1349         ol_arg=invalid
1350         for ol_val in auto yes no ; do
1351                 if test "$enableval" = "$ol_val" ; then
1352                         ol_arg="$ol_val"
1353                 fi
1354         done
1355         if test "$ol_arg" = "invalid" ; then
1356                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1357         fi
1358         ol_enable_passwd="$ol_arg"
1359
1360 else
1361         ol_enable_passwd="no"
1362 fi
1363 # end --enable-passwd
1364 # OpenLDAP --enable-shell
1365         # Check whether --enable-shell or --disable-shell was given.
1366 if test "${enable_shell+set}" = set; then
1367   enableval="$enable_shell"
1368   
1369         ol_arg=invalid
1370         for ol_val in auto yes no ; do
1371                 if test "$enableval" = "$ol_val" ; then
1372                         ol_arg="$ol_val"
1373                 fi
1374         done
1375         if test "$ol_arg" = "invalid" ; then
1376                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1377         fi
1378         ol_enable_shell="$ol_arg"
1379
1380 else
1381         ol_enable_shell="no"
1382 fi
1383 # end --enable-shell
1384
1385 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1386 if test "${with_xxslurpdoptions+set}" = set; then
1387   withval="$with_xxslurpdoptions"
1388   :
1389 fi
1390
1391 # OpenLDAP --enable-slurpd
1392         # Check whether --enable-slurpd or --disable-slurpd was given.
1393 if test "${enable_slurpd+set}" = set; then
1394   enableval="$enable_slurpd"
1395   
1396         ol_arg=invalid
1397         for ol_val in auto yes no ; do
1398                 if test "$enableval" = "$ol_val" ; then
1399                         ol_arg="$ol_val"
1400                 fi
1401         done
1402         if test "$ol_arg" = "invalid" ; then
1403                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1404         fi
1405         ol_enable_slurpd="$ol_arg"
1406
1407 else
1408         ol_enable_slurpd="auto"
1409 fi
1410 # end --enable-slurpd
1411
1412 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1413 if test "${with_xxliboptions+set}" = set; then
1414   withval="$with_xxliboptions"
1415   :
1416 fi
1417
1418 # Check whether --enable-static or --disable-static was given.
1419 if test "${enable_static+set}" = set; then
1420   enableval="$enable_static"
1421   p=${PACKAGE-default}
1422 case "$enableval" in
1423 yes) enable_static=yes ;;
1424 no) enable_static=no ;;
1425 *)
1426   enable_static=no
1427   # Look at the argument we got.  We use all the common list separators.
1428   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1429   for pkg in $enableval; do
1430     if test "X$pkg" = "X$p"; then
1431       enable_static=yes
1432     fi
1433   done
1434   IFS="$ac_save_ifs"
1435   ;;
1436 esac
1437 else
1438   enable_static=yes
1439 fi
1440
1441 # Check whether --enable-shared or --disable-shared was given.
1442 if test "${enable_shared+set}" = set; then
1443   enableval="$enable_shared"
1444   p=${PACKAGE-default}
1445 case "$enableval" in
1446 yes) enable_shared=yes ;;
1447 no) enable_shared=no ;;
1448 *)
1449   enable_shared=no
1450   # Look at the argument we got.  We use all the common list separators.
1451   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1452   for pkg in $enableval; do
1453     if test "X$pkg" = "X$p"; then
1454       enable_shared=yes
1455     fi
1456   done
1457   IFS="$ac_save_ifs"
1458   ;;
1459 esac
1460 else
1461   enable_shared=yes
1462 fi
1463
1464
1465 # validate options
1466 if test $ol_enable_referrals = no ; then
1467         if test $ol_enable_dns = yes ; then
1468                 echo "configure: warning: dns disabled, ignoring --enable-dns argument" 1>&2
1469         fi
1470         ol_enable_dns=no
1471 fi
1472
1473 if test $ol_enable_slapd = no ; then
1474                 if test $ol_enable_ldbm = yes ; then
1475                 echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2
1476         fi
1477         if test $ol_enable_passwd = yes ; then
1478                 echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2
1479         fi
1480         if test $ol_enable_shell = yes ; then
1481                 echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2
1482         fi
1483         if test $ol_enable_aclgroups = yes ; then
1484                 echo "configure: warning: slapd disabled, ignoring --enable_aclgroups argument" 1>&2
1485         fi
1486         if test $ol_enable_wrappers = yes ; then
1487                 echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2
1488         fi
1489         if test $ol_enable_phonetic = yes ; then
1490                 echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2
1491         fi
1492         if test $ol_enable_rlookups = yes ; then
1493                 echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2
1494         fi
1495         if test $ol_with_ldbm_api != auto ; then
1496                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2
1497         fi
1498         if test $ol_with_ldbm_type != auto ; then
1499                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2
1500         fi
1501         if test $ol_enable_slurpd = yes ; then
1502                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1503         fi
1504
1505         # force settings to no
1506         ol_enable_ldbm=no
1507         ol_enable_shell=no
1508         ol_enable_passwd=no
1509         ol_enable_aclgroups=no
1510         ol_enable_wrappers=no
1511         ol_enable_phonetic=no
1512         ol_enable_rlookups=no
1513         ol_with_ldbm_api=no
1514         ol_with_ldbm_type=no
1515         ol_enable_slurpd=no
1516
1517 elif test $ol_enable_ldbm = no ; then
1518         
1519         if test $ol_with_ldbm_api != auto ; then
1520                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2
1521         fi
1522
1523         if test $ol_with_ldbm_type != auto ; then
1524                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2
1525         fi
1526
1527         if test $ol_enable_passwd = no -a $ol_enable_shell = no ; then
1528                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
1529         fi
1530
1531         ol_with_ldbm_api=no
1532         ol_with_ldbm_type=no
1533
1534 else
1535         
1536         if test $ol_with_ldbm_api = gdbm -a \
1537                 $ol_with_ldbm_type = btree ; then
1538                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
1539         fi
1540         if test $ol_with_ldbm_api = ndbm -a \
1541                 $ol_with_ldbm_type = btree ; then
1542                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
1543         fi
1544 fi
1545
1546 if test $ol_enable_slurpd = yes ; then
1547                 if test $ol_with_threads = no ; then
1548                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
1549         fi
1550 fi
1551
1552 echo "$ac_t""done" 1>&6
1553
1554
1555 # Make sure we can run config.sub.
1556 if $ac_config_sub sun4 >/dev/null 2>&1; then :
1557 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1558 fi
1559
1560 echo $ac_n "checking host system type""... $ac_c" 1>&6
1561 echo "configure:1562: checking host system type" >&5
1562
1563 host_alias=$host
1564 case "$host_alias" in
1565 NONE)
1566   case $nonopt in
1567   NONE)
1568     if host_alias=`$ac_config_guess`; then :
1569     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1570     fi ;;
1571   *) host_alias=$nonopt ;;
1572   esac ;;
1573 esac
1574
1575 host=`$ac_config_sub $host_alias`
1576 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1577 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1578 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1579 echo "$ac_t""$host" 1>&6
1580
1581
1582 ## Initialize vars
1583 LDAP_LIBS=
1584 LDBM_LIBS=
1585 LTHREAD_LIBS=
1586 LUTIL_LIBS=
1587
1588 LDAPD_LIBS=
1589 SLAPD_LIBS=
1590 SLURPD_LIBS=
1591
1592 BUILD_LDAPD=no
1593 BUILD_SLAPD=no
1594 BUILD_SLURPD=no
1595
1596 BUILD_LDBM=no
1597 BUILD_PASSWD=no
1598 BUILD_SHELL=no
1599 BUILD_THREAD=no
1600
1601 KRB_LIBS=
1602 TERMCAP_LIBS=
1603
1604
1605 # Find a good install program.  We prefer a C program (faster),
1606 # so one script is as good as another.  But avoid the broken or
1607 # incompatible versions:
1608 # SysV /etc/install, /usr/sbin/install
1609 # SunOS /usr/etc/install
1610 # IRIX /sbin/install
1611 # AIX /bin/install
1612 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1613 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1614 # ./install, which can be erroneously created by make from ./install.sh.
1615 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1616 echo "configure:1617: checking for a BSD compatible install" >&5
1617 if test -z "$INSTALL"; then
1618 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1619   echo $ac_n "(cached) $ac_c" 1>&6
1620 else
1621     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1622   for ac_dir in $PATH; do
1623     # Account for people who put trailing slashes in PATH elements.
1624     case "$ac_dir/" in
1625     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1626     *)
1627       # OSF1 and SCO ODT 3.0 have their own names for install.
1628       for ac_prog in ginstall installbsd scoinst install; do
1629         if test -f $ac_dir/$ac_prog; then
1630           if test $ac_prog = install &&
1631             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1632             # AIX install.  It has an incompatible calling convention.
1633             # OSF/1 installbsd also uses dspmsg, but is usable.
1634             :
1635           else
1636             ac_cv_path_install="$ac_dir/$ac_prog -c"
1637             break 2
1638           fi
1639         fi
1640       done
1641       ;;
1642     esac
1643   done
1644   IFS="$ac_save_IFS"
1645
1646 fi
1647   if test "${ac_cv_path_install+set}" = set; then
1648     INSTALL="$ac_cv_path_install"
1649   else
1650     # As a last resort, use the slow shell script.  We don't cache a
1651     # path for INSTALL within a source directory, because that will
1652     # break other packages using the cache if that directory is
1653     # removed, or if the path is relative.
1654     INSTALL="$ac_install_sh"
1655   fi
1656 fi
1657 echo "$ac_t""$INSTALL" 1>&6
1658
1659 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1660 # It thinks the first close brace ends the variable substitution.
1661 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1662
1663 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1664
1665 # Extract the first word of "ranlib", so it can be a program name with args.
1666 set dummy ranlib; ac_word=$2
1667 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1668 echo "configure:1669: checking for $ac_word" >&5
1669 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1670   echo $ac_n "(cached) $ac_c" 1>&6
1671 else
1672   if test -n "$RANLIB"; then
1673   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1674 else
1675   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1676   for ac_dir in $PATH; do
1677     test -z "$ac_dir" && ac_dir=.
1678     if test -f $ac_dir/$ac_word; then
1679       ac_cv_prog_RANLIB="ranlib"
1680       break
1681     fi
1682   done
1683   IFS="$ac_save_ifs"
1684   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1685 fi
1686 fi
1687 RANLIB="$ac_cv_prog_RANLIB"
1688 if test -n "$RANLIB"; then
1689   echo "$ac_t""$RANLIB" 1>&6
1690 else
1691   echo "$ac_t""no" 1>&6
1692 fi
1693
1694 # Extract the first word of "gcc", so it can be a program name with args.
1695 set dummy gcc; ac_word=$2
1696 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1697 echo "configure:1698: checking for $ac_word" >&5
1698 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1699   echo $ac_n "(cached) $ac_c" 1>&6
1700 else
1701   if test -n "$CC"; then
1702   ac_cv_prog_CC="$CC" # Let the user override the test.
1703 else
1704   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1705   for ac_dir in $PATH; do
1706     test -z "$ac_dir" && ac_dir=.
1707     if test -f $ac_dir/$ac_word; then
1708       ac_cv_prog_CC="gcc"
1709       break
1710     fi
1711   done
1712   IFS="$ac_save_ifs"
1713 fi
1714 fi
1715 CC="$ac_cv_prog_CC"
1716 if test -n "$CC"; then
1717   echo "$ac_t""$CC" 1>&6
1718 else
1719   echo "$ac_t""no" 1>&6
1720 fi
1721
1722 if test -z "$CC"; then
1723   # Extract the first word of "cc", so it can be a program name with args.
1724 set dummy cc; ac_word=$2
1725 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1726 echo "configure:1727: checking for $ac_word" >&5
1727 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1728   echo $ac_n "(cached) $ac_c" 1>&6
1729 else
1730   if test -n "$CC"; then
1731   ac_cv_prog_CC="$CC" # Let the user override the test.
1732 else
1733   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1734   ac_prog_rejected=no
1735   for ac_dir in $PATH; do
1736     test -z "$ac_dir" && ac_dir=.
1737     if test -f $ac_dir/$ac_word; then
1738       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1739         ac_prog_rejected=yes
1740         continue
1741       fi
1742       ac_cv_prog_CC="cc"
1743       break
1744     fi
1745   done
1746   IFS="$ac_save_ifs"
1747 if test $ac_prog_rejected = yes; then
1748   # We found a bogon in the path, so make sure we never use it.
1749   set dummy $ac_cv_prog_CC
1750   shift
1751   if test $# -gt 0; then
1752     # We chose a different compiler from the bogus one.
1753     # However, it has the same basename, so the bogon will be chosen
1754     # first if we set CC to just the basename; use the full file name.
1755     shift
1756     set dummy "$ac_dir/$ac_word" "$@"
1757     shift
1758     ac_cv_prog_CC="$@"
1759   fi
1760 fi
1761 fi
1762 fi
1763 CC="$ac_cv_prog_CC"
1764 if test -n "$CC"; then
1765   echo "$ac_t""$CC" 1>&6
1766 else
1767   echo "$ac_t""no" 1>&6
1768 fi
1769
1770   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1771 fi
1772
1773 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1774 echo "configure:1775: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1775
1776 ac_ext=c
1777 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1778 ac_cpp='$CPP $CPPFLAGS'
1779 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1780 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1781 cross_compiling=$ac_cv_prog_cc_cross
1782
1783 cat > conftest.$ac_ext <<EOF
1784 #line 1785 "configure"
1785 #include "confdefs.h"
1786 main(){return(0);}
1787 EOF
1788 if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1789   ac_cv_prog_cc_works=yes
1790   # If we can't run a trivial program, we are probably using a cross compiler.
1791   if (./conftest; exit) 2>/dev/null; then
1792     ac_cv_prog_cc_cross=no
1793   else
1794     ac_cv_prog_cc_cross=yes
1795   fi
1796 else
1797   echo "configure: failed program was:" >&5
1798   cat conftest.$ac_ext >&5
1799   ac_cv_prog_cc_works=no
1800 fi
1801 rm -fr conftest*
1802
1803 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1804 if test $ac_cv_prog_cc_works = no; then
1805   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1806 fi
1807 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1808 echo "configure:1809: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1809 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1810 cross_compiling=$ac_cv_prog_cc_cross
1811
1812 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1813 echo "configure:1814: checking whether we are using GNU C" >&5
1814 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1815   echo $ac_n "(cached) $ac_c" 1>&6
1816 else
1817   cat > conftest.c <<EOF
1818 #ifdef __GNUC__
1819   yes;
1820 #endif
1821 EOF
1822 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1823   ac_cv_prog_gcc=yes
1824 else
1825   ac_cv_prog_gcc=no
1826 fi
1827 fi
1828
1829 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1830
1831 if test $ac_cv_prog_gcc = yes; then
1832   GCC=yes
1833   ac_test_CFLAGS="${CFLAGS+set}"
1834   ac_save_CFLAGS="$CFLAGS"
1835   CFLAGS=
1836   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1837 echo "configure:1838: checking whether ${CC-cc} accepts -g" >&5
1838 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1839   echo $ac_n "(cached) $ac_c" 1>&6
1840 else
1841   echo 'void f(){}' > conftest.c
1842 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1843   ac_cv_prog_cc_g=yes
1844 else
1845   ac_cv_prog_cc_g=no
1846 fi
1847 rm -f conftest*
1848
1849 fi
1850
1851 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1852   if test "$ac_test_CFLAGS" = set; then
1853     CFLAGS="$ac_save_CFLAGS"
1854   elif test $ac_cv_prog_cc_g = yes; then
1855     CFLAGS="-g -O2"
1856   else
1857     CFLAGS="-O2"
1858   fi
1859 else
1860   GCC=
1861   test "${CFLAGS+set}" = set || CFLAGS="-g"
1862 fi
1863
1864 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1865 if test "${with_gnu_ld+set}" = set; then
1866   withval="$with_gnu_ld"
1867   test "$withval" = no || with_gnu_ld=yes
1868 else
1869   with_gnu_ld=no
1870 fi
1871
1872
1873 ac_prog=ld
1874 if test "$ac_cv_prog_gcc" = yes; then
1875   # Check if gcc -print-prog-name=ld gives a path.
1876   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1877 echo "configure:1878: checking for ld used by GCC" >&5
1878   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1879   case "$ac_prog" in
1880   # Accept absolute paths.
1881   /* | A-Za-z:\\*)
1882     test -z "$LD" && LD="$ac_prog"
1883     ;;
1884   "")
1885     # If it fails, then pretend we aren't using GCC.
1886     ac_prog=ld
1887     ;;
1888   *)
1889     # If it is relative, then search for the first ld in PATH.
1890     with_gnu_ld=unknown
1891     ;;
1892   esac
1893 elif test "$with_gnu_ld" = yes; then
1894   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1895 echo "configure:1896: checking for GNU ld" >&5
1896 else
1897   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1898 echo "configure:1899: checking for non-GNU ld" >&5
1899 fi
1900 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1901   echo $ac_n "(cached) $ac_c" 1>&6
1902 else
1903   if test -z "$LD"; then
1904   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1905   for ac_dir in $PATH; do
1906     test -z "$ac_dir" && ac_dir=.
1907     if test -f "$ac_dir/$ac_prog"; then
1908       ac_cv_path_LD="$ac_dir/$ac_prog"
1909       # Check to see if the program is GNU ld.  I'd rather use --version,
1910       # but apparently some GNU ld's only accept -v.
1911       # Break only if it was the GNU/non-GNU ld that we prefer.
1912       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1913         test "$with_gnu_ld" != no && break
1914       else
1915         test "$with_gnu_ld" != yes && break
1916       fi
1917     fi
1918   done
1919   IFS="$ac_save_ifs"
1920 else
1921   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1922 fi
1923 fi
1924
1925 LD="$ac_cv_path_LD"
1926 if test -n "$LD"; then
1927   echo "$ac_t""$LD" 1>&6
1928 else
1929   echo "$ac_t""no" 1>&6
1930 fi
1931 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1932
1933 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1934 echo "configure:1935: checking if the linker ($LD) is GNU ld" >&5
1935 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1936   echo $ac_n "(cached) $ac_c" 1>&6
1937 else
1938   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1939 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1940   ac_cv_prog_gnu_ld=yes
1941 else
1942   ac_cv_prog_gnu_ld=no
1943 fi
1944 fi
1945
1946 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1947
1948
1949 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1950 echo "configure:1951: checking for BSD-compatible nm" >&5
1951 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1952   echo $ac_n "(cached) $ac_c" 1>&6
1953 else
1954   case "$NM" in
1955 /* | A-Za-z:\\*)
1956   ac_cv_path_NM="$NM" # Let the user override the test with a path.
1957   ;;
1958 *)
1959   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1960   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
1961     test -z "$ac_dir" && ac_dir=.
1962     if test -f $ac_dir/nm; then
1963       # Check to see if the nm accepts a BSD-compat flag.
1964       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1965       #   nm: unknown option "B" ignored
1966       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1967         ac_cv_path_NM="$ac_dir/nm -B"
1968       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1969         ac_cv_path_NM="$ac_dir/nm -p"
1970       else
1971         ac_cv_path_NM="$ac_dir/nm"
1972       fi
1973       break
1974     fi
1975   done
1976   IFS="$ac_save_ifs"
1977   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1978   ;;
1979 esac
1980 fi
1981
1982 NM="$ac_cv_path_NM"
1983 echo "$ac_t""$NM" 1>&6
1984
1985
1986 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1987 echo "configure:1988: checking whether ln -s works" >&5
1988 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1989   echo $ac_n "(cached) $ac_c" 1>&6
1990 else
1991   rm -f conftestdata
1992 if ln -s X conftestdata 2>/dev/null
1993 then
1994   rm -f conftestdata
1995   ac_cv_prog_LN_S="ln -s"
1996 else
1997   ac_cv_prog_LN_S=ln
1998 fi
1999 fi
2000 LN_S="$ac_cv_prog_LN_S"
2001 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2002   echo "$ac_t""yes" 1>&6
2003 else
2004   echo "$ac_t""no" 1>&6
2005 fi
2006
2007 # Always use our own libtool.
2008 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2009
2010 # Check for any special flags to pass to ltconfig.
2011 libtool_flags=
2012 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2013 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2014 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2015 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2016 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2017
2018 # Some flags need to be propagated to the compiler or linker for good
2019 # libtool support.
2020 case "$host" in
2021 *-*-irix6*)
2022   # Find out which ABI we are using.
2023   echo '#line 2024 "configure"' > conftest.$ac_ext
2024   if { (eval echo configure:2025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2025     case "`/usr/bin/file conftest.o`" in
2026     *32-bit*)
2027       LD="${LD-ld} -32"
2028       ;;
2029     *N32*)
2030       LD="${LD-ld} -n32"
2031       ;;
2032     *64-bit*)
2033       LD="${LD-ld} -64"
2034       ;;
2035     esac
2036   fi
2037   rm -rf conftest*
2038   ;;
2039
2040 *-*-sco3.2v5*)
2041   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2042   CFLAGS="$CFLAGS -belf"
2043   ;;
2044 esac
2045
2046 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2047 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2048 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2049 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2050 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2051 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2052
2053
2054 # Extract the first word of "sendmail", so it can be a program name with args.
2055 set dummy sendmail; ac_word=$2
2056 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2057 echo "configure:2058: checking for $ac_word" >&5
2058 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2059   echo $ac_n "(cached) $ac_c" 1>&6
2060 else
2061   case "$SENDMAIL" in
2062   /*)
2063   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2064   ;;
2065   *)
2066   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2067   for ac_dir in $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc$ac_dummy; do
2068     test -z "$ac_dir" && ac_dir=.
2069     if test -f $ac_dir/$ac_word; then
2070       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2071       break
2072     fi
2073   done
2074   IFS="$ac_save_ifs"
2075   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2076   ;;
2077 esac
2078 fi
2079 SENDMAIL="$ac_cv_path_SENDMAIL"
2080 if test -n "$SENDMAIL"; then
2081   echo "$ac_t""$SENDMAIL" 1>&6
2082 else
2083   echo "$ac_t""no" 1>&6
2084 fi
2085
2086 # Extract the first word of "vi", so it can be a program name with args.
2087 set dummy vi; ac_word=$2
2088 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2089 echo "configure:2090: checking for $ac_word" >&5
2090 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2091   echo $ac_n "(cached) $ac_c" 1>&6
2092 else
2093   case "$EDITOR" in
2094   /*)
2095   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2096   ;;
2097   *)
2098   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2099   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
2100     test -z "$ac_dir" && ac_dir=.
2101     if test -f $ac_dir/$ac_word; then
2102       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2103       break
2104     fi
2105   done
2106   IFS="$ac_save_ifs"
2107   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2108   ;;
2109 esac
2110 fi
2111 EDITOR="$ac_cv_path_EDITOR"
2112 if test -n "$EDITOR"; then
2113   echo "$ac_t""$EDITOR" 1>&6
2114 else
2115   echo "$ac_t""no" 1>&6
2116 fi
2117
2118 # Extract the first word of "finger", so it can be a program name with args.
2119 set dummy finger; ac_word=$2
2120 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2121 echo "configure:2122: checking for $ac_word" >&5
2122 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2123   echo $ac_n "(cached) $ac_c" 1>&6
2124 else
2125   case "$FINGER" in
2126   /*)
2127   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2128   ;;
2129   *)
2130   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2131   for ac_dir in $PATH:/usr/ucb$ac_dummy; do
2132     test -z "$ac_dir" && ac_dir=.
2133     if test -f $ac_dir/$ac_word; then
2134       ac_cv_path_FINGER="$ac_dir/$ac_word"
2135       break
2136     fi
2137   done
2138   IFS="$ac_save_ifs"
2139   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2140   ;;
2141 esac
2142 fi
2143 FINGER="$ac_cv_path_FINGER"
2144 if test -n "$FINGER"; then
2145   echo "$ac_t""$FINGER" 1>&6
2146 else
2147   echo "$ac_t""no" 1>&6
2148 fi
2149
2150
2151
2152 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2153         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2154
2155 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2156         echo "configure: warning: programs compiled here do run here..." 1>&2
2157         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2158
2159 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2160         echo "configure: warning: programs compiled here do not run here..." 1>&2
2161         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2162 fi
2163
2164 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2165 echo "configure:2166: checking how to run the C preprocessor" >&5
2166 # On Suns, sometimes $CPP names a directory.
2167 if test -n "$CPP" && test -d "$CPP"; then
2168   CPP=
2169 fi
2170 if test -z "$CPP"; then
2171 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2172   echo $ac_n "(cached) $ac_c" 1>&6
2173 else
2174     # This must be in double quotes, not single quotes, because CPP may get
2175   # substituted into the Makefile and "${CC-cc}" will confuse make.
2176   CPP="${CC-cc} -E"
2177   # On the NeXT, cc -E runs the code through the compiler's parser,
2178   # not just through cpp.
2179   cat > conftest.$ac_ext <<EOF
2180 #line 2181 "configure"
2181 #include "confdefs.h"
2182 #include <assert.h>
2183 Syntax Error
2184 EOF
2185 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2186 { (eval echo configure:2187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2187 ac_err=`grep -v '^ *+' conftest.out`
2188 if test -z "$ac_err"; then
2189   :
2190 else
2191   echo "$ac_err" >&5
2192   echo "configure: failed program was:" >&5
2193   cat conftest.$ac_ext >&5
2194   rm -rf conftest*
2195   CPP="${CC-cc} -E -traditional-cpp"
2196   cat > conftest.$ac_ext <<EOF
2197 #line 2198 "configure"
2198 #include "confdefs.h"
2199 #include <assert.h>
2200 Syntax Error
2201 EOF
2202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2203 { (eval echo configure:2204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2204 ac_err=`grep -v '^ *+' conftest.out`
2205 if test -z "$ac_err"; then
2206   :
2207 else
2208   echo "$ac_err" >&5
2209   echo "configure: failed program was:" >&5
2210   cat conftest.$ac_ext >&5
2211   rm -rf conftest*
2212   CPP=/lib/cpp
2213 fi
2214 rm -f conftest*
2215 fi
2216 rm -f conftest*
2217   ac_cv_prog_CPP="$CPP"
2218 fi
2219   CPP="$ac_cv_prog_CPP"
2220 else
2221   ac_cv_prog_CPP="$CPP"
2222 fi
2223 echo "$ac_t""$CPP" 1>&6
2224
2225
2226 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2227 echo "configure:2228: checking for AIX" >&5
2228 cat > conftest.$ac_ext <<EOF
2229 #line 2230 "configure"
2230 #include "confdefs.h"
2231 #ifdef _AIX
2232   yes
2233 #endif
2234
2235 EOF
2236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2237   egrep "yes" >/dev/null 2>&1; then
2238   rm -rf conftest*
2239   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2240 #define _ALL_SOURCE 1
2241 EOF
2242
2243 else
2244   rm -rf conftest*
2245   echo "$ac_t""no" 1>&6
2246 fi
2247 rm -f conftest*
2248
2249
2250 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2251 echo "configure:2252: checking for POSIXized ISC" >&5
2252 if test -d /etc/conf/kconfig.d &&
2253   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2254 then
2255   echo "$ac_t""yes" 1>&6
2256   ISC=yes # If later tests want to check for ISC.
2257   cat >> confdefs.h <<\EOF
2258 #define _POSIX_SOURCE 1
2259 EOF
2260
2261   if test "$GCC" = yes; then
2262     CC="$CC -posix"
2263   else
2264     CC="$CC -Xp"
2265   fi
2266 else
2267   echo "$ac_t""no" 1>&6
2268   ISC=
2269 fi
2270
2271 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2272 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2273 echo "configure:2274: checking for minix/config.h" >&5
2274 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2275   echo $ac_n "(cached) $ac_c" 1>&6
2276 else
2277   cat > conftest.$ac_ext <<EOF
2278 #line 2279 "configure"
2279 #include "confdefs.h"
2280 #include <minix/config.h>
2281 EOF
2282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2283 { (eval echo configure:2284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2284 ac_err=`grep -v '^ *+' conftest.out`
2285 if test -z "$ac_err"; then
2286   rm -rf conftest*
2287   eval "ac_cv_header_$ac_safe=yes"
2288 else
2289   echo "$ac_err" >&5
2290   echo "configure: failed program was:" >&5
2291   cat conftest.$ac_ext >&5
2292   rm -rf conftest*
2293   eval "ac_cv_header_$ac_safe=no"
2294 fi
2295 rm -f conftest*
2296 fi
2297 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2298   echo "$ac_t""yes" 1>&6
2299   MINIX=yes
2300 else
2301   echo "$ac_t""no" 1>&6
2302 MINIX=
2303 fi
2304
2305 if test "$MINIX" = yes; then
2306   cat >> confdefs.h <<\EOF
2307 #define _POSIX_SOURCE 1
2308 EOF
2309
2310   cat >> confdefs.h <<\EOF
2311 #define _POSIX_1_SOURCE 2
2312 EOF
2313
2314   cat >> confdefs.h <<\EOF
2315 #define _MINIX 1
2316 EOF
2317
2318 fi
2319
2320
2321
2322
2323
2324 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2325 echo "configure:2326: checking for ${CC-cc} option to accept ANSI C" >&5
2326 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
2327   echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329   am_cv_prog_cc_stdc=no
2330 ac_save_CC="$CC"
2331 # Don't try gcc -ansi; that turns off useful extensions and
2332 # breaks some systems' header files.
2333 # AIX                   -qlanglvl=ansi
2334 # Ultrix and OSF/1      -std1
2335 # HP-UX                 -Aa -D_HPUX_SOURCE
2336 # SVR4                  -Xc -D__EXTENSIONS__
2337 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2338 do
2339   CC="$ac_save_CC $ac_arg"
2340   cat > conftest.$ac_ext <<EOF
2341 #line 2342 "configure"
2342 #include "confdefs.h"
2343 #include <stdarg.h>
2344 #include <stdio.h>
2345 #include <sys/types.h>
2346 #include <sys/stat.h>
2347 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2348 struct buf { int x; };
2349 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2350 static char *e (p, i)
2351      char **p;
2352      int i;
2353 {
2354   return p[i];
2355 }
2356 static char *f (char * (*g) (char **, int), char **p, ...)
2357 {
2358   char *s;
2359   va_list v;
2360   va_start (v,p);
2361   s = g (p, va_arg (v,int));
2362   va_end (v);
2363   return s;
2364 }
2365 int test (int i, double x);
2366 struct s1 {int (*f) (int a);};
2367 struct s2 {int (*f) (double a);};
2368 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2369 int argc;
2370 char **argv;
2371
2372 int main() {
2373
2374 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2375
2376 ; return 0; }
2377 EOF
2378 if { (eval echo configure:2379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2379   rm -rf conftest*
2380   am_cv_prog_cc_stdc="$ac_arg"; break
2381 else
2382   echo "configure: failed program was:" >&5
2383   cat conftest.$ac_ext >&5
2384 fi
2385 rm -f conftest*
2386 done
2387 CC="$ac_save_CC"
2388
2389 fi
2390
2391 if test -z "$am_cv_prog_cc_stdc"; then
2392   echo "$ac_t""none needed" 1>&6
2393 else
2394   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
2395 fi
2396 case "x$am_cv_prog_cc_stdc" in
2397   x|xno) ;;
2398   *) CC="$CC $am_cv_prog_cc_stdc" ;;
2399 esac
2400
2401 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
2402         { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; }
2403 fi
2404
2405
2406
2407
2408 echo $ac_n "checking for socket""... $ac_c" 1>&6
2409 echo "configure:2410: checking for socket" >&5
2410 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
2411   echo $ac_n "(cached) $ac_c" 1>&6
2412 else
2413   cat > conftest.$ac_ext <<EOF
2414 #line 2415 "configure"
2415 #include "confdefs.h"
2416 /* System header to define __stub macros and hopefully few prototypes,
2417     which can conflict with char socket(); below.  */
2418 #include <assert.h>
2419 /* Override any gcc2 internal prototype to avoid an error.  */
2420 /* We use char because int might match the return type of a gcc2
2421     builtin and then its argument prototype would still apply.  */
2422 char socket();
2423
2424 int main() {
2425
2426 /* The GNU C library defines this for functions which it implements
2427     to always fail with ENOSYS.  Some functions are actually named
2428     something starting with __ and the normal name is an alias.  */
2429 #if defined (__stub_socket) || defined (__stub___socket)
2430 choke me
2431 #else
2432 socket();
2433 #endif
2434
2435 ; return 0; }
2436 EOF
2437 if { (eval echo configure:2438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2438   rm -rf conftest*
2439   eval "ac_cv_func_socket=yes"
2440 else
2441   echo "configure: failed program was:" >&5
2442   cat conftest.$ac_ext >&5
2443   rm -rf conftest*
2444   eval "ac_cv_func_socket=no"
2445 fi
2446 rm -f conftest*
2447 fi
2448
2449 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
2450   echo "$ac_t""yes" 1>&6
2451   have_socket=yes
2452 else
2453   echo "$ac_t""no" 1>&6
2454         
2455         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
2456 echo "configure:2457: checking for main in -lsocket" >&5
2457 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
2458 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2459   echo $ac_n "(cached) $ac_c" 1>&6
2460 else
2461   ac_save_LIBS="$LIBS"
2462 LIBS="-lsocket  $LIBS"
2463 cat > conftest.$ac_ext <<EOF
2464 #line 2465 "configure"
2465 #include "confdefs.h"
2466
2467 int main() {
2468 main()
2469 ; return 0; }
2470 EOF
2471 if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2472   rm -rf conftest*
2473   eval "ac_cv_lib_$ac_lib_var=yes"
2474 else
2475   echo "configure: failed program was:" >&5
2476   cat conftest.$ac_ext >&5
2477   rm -rf conftest*
2478   eval "ac_cv_lib_$ac_lib_var=no"
2479 fi
2480 rm -f conftest*
2481 LIBS="$ac_save_LIBS"
2482
2483 fi
2484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2485   echo "$ac_t""yes" 1>&6
2486     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2487     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2488   cat >> confdefs.h <<EOF
2489 #define $ac_tr_lib 1
2490 EOF
2491
2492   LIBS="-lsocket $LIBS"
2493
2494 else
2495   echo "$ac_t""no" 1>&6
2496 fi
2497
2498         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
2499 echo "configure:2500: checking for main in -lnet" >&5
2500 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
2501 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2502   echo $ac_n "(cached) $ac_c" 1>&6
2503 else
2504   ac_save_LIBS="$LIBS"
2505 LIBS="-lnet  $LIBS"
2506 cat > conftest.$ac_ext <<EOF
2507 #line 2508 "configure"
2508 #include "confdefs.h"
2509
2510 int main() {
2511 main()
2512 ; return 0; }
2513 EOF
2514 if { (eval echo configure:2515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2515   rm -rf conftest*
2516   eval "ac_cv_lib_$ac_lib_var=yes"
2517 else
2518   echo "configure: failed program was:" >&5
2519   cat conftest.$ac_ext >&5
2520   rm -rf conftest*
2521   eval "ac_cv_lib_$ac_lib_var=no"
2522 fi
2523 rm -f conftest*
2524 LIBS="$ac_save_LIBS"
2525
2526 fi
2527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2528   echo "$ac_t""yes" 1>&6
2529     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2530     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2531   cat >> confdefs.h <<EOF
2532 #define $ac_tr_lib 1
2533 EOF
2534
2535   LIBS="-lnet $LIBS"
2536
2537 else
2538   echo "$ac_t""no" 1>&6
2539 fi
2540
2541         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
2542 echo "configure:2543: checking for main in -lnsl_s" >&5
2543 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
2544 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2545   echo $ac_n "(cached) $ac_c" 1>&6
2546 else
2547   ac_save_LIBS="$LIBS"
2548 LIBS="-lnsl_s  $LIBS"
2549 cat > conftest.$ac_ext <<EOF
2550 #line 2551 "configure"
2551 #include "confdefs.h"
2552
2553 int main() {
2554 main()
2555 ; return 0; }
2556 EOF
2557 if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2558   rm -rf conftest*
2559   eval "ac_cv_lib_$ac_lib_var=yes"
2560 else
2561   echo "configure: failed program was:" >&5
2562   cat conftest.$ac_ext >&5
2563   rm -rf conftest*
2564   eval "ac_cv_lib_$ac_lib_var=no"
2565 fi
2566 rm -f conftest*
2567 LIBS="$ac_save_LIBS"
2568
2569 fi
2570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2571   echo "$ac_t""yes" 1>&6
2572     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2573     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2574   cat >> confdefs.h <<EOF
2575 #define $ac_tr_lib 1
2576 EOF
2577
2578   LIBS="-lnsl_s $LIBS"
2579
2580 else
2581   echo "$ac_t""no" 1>&6
2582 fi
2583
2584         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
2585 echo "configure:2586: checking for main in -lnsl" >&5
2586 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
2587 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2588   echo $ac_n "(cached) $ac_c" 1>&6
2589 else
2590   ac_save_LIBS="$LIBS"
2591 LIBS="-lnsl  $LIBS"
2592 cat > conftest.$ac_ext <<EOF
2593 #line 2594 "configure"
2594 #include "confdefs.h"
2595
2596 int main() {
2597 main()
2598 ; return 0; }
2599 EOF
2600 if { (eval echo configure:2601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2601   rm -rf conftest*
2602   eval "ac_cv_lib_$ac_lib_var=yes"
2603 else
2604   echo "configure: failed program was:" >&5
2605   cat conftest.$ac_ext >&5
2606   rm -rf conftest*
2607   eval "ac_cv_lib_$ac_lib_var=no"
2608 fi
2609 rm -f conftest*
2610 LIBS="$ac_save_LIBS"
2611
2612 fi
2613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2614   echo "$ac_t""yes" 1>&6
2615     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2616     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2617   cat >> confdefs.h <<EOF
2618 #define $ac_tr_lib 1
2619 EOF
2620
2621   LIBS="-lnsl $LIBS"
2622
2623 else
2624   echo "$ac_t""no" 1>&6
2625 fi
2626
2627         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
2628 echo "configure:2629: checking for socket in -linet" >&5
2629 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
2630 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2631   echo $ac_n "(cached) $ac_c" 1>&6
2632 else
2633   ac_save_LIBS="$LIBS"
2634 LIBS="-linet  $LIBS"
2635 cat > conftest.$ac_ext <<EOF
2636 #line 2637 "configure"
2637 #include "confdefs.h"
2638 /* Override any gcc2 internal prototype to avoid an error.  */
2639 /* We use char because int might match the return type of a gcc2
2640     builtin and then its argument prototype would still apply.  */
2641 char socket();
2642
2643 int main() {
2644 socket()
2645 ; return 0; }
2646 EOF
2647 if { (eval echo configure:2648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2648   rm -rf conftest*
2649   eval "ac_cv_lib_$ac_lib_var=yes"
2650 else
2651   echo "configure: failed program was:" >&5
2652   cat conftest.$ac_ext >&5
2653   rm -rf conftest*
2654   eval "ac_cv_lib_$ac_lib_var=no"
2655 fi
2656 rm -f conftest*
2657 LIBS="$ac_save_LIBS"
2658
2659 fi
2660 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2661   echo "$ac_t""yes" 1>&6
2662     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2663     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2664   cat >> confdefs.h <<EOF
2665 #define $ac_tr_lib 1
2666 EOF
2667
2668   LIBS="-linet $LIBS"
2669
2670 else
2671   echo "$ac_t""no" 1>&6
2672 fi
2673
2674         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
2675 echo "configure:2676: checking for main in -lgen" >&5
2676 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
2677 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2678   echo $ac_n "(cached) $ac_c" 1>&6
2679 else
2680   ac_save_LIBS="$LIBS"
2681 LIBS="-lgen  $LIBS"
2682 cat > conftest.$ac_ext <<EOF
2683 #line 2684 "configure"
2684 #include "confdefs.h"
2685
2686 int main() {
2687 main()
2688 ; return 0; }
2689 EOF
2690 if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2691   rm -rf conftest*
2692   eval "ac_cv_lib_$ac_lib_var=yes"
2693 else
2694   echo "configure: failed program was:" >&5
2695   cat conftest.$ac_ext >&5
2696   rm -rf conftest*
2697   eval "ac_cv_lib_$ac_lib_var=no"
2698 fi
2699 rm -f conftest*
2700 LIBS="$ac_save_LIBS"
2701
2702 fi
2703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2704   echo "$ac_t""yes" 1>&6
2705     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2706     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2707   cat >> confdefs.h <<EOF
2708 #define $ac_tr_lib 1
2709 EOF
2710
2711   LIBS="-lgen $LIBS"
2712
2713 else
2714   echo "$ac_t""no" 1>&6
2715 fi
2716
2717
2718 fi
2719
2720
2721 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
2722 echo "configure:2723: checking for res_search in -lresolv" >&5
2723 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
2724 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2725   echo $ac_n "(cached) $ac_c" 1>&6
2726 else
2727   ac_save_LIBS="$LIBS"
2728 LIBS="-lresolv  $LIBS"
2729 cat > conftest.$ac_ext <<EOF
2730 #line 2731 "configure"
2731 #include "confdefs.h"
2732 /* Override any gcc2 internal prototype to avoid an error.  */
2733 /* We use char because int might match the return type of a gcc2
2734     builtin and then its argument prototype would still apply.  */
2735 char res_search();
2736
2737 int main() {
2738 res_search()
2739 ; return 0; }
2740 EOF
2741 if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2742   rm -rf conftest*
2743   eval "ac_cv_lib_$ac_lib_var=yes"
2744 else
2745   echo "configure: failed program was:" >&5
2746   cat conftest.$ac_ext >&5
2747   rm -rf conftest*
2748   eval "ac_cv_lib_$ac_lib_var=no"
2749 fi
2750 rm -f conftest*
2751 LIBS="$ac_save_LIBS"
2752
2753 fi
2754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2755   echo "$ac_t""yes" 1>&6
2756     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2757     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2758   cat >> confdefs.h <<EOF
2759 #define $ac_tr_lib 1
2760 EOF
2761
2762   LIBS="-lresolv $LIBS"
2763
2764 else
2765   echo "$ac_t""no" 1>&6
2766 fi
2767
2768
2769 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
2770 echo "configure:2771: checking for sigset in -lV3" >&5
2771 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
2772 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2773   echo $ac_n "(cached) $ac_c" 1>&6
2774 else
2775   ac_save_LIBS="$LIBS"
2776 LIBS="-lV3  $LIBS"
2777 cat > conftest.$ac_ext <<EOF
2778 #line 2779 "configure"
2779 #include "confdefs.h"
2780 /* Override any gcc2 internal prototype to avoid an error.  */
2781 /* We use char because int might match the return type of a gcc2
2782     builtin and then its argument prototype would still apply.  */
2783 char sigset();
2784
2785 int main() {
2786 sigset()
2787 ; return 0; }
2788 EOF
2789 if { (eval echo configure:2790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2790   rm -rf conftest*
2791   eval "ac_cv_lib_$ac_lib_var=yes"
2792 else
2793   echo "configure: failed program was:" >&5
2794   cat conftest.$ac_ext >&5
2795   rm -rf conftest*
2796   eval "ac_cv_lib_$ac_lib_var=no"
2797 fi
2798 rm -f conftest*
2799 LIBS="$ac_save_LIBS"
2800
2801 fi
2802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2803   echo "$ac_t""yes" 1>&6
2804     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2805     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2806   cat >> confdefs.h <<EOF
2807 #define $ac_tr_lib 1
2808 EOF
2809
2810   LIBS="-lV3 $LIBS"
2811
2812 else
2813   echo "$ac_t""no" 1>&6
2814 fi
2815
2816
2817 # ISODE tests
2818 ol_link_isode=no
2819 if test $ol_enable_ldapd != no ; then
2820                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
2821 echo "configure:2822: checking for main in -lxtpp" >&5
2822 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
2823 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2824   echo $ac_n "(cached) $ac_c" 1>&6
2825 else
2826   ac_save_LIBS="$LIBS"
2827 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
2828 cat > conftest.$ac_ext <<EOF
2829 #line 2830 "configure"
2830 #include "confdefs.h"
2831
2832 int main() {
2833 main()
2834 ; return 0; }
2835 EOF
2836 if { (eval echo configure:2837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2837   rm -rf conftest*
2838   eval "ac_cv_lib_$ac_lib_var=yes"
2839 else
2840   echo "configure: failed program was:" >&5
2841   cat conftest.$ac_ext >&5
2842   rm -rf conftest*
2843   eval "ac_cv_lib_$ac_lib_var=no"
2844 fi
2845 rm -f conftest*
2846 LIBS="$ac_save_LIBS"
2847
2848 fi
2849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2850   echo "$ac_t""yes" 1>&6
2851   
2852                 ol_link_isode=yes
2853                 cat >> confdefs.h <<\EOF
2854 #define HAVE_XTPP 1
2855 EOF
2856
2857                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
2858                 
2859 else
2860   echo "$ac_t""no" 1>&6
2861 :
2862 fi
2863
2864         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
2865 echo "configure:2866: checking for main in -ldsap" >&5
2866 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
2867 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2868   echo $ac_n "(cached) $ac_c" 1>&6
2869 else
2870   ac_save_LIBS="$LIBS"
2871 LIBS="-ldsap -lisode $LIBS"
2872 cat > conftest.$ac_ext <<EOF
2873 #line 2874 "configure"
2874 #include "confdefs.h"
2875
2876 int main() {
2877 main()
2878 ; return 0; }
2879 EOF
2880 if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2881   rm -rf conftest*
2882   eval "ac_cv_lib_$ac_lib_var=yes"
2883 else
2884   echo "configure: failed program was:" >&5
2885   cat conftest.$ac_ext >&5
2886   rm -rf conftest*
2887   eval "ac_cv_lib_$ac_lib_var=no"
2888 fi
2889 rm -f conftest*
2890 LIBS="$ac_save_LIBS"
2891
2892 fi
2893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2894   echo "$ac_t""yes" 1>&6
2895   
2896                 ol_link_isode=yes
2897                 cat >> confdefs.h <<\EOF
2898 #define HAVE_DSAP 1
2899 EOF
2900
2901                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
2902                 
2903 else
2904   echo "$ac_t""no" 1>&6
2905 :
2906 fi
2907
2908         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
2909 echo "configure:2910: checking for main in -lisode" >&5
2910 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
2911 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2912   echo $ac_n "(cached) $ac_c" 1>&6
2913 else
2914   ac_save_LIBS="$LIBS"
2915 LIBS="-lisode  $LIBS"
2916 cat > conftest.$ac_ext <<EOF
2917 #line 2918 "configure"
2918 #include "confdefs.h"
2919
2920 int main() {
2921 main()
2922 ; return 0; }
2923 EOF
2924 if { (eval echo configure:2925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2925   rm -rf conftest*
2926   eval "ac_cv_lib_$ac_lib_var=yes"
2927 else
2928   echo "configure: failed program was:" >&5
2929   cat conftest.$ac_ext >&5
2930   rm -rf conftest*
2931   eval "ac_cv_lib_$ac_lib_var=no"
2932 fi
2933 rm -f conftest*
2934 LIBS="$ac_save_LIBS"
2935
2936 fi
2937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2938   echo "$ac_t""yes" 1>&6
2939   
2940                 ol_link_isode=yes
2941                 cat >> confdefs.h <<\EOF
2942 #define HAVE_ISODE 1
2943 EOF
2944
2945                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
2946                 
2947 else
2948   echo "$ac_t""no" 1>&6
2949 :
2950 fi
2951
2952 fi
2953
2954 if test $ol_link_isode != no; then
2955         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
2956 echo "configure:2957: checking for main in -lpp" >&5
2957 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
2958 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2959   echo $ac_n "(cached) $ac_c" 1>&6
2960 else
2961   ac_save_LIBS="$LIBS"
2962 LIBS="-lpp  $LIBS"
2963 cat > conftest.$ac_ext <<EOF
2964 #line 2965 "configure"
2965 #include "confdefs.h"
2966
2967 int main() {
2968 main()
2969 ; return 0; }
2970 EOF
2971 if { (eval echo configure:2972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2972   rm -rf conftest*
2973   eval "ac_cv_lib_$ac_lib_var=yes"
2974 else
2975   echo "configure: failed program was:" >&5
2976   cat conftest.$ac_ext >&5
2977   rm -rf conftest*
2978   eval "ac_cv_lib_$ac_lib_var=no"
2979 fi
2980 rm -f conftest*
2981 LIBS="$ac_save_LIBS"
2982
2983 fi
2984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2985   echo "$ac_t""yes" 1>&6
2986   
2987                 cat >> confdefs.h <<\EOF
2988 #define HAVE_PP 1
2989 EOF
2990
2991                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
2992                 
2993 else
2994   echo "$ac_t""no" 1>&6
2995 :
2996 fi
2997
2998
2999         # Extract the first word of "pepsy", so it can be a program name with args.
3000 set dummy pepsy; ac_word=$2
3001 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3002 echo "configure:3003: checking for $ac_word" >&5
3003 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
3004   echo $ac_n "(cached) $ac_c" 1>&6
3005 else
3006   case "$PEPSY" in
3007   /*)
3008   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
3009   ;;
3010   *)
3011   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3012   for ac_dir in $PATH; do
3013     test -z "$ac_dir" && ac_dir=.
3014     if test -f $ac_dir/$ac_word; then
3015       ac_cv_path_PEPSY="$ac_dir/$ac_word"
3016       break
3017     fi
3018   done
3019   IFS="$ac_save_ifs"
3020   ;;
3021 esac
3022 fi
3023 PEPSY="$ac_cv_path_PEPSY"
3024 if test -n "$PEPSY"; then
3025   echo "$ac_t""$PEPSY" 1>&6
3026 else
3027   echo "$ac_t""no" 1>&6
3028 fi
3029
3030 fi
3031
3032 ol_link_kerberos=no
3033
3034 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
3035         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
3036 do
3037 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3038 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3039 echo "configure:3040: checking for $ac_hdr" >&5
3040 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3041   echo $ac_n "(cached) $ac_c" 1>&6
3042 else
3043   cat > conftest.$ac_ext <<EOF
3044 #line 3045 "configure"
3045 #include "confdefs.h"
3046 #include <$ac_hdr>
3047 EOF
3048 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3049 { (eval echo configure:3050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3050 ac_err=`grep -v '^ *+' conftest.out`
3051 if test -z "$ac_err"; then
3052   rm -rf conftest*
3053   eval "ac_cv_header_$ac_safe=yes"
3054 else
3055   echo "$ac_err" >&5
3056   echo "configure: failed program was:" >&5
3057   cat conftest.$ac_ext >&5
3058   rm -rf conftest*
3059   eval "ac_cv_header_$ac_safe=no"
3060 fi
3061 rm -f conftest*
3062 fi
3063 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3064   echo "$ac_t""yes" 1>&6
3065     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3066   cat >> confdefs.h <<EOF
3067 #define $ac_tr_hdr 1
3068 EOF
3069  
3070 else
3071   echo "$ac_t""no" 1>&6
3072 fi
3073 done
3074
3075
3076         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
3077                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
3078 echo "configure:3079: checking for main in -lkrb4" >&5
3079 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
3080 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3081   echo $ac_n "(cached) $ac_c" 1>&6
3082 else
3083   ac_save_LIBS="$LIBS"
3084 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
3085 cat > conftest.$ac_ext <<EOF
3086 #line 3087 "configure"
3087 #include "confdefs.h"
3088
3089 int main() {
3090 main()
3091 ; return 0; }
3092 EOF
3093 if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3094   rm -rf conftest*
3095   eval "ac_cv_lib_$ac_lib_var=yes"
3096 else
3097   echo "configure: failed program was:" >&5
3098   cat conftest.$ac_ext >&5
3099   rm -rf conftest*
3100   eval "ac_cv_lib_$ac_lib_var=no"
3101 fi
3102 rm -f conftest*
3103 LIBS="$ac_save_LIBS"
3104
3105 fi
3106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3107   echo "$ac_t""yes" 1>&6
3108   have_k5=yes
3109 else
3110   echo "$ac_t""no" 1>&6
3111 have_k5=no
3112 fi
3113
3114
3115                 if test $have_k5 = yes ; then
3116                         ol_with_kerberos=found
3117                         ol_link_kerberos=yes
3118
3119                         cat >> confdefs.h <<\EOF
3120 #define HAVE_KERBEROS 1
3121 EOF
3122
3123                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
3124                 fi
3125         fi
3126 fi
3127
3128 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
3129         for ac_hdr in krb.h des.h
3130 do
3131 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3132 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3133 echo "configure:3134: checking for $ac_hdr" >&5
3134 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3135   echo $ac_n "(cached) $ac_c" 1>&6
3136 else
3137   cat > conftest.$ac_ext <<EOF
3138 #line 3139 "configure"
3139 #include "confdefs.h"
3140 #include <$ac_hdr>
3141 EOF
3142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3143 { (eval echo configure:3144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3144 ac_err=`grep -v '^ *+' conftest.out`
3145 if test -z "$ac_err"; then
3146   rm -rf conftest*
3147   eval "ac_cv_header_$ac_safe=yes"
3148 else
3149   echo "$ac_err" >&5
3150   echo "configure: failed program was:" >&5
3151   cat conftest.$ac_ext >&5
3152   rm -rf conftest*
3153   eval "ac_cv_header_$ac_safe=no"
3154 fi
3155 rm -f conftest*
3156 fi
3157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3158   echo "$ac_t""yes" 1>&6
3159     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3160   cat >> confdefs.h <<EOF
3161 #define $ac_tr_hdr 1
3162 EOF
3163  
3164 else
3165   echo "$ac_t""no" 1>&6
3166 fi
3167 done
3168
3169
3170         if test $ac_cv_header_krb_h = yes ; then
3171                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
3172 echo "configure:3173: checking for main in -lkrb" >&5
3173 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
3174 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3175   echo $ac_n "(cached) $ac_c" 1>&6
3176 else
3177   ac_save_LIBS="$LIBS"
3178 LIBS="-lkrb -ldes $LIBS"
3179 cat > conftest.$ac_ext <<EOF
3180 #line 3181 "configure"
3181 #include "confdefs.h"
3182
3183 int main() {
3184 main()
3185 ; return 0; }
3186 EOF
3187 if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3188   rm -rf conftest*
3189   eval "ac_cv_lib_$ac_lib_var=yes"
3190 else
3191   echo "configure: failed program was:" >&5
3192   cat conftest.$ac_ext >&5
3193   rm -rf conftest*
3194   eval "ac_cv_lib_$ac_lib_var=no"
3195 fi
3196 rm -f conftest*
3197 LIBS="$ac_save_LIBS"
3198
3199 fi
3200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3201   echo "$ac_t""yes" 1>&6
3202   have_k4=yes
3203 else
3204   echo "$ac_t""no" 1>&6
3205 have_k4=no
3206 fi
3207
3208
3209                 if test $have_k4 = yes ; then
3210                         ol_with_kerberos=found
3211                         ol_link_kerberos=yes
3212
3213                         cat >> confdefs.h <<\EOF
3214 #define HAVE_KERBEROS 1
3215 EOF
3216
3217                         KRB_LIBS="-lkrb -ldes"
3218                 fi
3219         fi
3220 fi
3221
3222
3223 ol_link_threads=no
3224 if test $ol_with_threads = auto -o $ol_with_threads = yes \
3225         -o $ol_with_threads = posix ; then
3226
3227         for ac_hdr in pthread.h sched.h
3228 do
3229 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3230 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3231 echo "configure:3232: checking for $ac_hdr" >&5
3232 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3233   echo $ac_n "(cached) $ac_c" 1>&6
3234 else
3235   cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238 #include <$ac_hdr>
3239 EOF
3240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3241 { (eval echo configure:3242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3242 ac_err=`grep -v '^ *+' conftest.out`
3243 if test -z "$ac_err"; then
3244   rm -rf conftest*
3245   eval "ac_cv_header_$ac_safe=yes"
3246 else
3247   echo "$ac_err" >&5
3248   echo "configure: failed program was:" >&5
3249   cat conftest.$ac_ext >&5
3250   rm -rf conftest*
3251   eval "ac_cv_header_$ac_safe=no"
3252 fi
3253 rm -f conftest*
3254 fi
3255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3256   echo "$ac_t""yes" 1>&6
3257     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3258   cat >> confdefs.h <<EOF
3259 #define $ac_tr_hdr 1
3260 EOF
3261  
3262 else
3263   echo "$ac_t""no" 1>&6
3264 fi
3265 done
3266
3267
3268         if test $ac_cv_header_pthread_h = yes ; then
3269                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
3270 echo "configure:3271: checking POSIX thread version" >&5
3271 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
3272   echo $ac_n "(cached) $ac_c" 1>&6
3273 else
3274   
3275         cat > conftest.$ac_ext <<EOF
3276 #line 3277 "configure"
3277 #include "confdefs.h"
3278
3279 #               include <pthread.h>
3280                 /* this check could be improved */
3281 #               ifdef PTHREAD_ONCE_INIT
3282                         pthread_version_final
3283 #               endif
3284         
3285 EOF
3286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3287   egrep "pthread_version_final" >/dev/null 2>&1; then
3288   rm -rf conftest*
3289   ol_pthread_final=yes
3290 else
3291   rm -rf conftest*
3292   ol_pthread_final=no
3293 fi
3294 rm -f conftest*
3295
3296
3297         cat > conftest.$ac_ext <<EOF
3298 #line 3299 "configure"
3299 #include "confdefs.h"
3300
3301 #               include <pthread.h>
3302                 /* this check could be improved */
3303 #               ifdef pthread_once_init
3304                         pthread_version_draft4
3305 #               endif
3306         
3307 EOF
3308 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3309   egrep "pthread_version_draft4" >/dev/null 2>&1; then
3310   rm -rf conftest*
3311   ol_pthread_draft4=yes
3312 else
3313   rm -rf conftest*
3314   ol_pthread_draft4=no
3315 fi
3316 rm -f conftest*
3317
3318
3319         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
3320                 ol_cv_pthread_version=final
3321         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
3322                 ol_cv_pthread_version=draft4
3323         else
3324                 ol_cv_pthread_version=unknown
3325         fi
3326
3327 fi
3328
3329 echo "$ac_t""$ol_cv_pthread_version" 1>&6
3330
3331
3332                 if test $ol_cv_pthread_version = final ; then
3333                         cat >> confdefs.h <<\EOF
3334 #define HAVE_PTHREADS_FINAL 1
3335 EOF
3336
3337                 elif test $ol_cv_pthread_version = draft4 ; then
3338                         cat >> confdefs.h <<\EOF
3339 #define HAVE_PTHREADS_D4 1
3340 EOF
3341
3342                 else
3343                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
3344                 fi
3345
3346                 # consider threads found
3347                 ol_with_threads=found
3348
3349                 
3350 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
3351 echo "configure:3352: checking for LinuxThreads" >&5
3352 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
3353   echo $ac_n "(cached) $ac_c" 1>&6
3354 else
3355   
3356         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
3357         if test "$res" -gt 0 ; then
3358                 ol_cv_linux_threads=yes
3359         else
3360                 ol_cv_linux_threads=no
3361         fi
3362
3363 fi
3364
3365 echo "$ac_t""$ol_cv_linux_threads" 1>&6
3366
3367
3368                 if test $ol_cv_linux_threads = yes ; then
3369                         cat >> confdefs.h <<\EOF
3370 #define HAVE_LINUX_THREADS 1
3371 EOF
3372
3373                 fi
3374
3375                 
3376                                 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
3377 echo "configure:3378: checking for pthread_create" >&5
3378 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
3379   echo $ac_n "(cached) $ac_c" 1>&6
3380 else
3381   cat > conftest.$ac_ext <<EOF
3382 #line 3383 "configure"
3383 #include "confdefs.h"
3384 /* System header to define __stub macros and hopefully few prototypes,
3385     which can conflict with char pthread_create(); below.  */
3386 #include <assert.h>
3387 /* Override any gcc2 internal prototype to avoid an error.  */
3388 /* We use char because int might match the return type of a gcc2
3389     builtin and then its argument prototype would still apply.  */
3390 char pthread_create();
3391
3392 int main() {
3393
3394 /* The GNU C library defines this for functions which it implements
3395     to always fail with ENOSYS.  Some functions are actually named
3396     something starting with __ and the normal name is an alias.  */
3397 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
3398 choke me
3399 #else
3400 pthread_create();
3401 #endif
3402
3403 ; return 0; }
3404 EOF
3405 if { (eval echo configure:3406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3406   rm -rf conftest*
3407   eval "ac_cv_func_pthread_create=yes"
3408 else
3409   echo "configure: failed program was:" >&5
3410   cat conftest.$ac_ext >&5
3411   rm -rf conftest*
3412   eval "ac_cv_func_pthread_create=no"
3413 fi
3414 rm -f conftest*
3415 fi
3416
3417 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
3418   echo "$ac_t""yes" 1>&6
3419   ol_link_threads=yes
3420 else
3421   echo "$ac_t""no" 1>&6
3422 fi
3423
3424
3425                 if test $ol_link_threads = no ; then
3426                                                 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
3427 echo "configure:3428: checking for pthread_create with -pthread" >&5
3428 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
3429   echo $ac_n "(cached) $ac_c" 1>&6
3430 else
3431   
3432                                                                 save_LIBS="$LIBS"
3433                                 LIBS="-pthread $LIBS"
3434                                 cat > conftest.$ac_ext <<EOF
3435 #line 3436 "configure"
3436 #include "confdefs.h"
3437 char pthread();
3438 int main() {
3439
3440                                         pthread_create();
3441                                         
3442 ; return 0; }
3443 EOF
3444 if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3445   rm -rf conftest*
3446   ol_cv_pthread_flag=yes
3447 else
3448   echo "configure: failed program was:" >&5
3449   cat conftest.$ac_ext >&5
3450   rm -rf conftest*
3451   ol_cv_pthread_flag=no
3452 fi
3453 rm -f conftest*
3454                                                                 LIBS="$save_LIBS"
3455                         
3456 fi
3457
3458 echo "$ac_t""$ol_cv_pthread_flag" 1>&6
3459
3460                         if test $ol_cv_pthread_flag = yes ; then
3461                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
3462                                 ol_link_threads=posix
3463                         fi
3464                 fi
3465
3466                 if test $ol_link_threads = no ; then
3467                                                 echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6
3468 echo "configure:3469: checking for pthread_create with -pthreads" >&5
3469 if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then
3470   echo $ac_n "(cached) $ac_c" 1>&6
3471 else
3472   
3473                                                                 save_LIBS="$LIBS"
3474                                 LIBS="-pthreads $LIBS"
3475                                 cat > conftest.$ac_ext <<EOF
3476 #line 3477 "configure"
3477 #include "confdefs.h"
3478 char pthread();
3479 int main() {
3480
3481                                         pthread_create();
3482                                         
3483 ; return 0; }
3484 EOF
3485 if { (eval echo configure:3486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3486   rm -rf conftest*
3487   ol_cv_pthreads_flag=yes
3488 else
3489   echo "configure: failed program was:" >&5
3490   cat conftest.$ac_ext >&5
3491   rm -rf conftest*
3492   ol_cv_pthreads_flag=no
3493 fi
3494 rm -f conftest*
3495                                                                 LIBS="$save_LIBS"
3496                         
3497 fi
3498
3499 echo "$ac_t""$ol_cv_pthreads_flag" 1>&6
3500
3501                         if test $ol_cv_pthreads_flag = yes ; then
3502                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthreads"
3503                                 ol_link_threads=posix
3504                         fi
3505                 fi
3506
3507                 if test $ol_link_threads = no ; then
3508                                                 echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6
3509 echo "configure:3510: checking for pthread_create with -thread" >&5
3510 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
3511   echo $ac_n "(cached) $ac_c" 1>&6
3512 else
3513   
3514                                                                 save_LIBS="$LIBS"
3515                                 LIBS="-thread $LIBS"
3516                                 cat > conftest.$ac_ext <<EOF
3517 #line 3518 "configure"
3518 #include "confdefs.h"
3519 char pthread();
3520 int main() {
3521
3522                                         pthread_create();
3523                                         
3524 ; return 0; }
3525 EOF
3526 if { (eval echo configure:3527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3527   rm -rf conftest*
3528   ol_cv_thread_flag=yes
3529 else
3530   echo "configure: failed program was:" >&5
3531   cat conftest.$ac_ext >&5
3532   rm -rf conftest*
3533   ol_cv_thread_flag=no
3534 fi
3535 rm -f conftest*
3536                                                                 LIBS="$save_LIBS"
3537                         
3538 fi
3539
3540 echo "$ac_t""$ol_cv_thread_flag" 1>&6
3541
3542                         if test $ol_cv_thread_flag = yes ; then
3543                                 LTHREAD_LIBS="$LTHREAD_LIBS -thread"
3544                                 ol_link_threads=posix
3545                         fi
3546                 fi
3547
3548                 if test $ol_link_threads = no ; then
3549                                                 save_LIBS="$LIBS"
3550                         echo $ac_n "checking for pthread_join in -lpthread""... $ac_c" 1>&6
3551 echo "configure:3552: checking for pthread_join in -lpthread" >&5
3552 ac_lib_var=`echo pthread'_'pthread_join | sed 'y%./+-%__p_%'`
3553 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3554   echo $ac_n "(cached) $ac_c" 1>&6
3555 else
3556   ac_save_LIBS="$LIBS"
3557 LIBS="-lpthread -lexc $LIBS"
3558 cat > conftest.$ac_ext <<EOF
3559 #line 3560 "configure"
3560 #include "confdefs.h"
3561 /* Override any gcc2 internal prototype to avoid an error.  */
3562 /* We use char because int might match the return type of a gcc2
3563     builtin and then its argument prototype would still apply.  */
3564 char pthread_join();
3565
3566 int main() {
3567 pthread_join()
3568 ; return 0; }
3569 EOF
3570 if { (eval echo configure:3571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3571   rm -rf conftest*
3572   eval "ac_cv_lib_$ac_lib_var=yes"
3573 else
3574   echo "configure: failed program was:" >&5
3575   cat conftest.$ac_ext >&5
3576   rm -rf conftest*
3577   eval "ac_cv_lib_$ac_lib_var=no"
3578 fi
3579 rm -f conftest*
3580 LIBS="$ac_save_LIBS"
3581
3582 fi
3583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3584   echo "$ac_t""yes" 1>&6
3585   
3586                                 ol_link_threads=posix
3587                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
3588                                 if test $ol_with_yielding_select = auto ; then
3589                                         ol_with_yielding_select=yes
3590                                 fi
3591                                 
3592 else
3593   echo "$ac_t""no" 1>&6
3594 fi
3595
3596                         LIBS="$save_LIBS"
3597                 fi
3598
3599                 if test $ol_link_threads = no ; then
3600                                                 save_LIBS="$LIBS"
3601                         echo $ac_n "checking for pthread_join in -lpthreads""... $ac_c" 1>&6
3602 echo "configure:3603: checking for pthread_join in -lpthreads" >&5
3603 ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'`
3604 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   ac_save_LIBS="$LIBS"
3608 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
3609 cat > conftest.$ac_ext <<EOF
3610 #line 3611 "configure"
3611 #include "confdefs.h"
3612 /* Override any gcc2 internal prototype to avoid an error.  */
3613 /* We use char because int might match the return type of a gcc2
3614     builtin and then its argument prototype would still apply.  */
3615 char pthread_join();
3616
3617 int main() {
3618 pthread_join()
3619 ; return 0; }
3620 EOF
3621 if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3622   rm -rf conftest*
3623   eval "ac_cv_lib_$ac_lib_var=yes"
3624 else
3625   echo "configure: failed program was:" >&5
3626   cat conftest.$ac_ext >&5
3627   rm -rf conftest*
3628   eval "ac_cv_lib_$ac_lib_var=no"
3629 fi
3630 rm -f conftest*
3631 LIBS="$ac_save_LIBS"
3632
3633 fi
3634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3635   echo "$ac_t""yes" 1>&6
3636   
3637                                 ol_link_threads=posix
3638                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
3639                                 if test $ol_with_yielding_select = auto ; then
3640                                         ol_with_yielding_select=yes
3641                                 fi
3642                                 
3643 else
3644   echo "$ac_t""no" 1>&6
3645 fi
3646
3647                         LIBS="$save_LIBS"
3648                 fi
3649
3650                 if test $ol_link_threads = no ; then
3651                                                 save_LIBS="$LIBS"
3652                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
3653 echo "configure:3654: checking for pthread_create in -lpthread" >&5
3654 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
3655 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3656   echo $ac_n "(cached) $ac_c" 1>&6
3657 else
3658   ac_save_LIBS="$LIBS"
3659 LIBS="-lpthread  $LIBS"
3660 cat > conftest.$ac_ext <<EOF
3661 #line 3662 "configure"
3662 #include "confdefs.h"
3663 /* Override any gcc2 internal prototype to avoid an error.  */
3664 /* We use char because int might match the return type of a gcc2
3665     builtin and then its argument prototype would still apply.  */
3666 char pthread_create();
3667
3668 int main() {
3669 pthread_create()
3670 ; return 0; }
3671 EOF
3672 if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3673   rm -rf conftest*
3674   eval "ac_cv_lib_$ac_lib_var=yes"
3675 else
3676   echo "configure: failed program was:" >&5
3677   cat conftest.$ac_ext >&5
3678   rm -rf conftest*
3679   eval "ac_cv_lib_$ac_lib_var=no"
3680 fi
3681 rm -f conftest*
3682 LIBS="$ac_save_LIBS"
3683
3684 fi
3685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3686   echo "$ac_t""yes" 1>&6
3687   
3688                                 ol_link_threads=posix
3689                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
3690 else
3691   echo "$ac_t""no" 1>&6
3692 fi
3693
3694                         LIBS="$save_LIBS"
3695                 fi
3696
3697                 if test $ol_link_threads = no ; then
3698                                                 save_LIBS="$LIBS"
3699                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
3700 echo "configure:3701: checking for pthread_create in -lc_r" >&5
3701 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
3702 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3703   echo $ac_n "(cached) $ac_c" 1>&6
3704 else
3705   ac_save_LIBS="$LIBS"
3706 LIBS="-lc_r  $LIBS"
3707 cat > conftest.$ac_ext <<EOF
3708 #line 3709 "configure"
3709 #include "confdefs.h"
3710 /* Override any gcc2 internal prototype to avoid an error.  */
3711 /* We use char because int might match the return type of a gcc2
3712     builtin and then its argument prototype would still apply.  */
3713 char pthread_create();
3714
3715 int main() {
3716 pthread_create()
3717 ; return 0; }
3718 EOF
3719 if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3720   rm -rf conftest*
3721   eval "ac_cv_lib_$ac_lib_var=yes"
3722 else
3723   echo "configure: failed program was:" >&5
3724   cat conftest.$ac_ext >&5
3725   rm -rf conftest*
3726   eval "ac_cv_lib_$ac_lib_var=no"
3727 fi
3728 rm -f conftest*
3729 LIBS="$ac_save_LIBS"
3730
3731 fi
3732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3733   echo "$ac_t""yes" 1>&6
3734   
3735                                 ol_link_threads=posix
3736                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
3737 else
3738   echo "$ac_t""no" 1>&6
3739 fi
3740
3741                         LIBS="$save_LIBS"
3742                 fi
3743
3744                 if test $ol_link_threads = no ; then
3745                                                 save_LIBS="$LIBS"
3746                         echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
3747 echo "configure:3748: checking for pthread_create in -lpthreads" >&5
3748 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
3749 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3750   echo $ac_n "(cached) $ac_c" 1>&6
3751 else
3752   ac_save_LIBS="$LIBS"
3753 LIBS="-lpthreads  $LIBS"
3754 cat > conftest.$ac_ext <<EOF
3755 #line 3756 "configure"
3756 #include "confdefs.h"
3757 /* Override any gcc2 internal prototype to avoid an error.  */
3758 /* We use char because int might match the return type of a gcc2
3759     builtin and then its argument prototype would still apply.  */
3760 char pthread_create();
3761
3762 int main() {
3763 pthread_create()
3764 ; return 0; }
3765 EOF
3766 if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3767   rm -rf conftest*
3768   eval "ac_cv_lib_$ac_lib_var=yes"
3769 else
3770   echo "configure: failed program was:" >&5
3771   cat conftest.$ac_ext >&5
3772   rm -rf conftest*
3773   eval "ac_cv_lib_$ac_lib_var=no"
3774 fi
3775 rm -f conftest*
3776 LIBS="$ac_save_LIBS"
3777
3778 fi
3779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3780   echo "$ac_t""yes" 1>&6
3781   
3782                                 ol_link_threads=posix
3783                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
3784 else
3785   echo "$ac_t""no" 1>&6
3786 fi
3787
3788                         LIBS="$save_LIBS"
3789                 fi
3790
3791                 if test $ol_link_threads != no ; then
3792                         cat >> confdefs.h <<\EOF
3793 #define HAVE_PTHREADS 1
3794 EOF
3795
3796
3797                                                 save_CPPFLAGS="$CPPFLAGS"
3798                         save_LIBS="$LIBS"
3799                         LIBS="$LTHREAD_LIBS $LIBS"
3800
3801                                                                                                 for ac_func in sched_yield pthread_yield
3802 do
3803 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3804 echo "configure:3805: checking for $ac_func" >&5
3805 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3806   echo $ac_n "(cached) $ac_c" 1>&6
3807 else
3808   cat > conftest.$ac_ext <<EOF
3809 #line 3810 "configure"
3810 #include "confdefs.h"
3811 /* System header to define __stub macros and hopefully few prototypes,
3812     which can conflict with char $ac_func(); below.  */
3813 #include <assert.h>
3814 /* Override any gcc2 internal prototype to avoid an error.  */
3815 /* We use char because int might match the return type of a gcc2
3816     builtin and then its argument prototype would still apply.  */
3817 char $ac_func();
3818
3819 int main() {
3820
3821 /* The GNU C library defines this for functions which it implements
3822     to always fail with ENOSYS.  Some functions are actually named
3823     something starting with __ and the normal name is an alias.  */
3824 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3825 choke me
3826 #else
3827 $ac_func();
3828 #endif
3829
3830 ; return 0; }
3831 EOF
3832 if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3833   rm -rf conftest*
3834   eval "ac_cv_func_$ac_func=yes"
3835 else
3836   echo "configure: failed program was:" >&5
3837   cat conftest.$ac_ext >&5
3838   rm -rf conftest*
3839   eval "ac_cv_func_$ac_func=no"
3840 fi
3841 rm -f conftest*
3842 fi
3843
3844 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3845   echo "$ac_t""yes" 1>&6
3846     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3847   cat >> confdefs.h <<EOF
3848 #define $ac_tr_func 1
3849 EOF
3850  
3851 else
3852   echo "$ac_t""no" 1>&6
3853 fi
3854 done
3855
3856
3857                         if test $ac_cv_func_sched_yield = no -a \
3858                                 $ac_cv_func_pthread_yield = no ; then
3859                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
3860 echo "configure:3861: checking for sched_yield in -lrt" >&5
3861 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
3862 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3863   echo $ac_n "(cached) $ac_c" 1>&6
3864 else
3865   ac_save_LIBS="$LIBS"
3866 LIBS="-lrt  $LIBS"
3867 cat > conftest.$ac_ext <<EOF
3868 #line 3869 "configure"
3869 #include "confdefs.h"
3870 /* Override any gcc2 internal prototype to avoid an error.  */
3871 /* We use char because int might match the return type of a gcc2
3872     builtin and then its argument prototype would still apply.  */
3873 char sched_yield();
3874
3875 int main() {
3876 sched_yield()
3877 ; return 0; }
3878 EOF
3879 if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3880   rm -rf conftest*
3881   eval "ac_cv_lib_$ac_lib_var=yes"
3882 else
3883   echo "configure: failed program was:" >&5
3884   cat conftest.$ac_ext >&5
3885   rm -rf conftest*
3886   eval "ac_cv_lib_$ac_lib_var=no"
3887 fi
3888 rm -f conftest*
3889 LIBS="$ac_save_LIBS"
3890
3891 fi
3892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3893   echo "$ac_t""yes" 1>&6
3894   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
3895                                         cat >> confdefs.h <<\EOF
3896 #define HAVE_SCHED_YIELD 1
3897 EOF
3898
3899                                         ac_cv_func_sched_yield=yes
3900 else
3901   echo "$ac_t""no" 1>&6
3902 ac_cv_func_sched_yield=no
3903 fi
3904
3905                         fi
3906                         if test $ac_cv_func_sched_yield = no -a \
3907                                 $ac_cv_func_pthread_yield = no ; then
3908                                                                 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
3909 echo "configure:3910: checking for sched_yield in -lposix4" >&5
3910 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
3911 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   ac_save_LIBS="$LIBS"
3915 LIBS="-lposix4  $LIBS"
3916 cat > conftest.$ac_ext <<EOF
3917 #line 3918 "configure"
3918 #include "confdefs.h"
3919 /* Override any gcc2 internal prototype to avoid an error.  */
3920 /* We use char because int might match the return type of a gcc2
3921     builtin and then its argument prototype would still apply.  */
3922 char sched_yield();
3923
3924 int main() {
3925 sched_yield()
3926 ; return 0; }
3927 EOF
3928 if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3929   rm -rf conftest*
3930   eval "ac_cv_lib_$ac_lib_var=yes"
3931 else
3932   echo "configure: failed program was:" >&5
3933   cat conftest.$ac_ext >&5
3934   rm -rf conftest*
3935   eval "ac_cv_lib_$ac_lib_var=no"
3936 fi
3937 rm -f conftest*
3938 LIBS="$ac_save_LIBS"
3939
3940 fi
3941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3942   echo "$ac_t""yes" 1>&6
3943   LTHREAD_LIBS="$LTHREAD_LIBS -lposix4"
3944                                         cat >> confdefs.h <<\EOF
3945 #define HAVE_SCHED_YIELD 1
3946 EOF
3947
3948                                         ac_cv_func_sched_yield=yes
3949 else
3950   echo "$ac_t""no" 1>&6
3951 ac_cv_func_sched_yield=no
3952 fi
3953
3954                         fi
3955                         if test $ac_cv_func_sched_yield = no -a \
3956                                 $ac_cv_func_pthread_yield = no ; then
3957                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
3958                                 { echo "configure: error: POSIX Threads are not usable" 1>&2; exit 1; }
3959                         fi
3960
3961                                                 for ac_func in pthread_kill
3962 do
3963 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3964 echo "configure:3965: checking for $ac_func" >&5
3965 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3966   echo $ac_n "(cached) $ac_c" 1>&6
3967 else
3968   cat > conftest.$ac_ext <<EOF
3969 #line 3970 "configure"
3970 #include "confdefs.h"
3971 /* System header to define __stub macros and hopefully few prototypes,
3972     which can conflict with char $ac_func(); below.  */
3973 #include <assert.h>
3974 /* Override any gcc2 internal prototype to avoid an error.  */
3975 /* We use char because int might match the return type of a gcc2
3976     builtin and then its argument prototype would still apply.  */
3977 char $ac_func();
3978
3979 int main() {
3980
3981 /* The GNU C library defines this for functions which it implements
3982     to always fail with ENOSYS.  Some functions are actually named
3983     something starting with __ and the normal name is an alias.  */
3984 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3985 choke me
3986 #else
3987 $ac_func();
3988 #endif
3989
3990 ; return 0; }
3991 EOF
3992 if { (eval echo configure:3993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3993   rm -rf conftest*
3994   eval "ac_cv_func_$ac_func=yes"
3995 else
3996   echo "configure: failed program was:" >&5
3997   cat conftest.$ac_ext >&5
3998   rm -rf conftest*
3999   eval "ac_cv_func_$ac_func=no"
4000 fi
4001 rm -f conftest*
4002 fi
4003
4004 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4005   echo "$ac_t""yes" 1>&6
4006     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4007   cat >> confdefs.h <<EOF
4008 #define $ac_tr_func 1
4009 EOF
4010  
4011 else
4012   echo "$ac_t""no" 1>&6
4013 fi
4014 done
4015
4016                         for ac_func in \
4017                                 pthread_attr_create pthread_attr_init \
4018                                 pthread_attr_destroy pthread_attr_delete \
4019                                 pthread_attr_setdetachstate pthread_attr_setdetach_np \
4020                         
4021 do
4022 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4023 echo "configure:4024: checking for $ac_func" >&5
4024 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4025   echo $ac_n "(cached) $ac_c" 1>&6
4026 else
4027   cat > conftest.$ac_ext <<EOF
4028 #line 4029 "configure"
4029 #include "confdefs.h"
4030 /* System header to define __stub macros and hopefully few prototypes,
4031     which can conflict with char $ac_func(); below.  */
4032 #include <assert.h>
4033 /* Override any gcc2 internal prototype to avoid an error.  */
4034 /* We use char because int might match the return type of a gcc2
4035     builtin and then its argument prototype would still apply.  */
4036 char $ac_func();
4037
4038 int main() {
4039
4040 /* The GNU C library defines this for functions which it implements
4041     to always fail with ENOSYS.  Some functions are actually named
4042     something starting with __ and the normal name is an alias.  */
4043 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4044 choke me
4045 #else
4046 $ac_func();
4047 #endif
4048
4049 ; return 0; }
4050 EOF
4051 if { (eval echo configure:4052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4052   rm -rf conftest*
4053   eval "ac_cv_func_$ac_func=yes"
4054 else
4055   echo "configure: failed program was:" >&5
4056   cat conftest.$ac_ext >&5
4057   rm -rf conftest*
4058   eval "ac_cv_func_$ac_func=no"
4059 fi
4060 rm -f conftest*
4061 fi
4062
4063 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4064   echo "$ac_t""yes" 1>&6
4065     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4066   cat >> confdefs.h <<EOF
4067 #define $ac_tr_func 1
4068 EOF
4069  
4070 else
4071   echo "$ac_t""no" 1>&6
4072 fi
4073 done
4074
4075
4076                                                 for ac_func in \
4077                                 pthread_setconcurrency \
4078                                 thr_setconcurrency \
4079                         
4080 do
4081 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4082 echo "configure:4083: checking for $ac_func" >&5
4083 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4084   echo $ac_n "(cached) $ac_c" 1>&6
4085 else
4086   cat > conftest.$ac_ext <<EOF
4087 #line 4088 "configure"
4088 #include "confdefs.h"
4089 /* System header to define __stub macros and hopefully few prototypes,
4090     which can conflict with char $ac_func(); below.  */
4091 #include <assert.h>
4092 /* Override any gcc2 internal prototype to avoid an error.  */
4093 /* We use char because int might match the return type of a gcc2
4094     builtin and then its argument prototype would still apply.  */
4095 char $ac_func();
4096
4097 int main() {
4098
4099 /* The GNU C library defines this for functions which it implements
4100     to always fail with ENOSYS.  Some functions are actually named
4101     something starting with __ and the normal name is an alias.  */
4102 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4103 choke me
4104 #else
4105 $ac_func();
4106 #endif
4107
4108 ; return 0; }
4109 EOF
4110 if { (eval echo configure:4111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4111   rm -rf conftest*
4112   eval "ac_cv_func_$ac_func=yes"
4113 else
4114   echo "configure: failed program was:" >&5
4115   cat conftest.$ac_ext >&5
4116   rm -rf conftest*
4117   eval "ac_cv_func_$ac_func=no"
4118 fi
4119 rm -f conftest*
4120 fi
4121
4122 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4123   echo "$ac_t""yes" 1>&6
4124     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4125   cat >> confdefs.h <<EOF
4126 #define $ac_tr_func 1
4127 EOF
4128  
4129 else
4130   echo "$ac_t""no" 1>&6
4131 fi
4132 done
4133
4134
4135                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
4136 echo "configure:4137: checking if pthread_create() works" >&5
4137                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
4138   echo $ac_n "(cached) $ac_c" 1>&6
4139 else
4140   
4141                         if test "$cross_compiling" = yes; then
4142                                 ol_cv_pthread_create_works=yes
4143 else
4144   cat > conftest.$ac_ext <<EOF
4145 #line 4146 "configure"
4146 #include "confdefs.h"
4147
4148 #include <pthread.h>
4149 #ifndef NULL
4150 #define NULL (void*)0
4151 #endif
4152
4153 static void *task(p)
4154         void *p;
4155 {
4156         return (void *) (p == NULL);
4157 }
4158
4159 int main(argc, argv)
4160         int argc;
4161         char **argv;
4162 {
4163         pthread_t t;
4164         exit(pthread_create(&t, NULL, task, NULL));
4165 }
4166
4167 EOF
4168 if { (eval echo configure:4169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4169 then
4170   ol_cv_pthread_create_works=yes
4171 else
4172   echo "configure: failed program was:" >&5
4173   cat conftest.$ac_ext >&5
4174   rm -fr conftest*
4175   ol_cv_pthread_create_works=no
4176 fi
4177 rm -fr conftest*
4178 fi
4179
4180 fi
4181
4182                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
4183
4184                         if test $ol_cv_pthread_create_works = no ; then
4185                                 { echo "configure: error: pthread.h and pthread_create are not compatible" 1>&2; exit 1; }
4186                         fi
4187
4188                                                 if test $ol_with_yielding_select = auto ; then
4189                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
4190 echo "configure:4191: checking if select yields when using pthreads" >&5
4191                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
4192   echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194   
4195                                 if test "$cross_compiling" = yes; then
4196   
4197                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
4198 else
4199   cat > conftest.$ac_ext <<EOF
4200 #line 4201 "configure"
4201 #include "confdefs.h"
4202
4203 #include <sys/types.h>
4204 #include <sys/time.h>
4205 #include <unistd.h>
4206 #include <pthread.h>
4207 #ifndef NULL
4208 #define NULL (void*) 0
4209 #endif
4210
4211 static int fildes[2];
4212
4213 static void *task(p)
4214         void *p;
4215 {
4216         int i;
4217         struct timeval tv;
4218
4219         fd_set rfds;
4220
4221         tv.tv_sec=10;
4222         tv.tv_usec=0;
4223
4224         FD_ZERO(&rfds);
4225         FD_SET(fildes[0], &rfds);
4226
4227         /* we're not interested in any fds */
4228         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
4229
4230         if(i < 0) {
4231                 perror("select");
4232                 exit(10);
4233         }
4234
4235         exit(0); /* if we exit here, the select blocked the whole process */
4236 }
4237
4238 int main(argc, argv)
4239         int argc;
4240         char **argv;
4241 {
4242         pthread_t t;
4243
4244         /* create a pipe to select */
4245         if(pipe(&fildes[0])) {
4246                 perror("select");
4247                 exit(1);
4248         }
4249
4250 #ifdef HAVE_PTHREAD_SETCONCURRENCY
4251         (void) pthread_setconcurrency(2);
4252 #else
4253 #ifdef HAVE_THR_SETCONCURRENCY
4254         /* Set Solaris LWP concurrency to 2 */
4255         thr_setconcurrency(2);
4256 #endif
4257 #endif
4258
4259         pthread_create(&t, NULL, task, NULL);
4260
4261 #if HAVE_SCHED_YIELD
4262         sched_yield();  /* make sure task runs first */
4263 #else
4264 #ifdef HAVE_PTHREAD_YIELD
4265         pthread_yield();        /* make sure task runs first */
4266 #endif
4267 #endif
4268
4269         exit(2);
4270 }
4271 EOF
4272 if { (eval echo configure:4273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4273 then
4274   ol_cv_pthread_select_yields=no
4275 else
4276   echo "configure: failed program was:" >&5
4277   cat conftest.$ac_ext >&5
4278   rm -fr conftest*
4279   ol_cv_pthread_select_yields=yes
4280 fi
4281 rm -fr conftest*
4282 fi
4283
4284 fi
4285
4286                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
4287
4288                                 if test $ol_cv_pthread_select_yields = yes ; then
4289                                         ol_with_yielding_select=yes
4290                                 fi
4291                         fi
4292
4293                                                 CPPFLAGS="$save_CPPFLAGS"
4294                         LIBS="$save_LIBS"
4295                 else
4296                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
4297                 fi
4298         fi
4299
4300         if test $ol_with_threads = posix ; then
4301                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
4302         fi
4303 fi
4304
4305 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4306         -o $ol_with_threads = mach ; then
4307
4308                 for ac_hdr in mach/cthreads.h
4309 do
4310 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4311 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4312 echo "configure:4313: checking for $ac_hdr" >&5
4313 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4314   echo $ac_n "(cached) $ac_c" 1>&6
4315 else
4316   cat > conftest.$ac_ext <<EOF
4317 #line 4318 "configure"
4318 #include "confdefs.h"
4319 #include <$ac_hdr>
4320 EOF
4321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4322 { (eval echo configure:4323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4323 ac_err=`grep -v '^ *+' conftest.out`
4324 if test -z "$ac_err"; then
4325   rm -rf conftest*
4326   eval "ac_cv_header_$ac_safe=yes"
4327 else
4328   echo "$ac_err" >&5
4329   echo "configure: failed program was:" >&5
4330   cat conftest.$ac_ext >&5
4331   rm -rf conftest*
4332   eval "ac_cv_header_$ac_safe=no"
4333 fi
4334 rm -f conftest*
4335 fi
4336 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4337   echo "$ac_t""yes" 1>&6
4338     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4339   cat >> confdefs.h <<EOF
4340 #define $ac_tr_hdr 1
4341 EOF
4342  
4343 else
4344   echo "$ac_t""no" 1>&6
4345 fi
4346 done
4347
4348         if test $ac_cv_header_mach_cthreads_h = yes ; then
4349                 ol_with_threads=found
4350
4351                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
4352 echo "configure:4353: checking for cthread_fork" >&5
4353 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
4354   echo $ac_n "(cached) $ac_c" 1>&6
4355 else
4356   cat > conftest.$ac_ext <<EOF
4357 #line 4358 "configure"
4358 #include "confdefs.h"
4359 /* System header to define __stub macros and hopefully few prototypes,
4360     which can conflict with char cthread_fork(); below.  */
4361 #include <assert.h>
4362 /* Override any gcc2 internal prototype to avoid an error.  */
4363 /* We use char because int might match the return type of a gcc2
4364     builtin and then its argument prototype would still apply.  */
4365 char cthread_fork();
4366
4367 int main() {
4368
4369 /* The GNU C library defines this for functions which it implements
4370     to always fail with ENOSYS.  Some functions are actually named
4371     something starting with __ and the normal name is an alias.  */
4372 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
4373 choke me
4374 #else
4375 cthread_fork();
4376 #endif
4377
4378 ; return 0; }
4379 EOF
4380 if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4381   rm -rf conftest*
4382   eval "ac_cv_func_cthread_fork=yes"
4383 else
4384   echo "configure: failed program was:" >&5
4385   cat conftest.$ac_ext >&5
4386   rm -rf conftest*
4387   eval "ac_cv_func_cthread_fork=no"
4388 fi
4389 rm -f conftest*
4390 fi
4391
4392 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
4393   echo "$ac_t""yes" 1>&6
4394   ol_link_threads=yes
4395 else
4396   echo "$ac_t""no" 1>&6
4397 fi
4398
4399
4400                 if test $ol_link_threads = no ; then
4401                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
4402 echo "configure:4403: checking for cthread_fork with -all_load" >&5
4403 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
4404   echo $ac_n "(cached) $ac_c" 1>&6
4405 else
4406   
4407                                                                 save_LIBS="$LIBS"
4408                                 LIBS="-all_load $LIBS"
4409                                 cat > conftest.$ac_ext <<EOF
4410 #line 4411 "configure"
4411 #include "confdefs.h"
4412 #include <mach/cthreads.h>
4413 int main() {
4414
4415                                         cthread_fork((void *)0, (void *)0);
4416                                         
4417 ; return 0; }
4418 EOF
4419 if { (eval echo configure:4420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4420   rm -rf conftest*
4421   ol_cv_cthread_all_load=yes
4422 else
4423   echo "configure: failed program was:" >&5
4424   cat conftest.$ac_ext >&5
4425   rm -rf conftest*
4426   ol_cv_cthread_all_load=no
4427 fi
4428 rm -f conftest*
4429                                                                 LIBS="$save_LIBS"
4430                         
4431 fi
4432
4433 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
4434
4435                         if test $ol_cv_cthread_all_load = yes ; then
4436                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
4437                                 ol_link_threads=mach
4438                         fi
4439                 fi
4440
4441                 if test $ol_link_threads != no ; then
4442                         : check for cthread specific functionality here
4443                         cat >> confdefs.h <<\EOF
4444 #define HAVE_MACH_CTHREADS 1
4445 EOF
4446
4447                 else
4448                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
4449                 fi
4450         fi
4451
4452         if test $ol_with_threads = mach ; then
4453                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
4454         fi
4455 fi
4456
4457 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4458         -o $ol_with_threads = lwp ; then
4459
4460                 for ac_hdr in thread.h synch.h
4461 do
4462 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4463 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4464 echo "configure:4465: checking for $ac_hdr" >&5
4465 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4466   echo $ac_n "(cached) $ac_c" 1>&6
4467 else
4468   cat > conftest.$ac_ext <<EOF
4469 #line 4470 "configure"
4470 #include "confdefs.h"
4471 #include <$ac_hdr>
4472 EOF
4473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4474 { (eval echo configure:4475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4475 ac_err=`grep -v '^ *+' conftest.out`
4476 if test -z "$ac_err"; then
4477   rm -rf conftest*
4478   eval "ac_cv_header_$ac_safe=yes"
4479 else
4480   echo "$ac_err" >&5
4481   echo "configure: failed program was:" >&5
4482   cat conftest.$ac_ext >&5
4483   rm -rf conftest*
4484   eval "ac_cv_header_$ac_safe=no"
4485 fi
4486 rm -f conftest*
4487 fi
4488 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4489   echo "$ac_t""yes" 1>&6
4490     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4491   cat >> confdefs.h <<EOF
4492 #define $ac_tr_hdr 1
4493 EOF
4494  
4495 else
4496   echo "$ac_t""no" 1>&6
4497 fi
4498 done
4499
4500         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
4501                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
4502 echo "configure:4503: checking for thr_create in -lthread" >&5
4503 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
4504 if eval "test \"`echo '$''{'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="-lthread  $LIBS"
4509 cat > conftest.$ac_ext <<EOF
4510 #line 4511 "configure"
4511 #include "confdefs.h"
4512 /* Override any gcc2 internal prototype to avoid an error.  */
4513 /* We use char because int might match the return type of a gcc2
4514     builtin and then its argument prototype would still apply.  */
4515 char thr_create();
4516
4517 int main() {
4518 thr_create()
4519 ; return 0; }
4520 EOF
4521 if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4522   rm -rf conftest*
4523   eval "ac_cv_lib_$ac_lib_var=yes"
4524 else
4525   echo "configure: failed program was:" >&5
4526   cat conftest.$ac_ext >&5
4527   rm -rf conftest*
4528   eval "ac_cv_lib_$ac_lib_var=no"
4529 fi
4530 rm -f conftest*
4531 LIBS="$ac_save_LIBS"
4532
4533 fi
4534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4535   echo "$ac_t""yes" 1>&6
4536   have_thr=yes
4537 else
4538   echo "$ac_t""no" 1>&6
4539 have_thr=no
4540 fi
4541
4542
4543                 if test $have_thr = yes ; then
4544                         cat >> confdefs.h <<\EOF
4545 #define HAVE_THR 1
4546 EOF
4547
4548                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
4549                         ol_link_threads=thr
4550
4551                         if test $ol_with_yielding_select = auto ; then
4552                                 ol_with_yielding_select=yes
4553                         fi
4554                 fi
4555         fi
4556
4557                 for ac_hdr in lwp/lwp.h
4558 do
4559 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4560 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4561 echo "configure:4562: checking for $ac_hdr" >&5
4562 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4563   echo $ac_n "(cached) $ac_c" 1>&6
4564 else
4565   cat > conftest.$ac_ext <<EOF
4566 #line 4567 "configure"
4567 #include "confdefs.h"
4568 #include <$ac_hdr>
4569 EOF
4570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4571 { (eval echo configure:4572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4572 ac_err=`grep -v '^ *+' conftest.out`
4573 if test -z "$ac_err"; then
4574   rm -rf conftest*
4575   eval "ac_cv_header_$ac_safe=yes"
4576 else
4577   echo "$ac_err" >&5
4578   echo "configure: failed program was:" >&5
4579   cat conftest.$ac_ext >&5
4580   rm -rf conftest*
4581   eval "ac_cv_header_$ac_safe=no"
4582 fi
4583 rm -f conftest*
4584 fi
4585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4586   echo "$ac_t""yes" 1>&6
4587     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4588   cat >> confdefs.h <<EOF
4589 #define $ac_tr_hdr 1
4590 EOF
4591  
4592 else
4593   echo "$ac_t""no" 1>&6
4594 fi
4595 done
4596
4597         if test $ac_cv_header_lwp_lwp_h = yes ; then
4598                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
4599 echo "configure:4600: checking for lwp_create in -llwp" >&5
4600 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
4601 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4602   echo $ac_n "(cached) $ac_c" 1>&6
4603 else
4604   ac_save_LIBS="$LIBS"
4605 LIBS="-llwp  $LIBS"
4606 cat > conftest.$ac_ext <<EOF
4607 #line 4608 "configure"
4608 #include "confdefs.h"
4609 /* Override any gcc2 internal prototype to avoid an error.  */
4610 /* We use char because int might match the return type of a gcc2
4611     builtin and then its argument prototype would still apply.  */
4612 char lwp_create();
4613
4614 int main() {
4615 lwp_create()
4616 ; return 0; }
4617 EOF
4618 if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4619   rm -rf conftest*
4620   eval "ac_cv_lib_$ac_lib_var=yes"
4621 else
4622   echo "configure: failed program was:" >&5
4623   cat conftest.$ac_ext >&5
4624   rm -rf conftest*
4625   eval "ac_cv_lib_$ac_lib_var=no"
4626 fi
4627 rm -f conftest*
4628 LIBS="$ac_save_LIBS"
4629
4630 fi
4631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4632   echo "$ac_t""yes" 1>&6
4633   have_lwp=yes
4634 else
4635   echo "$ac_t""no" 1>&6
4636 have_lwp=no
4637 fi
4638
4639
4640                 if test $have_lwp = yes ; then
4641                         cat >> confdefs.h <<\EOF
4642 #define HAVE_LWP 1
4643 EOF
4644
4645                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
4646                         ol_link_threads=lwp
4647
4648                         if test $ol_with_yielding_select = auto ; then
4649                                 ol_with_yielding_select=no
4650                         fi
4651                 fi
4652         fi
4653 fi
4654
4655 if test $ol_with_yielding_select = yes ; then
4656         cat >> confdefs.h <<\EOF
4657 #define HAVE_YIELDING_SELECT 1
4658 EOF
4659
4660 fi
4661
4662 if test $ol_with_threads = manual ; then
4663                 ol_link_threads=yes
4664
4665         echo "configure: warning: thread defines and link options must be set manually" 1>&2
4666
4667         for ac_hdr in pthread.h sched.h
4668 do
4669 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4670 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4671 echo "configure:4672: checking for $ac_hdr" >&5
4672 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4673   echo $ac_n "(cached) $ac_c" 1>&6
4674 else
4675   cat > conftest.$ac_ext <<EOF
4676 #line 4677 "configure"
4677 #include "confdefs.h"
4678 #include <$ac_hdr>
4679 EOF
4680 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4681 { (eval echo configure:4682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4682 ac_err=`grep -v '^ *+' conftest.out`
4683 if test -z "$ac_err"; then
4684   rm -rf conftest*
4685   eval "ac_cv_header_$ac_safe=yes"
4686 else
4687   echo "$ac_err" >&5
4688   echo "configure: failed program was:" >&5
4689   cat conftest.$ac_ext >&5
4690   rm -rf conftest*
4691   eval "ac_cv_header_$ac_safe=no"
4692 fi
4693 rm -f conftest*
4694 fi
4695 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4696   echo "$ac_t""yes" 1>&6
4697     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4698   cat >> confdefs.h <<EOF
4699 #define $ac_tr_hdr 1
4700 EOF
4701  
4702 else
4703   echo "$ac_t""no" 1>&6
4704 fi
4705 done
4706
4707         for ac_func in sched_yield pthread_yield
4708 do
4709 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4710 echo "configure:4711: checking for $ac_func" >&5
4711 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4712   echo $ac_n "(cached) $ac_c" 1>&6
4713 else
4714   cat > conftest.$ac_ext <<EOF
4715 #line 4716 "configure"
4716 #include "confdefs.h"
4717 /* System header to define __stub macros and hopefully few prototypes,
4718     which can conflict with char $ac_func(); below.  */
4719 #include <assert.h>
4720 /* Override any gcc2 internal prototype to avoid an error.  */
4721 /* We use char because int might match the return type of a gcc2
4722     builtin and then its argument prototype would still apply.  */
4723 char $ac_func();
4724
4725 int main() {
4726
4727 /* The GNU C library defines this for functions which it implements
4728     to always fail with ENOSYS.  Some functions are actually named
4729     something starting with __ and the normal name is an alias.  */
4730 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4731 choke me
4732 #else
4733 $ac_func();
4734 #endif
4735
4736 ; return 0; }
4737 EOF
4738 if { (eval echo configure:4739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4739   rm -rf conftest*
4740   eval "ac_cv_func_$ac_func=yes"
4741 else
4742   echo "configure: failed program was:" >&5
4743   cat conftest.$ac_ext >&5
4744   rm -rf conftest*
4745   eval "ac_cv_func_$ac_func=no"
4746 fi
4747 rm -f conftest*
4748 fi
4749
4750 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4751   echo "$ac_t""yes" 1>&6
4752     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4753   cat >> confdefs.h <<EOF
4754 #define $ac_tr_func 1
4755 EOF
4756  
4757 else
4758   echo "$ac_t""no" 1>&6
4759 fi
4760 done
4761
4762         
4763 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
4764 echo "configure:4765: checking for LinuxThreads" >&5
4765 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
4766   echo $ac_n "(cached) $ac_c" 1>&6
4767 else
4768   
4769         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
4770         if test "$res" -gt 0 ; then
4771                 ol_cv_linux_threads=yes
4772         else
4773                 ol_cv_linux_threads=no
4774         fi
4775
4776 fi
4777
4778 echo "$ac_t""$ol_cv_linux_threads" 1>&6
4779
4780
4781         for ac_hdr in mach/cthreads.h
4782 do
4783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4785 echo "configure:4786: checking for $ac_hdr" >&5
4786 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4787   echo $ac_n "(cached) $ac_c" 1>&6
4788 else
4789   cat > conftest.$ac_ext <<EOF
4790 #line 4791 "configure"
4791 #include "confdefs.h"
4792 #include <$ac_hdr>
4793 EOF
4794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4795 { (eval echo configure:4796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4796 ac_err=`grep -v '^ *+' conftest.out`
4797 if test -z "$ac_err"; then
4798   rm -rf conftest*
4799   eval "ac_cv_header_$ac_safe=yes"
4800 else
4801   echo "$ac_err" >&5
4802   echo "configure: failed program was:" >&5
4803   cat conftest.$ac_ext >&5
4804   rm -rf conftest*
4805   eval "ac_cv_header_$ac_safe=no"
4806 fi
4807 rm -f conftest*
4808 fi
4809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4810   echo "$ac_t""yes" 1>&6
4811     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4812   cat >> confdefs.h <<EOF
4813 #define $ac_tr_hdr 1
4814 EOF
4815  
4816 else
4817   echo "$ac_t""no" 1>&6
4818 fi
4819 done
4820
4821         for ac_hdr in lwp/lwp.h
4822 do
4823 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4824 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4825 echo "configure:4826: checking for $ac_hdr" >&5
4826 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4827   echo $ac_n "(cached) $ac_c" 1>&6
4828 else
4829   cat > conftest.$ac_ext <<EOF
4830 #line 4831 "configure"
4831 #include "confdefs.h"
4832 #include <$ac_hdr>
4833 EOF
4834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4835 { (eval echo configure:4836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4836 ac_err=`grep -v '^ *+' conftest.out`
4837 if test -z "$ac_err"; then
4838   rm -rf conftest*
4839   eval "ac_cv_header_$ac_safe=yes"
4840 else
4841   echo "$ac_err" >&5
4842   echo "configure: failed program was:" >&5
4843   cat conftest.$ac_ext >&5
4844   rm -rf conftest*
4845   eval "ac_cv_header_$ac_safe=no"
4846 fi
4847 rm -f conftest*
4848 fi
4849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4850   echo "$ac_t""yes" 1>&6
4851     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4852   cat >> confdefs.h <<EOF
4853 #define $ac_tr_hdr 1
4854 EOF
4855  
4856 else
4857   echo "$ac_t""no" 1>&6
4858 fi
4859 done
4860
4861         for ac_hdr in thread.h synch.h
4862 do
4863 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4864 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4865 echo "configure:4866: checking for $ac_hdr" >&5
4866 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4867   echo $ac_n "(cached) $ac_c" 1>&6
4868 else
4869   cat > conftest.$ac_ext <<EOF
4870 #line 4871 "configure"
4871 #include "confdefs.h"
4872 #include <$ac_hdr>
4873 EOF
4874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4875 { (eval echo configure:4876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4876 ac_err=`grep -v '^ *+' conftest.out`
4877 if test -z "$ac_err"; then
4878   rm -rf conftest*
4879   eval "ac_cv_header_$ac_safe=yes"
4880 else
4881   echo "$ac_err" >&5
4882   echo "configure: failed program was:" >&5
4883   cat conftest.$ac_ext >&5
4884   rm -rf conftest*
4885   eval "ac_cv_header_$ac_safe=no"
4886 fi
4887 rm -f conftest*
4888 fi
4889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4890   echo "$ac_t""yes" 1>&6
4891     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4892   cat >> confdefs.h <<EOF
4893 #define $ac_tr_hdr 1
4894 EOF
4895  
4896 else
4897   echo "$ac_t""no" 1>&6
4898 fi
4899 done
4900
4901 fi
4902
4903 if test $ol_link_threads != no ; then  
4904                         cat >> confdefs.h <<\EOF
4905 #define REENTRANT 1
4906 EOF
4907
4908         cat >> confdefs.h <<\EOF
4909 #define _REENTRANT 1
4910 EOF
4911
4912         cat >> confdefs.h <<\EOF
4913 #define THREAD_SAFE 1
4914 EOF
4915
4916         cat >> confdefs.h <<\EOF
4917 #define _THREAD_SAFE 1
4918 EOF
4919
4920         cat >> confdefs.h <<\EOF
4921 #define THREADSAFE 1
4922 EOF
4923
4924         cat >> confdefs.h <<\EOF
4925 #define _THREADSAFE 1
4926 EOF
4927
4928
4929                                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
4930 echo "configure:4931: checking for thread specific errno" >&5
4931 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
4932   echo $ac_n "(cached) $ac_c" 1>&6
4933 else
4934   
4935                 cat > conftest.$ac_ext <<EOF
4936 #line 4937 "configure"
4937 #include "confdefs.h"
4938
4939 #include <errno.h>
4940                         
4941 int main() {
4942
4943 int x = errno;
4944                         
4945 ; return 0; }
4946 EOF
4947 if { (eval echo configure:4948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4948   rm -rf conftest*
4949   ol_cv_errno_thread_specific=yes
4950 else
4951   echo "configure: failed program was:" >&5
4952   cat conftest.$ac_ext >&5
4953   rm -rf conftest*
4954   ol_cv_errno_thread_specific=no
4955 fi
4956 rm -f conftest*
4957         
4958 fi
4959
4960 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
4961
4962         if test $ol_cv_errno_thread_specific != yes ; then
4963                 LIBS="$LTHREAD_LIBS $LIBS"
4964                 LTHREAD_LIBS=""
4965         fi
4966
4967 fi  
4968
4969
4970 if test $ol_link_threads = no ; then
4971         if test $ol_with_threads = yes ; then
4972                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
4973         fi
4974
4975         if test $ol_with_threads = auto ; then
4976                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
4977                 ol_with_threads=no
4978         fi
4979
4980         cat >> confdefs.h <<\EOF
4981 #define NO_THREADS 1
4982 EOF
4983
4984         LTHREAD_LIBS=""
4985 fi
4986
4987 ol_link_ldbm=no 
4988 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
4989         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
4990 echo "configure:4991: checking for DB2 library" >&5
4991 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
4992   echo $ac_n "(cached) $ac_c" 1>&6
4993 else
4994         ol_LIBS="$LIBS"
4995         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
4996 echo "configure:4997: checking for db_open in -ldb" >&5
4997 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
4998 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4999   echo $ac_n "(cached) $ac_c" 1>&6
5000 else
5001   ac_save_LIBS="$LIBS"
5002 LIBS="-ldb  $LIBS"
5003 cat > conftest.$ac_ext <<EOF
5004 #line 5005 "configure"
5005 #include "confdefs.h"
5006 /* Override any gcc2 internal prototype to avoid an error.  */
5007 /* We use char because int might match the return type of a gcc2
5008     builtin and then its argument prototype would still apply.  */
5009 char db_open();
5010
5011 int main() {
5012 db_open()
5013 ; return 0; }
5014 EOF
5015 if { (eval echo configure:5016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5016   rm -rf conftest*
5017   eval "ac_cv_lib_$ac_lib_var=yes"
5018 else
5019   echo "configure: failed program was:" >&5
5020   cat conftest.$ac_ext >&5
5021   rm -rf conftest*
5022   eval "ac_cv_lib_$ac_lib_var=no"
5023 fi
5024 rm -f conftest*
5025 LIBS="$ac_save_LIBS"
5026
5027 fi
5028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5029   echo "$ac_t""yes" 1>&6
5030   ol_cv_lib_db2=-ldb
5031 else
5032   echo "$ac_t""no" 1>&6
5033 ol_cv_lib_db2=no
5034 fi
5035
5036         LIBS="$ol_LIBS"
5037
5038 fi
5039
5040 echo "$ac_t""$ol_cv_lib_db2" 1>&6
5041
5042 for ac_hdr in db.h
5043 do
5044 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5045 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5046 echo "configure:5047: checking for $ac_hdr" >&5
5047 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5048   echo $ac_n "(cached) $ac_c" 1>&6
5049 else
5050   cat > conftest.$ac_ext <<EOF
5051 #line 5052 "configure"
5052 #include "confdefs.h"
5053 #include <$ac_hdr>
5054 EOF
5055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5056 { (eval echo configure:5057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5057 ac_err=`grep -v '^ *+' conftest.out`
5058 if test -z "$ac_err"; then
5059   rm -rf conftest*
5060   eval "ac_cv_header_$ac_safe=yes"
5061 else
5062   echo "$ac_err" >&5
5063   echo "configure: failed program was:" >&5
5064   cat conftest.$ac_ext >&5
5065   rm -rf conftest*
5066   eval "ac_cv_header_$ac_safe=no"
5067 fi
5068 rm -f conftest*
5069 fi
5070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5071   echo "$ac_t""yes" 1>&6
5072     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5073   cat >> confdefs.h <<EOF
5074 #define $ac_tr_hdr 1
5075 EOF
5076  
5077 else
5078   echo "$ac_t""no" 1>&6
5079 fi
5080 done
5081
5082 if test $ac_cv_header_db_h = yes ; then
5083         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
5084 echo "configure:5085: checking if db.h is DB2" >&5
5085 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
5086   echo $ac_n "(cached) $ac_c" 1>&6
5087 else
5088   
5089                 cat > conftest.$ac_ext <<EOF
5090 #line 5091 "configure"
5091 #include "confdefs.h"
5092
5093 #                       include <db.h>
5094                         /* this check could be improved */
5095 #                       ifdef DB_VERSION_MAJOR
5096 #                               if DB_VERSION_MAJOR == 2
5097                                         __db_version_2
5098 #                               endif
5099 #                       endif
5100                 
5101 EOF
5102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5103   egrep "__db_version_2" >/dev/null 2>&1; then
5104   rm -rf conftest*
5105   ol_cv_header_db2=yes
5106 else
5107   rm -rf conftest*
5108   ol_cv_header_db2=no
5109 fi
5110 rm -f conftest*
5111
5112 fi
5113
5114 echo "$ac_t""$ol_cv_header_db2" 1>&6
5115 else
5116         ol_cv_header_db2=no
5117 fi
5118
5119
5120  
5121  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
5122 echo "configure:5123: checking for Berkeley DB2" >&5
5123 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
5124   echo $ac_n "(cached) $ac_c" 1>&6
5125 else
5126   
5127         if test $ol_cv_lib_db2 = no -o $ol_cv_header_db2 = no ; then
5128                 ol_cv_berkeley_db2=no
5129         else
5130                 ol_cv_berkeley_db2=yes
5131         fi
5132
5133 fi
5134
5135 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
5136  if test $ol_cv_berkeley_db2 = yes ; then
5137         cat >> confdefs.h <<\EOF
5138 #define HAVE_BERKELEY_DB2 1
5139 EOF
5140
5141  fi
5142
5143
5144         if test $ol_cv_berkeley_db2 = yes ; then
5145                 ol_link_ldbm=db2
5146                 ol_with_ldbm_api=db2
5147
5148                 if test $ol_with_ldbm_type = hash ; then
5149                         cat >> confdefs.h <<\EOF
5150 #define LDBM_USE_DBHASH 1
5151 EOF
5152
5153                 else
5154                         cat >> confdefs.h <<\EOF
5155 #define LDBM_USE_DBBTREE 1
5156 EOF
5157
5158                 fi
5159
5160                                                 if test $ol_cv_lib_db2 != yes ; then
5161                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
5162                 fi
5163         fi
5164 fi
5165
5166 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
5167         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
5168 echo "configure:5169: checking for Berkeley DB library" >&5
5169 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
5170   echo $ac_n "(cached) $ac_c" 1>&6
5171 else
5172         ol_LIBS="$LIBS"
5173         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
5174 echo "configure:5175: checking for dbopen" >&5
5175 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
5176   echo $ac_n "(cached) $ac_c" 1>&6
5177 else
5178   cat > conftest.$ac_ext <<EOF
5179 #line 5180 "configure"
5180 #include "confdefs.h"
5181 /* System header to define __stub macros and hopefully few prototypes,
5182     which can conflict with char dbopen(); below.  */
5183 #include <assert.h>
5184 /* Override any gcc2 internal prototype to avoid an error.  */
5185 /* We use char because int might match the return type of a gcc2
5186     builtin and then its argument prototype would still apply.  */
5187 char dbopen();
5188
5189 int main() {
5190
5191 /* The GNU C library defines this for functions which it implements
5192     to always fail with ENOSYS.  Some functions are actually named
5193     something starting with __ and the normal name is an alias.  */
5194 #if defined (__stub_dbopen) || defined (__stub___dbopen)
5195 choke me
5196 #else
5197 dbopen();
5198 #endif
5199
5200 ; return 0; }
5201 EOF
5202 if { (eval echo configure:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5203   rm -rf conftest*
5204   eval "ac_cv_func_dbopen=yes"
5205 else
5206   echo "configure: failed program was:" >&5
5207   cat conftest.$ac_ext >&5
5208   rm -rf conftest*
5209   eval "ac_cv_func_dbopen=no"
5210 fi
5211 rm -f conftest*
5212 fi
5213
5214 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
5215   echo "$ac_t""yes" 1>&6
5216   ol_cv_lib_db=yes
5217 else
5218   echo "$ac_t""no" 1>&6
5219
5220                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
5221 echo "configure:5222: checking for dbopen in -ldb" >&5
5222 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
5223 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5224   echo $ac_n "(cached) $ac_c" 1>&6
5225 else
5226   ac_save_LIBS="$LIBS"
5227 LIBS="-ldb  $LIBS"
5228 cat > conftest.$ac_ext <<EOF
5229 #line 5230 "configure"
5230 #include "confdefs.h"
5231 /* Override any gcc2 internal prototype to avoid an error.  */
5232 /* We use char because int might match the return type of a gcc2
5233     builtin and then its argument prototype would still apply.  */
5234 char dbopen();
5235
5236 int main() {
5237 dbopen()
5238 ; return 0; }
5239 EOF
5240 if { (eval echo configure:5241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5241   rm -rf conftest*
5242   eval "ac_cv_lib_$ac_lib_var=yes"
5243 else
5244   echo "configure: failed program was:" >&5
5245   cat conftest.$ac_ext >&5
5246   rm -rf conftest*
5247   eval "ac_cv_lib_$ac_lib_var=no"
5248 fi
5249 rm -f conftest*
5250 LIBS="$ac_save_LIBS"
5251
5252 fi
5253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5254   echo "$ac_t""yes" 1>&6
5255   ol_cv_lib_db=-ldb
5256 else
5257   echo "$ac_t""no" 1>&6
5258 ol_cv_lib_db=no
5259 fi
5260
5261         
5262 fi
5263
5264         LIBS="$ol_LIBS"
5265
5266 fi
5267
5268 echo "$ac_t""$ol_cv_lib_db" 1>&6
5269
5270
5271 for ac_hdr in db_185.h
5272 do
5273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5275 echo "configure:5276: checking for $ac_hdr" >&5
5276 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5277   echo $ac_n "(cached) $ac_c" 1>&6
5278 else
5279   cat > conftest.$ac_ext <<EOF
5280 #line 5281 "configure"
5281 #include "confdefs.h"
5282 #include <$ac_hdr>
5283 EOF
5284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5285 { (eval echo configure:5286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5286 ac_err=`grep -v '^ *+' conftest.out`
5287 if test -z "$ac_err"; then
5288   rm -rf conftest*
5289   eval "ac_cv_header_$ac_safe=yes"
5290 else
5291   echo "$ac_err" >&5
5292   echo "configure: failed program was:" >&5
5293   cat conftest.$ac_ext >&5
5294   rm -rf conftest*
5295   eval "ac_cv_header_$ac_safe=no"
5296 fi
5297 rm -f conftest*
5298 fi
5299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5300   echo "$ac_t""yes" 1>&6
5301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5302   cat >> confdefs.h <<EOF
5303 #define $ac_tr_hdr 1
5304 EOF
5305  
5306 else
5307   echo "$ac_t""no" 1>&6
5308 fi
5309 done
5310
5311 if test $ol_cv_header_db2 = yes ; then
5312         
5313         ol_cv_header_db=$ac_cv_header_db_185_h
5314 else
5315         ol_cv_header_db=$ac_cv_header_db_h
5316 fi
5317
5318
5319  
5320  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
5321 echo "configure:5322: checking for Berkeley DB" >&5
5322 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
5323   echo $ac_n "(cached) $ac_c" 1>&6
5324 else
5325   
5326         if test $ol_cv_lib_db = no -o $ol_cv_header_db = no ; then
5327                 ol_cv_berkeley_db=no
5328         else
5329                 ol_cv_berkeley_db=yes
5330         fi
5331
5332 fi
5333
5334 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
5335  if test $ol_cv_berkeley_db = yes ; then
5336         cat >> confdefs.h <<\EOF
5337 #define HAVE_BERKELEY_DB 1
5338 EOF
5339
5340  fi
5341
5342
5343         if test $ol_cv_berkeley_db = yes ; then
5344                 ol_link_ldbm=db
5345                 ol_with_ldbm_api=db
5346
5347                 if test $ol_with_ldbm_type = hash ; then
5348                         cat >> confdefs.h <<\EOF
5349 #define LDBM_USE_DBHASH 1
5350 EOF
5351
5352                 else
5353                         cat >> confdefs.h <<\EOF
5354 #define LDBM_USE_DBBTREE 1
5355 EOF
5356
5357                 fi
5358
5359                                                 if test $ol_cv_lib_db != yes ; then
5360                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
5361                 fi
5362         fi
5363 fi
5364
5365 if test $ol_with_ldbm_api = manual ; then
5366                 ol_link_ldbm=yes
5367
5368         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
5369
5370         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
5371 do
5372 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5373 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5374 echo "configure:5375: checking for $ac_hdr" >&5
5375 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5376   echo $ac_n "(cached) $ac_c" 1>&6
5377 else
5378   cat > conftest.$ac_ext <<EOF
5379 #line 5380 "configure"
5380 #include "confdefs.h"
5381 #include <$ac_hdr>
5382 EOF
5383 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5384 { (eval echo configure:5385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5385 ac_err=`grep -v '^ *+' conftest.out`
5386 if test -z "$ac_err"; then
5387   rm -rf conftest*
5388   eval "ac_cv_header_$ac_safe=yes"
5389 else
5390   echo "$ac_err" >&5
5391   echo "configure: failed program was:" >&5
5392   cat conftest.$ac_ext >&5
5393   rm -rf conftest*
5394   eval "ac_cv_header_$ac_safe=no"
5395 fi
5396 rm -f conftest*
5397 fi
5398 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5399   echo "$ac_t""yes" 1>&6
5400     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5401   cat >> confdefs.h <<EOF
5402 #define $ac_tr_hdr 1
5403 EOF
5404  
5405 else
5406   echo "$ac_t""no" 1>&6
5407 fi
5408 done
5409
5410 fi
5411
5412 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
5413         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
5414         ol_with_ldbm_api=none
5415 fi
5416
5417 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
5418         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
5419 echo "configure:5420: checking for GDBM library" >&5
5420 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
5421   echo $ac_n "(cached) $ac_c" 1>&6
5422 else
5423         ol_LIBS="$LIBS"
5424         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
5425 echo "configure:5426: checking for gdbm_open" >&5
5426 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
5427   echo $ac_n "(cached) $ac_c" 1>&6
5428 else
5429   cat > conftest.$ac_ext <<EOF
5430 #line 5431 "configure"
5431 #include "confdefs.h"
5432 /* System header to define __stub macros and hopefully few prototypes,
5433     which can conflict with char gdbm_open(); below.  */
5434 #include <assert.h>
5435 /* Override any gcc2 internal prototype to avoid an error.  */
5436 /* We use char because int might match the return type of a gcc2
5437     builtin and then its argument prototype would still apply.  */
5438 char gdbm_open();
5439
5440 int main() {
5441
5442 /* The GNU C library defines this for functions which it implements
5443     to always fail with ENOSYS.  Some functions are actually named
5444     something starting with __ and the normal name is an alias.  */
5445 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
5446 choke me
5447 #else
5448 gdbm_open();
5449 #endif
5450
5451 ; return 0; }
5452 EOF
5453 if { (eval echo configure:5454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5454   rm -rf conftest*
5455   eval "ac_cv_func_gdbm_open=yes"
5456 else
5457   echo "configure: failed program was:" >&5
5458   cat conftest.$ac_ext >&5
5459   rm -rf conftest*
5460   eval "ac_cv_func_gdbm_open=no"
5461 fi
5462 rm -f conftest*
5463 fi
5464
5465 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
5466   echo "$ac_t""yes" 1>&6
5467   ol_cv_lib_gdbm=yes
5468 else
5469   echo "$ac_t""no" 1>&6
5470
5471                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
5472 echo "configure:5473: checking for gdbm_open in -lgdbm" >&5
5473 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
5474 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5475   echo $ac_n "(cached) $ac_c" 1>&6
5476 else
5477   ac_save_LIBS="$LIBS"
5478 LIBS="-lgdbm  $LIBS"
5479 cat > conftest.$ac_ext <<EOF
5480 #line 5481 "configure"
5481 #include "confdefs.h"
5482 /* Override any gcc2 internal prototype to avoid an error.  */
5483 /* We use char because int might match the return type of a gcc2
5484     builtin and then its argument prototype would still apply.  */
5485 char gdbm_open();
5486
5487 int main() {
5488 gdbm_open()
5489 ; return 0; }
5490 EOF
5491 if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5492   rm -rf conftest*
5493   eval "ac_cv_lib_$ac_lib_var=yes"
5494 else
5495   echo "configure: failed program was:" >&5
5496   cat conftest.$ac_ext >&5
5497   rm -rf conftest*
5498   eval "ac_cv_lib_$ac_lib_var=no"
5499 fi
5500 rm -f conftest*
5501 LIBS="$ac_save_LIBS"
5502
5503 fi
5504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5505   echo "$ac_t""yes" 1>&6
5506   ol_cv_lib_gdbm=-lgdbm
5507 else
5508   echo "$ac_t""no" 1>&6
5509 ol_cv_lib_gdbm=no
5510 fi
5511
5512         
5513 fi
5514
5515         LIBS="$ol_LIBS"
5516
5517 fi
5518
5519 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
5520
5521
5522  for ac_hdr in gdbm.h
5523 do
5524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5526 echo "configure:5527: checking for $ac_hdr" >&5
5527 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5528   echo $ac_n "(cached) $ac_c" 1>&6
5529 else
5530   cat > conftest.$ac_ext <<EOF
5531 #line 5532 "configure"
5532 #include "confdefs.h"
5533 #include <$ac_hdr>
5534 EOF
5535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5536 { (eval echo configure:5537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5537 ac_err=`grep -v '^ *+' conftest.out`
5538 if test -z "$ac_err"; then
5539   rm -rf conftest*
5540   eval "ac_cv_header_$ac_safe=yes"
5541 else
5542   echo "$ac_err" >&5
5543   echo "configure: failed program was:" >&5
5544   cat conftest.$ac_ext >&5
5545   rm -rf conftest*
5546   eval "ac_cv_header_$ac_safe=no"
5547 fi
5548 rm -f conftest*
5549 fi
5550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5551   echo "$ac_t""yes" 1>&6
5552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5553   cat >> confdefs.h <<EOF
5554 #define $ac_tr_hdr 1
5555 EOF
5556  
5557 else
5558   echo "$ac_t""no" 1>&6
5559 fi
5560 done
5561
5562  echo $ac_n "checking for db""... $ac_c" 1>&6
5563 echo "configure:5564: checking for db" >&5
5564 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
5565   echo $ac_n "(cached) $ac_c" 1>&6
5566 else
5567   
5568         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
5569                 ol_cv_gdbm=no
5570         else
5571                 ol_cv_gdbm=yes
5572         fi
5573
5574 fi
5575
5576 echo "$ac_t""$ol_cv_gdbm" 1>&6
5577  if test $ol_cv_gdbm = yes ; then
5578         cat >> confdefs.h <<\EOF
5579 #define HAVE_GDBM 1
5580 EOF
5581
5582  fi
5583
5584
5585         if test $ol_cv_gdbm = yes ; then
5586                 ol_link_ldbm=gdbm
5587                 ol_with_ldbm_api=gdbm
5588
5589                 if test $ol_cv_lib_gdbm != yes ; then
5590                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
5591                 fi
5592         fi
5593 fi
5594
5595 if test $ol_with_ldbm_api = auto ; then
5596         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
5597 elif test $ol_with_ldbm_api = ndbm ; then
5598         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
5599 echo "configure:5600: checking for NDBM library" >&5
5600 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
5601   echo $ac_n "(cached) $ac_c" 1>&6
5602 else
5603         ol_LIBS="$LIBS"
5604         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
5605 echo "configure:5606: checking for dbm_open" >&5
5606 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
5607   echo $ac_n "(cached) $ac_c" 1>&6
5608 else
5609   cat > conftest.$ac_ext <<EOF
5610 #line 5611 "configure"
5611 #include "confdefs.h"
5612 /* System header to define __stub macros and hopefully few prototypes,
5613     which can conflict with char dbm_open(); below.  */
5614 #include <assert.h>
5615 /* Override any gcc2 internal prototype to avoid an error.  */
5616 /* We use char because int might match the return type of a gcc2
5617     builtin and then its argument prototype would still apply.  */
5618 char dbm_open();
5619
5620 int main() {
5621
5622 /* The GNU C library defines this for functions which it implements
5623     to always fail with ENOSYS.  Some functions are actually named
5624     something starting with __ and the normal name is an alias.  */
5625 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
5626 choke me
5627 #else
5628 dbm_open();
5629 #endif
5630
5631 ; return 0; }
5632 EOF
5633 if { (eval echo configure:5634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5634   rm -rf conftest*
5635   eval "ac_cv_func_dbm_open=yes"
5636 else
5637   echo "configure: failed program was:" >&5
5638   cat conftest.$ac_ext >&5
5639   rm -rf conftest*
5640   eval "ac_cv_func_dbm_open=no"
5641 fi
5642 rm -f conftest*
5643 fi
5644
5645 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
5646   echo "$ac_t""yes" 1>&6
5647   ol_cv_lib_ndbm=yes
5648 else
5649   echo "$ac_t""no" 1>&6
5650
5651                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
5652 echo "configure:5653: checking for dbm_open in -lndbm" >&5
5653 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
5654 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5655   echo $ac_n "(cached) $ac_c" 1>&6
5656 else
5657   ac_save_LIBS="$LIBS"
5658 LIBS="-lndbm  $LIBS"
5659 cat > conftest.$ac_ext <<EOF
5660 #line 5661 "configure"
5661 #include "confdefs.h"
5662 /* Override any gcc2 internal prototype to avoid an error.  */
5663 /* We use char because int might match the return type of a gcc2
5664     builtin and then its argument prototype would still apply.  */
5665 char dbm_open();
5666
5667 int main() {
5668 dbm_open()
5669 ; return 0; }
5670 EOF
5671 if { (eval echo configure:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5672   rm -rf conftest*
5673   eval "ac_cv_lib_$ac_lib_var=yes"
5674 else
5675   echo "configure: failed program was:" >&5
5676   cat conftest.$ac_ext >&5
5677   rm -rf conftest*
5678   eval "ac_cv_lib_$ac_lib_var=no"
5679 fi
5680 rm -f conftest*
5681 LIBS="$ac_save_LIBS"
5682
5683 fi
5684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5685   echo "$ac_t""yes" 1>&6
5686   ol_cv_lib_ndbm=-lndbm
5687 else
5688   echo "$ac_t""no" 1>&6
5689
5690                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
5691 echo "configure:5692: checking for dbm_open in -ldbm" >&5
5692 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
5693 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5694   echo $ac_n "(cached) $ac_c" 1>&6
5695 else
5696   ac_save_LIBS="$LIBS"
5697 LIBS="-ldbm  $LIBS"
5698 cat > conftest.$ac_ext <<EOF
5699 #line 5700 "configure"
5700 #include "confdefs.h"
5701 /* Override any gcc2 internal prototype to avoid an error.  */
5702 /* We use char because int might match the return type of a gcc2
5703     builtin and then its argument prototype would still apply.  */
5704 char dbm_open();
5705
5706 int main() {
5707 dbm_open()
5708 ; return 0; }
5709 EOF
5710 if { (eval echo configure:5711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5711   rm -rf conftest*
5712   eval "ac_cv_lib_$ac_lib_var=yes"
5713 else
5714   echo "configure: failed program was:" >&5
5715   cat conftest.$ac_ext >&5
5716   rm -rf conftest*
5717   eval "ac_cv_lib_$ac_lib_var=no"
5718 fi
5719 rm -f conftest*
5720 LIBS="$ac_save_LIBS"
5721
5722 fi
5723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5724   echo "$ac_t""yes" 1>&6
5725   ol_cv_lib_ndbm=-ldbm
5726 else
5727   echo "$ac_t""no" 1>&6
5728 ol_cv_lib_ndbm=no
5729 fi
5730                 
5731 fi
5732
5733         
5734 fi
5735
5736         LIBS="$ol_LIBS"
5737
5738 fi
5739
5740 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
5741
5742
5743  for ac_hdr in ndbm.h
5744 do
5745 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5746 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5747 echo "configure:5748: checking for $ac_hdr" >&5
5748 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5749   echo $ac_n "(cached) $ac_c" 1>&6
5750 else
5751   cat > conftest.$ac_ext <<EOF
5752 #line 5753 "configure"
5753 #include "confdefs.h"
5754 #include <$ac_hdr>
5755 EOF
5756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5757 { (eval echo configure:5758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5758 ac_err=`grep -v '^ *+' conftest.out`
5759 if test -z "$ac_err"; then
5760   rm -rf conftest*
5761   eval "ac_cv_header_$ac_safe=yes"
5762 else
5763   echo "$ac_err" >&5
5764   echo "configure: failed program was:" >&5
5765   cat conftest.$ac_ext >&5
5766   rm -rf conftest*
5767   eval "ac_cv_header_$ac_safe=no"
5768 fi
5769 rm -f conftest*
5770 fi
5771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5772   echo "$ac_t""yes" 1>&6
5773     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5774   cat >> confdefs.h <<EOF
5775 #define $ac_tr_hdr 1
5776 EOF
5777  
5778 else
5779   echo "$ac_t""no" 1>&6
5780 fi
5781 done
5782
5783  echo $ac_n "checking for db""... $ac_c" 1>&6
5784 echo "configure:5785: checking for db" >&5
5785 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
5786   echo $ac_n "(cached) $ac_c" 1>&6
5787 else
5788   
5789         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
5790                 ol_cv_ndbm=no
5791         else
5792                 ol_cv_ndbm=yes
5793         fi
5794
5795 fi
5796
5797 echo "$ac_t""$ol_cv_ndbm" 1>&6
5798  if test $ol_cv_ndbm = yes ; then
5799         cat >> confdefs.h <<\EOF
5800 #define HAVE_NDBM 1
5801 EOF
5802
5803  fi
5804
5805
5806         if test $ol_cv_ndbm = yes ; then
5807                 ol_link_ldbm=ndbm
5808                 ol_with_ldbm_api=ndbm
5809
5810                 if test $ol_cv_lib_ndbm != yes ; then
5811                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
5812                 fi
5813         fi
5814 fi
5815
5816 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
5817         echo "configure: warning: could not find suitable LDBM backend" 1>&2
5818         if test $ol_enable_ldbm = yes ; then
5819                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
5820         fi
5821
5822         echo "configure: warning: disabling LDBM" 1>&2
5823         ol_enable_ldbm=no
5824 fi
5825
5826 if test $ol_enable_wrappers = yes ; then
5827         echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
5828 echo "configure:5829: checking for main in -lwrap" >&5
5829 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
5830 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5831   echo $ac_n "(cached) $ac_c" 1>&6
5832 else
5833   ac_save_LIBS="$LIBS"
5834 LIBS="-lwrap  $LIBS"
5835 cat > conftest.$ac_ext <<EOF
5836 #line 5837 "configure"
5837 #include "confdefs.h"
5838
5839 int main() {
5840 main()
5841 ; return 0; }
5842 EOF
5843 if { (eval echo configure:5844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5844   rm -rf conftest*
5845   eval "ac_cv_lib_$ac_lib_var=yes"
5846 else
5847   echo "configure: failed program was:" >&5
5848   cat conftest.$ac_ext >&5
5849   rm -rf conftest*
5850   eval "ac_cv_lib_$ac_lib_var=no"
5851 fi
5852 rm -f conftest*
5853 LIBS="$ac_save_LIBS"
5854
5855 fi
5856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5857   echo "$ac_t""yes" 1>&6
5858   have_wrappers=yes
5859 else
5860   echo "$ac_t""no" 1>&6
5861 have_wrappers=no
5862 fi
5863
5864
5865         if test $have_wrappers = yes ; then
5866                 cat >> confdefs.h <<\EOF
5867 #define HAVE_TCPD 1
5868 EOF
5869
5870                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
5871         else
5872                 echo "configure: warning: could not find -lwrap" 1>&2
5873                 if test $ol_enable_wrappers = yes ; then
5874                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
5875                 fi
5876
5877                 echo "configure: warning: disabling wrappers support" 1>&2
5878                 ol_enable_wrappers=no
5879         fi
5880
5881 fi
5882
5883 if test $ol_enable_dmalloc != no ; then
5884         for ac_hdr in dmalloc.h
5885 do
5886 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5887 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5888 echo "configure:5889: checking for $ac_hdr" >&5
5889 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5890   echo $ac_n "(cached) $ac_c" 1>&6
5891 else
5892   cat > conftest.$ac_ext <<EOF
5893 #line 5894 "configure"
5894 #include "confdefs.h"
5895 #include <$ac_hdr>
5896 EOF
5897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5898 { (eval echo configure:5899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5899 ac_err=`grep -v '^ *+' conftest.out`
5900 if test -z "$ac_err"; then
5901   rm -rf conftest*
5902   eval "ac_cv_header_$ac_safe=yes"
5903 else
5904   echo "$ac_err" >&5
5905   echo "configure: failed program was:" >&5
5906   cat conftest.$ac_ext >&5
5907   rm -rf conftest*
5908   eval "ac_cv_header_$ac_safe=no"
5909 fi
5910 rm -f conftest*
5911 fi
5912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5913   echo "$ac_t""yes" 1>&6
5914     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5915   cat >> confdefs.h <<EOF
5916 #define $ac_tr_hdr 1
5917 EOF
5918  
5919 else
5920   echo "$ac_t""no" 1>&6
5921 fi
5922 done
5923
5924         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
5925 echo "configure:5926: checking for dmalloc_shutdown in -ldmalloc" >&5
5926 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
5927 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5928   echo $ac_n "(cached) $ac_c" 1>&6
5929 else
5930   ac_save_LIBS="$LIBS"
5931 LIBS="-ldmalloc  $LIBS"
5932 cat > conftest.$ac_ext <<EOF
5933 #line 5934 "configure"
5934 #include "confdefs.h"
5935 /* Override any gcc2 internal prototype to avoid an error.  */
5936 /* We use char because int might match the return type of a gcc2
5937     builtin and then its argument prototype would still apply.  */
5938 char dmalloc_shutdown();
5939
5940 int main() {
5941 dmalloc_shutdown()
5942 ; return 0; }
5943 EOF
5944 if { (eval echo configure:5945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5945   rm -rf conftest*
5946   eval "ac_cv_lib_$ac_lib_var=yes"
5947 else
5948   echo "configure: failed program was:" >&5
5949   cat conftest.$ac_ext >&5
5950   rm -rf conftest*
5951   eval "ac_cv_lib_$ac_lib_var=no"
5952 fi
5953 rm -f conftest*
5954 LIBS="$ac_save_LIBS"
5955
5956 fi
5957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5958   echo "$ac_t""yes" 1>&6
5959     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5960     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5961   cat >> confdefs.h <<EOF
5962 #define $ac_tr_lib 1
5963 EOF
5964
5965   LIBS="-ldmalloc $LIBS"
5966
5967 else
5968   echo "$ac_t""no" 1>&6
5969 fi
5970
5971 fi
5972
5973 # ud needs termcap (should insert check here)
5974 ol_link_termcap=no
5975 for ac_hdr in termcap.h ncurses.h
5976 do
5977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5978 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5979 echo "configure:5980: checking for $ac_hdr" >&5
5980 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5981   echo $ac_n "(cached) $ac_c" 1>&6
5982 else
5983   cat > conftest.$ac_ext <<EOF
5984 #line 5985 "configure"
5985 #include "confdefs.h"
5986 #include <$ac_hdr>
5987 EOF
5988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5989 { (eval echo configure:5990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5990 ac_err=`grep -v '^ *+' conftest.out`
5991 if test -z "$ac_err"; then
5992   rm -rf conftest*
5993   eval "ac_cv_header_$ac_safe=yes"
5994 else
5995   echo "$ac_err" >&5
5996   echo "configure: failed program was:" >&5
5997   cat conftest.$ac_ext >&5
5998   rm -rf conftest*
5999   eval "ac_cv_header_$ac_safe=no"
6000 fi
6001 rm -f conftest*
6002 fi
6003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6004   echo "$ac_t""yes" 1>&6
6005     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6006   cat >> confdefs.h <<EOF
6007 #define $ac_tr_hdr 1
6008 EOF
6009  
6010 else
6011   echo "$ac_t""no" 1>&6
6012 fi
6013 done
6014
6015
6016 if test $ol_link_termcap = no ; then
6017         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
6018 echo "configure:6019: checking for tputs in -ltermcap" >&5
6019 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
6020 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6021   echo $ac_n "(cached) $ac_c" 1>&6
6022 else
6023   ac_save_LIBS="$LIBS"
6024 LIBS="-ltermcap  $LIBS"
6025 cat > conftest.$ac_ext <<EOF
6026 #line 6027 "configure"
6027 #include "confdefs.h"
6028 /* Override any gcc2 internal prototype to avoid an error.  */
6029 /* We use char because int might match the return type of a gcc2
6030     builtin and then its argument prototype would still apply.  */
6031 char tputs();
6032
6033 int main() {
6034 tputs()
6035 ; return 0; }
6036 EOF
6037 if { (eval echo configure:6038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6038   rm -rf conftest*
6039   eval "ac_cv_lib_$ac_lib_var=yes"
6040 else
6041   echo "configure: failed program was:" >&5
6042   cat conftest.$ac_ext >&5
6043   rm -rf conftest*
6044   eval "ac_cv_lib_$ac_lib_var=no"
6045 fi
6046 rm -f conftest*
6047 LIBS="$ac_save_LIBS"
6048
6049 fi
6050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6051   echo "$ac_t""yes" 1>&6
6052   have_termcap=yes
6053 else
6054   echo "$ac_t""no" 1>&6
6055 have_termcap=no
6056 fi
6057
6058         if test $have_termcap = yes ; then
6059                 cat >> confdefs.h <<\EOF
6060 #define HAVE_TERMCAP 1
6061 EOF
6062
6063                 ol_link_termcap=yes
6064                 TERMCAP_LIBS=-ltermcap
6065         fi
6066 fi
6067
6068 if test $ol_link_termcap = no ; then
6069         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
6070 echo "configure:6071: checking for initscr in -lncurses" >&5
6071 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
6072 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6073   echo $ac_n "(cached) $ac_c" 1>&6
6074 else
6075   ac_save_LIBS="$LIBS"
6076 LIBS="-lncurses  $LIBS"
6077 cat > conftest.$ac_ext <<EOF
6078 #line 6079 "configure"
6079 #include "confdefs.h"
6080 /* Override any gcc2 internal prototype to avoid an error.  */
6081 /* We use char because int might match the return type of a gcc2
6082     builtin and then its argument prototype would still apply.  */
6083 char initscr();
6084
6085 int main() {
6086 initscr()
6087 ; return 0; }
6088 EOF
6089 if { (eval echo configure:6090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6090   rm -rf conftest*
6091   eval "ac_cv_lib_$ac_lib_var=yes"
6092 else
6093   echo "configure: failed program was:" >&5
6094   cat conftest.$ac_ext >&5
6095   rm -rf conftest*
6096   eval "ac_cv_lib_$ac_lib_var=no"
6097 fi
6098 rm -f conftest*
6099 LIBS="$ac_save_LIBS"
6100
6101 fi
6102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6103   echo "$ac_t""yes" 1>&6
6104   have_ncurses=yes
6105 else
6106   echo "$ac_t""no" 1>&6
6107 have_ncurses=no
6108 fi
6109
6110         if test $have_ncurses = yes ; then
6111                 cat >> confdefs.h <<\EOF
6112 #define HAVE_NCURSES 1
6113 EOF
6114
6115                 ol_link_termcap=yes
6116                 TERMCAP_LIBS=-lncurses
6117         fi
6118 fi
6119
6120 if test $ol_link_termcap = no ; then
6121         cat >> confdefs.h <<\EOF
6122 #define NO_TERMCAP 1
6123 EOF
6124
6125         TERMCAP_LIBS=
6126 fi
6127
6128 # FreeBSD (and others) have crypt(3) in -lcrypt
6129 if test $ol_enable_crypt != no ; then
6130         echo $ac_n "checking for crypt""... $ac_c" 1>&6
6131 echo "configure:6132: checking for crypt" >&5
6132 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
6133   echo $ac_n "(cached) $ac_c" 1>&6
6134 else
6135   cat > conftest.$ac_ext <<EOF
6136 #line 6137 "configure"
6137 #include "confdefs.h"
6138 /* System header to define __stub macros and hopefully few prototypes,
6139     which can conflict with char crypt(); below.  */
6140 #include <assert.h>
6141 /* Override any gcc2 internal prototype to avoid an error.  */
6142 /* We use char because int might match the return type of a gcc2
6143     builtin and then its argument prototype would still apply.  */
6144 char crypt();
6145
6146 int main() {
6147
6148 /* The GNU C library defines this for functions which it implements
6149     to always fail with ENOSYS.  Some functions are actually named
6150     something starting with __ and the normal name is an alias.  */
6151 #if defined (__stub_crypt) || defined (__stub___crypt)
6152 choke me
6153 #else
6154 crypt();
6155 #endif
6156
6157 ; return 0; }
6158 EOF
6159 if { (eval echo configure:6160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6160   rm -rf conftest*
6161   eval "ac_cv_func_crypt=yes"
6162 else
6163   echo "configure: failed program was:" >&5
6164   cat conftest.$ac_ext >&5
6165   rm -rf conftest*
6166   eval "ac_cv_func_crypt=no"
6167 fi
6168 rm -f conftest*
6169 fi
6170
6171 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
6172   echo "$ac_t""yes" 1>&6
6173   have_crypt=yes
6174 else
6175   echo "$ac_t""no" 1>&6
6176
6177                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
6178 echo "configure:6179: checking for crypt in -lcrypt" >&5
6179 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
6180 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6181   echo $ac_n "(cached) $ac_c" 1>&6
6182 else
6183   ac_save_LIBS="$LIBS"
6184 LIBS="-lcrypt  $LIBS"
6185 cat > conftest.$ac_ext <<EOF
6186 #line 6187 "configure"
6187 #include "confdefs.h"
6188 /* Override any gcc2 internal prototype to avoid an error.  */
6189 /* We use char because int might match the return type of a gcc2
6190     builtin and then its argument prototype would still apply.  */
6191 char crypt();
6192
6193 int main() {
6194 crypt()
6195 ; return 0; }
6196 EOF
6197 if { (eval echo configure:6198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6198   rm -rf conftest*
6199   eval "ac_cv_lib_$ac_lib_var=yes"
6200 else
6201   echo "configure: failed program was:" >&5
6202   cat conftest.$ac_ext >&5
6203   rm -rf conftest*
6204   eval "ac_cv_lib_$ac_lib_var=no"
6205 fi
6206 rm -f conftest*
6207 LIBS="$ac_save_LIBS"
6208
6209 fi
6210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6211   echo "$ac_t""yes" 1>&6
6212   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
6213                         have_crypt=yes
6214 else
6215   echo "$ac_t""no" 1>&6
6216 have_crypt=no
6217 fi
6218
6219 fi
6220
6221
6222         if test $have_crypt = yes ; then
6223                 cat >> confdefs.h <<\EOF
6224 #define HAVE_CRYPT 1
6225 EOF
6226
6227         else
6228                 echo "configure: warning: could not find crypt" 1>&2
6229                 if test $ol_enable_crypt = yes ; then
6230                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
6231                 fi
6232
6233                 echo "configure: warning: disabling crypt support" 1>&2
6234                 ol_enable_crypt=no
6235         fi
6236 fi
6237
6238 # FreeBSD (and others) have setproctitle(3) in -lutil
6239 if test $ol_enable_proctitle != no ; then
6240         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
6241 echo "configure:6242: checking for setproctitle" >&5
6242 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
6243   echo $ac_n "(cached) $ac_c" 1>&6
6244 else
6245   cat > conftest.$ac_ext <<EOF
6246 #line 6247 "configure"
6247 #include "confdefs.h"
6248 /* System header to define __stub macros and hopefully few prototypes,
6249     which can conflict with char setproctitle(); below.  */
6250 #include <assert.h>
6251 /* Override any gcc2 internal prototype to avoid an error.  */
6252 /* We use char because int might match the return type of a gcc2
6253     builtin and then its argument prototype would still apply.  */
6254 char setproctitle();
6255
6256 int main() {
6257
6258 /* The GNU C library defines this for functions which it implements
6259     to always fail with ENOSYS.  Some functions are actually named
6260     something starting with __ and the normal name is an alias.  */
6261 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
6262 choke me
6263 #else
6264 setproctitle();
6265 #endif
6266
6267 ; return 0; }
6268 EOF
6269 if { (eval echo configure:6270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6270   rm -rf conftest*
6271   eval "ac_cv_func_setproctitle=yes"
6272 else
6273   echo "configure: failed program was:" >&5
6274   cat conftest.$ac_ext >&5
6275   rm -rf conftest*
6276   eval "ac_cv_func_setproctitle=no"
6277 fi
6278 rm -f conftest*
6279 fi
6280
6281 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
6282   echo "$ac_t""yes" 1>&6
6283   have_setproctitle=yes
6284 else
6285   echo "$ac_t""no" 1>&6
6286
6287                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
6288 echo "configure:6289: checking for setproctitle in -lutil" >&5
6289 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
6290 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6291   echo $ac_n "(cached) $ac_c" 1>&6
6292 else
6293   ac_save_LIBS="$LIBS"
6294 LIBS="-lutil  $LIBS"
6295 cat > conftest.$ac_ext <<EOF
6296 #line 6297 "configure"
6297 #include "confdefs.h"
6298 /* Override any gcc2 internal prototype to avoid an error.  */
6299 /* We use char because int might match the return type of a gcc2
6300     builtin and then its argument prototype would still apply.  */
6301 char setproctitle();
6302
6303 int main() {
6304 setproctitle()
6305 ; return 0; }
6306 EOF
6307 if { (eval echo configure:6308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6308   rm -rf conftest*
6309   eval "ac_cv_lib_$ac_lib_var=yes"
6310 else
6311   echo "configure: failed program was:" >&5
6312   cat conftest.$ac_ext >&5
6313   rm -rf conftest*
6314   eval "ac_cv_lib_$ac_lib_var=no"
6315 fi
6316 rm -f conftest*
6317 LIBS="$ac_save_LIBS"
6318
6319 fi
6320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6321   echo "$ac_t""yes" 1>&6
6322   have_setproctitle=yes
6323                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
6324 else
6325   echo "$ac_t""no" 1>&6
6326 have_setproctitle=no
6327                         LIBOBJS="$LIBOBJS setproctitle.o"
6328 fi
6329
6330 fi
6331
6332
6333         if test $have_setproctitle = yes ; then
6334                 cat >> confdefs.h <<\EOF
6335 #define HAVE_SETPROCTITLE 1
6336 EOF
6337
6338         fi
6339 fi
6340
6341 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
6342 echo "configure:6343: checking for ANSI C header files" >&5
6343 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
6344   echo $ac_n "(cached) $ac_c" 1>&6
6345 else
6346   cat > conftest.$ac_ext <<EOF
6347 #line 6348 "configure"
6348 #include "confdefs.h"
6349 #include <stdlib.h>
6350 #include <stdarg.h>
6351 #include <string.h>
6352 #include <float.h>
6353 EOF
6354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6355 { (eval echo configure:6356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6356 ac_err=`grep -v '^ *+' conftest.out`
6357 if test -z "$ac_err"; then
6358   rm -rf conftest*
6359   ac_cv_header_stdc=yes
6360 else
6361   echo "$ac_err" >&5
6362   echo "configure: failed program was:" >&5
6363   cat conftest.$ac_ext >&5
6364   rm -rf conftest*
6365   ac_cv_header_stdc=no
6366 fi
6367 rm -f conftest*
6368
6369 if test $ac_cv_header_stdc = yes; then
6370   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6371 cat > conftest.$ac_ext <<EOF
6372 #line 6373 "configure"
6373 #include "confdefs.h"
6374 #include <string.h>
6375 EOF
6376 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6377   egrep "memchr" >/dev/null 2>&1; then
6378   :
6379 else
6380   rm -rf conftest*
6381   ac_cv_header_stdc=no
6382 fi
6383 rm -f conftest*
6384
6385 fi
6386
6387 if test $ac_cv_header_stdc = yes; then
6388   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6389 cat > conftest.$ac_ext <<EOF
6390 #line 6391 "configure"
6391 #include "confdefs.h"
6392 #include <stdlib.h>
6393 EOF
6394 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6395   egrep "free" >/dev/null 2>&1; then
6396   :
6397 else
6398   rm -rf conftest*
6399   ac_cv_header_stdc=no
6400 fi
6401 rm -f conftest*
6402
6403 fi
6404
6405 if test $ac_cv_header_stdc = yes; then
6406   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6407 if test "$cross_compiling" = yes; then
6408   :
6409 else
6410   cat > conftest.$ac_ext <<EOF
6411 #line 6412 "configure"
6412 #include "confdefs.h"
6413 #include <ctype.h>
6414 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6415 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6416 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6417 int main () { int i; for (i = 0; i < 256; i++)
6418 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
6419 exit (0); }
6420
6421 EOF
6422 if { (eval echo configure:6423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6423 then
6424   :
6425 else
6426   echo "configure: failed program was:" >&5
6427   cat conftest.$ac_ext >&5
6428   rm -fr conftest*
6429   ac_cv_header_stdc=no
6430 fi
6431 rm -fr conftest*
6432 fi
6433
6434 fi
6435 fi
6436
6437 echo "$ac_t""$ac_cv_header_stdc" 1>&6
6438 if test $ac_cv_header_stdc = yes; then
6439   cat >> confdefs.h <<\EOF
6440 #define STDC_HEADERS 1
6441 EOF
6442
6443 fi
6444
6445
6446 if test $ac_cv_header_stdc != yes; then
6447         echo "configure: warning: could not Standard C compliant headers" 1>&2
6448 fi
6449
6450 ac_header_dirent=no
6451 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
6452 do
6453 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6454 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
6455 echo "configure:6456: checking for $ac_hdr that defines DIR" >&5
6456 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
6457   echo $ac_n "(cached) $ac_c" 1>&6
6458 else
6459   cat > conftest.$ac_ext <<EOF
6460 #line 6461 "configure"
6461 #include "confdefs.h"
6462 #include <sys/types.h>
6463 #include <$ac_hdr>
6464 int main() {
6465 DIR *dirp = 0;
6466 ; return 0; }
6467 EOF
6468 if { (eval echo configure:6469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6469   rm -rf conftest*
6470   eval "ac_cv_header_dirent_$ac_safe=yes"
6471 else
6472   echo "configure: failed program was:" >&5
6473   cat conftest.$ac_ext >&5
6474   rm -rf conftest*
6475   eval "ac_cv_header_dirent_$ac_safe=no"
6476 fi
6477 rm -f conftest*
6478 fi
6479 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
6480   echo "$ac_t""yes" 1>&6
6481     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6482   cat >> confdefs.h <<EOF
6483 #define $ac_tr_hdr 1
6484 EOF
6485  ac_header_dirent=$ac_hdr; break
6486 else
6487   echo "$ac_t""no" 1>&6
6488 fi
6489 done
6490 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6491 if test $ac_header_dirent = dirent.h; then
6492 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
6493 echo "configure:6494: checking for opendir in -ldir" >&5
6494 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
6495 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6496   echo $ac_n "(cached) $ac_c" 1>&6
6497 else
6498   ac_save_LIBS="$LIBS"
6499 LIBS="-ldir  $LIBS"
6500 cat > conftest.$ac_ext <<EOF
6501 #line 6502 "configure"
6502 #include "confdefs.h"
6503 /* Override any gcc2 internal prototype to avoid an error.  */
6504 /* We use char because int might match the return type of a gcc2
6505     builtin and then its argument prototype would still apply.  */
6506 char opendir();
6507
6508 int main() {
6509 opendir()
6510 ; return 0; }
6511 EOF
6512 if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6513   rm -rf conftest*
6514   eval "ac_cv_lib_$ac_lib_var=yes"
6515 else
6516   echo "configure: failed program was:" >&5
6517   cat conftest.$ac_ext >&5
6518   rm -rf conftest*
6519   eval "ac_cv_lib_$ac_lib_var=no"
6520 fi
6521 rm -f conftest*
6522 LIBS="$ac_save_LIBS"
6523
6524 fi
6525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6526   echo "$ac_t""yes" 1>&6
6527   LIBS="$LIBS -ldir"
6528 else
6529   echo "$ac_t""no" 1>&6
6530 fi
6531
6532 else
6533 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
6534 echo "configure:6535: checking for opendir in -lx" >&5
6535 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
6536 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6537   echo $ac_n "(cached) $ac_c" 1>&6
6538 else
6539   ac_save_LIBS="$LIBS"
6540 LIBS="-lx  $LIBS"
6541 cat > conftest.$ac_ext <<EOF
6542 #line 6543 "configure"
6543 #include "confdefs.h"
6544 /* Override any gcc2 internal prototype to avoid an error.  */
6545 /* We use char because int might match the return type of a gcc2
6546     builtin and then its argument prototype would still apply.  */
6547 char opendir();
6548
6549 int main() {
6550 opendir()
6551 ; return 0; }
6552 EOF
6553 if { (eval echo configure:6554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6554   rm -rf conftest*
6555   eval "ac_cv_lib_$ac_lib_var=yes"
6556 else
6557   echo "configure: failed program was:" >&5
6558   cat conftest.$ac_ext >&5
6559   rm -rf conftest*
6560   eval "ac_cv_lib_$ac_lib_var=no"
6561 fi
6562 rm -f conftest*
6563 LIBS="$ac_save_LIBS"
6564
6565 fi
6566 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6567   echo "$ac_t""yes" 1>&6
6568   LIBS="$LIBS -lx"
6569 else
6570   echo "$ac_t""no" 1>&6
6571 fi
6572
6573 fi
6574
6575 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
6576 echo "configure:6577: checking for sys/wait.h that is POSIX.1 compatible" >&5
6577 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
6578   echo $ac_n "(cached) $ac_c" 1>&6
6579 else
6580   cat > conftest.$ac_ext <<EOF
6581 #line 6582 "configure"
6582 #include "confdefs.h"
6583 #include <sys/types.h>
6584 #include <sys/wait.h>
6585 #ifndef WEXITSTATUS
6586 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6587 #endif
6588 #ifndef WIFEXITED
6589 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6590 #endif
6591 int main() {
6592 int s;
6593 wait (&s);
6594 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6595 ; return 0; }
6596 EOF
6597 if { (eval echo configure:6598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6598   rm -rf conftest*
6599   ac_cv_header_sys_wait_h=yes
6600 else
6601   echo "configure: failed program was:" >&5
6602   cat conftest.$ac_ext >&5
6603   rm -rf conftest*
6604   ac_cv_header_sys_wait_h=no
6605 fi
6606 rm -f conftest*
6607 fi
6608
6609 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
6610 if test $ac_cv_header_sys_wait_h = yes; then
6611   cat >> confdefs.h <<\EOF
6612 #define HAVE_SYS_WAIT_H 1
6613 EOF
6614
6615 fi
6616
6617 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
6618 echo "configure:6619: checking POSIX termios" >&5
6619 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
6620   echo $ac_n "(cached) $ac_c" 1>&6
6621 else
6622   cat > conftest.$ac_ext <<EOF
6623 #line 6624 "configure"
6624 #include "confdefs.h"
6625 #include <sys/types.h>
6626 #include <unistd.h>
6627 #include <termios.h>
6628 int main() {
6629 /* SunOS 4.0.3 has termios.h but not the library calls.  */
6630    tcgetattr(0, 0);
6631 ; return 0; }
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6634   rm -rf conftest*
6635   am_cv_sys_posix_termios=yes
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   am_cv_sys_posix_termios=no
6641 fi
6642 rm -f conftest*
6643 fi
6644
6645 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
6646
6647
6648  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
6649 echo "configure:6650: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
6650 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
6651   echo $ac_n "(cached) $ac_c" 1>&6
6652 else
6653   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
6654
6655   gwinsz_in_termios_h=no
6656   if test $am_cv_sys_posix_termios = yes; then
6657     cat > conftest.$ac_ext <<EOF
6658 #line 6659 "configure"
6659 #include "confdefs.h"
6660 #include <sys/types.h>
6661 #     include <termios.h>
6662 #     ifdef TIOCGWINSZ
6663         yes
6664 #     endif
6665     
6666 EOF
6667 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6668   egrep "yes" >/dev/null 2>&1; then
6669   rm -rf conftest*
6670   gwinsz_in_termios_h=yes
6671 fi
6672 rm -f conftest*
6673
6674   fi
6675
6676   if test $gwinsz_in_termios_h = no; then
6677     cat > conftest.$ac_ext <<EOF
6678 #line 6679 "configure"
6679 #include "confdefs.h"
6680 #include <sys/types.h>
6681 #     include <sys/ioctl.h>
6682 #     ifdef TIOCGWINSZ
6683         yes
6684 #     endif
6685     
6686 EOF
6687 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6688   egrep "yes" >/dev/null 2>&1; then
6689   rm -rf conftest*
6690   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
6691 fi
6692 rm -f conftest*
6693
6694   fi
6695   
6696 fi
6697
6698 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
6699   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
6700     cat >> confdefs.h <<\EOF
6701 #define GWINSZ_IN_SYS_IOCTL 1
6702 EOF
6703
6704   fi
6705
6706 if test $am_cv_sys_posix_termios = yes ; then
6707         cat >> confdefs.h <<\EOF
6708 #define HAVE_POSIX_TERMIOS 1
6709 EOF
6710
6711 fi
6712
6713 for ac_hdr in \
6714         crypt.h                 \
6715         errno.h                 \
6716         fcntl.h                 \
6717         filio.h                 \
6718         getopt.h                \
6719         libutil.h               \
6720         limits.h                \
6721         malloc.h                \
6722         memory.h                \
6723         regex.h                 \
6724         psap.h                  \
6725         pwd.h                   \
6726         sgtty.h                 \
6727         stdarg.h                \
6728         stddef.h                \
6729         string.h                \
6730         strings.h               \
6731         sys/file.h              \
6732         sys/filio.h             \
6733         sys/errno.h             \
6734         sys/ioctl.h             \
6735         sys/param.h             \
6736         sys/resource.h  \
6737         sys/socket.h    \
6738         sys/syslog.h    \
6739         sys/time.h              \
6740         sys/types.h             \
6741         syslog.h                \
6742         termios.h               \
6743         unistd.h                \
6744
6745 do
6746 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6747 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6748 echo "configure:6749: checking for $ac_hdr" >&5
6749 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6750   echo $ac_n "(cached) $ac_c" 1>&6
6751 else
6752   cat > conftest.$ac_ext <<EOF
6753 #line 6754 "configure"
6754 #include "confdefs.h"
6755 #include <$ac_hdr>
6756 EOF
6757 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6758 { (eval echo configure:6759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6759 ac_err=`grep -v '^ *+' conftest.out`
6760 if test -z "$ac_err"; then
6761   rm -rf conftest*
6762   eval "ac_cv_header_$ac_safe=yes"
6763 else
6764   echo "$ac_err" >&5
6765   echo "configure: failed program was:" >&5
6766   cat conftest.$ac_ext >&5
6767   rm -rf conftest*
6768   eval "ac_cv_header_$ac_safe=no"
6769 fi
6770 rm -f conftest*
6771 fi
6772 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6773   echo "$ac_t""yes" 1>&6
6774     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6775   cat >> confdefs.h <<EOF
6776 #define $ac_tr_hdr 1
6777 EOF
6778  
6779 else
6780   echo "$ac_t""no" 1>&6
6781 fi
6782 done
6783
6784
6785 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
6786 echo "configure:6787: checking for uid_t in sys/types.h" >&5
6787 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
6788   echo $ac_n "(cached) $ac_c" 1>&6
6789 else
6790   cat > conftest.$ac_ext <<EOF
6791 #line 6792 "configure"
6792 #include "confdefs.h"
6793 #include <sys/types.h>
6794 EOF
6795 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6796   egrep "uid_t" >/dev/null 2>&1; then
6797   rm -rf conftest*
6798   ac_cv_type_uid_t=yes
6799 else
6800   rm -rf conftest*
6801   ac_cv_type_uid_t=no
6802 fi
6803 rm -f conftest*
6804
6805 fi
6806
6807 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
6808 if test $ac_cv_type_uid_t = no; then
6809   cat >> confdefs.h <<\EOF
6810 #define uid_t int
6811 EOF
6812
6813   cat >> confdefs.h <<\EOF
6814 #define gid_t int
6815 EOF
6816
6817 fi
6818
6819 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
6820 echo "configure:6821: checking type of array argument to getgroups" >&5
6821 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
6822   echo $ac_n "(cached) $ac_c" 1>&6
6823 else
6824   if test "$cross_compiling" = yes; then
6825   ac_cv_type_getgroups=cross
6826 else
6827   cat > conftest.$ac_ext <<EOF
6828 #line 6829 "configure"
6829 #include "confdefs.h"
6830
6831 /* Thanks to Mike Rendell for this test.  */
6832 #include <sys/types.h>
6833 #define NGID 256
6834 #undef MAX
6835 #define MAX(x, y) ((x) > (y) ? (x) : (y))
6836 main()
6837 {
6838   gid_t gidset[NGID];
6839   int i, n;
6840   union { gid_t gval; long lval; }  val;
6841
6842   val.lval = -1;
6843   for (i = 0; i < NGID; i++)
6844     gidset[i] = val.gval;
6845   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
6846                  gidset);
6847   /* Exit non-zero if getgroups seems to require an array of ints.  This
6848      happens when gid_t is short but getgroups modifies an array of ints.  */
6849   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
6850 }
6851
6852 EOF
6853 if { (eval echo configure:6854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6854 then
6855     ac_cv_type_getgroups=gid_t
6856 else
6857   echo "configure: failed program was:" >&5
6858   cat conftest.$ac_ext >&5
6859   rm -fr conftest*
6860   ac_cv_type_getgroups=int
6861 fi
6862 rm -fr conftest*
6863 fi
6864
6865 if test $ac_cv_type_getgroups = cross; then
6866         cat > conftest.$ac_ext <<EOF
6867 #line 6868 "configure"
6868 #include "confdefs.h"
6869 #include <unistd.h>
6870 EOF
6871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6872   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
6873   rm -rf conftest*
6874   ac_cv_type_getgroups=gid_t
6875 else
6876   rm -rf conftest*
6877   ac_cv_type_getgroups=int
6878 fi
6879 rm -f conftest*
6880
6881 fi
6882 fi
6883
6884 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
6885 cat >> confdefs.h <<EOF
6886 #define GETGROUPS_T $ac_cv_type_getgroups
6887 EOF
6888
6889  echo $ac_n "checking for mode_t""... $ac_c" 1>&6
6890 echo "configure:6891: checking for mode_t" >&5
6891 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
6892   echo $ac_n "(cached) $ac_c" 1>&6
6893 else
6894   cat > conftest.$ac_ext <<EOF
6895 #line 6896 "configure"
6896 #include "confdefs.h"
6897 #include <sys/types.h>
6898 #if STDC_HEADERS
6899 #include <stdlib.h>
6900 #include <stddef.h>
6901 #endif
6902 EOF
6903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6904   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6905   rm -rf conftest*
6906   ac_cv_type_mode_t=yes
6907 else
6908   rm -rf conftest*
6909   ac_cv_type_mode_t=no
6910 fi
6911 rm -f conftest*
6912
6913 fi
6914 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
6915 if test $ac_cv_type_mode_t = no; then
6916   cat >> confdefs.h <<\EOF
6917 #define mode_t int
6918 EOF
6919
6920 fi
6921
6922 echo $ac_n "checking for off_t""... $ac_c" 1>&6
6923 echo "configure:6924: checking for off_t" >&5
6924 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6925   echo $ac_n "(cached) $ac_c" 1>&6
6926 else
6927   cat > conftest.$ac_ext <<EOF
6928 #line 6929 "configure"
6929 #include "confdefs.h"
6930 #include <sys/types.h>
6931 #if STDC_HEADERS
6932 #include <stdlib.h>
6933 #include <stddef.h>
6934 #endif
6935 EOF
6936 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6937   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6938   rm -rf conftest*
6939   ac_cv_type_off_t=yes
6940 else
6941   rm -rf conftest*
6942   ac_cv_type_off_t=no
6943 fi
6944 rm -f conftest*
6945
6946 fi
6947 echo "$ac_t""$ac_cv_type_off_t" 1>&6
6948 if test $ac_cv_type_off_t = no; then
6949   cat >> confdefs.h <<\EOF
6950 #define off_t long
6951 EOF
6952
6953 fi
6954
6955 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
6956 echo "configure:6957: checking for pid_t" >&5
6957 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6958   echo $ac_n "(cached) $ac_c" 1>&6
6959 else
6960   cat > conftest.$ac_ext <<EOF
6961 #line 6962 "configure"
6962 #include "confdefs.h"
6963 #include <sys/types.h>
6964 #if STDC_HEADERS
6965 #include <stdlib.h>
6966 #include <stddef.h>
6967 #endif
6968 EOF
6969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6970   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6971   rm -rf conftest*
6972   ac_cv_type_pid_t=yes
6973 else
6974   rm -rf conftest*
6975   ac_cv_type_pid_t=no
6976 fi
6977 rm -f conftest*
6978
6979 fi
6980 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6981 if test $ac_cv_type_pid_t = no; then
6982   cat >> confdefs.h <<\EOF
6983 #define pid_t int
6984 EOF
6985
6986 fi
6987
6988 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
6989 echo "configure:6990: checking for ptrdiff_t" >&5
6990 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
6991   echo $ac_n "(cached) $ac_c" 1>&6
6992 else
6993   cat > conftest.$ac_ext <<EOF
6994 #line 6995 "configure"
6995 #include "confdefs.h"
6996 #include <stddef.h>
6997 int main() {
6998 ptrdiff_t p
6999 ; return 0; }
7000 EOF
7001 if { (eval echo configure:7002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7002   rm -rf conftest*
7003   am_cv_type_ptrdiff_t=yes
7004 else
7005   echo "configure: failed program was:" >&5
7006   cat conftest.$ac_ext >&5
7007   rm -rf conftest*
7008   am_cv_type_ptrdiff_t=no
7009 fi
7010 rm -f conftest*
7011 fi
7012
7013 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
7014    if test $am_cv_type_ptrdiff_t = yes; then
7015      cat >> confdefs.h <<\EOF
7016 #define HAVE_PTRDIFF_T 1
7017 EOF
7018
7019    fi
7020
7021 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
7022 echo "configure:7023: checking return type of signal handlers" >&5
7023 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
7024   echo $ac_n "(cached) $ac_c" 1>&6
7025 else
7026   cat > conftest.$ac_ext <<EOF
7027 #line 7028 "configure"
7028 #include "confdefs.h"
7029 #include <sys/types.h>
7030 #include <signal.h>
7031 #ifdef signal
7032 #undef signal
7033 #endif
7034 #ifdef __cplusplus
7035 extern "C" void (*signal (int, void (*)(int)))(int);
7036 #else
7037 void (*signal ()) ();
7038 #endif
7039
7040 int main() {
7041 int i;
7042 ; return 0; }
7043 EOF
7044 if { (eval echo configure:7045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7045   rm -rf conftest*
7046   ac_cv_type_signal=void
7047 else
7048   echo "configure: failed program was:" >&5
7049   cat conftest.$ac_ext >&5
7050   rm -rf conftest*
7051   ac_cv_type_signal=int
7052 fi
7053 rm -f conftest*
7054 fi
7055
7056 echo "$ac_t""$ac_cv_type_signal" 1>&6
7057 cat >> confdefs.h <<EOF
7058 #define RETSIGTYPE $ac_cv_type_signal
7059 EOF
7060
7061
7062 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
7063 echo "configure:7064: checking for sig_atomic_t" >&5
7064 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
7065   echo $ac_n "(cached) $ac_c" 1>&6
7066 else
7067   cat > conftest.$ac_ext <<EOF
7068 #line 7069 "configure"
7069 #include "confdefs.h"
7070 #include <signal.h>
7071 int main() {
7072 sig_atomic_t atomic;
7073 ; return 0; }
7074 EOF
7075 if { (eval echo configure:7076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7076   rm -rf conftest*
7077   ol_cv_type_sig_atomic_t=yes
7078 else
7079   echo "configure: failed program was:" >&5
7080   cat conftest.$ac_ext >&5
7081   rm -rf conftest*
7082   ol_cv_type_sig_atomic_t=no
7083 fi
7084 rm -f conftest*
7085 fi
7086
7087 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
7088   if test $ol_cv_type_sig_atomic_t = no; then
7089     cat >> confdefs.h <<\EOF
7090 #define sig_atomic_t int
7091 EOF
7092
7093   fi
7094  
7095 echo $ac_n "checking for size_t""... $ac_c" 1>&6
7096 echo "configure:7097: checking for size_t" >&5
7097 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
7098   echo $ac_n "(cached) $ac_c" 1>&6
7099 else
7100   cat > conftest.$ac_ext <<EOF
7101 #line 7102 "configure"
7102 #include "confdefs.h"
7103 #include <sys/types.h>
7104 #if STDC_HEADERS
7105 #include <stdlib.h>
7106 #include <stddef.h>
7107 #endif
7108 EOF
7109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7110   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7111   rm -rf conftest*
7112   ac_cv_type_size_t=yes
7113 else
7114   rm -rf conftest*
7115   ac_cv_type_size_t=no
7116 fi
7117 rm -f conftest*
7118
7119 fi
7120 echo "$ac_t""$ac_cv_type_size_t" 1>&6
7121 if test $ac_cv_type_size_t = no; then
7122   cat >> confdefs.h <<\EOF
7123 #define size_t unsigned
7124 EOF
7125
7126 fi
7127
7128 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
7129 echo "configure:7130: checking for st_blksize in struct stat" >&5
7130 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
7131   echo $ac_n "(cached) $ac_c" 1>&6
7132 else
7133   cat > conftest.$ac_ext <<EOF
7134 #line 7135 "configure"
7135 #include "confdefs.h"
7136 #include <sys/types.h>
7137 #include <sys/stat.h>
7138 int main() {
7139 struct stat s; s.st_blksize;
7140 ; return 0; }
7141 EOF
7142 if { (eval echo configure:7143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7143   rm -rf conftest*
7144   ac_cv_struct_st_blksize=yes
7145 else
7146   echo "configure: failed program was:" >&5
7147   cat conftest.$ac_ext >&5
7148   rm -rf conftest*
7149   ac_cv_struct_st_blksize=no
7150 fi
7151 rm -f conftest*
7152 fi
7153
7154 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
7155 if test $ac_cv_struct_st_blksize = yes; then
7156   cat >> confdefs.h <<\EOF
7157 #define HAVE_ST_BLKSIZE 1
7158 EOF
7159
7160 fi
7161
7162 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
7163 echo "configure:7164: checking whether time.h and sys/time.h may both be included" >&5
7164 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
7165   echo $ac_n "(cached) $ac_c" 1>&6
7166 else
7167   cat > conftest.$ac_ext <<EOF
7168 #line 7169 "configure"
7169 #include "confdefs.h"
7170 #include <sys/types.h>
7171 #include <sys/time.h>
7172 #include <time.h>
7173 int main() {
7174 struct tm *tp;
7175 ; return 0; }
7176 EOF
7177 if { (eval echo configure:7178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7178   rm -rf conftest*
7179   ac_cv_header_time=yes
7180 else
7181   echo "configure: failed program was:" >&5
7182   cat conftest.$ac_ext >&5
7183   rm -rf conftest*
7184   ac_cv_header_time=no
7185 fi
7186 rm -f conftest*
7187 fi
7188
7189 echo "$ac_t""$ac_cv_header_time" 1>&6
7190 if test $ac_cv_header_time = yes; then
7191   cat >> confdefs.h <<\EOF
7192 #define TIME_WITH_SYS_TIME 1
7193 EOF
7194
7195 fi
7196
7197 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
7198 echo "configure:7199: checking whether struct tm is in sys/time.h or time.h" >&5
7199 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
7200   echo $ac_n "(cached) $ac_c" 1>&6
7201 else
7202   cat > conftest.$ac_ext <<EOF
7203 #line 7204 "configure"
7204 #include "confdefs.h"
7205 #include <sys/types.h>
7206 #include <time.h>
7207 int main() {
7208 struct tm *tp; tp->tm_sec;
7209 ; return 0; }
7210 EOF
7211 if { (eval echo configure:7212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7212   rm -rf conftest*
7213   ac_cv_struct_tm=time.h
7214 else
7215   echo "configure: failed program was:" >&5
7216   cat conftest.$ac_ext >&5
7217   rm -rf conftest*
7218   ac_cv_struct_tm=sys/time.h
7219 fi
7220 rm -f conftest*
7221 fi
7222
7223 echo "$ac_t""$ac_cv_struct_tm" 1>&6
7224 if test $ac_cv_struct_tm = sys/time.h; then
7225   cat >> confdefs.h <<\EOF
7226 #define TM_IN_SYS_TIME 1
7227 EOF
7228
7229 fi
7230
7231
7232
7233 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
7234 echo "configure:7235: checking if toupper() requires islower()" >&5
7235 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
7236   echo $ac_n "(cached) $ac_c" 1>&6
7237 else
7238   
7239         if test "$cross_compiling" = yes; then
7240   ol_cv_c_upper_lower=safe
7241 else
7242   cat > conftest.$ac_ext <<EOF
7243 #line 7244 "configure"
7244 #include "confdefs.h"
7245
7246 #include <ctype.h>
7247 main()
7248 {
7249         if ('C' == toupper('C'))
7250                 exit(0);
7251         else
7252                 exit(1);
7253 }
7254 EOF
7255 if { (eval echo configure:7256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7256 then
7257   ol_cv_c_upper_lower=no
7258 else
7259   echo "configure: failed program was:" >&5
7260   cat conftest.$ac_ext >&5
7261   rm -fr conftest*
7262   ol_cv_c_upper_lower=yes
7263 fi
7264 rm -fr conftest*
7265 fi
7266
7267 fi
7268
7269 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
7270 if test $ol_cv_c_upper_lower != no ; then
7271         cat >> confdefs.h <<\EOF
7272 #define C_UPPER_LOWER 1
7273 EOF
7274
7275 fi
7276
7277 echo $ac_n "checking for working const""... $ac_c" 1>&6
7278 echo "configure:7279: checking for working const" >&5
7279 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
7280   echo $ac_n "(cached) $ac_c" 1>&6
7281 else
7282   cat > conftest.$ac_ext <<EOF
7283 #line 7284 "configure"
7284 #include "confdefs.h"
7285
7286 int main() {
7287
7288 /* Ultrix mips cc rejects this.  */
7289 typedef int charset[2]; const charset x;
7290 /* SunOS 4.1.1 cc rejects this.  */
7291 char const *const *ccp;
7292 char **p;
7293 /* NEC SVR4.0.2 mips cc rejects this.  */
7294 struct point {int x, y;};
7295 static struct point const zero = {0,0};
7296 /* AIX XL C 1.02.0.0 rejects this.
7297    It does not let you subtract one const X* pointer from another in an arm
7298    of an if-expression whose if-part is not a constant expression */
7299 const char *g = "string";
7300 ccp = &g + (g ? g-g : 0);
7301 /* HPUX 7.0 cc rejects these. */
7302 ++ccp;
7303 p = (char**) ccp;
7304 ccp = (char const *const *) p;
7305 { /* SCO 3.2v4 cc rejects this.  */
7306   char *t;
7307   char const *s = 0 ? (char *) 0 : (char const *) 0;
7308
7309   *t++ = 0;
7310 }
7311 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7312   int x[] = {25, 17};
7313   const int *foo = &x[0];
7314   ++foo;
7315 }
7316 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7317   typedef const int *iptr;
7318   iptr p = 0;
7319   ++p;
7320 }
7321 { /* AIX XL C 1.02.0.0 rejects this saying
7322      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7323   struct s { int j; const int *ap[3]; };
7324   struct s *b; b->j = 5;
7325 }
7326 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7327   const int foo = 10;
7328 }
7329
7330 ; return 0; }
7331 EOF
7332 if { (eval echo configure:7333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7333   rm -rf conftest*
7334   ac_cv_c_const=yes
7335 else
7336   echo "configure: failed program was:" >&5
7337   cat conftest.$ac_ext >&5
7338   rm -rf conftest*
7339   ac_cv_c_const=no
7340 fi
7341 rm -f conftest*
7342 fi
7343
7344 echo "$ac_t""$ac_cv_c_const" 1>&6
7345 if test $ac_cv_c_const = no; then
7346   cat >> confdefs.h <<\EOF
7347 #define const 
7348 EOF
7349
7350 fi
7351
7352 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
7353 echo "configure:7354: checking if compiler understands volatile" >&5
7354 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
7355   echo $ac_n "(cached) $ac_c" 1>&6
7356 else
7357   cat > conftest.$ac_ext <<EOF
7358 #line 7359 "configure"
7359 #include "confdefs.h"
7360 int x, y, z;
7361 int main() {
7362 volatile int a; int * volatile b = x ? &y : &z;
7363       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
7364       *b = 0;
7365 ; return 0; }
7366 EOF
7367 if { (eval echo configure:7368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7368   rm -rf conftest*
7369   ol_cv_c_volatile=yes
7370 else
7371   echo "configure: failed program was:" >&5
7372   cat conftest.$ac_ext >&5
7373   rm -rf conftest*
7374   ol_cv_c_volatile=no
7375 fi
7376 rm -f conftest*
7377 fi
7378
7379 echo "$ac_t""$ol_cv_c_volatile" 1>&6
7380   if test $ol_cv_c_volatile = yes; then
7381     : 
7382   else
7383     cat >> confdefs.h <<\EOF
7384 #define volatile 
7385 EOF
7386
7387   fi
7388  
7389
7390 if test $cross_compiling = yes ; then
7391         cat >> confdefs.h <<\EOF
7392 #define CROSS_COMPILING 1
7393 EOF
7394
7395 else
7396         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
7397 echo "configure:7398: checking whether byte ordering is bigendian" >&5
7398 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
7399   echo $ac_n "(cached) $ac_c" 1>&6
7400 else
7401   ac_cv_c_bigendian=unknown
7402 # See if sys/param.h defines the BYTE_ORDER macro.
7403 cat > conftest.$ac_ext <<EOF
7404 #line 7405 "configure"
7405 #include "confdefs.h"
7406 #include <sys/types.h>
7407 #include <sys/param.h>
7408 int main() {
7409
7410 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7411  bogus endian macros
7412 #endif
7413 ; return 0; }
7414 EOF
7415 if { (eval echo configure:7416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7416   rm -rf conftest*
7417   # It does; now see whether it defined to BIG_ENDIAN or not.
7418 cat > conftest.$ac_ext <<EOF
7419 #line 7420 "configure"
7420 #include "confdefs.h"
7421 #include <sys/types.h>
7422 #include <sys/param.h>
7423 int main() {
7424
7425 #if BYTE_ORDER != BIG_ENDIAN
7426  not big endian
7427 #endif
7428 ; return 0; }
7429 EOF
7430 if { (eval echo configure:7431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7431   rm -rf conftest*
7432   ac_cv_c_bigendian=yes
7433 else
7434   echo "configure: failed program was:" >&5
7435   cat conftest.$ac_ext >&5
7436   rm -rf conftest*
7437   ac_cv_c_bigendian=no
7438 fi
7439 rm -f conftest*
7440 else
7441   echo "configure: failed program was:" >&5
7442   cat conftest.$ac_ext >&5
7443 fi
7444 rm -f conftest*
7445 if test $ac_cv_c_bigendian = unknown; then
7446 if test "$cross_compiling" = yes; then
7447     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
7448 else
7449   cat > conftest.$ac_ext <<EOF
7450 #line 7451 "configure"
7451 #include "confdefs.h"
7452 main () {
7453   /* Are we little or big endian?  From Harbison&Steele.  */
7454   union
7455   {
7456     long l;
7457     char c[sizeof (long)];
7458   } u;
7459   u.l = 1;
7460   exit (u.c[sizeof (long) - 1] == 1);
7461 }
7462 EOF
7463 if { (eval echo configure:7464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7464 then
7465   ac_cv_c_bigendian=no
7466 else
7467   echo "configure: failed program was:" >&5
7468   cat conftest.$ac_ext >&5
7469   rm -fr conftest*
7470   ac_cv_c_bigendian=yes
7471 fi
7472 rm -fr conftest*
7473 fi
7474
7475 fi
7476 fi
7477
7478 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
7479 if test $ac_cv_c_bigendian = yes; then
7480   cat >> confdefs.h <<\EOF
7481 #define WORDS_BIGENDIAN 1
7482 EOF
7483
7484 fi
7485
7486         echo $ac_n "checking size of short""... $ac_c" 1>&6
7487 echo "configure:7488: checking size of short" >&5
7488 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
7489   echo $ac_n "(cached) $ac_c" 1>&6
7490 else
7491   if test "$cross_compiling" = yes; then
7492     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
7493 else
7494   cat > conftest.$ac_ext <<EOF
7495 #line 7496 "configure"
7496 #include "confdefs.h"
7497 #include <stdio.h>
7498 main()
7499 {
7500   FILE *f=fopen("conftestval", "w");
7501   if (!f) exit(1);
7502   fprintf(f, "%d\n", sizeof(short));
7503   exit(0);
7504 }
7505 EOF
7506 if { (eval echo configure:7507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7507 then
7508   ac_cv_sizeof_short=`cat conftestval`
7509 else
7510   echo "configure: failed program was:" >&5
7511   cat conftest.$ac_ext >&5
7512   rm -fr conftest*
7513   ac_cv_sizeof_short=0
7514 fi
7515 rm -fr conftest*
7516 fi
7517
7518 fi
7519 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
7520 cat >> confdefs.h <<EOF
7521 #define SIZEOF_SHORT $ac_cv_sizeof_short
7522 EOF
7523
7524  
7525         echo $ac_n "checking size of int""... $ac_c" 1>&6
7526 echo "configure:7527: checking size of int" >&5
7527 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
7528   echo $ac_n "(cached) $ac_c" 1>&6
7529 else
7530   if test "$cross_compiling" = yes; then
7531     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
7532 else
7533   cat > conftest.$ac_ext <<EOF
7534 #line 7535 "configure"
7535 #include "confdefs.h"
7536 #include <stdio.h>
7537 main()
7538 {
7539   FILE *f=fopen("conftestval", "w");
7540   if (!f) exit(1);
7541   fprintf(f, "%d\n", sizeof(int));
7542   exit(0);
7543 }
7544 EOF
7545 if { (eval echo configure:7546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7546 then
7547   ac_cv_sizeof_int=`cat conftestval`
7548 else
7549   echo "configure: failed program was:" >&5
7550   cat conftest.$ac_ext >&5
7551   rm -fr conftest*
7552   ac_cv_sizeof_int=0
7553 fi
7554 rm -fr conftest*
7555 fi
7556
7557 fi
7558 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
7559 cat >> confdefs.h <<EOF
7560 #define SIZEOF_INT $ac_cv_sizeof_int
7561 EOF
7562
7563  
7564         echo $ac_n "checking size of long""... $ac_c" 1>&6
7565 echo "configure:7566: checking size of long" >&5
7566 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
7567   echo $ac_n "(cached) $ac_c" 1>&6
7568 else
7569   if test "$cross_compiling" = yes; then
7570     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
7571 else
7572   cat > conftest.$ac_ext <<EOF
7573 #line 7574 "configure"
7574 #include "confdefs.h"
7575 #include <stdio.h>
7576 main()
7577 {
7578   FILE *f=fopen("conftestval", "w");
7579   if (!f) exit(1);
7580   fprintf(f, "%d\n", sizeof(long));
7581   exit(0);
7582 }
7583 EOF
7584 if { (eval echo configure:7585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7585 then
7586   ac_cv_sizeof_long=`cat conftestval`
7587 else
7588   echo "configure: failed program was:" >&5
7589   cat conftest.$ac_ext >&5
7590   rm -fr conftest*
7591   ac_cv_sizeof_long=0
7592 fi
7593 rm -fr conftest*
7594 fi
7595
7596 fi
7597 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
7598 cat >> confdefs.h <<EOF
7599 #define SIZEOF_LONG $ac_cv_sizeof_long
7600 EOF
7601
7602
7603 fi
7604
7605 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
7606 echo "configure:7607: checking for 8-bit clean memcmp" >&5
7607 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
7608   echo $ac_n "(cached) $ac_c" 1>&6
7609 else
7610   if test "$cross_compiling" = yes; then
7611   ac_cv_func_memcmp_clean=no
7612 else
7613   cat > conftest.$ac_ext <<EOF
7614 #line 7615 "configure"
7615 #include "confdefs.h"
7616
7617 main()
7618 {
7619   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
7620   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
7621 }
7622
7623 EOF
7624 if { (eval echo configure:7625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7625 then
7626   ac_cv_func_memcmp_clean=yes
7627 else
7628   echo "configure: failed program was:" >&5
7629   cat conftest.$ac_ext >&5
7630   rm -fr conftest*
7631   ac_cv_func_memcmp_clean=no
7632 fi
7633 rm -fr conftest*
7634 fi
7635
7636 fi
7637
7638 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
7639 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
7640
7641 echo $ac_n "checking for strftime""... $ac_c" 1>&6
7642 echo "configure:7643: checking for strftime" >&5
7643 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
7644   echo $ac_n "(cached) $ac_c" 1>&6
7645 else
7646   cat > conftest.$ac_ext <<EOF
7647 #line 7648 "configure"
7648 #include "confdefs.h"
7649 /* System header to define __stub macros and hopefully few prototypes,
7650     which can conflict with char strftime(); below.  */
7651 #include <assert.h>
7652 /* Override any gcc2 internal prototype to avoid an error.  */
7653 /* We use char because int might match the return type of a gcc2
7654     builtin and then its argument prototype would still apply.  */
7655 char strftime();
7656
7657 int main() {
7658
7659 /* The GNU C library defines this for functions which it implements
7660     to always fail with ENOSYS.  Some functions are actually named
7661     something starting with __ and the normal name is an alias.  */
7662 #if defined (__stub_strftime) || defined (__stub___strftime)
7663 choke me
7664 #else
7665 strftime();
7666 #endif
7667
7668 ; return 0; }
7669 EOF
7670 if { (eval echo configure:7671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7671   rm -rf conftest*
7672   eval "ac_cv_func_strftime=yes"
7673 else
7674   echo "configure: failed program was:" >&5
7675   cat conftest.$ac_ext >&5
7676   rm -rf conftest*
7677   eval "ac_cv_func_strftime=no"
7678 fi
7679 rm -f conftest*
7680 fi
7681
7682 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
7683   echo "$ac_t""yes" 1>&6
7684   cat >> confdefs.h <<\EOF
7685 #define HAVE_STRFTIME 1
7686 EOF
7687
7688 else
7689   echo "$ac_t""no" 1>&6
7690 # strftime is in -lintl on SCO UNIX.
7691 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
7692 echo "configure:7693: checking for strftime in -lintl" >&5
7693 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
7694 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7695   echo $ac_n "(cached) $ac_c" 1>&6
7696 else
7697   ac_save_LIBS="$LIBS"
7698 LIBS="-lintl  $LIBS"
7699 cat > conftest.$ac_ext <<EOF
7700 #line 7701 "configure"
7701 #include "confdefs.h"
7702 /* Override any gcc2 internal prototype to avoid an error.  */
7703 /* We use char because int might match the return type of a gcc2
7704     builtin and then its argument prototype would still apply.  */
7705 char strftime();
7706
7707 int main() {
7708 strftime()
7709 ; return 0; }
7710 EOF
7711 if { (eval echo configure:7712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7712   rm -rf conftest*
7713   eval "ac_cv_lib_$ac_lib_var=yes"
7714 else
7715   echo "configure: failed program was:" >&5
7716   cat conftest.$ac_ext >&5
7717   rm -rf conftest*
7718   eval "ac_cv_lib_$ac_lib_var=no"
7719 fi
7720 rm -f conftest*
7721 LIBS="$ac_save_LIBS"
7722
7723 fi
7724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7725   echo "$ac_t""yes" 1>&6
7726   cat >> confdefs.h <<\EOF
7727 #define HAVE_STRFTIME 1
7728 EOF
7729
7730 LIBS="-lintl $LIBS"
7731 else
7732   echo "$ac_t""no" 1>&6
7733 fi
7734
7735 fi
7736
7737 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
7738 echo "configure:7739: checking for vprintf" >&5
7739 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
7740   echo $ac_n "(cached) $ac_c" 1>&6
7741 else
7742   cat > conftest.$ac_ext <<EOF
7743 #line 7744 "configure"
7744 #include "confdefs.h"
7745 /* System header to define __stub macros and hopefully few prototypes,
7746     which can conflict with char vprintf(); below.  */
7747 #include <assert.h>
7748 /* Override any gcc2 internal prototype to avoid an error.  */
7749 /* We use char because int might match the return type of a gcc2
7750     builtin and then its argument prototype would still apply.  */
7751 char vprintf();
7752
7753 int main() {
7754
7755 /* The GNU C library defines this for functions which it implements
7756     to always fail with ENOSYS.  Some functions are actually named
7757     something starting with __ and the normal name is an alias.  */
7758 #if defined (__stub_vprintf) || defined (__stub___vprintf)
7759 choke me
7760 #else
7761 vprintf();
7762 #endif
7763
7764 ; return 0; }
7765 EOF
7766 if { (eval echo configure:7767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7767   rm -rf conftest*
7768   eval "ac_cv_func_vprintf=yes"
7769 else
7770   echo "configure: failed program was:" >&5
7771   cat conftest.$ac_ext >&5
7772   rm -rf conftest*
7773   eval "ac_cv_func_vprintf=no"
7774 fi
7775 rm -f conftest*
7776 fi
7777
7778 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
7779   echo "$ac_t""yes" 1>&6
7780   cat >> confdefs.h <<\EOF
7781 #define HAVE_VPRINTF 1
7782 EOF
7783
7784 else
7785   echo "$ac_t""no" 1>&6
7786 fi
7787
7788 if test "$ac_cv_func_vprintf" != yes; then
7789 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
7790 echo "configure:7791: checking for _doprnt" >&5
7791 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
7792   echo $ac_n "(cached) $ac_c" 1>&6
7793 else
7794   cat > conftest.$ac_ext <<EOF
7795 #line 7796 "configure"
7796 #include "confdefs.h"
7797 /* System header to define __stub macros and hopefully few prototypes,
7798     which can conflict with char _doprnt(); below.  */
7799 #include <assert.h>
7800 /* Override any gcc2 internal prototype to avoid an error.  */
7801 /* We use char because int might match the return type of a gcc2
7802     builtin and then its argument prototype would still apply.  */
7803 char _doprnt();
7804
7805 int main() {
7806
7807 /* The GNU C library defines this for functions which it implements
7808     to always fail with ENOSYS.  Some functions are actually named
7809     something starting with __ and the normal name is an alias.  */
7810 #if defined (__stub__doprnt) || defined (__stub____doprnt)
7811 choke me
7812 #else
7813 _doprnt();
7814 #endif
7815
7816 ; return 0; }
7817 EOF
7818 if { (eval echo configure:7819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7819   rm -rf conftest*
7820   eval "ac_cv_func__doprnt=yes"
7821 else
7822   echo "configure: failed program was:" >&5
7823   cat conftest.$ac_ext >&5
7824   rm -rf conftest*
7825   eval "ac_cv_func__doprnt=no"
7826 fi
7827 rm -f conftest*
7828 fi
7829
7830 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
7831   echo "$ac_t""yes" 1>&6
7832   cat >> confdefs.h <<\EOF
7833 #define HAVE_DOPRNT 1
7834 EOF
7835
7836 else
7837   echo "$ac_t""no" 1>&6
7838 fi
7839
7840 fi
7841
7842
7843 if test $ac_cv_func_vprintf = yes ; then
7844                 for ac_func in vsnprintf
7845 do
7846 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7847 echo "configure:7848: checking for $ac_func" >&5
7848 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7849   echo $ac_n "(cached) $ac_c" 1>&6
7850 else
7851   cat > conftest.$ac_ext <<EOF
7852 #line 7853 "configure"
7853 #include "confdefs.h"
7854 /* System header to define __stub macros and hopefully few prototypes,
7855     which can conflict with char $ac_func(); below.  */
7856 #include <assert.h>
7857 /* Override any gcc2 internal prototype to avoid an error.  */
7858 /* We use char because int might match the return type of a gcc2
7859     builtin and then its argument prototype would still apply.  */
7860 char $ac_func();
7861
7862 int main() {
7863
7864 /* The GNU C library defines this for functions which it implements
7865     to always fail with ENOSYS.  Some functions are actually named
7866     something starting with __ and the normal name is an alias.  */
7867 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7868 choke me
7869 #else
7870 $ac_func();
7871 #endif
7872
7873 ; return 0; }
7874 EOF
7875 if { (eval echo configure:7876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7876   rm -rf conftest*
7877   eval "ac_cv_func_$ac_func=yes"
7878 else
7879   echo "configure: failed program was:" >&5
7880   cat conftest.$ac_ext >&5
7881   rm -rf conftest*
7882   eval "ac_cv_func_$ac_func=no"
7883 fi
7884 rm -f conftest*
7885 fi
7886
7887 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7888   echo "$ac_t""yes" 1>&6
7889     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7890   cat >> confdefs.h <<EOF
7891 #define $ac_tr_func 1
7892 EOF
7893  
7894 else
7895   echo "$ac_t""no" 1>&6
7896 fi
7897 done
7898
7899 fi
7900
7901 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
7902 echo "configure:7903: checking for wait3 that fills in rusage" >&5
7903 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
7904   echo $ac_n "(cached) $ac_c" 1>&6
7905 else
7906   if test "$cross_compiling" = yes; then
7907   ac_cv_func_wait3_rusage=no
7908 else
7909   cat > conftest.$ac_ext <<EOF
7910 #line 7911 "configure"
7911 #include "confdefs.h"
7912 #include <sys/types.h>
7913 #include <sys/time.h>
7914 #include <sys/resource.h>
7915 #include <stdio.h>
7916 /* HP-UX has wait3 but does not fill in rusage at all.  */
7917 main() {
7918   struct rusage r;
7919   int i;
7920   /* Use a field that we can force nonzero --
7921      voluntary context switches.
7922      For systems like NeXT and OSF/1 that don't set it,
7923      also use the system CPU time.  And page faults (I/O) for Linux.  */
7924   r.ru_nvcsw = 0;
7925   r.ru_stime.tv_sec = 0;
7926   r.ru_stime.tv_usec = 0;
7927   r.ru_majflt = r.ru_minflt = 0;
7928   switch (fork()) {
7929   case 0: /* Child.  */
7930     sleep(1); /* Give up the CPU.  */
7931     _exit(0);
7932   case -1: _exit(0); /* What can we do?  */
7933   default: /* Parent.  */
7934     wait3(&i, 0, &r);
7935     sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
7936     exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
7937          && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
7938   }
7939 }
7940 EOF
7941 if { (eval echo configure:7942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
7942 then
7943   ac_cv_func_wait3_rusage=yes
7944 else
7945   echo "configure: failed program was:" >&5
7946   cat conftest.$ac_ext >&5
7947   rm -fr conftest*
7948   ac_cv_func_wait3_rusage=no
7949 fi
7950 rm -fr conftest*
7951 fi
7952
7953 fi
7954
7955 echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
7956 if test $ac_cv_func_wait3_rusage = yes; then
7957   cat >> confdefs.h <<\EOF
7958 #define HAVE_WAIT3 1
7959 EOF
7960
7961 fi
7962
7963
7964 for ac_func in \
7965         bcopy                   \
7966         flock                   \
7967         getdtablesize   \
7968         gethostname             \
7969         getpwuid                \
7970         gettimeofday    \
7971         lockf                   \
7972         memcpy                  \
7973         memmove                 \
7974         mkstemp                 \
7975         res_search              \
7976         select                  \
7977         setpwfile               \
7978         setsid                  \
7979         signal                  \
7980         sigset                  \
7981         snprintf                \
7982         socket                  \
7983         strerror                \
7984         strpbrk                 \
7985         strrchr                 \
7986         strsep                  \
7987         strstr                  \
7988         strtok                  \
7989         strtol                  \
7990         strtoul                 \
7991         sysconf                 \
7992         waitpid                 \
7993
7994 do
7995 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7996 echo "configure:7997: checking for $ac_func" >&5
7997 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7998   echo $ac_n "(cached) $ac_c" 1>&6
7999 else
8000   cat > conftest.$ac_ext <<EOF
8001 #line 8002 "configure"
8002 #include "confdefs.h"
8003 /* System header to define __stub macros and hopefully few prototypes,
8004     which can conflict with char $ac_func(); below.  */
8005 #include <assert.h>
8006 /* Override any gcc2 internal prototype to avoid an error.  */
8007 /* We use char because int might match the return type of a gcc2
8008     builtin and then its argument prototype would still apply.  */
8009 char $ac_func();
8010
8011 int main() {
8012
8013 /* The GNU C library defines this for functions which it implements
8014     to always fail with ENOSYS.  Some functions are actually named
8015     something starting with __ and the normal name is an alias.  */
8016 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8017 choke me
8018 #else
8019 $ac_func();
8020 #endif
8021
8022 ; return 0; }
8023 EOF
8024 if { (eval echo configure:8025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8025   rm -rf conftest*
8026   eval "ac_cv_func_$ac_func=yes"
8027 else
8028   echo "configure: failed program was:" >&5
8029   cat conftest.$ac_ext >&5
8030   rm -rf conftest*
8031   eval "ac_cv_func_$ac_func=no"
8032 fi
8033 rm -f conftest*
8034 fi
8035
8036 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8037   echo "$ac_t""yes" 1>&6
8038     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8039   cat >> confdefs.h <<EOF
8040 #define $ac_tr_func 1
8041 EOF
8042  
8043 else
8044   echo "$ac_t""no" 1>&6
8045 fi
8046 done
8047
8048
8049 # these functions are required to build a thread_safe -lldap
8050 for ac_func in \
8051         strtok_r                \
8052         ctime_r                 \
8053         gethostbyaddr_r \
8054         gethostbyname_r \
8055
8056 do
8057 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8058 echo "configure:8059: checking for $ac_func" >&5
8059 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8060   echo $ac_n "(cached) $ac_c" 1>&6
8061 else
8062   cat > conftest.$ac_ext <<EOF
8063 #line 8064 "configure"
8064 #include "confdefs.h"
8065 /* System header to define __stub macros and hopefully few prototypes,
8066     which can conflict with char $ac_func(); below.  */
8067 #include <assert.h>
8068 /* Override any gcc2 internal prototype to avoid an error.  */
8069 /* We use char because int might match the return type of a gcc2
8070     builtin and then its argument prototype would still apply.  */
8071 char $ac_func();
8072
8073 int main() {
8074
8075 /* The GNU C library defines this for functions which it implements
8076     to always fail with ENOSYS.  Some functions are actually named
8077     something starting with __ and the normal name is an alias.  */
8078 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8079 choke me
8080 #else
8081 $ac_func();
8082 #endif
8083
8084 ; return 0; }
8085 EOF
8086 if { (eval echo configure:8087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8087   rm -rf conftest*
8088   eval "ac_cv_func_$ac_func=yes"
8089 else
8090   echo "configure: failed program was:" >&5
8091   cat conftest.$ac_ext >&5
8092   rm -rf conftest*
8093   eval "ac_cv_func_$ac_func=no"
8094 fi
8095 rm -f conftest*
8096 fi
8097
8098 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8099   echo "$ac_t""yes" 1>&6
8100     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8101   cat >> confdefs.h <<EOF
8102 #define $ac_tr_func 1
8103 EOF
8104  
8105 else
8106   echo "$ac_t""no" 1>&6
8107 fi
8108 done
8109
8110
8111 if test $ac_cv_func_strtok_r = yes \
8112         -a $ac_cv_func_ctime_r = yes \
8113         -a $ac_cv_func_gethostbyaddr_r = yes \
8114         -a $ac_cv_func_gethostbyname_r = yes \
8115         ; then
8116
8117         cat >> confdefs.h <<\EOF
8118 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
8119 EOF
8120
8121 fi
8122
8123 if test $ol_link_threads != no ; then
8124         cat >> confdefs.h <<\EOF
8125 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8126 EOF
8127
8128 fi
8129
8130 for ac_func in getopt strdup tempnam
8131 do
8132 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8133 echo "configure:8134: checking for $ac_func" >&5
8134 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8135   echo $ac_n "(cached) $ac_c" 1>&6
8136 else
8137   cat > conftest.$ac_ext <<EOF
8138 #line 8139 "configure"
8139 #include "confdefs.h"
8140 /* System header to define __stub macros and hopefully few prototypes,
8141     which can conflict with char $ac_func(); below.  */
8142 #include <assert.h>
8143 /* Override any gcc2 internal prototype to avoid an error.  */
8144 /* We use char because int might match the return type of a gcc2
8145     builtin and then its argument prototype would still apply.  */
8146 char $ac_func();
8147
8148 int main() {
8149
8150 /* The GNU C library defines this for functions which it implements
8151     to always fail with ENOSYS.  Some functions are actually named
8152     something starting with __ and the normal name is an alias.  */
8153 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8154 choke me
8155 #else
8156 $ac_func();
8157 #endif
8158
8159 ; return 0; }
8160 EOF
8161 if { (eval echo configure:8162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8162   rm -rf conftest*
8163   eval "ac_cv_func_$ac_func=yes"
8164 else
8165   echo "configure: failed program was:" >&5
8166   cat conftest.$ac_ext >&5
8167   rm -rf conftest*
8168   eval "ac_cv_func_$ac_func=no"
8169 fi
8170 rm -f conftest*
8171 fi
8172
8173 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8174   echo "$ac_t""yes" 1>&6
8175     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8176   cat >> confdefs.h <<EOF
8177 #define $ac_tr_func 1
8178 EOF
8179  
8180 else
8181   echo "$ac_t""no" 1>&6
8182 LIBOBJS="$LIBOBJS ${ac_func}.o"
8183 fi
8184 done
8185
8186
8187
8188 # Check Configuration
8189
8190 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
8191 echo "configure:8192: checking declaration of sys_errlist" >&5
8192 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
8193   echo $ac_n "(cached) $ac_c" 1>&6
8194 else
8195   
8196         cat > conftest.$ac_ext <<EOF
8197 #line 8198 "configure"
8198 #include "confdefs.h"
8199
8200 #include <stdio.h>
8201 #include <sys/types.h>
8202 #include <errno.h> 
8203 int main() {
8204 char *c = (char *) *sys_errlist
8205 ; return 0; }
8206 EOF
8207 if { (eval echo configure:8208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8208   rm -rf conftest*
8209   ol_cv_dcl_sys_errlist=yes
8210 else
8211   echo "configure: failed program was:" >&5
8212   cat conftest.$ac_ext >&5
8213   rm -rf conftest*
8214   ol_cv_dcl_sys_errlist=no
8215 fi
8216 rm -f conftest*
8217 fi
8218
8219 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
8220
8221 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
8222 if test $ol_cv_dcl_sys_errlist = no ; then
8223         cat >> confdefs.h <<\EOF
8224 #define DECL_SYS_ERRLIST 1
8225 EOF
8226
8227         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
8228 echo "configure:8229: checking existence of sys_errlist" >&5
8229         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
8230   echo $ac_n "(cached) $ac_c" 1>&6
8231 else
8232   
8233                 cat > conftest.$ac_ext <<EOF
8234 #line 8235 "configure"
8235 #include "confdefs.h"
8236 #include <errno.h>
8237 int main() {
8238 char *c = (char *) *sys_errlist
8239 ; return 0; }
8240 EOF
8241 if { (eval echo configure:8242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8242   rm -rf conftest*
8243   ol_cv_have_sys_errlist=yes
8244 else
8245   echo "configure: failed program was:" >&5
8246   cat conftest.$ac_ext >&5
8247   rm -rf conftest*
8248   ol_cv_have_sys_errlist=no
8249 fi
8250 rm -f conftest*
8251 fi
8252
8253         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
8254 fi
8255
8256
8257
8258 if test $ol_enable_debug != no ; then
8259         cat >> confdefs.h <<\EOF
8260 #define LDAP_DEBUG 1
8261 EOF
8262
8263 fi
8264 if test $ol_enable_libui = yes ; then
8265         cat >> confdefs.h <<\EOF
8266 #define LDAP_LIBUI 1
8267 EOF
8268
8269 fi
8270 if test $ol_enable_cache = no ; then
8271         cat >> confdefs.h <<\EOF
8272 #define LDAP_NOCACHE 1
8273 EOF
8274
8275 fi
8276 if test $ol_enable_dns != no ; then
8277         cat >> confdefs.h <<\EOF
8278 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS 1
8279 EOF
8280
8281 fi
8282 if test $ol_enable_proctitle != no ; then
8283         cat >> confdefs.h <<\EOF
8284 #define LDAP_PROCTITLE 1
8285 EOF
8286
8287 fi
8288 if test $ol_enable_referrals != no ; then
8289         cat >> confdefs.h <<\EOF
8290 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS 1
8291 EOF
8292
8293 fi
8294 if test $ol_enable_cldap != no ; then
8295         cat >> confdefs.h <<\EOF
8296 #define LDAP_CONNECTIONLESS 1
8297 EOF
8298
8299 fi
8300
8301 if test $ol_enable_aclgroups != no ; then
8302         cat >> confdefs.h <<\EOF
8303 #define SLAPD_ACLGROUPS 1
8304 EOF
8305
8306 fi
8307 if test $ol_enable_crypt != no ; then
8308         cat >> confdefs.h <<\EOF
8309 #define SLAPD_CRYPT 1
8310 EOF
8311
8312 fi
8313 if test $ol_enable_cleartext != no ; then
8314         cat >> confdefs.h <<\EOF
8315 #define SLAPD_CLEARTEXT 1
8316 EOF
8317
8318 fi
8319 if test $ol_enable_phonetic != no ; then
8320         cat >> confdefs.h <<\EOF
8321 #define SLAPD_PHONETIC 1
8322 EOF
8323
8324 fi
8325 if test $ol_enable_rlookups != no ; then
8326         cat >> confdefs.h <<\EOF
8327 #define SLAPD_RLOOKUPS 1
8328 EOF
8329
8330 fi
8331
8332 if test $ol_link_ldbm != no ; then
8333         cat >> confdefs.h <<\EOF
8334 #define SLAPD_LDBM 1
8335 EOF
8336
8337         BUILD_SLAPD=yes
8338         BUILD_LDBM=yes
8339 fi
8340
8341 if test $ol_enable_passwd != no ; then
8342         cat >> confdefs.h <<\EOF
8343 #define SLAPD_PASSWD 1
8344 EOF
8345
8346         BUILD_SLAPD=yes
8347         BUILD_PASSWD=yes
8348 fi
8349
8350 if test $ol_enable_shell != no ; then
8351         cat >> confdefs.h <<\EOF
8352 #define SLAPD_SHELL 1
8353 EOF
8354
8355         BUILD_SLAPD=yes
8356         BUILD_SHELL=yes
8357 fi
8358
8359 if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \
8360         $BUILD_SLAPD = yes ; then
8361         BUILD_SLURPD=yes
8362 fi
8363
8364 if test $ol_link_isode != no ; then
8365         BUILD_LDAPD=yes
8366 fi
8367
8368
8369
8370
8371   
8372   
8373   
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389 trap '' 1 2 15
8390 cat > confcache <<\EOF
8391 # This file is a shell script that caches the results of configure
8392 # tests run on this system so they can be shared between configure
8393 # scripts and configure runs.  It is not useful on other systems.
8394 # If it contains results you don't want to keep, you may remove or edit it.
8395 #
8396 # By default, configure uses ./config.cache as the cache file,
8397 # creating it if it does not exist already.  You can give configure
8398 # the --cache-file=FILE option to use a different cache file; that is
8399 # what configure does when it calls configure scripts in
8400 # subdirectories, so they share the cache.
8401 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8402 # config.status only pays attention to the cache file if you give it the
8403 # --recheck option to rerun configure.
8404 #
8405 EOF
8406 # The following way of writing the cache mishandles newlines in values,
8407 # but we know of no workaround that is simple, portable, and efficient.
8408 # So, don't put newlines in cache variables' values.
8409 # Ultrix sh set writes to stderr and can't be redirected directly,
8410 # and sets the high bit in the cache file unless we assign to the vars.
8411 (set) 2>&1 |
8412   case `(ac_space=' '; set) 2>&1` in
8413   *ac_space=\ *)
8414     # `set' does not quote correctly, so add quotes (double-quote substitution
8415     # turns \\\\ into \\, and sed turns \\ into \).
8416     sed -n \
8417       -e "s/'/'\\\\''/g" \
8418       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8419     ;;
8420   *)
8421     # `set' quotes correctly as required by POSIX, so do not add quotes.
8422     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8423     ;;
8424   esac >> confcache
8425 if cmp -s $cache_file confcache; then
8426   :
8427 else
8428   if test -w $cache_file; then
8429     echo "updating cache $cache_file"
8430     cat confcache > $cache_file
8431   else
8432     echo "not updating unwritable cache $cache_file"
8433   fi
8434 fi
8435 rm -f confcache
8436
8437 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8438
8439 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8440 # Let make expand exec_prefix.
8441 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8442
8443 # Any assignment to VPATH causes Sun make to only execute
8444 # the first set of double-colon rules, so remove it if not needed.
8445 # If there is a colon in the path, we need to keep it.
8446 if test "x$srcdir" = x.; then
8447   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
8448 fi
8449
8450 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8451
8452 DEFS=-DHAVE_CONFIG_H
8453
8454 # Without the "./", some shells look in PATH for config.status.
8455 : ${CONFIG_STATUS=./config.status}
8456
8457 echo creating $CONFIG_STATUS
8458 rm -f $CONFIG_STATUS
8459 cat > $CONFIG_STATUS <<EOF
8460 #! /bin/sh
8461 # Generated automatically by configure.
8462 # Run this file to recreate the current configuration.
8463 # This directory was configured as follows,
8464 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8465 #
8466 # $0 $ac_configure_args
8467 #
8468 # Compiler output produced by configure, useful for debugging
8469 # configure, is in ./config.log if it exists.
8470
8471 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8472 for ac_option
8473 do
8474   case "\$ac_option" in
8475   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8476     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8477     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8478   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8479     echo "$CONFIG_STATUS generated by autoconf version 2.12"
8480     exit 0 ;;
8481   -help | --help | --hel | --he | --h)
8482     echo "\$ac_cs_usage"; exit 0 ;;
8483   *) echo "\$ac_cs_usage"; exit 1 ;;
8484   esac
8485 done
8486
8487 ac_given_srcdir=$srcdir
8488 ac_given_INSTALL="$INSTALL"
8489
8490 trap 'rm -fr `echo "\
8491 Makefile:build/top.mk:Makefile.in:build/dir.mk \
8492 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
8493 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
8494 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
8495 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
8496 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
8497 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
8498 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
8499 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
8500 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
8501 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
8502 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
8503 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
8504 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
8505 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
8506 include/Makefile:build/top.mk:include/Makefile.in \
8507 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
8508 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
8509 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
8510 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
8511 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
8512 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
8513 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
8514 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk:build/lib-static.mk    \
8515 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
8516 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
8517 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
8518 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
8519 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
8520 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
8521 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
8522 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
8523 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
8524 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
8525 tests/Makefile:build/top.mk:tests/Makefile.in \
8526  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8527 EOF
8528 cat >> $CONFIG_STATUS <<EOF
8529
8530 # Protect against being on the right side of a sed subst in config.status.
8531 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8532  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8533 $ac_vpsub
8534 $extrasub
8535 s%@CFLAGS@%$CFLAGS%g
8536 s%@CPPFLAGS@%$CPPFLAGS%g
8537 s%@CXXFLAGS@%$CXXFLAGS%g
8538 s%@DEFS@%$DEFS%g
8539 s%@LDFLAGS@%$LDFLAGS%g
8540 s%@LIBS@%$LIBS%g
8541 s%@exec_prefix@%$exec_prefix%g
8542 s%@prefix@%$prefix%g
8543 s%@program_transform_name@%$program_transform_name%g
8544 s%@bindir@%$bindir%g
8545 s%@sbindir@%$sbindir%g
8546 s%@libexecdir@%$libexecdir%g
8547 s%@datadir@%$datadir%g
8548 s%@sysconfdir@%$sysconfdir%g
8549 s%@sharedstatedir@%$sharedstatedir%g
8550 s%@localstatedir@%$localstatedir%g
8551 s%@libdir@%$libdir%g
8552 s%@includedir@%$includedir%g
8553 s%@oldincludedir@%$oldincludedir%g
8554 s%@infodir@%$infodir%g
8555 s%@mandir@%$mandir%g
8556 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8557 s%@INSTALL_DATA@%$INSTALL_DATA%g
8558 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8559 s%@PACKAGE@%$PACKAGE%g
8560 s%@VERSION@%$VERSION%g
8561 s%@ACLOCAL@%$ACLOCAL%g
8562 s%@AUTOCONF@%$AUTOCONF%g
8563 s%@AUTOMAKE@%$AUTOMAKE%g
8564 s%@AUTOHEADER@%$AUTOHEADER%g
8565 s%@MAKEINFO@%$MAKEINFO%g
8566 s%@SET_MAKE@%$SET_MAKE%g
8567 s%@top_builddir@%$top_builddir%g
8568 s%@ldap_subdir@%$ldap_subdir%g
8569 s%@host@%$host%g
8570 s%@host_alias@%$host_alias%g
8571 s%@host_cpu@%$host_cpu%g
8572 s%@host_vendor@%$host_vendor%g
8573 s%@host_os@%$host_os%g
8574 s%@RANLIB@%$RANLIB%g
8575 s%@CC@%$CC%g
8576 s%@LD@%$LD%g
8577 s%@NM@%$NM%g
8578 s%@LN_S@%$LN_S%g
8579 s%@LIBTOOL@%$LIBTOOL%g
8580 s%@SENDMAIL@%$SENDMAIL%g
8581 s%@EDITOR@%$EDITOR%g
8582 s%@FINGER@%$FINGER%g
8583 s%@CPP@%$CPP%g
8584 s%@PEPSY@%$PEPSY%g
8585 s%@LIBOBJS@%$LIBOBJS%g
8586 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
8587 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
8588 s%@BUILD_LDBM@%$BUILD_LDBM%g
8589 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
8590 s%@BUILD_SHELL@%$BUILD_SHELL%g
8591 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
8592 s%@LDAP_LIBS@%$LDAP_LIBS%g
8593 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
8594 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
8595 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
8596 s%@LDBM_LIBS@%$LDBM_LIBS%g
8597 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
8598 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
8599 s%@KRB_LIBS@%$KRB_LIBS%g
8600 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
8601
8602 CEOF
8603 EOF
8604
8605 cat >> $CONFIG_STATUS <<\EOF
8606
8607 # Split the substitutions into bite-sized pieces for seds with
8608 # small command number limits, like on Digital OSF/1 and HP-UX.
8609 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8610 ac_file=1 # Number of current file.
8611 ac_beg=1 # First line for current file.
8612 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8613 ac_more_lines=:
8614 ac_sed_cmds=""
8615 while $ac_more_lines; do
8616   if test $ac_beg -gt 1; then
8617     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8618   else
8619     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8620   fi
8621   if test ! -s conftest.s$ac_file; then
8622     ac_more_lines=false
8623     rm -f conftest.s$ac_file
8624   else
8625     if test -z "$ac_sed_cmds"; then
8626       ac_sed_cmds="sed -f conftest.s$ac_file"
8627     else
8628       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8629     fi
8630     ac_file=`expr $ac_file + 1`
8631     ac_beg=$ac_end
8632     ac_end=`expr $ac_end + $ac_max_sed_cmds`
8633   fi
8634 done
8635 if test -z "$ac_sed_cmds"; then
8636   ac_sed_cmds=cat
8637 fi
8638 EOF
8639
8640 cat >> $CONFIG_STATUS <<EOF
8641
8642 CONFIG_FILES=\${CONFIG_FILES-"\
8643 Makefile:build/top.mk:Makefile.in:build/dir.mk \
8644 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
8645 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
8646 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
8647 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
8648 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
8649 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
8650 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
8651 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
8652 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
8653 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
8654 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
8655 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
8656 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
8657 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
8658 include/Makefile:build/top.mk:include/Makefile.in \
8659 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
8660 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
8661 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
8662 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
8663 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
8664 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
8665 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
8666 libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk:build/lib-static.mk    \
8667 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
8668 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
8669 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
8670 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
8671 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
8672 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
8673 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
8674 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
8675 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
8676 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
8677 tests/Makefile:build/top.mk:tests/Makefile.in \
8678 "}
8679 EOF
8680 cat >> $CONFIG_STATUS <<\EOF
8681 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8682   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8683   case "$ac_file" in
8684   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8685        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8686   *) ac_file_in="${ac_file}.in" ;;
8687   esac
8688
8689   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8690
8691   # Remove last slash and all that follows it.  Not all systems have dirname.
8692   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8693   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8694     # The file is in a subdirectory.
8695     test ! -d "$ac_dir" && mkdir "$ac_dir"
8696     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8697     # A "../" for each directory in $ac_dir_suffix.
8698     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8699   else
8700     ac_dir_suffix= ac_dots=
8701   fi
8702
8703   case "$ac_given_srcdir" in
8704   .)  srcdir=.
8705       if test -z "$ac_dots"; then top_srcdir=.
8706       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8707   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8708   *) # Relative path.
8709     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8710     top_srcdir="$ac_dots$ac_given_srcdir" ;;
8711   esac
8712
8713   case "$ac_given_INSTALL" in
8714   [/$]*) INSTALL="$ac_given_INSTALL" ;;
8715   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8716   esac
8717
8718   echo creating "$ac_file"
8719   rm -f "$ac_file"
8720   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8721   case "$ac_file" in
8722   *Makefile*) ac_comsub="1i\\
8723 # $configure_input" ;;
8724   *) ac_comsub= ;;
8725   esac
8726
8727   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8728   sed -e "$ac_comsub
8729 s%@configure_input@%$configure_input%g
8730 s%@srcdir@%$srcdir%g
8731 s%@top_srcdir@%$top_srcdir%g
8732 s%@INSTALL@%$INSTALL%g
8733 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8734 fi; done
8735 rm -f conftest.s*
8736
8737 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8738 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8739 #
8740 # ac_d sets the value in "#define NAME VALUE" lines.
8741 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
8742 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
8743 ac_dC='\3'
8744 ac_dD='%g'
8745 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8746 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8747 ac_uB='\([      ]\)%\1#\2define\3'
8748 ac_uC=' '
8749 ac_uD='\4%g'
8750 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8751 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8752 ac_eB='$%\1#\2define\3'
8753 ac_eC=' '
8754 ac_eD='%g'
8755
8756 if test "${CONFIG_HEADERS+set}" != set; then
8757 EOF
8758 cat >> $CONFIG_STATUS <<EOF
8759   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
8760 EOF
8761 cat >> $CONFIG_STATUS <<\EOF
8762 fi
8763 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8764   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8765   case "$ac_file" in
8766   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8767        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8768   *) ac_file_in="${ac_file}.in" ;;
8769   esac
8770
8771   echo creating $ac_file
8772
8773   rm -f conftest.frag conftest.in conftest.out
8774   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8775   cat $ac_file_inputs > conftest.in
8776
8777 EOF
8778
8779 # Transform confdefs.h into a sed script conftest.vals that substitutes
8780 # the proper values into config.h.in to produce config.h.  And first:
8781 # Protect against being on the right side of a sed subst in config.status.
8782 # Protect against being in an unquoted here document in config.status.
8783 rm -f conftest.vals
8784 cat > conftest.hdr <<\EOF
8785 s/[\\&%]/\\&/g
8786 s%[\\$`]%\\&%g
8787 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8788 s%ac_d%ac_u%gp
8789 s%ac_u%ac_e%gp
8790 EOF
8791 sed -n -f conftest.hdr confdefs.h > conftest.vals
8792 rm -f conftest.hdr
8793
8794 # This sed command replaces #undef with comments.  This is necessary, for
8795 # example, in the case of _POSIX_SOURCE, which is predefined and required
8796 # on some systems where configure will not decide to define it.
8797 cat >> conftest.vals <<\EOF
8798 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8799 EOF
8800
8801 # Break up conftest.vals because some shells have a limit on
8802 # the size of here documents, and old seds have small limits too.
8803
8804 rm -f conftest.tail
8805 while :
8806 do
8807   ac_lines=`grep -c . conftest.vals`
8808   # grep -c gives empty output for an empty file on some AIX systems.
8809   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8810   # Write a limited-size here document to conftest.frag.
8811   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8812   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8813   echo 'CEOF
8814   sed -f conftest.frag conftest.in > conftest.out
8815   rm -f conftest.in
8816   mv conftest.out conftest.in
8817 ' >> $CONFIG_STATUS
8818   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8819   rm -f conftest.vals
8820   mv conftest.tail conftest.vals
8821 done
8822 rm -f conftest.vals
8823
8824 cat >> $CONFIG_STATUS <<\EOF
8825   rm -f conftest.frag conftest.h
8826   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
8827   cat conftest.in >> conftest.h
8828   rm -f conftest.in
8829   if cmp -s $ac_file conftest.h 2>/dev/null; then
8830     echo "$ac_file is unchanged"
8831     rm -f conftest.h
8832   else
8833     # Remove last slash and all that follows it.  Not all systems have dirname.
8834       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8835       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8836       # The file is in a subdirectory.
8837       test ! -d "$ac_dir" && mkdir "$ac_dir"
8838     fi
8839     rm -f $ac_file
8840     mv conftest.h $ac_file
8841   fi
8842 fi; done
8843
8844 EOF
8845 cat >> $CONFIG_STATUS <<EOF
8846
8847 EOF
8848 cat >> $CONFIG_STATUS <<\EOF
8849
8850 date > stamp-h
8851 echo Please \"make depend\" to build dependencies
8852
8853 exit 0
8854 EOF
8855 chmod +x $CONFIG_STATUS
8856 rm -fr confdefs* $ac_clean_files
8857 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8858