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