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