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