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