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