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