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