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