]> git.sur5r.net Git - openldap/blob - configure
a3374f3767802f1f7c2ca52b33d683c3de215404
[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 # Extract the first word of "sendmail", so it can be a program name with args.
2130 set dummy sendmail; ac_word=$2
2131 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2132 echo "configure:2133: checking for $ac_word" >&5
2133 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2134   echo $ac_n "(cached) $ac_c" 1>&6
2135 else
2136   case "$SENDMAIL" in
2137   /*)
2138   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2139   ;;
2140   ?:/*)                  
2141   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2142   ;;
2143   *)
2144   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2145   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2146   for ac_dir in $ac_dummy; do 
2147     test -z "$ac_dir" && ac_dir=.
2148     if test -f $ac_dir/$ac_word; then
2149       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2150       break
2151     fi
2152   done
2153   IFS="$ac_save_ifs"
2154   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2155   ;;
2156 esac
2157 fi
2158 SENDMAIL="$ac_cv_path_SENDMAIL"
2159 if test -n "$SENDMAIL"; then
2160   echo "$ac_t""$SENDMAIL" 1>&6
2161 else
2162   echo "$ac_t""no" 1>&6
2163 fi
2164
2165 # Extract the first word of "vi", so it can be a program name with args.
2166 set dummy vi; ac_word=$2
2167 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2168 echo "configure:2169: checking for $ac_word" >&5
2169 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2170   echo $ac_n "(cached) $ac_c" 1>&6
2171 else
2172   case "$EDITOR" in
2173   /*)
2174   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2175   ;;
2176   ?:/*)                  
2177   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2178   ;;
2179   *)
2180   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2181   ac_dummy="$PATH:/usr/ucb"
2182   for ac_dir in $ac_dummy; do 
2183     test -z "$ac_dir" && ac_dir=.
2184     if test -f $ac_dir/$ac_word; then
2185       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2186       break
2187     fi
2188   done
2189   IFS="$ac_save_ifs"
2190   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2191   ;;
2192 esac
2193 fi
2194 EDITOR="$ac_cv_path_EDITOR"
2195 if test -n "$EDITOR"; then
2196   echo "$ac_t""$EDITOR" 1>&6
2197 else
2198   echo "$ac_t""no" 1>&6
2199 fi
2200
2201 # Extract the first word of "finger", so it can be a program name with args.
2202 set dummy finger; ac_word=$2
2203 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2204 echo "configure:2205: checking for $ac_word" >&5
2205 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2206   echo $ac_n "(cached) $ac_c" 1>&6
2207 else
2208   case "$FINGER" in
2209   /*)
2210   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2211   ;;
2212   ?:/*)                  
2213   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2214   ;;
2215   *)
2216   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2217   ac_dummy="$PATH:/usr/ucb"
2218   for ac_dir in $ac_dummy; do 
2219     test -z "$ac_dir" && ac_dir=.
2220     if test -f $ac_dir/$ac_word; then
2221       ac_cv_path_FINGER="$ac_dir/$ac_word"
2222       break
2223     fi
2224   done
2225   IFS="$ac_save_ifs"
2226   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2227   ;;
2228 esac
2229 fi
2230 FINGER="$ac_cv_path_FINGER"
2231 if test -n "$FINGER"; then
2232   echo "$ac_t""$FINGER" 1>&6
2233 else
2234   echo "$ac_t""no" 1>&6
2235 fi
2236
2237
2238 if test $ol_enable_perl = yes ; then
2239         # Extract the first word of "perl", so it can be a program name with args.
2240 set dummy perl; ac_word=$2
2241 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2242 echo "configure:2243: checking for $ac_word" >&5
2243 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2244   echo $ac_n "(cached) $ac_c" 1>&6
2245 else
2246   case "$PERLBIN" in
2247   /*)
2248   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2249   ;;
2250   ?:/*)                  
2251   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2252   ;;
2253   *)
2254   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2255   ac_dummy="$PATH"
2256   for ac_dir in $ac_dummy; do 
2257     test -z "$ac_dir" && ac_dir=.
2258     if test -f $ac_dir/$ac_word; then
2259       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2260       break
2261     fi
2262   done
2263   IFS="$ac_save_ifs"
2264   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2265   ;;
2266 esac
2267 fi
2268 PERLBIN="$ac_cv_path_PERLBIN"
2269 if test -n "$PERLBIN"; then
2270   echo "$ac_t""$PERLBIN" 1>&6
2271 else
2272   echo "$ac_t""no" 1>&6
2273 fi
2274
2275
2276         if test "no$PERLBIN" = "no" ; then
2277                 ol_enable_perl=no
2278         fi
2279
2280         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2281         SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e perl_inc`"
2282 fi
2283
2284
2285 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2286         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2287
2288 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2289         echo "configure: warning: programs compiled here do run here..." 1>&2
2290         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2291
2292 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2293         echo "configure: warning: programs compiled here do not run here..." 1>&2
2294         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2295 fi
2296
2297 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2298 echo "configure:2299: checking how to run the C preprocessor" >&5
2299 # On Suns, sometimes $CPP names a directory.
2300 if test -n "$CPP" && test -d "$CPP"; then
2301   CPP=
2302 fi
2303 if test -z "$CPP"; then
2304 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2305   echo $ac_n "(cached) $ac_c" 1>&6
2306 else
2307     # This must be in double quotes, not single quotes, because CPP may get
2308   # substituted into the Makefile and "${CC-cc}" will confuse make.
2309   CPP="${CC-cc} -E"
2310   # On the NeXT, cc -E runs the code through the compiler's parser,
2311   # not just through cpp.
2312   cat > conftest.$ac_ext <<EOF
2313 #line 2314 "configure"
2314 #include "confdefs.h"
2315 #include <assert.h>
2316 Syntax Error
2317 EOF
2318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2319 { (eval echo configure:2320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2321 if test -z "$ac_err"; then
2322   :
2323 else
2324   echo "$ac_err" >&5
2325   echo "configure: failed program was:" >&5
2326   cat conftest.$ac_ext >&5
2327   rm -rf conftest*
2328   CPP="${CC-cc} -E -traditional-cpp"
2329   cat > conftest.$ac_ext <<EOF
2330 #line 2331 "configure"
2331 #include "confdefs.h"
2332 #include <assert.h>
2333 Syntax Error
2334 EOF
2335 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2336 { (eval echo configure:2337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2337 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2338 if test -z "$ac_err"; then
2339   :
2340 else
2341   echo "$ac_err" >&5
2342   echo "configure: failed program was:" >&5
2343   cat conftest.$ac_ext >&5
2344   rm -rf conftest*
2345   CPP="${CC-cc} -nologo -E"
2346   cat > conftest.$ac_ext <<EOF
2347 #line 2348 "configure"
2348 #include "confdefs.h"
2349 #include <assert.h>
2350 Syntax Error
2351 EOF
2352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2353 { (eval echo configure:2354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2355 if test -z "$ac_err"; then
2356   :
2357 else
2358   echo "$ac_err" >&5
2359   echo "configure: failed program was:" >&5
2360   cat conftest.$ac_ext >&5
2361   rm -rf conftest*
2362   CPP=/lib/cpp
2363 fi
2364 rm -f conftest*
2365 fi
2366 rm -f conftest*
2367 fi
2368 rm -f conftest*
2369   ac_cv_prog_CPP="$CPP"
2370 fi
2371   CPP="$ac_cv_prog_CPP"
2372 else
2373   ac_cv_prog_CPP="$CPP"
2374 fi
2375 echo "$ac_t""$CPP" 1>&6
2376
2377
2378 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2379 echo "configure:2380: checking for AIX" >&5
2380 cat > conftest.$ac_ext <<EOF
2381 #line 2382 "configure"
2382 #include "confdefs.h"
2383 #ifdef _AIX
2384   yes
2385 #endif
2386
2387 EOF
2388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2389   egrep "yes" >/dev/null 2>&1; then
2390   rm -rf conftest*
2391   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2392 #define _ALL_SOURCE 1
2393 EOF
2394
2395 else
2396   rm -rf conftest*
2397   echo "$ac_t""no" 1>&6
2398 fi
2399 rm -f conftest*
2400
2401
2402 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2403 echo "configure:2404: checking for POSIXized ISC" >&5
2404 if test -d /etc/conf/kconfig.d &&
2405   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2406 then
2407   echo "$ac_t""yes" 1>&6
2408   ISC=yes # If later tests want to check for ISC.
2409   cat >> confdefs.h <<\EOF
2410 #define _POSIX_SOURCE 1
2411 EOF
2412
2413   if test "$GCC" = yes; then
2414     CC="$CC -posix"
2415   else
2416     CC="$CC -Xp"
2417   fi
2418 else
2419   echo "$ac_t""no" 1>&6
2420   ISC=
2421 fi
2422
2423 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2424 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2425 echo "configure:2426: checking for minix/config.h" >&5
2426 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2427   echo $ac_n "(cached) $ac_c" 1>&6
2428 else
2429   cat > conftest.$ac_ext <<EOF
2430 #line 2431 "configure"
2431 #include "confdefs.h"
2432 #include <minix/config.h>
2433 EOF
2434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2435 { (eval echo configure:2436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2437 if test -z "$ac_err"; then
2438   rm -rf conftest*
2439   eval "ac_cv_header_$ac_safe=yes"
2440 else
2441   echo "$ac_err" >&5
2442   echo "configure: failed program was:" >&5
2443   cat conftest.$ac_ext >&5
2444   rm -rf conftest*
2445   eval "ac_cv_header_$ac_safe=no"
2446 fi
2447 rm -f conftest*
2448 fi
2449 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2450   echo "$ac_t""yes" 1>&6
2451   MINIX=yes
2452 else
2453   echo "$ac_t""no" 1>&6
2454 MINIX=
2455 fi
2456
2457 if test "$MINIX" = yes; then
2458   cat >> confdefs.h <<\EOF
2459 #define _POSIX_SOURCE 1
2460 EOF
2461
2462   cat >> confdefs.h <<\EOF
2463 #define _POSIX_1_SOURCE 2
2464 EOF
2465
2466   cat >> confdefs.h <<\EOF
2467 #define _MINIX 1
2468 EOF
2469
2470 fi
2471
2472
2473
2474
2475
2476 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2477 echo "configure:2478: checking for ${CC-cc} option to accept ANSI C" >&5
2478 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
2479   echo $ac_n "(cached) $ac_c" 1>&6
2480 else
2481   am_cv_prog_cc_stdc=no
2482 ac_save_CC="$CC"
2483 # Don't try gcc -ansi; that turns off useful extensions and
2484 # breaks some systems' header files.
2485 # AIX                   -qlanglvl=ansi
2486 # Ultrix and OSF/1      -std1
2487 # HP-UX                 -Aa -D_HPUX_SOURCE
2488 # SVR4                  -Xc -D__EXTENSIONS__
2489 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2490 do
2491   CC="$ac_save_CC $ac_arg"
2492   cat > conftest.$ac_ext <<EOF
2493 #line 2494 "configure"
2494 #include "confdefs.h"
2495 #include <stdarg.h>
2496 #include <stdio.h>
2497 #include <sys/types.h>
2498 #include <sys/stat.h>
2499 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2500 struct buf { int x; };
2501 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2502 static char *e (p, i)
2503      char **p;
2504      int i;
2505 {
2506   return p[i];
2507 }
2508 static char *f (char * (*g) (char **, int), char **p, ...)
2509 {
2510   char *s;
2511   va_list v;
2512   va_start (v,p);
2513   s = g (p, va_arg (v,int));
2514   va_end (v);
2515   return s;
2516 }
2517 int test (int i, double x);
2518 struct s1 {int (*f) (int a);};
2519 struct s2 {int (*f) (double a);};
2520 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2521 int argc;
2522 char **argv;
2523
2524 int main() {
2525
2526 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2527
2528 ; return 0; }
2529 EOF
2530 if { (eval echo configure:2531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2531   rm -rf conftest*
2532   am_cv_prog_cc_stdc="$ac_arg"; break
2533 else
2534   echo "configure: failed program was:" >&5
2535   cat conftest.$ac_ext >&5
2536 fi
2537 rm -f conftest*
2538 done
2539 CC="$ac_save_CC"
2540
2541 fi
2542
2543 if test -z "$am_cv_prog_cc_stdc"; then
2544   echo "$ac_t""none needed" 1>&6
2545 else
2546   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
2547 fi
2548 case "x$am_cv_prog_cc_stdc" in
2549   x|xno) ;;
2550   *) CC="$CC $am_cv_prog_cc_stdc" ;;
2551 esac
2552
2553 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
2554         { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; }
2555 fi
2556
2557
2558
2559
2560 echo $ac_n "checking for socket""... $ac_c" 1>&6
2561 echo "configure:2562: checking for socket" >&5
2562 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
2563   echo $ac_n "(cached) $ac_c" 1>&6
2564 else
2565   cat > conftest.$ac_ext <<EOF
2566 #line 2567 "configure"
2567 #include "confdefs.h"
2568 /* System header to define __stub macros and hopefully few prototypes,
2569     which can conflict with char socket(); below.  */
2570 #include <assert.h>
2571 /* Override any gcc2 internal prototype to avoid an error.  */
2572 /* We use char because int might match the return type of a gcc2
2573     builtin and then its argument prototype would still apply.  */
2574 char socket();
2575
2576 int main() {
2577
2578 /* The GNU C library defines this for functions which it implements
2579     to always fail with ENOSYS.  Some functions are actually named
2580     something starting with __ and the normal name is an alias.  */
2581 #if defined (__stub_socket) || defined (__stub___socket)
2582 choke me
2583 #else
2584 socket();
2585 #endif
2586
2587 ; return 0; }
2588 EOF
2589 if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2590   rm -rf conftest*
2591   eval "ac_cv_func_socket=yes"
2592 else
2593   echo "configure: failed program was:" >&5
2594   cat conftest.$ac_ext >&5
2595   rm -rf conftest*
2596   eval "ac_cv_func_socket=no"
2597 fi
2598 rm -f conftest*
2599 fi
2600
2601 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
2602   echo "$ac_t""yes" 1>&6
2603   have_socket=yes
2604 else
2605   echo "$ac_t""no" 1>&6
2606         
2607         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
2608 echo "configure:2609: checking for main in -lsocket" >&5
2609 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
2610 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2611   echo $ac_n "(cached) $ac_c" 1>&6
2612 else
2613   ac_save_LIBS="$LIBS"
2614 LIBS="-lsocket  $LIBS"
2615 cat > conftest.$ac_ext <<EOF
2616 #line 2617 "configure"
2617 #include "confdefs.h"
2618
2619 int main() {
2620 main()
2621 ; return 0; }
2622 EOF
2623 if { (eval echo configure:2624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2624   rm -rf conftest*
2625   eval "ac_cv_lib_$ac_lib_var=yes"
2626 else
2627   echo "configure: failed program was:" >&5
2628   cat conftest.$ac_ext >&5
2629   rm -rf conftest*
2630   eval "ac_cv_lib_$ac_lib_var=no"
2631 fi
2632 rm -f conftest*
2633 LIBS="$ac_save_LIBS"
2634
2635 fi
2636 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2637   echo "$ac_t""yes" 1>&6
2638     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2639     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2640   cat >> confdefs.h <<EOF
2641 #define $ac_tr_lib 1
2642 EOF
2643
2644   LIBS="-lsocket $LIBS"
2645
2646 else
2647   echo "$ac_t""no" 1>&6
2648 fi
2649
2650         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
2651 echo "configure:2652: checking for main in -lnet" >&5
2652 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
2653 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2654   echo $ac_n "(cached) $ac_c" 1>&6
2655 else
2656   ac_save_LIBS="$LIBS"
2657 LIBS="-lnet  $LIBS"
2658 cat > conftest.$ac_ext <<EOF
2659 #line 2660 "configure"
2660 #include "confdefs.h"
2661
2662 int main() {
2663 main()
2664 ; return 0; }
2665 EOF
2666 if { (eval echo configure:2667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2667   rm -rf conftest*
2668   eval "ac_cv_lib_$ac_lib_var=yes"
2669 else
2670   echo "configure: failed program was:" >&5
2671   cat conftest.$ac_ext >&5
2672   rm -rf conftest*
2673   eval "ac_cv_lib_$ac_lib_var=no"
2674 fi
2675 rm -f conftest*
2676 LIBS="$ac_save_LIBS"
2677
2678 fi
2679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2680   echo "$ac_t""yes" 1>&6
2681     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2682     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2683   cat >> confdefs.h <<EOF
2684 #define $ac_tr_lib 1
2685 EOF
2686
2687   LIBS="-lnet $LIBS"
2688
2689 else
2690   echo "$ac_t""no" 1>&6
2691 fi
2692
2693         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
2694 echo "configure:2695: checking for main in -lnsl_s" >&5
2695 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
2696 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2697   echo $ac_n "(cached) $ac_c" 1>&6
2698 else
2699   ac_save_LIBS="$LIBS"
2700 LIBS="-lnsl_s  $LIBS"
2701 cat > conftest.$ac_ext <<EOF
2702 #line 2703 "configure"
2703 #include "confdefs.h"
2704
2705 int main() {
2706 main()
2707 ; return 0; }
2708 EOF
2709 if { (eval echo configure:2710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2710   rm -rf conftest*
2711   eval "ac_cv_lib_$ac_lib_var=yes"
2712 else
2713   echo "configure: failed program was:" >&5
2714   cat conftest.$ac_ext >&5
2715   rm -rf conftest*
2716   eval "ac_cv_lib_$ac_lib_var=no"
2717 fi
2718 rm -f conftest*
2719 LIBS="$ac_save_LIBS"
2720
2721 fi
2722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2723   echo "$ac_t""yes" 1>&6
2724     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2725     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2726   cat >> confdefs.h <<EOF
2727 #define $ac_tr_lib 1
2728 EOF
2729
2730   LIBS="-lnsl_s $LIBS"
2731
2732 else
2733   echo "$ac_t""no" 1>&6
2734 fi
2735
2736         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
2737 echo "configure:2738: checking for main in -lnsl" >&5
2738 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
2739 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2740   echo $ac_n "(cached) $ac_c" 1>&6
2741 else
2742   ac_save_LIBS="$LIBS"
2743 LIBS="-lnsl  $LIBS"
2744 cat > conftest.$ac_ext <<EOF
2745 #line 2746 "configure"
2746 #include "confdefs.h"
2747
2748 int main() {
2749 main()
2750 ; return 0; }
2751 EOF
2752 if { (eval echo configure:2753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2753   rm -rf conftest*
2754   eval "ac_cv_lib_$ac_lib_var=yes"
2755 else
2756   echo "configure: failed program was:" >&5
2757   cat conftest.$ac_ext >&5
2758   rm -rf conftest*
2759   eval "ac_cv_lib_$ac_lib_var=no"
2760 fi
2761 rm -f conftest*
2762 LIBS="$ac_save_LIBS"
2763
2764 fi
2765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2766   echo "$ac_t""yes" 1>&6
2767     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2768     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2769   cat >> confdefs.h <<EOF
2770 #define $ac_tr_lib 1
2771 EOF
2772
2773   LIBS="-lnsl $LIBS"
2774
2775 else
2776   echo "$ac_t""no" 1>&6
2777 fi
2778
2779         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
2780 echo "configure:2781: checking for socket in -linet" >&5
2781 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
2782 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2783   echo $ac_n "(cached) $ac_c" 1>&6
2784 else
2785   ac_save_LIBS="$LIBS"
2786 LIBS="-linet  $LIBS"
2787 cat > conftest.$ac_ext <<EOF
2788 #line 2789 "configure"
2789 #include "confdefs.h"
2790 /* Override any gcc2 internal prototype to avoid an error.  */
2791 /* We use char because int might match the return type of a gcc2
2792     builtin and then its argument prototype would still apply.  */
2793 char socket();
2794
2795 int main() {
2796 socket()
2797 ; return 0; }
2798 EOF
2799 if { (eval echo configure:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2800   rm -rf conftest*
2801   eval "ac_cv_lib_$ac_lib_var=yes"
2802 else
2803   echo "configure: failed program was:" >&5
2804   cat conftest.$ac_ext >&5
2805   rm -rf conftest*
2806   eval "ac_cv_lib_$ac_lib_var=no"
2807 fi
2808 rm -f conftest*
2809 LIBS="$ac_save_LIBS"
2810
2811 fi
2812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2813   echo "$ac_t""yes" 1>&6
2814     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2815     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2816   cat >> confdefs.h <<EOF
2817 #define $ac_tr_lib 1
2818 EOF
2819
2820   LIBS="-linet $LIBS"
2821
2822 else
2823   echo "$ac_t""no" 1>&6
2824 fi
2825
2826         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
2827 echo "configure:2828: checking for main in -lgen" >&5
2828 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
2829 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2830   echo $ac_n "(cached) $ac_c" 1>&6
2831 else
2832   ac_save_LIBS="$LIBS"
2833 LIBS="-lgen  $LIBS"
2834 cat > conftest.$ac_ext <<EOF
2835 #line 2836 "configure"
2836 #include "confdefs.h"
2837
2838 int main() {
2839 main()
2840 ; return 0; }
2841 EOF
2842 if { (eval echo configure:2843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2843   rm -rf conftest*
2844   eval "ac_cv_lib_$ac_lib_var=yes"
2845 else
2846   echo "configure: failed program was:" >&5
2847   cat conftest.$ac_ext >&5
2848   rm -rf conftest*
2849   eval "ac_cv_lib_$ac_lib_var=no"
2850 fi
2851 rm -f conftest*
2852 LIBS="$ac_save_LIBS"
2853
2854 fi
2855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2856   echo "$ac_t""yes" 1>&6
2857     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2858     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2859   cat >> confdefs.h <<EOF
2860 #define $ac_tr_lib 1
2861 EOF
2862
2863   LIBS="-lgen $LIBS"
2864
2865 else
2866   echo "$ac_t""no" 1>&6
2867 fi
2868
2869
2870 fi
2871
2872
2873 for ac_func in res_search
2874 do
2875 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2876 echo "configure:2877: checking for $ac_func" >&5
2877 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2878   echo $ac_n "(cached) $ac_c" 1>&6
2879 else
2880   cat > conftest.$ac_ext <<EOF
2881 #line 2882 "configure"
2882 #include "confdefs.h"
2883 /* System header to define __stub macros and hopefully few prototypes,
2884     which can conflict with char $ac_func(); below.  */
2885 #include <assert.h>
2886 /* Override any gcc2 internal prototype to avoid an error.  */
2887 /* We use char because int might match the return type of a gcc2
2888     builtin and then its argument prototype would still apply.  */
2889 char $ac_func();
2890
2891 int main() {
2892
2893 /* The GNU C library defines this for functions which it implements
2894     to always fail with ENOSYS.  Some functions are actually named
2895     something starting with __ and the normal name is an alias.  */
2896 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2897 choke me
2898 #else
2899 $ac_func();
2900 #endif
2901
2902 ; return 0; }
2903 EOF
2904 if { (eval echo configure:2905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2905   rm -rf conftest*
2906   eval "ac_cv_func_$ac_func=yes"
2907 else
2908   echo "configure: failed program was:" >&5
2909   cat conftest.$ac_ext >&5
2910   rm -rf conftest*
2911   eval "ac_cv_func_$ac_func=no"
2912 fi
2913 rm -f conftest*
2914 fi
2915
2916 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2917   echo "$ac_t""yes" 1>&6
2918     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2919   cat >> confdefs.h <<EOF
2920 #define $ac_tr_func 1
2921 EOF
2922  
2923 else
2924   echo "$ac_t""no" 1>&6
2925 fi
2926 done
2927
2928 if test $ac_cv_func_res_search = "no" ; then 
2929         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
2930 echo "configure:2931: checking for res_search in -lbind" >&5
2931 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
2932 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2933   echo $ac_n "(cached) $ac_c" 1>&6
2934 else
2935   ac_save_LIBS="$LIBS"
2936 LIBS="-lbind  $LIBS"
2937 cat > conftest.$ac_ext <<EOF
2938 #line 2939 "configure"
2939 #include "confdefs.h"
2940 /* Override any gcc2 internal prototype to avoid an error.  */
2941 /* We use char because int might match the return type of a gcc2
2942     builtin and then its argument prototype would still apply.  */
2943 char res_search();
2944
2945 int main() {
2946 res_search()
2947 ; return 0; }
2948 EOF
2949 if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2950   rm -rf conftest*
2951   eval "ac_cv_lib_$ac_lib_var=yes"
2952 else
2953   echo "configure: failed program was:" >&5
2954   cat conftest.$ac_ext >&5
2955   rm -rf conftest*
2956   eval "ac_cv_lib_$ac_lib_var=no"
2957 fi
2958 rm -f conftest*
2959 LIBS="$ac_save_LIBS"
2960
2961 fi
2962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2963   echo "$ac_t""yes" 1>&6
2964     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2965     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2966   cat >> confdefs.h <<EOF
2967 #define $ac_tr_lib 1
2968 EOF
2969
2970   LIBS="-lbind $LIBS"
2971
2972 else
2973   echo "$ac_t""no" 1>&6
2974 fi
2975
2976         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
2977                 cat >> confdefs.h <<\EOF
2978 #define HAVE_RES_SEARCH 1
2979 EOF
2980
2981         else
2982                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
2983 echo "configure:2984: checking for res_search in -lresolv" >&5
2984 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
2985 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2986   echo $ac_n "(cached) $ac_c" 1>&6
2987 else
2988   ac_save_LIBS="$LIBS"
2989 LIBS="-lresolv  $LIBS"
2990 cat > conftest.$ac_ext <<EOF
2991 #line 2992 "configure"
2992 #include "confdefs.h"
2993 /* Override any gcc2 internal prototype to avoid an error.  */
2994 /* We use char because int might match the return type of a gcc2
2995     builtin and then its argument prototype would still apply.  */
2996 char res_search();
2997
2998 int main() {
2999 res_search()
3000 ; return 0; }
3001 EOF
3002 if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3003   rm -rf conftest*
3004   eval "ac_cv_lib_$ac_lib_var=yes"
3005 else
3006   echo "configure: failed program was:" >&5
3007   cat conftest.$ac_ext >&5
3008   rm -rf conftest*
3009   eval "ac_cv_lib_$ac_lib_var=no"
3010 fi
3011 rm -f conftest*
3012 LIBS="$ac_save_LIBS"
3013
3014 fi
3015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3016   echo "$ac_t""yes" 1>&6
3017     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3018     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3019   cat >> confdefs.h <<EOF
3020 #define $ac_tr_lib 1
3021 EOF
3022
3023   LIBS="-lresolv $LIBS"
3024
3025 else
3026   echo "$ac_t""no" 1>&6
3027 fi
3028
3029                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3030                         cat >> confdefs.h <<\EOF
3031 #define HAVE_RES_SEARCH 1
3032 EOF
3033
3034                 fi
3035         fi
3036 fi
3037
3038 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3039 echo "configure:3040: checking for sigset in -lV3" >&5
3040 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3041 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3042   echo $ac_n "(cached) $ac_c" 1>&6
3043 else
3044   ac_save_LIBS="$LIBS"
3045 LIBS="-lV3  $LIBS"
3046 cat > conftest.$ac_ext <<EOF
3047 #line 3048 "configure"
3048 #include "confdefs.h"
3049 /* Override any gcc2 internal prototype to avoid an error.  */
3050 /* We use char because int might match the return type of a gcc2
3051     builtin and then its argument prototype would still apply.  */
3052 char sigset();
3053
3054 int main() {
3055 sigset()
3056 ; return 0; }
3057 EOF
3058 if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3059   rm -rf conftest*
3060   eval "ac_cv_lib_$ac_lib_var=yes"
3061 else
3062   echo "configure: failed program was:" >&5
3063   cat conftest.$ac_ext >&5
3064   rm -rf conftest*
3065   eval "ac_cv_lib_$ac_lib_var=no"
3066 fi
3067 rm -f conftest*
3068 LIBS="$ac_save_LIBS"
3069
3070 fi
3071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3072   echo "$ac_t""yes" 1>&6
3073     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3074     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3075   cat >> confdefs.h <<EOF
3076 #define $ac_tr_lib 1
3077 EOF
3078
3079   LIBS="-lV3 $LIBS"
3080
3081 else
3082   echo "$ac_t""no" 1>&6
3083 fi
3084
3085
3086 # ISODE tests
3087 ol_link_isode=no
3088 if test $ol_enable_ldapd != no ; then
3089                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
3090 echo "configure:3091: checking for main in -lxtpp" >&5
3091 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
3092 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3093   echo $ac_n "(cached) $ac_c" 1>&6
3094 else
3095   ac_save_LIBS="$LIBS"
3096 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
3097 cat > conftest.$ac_ext <<EOF
3098 #line 3099 "configure"
3099 #include "confdefs.h"
3100
3101 int main() {
3102 main()
3103 ; return 0; }
3104 EOF
3105 if { (eval echo configure:3106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3106   rm -rf conftest*
3107   eval "ac_cv_lib_$ac_lib_var=yes"
3108 else
3109   echo "configure: failed program was:" >&5
3110   cat conftest.$ac_ext >&5
3111   rm -rf conftest*
3112   eval "ac_cv_lib_$ac_lib_var=no"
3113 fi
3114 rm -f conftest*
3115 LIBS="$ac_save_LIBS"
3116
3117 fi
3118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3119   echo "$ac_t""yes" 1>&6
3120   
3121                 ol_link_isode=yes
3122                 cat >> confdefs.h <<\EOF
3123 #define HAVE_XTPP 1
3124 EOF
3125
3126                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
3127                 
3128 else
3129   echo "$ac_t""no" 1>&6
3130 :
3131 fi
3132
3133         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
3134 echo "configure:3135: checking for main in -ldsap" >&5
3135 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
3136 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3137   echo $ac_n "(cached) $ac_c" 1>&6
3138 else
3139   ac_save_LIBS="$LIBS"
3140 LIBS="-ldsap -lisode $LIBS"
3141 cat > conftest.$ac_ext <<EOF
3142 #line 3143 "configure"
3143 #include "confdefs.h"
3144
3145 int main() {
3146 main()
3147 ; return 0; }
3148 EOF
3149 if { (eval echo configure:3150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3150   rm -rf conftest*
3151   eval "ac_cv_lib_$ac_lib_var=yes"
3152 else
3153   echo "configure: failed program was:" >&5
3154   cat conftest.$ac_ext >&5
3155   rm -rf conftest*
3156   eval "ac_cv_lib_$ac_lib_var=no"
3157 fi
3158 rm -f conftest*
3159 LIBS="$ac_save_LIBS"
3160
3161 fi
3162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3163   echo "$ac_t""yes" 1>&6
3164   
3165                 ol_link_isode=yes
3166                 cat >> confdefs.h <<\EOF
3167 #define HAVE_DSAP 1
3168 EOF
3169
3170                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
3171                 
3172 else
3173   echo "$ac_t""no" 1>&6
3174 :
3175 fi
3176
3177         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
3178 echo "configure:3179: checking for main in -lisode" >&5
3179 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
3180 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3181   echo $ac_n "(cached) $ac_c" 1>&6
3182 else
3183   ac_save_LIBS="$LIBS"
3184 LIBS="-lisode  $LIBS"
3185 cat > conftest.$ac_ext <<EOF
3186 #line 3187 "configure"
3187 #include "confdefs.h"
3188
3189 int main() {
3190 main()
3191 ; return 0; }
3192 EOF
3193 if { (eval echo configure:3194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3194   rm -rf conftest*
3195   eval "ac_cv_lib_$ac_lib_var=yes"
3196 else
3197   echo "configure: failed program was:" >&5
3198   cat conftest.$ac_ext >&5
3199   rm -rf conftest*
3200   eval "ac_cv_lib_$ac_lib_var=no"
3201 fi
3202 rm -f conftest*
3203 LIBS="$ac_save_LIBS"
3204
3205 fi
3206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3207   echo "$ac_t""yes" 1>&6
3208   
3209                 ol_link_isode=yes
3210                 cat >> confdefs.h <<\EOF
3211 #define HAVE_ISODE 1
3212 EOF
3213
3214                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
3215                 
3216 else
3217   echo "$ac_t""no" 1>&6
3218 :
3219 fi
3220
3221 fi
3222
3223 if test $ol_link_isode != no; then
3224         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
3225 echo "configure:3226: checking for main in -lpp" >&5
3226 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
3227 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3228   echo $ac_n "(cached) $ac_c" 1>&6
3229 else
3230   ac_save_LIBS="$LIBS"
3231 LIBS="-lpp  $LIBS"
3232 cat > conftest.$ac_ext <<EOF
3233 #line 3234 "configure"
3234 #include "confdefs.h"
3235
3236 int main() {
3237 main()
3238 ; return 0; }
3239 EOF
3240 if { (eval echo configure:3241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3241   rm -rf conftest*
3242   eval "ac_cv_lib_$ac_lib_var=yes"
3243 else
3244   echo "configure: failed program was:" >&5
3245   cat conftest.$ac_ext >&5
3246   rm -rf conftest*
3247   eval "ac_cv_lib_$ac_lib_var=no"
3248 fi
3249 rm -f conftest*
3250 LIBS="$ac_save_LIBS"
3251
3252 fi
3253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3254   echo "$ac_t""yes" 1>&6
3255   
3256                 cat >> confdefs.h <<\EOF
3257 #define HAVE_PP 1
3258 EOF
3259
3260                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
3261                 
3262 else
3263   echo "$ac_t""no" 1>&6
3264 :
3265 fi
3266
3267
3268         # Extract the first word of "pepsy", so it can be a program name with args.
3269 set dummy pepsy; ac_word=$2
3270 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3271 echo "configure:3272: checking for $ac_word" >&5
3272 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
3273   echo $ac_n "(cached) $ac_c" 1>&6
3274 else
3275   case "$PEPSY" in
3276   /*)
3277   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
3278   ;;
3279   ?:/*)                  
3280   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
3281   ;;
3282   *)
3283   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3284   ac_dummy="$PATH"
3285   for ac_dir in $ac_dummy; do 
3286     test -z "$ac_dir" && ac_dir=.
3287     if test -f $ac_dir/$ac_word; then
3288       ac_cv_path_PEPSY="$ac_dir/$ac_word"
3289       break
3290     fi
3291   done
3292   IFS="$ac_save_ifs"
3293   ;;
3294 esac
3295 fi
3296 PEPSY="$ac_cv_path_PEPSY"
3297 if test -n "$PEPSY"; then
3298   echo "$ac_t""$PEPSY" 1>&6
3299 else
3300   echo "$ac_t""no" 1>&6
3301 fi
3302
3303 fi
3304
3305 ol_link_kerberos=no
3306
3307 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
3308         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
3309 do
3310 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3311 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3312 echo "configure:3313: checking for $ac_hdr" >&5
3313 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3314   echo $ac_n "(cached) $ac_c" 1>&6
3315 else
3316   cat > conftest.$ac_ext <<EOF
3317 #line 3318 "configure"
3318 #include "confdefs.h"
3319 #include <$ac_hdr>
3320 EOF
3321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3322 { (eval echo configure:3323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3324 if test -z "$ac_err"; then
3325   rm -rf conftest*
3326   eval "ac_cv_header_$ac_safe=yes"
3327 else
3328   echo "$ac_err" >&5
3329   echo "configure: failed program was:" >&5
3330   cat conftest.$ac_ext >&5
3331   rm -rf conftest*
3332   eval "ac_cv_header_$ac_safe=no"
3333 fi
3334 rm -f conftest*
3335 fi
3336 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3337   echo "$ac_t""yes" 1>&6
3338     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3339   cat >> confdefs.h <<EOF
3340 #define $ac_tr_hdr 1
3341 EOF
3342  
3343 else
3344   echo "$ac_t""no" 1>&6
3345 fi
3346 done
3347
3348
3349         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
3350                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
3351 echo "configure:3352: checking for main in -lkrb4" >&5
3352 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
3353 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3354   echo $ac_n "(cached) $ac_c" 1>&6
3355 else
3356   ac_save_LIBS="$LIBS"
3357 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
3358 cat > conftest.$ac_ext <<EOF
3359 #line 3360 "configure"
3360 #include "confdefs.h"
3361
3362 int main() {
3363 main()
3364 ; return 0; }
3365 EOF
3366 if { (eval echo configure:3367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3367   rm -rf conftest*
3368   eval "ac_cv_lib_$ac_lib_var=yes"
3369 else
3370   echo "configure: failed program was:" >&5
3371   cat conftest.$ac_ext >&5
3372   rm -rf conftest*
3373   eval "ac_cv_lib_$ac_lib_var=no"
3374 fi
3375 rm -f conftest*
3376 LIBS="$ac_save_LIBS"
3377
3378 fi
3379 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3380   echo "$ac_t""yes" 1>&6
3381   have_k5=yes
3382 else
3383   echo "$ac_t""no" 1>&6
3384 have_k5=no
3385 fi
3386
3387
3388                 if test $have_k5 = yes ; then
3389                         ol_with_kerberos=found
3390                         ol_link_kerberos=yes
3391
3392                         cat >> confdefs.h <<\EOF
3393 #define HAVE_KERBEROS 1
3394 EOF
3395
3396                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
3397                 fi
3398         fi
3399 fi
3400
3401 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
3402         for ac_hdr in krb.h des.h
3403 do
3404 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3405 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3406 echo "configure:3407: checking for $ac_hdr" >&5
3407 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <$ac_hdr>
3414 EOF
3415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3416 { (eval echo configure:3417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3418 if test -z "$ac_err"; then
3419   rm -rf conftest*
3420   eval "ac_cv_header_$ac_safe=yes"
3421 else
3422   echo "$ac_err" >&5
3423   echo "configure: failed program was:" >&5
3424   cat conftest.$ac_ext >&5
3425   rm -rf conftest*
3426   eval "ac_cv_header_$ac_safe=no"
3427 fi
3428 rm -f conftest*
3429 fi
3430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3431   echo "$ac_t""yes" 1>&6
3432     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3433   cat >> confdefs.h <<EOF
3434 #define $ac_tr_hdr 1
3435 EOF
3436  
3437 else
3438   echo "$ac_t""no" 1>&6
3439 fi
3440 done
3441
3442
3443         if test $ac_cv_header_krb_h = yes ; then
3444                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
3445 echo "configure:3446: checking for main in -lkrb" >&5
3446 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
3447 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3448   echo $ac_n "(cached) $ac_c" 1>&6
3449 else
3450   ac_save_LIBS="$LIBS"
3451 LIBS="-lkrb -ldes $LIBS"
3452 cat > conftest.$ac_ext <<EOF
3453 #line 3454 "configure"
3454 #include "confdefs.h"
3455
3456 int main() {
3457 main()
3458 ; return 0; }
3459 EOF
3460 if { (eval echo configure:3461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3461   rm -rf conftest*
3462   eval "ac_cv_lib_$ac_lib_var=yes"
3463 else
3464   echo "configure: failed program was:" >&5
3465   cat conftest.$ac_ext >&5
3466   rm -rf conftest*
3467   eval "ac_cv_lib_$ac_lib_var=no"
3468 fi
3469 rm -f conftest*
3470 LIBS="$ac_save_LIBS"
3471
3472 fi
3473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3474   echo "$ac_t""yes" 1>&6
3475   have_k4=yes
3476 else
3477   echo "$ac_t""no" 1>&6
3478 have_k4=no
3479 fi
3480
3481
3482                 if test $have_k4 = yes ; then
3483                         ol_with_kerberos=found
3484                         ol_link_kerberos=yes
3485
3486                         cat >> confdefs.h <<\EOF
3487 #define HAVE_KERBEROS 1
3488 EOF
3489
3490                         KRB_LIBS="-lkrb -ldes"
3491                 fi
3492         fi
3493 fi
3494
3495
3496 ol_link_threads=no
3497 if test $ol_with_threads = auto -o $ol_with_threads = yes \
3498         -o $ol_with_threads = posix ; then
3499
3500         for ac_hdr in pthread.h sched.h
3501 do
3502 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3503 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3504 echo "configure:3505: checking for $ac_hdr" >&5
3505 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3506   echo $ac_n "(cached) $ac_c" 1>&6
3507 else
3508   cat > conftest.$ac_ext <<EOF
3509 #line 3510 "configure"
3510 #include "confdefs.h"
3511 #include <$ac_hdr>
3512 EOF
3513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3514 { (eval echo configure:3515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3516 if test -z "$ac_err"; then
3517   rm -rf conftest*
3518   eval "ac_cv_header_$ac_safe=yes"
3519 else
3520   echo "$ac_err" >&5
3521   echo "configure: failed program was:" >&5
3522   cat conftest.$ac_ext >&5
3523   rm -rf conftest*
3524   eval "ac_cv_header_$ac_safe=no"
3525 fi
3526 rm -f conftest*
3527 fi
3528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3529   echo "$ac_t""yes" 1>&6
3530     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3531   cat >> confdefs.h <<EOF
3532 #define $ac_tr_hdr 1
3533 EOF
3534  
3535 else
3536   echo "$ac_t""no" 1>&6
3537 fi
3538 done
3539
3540
3541         if test $ac_cv_header_pthread_h = yes ; then
3542                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
3543 echo "configure:3544: checking POSIX thread version" >&5
3544 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
3545   echo $ac_n "(cached) $ac_c" 1>&6
3546 else
3547   
3548         cat > conftest.$ac_ext <<EOF
3549 #line 3550 "configure"
3550 #include "confdefs.h"
3551
3552 #               include <pthread.h>
3553                 /* this check could be improved */
3554 #               ifdef PTHREAD_ONCE_INIT
3555                         pthread_version_final
3556 #               endif
3557         
3558 EOF
3559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3560   egrep "pthread_version_final" >/dev/null 2>&1; then
3561   rm -rf conftest*
3562   ol_pthread_final=yes
3563 else
3564   rm -rf conftest*
3565   ol_pthread_final=no
3566 fi
3567 rm -f conftest*
3568
3569
3570         cat > conftest.$ac_ext <<EOF
3571 #line 3572 "configure"
3572 #include "confdefs.h"
3573
3574 #               include <pthread.h>
3575                 /* this check could be improved */
3576 #               ifdef pthread_once_init
3577                         pthread_version_draft4
3578 #               endif
3579         
3580 EOF
3581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3582   egrep "pthread_version_draft4" >/dev/null 2>&1; then
3583   rm -rf conftest*
3584   ol_pthread_draft4=yes
3585 else
3586   rm -rf conftest*
3587   ol_pthread_draft4=no
3588 fi
3589 rm -f conftest*
3590
3591
3592         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
3593                 ol_cv_pthread_version=final
3594         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
3595                 ol_cv_pthread_version=draft4
3596         else
3597                 ol_cv_pthread_version=unknown
3598         fi
3599
3600 fi
3601
3602 echo "$ac_t""$ol_cv_pthread_version" 1>&6
3603
3604
3605                 if test $ol_cv_pthread_version = final ; then
3606                         cat >> confdefs.h <<\EOF
3607 #define HAVE_PTHREADS_FINAL 1
3608 EOF
3609
3610                 elif test $ol_cv_pthread_version = draft4 ; then
3611                         cat >> confdefs.h <<\EOF
3612 #define HAVE_PTHREADS_D4 1
3613 EOF
3614
3615                 else
3616                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
3617                 fi
3618
3619                 # consider threads found
3620                 ol_with_threads=found
3621
3622                 
3623 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
3624 echo "configure:3625: checking for LinuxThreads" >&5
3625 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
3626   echo $ac_n "(cached) $ac_c" 1>&6
3627 else
3628   
3629         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
3630         if test "$res" -gt 0 ; then
3631                 ol_cv_linux_threads=yes
3632         else
3633                 ol_cv_linux_threads=no
3634         fi
3635
3636 fi
3637
3638 echo "$ac_t""$ol_cv_linux_threads" 1>&6
3639
3640
3641                 if test $ol_cv_linux_threads = yes ; then
3642                         cat >> confdefs.h <<\EOF
3643 #define HAVE_LINUX_THREADS 1
3644 EOF
3645
3646                 fi
3647
3648                 
3649                                 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
3650 echo "configure:3651: checking for pthread_create" >&5
3651 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
3652   echo $ac_n "(cached) $ac_c" 1>&6
3653 else
3654   cat > conftest.$ac_ext <<EOF
3655 #line 3656 "configure"
3656 #include "confdefs.h"
3657 /* System header to define __stub macros and hopefully few prototypes,
3658     which can conflict with char pthread_create(); below.  */
3659 #include <assert.h>
3660 /* Override any gcc2 internal prototype to avoid an error.  */
3661 /* We use char because int might match the return type of a gcc2
3662     builtin and then its argument prototype would still apply.  */
3663 char pthread_create();
3664
3665 int main() {
3666
3667 /* The GNU C library defines this for functions which it implements
3668     to always fail with ENOSYS.  Some functions are actually named
3669     something starting with __ and the normal name is an alias.  */
3670 #if defined (__stub_pthread_create) || defined (__stub___pthread_create)
3671 choke me
3672 #else
3673 pthread_create();
3674 #endif
3675
3676 ; return 0; }
3677 EOF
3678 if { (eval echo configure:3679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3679   rm -rf conftest*
3680   eval "ac_cv_func_pthread_create=yes"
3681 else
3682   echo "configure: failed program was:" >&5
3683   cat conftest.$ac_ext >&5
3684   rm -rf conftest*
3685   eval "ac_cv_func_pthread_create=no"
3686 fi
3687 rm -f conftest*
3688 fi
3689
3690 if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
3691   echo "$ac_t""yes" 1>&6
3692   ol_link_threads=yes
3693 else
3694   echo "$ac_t""no" 1>&6
3695 fi
3696
3697
3698                 if test $ol_link_threads = no ; then
3699                                                 echo $ac_n "checking for pthread_create with -kthread""... $ac_c" 1>&6
3700 echo "configure:3701: checking for pthread_create with -kthread" >&5
3701 if eval "test \"`echo '$''{'ol_cv_kthread_flag'+set}'`\" = set"; then
3702   echo $ac_n "(cached) $ac_c" 1>&6
3703 else
3704   
3705                                                                 save_LIBS="$LIBS"
3706                                 LIBS="-kthread $LIBS"
3707                                 cat > conftest.$ac_ext <<EOF
3708 #line 3709 "configure"
3709 #include "confdefs.h"
3710 char pthread();
3711 int main() {
3712
3713                                         pthread_create();
3714                                         
3715 ; return 0; }
3716 EOF
3717 if { (eval echo configure:3718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3718   rm -rf conftest*
3719   ol_cv_kthread_flag=yes
3720 else
3721   echo "configure: failed program was:" >&5
3722   cat conftest.$ac_ext >&5
3723   rm -rf conftest*
3724   ol_cv_kthread_flag=no
3725 fi
3726 rm -f conftest*
3727                                                                 LIBS="$save_LIBS"
3728                         
3729 fi
3730
3731 echo "$ac_t""$ol_cv_kthread_flag" 1>&6
3732
3733                         if test $ol_cv_kthread_flag = yes ; then
3734                                 LTHREAD_LIBS="$LTHREAD_LIBS -kthread"
3735                                 ol_link_threads=posix
3736                         fi
3737                 fi
3738
3739                 if test $ol_link_threads = no ; then
3740                                                 echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6
3741 echo "configure:3742: checking for pthread_create with -pthread" >&5
3742 if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then
3743   echo $ac_n "(cached) $ac_c" 1>&6
3744 else
3745   
3746                                                                 save_LIBS="$LIBS"
3747                                 LIBS="-pthread $LIBS"
3748                                 cat > conftest.$ac_ext <<EOF
3749 #line 3750 "configure"
3750 #include "confdefs.h"
3751 char pthread();
3752 int main() {
3753
3754                                         pthread_create();
3755                                         
3756 ; return 0; }
3757 EOF
3758 if { (eval echo configure:3759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3759   rm -rf conftest*
3760   ol_cv_pthread_flag=yes
3761 else
3762   echo "configure: failed program was:" >&5
3763   cat conftest.$ac_ext >&5
3764   rm -rf conftest*
3765   ol_cv_pthread_flag=no
3766 fi
3767 rm -f conftest*
3768                                                                 LIBS="$save_LIBS"
3769                         
3770 fi
3771
3772 echo "$ac_t""$ol_cv_pthread_flag" 1>&6
3773
3774                         if test $ol_cv_pthread_flag = yes ; then
3775                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthread"
3776                                 ol_link_threads=posix
3777                         fi
3778                 fi
3779
3780                 if test $ol_link_threads = no ; then
3781                                                 echo $ac_n "checking for pthread_create with -pthreads""... $ac_c" 1>&6
3782 echo "configure:3783: checking for pthread_create with -pthreads" >&5
3783 if eval "test \"`echo '$''{'ol_cv_pthreads_flag'+set}'`\" = set"; then
3784   echo $ac_n "(cached) $ac_c" 1>&6
3785 else
3786   
3787                                                                 save_LIBS="$LIBS"
3788                                 LIBS="-pthreads $LIBS"
3789                                 cat > conftest.$ac_ext <<EOF
3790 #line 3791 "configure"
3791 #include "confdefs.h"
3792 char pthread();
3793 int main() {
3794
3795                                         pthread_create();
3796                                         
3797 ; return 0; }
3798 EOF
3799 if { (eval echo configure:3800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3800   rm -rf conftest*
3801   ol_cv_pthreads_flag=yes
3802 else
3803   echo "configure: failed program was:" >&5
3804   cat conftest.$ac_ext >&5
3805   rm -rf conftest*
3806   ol_cv_pthreads_flag=no
3807 fi
3808 rm -f conftest*
3809                                                                 LIBS="$save_LIBS"
3810                         
3811 fi
3812
3813 echo "$ac_t""$ol_cv_pthreads_flag" 1>&6
3814
3815                         if test $ol_cv_pthreads_flag = yes ; then
3816                                 LTHREAD_LIBS="$LTHREAD_LIBS -pthreads"
3817                                 ol_link_threads=posix
3818                         fi
3819                 fi
3820
3821                 if test $ol_link_threads = no ; then
3822                                                 echo $ac_n "checking for pthread_create with -thread""... $ac_c" 1>&6
3823 echo "configure:3824: checking for pthread_create with -thread" >&5
3824 if eval "test \"`echo '$''{'ol_cv_thread_flag'+set}'`\" = set"; then
3825   echo $ac_n "(cached) $ac_c" 1>&6
3826 else
3827   
3828                                                                 save_LIBS="$LIBS"
3829                                 LIBS="-thread $LIBS"
3830                                 cat > conftest.$ac_ext <<EOF
3831 #line 3832 "configure"
3832 #include "confdefs.h"
3833 char pthread();
3834 int main() {
3835
3836                                         pthread_create();
3837                                         
3838 ; return 0; }
3839 EOF
3840 if { (eval echo configure:3841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3841   rm -rf conftest*
3842   ol_cv_thread_flag=yes
3843 else
3844   echo "configure: failed program was:" >&5
3845   cat conftest.$ac_ext >&5
3846   rm -rf conftest*
3847   ol_cv_thread_flag=no
3848 fi
3849 rm -f conftest*
3850                                                                 LIBS="$save_LIBS"
3851                         
3852 fi
3853
3854 echo "$ac_t""$ol_cv_thread_flag" 1>&6
3855
3856                         if test $ol_cv_thread_flag = yes ; then
3857                                 LTHREAD_LIBS="$LTHREAD_LIBS -thread"
3858                                 ol_link_threads=posix
3859                         fi
3860                 fi
3861
3862                 if test $ol_link_threads = no ; then
3863                                                 save_LIBS="$LIBS"
3864                         echo $ac_n "checking for pthread_mutex_lock in -lpthread""... $ac_c" 1>&6
3865 echo "configure:3866: checking for pthread_mutex_lock in -lpthread" >&5
3866 ac_lib_var=`echo pthread'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
3867 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3868   echo $ac_n "(cached) $ac_c" 1>&6
3869 else
3870   ac_save_LIBS="$LIBS"
3871 LIBS="-lpthread -lexc $LIBS"
3872 cat > conftest.$ac_ext <<EOF
3873 #line 3874 "configure"
3874 #include "confdefs.h"
3875 /* Override any gcc2 internal prototype to avoid an error.  */
3876 /* We use char because int might match the return type of a gcc2
3877     builtin and then its argument prototype would still apply.  */
3878 char pthread_mutex_lock();
3879
3880 int main() {
3881 pthread_mutex_lock()
3882 ; return 0; }
3883 EOF
3884 if { (eval echo configure:3885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3885   rm -rf conftest*
3886   eval "ac_cv_lib_$ac_lib_var=yes"
3887 else
3888   echo "configure: failed program was:" >&5
3889   cat conftest.$ac_ext >&5
3890   rm -rf conftest*
3891   eval "ac_cv_lib_$ac_lib_var=no"
3892 fi
3893 rm -f conftest*
3894 LIBS="$ac_save_LIBS"
3895
3896 fi
3897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3898   echo "$ac_t""yes" 1>&6
3899   
3900                                 ol_link_threads=posix
3901                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc"
3902                                 if test $ol_with_yielding_select = auto ; then
3903                                         ol_with_yielding_select=yes
3904                                 fi
3905                                 
3906 else
3907   echo "$ac_t""no" 1>&6
3908 :
3909 fi
3910
3911                         LIBS="$save_LIBS"
3912                 fi
3913
3914                 if test $ol_link_threads = no ; then
3915                                                 save_LIBS="$LIBS"
3916                         echo $ac_n "checking for pthread_mutex_unlock in -lpthreads""... $ac_c" 1>&6
3917 echo "configure:3918: checking for pthread_mutex_unlock in -lpthreads" >&5
3918 ac_lib_var=`echo pthreads'_'pthread_mutex_unlock | sed 'y%./+-%__p_%'`
3919 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3920   echo $ac_n "(cached) $ac_c" 1>&6
3921 else
3922   ac_save_LIBS="$LIBS"
3923 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
3924 cat > conftest.$ac_ext <<EOF
3925 #line 3926 "configure"
3926 #include "confdefs.h"
3927 /* Override any gcc2 internal prototype to avoid an error.  */
3928 /* We use char because int might match the return type of a gcc2
3929     builtin and then its argument prototype would still apply.  */
3930 char pthread_mutex_unlock();
3931
3932 int main() {
3933 pthread_mutex_unlock()
3934 ; return 0; }
3935 EOF
3936 if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3937   rm -rf conftest*
3938   eval "ac_cv_lib_$ac_lib_var=yes"
3939 else
3940   echo "configure: failed program was:" >&5
3941   cat conftest.$ac_ext >&5
3942   rm -rf conftest*
3943   eval "ac_cv_lib_$ac_lib_var=no"
3944 fi
3945 rm -f conftest*
3946 LIBS="$ac_save_LIBS"
3947
3948 fi
3949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3950   echo "$ac_t""yes" 1>&6
3951   
3952                                 ol_link_threads=posix
3953                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r"
3954                                 if test $ol_with_yielding_select = auto ; then
3955                                         ol_with_yielding_select=yes
3956                                 fi
3957                                 
3958 else
3959   echo "$ac_t""no" 1>&6
3960 :
3961 fi
3962
3963                         LIBS="$save_LIBS"
3964                 fi
3965
3966                 if test $ol_link_threads = no ; then
3967                                                 save_LIBS="$LIBS"
3968                         echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
3969 echo "configure:3970: checking for pthread_create in -lpthread" >&5
3970 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
3971 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3972   echo $ac_n "(cached) $ac_c" 1>&6
3973 else
3974   ac_save_LIBS="$LIBS"
3975 LIBS="-lpthread  $LIBS"
3976 cat > conftest.$ac_ext <<EOF
3977 #line 3978 "configure"
3978 #include "confdefs.h"
3979 /* Override any gcc2 internal prototype to avoid an error.  */
3980 /* We use char because int might match the return type of a gcc2
3981     builtin and then its argument prototype would still apply.  */
3982 char pthread_create();
3983
3984 int main() {
3985 pthread_create()
3986 ; return 0; }
3987 EOF
3988 if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3989   rm -rf conftest*
3990   eval "ac_cv_lib_$ac_lib_var=yes"
3991 else
3992   echo "configure: failed program was:" >&5
3993   cat conftest.$ac_ext >&5
3994   rm -rf conftest*
3995   eval "ac_cv_lib_$ac_lib_var=no"
3996 fi
3997 rm -f conftest*
3998 LIBS="$ac_save_LIBS"
3999
4000 fi
4001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4002   echo "$ac_t""yes" 1>&6
4003   
4004                                 ol_link_threads=posix
4005                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
4006 else
4007   echo "$ac_t""no" 1>&6
4008 :
4009 fi
4010
4011                         LIBS="$save_LIBS"
4012                 fi
4013
4014                 if test $ol_link_threads = no ; then
4015                                                 save_LIBS="$LIBS"
4016                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
4017 echo "configure:4018: checking for pthread_create in -lc_r" >&5
4018 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
4019 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4020   echo $ac_n "(cached) $ac_c" 1>&6
4021 else
4022   ac_save_LIBS="$LIBS"
4023 LIBS="-lc_r  $LIBS"
4024 cat > conftest.$ac_ext <<EOF
4025 #line 4026 "configure"
4026 #include "confdefs.h"
4027 /* Override any gcc2 internal prototype to avoid an error.  */
4028 /* We use char because int might match the return type of a gcc2
4029     builtin and then its argument prototype would still apply.  */
4030 char pthread_create();
4031
4032 int main() {
4033 pthread_create()
4034 ; return 0; }
4035 EOF
4036 if { (eval echo configure:4037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4037   rm -rf conftest*
4038   eval "ac_cv_lib_$ac_lib_var=yes"
4039 else
4040   echo "configure: failed program was:" >&5
4041   cat conftest.$ac_ext >&5
4042   rm -rf conftest*
4043   eval "ac_cv_lib_$ac_lib_var=no"
4044 fi
4045 rm -f conftest*
4046 LIBS="$ac_save_LIBS"
4047
4048 fi
4049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4050   echo "$ac_t""yes" 1>&6
4051   
4052                                 ol_link_threads=posix
4053                                 LTHREAD_LIBS="$LTHREAD_LIBS -lc_r"
4054 else
4055   echo "$ac_t""no" 1>&6
4056 :
4057 fi
4058
4059                         LIBS="$save_LIBS"
4060                 fi
4061
4062                 if test $ol_link_threads = no ; then
4063                                                 save_LIBS="$LIBS"
4064                         echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
4065 echo "configure:4066: checking for pthread_create in -lpthreads" >&5
4066 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
4067 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4068   echo $ac_n "(cached) $ac_c" 1>&6
4069 else
4070   ac_save_LIBS="$LIBS"
4071 LIBS="-lpthreads  $LIBS"
4072 cat > conftest.$ac_ext <<EOF
4073 #line 4074 "configure"
4074 #include "confdefs.h"
4075 /* Override any gcc2 internal prototype to avoid an error.  */
4076 /* We use char because int might match the return type of a gcc2
4077     builtin and then its argument prototype would still apply.  */
4078 char pthread_create();
4079
4080 int main() {
4081 pthread_create()
4082 ; return 0; }
4083 EOF
4084 if { (eval echo configure:4085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4085   rm -rf conftest*
4086   eval "ac_cv_lib_$ac_lib_var=yes"
4087 else
4088   echo "configure: failed program was:" >&5
4089   cat conftest.$ac_ext >&5
4090   rm -rf conftest*
4091   eval "ac_cv_lib_$ac_lib_var=no"
4092 fi
4093 rm -f conftest*
4094 LIBS="$ac_save_LIBS"
4095
4096 fi
4097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4098   echo "$ac_t""yes" 1>&6
4099   
4100                                 ol_link_threads=posix
4101                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
4102 else
4103   echo "$ac_t""no" 1>&6
4104 :
4105 fi
4106
4107                         LIBS="$save_LIBS"
4108                 fi
4109
4110                                 if test $ol_link_threads = no ; then
4111                                                 save_LIBS="$LIBS"
4112                         echo $ac_n "checking for pthread_join in -lpthreads""... $ac_c" 1>&6
4113 echo "configure:4114: checking for pthread_join in -lpthreads" >&5
4114 ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'`
4115 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4116   echo $ac_n "(cached) $ac_c" 1>&6
4117 else
4118   ac_save_LIBS="$LIBS"
4119 LIBS="-lpthreads -Wl,-woff,85 $LIBS"
4120 cat > conftest.$ac_ext <<EOF
4121 #line 4122 "configure"
4122 #include "confdefs.h"
4123 /* Override any gcc2 internal prototype to avoid an error.  */
4124 /* We use char because int might match the return type of a gcc2
4125     builtin and then its argument prototype would still apply.  */
4126 char pthread_join();
4127
4128 int main() {
4129 pthread_join()
4130 ; return 0; }
4131 EOF
4132 if { (eval echo configure:4133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4133   rm -rf conftest*
4134   eval "ac_cv_lib_$ac_lib_var=yes"
4135 else
4136   echo "configure: failed program was:" >&5
4137   cat conftest.$ac_ext >&5
4138   rm -rf conftest*
4139   eval "ac_cv_lib_$ac_lib_var=no"
4140 fi
4141 rm -f conftest*
4142 LIBS="$ac_save_LIBS"
4143
4144 fi
4145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4146   echo "$ac_t""yes" 1>&6
4147   
4148                                 ol_link_threads=posix
4149                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads"
4150                                 
4151 else
4152   echo "$ac_t""no" 1>&6
4153 :
4154 fi
4155
4156                         LIBS="$save_LIBS"
4157                 fi
4158
4159                                 if test $ol_link_threads = no; then
4160                         save_LIBS="$LIBS"
4161                         LIBS="$LIBS -lpthread"
4162                         echo $ac_n "checking for pthread_create() in HP-UX -lpthread""... $ac_c" 1>&6
4163 echo "configure:4164: checking for pthread_create() in HP-UX -lpthread" >&5
4164                         ol_try_pthread_hpux_11=no
4165                         if eval "test \"`echo '$''{'ol_cv_pthread_hpux_11'+set}'`\" = set"; then
4166   echo $ac_n "(cached) $ac_c" 1>&6
4167 else
4168   
4169                                 cat > conftest.$ac_ext <<EOF
4170 #line 4171 "configure"
4171 #include "confdefs.h"
4172
4173 #include <pthread.h>
4174 #include <elf.h>
4175 #ifndef ELFABI_HPUX_REL11
4176         die horribly
4177 #endif
4178                                 
4179 int main() {
4180 pthread_create(NULL, NULL, NULL, NULL);
4181 ; return 0; }
4182 EOF
4183 if { (eval echo configure:4184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4184   rm -rf conftest*
4185   ol_try_pthread_hpux_11=yes
4186                                         ol_cv_pthread_hpux_11=yes
4187 else
4188   echo "configure: failed program was:" >&5
4189   cat conftest.$ac_ext >&5
4190   rm -rf conftest*
4191   ol_cv_pthread_hpux_11=no
4192 fi
4193 rm -f conftest*
4194 fi
4195
4196                         echo "$ac_t""yes" 1>&6
4197                         LIBS="$save_LIBS"
4198
4199                         if test $ol_cv_pthread_hpux_11=yes ; then
4200                                 ol_link_threads=posix
4201                                 LTHREAD_LIBS="$LTHREAD_LIBS -lpthread"
4202                                 if test $ol_try_pthread_hpux_11=yes ; then
4203                                                                                                                         ac_cv_func_pthread_attr_init=yes
4204                                 fi
4205                         fi
4206                 fi
4207
4208                 if test $ol_link_threads != no ; then
4209                         cat >> confdefs.h <<\EOF
4210 #define HAVE_PTHREADS 1
4211 EOF
4212
4213
4214                                                 save_CPPFLAGS="$CPPFLAGS"
4215                         save_LIBS="$LIBS"
4216                         LIBS="$LTHREAD_LIBS $LIBS"
4217
4218                                                                                                 for ac_func in sched_yield pthread_yield
4219 do
4220 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4221 echo "configure:4222: checking for $ac_func" >&5
4222 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4223   echo $ac_n "(cached) $ac_c" 1>&6
4224 else
4225   cat > conftest.$ac_ext <<EOF
4226 #line 4227 "configure"
4227 #include "confdefs.h"
4228 /* System header to define __stub macros and hopefully few prototypes,
4229     which can conflict with char $ac_func(); below.  */
4230 #include <assert.h>
4231 /* Override any gcc2 internal prototype to avoid an error.  */
4232 /* We use char because int might match the return type of a gcc2
4233     builtin and then its argument prototype would still apply.  */
4234 char $ac_func();
4235
4236 int main() {
4237
4238 /* The GNU C library defines this for functions which it implements
4239     to always fail with ENOSYS.  Some functions are actually named
4240     something starting with __ and the normal name is an alias.  */
4241 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4242 choke me
4243 #else
4244 $ac_func();
4245 #endif
4246
4247 ; return 0; }
4248 EOF
4249 if { (eval echo configure:4250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4250   rm -rf conftest*
4251   eval "ac_cv_func_$ac_func=yes"
4252 else
4253   echo "configure: failed program was:" >&5
4254   cat conftest.$ac_ext >&5
4255   rm -rf conftest*
4256   eval "ac_cv_func_$ac_func=no"
4257 fi
4258 rm -f conftest*
4259 fi
4260
4261 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4262   echo "$ac_t""yes" 1>&6
4263     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4264   cat >> confdefs.h <<EOF
4265 #define $ac_tr_func 1
4266 EOF
4267  
4268 else
4269   echo "$ac_t""no" 1>&6
4270 fi
4271 done
4272
4273
4274                         if test $ac_cv_func_sched_yield = no -a \
4275                                 $ac_cv_func_pthread_yield = no ; then
4276                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
4277 echo "configure:4278: checking for sched_yield in -lrt" >&5
4278 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
4279 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4280   echo $ac_n "(cached) $ac_c" 1>&6
4281 else
4282   ac_save_LIBS="$LIBS"
4283 LIBS="-lrt  $LIBS"
4284 cat > conftest.$ac_ext <<EOF
4285 #line 4286 "configure"
4286 #include "confdefs.h"
4287 /* Override any gcc2 internal prototype to avoid an error.  */
4288 /* We use char because int might match the return type of a gcc2
4289     builtin and then its argument prototype would still apply.  */
4290 char sched_yield();
4291
4292 int main() {
4293 sched_yield()
4294 ; return 0; }
4295 EOF
4296 if { (eval echo configure:4297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4297   rm -rf conftest*
4298   eval "ac_cv_lib_$ac_lib_var=yes"
4299 else
4300   echo "configure: failed program was:" >&5
4301   cat conftest.$ac_ext >&5
4302   rm -rf conftest*
4303   eval "ac_cv_lib_$ac_lib_var=no"
4304 fi
4305 rm -f conftest*
4306 LIBS="$ac_save_LIBS"
4307
4308 fi
4309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4310   echo "$ac_t""yes" 1>&6
4311   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
4312                                         cat >> confdefs.h <<\EOF
4313 #define HAVE_SCHED_YIELD 1
4314 EOF
4315
4316                                         ac_cv_func_sched_yield=yes
4317 else
4318   echo "$ac_t""no" 1>&6
4319 ac_cv_func_sched_yield=no
4320 fi
4321
4322                         fi
4323                         if test $ac_cv_func_sched_yield = no -a \
4324                                 $ac_cv_func_pthread_yield = no ; then
4325                                                                                                 for ac_func in thr_yield
4326 do
4327 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4328 echo "configure:4329: checking for $ac_func" >&5
4329 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4330   echo $ac_n "(cached) $ac_c" 1>&6
4331 else
4332   cat > conftest.$ac_ext <<EOF
4333 #line 4334 "configure"
4334 #include "confdefs.h"
4335 /* System header to define __stub macros and hopefully few prototypes,
4336     which can conflict with char $ac_func(); below.  */
4337 #include <assert.h>
4338 /* Override any gcc2 internal prototype to avoid an error.  */
4339 /* We use char because int might match the return type of a gcc2
4340     builtin and then its argument prototype would still apply.  */
4341 char $ac_func();
4342
4343 int main() {
4344
4345 /* The GNU C library defines this for functions which it implements
4346     to always fail with ENOSYS.  Some functions are actually named
4347     something starting with __ and the normal name is an alias.  */
4348 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4349 choke me
4350 #else
4351 $ac_func();
4352 #endif
4353
4354 ; return 0; }
4355 EOF
4356 if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4357   rm -rf conftest*
4358   eval "ac_cv_func_$ac_func=yes"
4359 else
4360   echo "configure: failed program was:" >&5
4361   cat conftest.$ac_ext >&5
4362   rm -rf conftest*
4363   eval "ac_cv_func_$ac_func=no"
4364 fi
4365 rm -f conftest*
4366 fi
4367
4368 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4369   echo "$ac_t""yes" 1>&6
4370     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4371   cat >> confdefs.h <<EOF
4372 #define $ac_tr_func 1
4373 EOF
4374  
4375 else
4376   echo "$ac_t""no" 1>&6
4377 fi
4378 done
4379
4380                         fi
4381                         if test $ac_cv_func_sched_yield = no -a \
4382                                 $ac_cv_func_pthread_yield = no -a \
4383                                 "$ac_cv_func_thr_yield" = no ; then
4384                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
4385                         fi
4386
4387                                                 for ac_func in pthread_kill pthread_detach
4388 do
4389 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4390 echo "configure:4391: checking for $ac_func" >&5
4391 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4392   echo $ac_n "(cached) $ac_c" 1>&6
4393 else
4394   cat > conftest.$ac_ext <<EOF
4395 #line 4396 "configure"
4396 #include "confdefs.h"
4397 /* System header to define __stub macros and hopefully few prototypes,
4398     which can conflict with char $ac_func(); below.  */
4399 #include <assert.h>
4400 /* Override any gcc2 internal prototype to avoid an error.  */
4401 /* We use char because int might match the return type of a gcc2
4402     builtin and then its argument prototype would still apply.  */
4403 char $ac_func();
4404
4405 int main() {
4406
4407 /* The GNU C library defines this for functions which it implements
4408     to always fail with ENOSYS.  Some functions are actually named
4409     something starting with __ and the normal name is an alias.  */
4410 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4411 choke me
4412 #else
4413 $ac_func();
4414 #endif
4415
4416 ; return 0; }
4417 EOF
4418 if { (eval echo configure:4419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4419   rm -rf conftest*
4420   eval "ac_cv_func_$ac_func=yes"
4421 else
4422   echo "configure: failed program was:" >&5
4423   cat conftest.$ac_ext >&5
4424   rm -rf conftest*
4425   eval "ac_cv_func_$ac_func=no"
4426 fi
4427 rm -f conftest*
4428 fi
4429
4430 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4431   echo "$ac_t""yes" 1>&6
4432     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4433   cat >> confdefs.h <<EOF
4434 #define $ac_tr_func 1
4435 EOF
4436  
4437 else
4438   echo "$ac_t""no" 1>&6
4439 fi
4440 done
4441
4442
4443                         if test $ac_cv_func_pthread_detach = no ; then
4444                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
4445                         fi
4446
4447                                                 for ac_func in \
4448                                 pthread_setconcurrency \
4449                                 pthread_getconcurrency \
4450                                 thr_setconcurrency \
4451                                 thr_getconcurrency \
4452                         
4453 do
4454 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4455 echo "configure:4456: checking for $ac_func" >&5
4456 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4457   echo $ac_n "(cached) $ac_c" 1>&6
4458 else
4459   cat > conftest.$ac_ext <<EOF
4460 #line 4461 "configure"
4461 #include "confdefs.h"
4462 /* System header to define __stub macros and hopefully few prototypes,
4463     which can conflict with char $ac_func(); below.  */
4464 #include <assert.h>
4465 /* Override any gcc2 internal prototype to avoid an error.  */
4466 /* We use char because int might match the return type of a gcc2
4467     builtin and then its argument prototype would still apply.  */
4468 char $ac_func();
4469
4470 int main() {
4471
4472 /* The GNU C library defines this for functions which it implements
4473     to always fail with ENOSYS.  Some functions are actually named
4474     something starting with __ and the normal name is an alias.  */
4475 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4476 choke me
4477 #else
4478 $ac_func();
4479 #endif
4480
4481 ; return 0; }
4482 EOF
4483 if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4484   rm -rf conftest*
4485   eval "ac_cv_func_$ac_func=yes"
4486 else
4487   echo "configure: failed program was:" >&5
4488   cat conftest.$ac_ext >&5
4489   rm -rf conftest*
4490   eval "ac_cv_func_$ac_func=no"
4491 fi
4492 rm -f conftest*
4493 fi
4494
4495 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4496   echo "$ac_t""yes" 1>&6
4497     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4498   cat >> confdefs.h <<EOF
4499 #define $ac_tr_func 1
4500 EOF
4501  
4502 else
4503   echo "$ac_t""no" 1>&6
4504 fi
4505 done
4506
4507
4508                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
4509 echo "configure:4510: checking if pthread_create() works" >&5
4510                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
4511   echo $ac_n "(cached) $ac_c" 1>&6
4512 else
4513   
4514                         if test "$cross_compiling" = yes; then
4515                                 ol_cv_pthread_create_works=yes
4516 else
4517   cat > conftest.$ac_ext <<EOF
4518 #line 4519 "configure"
4519 #include "confdefs.h"
4520
4521 #include <pthread.h>
4522 #ifndef NULL
4523 #define NULL (void*)0
4524 #endif
4525
4526 static void *task(p)
4527         void *p;
4528 {
4529         return (void *) (p == NULL);
4530 }
4531
4532 int main(argc, argv)
4533         int argc;
4534         char **argv;
4535 {
4536         pthread_t t;
4537         exit(pthread_create(&t, NULL, task, NULL));
4538 }
4539
4540 EOF
4541 if { (eval echo configure:4542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4542 then
4543   ol_cv_pthread_create_works=yes
4544 else
4545   echo "configure: failed program was:" >&5
4546   cat conftest.$ac_ext >&5
4547   rm -fr conftest*
4548   ol_cv_pthread_create_works=no
4549 fi
4550 rm -fr conftest*
4551 fi
4552
4553 fi
4554
4555                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
4556
4557                         if test $ol_cv_pthread_create_works = no ; then
4558                                 { echo "configure: error: pthread.h and pthread_create are not compatible" 1>&2; exit 1; }
4559                         fi
4560
4561                                                 if test $ol_with_yielding_select = auto ; then
4562                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
4563 echo "configure:4564: checking if select yields when using pthreads" >&5
4564                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
4565   echo $ac_n "(cached) $ac_c" 1>&6
4566 else
4567   
4568                                 if test "$cross_compiling" = yes; then
4569   
4570                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
4571 else
4572   cat > conftest.$ac_ext <<EOF
4573 #line 4574 "configure"
4574 #include "confdefs.h"
4575
4576 #include <sys/types.h>
4577 #include <sys/time.h>
4578 #include <unistd.h>
4579 #include <pthread.h>
4580 #ifndef NULL
4581 #define NULL (void*) 0
4582 #endif
4583
4584 static int fildes[2];
4585
4586 static void *task(p)
4587         void *p;
4588 {
4589         int i;
4590         struct timeval tv;
4591
4592         fd_set rfds;
4593
4594         tv.tv_sec=10;
4595         tv.tv_usec=0;
4596
4597         FD_ZERO(&rfds);
4598         FD_SET(fildes[0], &rfds);
4599
4600         /* we're not interested in any fds */
4601         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
4602
4603         if(i < 0) {
4604                 perror("select");
4605                 exit(10);
4606         }
4607
4608         exit(0); /* if we exit here, the select blocked the whole process */
4609 }
4610
4611 int main(argc, argv)
4612         int argc;
4613         char **argv;
4614 {
4615         pthread_t t;
4616
4617         /* create a pipe to select */
4618         if(pipe(&fildes[0])) {
4619                 perror("select");
4620                 exit(1);
4621         }
4622
4623 #ifdef HAVE_PTHREAD_SETCONCURRENCY
4624         (void) pthread_setconcurrency(2);
4625 #else
4626 #ifdef HAVE_THR_SETCONCURRENCY
4627         /* Set Solaris LWP concurrency to 2 */
4628         thr_setconcurrency(2);
4629 #endif
4630 #endif
4631
4632         pthread_create(&t, NULL, task, NULL);
4633
4634 #if HAVE_SCHED_YIELD
4635         sched_yield();  /* make sure task runs first */
4636 #else
4637 #ifdef HAVE_PTHREAD_YIELD
4638         pthread_yield();        /* make sure task runs first */
4639 #endif
4640 #endif
4641
4642         exit(2);
4643 }
4644 EOF
4645 if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4646 then
4647   ol_cv_pthread_select_yields=no
4648 else
4649   echo "configure: failed program was:" >&5
4650   cat conftest.$ac_ext >&5
4651   rm -fr conftest*
4652   ol_cv_pthread_select_yields=yes
4653 fi
4654 rm -fr conftest*
4655 fi
4656
4657 fi
4658
4659                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
4660
4661                                 if test $ol_cv_pthread_select_yields = yes ; then
4662                                         ol_with_yielding_select=yes
4663                                 fi
4664                         fi
4665
4666                                                 CPPFLAGS="$save_CPPFLAGS"
4667                         LIBS="$save_LIBS"
4668                 else
4669                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
4670                 fi
4671         fi
4672
4673         if test $ol_with_threads = posix ; then
4674                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
4675         fi
4676 fi
4677
4678 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4679         -o $ol_with_threads = mach ; then
4680
4681                 for ac_hdr in mach/cthreads.h
4682 do
4683 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4684 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4685 echo "configure:4686: checking for $ac_hdr" >&5
4686 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4687   echo $ac_n "(cached) $ac_c" 1>&6
4688 else
4689   cat > conftest.$ac_ext <<EOF
4690 #line 4691 "configure"
4691 #include "confdefs.h"
4692 #include <$ac_hdr>
4693 EOF
4694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4695 { (eval echo configure:4696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4697 if test -z "$ac_err"; then
4698   rm -rf conftest*
4699   eval "ac_cv_header_$ac_safe=yes"
4700 else
4701   echo "$ac_err" >&5
4702   echo "configure: failed program was:" >&5
4703   cat conftest.$ac_ext >&5
4704   rm -rf conftest*
4705   eval "ac_cv_header_$ac_safe=no"
4706 fi
4707 rm -f conftest*
4708 fi
4709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4710   echo "$ac_t""yes" 1>&6
4711     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4712   cat >> confdefs.h <<EOF
4713 #define $ac_tr_hdr 1
4714 EOF
4715  
4716 else
4717   echo "$ac_t""no" 1>&6
4718 fi
4719 done
4720
4721         if test $ac_cv_header_mach_cthreads_h = yes ; then
4722                 ol_with_threads=found
4723
4724                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
4725 echo "configure:4726: checking for cthread_fork" >&5
4726 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
4727   echo $ac_n "(cached) $ac_c" 1>&6
4728 else
4729   cat > conftest.$ac_ext <<EOF
4730 #line 4731 "configure"
4731 #include "confdefs.h"
4732 /* System header to define __stub macros and hopefully few prototypes,
4733     which can conflict with char cthread_fork(); below.  */
4734 #include <assert.h>
4735 /* Override any gcc2 internal prototype to avoid an error.  */
4736 /* We use char because int might match the return type of a gcc2
4737     builtin and then its argument prototype would still apply.  */
4738 char cthread_fork();
4739
4740 int main() {
4741
4742 /* The GNU C library defines this for functions which it implements
4743     to always fail with ENOSYS.  Some functions are actually named
4744     something starting with __ and the normal name is an alias.  */
4745 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
4746 choke me
4747 #else
4748 cthread_fork();
4749 #endif
4750
4751 ; return 0; }
4752 EOF
4753 if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4754   rm -rf conftest*
4755   eval "ac_cv_func_cthread_fork=yes"
4756 else
4757   echo "configure: failed program was:" >&5
4758   cat conftest.$ac_ext >&5
4759   rm -rf conftest*
4760   eval "ac_cv_func_cthread_fork=no"
4761 fi
4762 rm -f conftest*
4763 fi
4764
4765 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
4766   echo "$ac_t""yes" 1>&6
4767   ol_link_threads=yes
4768 else
4769   echo "$ac_t""no" 1>&6
4770 fi
4771
4772
4773                 if test $ol_link_threads = no ; then
4774                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
4775 echo "configure:4776: checking for cthread_fork with -all_load" >&5
4776 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
4777   echo $ac_n "(cached) $ac_c" 1>&6
4778 else
4779   
4780                                                                 save_LIBS="$LIBS"
4781                                 LIBS="-all_load $LIBS"
4782                                 cat > conftest.$ac_ext <<EOF
4783 #line 4784 "configure"
4784 #include "confdefs.h"
4785 #include <mach/cthreads.h>
4786 int main() {
4787
4788                                         cthread_fork((void *)0, (void *)0);
4789                                         
4790 ; return 0; }
4791 EOF
4792 if { (eval echo configure:4793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4793   rm -rf conftest*
4794   ol_cv_cthread_all_load=yes
4795 else
4796   echo "configure: failed program was:" >&5
4797   cat conftest.$ac_ext >&5
4798   rm -rf conftest*
4799   ol_cv_cthread_all_load=no
4800 fi
4801 rm -f conftest*
4802                                                                 LIBS="$save_LIBS"
4803                         
4804 fi
4805
4806 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
4807
4808                         if test $ol_cv_cthread_all_load = yes ; then
4809                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
4810                                 ol_link_threads=mach
4811                         fi
4812                 fi
4813
4814                 if test $ol_link_threads != no ; then
4815                         : check for cthread specific functionality here
4816                         cat >> confdefs.h <<\EOF
4817 #define HAVE_MACH_CTHREADS 1
4818 EOF
4819
4820                 else
4821                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
4822                 fi
4823         fi
4824
4825         if test $ol_with_threads = mach ; then
4826                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
4827         fi
4828 fi
4829
4830 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4831         -o $ol_with_threads = lwp ; then
4832
4833                 for ac_hdr in thread.h synch.h
4834 do
4835 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4836 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4837 echo "configure:4838: checking for $ac_hdr" >&5
4838 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4839   echo $ac_n "(cached) $ac_c" 1>&6
4840 else
4841   cat > conftest.$ac_ext <<EOF
4842 #line 4843 "configure"
4843 #include "confdefs.h"
4844 #include <$ac_hdr>
4845 EOF
4846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4847 { (eval echo configure:4848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4849 if test -z "$ac_err"; then
4850   rm -rf conftest*
4851   eval "ac_cv_header_$ac_safe=yes"
4852 else
4853   echo "$ac_err" >&5
4854   echo "configure: failed program was:" >&5
4855   cat conftest.$ac_ext >&5
4856   rm -rf conftest*
4857   eval "ac_cv_header_$ac_safe=no"
4858 fi
4859 rm -f conftest*
4860 fi
4861 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4862   echo "$ac_t""yes" 1>&6
4863     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4864   cat >> confdefs.h <<EOF
4865 #define $ac_tr_hdr 1
4866 EOF
4867  
4868 else
4869   echo "$ac_t""no" 1>&6
4870 fi
4871 done
4872
4873         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
4874                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
4875 echo "configure:4876: checking for thr_create in -lthread" >&5
4876 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
4877 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4878   echo $ac_n "(cached) $ac_c" 1>&6
4879 else
4880   ac_save_LIBS="$LIBS"
4881 LIBS="-lthread  $LIBS"
4882 cat > conftest.$ac_ext <<EOF
4883 #line 4884 "configure"
4884 #include "confdefs.h"
4885 /* Override any gcc2 internal prototype to avoid an error.  */
4886 /* We use char because int might match the return type of a gcc2
4887     builtin and then its argument prototype would still apply.  */
4888 char thr_create();
4889
4890 int main() {
4891 thr_create()
4892 ; return 0; }
4893 EOF
4894 if { (eval echo configure:4895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4895   rm -rf conftest*
4896   eval "ac_cv_lib_$ac_lib_var=yes"
4897 else
4898   echo "configure: failed program was:" >&5
4899   cat conftest.$ac_ext >&5
4900   rm -rf conftest*
4901   eval "ac_cv_lib_$ac_lib_var=no"
4902 fi
4903 rm -f conftest*
4904 LIBS="$ac_save_LIBS"
4905
4906 fi
4907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4908   echo "$ac_t""yes" 1>&6
4909   have_thr=yes
4910 else
4911   echo "$ac_t""no" 1>&6
4912 have_thr=no
4913 fi
4914
4915
4916                 if test $have_thr = yes ; then
4917                         cat >> confdefs.h <<\EOF
4918 #define HAVE_THR 1
4919 EOF
4920
4921                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
4922                         ol_link_threads=thr
4923
4924                         if test $ol_with_yielding_select = auto ; then
4925                                 ol_with_yielding_select=yes
4926                         fi
4927
4928                                                 for ac_func in \
4929                                 thr_setconcurrency \
4930                                 thr_getconcurrency \
4931                         
4932 do
4933 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4934 echo "configure:4935: checking for $ac_func" >&5
4935 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4936   echo $ac_n "(cached) $ac_c" 1>&6
4937 else
4938   cat > conftest.$ac_ext <<EOF
4939 #line 4940 "configure"
4940 #include "confdefs.h"
4941 /* System header to define __stub macros and hopefully few prototypes,
4942     which can conflict with char $ac_func(); below.  */
4943 #include <assert.h>
4944 /* Override any gcc2 internal prototype to avoid an error.  */
4945 /* We use char because int might match the return type of a gcc2
4946     builtin and then its argument prototype would still apply.  */
4947 char $ac_func();
4948
4949 int main() {
4950
4951 /* The GNU C library defines this for functions which it implements
4952     to always fail with ENOSYS.  Some functions are actually named
4953     something starting with __ and the normal name is an alias.  */
4954 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4955 choke me
4956 #else
4957 $ac_func();
4958 #endif
4959
4960 ; return 0; }
4961 EOF
4962 if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4963   rm -rf conftest*
4964   eval "ac_cv_func_$ac_func=yes"
4965 else
4966   echo "configure: failed program was:" >&5
4967   cat conftest.$ac_ext >&5
4968   rm -rf conftest*
4969   eval "ac_cv_func_$ac_func=no"
4970 fi
4971 rm -f conftest*
4972 fi
4973
4974 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4975   echo "$ac_t""yes" 1>&6
4976     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4977   cat >> confdefs.h <<EOF
4978 #define $ac_tr_func 1
4979 EOF
4980  
4981 else
4982   echo "$ac_t""no" 1>&6
4983 fi
4984 done
4985
4986                 fi
4987         fi
4988
4989                 for ac_hdr in lwp/lwp.h
4990 do
4991 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4992 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4993 echo "configure:4994: checking for $ac_hdr" >&5
4994 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4995   echo $ac_n "(cached) $ac_c" 1>&6
4996 else
4997   cat > conftest.$ac_ext <<EOF
4998 #line 4999 "configure"
4999 #include "confdefs.h"
5000 #include <$ac_hdr>
5001 EOF
5002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5003 { (eval echo configure:5004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5005 if test -z "$ac_err"; then
5006   rm -rf conftest*
5007   eval "ac_cv_header_$ac_safe=yes"
5008 else
5009   echo "$ac_err" >&5
5010   echo "configure: failed program was:" >&5
5011   cat conftest.$ac_ext >&5
5012   rm -rf conftest*
5013   eval "ac_cv_header_$ac_safe=no"
5014 fi
5015 rm -f conftest*
5016 fi
5017 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5018   echo "$ac_t""yes" 1>&6
5019     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5020   cat >> confdefs.h <<EOF
5021 #define $ac_tr_hdr 1
5022 EOF
5023  
5024 else
5025   echo "$ac_t""no" 1>&6
5026 fi
5027 done
5028
5029         if test $ac_cv_header_lwp_lwp_h = yes ; then
5030                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
5031 echo "configure:5032: checking for lwp_create in -llwp" >&5
5032 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
5033 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5034   echo $ac_n "(cached) $ac_c" 1>&6
5035 else
5036   ac_save_LIBS="$LIBS"
5037 LIBS="-llwp  $LIBS"
5038 cat > conftest.$ac_ext <<EOF
5039 #line 5040 "configure"
5040 #include "confdefs.h"
5041 /* Override any gcc2 internal prototype to avoid an error.  */
5042 /* We use char because int might match the return type of a gcc2
5043     builtin and then its argument prototype would still apply.  */
5044 char lwp_create();
5045
5046 int main() {
5047 lwp_create()
5048 ; return 0; }
5049 EOF
5050 if { (eval echo configure:5051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5051   rm -rf conftest*
5052   eval "ac_cv_lib_$ac_lib_var=yes"
5053 else
5054   echo "configure: failed program was:" >&5
5055   cat conftest.$ac_ext >&5
5056   rm -rf conftest*
5057   eval "ac_cv_lib_$ac_lib_var=no"
5058 fi
5059 rm -f conftest*
5060 LIBS="$ac_save_LIBS"
5061
5062 fi
5063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5064   echo "$ac_t""yes" 1>&6
5065   have_lwp=yes
5066 else
5067   echo "$ac_t""no" 1>&6
5068 have_lwp=no
5069 fi
5070
5071
5072                 if test $have_lwp = yes ; then
5073                         cat >> confdefs.h <<\EOF
5074 #define HAVE_LWP 1
5075 EOF
5076
5077                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
5078                         ol_link_threads=lwp
5079
5080                         if test $ol_with_yielding_select = auto ; then
5081                                 ol_with_yielding_select=no
5082                         fi
5083                 fi
5084         fi
5085 fi
5086
5087 if test $ol_with_yielding_select = yes ; then
5088         cat >> confdefs.h <<\EOF
5089 #define HAVE_YIELDING_SELECT 1
5090 EOF
5091
5092 fi
5093
5094 if test $ol_with_threads = manual ; then
5095                 ol_link_threads=yes
5096
5097         echo "configure: warning: thread defines and link options must be set manually" 1>&2
5098
5099         for ac_hdr in pthread.h sched.h
5100 do
5101 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5102 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5103 echo "configure:5104: checking for $ac_hdr" >&5
5104 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5105   echo $ac_n "(cached) $ac_c" 1>&6
5106 else
5107   cat > conftest.$ac_ext <<EOF
5108 #line 5109 "configure"
5109 #include "confdefs.h"
5110 #include <$ac_hdr>
5111 EOF
5112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5113 { (eval echo configure:5114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5114 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5115 if test -z "$ac_err"; then
5116   rm -rf conftest*
5117   eval "ac_cv_header_$ac_safe=yes"
5118 else
5119   echo "$ac_err" >&5
5120   echo "configure: failed program was:" >&5
5121   cat conftest.$ac_ext >&5
5122   rm -rf conftest*
5123   eval "ac_cv_header_$ac_safe=no"
5124 fi
5125 rm -f conftest*
5126 fi
5127 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5128   echo "$ac_t""yes" 1>&6
5129     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5130   cat >> confdefs.h <<EOF
5131 #define $ac_tr_hdr 1
5132 EOF
5133  
5134 else
5135   echo "$ac_t""no" 1>&6
5136 fi
5137 done
5138
5139         for ac_func in sched_yield pthread_yield
5140 do
5141 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5142 echo "configure:5143: checking for $ac_func" >&5
5143 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5144   echo $ac_n "(cached) $ac_c" 1>&6
5145 else
5146   cat > conftest.$ac_ext <<EOF
5147 #line 5148 "configure"
5148 #include "confdefs.h"
5149 /* System header to define __stub macros and hopefully few prototypes,
5150     which can conflict with char $ac_func(); below.  */
5151 #include <assert.h>
5152 /* Override any gcc2 internal prototype to avoid an error.  */
5153 /* We use char because int might match the return type of a gcc2
5154     builtin and then its argument prototype would still apply.  */
5155 char $ac_func();
5156
5157 int main() {
5158
5159 /* The GNU C library defines this for functions which it implements
5160     to always fail with ENOSYS.  Some functions are actually named
5161     something starting with __ and the normal name is an alias.  */
5162 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5163 choke me
5164 #else
5165 $ac_func();
5166 #endif
5167
5168 ; return 0; }
5169 EOF
5170 if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5171   rm -rf conftest*
5172   eval "ac_cv_func_$ac_func=yes"
5173 else
5174   echo "configure: failed program was:" >&5
5175   cat conftest.$ac_ext >&5
5176   rm -rf conftest*
5177   eval "ac_cv_func_$ac_func=no"
5178 fi
5179 rm -f conftest*
5180 fi
5181
5182 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5183   echo "$ac_t""yes" 1>&6
5184     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5185   cat >> confdefs.h <<EOF
5186 #define $ac_tr_func 1
5187 EOF
5188  
5189 else
5190   echo "$ac_t""no" 1>&6
5191 fi
5192 done
5193
5194         
5195 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6
5196 echo "configure:5197: checking for LinuxThreads" >&5
5197 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
5198   echo $ac_n "(cached) $ac_c" 1>&6
5199 else
5200   
5201         res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
5202         if test "$res" -gt 0 ; then
5203                 ol_cv_linux_threads=yes
5204         else
5205                 ol_cv_linux_threads=no
5206         fi
5207
5208 fi
5209
5210 echo "$ac_t""$ol_cv_linux_threads" 1>&6
5211
5212
5213         for ac_hdr in mach/cthreads.h
5214 do
5215 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5216 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5217 echo "configure:5218: checking for $ac_hdr" >&5
5218 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5219   echo $ac_n "(cached) $ac_c" 1>&6
5220 else
5221   cat > conftest.$ac_ext <<EOF
5222 #line 5223 "configure"
5223 #include "confdefs.h"
5224 #include <$ac_hdr>
5225 EOF
5226 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5227 { (eval echo configure:5228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5228 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5229 if test -z "$ac_err"; then
5230   rm -rf conftest*
5231   eval "ac_cv_header_$ac_safe=yes"
5232 else
5233   echo "$ac_err" >&5
5234   echo "configure: failed program was:" >&5
5235   cat conftest.$ac_ext >&5
5236   rm -rf conftest*
5237   eval "ac_cv_header_$ac_safe=no"
5238 fi
5239 rm -f conftest*
5240 fi
5241 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5242   echo "$ac_t""yes" 1>&6
5243     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5244   cat >> confdefs.h <<EOF
5245 #define $ac_tr_hdr 1
5246 EOF
5247  
5248 else
5249   echo "$ac_t""no" 1>&6
5250 fi
5251 done
5252
5253         for ac_hdr in lwp/lwp.h
5254 do
5255 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5256 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5257 echo "configure:5258: checking for $ac_hdr" >&5
5258 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5259   echo $ac_n "(cached) $ac_c" 1>&6
5260 else
5261   cat > conftest.$ac_ext <<EOF
5262 #line 5263 "configure"
5263 #include "confdefs.h"
5264 #include <$ac_hdr>
5265 EOF
5266 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5267 { (eval echo configure:5268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5268 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5269 if test -z "$ac_err"; then
5270   rm -rf conftest*
5271   eval "ac_cv_header_$ac_safe=yes"
5272 else
5273   echo "$ac_err" >&5
5274   echo "configure: failed program was:" >&5
5275   cat conftest.$ac_ext >&5
5276   rm -rf conftest*
5277   eval "ac_cv_header_$ac_safe=no"
5278 fi
5279 rm -f conftest*
5280 fi
5281 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5282   echo "$ac_t""yes" 1>&6
5283     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5284   cat >> confdefs.h <<EOF
5285 #define $ac_tr_hdr 1
5286 EOF
5287  
5288 else
5289   echo "$ac_t""no" 1>&6
5290 fi
5291 done
5292
5293         for ac_hdr in thread.h synch.h
5294 do
5295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5296 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5297 echo "configure:5298: checking for $ac_hdr" >&5
5298 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5299   echo $ac_n "(cached) $ac_c" 1>&6
5300 else
5301   cat > conftest.$ac_ext <<EOF
5302 #line 5303 "configure"
5303 #include "confdefs.h"
5304 #include <$ac_hdr>
5305 EOF
5306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5307 { (eval echo configure:5308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5309 if test -z "$ac_err"; then
5310   rm -rf conftest*
5311   eval "ac_cv_header_$ac_safe=yes"
5312 else
5313   echo "$ac_err" >&5
5314   echo "configure: failed program was:" >&5
5315   cat conftest.$ac_ext >&5
5316   rm -rf conftest*
5317   eval "ac_cv_header_$ac_safe=no"
5318 fi
5319 rm -f conftest*
5320 fi
5321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5322   echo "$ac_t""yes" 1>&6
5323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5324   cat >> confdefs.h <<EOF
5325 #define $ac_tr_hdr 1
5326 EOF
5327  
5328 else
5329   echo "$ac_t""no" 1>&6
5330 fi
5331 done
5332
5333 fi
5334
5335 if test $ol_link_threads != no ; then  
5336                         cat >> confdefs.h <<\EOF
5337 #define REENTRANT 1
5338 EOF
5339
5340         cat >> confdefs.h <<\EOF
5341 #define _REENTRANT 1
5342 EOF
5343
5344         cat >> confdefs.h <<\EOF
5345 #define THREAD_SAFE 1
5346 EOF
5347
5348         cat >> confdefs.h <<\EOF
5349 #define _THREAD_SAFE 1
5350 EOF
5351
5352         cat >> confdefs.h <<\EOF
5353 #define THREADSAFE 1
5354 EOF
5355
5356         cat >> confdefs.h <<\EOF
5357 #define _THREADSAFE 1
5358 EOF
5359
5360
5361                                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
5362 echo "configure:5363: checking for thread specific errno" >&5
5363 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
5364   echo $ac_n "(cached) $ac_c" 1>&6
5365 else
5366   
5367                 cat > conftest.$ac_ext <<EOF
5368 #line 5369 "configure"
5369 #include "confdefs.h"
5370
5371 #include <errno.h>
5372                         
5373 int main() {
5374
5375 int x = errno;
5376                         
5377 ; return 0; }
5378 EOF
5379 if { (eval echo configure:5380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5380   rm -rf conftest*
5381   ol_cv_errno_thread_specific=yes
5382 else
5383   echo "configure: failed program was:" >&5
5384   cat conftest.$ac_ext >&5
5385   rm -rf conftest*
5386   ol_cv_errno_thread_specific=no
5387 fi
5388 rm -f conftest*
5389         
5390 fi
5391
5392 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
5393
5394         if test $ol_cv_errno_thread_specific != yes ; then
5395                 LIBS="$LTHREAD_LIBS $LIBS"
5396                 LTHREAD_LIBS=""
5397         fi
5398
5399 fi  
5400
5401
5402 if test $ol_link_threads = no ; then
5403         if test $ol_with_threads = yes ; then
5404                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
5405         fi
5406
5407         if test $ol_with_threads = auto ; then
5408                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
5409                 ol_with_threads=no
5410         fi
5411
5412         cat >> confdefs.h <<\EOF
5413 #define NO_THREADS 1
5414 EOF
5415
5416         LTHREAD_LIBS=""
5417 fi
5418
5419 ol_link_ldbm=no 
5420 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
5421         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
5422 echo "configure:5423: checking for DB2 library" >&5
5423 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
5424   echo $ac_n "(cached) $ac_c" 1>&6
5425 else
5426         ol_LIBS="$LIBS"
5427         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
5428 echo "configure:5429: checking for db_open in -ldb" >&5
5429 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
5430 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5431   echo $ac_n "(cached) $ac_c" 1>&6
5432 else
5433   ac_save_LIBS="$LIBS"
5434 LIBS="-ldb  $LIBS"
5435 cat > conftest.$ac_ext <<EOF
5436 #line 5437 "configure"
5437 #include "confdefs.h"
5438 /* Override any gcc2 internal prototype to avoid an error.  */
5439 /* We use char because int might match the return type of a gcc2
5440     builtin and then its argument prototype would still apply.  */
5441 char db_open();
5442
5443 int main() {
5444 db_open()
5445 ; return 0; }
5446 EOF
5447 if { (eval echo configure:5448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5448   rm -rf conftest*
5449   eval "ac_cv_lib_$ac_lib_var=yes"
5450 else
5451   echo "configure: failed program was:" >&5
5452   cat conftest.$ac_ext >&5
5453   rm -rf conftest*
5454   eval "ac_cv_lib_$ac_lib_var=no"
5455 fi
5456 rm -f conftest*
5457 LIBS="$ac_save_LIBS"
5458
5459 fi
5460 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5461   echo "$ac_t""yes" 1>&6
5462   ol_cv_lib_db2=-ldb
5463 else
5464   echo "$ac_t""no" 1>&6
5465 ol_cv_lib_db2=no
5466 fi
5467
5468         LIBS="$ol_LIBS"
5469
5470 fi
5471
5472 echo "$ac_t""$ol_cv_lib_db2" 1>&6
5473
5474 for ac_hdr in db.h
5475 do
5476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5478 echo "configure:5479: checking for $ac_hdr" >&5
5479 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5480   echo $ac_n "(cached) $ac_c" 1>&6
5481 else
5482   cat > conftest.$ac_ext <<EOF
5483 #line 5484 "configure"
5484 #include "confdefs.h"
5485 #include <$ac_hdr>
5486 EOF
5487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5488 { (eval echo configure:5489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5490 if test -z "$ac_err"; then
5491   rm -rf conftest*
5492   eval "ac_cv_header_$ac_safe=yes"
5493 else
5494   echo "$ac_err" >&5
5495   echo "configure: failed program was:" >&5
5496   cat conftest.$ac_ext >&5
5497   rm -rf conftest*
5498   eval "ac_cv_header_$ac_safe=no"
5499 fi
5500 rm -f conftest*
5501 fi
5502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5503   echo "$ac_t""yes" 1>&6
5504     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5505   cat >> confdefs.h <<EOF
5506 #define $ac_tr_hdr 1
5507 EOF
5508  
5509 else
5510   echo "$ac_t""no" 1>&6
5511 fi
5512 done
5513
5514 if test $ac_cv_header_db_h = yes ; then
5515         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
5516 echo "configure:5517: checking if db.h is DB2" >&5
5517 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
5518   echo $ac_n "(cached) $ac_c" 1>&6
5519 else
5520   
5521                 cat > conftest.$ac_ext <<EOF
5522 #line 5523 "configure"
5523 #include "confdefs.h"
5524
5525 #                       include <db.h>
5526                         /* this check could be improved */
5527 #                       ifdef DB_VERSION_MAJOR
5528 #                               if DB_VERSION_MAJOR == 2
5529                                         __db_version_2
5530 #                               endif
5531 #                       endif
5532                 
5533 EOF
5534 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5535   egrep "__db_version_2" >/dev/null 2>&1; then
5536   rm -rf conftest*
5537   ol_cv_header_db2=yes
5538 else
5539   rm -rf conftest*
5540   ol_cv_header_db2=no
5541 fi
5542 rm -f conftest*
5543
5544 fi
5545
5546 echo "$ac_t""$ol_cv_header_db2" 1>&6
5547 else
5548         ol_cv_header_db2=no
5549 fi
5550
5551
5552  
5553  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
5554 echo "configure:5555: checking for Berkeley DB2" >&5
5555 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
5556   echo $ac_n "(cached) $ac_c" 1>&6
5557 else
5558   
5559         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
5560                 ol_cv_berkeley_db2=no
5561         else
5562                 ol_cv_berkeley_db2=yes
5563         fi
5564
5565 fi
5566
5567 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
5568  if test $ol_cv_berkeley_db2 = yes ; then
5569         cat >> confdefs.h <<\EOF
5570 #define HAVE_BERKELEY_DB2 1
5571 EOF
5572
5573  fi
5574
5575
5576         if test $ol_cv_berkeley_db2 = yes ; then
5577                 ol_link_ldbm=db2
5578                 ol_with_ldbm_api=db2
5579
5580                 if test $ol_with_ldbm_type = hash ; then
5581                         cat >> confdefs.h <<\EOF
5582 #define LDBM_USE_DBHASH 1
5583 EOF
5584
5585                 else
5586                         cat >> confdefs.h <<\EOF
5587 #define LDBM_USE_DBBTREE 1
5588 EOF
5589
5590                 fi
5591
5592                                                 if test $ol_cv_lib_db2 != yes ; then
5593                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
5594                 fi
5595         fi
5596 fi
5597
5598 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
5599         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
5600 echo "configure:5601: checking for Berkeley DB library" >&5
5601 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
5602   echo $ac_n "(cached) $ac_c" 1>&6
5603 else
5604         ol_LIBS="$LIBS"
5605         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
5606 echo "configure:5607: checking for dbopen" >&5
5607 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
5608   echo $ac_n "(cached) $ac_c" 1>&6
5609 else
5610   cat > conftest.$ac_ext <<EOF
5611 #line 5612 "configure"
5612 #include "confdefs.h"
5613 /* System header to define __stub macros and hopefully few prototypes,
5614     which can conflict with char dbopen(); below.  */
5615 #include <assert.h>
5616 /* Override any gcc2 internal prototype to avoid an error.  */
5617 /* We use char because int might match the return type of a gcc2
5618     builtin and then its argument prototype would still apply.  */
5619 char dbopen();
5620
5621 int main() {
5622
5623 /* The GNU C library defines this for functions which it implements
5624     to always fail with ENOSYS.  Some functions are actually named
5625     something starting with __ and the normal name is an alias.  */
5626 #if defined (__stub_dbopen) || defined (__stub___dbopen)
5627 choke me
5628 #else
5629 dbopen();
5630 #endif
5631
5632 ; return 0; }
5633 EOF
5634 if { (eval echo configure:5635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5635   rm -rf conftest*
5636   eval "ac_cv_func_dbopen=yes"
5637 else
5638   echo "configure: failed program was:" >&5
5639   cat conftest.$ac_ext >&5
5640   rm -rf conftest*
5641   eval "ac_cv_func_dbopen=no"
5642 fi
5643 rm -f conftest*
5644 fi
5645
5646 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
5647   echo "$ac_t""yes" 1>&6
5648   ol_cv_lib_db=yes
5649 else
5650   echo "$ac_t""no" 1>&6
5651
5652                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
5653 echo "configure:5654: checking for dbopen in -ldb" >&5
5654 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
5655 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5656   echo $ac_n "(cached) $ac_c" 1>&6
5657 else
5658   ac_save_LIBS="$LIBS"
5659 LIBS="-ldb  $LIBS"
5660 cat > conftest.$ac_ext <<EOF
5661 #line 5662 "configure"
5662 #include "confdefs.h"
5663 /* Override any gcc2 internal prototype to avoid an error.  */
5664 /* We use char because int might match the return type of a gcc2
5665     builtin and then its argument prototype would still apply.  */
5666 char dbopen();
5667
5668 int main() {
5669 dbopen()
5670 ; return 0; }
5671 EOF
5672 if { (eval echo configure:5673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5673   rm -rf conftest*
5674   eval "ac_cv_lib_$ac_lib_var=yes"
5675 else
5676   echo "configure: failed program was:" >&5
5677   cat conftest.$ac_ext >&5
5678   rm -rf conftest*
5679   eval "ac_cv_lib_$ac_lib_var=no"
5680 fi
5681 rm -f conftest*
5682 LIBS="$ac_save_LIBS"
5683
5684 fi
5685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5686   echo "$ac_t""yes" 1>&6
5687   ol_cv_lib_db=-ldb
5688 else
5689   echo "$ac_t""no" 1>&6
5690 ol_cv_lib_db=no
5691 fi
5692
5693         
5694 fi
5695
5696         LIBS="$ol_LIBS"
5697
5698 fi
5699
5700 echo "$ac_t""$ol_cv_lib_db" 1>&6
5701
5702
5703 for ac_hdr in db_185.h
5704 do
5705 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5706 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5707 echo "configure:5708: checking for $ac_hdr" >&5
5708 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5709   echo $ac_n "(cached) $ac_c" 1>&6
5710 else
5711   cat > conftest.$ac_ext <<EOF
5712 #line 5713 "configure"
5713 #include "confdefs.h"
5714 #include <$ac_hdr>
5715 EOF
5716 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5717 { (eval echo configure:5718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5718 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5719 if test -z "$ac_err"; then
5720   rm -rf conftest*
5721   eval "ac_cv_header_$ac_safe=yes"
5722 else
5723   echo "$ac_err" >&5
5724   echo "configure: failed program was:" >&5
5725   cat conftest.$ac_ext >&5
5726   rm -rf conftest*
5727   eval "ac_cv_header_$ac_safe=no"
5728 fi
5729 rm -f conftest*
5730 fi
5731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5732   echo "$ac_t""yes" 1>&6
5733     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5734   cat >> confdefs.h <<EOF
5735 #define $ac_tr_hdr 1
5736 EOF
5737  
5738 else
5739   echo "$ac_t""no" 1>&6
5740 fi
5741 done
5742
5743 if test "$ol_cv_header_db2" = yes ; then
5744         
5745         ol_cv_header_db=$ac_cv_header_db_185_h
5746 else
5747         ol_cv_header_db=$ac_cv_header_db_h
5748 fi
5749
5750
5751  
5752  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
5753 echo "configure:5754: checking for Berkeley DB" >&5
5754 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
5755   echo $ac_n "(cached) $ac_c" 1>&6
5756 else
5757   
5758         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
5759                 ol_cv_berkeley_db=no
5760         else
5761                 ol_cv_berkeley_db=yes
5762         fi
5763
5764 fi
5765
5766 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
5767  if test $ol_cv_berkeley_db = yes ; then
5768         cat >> confdefs.h <<\EOF
5769 #define HAVE_BERKELEY_DB 1
5770 EOF
5771
5772  fi
5773
5774
5775         if test $ol_cv_berkeley_db = yes ; then
5776                 ol_link_ldbm=db
5777                 ol_with_ldbm_api=db
5778
5779                 if test $ol_with_ldbm_type = hash ; then
5780                         cat >> confdefs.h <<\EOF
5781 #define LDBM_USE_DBHASH 1
5782 EOF
5783
5784                 else
5785                         cat >> confdefs.h <<\EOF
5786 #define LDBM_USE_DBBTREE 1
5787 EOF
5788
5789                 fi
5790
5791                                                 if test $ol_cv_lib_db != yes ; then
5792                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
5793                 fi
5794         fi
5795 fi
5796
5797 if test $ol_with_ldbm_api = manual ; then
5798                 ol_link_ldbm=yes
5799
5800         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
5801
5802         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
5803 do
5804 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5805 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5806 echo "configure:5807: checking for $ac_hdr" >&5
5807 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5808   echo $ac_n "(cached) $ac_c" 1>&6
5809 else
5810   cat > conftest.$ac_ext <<EOF
5811 #line 5812 "configure"
5812 #include "confdefs.h"
5813 #include <$ac_hdr>
5814 EOF
5815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5816 { (eval echo configure:5817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5818 if test -z "$ac_err"; then
5819   rm -rf conftest*
5820   eval "ac_cv_header_$ac_safe=yes"
5821 else
5822   echo "$ac_err" >&5
5823   echo "configure: failed program was:" >&5
5824   cat conftest.$ac_ext >&5
5825   rm -rf conftest*
5826   eval "ac_cv_header_$ac_safe=no"
5827 fi
5828 rm -f conftest*
5829 fi
5830 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5831   echo "$ac_t""yes" 1>&6
5832     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5833   cat >> confdefs.h <<EOF
5834 #define $ac_tr_hdr 1
5835 EOF
5836  
5837 else
5838   echo "$ac_t""no" 1>&6
5839 fi
5840 done
5841
5842 fi
5843
5844 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
5845         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
5846         ol_with_ldbm_api=none
5847 fi
5848
5849 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
5850         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
5851 echo "configure:5852: checking for GDBM library" >&5
5852 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
5853   echo $ac_n "(cached) $ac_c" 1>&6
5854 else
5855         ol_LIBS="$LIBS"
5856         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
5857 echo "configure:5858: checking for gdbm_open" >&5
5858 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
5859   echo $ac_n "(cached) $ac_c" 1>&6
5860 else
5861   cat > conftest.$ac_ext <<EOF
5862 #line 5863 "configure"
5863 #include "confdefs.h"
5864 /* System header to define __stub macros and hopefully few prototypes,
5865     which can conflict with char gdbm_open(); below.  */
5866 #include <assert.h>
5867 /* Override any gcc2 internal prototype to avoid an error.  */
5868 /* We use char because int might match the return type of a gcc2
5869     builtin and then its argument prototype would still apply.  */
5870 char gdbm_open();
5871
5872 int main() {
5873
5874 /* The GNU C library defines this for functions which it implements
5875     to always fail with ENOSYS.  Some functions are actually named
5876     something starting with __ and the normal name is an alias.  */
5877 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
5878 choke me
5879 #else
5880 gdbm_open();
5881 #endif
5882
5883 ; return 0; }
5884 EOF
5885 if { (eval echo configure:5886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5886   rm -rf conftest*
5887   eval "ac_cv_func_gdbm_open=yes"
5888 else
5889   echo "configure: failed program was:" >&5
5890   cat conftest.$ac_ext >&5
5891   rm -rf conftest*
5892   eval "ac_cv_func_gdbm_open=no"
5893 fi
5894 rm -f conftest*
5895 fi
5896
5897 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
5898   echo "$ac_t""yes" 1>&6
5899   ol_cv_lib_gdbm=yes
5900 else
5901   echo "$ac_t""no" 1>&6
5902
5903                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
5904 echo "configure:5905: checking for gdbm_open in -lgdbm" >&5
5905 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
5906 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5907   echo $ac_n "(cached) $ac_c" 1>&6
5908 else
5909   ac_save_LIBS="$LIBS"
5910 LIBS="-lgdbm  $LIBS"
5911 cat > conftest.$ac_ext <<EOF
5912 #line 5913 "configure"
5913 #include "confdefs.h"
5914 /* Override any gcc2 internal prototype to avoid an error.  */
5915 /* We use char because int might match the return type of a gcc2
5916     builtin and then its argument prototype would still apply.  */
5917 char gdbm_open();
5918
5919 int main() {
5920 gdbm_open()
5921 ; return 0; }
5922 EOF
5923 if { (eval echo configure:5924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5924   rm -rf conftest*
5925   eval "ac_cv_lib_$ac_lib_var=yes"
5926 else
5927   echo "configure: failed program was:" >&5
5928   cat conftest.$ac_ext >&5
5929   rm -rf conftest*
5930   eval "ac_cv_lib_$ac_lib_var=no"
5931 fi
5932 rm -f conftest*
5933 LIBS="$ac_save_LIBS"
5934
5935 fi
5936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5937   echo "$ac_t""yes" 1>&6
5938   ol_cv_lib_gdbm=-lgdbm
5939 else
5940   echo "$ac_t""no" 1>&6
5941 ol_cv_lib_gdbm=no
5942 fi
5943
5944         
5945 fi
5946
5947         LIBS="$ol_LIBS"
5948
5949 fi
5950
5951 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
5952
5953
5954  for ac_hdr in gdbm.h
5955 do
5956 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5957 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5958 echo "configure:5959: checking for $ac_hdr" >&5
5959 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5960   echo $ac_n "(cached) $ac_c" 1>&6
5961 else
5962   cat > conftest.$ac_ext <<EOF
5963 #line 5964 "configure"
5964 #include "confdefs.h"
5965 #include <$ac_hdr>
5966 EOF
5967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5968 { (eval echo configure:5969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5970 if test -z "$ac_err"; then
5971   rm -rf conftest*
5972   eval "ac_cv_header_$ac_safe=yes"
5973 else
5974   echo "$ac_err" >&5
5975   echo "configure: failed program was:" >&5
5976   cat conftest.$ac_ext >&5
5977   rm -rf conftest*
5978   eval "ac_cv_header_$ac_safe=no"
5979 fi
5980 rm -f conftest*
5981 fi
5982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5983   echo "$ac_t""yes" 1>&6
5984     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5985   cat >> confdefs.h <<EOF
5986 #define $ac_tr_hdr 1
5987 EOF
5988  
5989 else
5990   echo "$ac_t""no" 1>&6
5991 fi
5992 done
5993
5994  echo $ac_n "checking for db""... $ac_c" 1>&6
5995 echo "configure:5996: checking for db" >&5
5996 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
5997   echo $ac_n "(cached) $ac_c" 1>&6
5998 else
5999   
6000         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
6001                 ol_cv_gdbm=no
6002         else
6003                 ol_cv_gdbm=yes
6004         fi
6005
6006 fi
6007
6008 echo "$ac_t""$ol_cv_gdbm" 1>&6
6009  if test $ol_cv_gdbm = yes ; then
6010         cat >> confdefs.h <<\EOF
6011 #define HAVE_GDBM 1
6012 EOF
6013
6014  fi
6015
6016
6017         if test $ol_cv_gdbm = yes ; then
6018                 ol_link_ldbm=gdbm
6019                 ol_with_ldbm_api=gdbm
6020
6021                 if test $ol_cv_lib_gdbm != yes ; then
6022                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
6023                 fi
6024         fi
6025 fi
6026
6027 if test $ol_with_ldbm_api = auto ; then
6028         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
6029 elif test $ol_with_ldbm_api = ndbm ; then
6030         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
6031 echo "configure:6032: checking for NDBM library" >&5
6032 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
6033   echo $ac_n "(cached) $ac_c" 1>&6
6034 else
6035         ol_LIBS="$LIBS"
6036         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
6037 echo "configure:6038: checking for dbm_open" >&5
6038 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
6039   echo $ac_n "(cached) $ac_c" 1>&6
6040 else
6041   cat > conftest.$ac_ext <<EOF
6042 #line 6043 "configure"
6043 #include "confdefs.h"
6044 /* System header to define __stub macros and hopefully few prototypes,
6045     which can conflict with char dbm_open(); below.  */
6046 #include <assert.h>
6047 /* Override any gcc2 internal prototype to avoid an error.  */
6048 /* We use char because int might match the return type of a gcc2
6049     builtin and then its argument prototype would still apply.  */
6050 char dbm_open();
6051
6052 int main() {
6053
6054 /* The GNU C library defines this for functions which it implements
6055     to always fail with ENOSYS.  Some functions are actually named
6056     something starting with __ and the normal name is an alias.  */
6057 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
6058 choke me
6059 #else
6060 dbm_open();
6061 #endif
6062
6063 ; return 0; }
6064 EOF
6065 if { (eval echo configure:6066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6066   rm -rf conftest*
6067   eval "ac_cv_func_dbm_open=yes"
6068 else
6069   echo "configure: failed program was:" >&5
6070   cat conftest.$ac_ext >&5
6071   rm -rf conftest*
6072   eval "ac_cv_func_dbm_open=no"
6073 fi
6074 rm -f conftest*
6075 fi
6076
6077 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
6078   echo "$ac_t""yes" 1>&6
6079   ol_cv_lib_ndbm=yes
6080 else
6081   echo "$ac_t""no" 1>&6
6082
6083                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
6084 echo "configure:6085: checking for dbm_open in -lndbm" >&5
6085 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
6086 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6087   echo $ac_n "(cached) $ac_c" 1>&6
6088 else
6089   ac_save_LIBS="$LIBS"
6090 LIBS="-lndbm  $LIBS"
6091 cat > conftest.$ac_ext <<EOF
6092 #line 6093 "configure"
6093 #include "confdefs.h"
6094 /* Override any gcc2 internal prototype to avoid an error.  */
6095 /* We use char because int might match the return type of a gcc2
6096     builtin and then its argument prototype would still apply.  */
6097 char dbm_open();
6098
6099 int main() {
6100 dbm_open()
6101 ; return 0; }
6102 EOF
6103 if { (eval echo configure:6104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6104   rm -rf conftest*
6105   eval "ac_cv_lib_$ac_lib_var=yes"
6106 else
6107   echo "configure: failed program was:" >&5
6108   cat conftest.$ac_ext >&5
6109   rm -rf conftest*
6110   eval "ac_cv_lib_$ac_lib_var=no"
6111 fi
6112 rm -f conftest*
6113 LIBS="$ac_save_LIBS"
6114
6115 fi
6116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6117   echo "$ac_t""yes" 1>&6
6118   ol_cv_lib_ndbm=-lndbm
6119 else
6120   echo "$ac_t""no" 1>&6
6121
6122                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
6123 echo "configure:6124: checking for dbm_open in -ldbm" >&5
6124 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
6125 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6126   echo $ac_n "(cached) $ac_c" 1>&6
6127 else
6128   ac_save_LIBS="$LIBS"
6129 LIBS="-ldbm  $LIBS"
6130 cat > conftest.$ac_ext <<EOF
6131 #line 6132 "configure"
6132 #include "confdefs.h"
6133 /* Override any gcc2 internal prototype to avoid an error.  */
6134 /* We use char because int might match the return type of a gcc2
6135     builtin and then its argument prototype would still apply.  */
6136 char dbm_open();
6137
6138 int main() {
6139 dbm_open()
6140 ; return 0; }
6141 EOF
6142 if { (eval echo configure:6143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6143   rm -rf conftest*
6144   eval "ac_cv_lib_$ac_lib_var=yes"
6145 else
6146   echo "configure: failed program was:" >&5
6147   cat conftest.$ac_ext >&5
6148   rm -rf conftest*
6149   eval "ac_cv_lib_$ac_lib_var=no"
6150 fi
6151 rm -f conftest*
6152 LIBS="$ac_save_LIBS"
6153
6154 fi
6155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6156   echo "$ac_t""yes" 1>&6
6157   ol_cv_lib_ndbm=-ldbm
6158 else
6159   echo "$ac_t""no" 1>&6
6160 ol_cv_lib_ndbm=no
6161 fi
6162                 
6163 fi
6164
6165         
6166 fi
6167
6168         LIBS="$ol_LIBS"
6169
6170 fi
6171
6172 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
6173
6174
6175  for ac_hdr in ndbm.h
6176 do
6177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6179 echo "configure:6180: checking for $ac_hdr" >&5
6180 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6181   echo $ac_n "(cached) $ac_c" 1>&6
6182 else
6183   cat > conftest.$ac_ext <<EOF
6184 #line 6185 "configure"
6185 #include "confdefs.h"
6186 #include <$ac_hdr>
6187 EOF
6188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6189 { (eval echo configure:6190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6191 if test -z "$ac_err"; then
6192   rm -rf conftest*
6193   eval "ac_cv_header_$ac_safe=yes"
6194 else
6195   echo "$ac_err" >&5
6196   echo "configure: failed program was:" >&5
6197   cat conftest.$ac_ext >&5
6198   rm -rf conftest*
6199   eval "ac_cv_header_$ac_safe=no"
6200 fi
6201 rm -f conftest*
6202 fi
6203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6204   echo "$ac_t""yes" 1>&6
6205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6206   cat >> confdefs.h <<EOF
6207 #define $ac_tr_hdr 1
6208 EOF
6209  
6210 else
6211   echo "$ac_t""no" 1>&6
6212 fi
6213 done
6214
6215  echo $ac_n "checking for db""... $ac_c" 1>&6
6216 echo "configure:6217: checking for db" >&5
6217 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
6218   echo $ac_n "(cached) $ac_c" 1>&6
6219 else
6220   
6221         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
6222                 ol_cv_ndbm=no
6223         else
6224                 ol_cv_ndbm=yes
6225         fi
6226
6227 fi
6228
6229 echo "$ac_t""$ol_cv_ndbm" 1>&6
6230  if test $ol_cv_ndbm = yes ; then
6231         cat >> confdefs.h <<\EOF
6232 #define HAVE_NDBM 1
6233 EOF
6234
6235  fi
6236
6237
6238         if test $ol_cv_ndbm = yes ; then
6239                 ol_link_ldbm=ndbm
6240                 ol_with_ldbm_api=ndbm
6241
6242                 if test $ol_cv_lib_ndbm != yes ; then
6243                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
6244                 fi
6245         fi
6246 fi
6247
6248 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
6249         echo "configure: warning: could not find suitable LDBM backend" 1>&2
6250         if test $ol_enable_ldbm = yes ; then
6251                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
6252         fi
6253
6254         echo "configure: warning: disabling LDBM" 1>&2
6255         ol_enable_ldbm=no
6256 fi
6257
6258 if test $ol_enable_wrappers != no ; then
6259         for ac_hdr in tcpd.h
6260 do
6261 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6262 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6263 echo "configure:6264: checking for $ac_hdr" >&5
6264 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6265   echo $ac_n "(cached) $ac_c" 1>&6
6266 else
6267   cat > conftest.$ac_ext <<EOF
6268 #line 6269 "configure"
6269 #include "confdefs.h"
6270 #include <$ac_hdr>
6271 EOF
6272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6273 { (eval echo configure:6274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6275 if test -z "$ac_err"; then
6276   rm -rf conftest*
6277   eval "ac_cv_header_$ac_safe=yes"
6278 else
6279   echo "$ac_err" >&5
6280   echo "configure: failed program was:" >&5
6281   cat conftest.$ac_ext >&5
6282   rm -rf conftest*
6283   eval "ac_cv_header_$ac_safe=no"
6284 fi
6285 rm -f conftest*
6286 fi
6287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6288   echo "$ac_t""yes" 1>&6
6289     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6290   cat >> confdefs.h <<EOF
6291 #define $ac_tr_hdr 1
6292 EOF
6293  
6294 else
6295   echo "$ac_t""no" 1>&6
6296 fi
6297 done
6298
6299
6300         if test $ac_cv_header_tcpd_h != yes ; then
6301                 have_wrappers=no
6302         else
6303                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
6304 echo "configure:6305: checking for main in -lwrap" >&5
6305 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
6306 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6307   echo $ac_n "(cached) $ac_c" 1>&6
6308 else
6309   ac_save_LIBS="$LIBS"
6310 LIBS="-lwrap  $LIBS"
6311 cat > conftest.$ac_ext <<EOF
6312 #line 6313 "configure"
6313 #include "confdefs.h"
6314
6315 int main() {
6316 main()
6317 ; return 0; }
6318 EOF
6319 if { (eval echo configure:6320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6320   rm -rf conftest*
6321   eval "ac_cv_lib_$ac_lib_var=yes"
6322 else
6323   echo "configure: failed program was:" >&5
6324   cat conftest.$ac_ext >&5
6325   rm -rf conftest*
6326   eval "ac_cv_lib_$ac_lib_var=no"
6327 fi
6328 rm -f conftest*
6329 LIBS="$ac_save_LIBS"
6330
6331 fi
6332 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6333   echo "$ac_t""yes" 1>&6
6334   have_wrappers=yes
6335 else
6336   echo "$ac_t""no" 1>&6
6337 have_wrappers=no
6338 fi
6339
6340         fi
6341
6342         if test $have_wrappers = yes ; then
6343                 cat >> confdefs.h <<\EOF
6344 #define HAVE_TCPD 1
6345 EOF
6346
6347                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
6348         else
6349                 echo "configure: warning: could not find -lwrap" 1>&2
6350                 if test $ol_enable_wrappers = yes ; then
6351                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
6352                 fi
6353
6354                 echo "configure: warning: disabling wrappers support" 1>&2
6355                 ol_enable_wrappers=no
6356         fi
6357 fi
6358
6359 if test $ol_enable_syslog != no ; then
6360         echo $ac_n "checking for openlog""... $ac_c" 1>&6
6361 echo "configure:6362: checking for openlog" >&5
6362 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
6363   echo $ac_n "(cached) $ac_c" 1>&6
6364 else
6365   cat > conftest.$ac_ext <<EOF
6366 #line 6367 "configure"
6367 #include "confdefs.h"
6368 /* System header to define __stub macros and hopefully few prototypes,
6369     which can conflict with char openlog(); below.  */
6370 #include <assert.h>
6371 /* Override any gcc2 internal prototype to avoid an error.  */
6372 /* We use char because int might match the return type of a gcc2
6373     builtin and then its argument prototype would still apply.  */
6374 char openlog();
6375
6376 int main() {
6377
6378 /* The GNU C library defines this for functions which it implements
6379     to always fail with ENOSYS.  Some functions are actually named
6380     something starting with __ and the normal name is an alias.  */
6381 #if defined (__stub_openlog) || defined (__stub___openlog)
6382 choke me
6383 #else
6384 openlog();
6385 #endif
6386
6387 ; return 0; }
6388 EOF
6389 if { (eval echo configure:6390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6390   rm -rf conftest*
6391   eval "ac_cv_func_openlog=yes"
6392 else
6393   echo "configure: failed program was:" >&5
6394   cat conftest.$ac_ext >&5
6395   rm -rf conftest*
6396   eval "ac_cv_func_openlog=no"
6397 fi
6398 rm -f conftest*
6399 fi
6400
6401 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
6402   echo "$ac_t""yes" 1>&6
6403   :
6404 else
6405   echo "$ac_t""no" 1>&6
6406 fi
6407
6408         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
6409                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
6410         fi
6411         ol_enable_syslog=$ac_cv_func_openlog
6412 fi
6413
6414 if test $ol_enable_dmalloc != no ; then
6415         for ac_hdr in dmalloc.h
6416 do
6417 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6418 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6419 echo "configure:6420: checking for $ac_hdr" >&5
6420 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6421   echo $ac_n "(cached) $ac_c" 1>&6
6422 else
6423   cat > conftest.$ac_ext <<EOF
6424 #line 6425 "configure"
6425 #include "confdefs.h"
6426 #include <$ac_hdr>
6427 EOF
6428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6429 { (eval echo configure:6430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6431 if test -z "$ac_err"; then
6432   rm -rf conftest*
6433   eval "ac_cv_header_$ac_safe=yes"
6434 else
6435   echo "$ac_err" >&5
6436   echo "configure: failed program was:" >&5
6437   cat conftest.$ac_ext >&5
6438   rm -rf conftest*
6439   eval "ac_cv_header_$ac_safe=no"
6440 fi
6441 rm -f conftest*
6442 fi
6443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6444   echo "$ac_t""yes" 1>&6
6445     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6446   cat >> confdefs.h <<EOF
6447 #define $ac_tr_hdr 1
6448 EOF
6449  
6450 else
6451   echo "$ac_t""no" 1>&6
6452 fi
6453 done
6454
6455         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
6456 echo "configure:6457: checking for dmalloc_shutdown in -ldmalloc" >&5
6457 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
6458 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6459   echo $ac_n "(cached) $ac_c" 1>&6
6460 else
6461   ac_save_LIBS="$LIBS"
6462 LIBS="-ldmalloc  $LIBS"
6463 cat > conftest.$ac_ext <<EOF
6464 #line 6465 "configure"
6465 #include "confdefs.h"
6466 /* Override any gcc2 internal prototype to avoid an error.  */
6467 /* We use char because int might match the return type of a gcc2
6468     builtin and then its argument prototype would still apply.  */
6469 char dmalloc_shutdown();
6470
6471 int main() {
6472 dmalloc_shutdown()
6473 ; return 0; }
6474 EOF
6475 if { (eval echo configure:6476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6476   rm -rf conftest*
6477   eval "ac_cv_lib_$ac_lib_var=yes"
6478 else
6479   echo "configure: failed program was:" >&5
6480   cat conftest.$ac_ext >&5
6481   rm -rf conftest*
6482   eval "ac_cv_lib_$ac_lib_var=no"
6483 fi
6484 rm -f conftest*
6485 LIBS="$ac_save_LIBS"
6486
6487 fi
6488 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6489   echo "$ac_t""yes" 1>&6
6490     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6491     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6492   cat >> confdefs.h <<EOF
6493 #define $ac_tr_lib 1
6494 EOF
6495
6496   LIBS="-ldmalloc $LIBS"
6497
6498 else
6499   echo "$ac_t""no" 1>&6
6500 fi
6501
6502 fi
6503
6504 # ud needs termcap (should insert check here)
6505 ol_link_termcap=no
6506 for ac_hdr in termcap.h ncurses.h
6507 do
6508 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6509 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6510 echo "configure:6511: checking for $ac_hdr" >&5
6511 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6512   echo $ac_n "(cached) $ac_c" 1>&6
6513 else
6514   cat > conftest.$ac_ext <<EOF
6515 #line 6516 "configure"
6516 #include "confdefs.h"
6517 #include <$ac_hdr>
6518 EOF
6519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6520 { (eval echo configure:6521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6522 if test -z "$ac_err"; then
6523   rm -rf conftest*
6524   eval "ac_cv_header_$ac_safe=yes"
6525 else
6526   echo "$ac_err" >&5
6527   echo "configure: failed program was:" >&5
6528   cat conftest.$ac_ext >&5
6529   rm -rf conftest*
6530   eval "ac_cv_header_$ac_safe=no"
6531 fi
6532 rm -f conftest*
6533 fi
6534 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6535   echo "$ac_t""yes" 1>&6
6536     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6537   cat >> confdefs.h <<EOF
6538 #define $ac_tr_hdr 1
6539 EOF
6540  
6541 else
6542   echo "$ac_t""no" 1>&6
6543 fi
6544 done
6545
6546
6547 if test $ol_link_termcap = no ; then
6548         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
6549 echo "configure:6550: checking for tputs in -ltermcap" >&5
6550 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
6551 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6552   echo $ac_n "(cached) $ac_c" 1>&6
6553 else
6554   ac_save_LIBS="$LIBS"
6555 LIBS="-ltermcap  $LIBS"
6556 cat > conftest.$ac_ext <<EOF
6557 #line 6558 "configure"
6558 #include "confdefs.h"
6559 /* Override any gcc2 internal prototype to avoid an error.  */
6560 /* We use char because int might match the return type of a gcc2
6561     builtin and then its argument prototype would still apply.  */
6562 char tputs();
6563
6564 int main() {
6565 tputs()
6566 ; return 0; }
6567 EOF
6568 if { (eval echo configure:6569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6569   rm -rf conftest*
6570   eval "ac_cv_lib_$ac_lib_var=yes"
6571 else
6572   echo "configure: failed program was:" >&5
6573   cat conftest.$ac_ext >&5
6574   rm -rf conftest*
6575   eval "ac_cv_lib_$ac_lib_var=no"
6576 fi
6577 rm -f conftest*
6578 LIBS="$ac_save_LIBS"
6579
6580 fi
6581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6582   echo "$ac_t""yes" 1>&6
6583   have_termcap=yes
6584 else
6585   echo "$ac_t""no" 1>&6
6586 have_termcap=no
6587 fi
6588
6589         if test $have_termcap = yes ; then
6590                 cat >> confdefs.h <<\EOF
6591 #define HAVE_TERMCAP 1
6592 EOF
6593
6594                 ol_link_termcap=yes
6595                 TERMCAP_LIBS=-ltermcap
6596         fi
6597 fi
6598
6599 if test $ol_link_termcap = no ; then
6600         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
6601 echo "configure:6602: checking for initscr in -lncurses" >&5
6602 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
6603 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6604   echo $ac_n "(cached) $ac_c" 1>&6
6605 else
6606   ac_save_LIBS="$LIBS"
6607 LIBS="-lncurses  $LIBS"
6608 cat > conftest.$ac_ext <<EOF
6609 #line 6610 "configure"
6610 #include "confdefs.h"
6611 /* Override any gcc2 internal prototype to avoid an error.  */
6612 /* We use char because int might match the return type of a gcc2
6613     builtin and then its argument prototype would still apply.  */
6614 char initscr();
6615
6616 int main() {
6617 initscr()
6618 ; return 0; }
6619 EOF
6620 if { (eval echo configure:6621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6621   rm -rf conftest*
6622   eval "ac_cv_lib_$ac_lib_var=yes"
6623 else
6624   echo "configure: failed program was:" >&5
6625   cat conftest.$ac_ext >&5
6626   rm -rf conftest*
6627   eval "ac_cv_lib_$ac_lib_var=no"
6628 fi
6629 rm -f conftest*
6630 LIBS="$ac_save_LIBS"
6631
6632 fi
6633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6634   echo "$ac_t""yes" 1>&6
6635   have_ncurses=yes
6636 else
6637   echo "$ac_t""no" 1>&6
6638 have_ncurses=no
6639 fi
6640
6641         if test $have_ncurses = yes ; then
6642                 cat >> confdefs.h <<\EOF
6643 #define HAVE_NCURSES 1
6644 EOF
6645
6646                 ol_link_termcap=yes
6647                 TERMCAP_LIBS=-lncurses
6648         fi
6649 fi
6650
6651 if test $ol_link_termcap = no ; then
6652         cat >> confdefs.h <<\EOF
6653 #define NO_TERMCAP 1
6654 EOF
6655
6656         TERMCAP_LIBS=
6657 fi
6658
6659 # FreeBSD (and others) have crypt(3) in -lcrypt
6660 if test $ol_enable_crypt != no ; then
6661         echo $ac_n "checking for crypt""... $ac_c" 1>&6
6662 echo "configure:6663: checking for crypt" >&5
6663 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
6664   echo $ac_n "(cached) $ac_c" 1>&6
6665 else
6666   cat > conftest.$ac_ext <<EOF
6667 #line 6668 "configure"
6668 #include "confdefs.h"
6669 /* System header to define __stub macros and hopefully few prototypes,
6670     which can conflict with char crypt(); below.  */
6671 #include <assert.h>
6672 /* Override any gcc2 internal prototype to avoid an error.  */
6673 /* We use char because int might match the return type of a gcc2
6674     builtin and then its argument prototype would still apply.  */
6675 char crypt();
6676
6677 int main() {
6678
6679 /* The GNU C library defines this for functions which it implements
6680     to always fail with ENOSYS.  Some functions are actually named
6681     something starting with __ and the normal name is an alias.  */
6682 #if defined (__stub_crypt) || defined (__stub___crypt)
6683 choke me
6684 #else
6685 crypt();
6686 #endif
6687
6688 ; return 0; }
6689 EOF
6690 if { (eval echo configure:6691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6691   rm -rf conftest*
6692   eval "ac_cv_func_crypt=yes"
6693 else
6694   echo "configure: failed program was:" >&5
6695   cat conftest.$ac_ext >&5
6696   rm -rf conftest*
6697   eval "ac_cv_func_crypt=no"
6698 fi
6699 rm -f conftest*
6700 fi
6701
6702 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
6703   echo "$ac_t""yes" 1>&6
6704   have_crypt=yes
6705 else
6706   echo "$ac_t""no" 1>&6
6707
6708                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
6709 echo "configure:6710: checking for crypt in -lcrypt" >&5
6710 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
6711 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6712   echo $ac_n "(cached) $ac_c" 1>&6
6713 else
6714   ac_save_LIBS="$LIBS"
6715 LIBS="-lcrypt  $LIBS"
6716 cat > conftest.$ac_ext <<EOF
6717 #line 6718 "configure"
6718 #include "confdefs.h"
6719 /* Override any gcc2 internal prototype to avoid an error.  */
6720 /* We use char because int might match the return type of a gcc2
6721     builtin and then its argument prototype would still apply.  */
6722 char crypt();
6723
6724 int main() {
6725 crypt()
6726 ; return 0; }
6727 EOF
6728 if { (eval echo configure:6729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6729   rm -rf conftest*
6730   eval "ac_cv_lib_$ac_lib_var=yes"
6731 else
6732   echo "configure: failed program was:" >&5
6733   cat conftest.$ac_ext >&5
6734   rm -rf conftest*
6735   eval "ac_cv_lib_$ac_lib_var=no"
6736 fi
6737 rm -f conftest*
6738 LIBS="$ac_save_LIBS"
6739
6740 fi
6741 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6742   echo "$ac_t""yes" 1>&6
6743   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
6744                         have_crypt=yes
6745 else
6746   echo "$ac_t""no" 1>&6
6747 have_crypt=no
6748 fi
6749
6750 fi
6751
6752
6753         if test $have_crypt = yes ; then
6754                 cat >> confdefs.h <<\EOF
6755 #define HAVE_CRYPT 1
6756 EOF
6757
6758         else
6759                 echo "configure: warning: could not find crypt" 1>&2
6760                 if test $ol_enable_crypt = yes ; then
6761                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
6762                 fi
6763
6764                 echo "configure: warning: disabling crypt support" 1>&2
6765                 ol_enable_crypt=no
6766         fi
6767 fi
6768
6769 # FreeBSD (and others) have setproctitle(3) in -lutil
6770 if test $ol_enable_proctitle != no ; then
6771         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
6772 echo "configure:6773: checking for setproctitle" >&5
6773 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
6774   echo $ac_n "(cached) $ac_c" 1>&6
6775 else
6776   cat > conftest.$ac_ext <<EOF
6777 #line 6778 "configure"
6778 #include "confdefs.h"
6779 /* System header to define __stub macros and hopefully few prototypes,
6780     which can conflict with char setproctitle(); below.  */
6781 #include <assert.h>
6782 /* Override any gcc2 internal prototype to avoid an error.  */
6783 /* We use char because int might match the return type of a gcc2
6784     builtin and then its argument prototype would still apply.  */
6785 char setproctitle();
6786
6787 int main() {
6788
6789 /* The GNU C library defines this for functions which it implements
6790     to always fail with ENOSYS.  Some functions are actually named
6791     something starting with __ and the normal name is an alias.  */
6792 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
6793 choke me
6794 #else
6795 setproctitle();
6796 #endif
6797
6798 ; return 0; }
6799 EOF
6800 if { (eval echo configure:6801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6801   rm -rf conftest*
6802   eval "ac_cv_func_setproctitle=yes"
6803 else
6804   echo "configure: failed program was:" >&5
6805   cat conftest.$ac_ext >&5
6806   rm -rf conftest*
6807   eval "ac_cv_func_setproctitle=no"
6808 fi
6809 rm -f conftest*
6810 fi
6811
6812 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
6813   echo "$ac_t""yes" 1>&6
6814   have_setproctitle=yes
6815 else
6816   echo "$ac_t""no" 1>&6
6817
6818                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
6819 echo "configure:6820: checking for setproctitle in -lutil" >&5
6820 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
6821 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6822   echo $ac_n "(cached) $ac_c" 1>&6
6823 else
6824   ac_save_LIBS="$LIBS"
6825 LIBS="-lutil  $LIBS"
6826 cat > conftest.$ac_ext <<EOF
6827 #line 6828 "configure"
6828 #include "confdefs.h"
6829 /* Override any gcc2 internal prototype to avoid an error.  */
6830 /* We use char because int might match the return type of a gcc2
6831     builtin and then its argument prototype would still apply.  */
6832 char setproctitle();
6833
6834 int main() {
6835 setproctitle()
6836 ; return 0; }
6837 EOF
6838 if { (eval echo configure:6839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6839   rm -rf conftest*
6840   eval "ac_cv_lib_$ac_lib_var=yes"
6841 else
6842   echo "configure: failed program was:" >&5
6843   cat conftest.$ac_ext >&5
6844   rm -rf conftest*
6845   eval "ac_cv_lib_$ac_lib_var=no"
6846 fi
6847 rm -f conftest*
6848 LIBS="$ac_save_LIBS"
6849
6850 fi
6851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6852   echo "$ac_t""yes" 1>&6
6853   have_setproctitle=yes
6854                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
6855 else
6856   echo "$ac_t""no" 1>&6
6857 have_setproctitle=no
6858                         LIBOBJS="$LIBOBJS setproctitle.o"
6859 fi
6860
6861 fi
6862
6863
6864         if test $have_setproctitle = yes ; then
6865                 cat >> confdefs.h <<\EOF
6866 #define HAVE_SETPROCTITLE 1
6867 EOF
6868
6869         fi
6870 fi
6871
6872 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
6873 echo "configure:6874: checking for ANSI C header files" >&5
6874 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
6875   echo $ac_n "(cached) $ac_c" 1>&6
6876 else
6877   cat > conftest.$ac_ext <<EOF
6878 #line 6879 "configure"
6879 #include "confdefs.h"
6880 #include <stdlib.h>
6881 #include <stdarg.h>
6882 #include <string.h>
6883 #include <float.h>
6884 EOF
6885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6886 { (eval echo configure:6887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6888 if test -z "$ac_err"; then
6889   rm -rf conftest*
6890   ac_cv_header_stdc=yes
6891 else
6892   echo "$ac_err" >&5
6893   echo "configure: failed program was:" >&5
6894   cat conftest.$ac_ext >&5
6895   rm -rf conftest*
6896   ac_cv_header_stdc=no
6897 fi
6898 rm -f conftest*
6899
6900 if test $ac_cv_header_stdc = yes; then
6901   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6902 cat > conftest.$ac_ext <<EOF
6903 #line 6904 "configure"
6904 #include "confdefs.h"
6905 #include <string.h>
6906 EOF
6907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6908   egrep "memchr" >/dev/null 2>&1; then
6909   :
6910 else
6911   rm -rf conftest*
6912   ac_cv_header_stdc=no
6913 fi
6914 rm -f conftest*
6915
6916 fi
6917
6918 if test $ac_cv_header_stdc = yes; then
6919   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6920 cat > conftest.$ac_ext <<EOF
6921 #line 6922 "configure"
6922 #include "confdefs.h"
6923 #include <stdlib.h>
6924 EOF
6925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6926   egrep "free" >/dev/null 2>&1; then
6927   :
6928 else
6929   rm -rf conftest*
6930   ac_cv_header_stdc=no
6931 fi
6932 rm -f conftest*
6933
6934 fi
6935
6936 if test $ac_cv_header_stdc = yes; then
6937   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6938 if test "$cross_compiling" = yes; then
6939   :
6940 else
6941   cat > conftest.$ac_ext <<EOF
6942 #line 6943 "configure"
6943 #include "confdefs.h"
6944 #include <ctype.h>
6945 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6946 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6947 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6948 int main () { int i; for (i = 0; i < 256; i++)
6949 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
6950 exit (0); }
6951
6952 EOF
6953 if { (eval echo configure:6954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6954 then
6955   :
6956 else
6957   echo "configure: failed program was:" >&5
6958   cat conftest.$ac_ext >&5
6959   rm -fr conftest*
6960   ac_cv_header_stdc=no
6961 fi
6962 rm -fr conftest*
6963 fi
6964
6965 fi
6966 fi
6967
6968 echo "$ac_t""$ac_cv_header_stdc" 1>&6
6969 if test $ac_cv_header_stdc = yes; then
6970   cat >> confdefs.h <<\EOF
6971 #define STDC_HEADERS 1
6972 EOF
6973
6974 fi
6975
6976
6977 if test $ac_cv_header_stdc != yes; then
6978         echo "configure: warning: could not Standard C compliant headers" 1>&2
6979 fi
6980
6981 ac_header_dirent=no
6982 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
6983 do
6984 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6985 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
6986 echo "configure:6987: checking for $ac_hdr that defines DIR" >&5
6987 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
6988   echo $ac_n "(cached) $ac_c" 1>&6
6989 else
6990   cat > conftest.$ac_ext <<EOF
6991 #line 6992 "configure"
6992 #include "confdefs.h"
6993 #include <sys/types.h>
6994 #include <$ac_hdr>
6995 int main() {
6996 DIR *dirp = 0;
6997 ; return 0; }
6998 EOF
6999 if { (eval echo configure:7000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7000   rm -rf conftest*
7001   eval "ac_cv_header_dirent_$ac_safe=yes"
7002 else
7003   echo "configure: failed program was:" >&5
7004   cat conftest.$ac_ext >&5
7005   rm -rf conftest*
7006   eval "ac_cv_header_dirent_$ac_safe=no"
7007 fi
7008 rm -f conftest*
7009 fi
7010 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
7011   echo "$ac_t""yes" 1>&6
7012     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7013   cat >> confdefs.h <<EOF
7014 #define $ac_tr_hdr 1
7015 EOF
7016  ac_header_dirent=$ac_hdr; break
7017 else
7018   echo "$ac_t""no" 1>&6
7019 fi
7020 done
7021 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7022 if test $ac_header_dirent = dirent.h; then
7023 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
7024 echo "configure:7025: checking for opendir in -ldir" >&5
7025 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
7026 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7027   echo $ac_n "(cached) $ac_c" 1>&6
7028 else
7029   ac_save_LIBS="$LIBS"
7030 LIBS="-ldir  $LIBS"
7031 cat > conftest.$ac_ext <<EOF
7032 #line 7033 "configure"
7033 #include "confdefs.h"
7034 /* Override any gcc2 internal prototype to avoid an error.  */
7035 /* We use char because int might match the return type of a gcc2
7036     builtin and then its argument prototype would still apply.  */
7037 char opendir();
7038
7039 int main() {
7040 opendir()
7041 ; return 0; }
7042 EOF
7043 if { (eval echo configure:7044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7044   rm -rf conftest*
7045   eval "ac_cv_lib_$ac_lib_var=yes"
7046 else
7047   echo "configure: failed program was:" >&5
7048   cat conftest.$ac_ext >&5
7049   rm -rf conftest*
7050   eval "ac_cv_lib_$ac_lib_var=no"
7051 fi
7052 rm -f conftest*
7053 LIBS="$ac_save_LIBS"
7054
7055 fi
7056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7057   echo "$ac_t""yes" 1>&6
7058   LIBS="$LIBS -ldir"
7059 else
7060   echo "$ac_t""no" 1>&6
7061 fi
7062
7063 else
7064 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
7065 echo "configure:7066: checking for opendir in -lx" >&5
7066 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
7067 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7068   echo $ac_n "(cached) $ac_c" 1>&6
7069 else
7070   ac_save_LIBS="$LIBS"
7071 LIBS="-lx  $LIBS"
7072 cat > conftest.$ac_ext <<EOF
7073 #line 7074 "configure"
7074 #include "confdefs.h"
7075 /* Override any gcc2 internal prototype to avoid an error.  */
7076 /* We use char because int might match the return type of a gcc2
7077     builtin and then its argument prototype would still apply.  */
7078 char opendir();
7079
7080 int main() {
7081 opendir()
7082 ; return 0; }
7083 EOF
7084 if { (eval echo configure:7085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7085   rm -rf conftest*
7086   eval "ac_cv_lib_$ac_lib_var=yes"
7087 else
7088   echo "configure: failed program was:" >&5
7089   cat conftest.$ac_ext >&5
7090   rm -rf conftest*
7091   eval "ac_cv_lib_$ac_lib_var=no"
7092 fi
7093 rm -f conftest*
7094 LIBS="$ac_save_LIBS"
7095
7096 fi
7097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7098   echo "$ac_t""yes" 1>&6
7099   LIBS="$LIBS -lx"
7100 else
7101   echo "$ac_t""no" 1>&6
7102 fi
7103
7104 fi
7105
7106 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
7107 echo "configure:7108: checking for sys/wait.h that is POSIX.1 compatible" >&5
7108 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
7109   echo $ac_n "(cached) $ac_c" 1>&6
7110 else
7111   cat > conftest.$ac_ext <<EOF
7112 #line 7113 "configure"
7113 #include "confdefs.h"
7114 #include <sys/types.h>
7115 #include <sys/wait.h>
7116 #ifndef WEXITSTATUS
7117 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
7118 #endif
7119 #ifndef WIFEXITED
7120 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7121 #endif
7122 int main() {
7123 int s;
7124 wait (&s);
7125 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7126 ; return 0; }
7127 EOF
7128 if { (eval echo configure:7129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7129   rm -rf conftest*
7130   ac_cv_header_sys_wait_h=yes
7131 else
7132   echo "configure: failed program was:" >&5
7133   cat conftest.$ac_ext >&5
7134   rm -rf conftest*
7135   ac_cv_header_sys_wait_h=no
7136 fi
7137 rm -f conftest*
7138 fi
7139
7140 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
7141 if test $ac_cv_header_sys_wait_h = yes; then
7142   cat >> confdefs.h <<\EOF
7143 #define HAVE_SYS_WAIT_H 1
7144 EOF
7145
7146 fi
7147
7148 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
7149 echo "configure:7150: checking POSIX termios" >&5
7150 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
7151   echo $ac_n "(cached) $ac_c" 1>&6
7152 else
7153   cat > conftest.$ac_ext <<EOF
7154 #line 7155 "configure"
7155 #include "confdefs.h"
7156 #include <sys/types.h>
7157 #include <unistd.h>
7158 #include <termios.h>
7159 int main() {
7160 /* SunOS 4.0.3 has termios.h but not the library calls.  */
7161    tcgetattr(0, 0);
7162 ; return 0; }
7163 EOF
7164 if { (eval echo configure:7165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7165   rm -rf conftest*
7166   am_cv_sys_posix_termios=yes
7167 else
7168   echo "configure: failed program was:" >&5
7169   cat conftest.$ac_ext >&5
7170   rm -rf conftest*
7171   am_cv_sys_posix_termios=no
7172 fi
7173 rm -f conftest*
7174 fi
7175
7176 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
7177
7178
7179  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
7180 echo "configure:7181: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
7181 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
7182   echo $ac_n "(cached) $ac_c" 1>&6
7183 else
7184   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
7185
7186   gwinsz_in_termios_h=no
7187   if test $am_cv_sys_posix_termios = yes; then
7188     cat > conftest.$ac_ext <<EOF
7189 #line 7190 "configure"
7190 #include "confdefs.h"
7191 #include <sys/types.h>
7192 #     include <termios.h>
7193 #     ifdef TIOCGWINSZ
7194         yes
7195 #     endif
7196     
7197 EOF
7198 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7199   egrep "yes" >/dev/null 2>&1; then
7200   rm -rf conftest*
7201   gwinsz_in_termios_h=yes
7202 fi
7203 rm -f conftest*
7204
7205   fi
7206
7207   if test $gwinsz_in_termios_h = no; then
7208     cat > conftest.$ac_ext <<EOF
7209 #line 7210 "configure"
7210 #include "confdefs.h"
7211 #include <sys/types.h>
7212 #     include <sys/ioctl.h>
7213 #     ifdef TIOCGWINSZ
7214         yes
7215 #     endif
7216     
7217 EOF
7218 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7219   egrep "yes" >/dev/null 2>&1; then
7220   rm -rf conftest*
7221   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
7222 fi
7223 rm -f conftest*
7224
7225   fi
7226   
7227 fi
7228
7229 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
7230   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
7231     cat >> confdefs.h <<\EOF
7232 #define GWINSZ_IN_SYS_IOCTL 1
7233 EOF
7234
7235   fi
7236
7237 if test $am_cv_sys_posix_termios = yes ; then
7238         cat >> confdefs.h <<\EOF
7239 #define HAVE_POSIX_TERMIOS 1
7240 EOF
7241
7242 fi
7243
7244 for ac_hdr in \
7245         crypt.h                 \
7246         errno.h                 \
7247         fcntl.h                 \
7248         filio.h                 \
7249         getopt.h                \
7250         libutil.h               \
7251         limits.h                \
7252         malloc.h                \
7253         memory.h                \
7254         regex.h                 \
7255         psap.h                  \
7256         pwd.h                   \
7257         sgtty.h                 \
7258         stdarg.h                \
7259         stddef.h                \
7260         string.h                \
7261         strings.h               \
7262         sys/file.h              \
7263         sys/filio.h             \
7264         sys/errno.h             \
7265         sys/ioctl.h             \
7266         sys/param.h             \
7267         sys/resource.h  \
7268         sys/socket.h    \
7269         sys/syslog.h    \
7270         sys/time.h              \
7271         sys/types.h             \
7272         syslog.h                \
7273         termios.h               \
7274         unistd.h                \
7275
7276 do
7277 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7278 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7279 echo "configure:7280: checking for $ac_hdr" >&5
7280 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7281   echo $ac_n "(cached) $ac_c" 1>&6
7282 else
7283   cat > conftest.$ac_ext <<EOF
7284 #line 7285 "configure"
7285 #include "confdefs.h"
7286 #include <$ac_hdr>
7287 EOF
7288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7289 { (eval echo configure:7290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7291 if test -z "$ac_err"; then
7292   rm -rf conftest*
7293   eval "ac_cv_header_$ac_safe=yes"
7294 else
7295   echo "$ac_err" >&5
7296   echo "configure: failed program was:" >&5
7297   cat conftest.$ac_ext >&5
7298   rm -rf conftest*
7299   eval "ac_cv_header_$ac_safe=no"
7300 fi
7301 rm -f conftest*
7302 fi
7303 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7304   echo "$ac_t""yes" 1>&6
7305     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7306   cat >> confdefs.h <<EOF
7307 #define $ac_tr_hdr 1
7308 EOF
7309  
7310 else
7311   echo "$ac_t""no" 1>&6
7312 fi
7313 done
7314
7315
7316 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
7317 echo "configure:7318: checking for uid_t in sys/types.h" >&5
7318 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
7319   echo $ac_n "(cached) $ac_c" 1>&6
7320 else
7321   cat > conftest.$ac_ext <<EOF
7322 #line 7323 "configure"
7323 #include "confdefs.h"
7324 #include <sys/types.h>
7325 EOF
7326 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7327   egrep "uid_t" >/dev/null 2>&1; then
7328   rm -rf conftest*
7329   ac_cv_type_uid_t=yes
7330 else
7331   rm -rf conftest*
7332   ac_cv_type_uid_t=no
7333 fi
7334 rm -f conftest*
7335
7336 fi
7337
7338 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
7339 if test $ac_cv_type_uid_t = no; then
7340   cat >> confdefs.h <<\EOF
7341 #define uid_t int
7342 EOF
7343
7344   cat >> confdefs.h <<\EOF
7345 #define gid_t int
7346 EOF
7347
7348 fi
7349
7350 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
7351 echo "configure:7352: checking type of array argument to getgroups" >&5
7352 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
7353   echo $ac_n "(cached) $ac_c" 1>&6
7354 else
7355   if test "$cross_compiling" = yes; then
7356   ac_cv_type_getgroups=cross
7357 else
7358   cat > conftest.$ac_ext <<EOF
7359 #line 7360 "configure"
7360 #include "confdefs.h"
7361
7362 /* Thanks to Mike Rendell for this test.  */
7363 #include <sys/types.h>
7364 #define NGID 256
7365 #undef MAX
7366 #define MAX(x, y) ((x) > (y) ? (x) : (y))
7367 main()
7368 {
7369   gid_t gidset[NGID];
7370   int i, n;
7371   union { gid_t gval; long lval; }  val;
7372
7373   val.lval = -1;
7374   for (i = 0; i < NGID; i++)
7375     gidset[i] = val.gval;
7376   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
7377                  gidset);
7378   /* Exit non-zero if getgroups seems to require an array of ints.  This
7379      happens when gid_t is short but getgroups modifies an array of ints.  */
7380   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
7381 }
7382
7383 EOF
7384 if { (eval echo configure:7385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7385 then
7386     ac_cv_type_getgroups=gid_t
7387 else
7388   echo "configure: failed program was:" >&5
7389   cat conftest.$ac_ext >&5
7390   rm -fr conftest*
7391   ac_cv_type_getgroups=int
7392 fi
7393 rm -fr conftest*
7394 fi
7395
7396 if test $ac_cv_type_getgroups = cross; then
7397         cat > conftest.$ac_ext <<EOF
7398 #line 7399 "configure"
7399 #include "confdefs.h"
7400 #include <unistd.h>
7401 EOF
7402 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7403   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
7404   rm -rf conftest*
7405   ac_cv_type_getgroups=gid_t
7406 else
7407   rm -rf conftest*
7408   ac_cv_type_getgroups=int
7409 fi
7410 rm -f conftest*
7411
7412 fi
7413 fi
7414
7415 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
7416 cat >> confdefs.h <<EOF
7417 #define GETGROUPS_T $ac_cv_type_getgroups
7418 EOF
7419
7420  echo $ac_n "checking for mode_t""... $ac_c" 1>&6
7421 echo "configure:7422: checking for mode_t" >&5
7422 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
7423   echo $ac_n "(cached) $ac_c" 1>&6
7424 else
7425   cat > conftest.$ac_ext <<EOF
7426 #line 7427 "configure"
7427 #include "confdefs.h"
7428 #include <sys/types.h>
7429 #if STDC_HEADERS
7430 #include <stdlib.h>
7431 #include <stddef.h>
7432 #endif
7433 EOF
7434 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7435   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7436   rm -rf conftest*
7437   ac_cv_type_mode_t=yes
7438 else
7439   rm -rf conftest*
7440   ac_cv_type_mode_t=no
7441 fi
7442 rm -f conftest*
7443
7444 fi
7445 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
7446 if test $ac_cv_type_mode_t = no; then
7447   cat >> confdefs.h <<\EOF
7448 #define mode_t int
7449 EOF
7450
7451 fi
7452
7453 echo $ac_n "checking for off_t""... $ac_c" 1>&6
7454 echo "configure:7455: checking for off_t" >&5
7455 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
7456   echo $ac_n "(cached) $ac_c" 1>&6
7457 else
7458   cat > conftest.$ac_ext <<EOF
7459 #line 7460 "configure"
7460 #include "confdefs.h"
7461 #include <sys/types.h>
7462 #if STDC_HEADERS
7463 #include <stdlib.h>
7464 #include <stddef.h>
7465 #endif
7466 EOF
7467 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7468   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7469   rm -rf conftest*
7470   ac_cv_type_off_t=yes
7471 else
7472   rm -rf conftest*
7473   ac_cv_type_off_t=no
7474 fi
7475 rm -f conftest*
7476
7477 fi
7478 echo "$ac_t""$ac_cv_type_off_t" 1>&6
7479 if test $ac_cv_type_off_t = no; then
7480   cat >> confdefs.h <<\EOF
7481 #define off_t long
7482 EOF
7483
7484 fi
7485
7486 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
7487 echo "configure:7488: checking for pid_t" >&5
7488 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
7489   echo $ac_n "(cached) $ac_c" 1>&6
7490 else
7491   cat > conftest.$ac_ext <<EOF
7492 #line 7493 "configure"
7493 #include "confdefs.h"
7494 #include <sys/types.h>
7495 #if STDC_HEADERS
7496 #include <stdlib.h>
7497 #include <stddef.h>
7498 #endif
7499 EOF
7500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7501   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7502   rm -rf conftest*
7503   ac_cv_type_pid_t=yes
7504 else
7505   rm -rf conftest*
7506   ac_cv_type_pid_t=no
7507 fi
7508 rm -f conftest*
7509
7510 fi
7511 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
7512 if test $ac_cv_type_pid_t = no; then
7513   cat >> confdefs.h <<\EOF
7514 #define pid_t int
7515 EOF
7516
7517 fi
7518
7519 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
7520 echo "configure:7521: checking for ptrdiff_t" >&5
7521 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
7522   echo $ac_n "(cached) $ac_c" 1>&6
7523 else
7524   cat > conftest.$ac_ext <<EOF
7525 #line 7526 "configure"
7526 #include "confdefs.h"
7527 #include <stddef.h>
7528 int main() {
7529 ptrdiff_t p
7530 ; return 0; }
7531 EOF
7532 if { (eval echo configure:7533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7533   rm -rf conftest*
7534   am_cv_type_ptrdiff_t=yes
7535 else
7536   echo "configure: failed program was:" >&5
7537   cat conftest.$ac_ext >&5
7538   rm -rf conftest*
7539   am_cv_type_ptrdiff_t=no
7540 fi
7541 rm -f conftest*
7542 fi
7543
7544 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
7545    if test $am_cv_type_ptrdiff_t = yes; then
7546      cat >> confdefs.h <<\EOF
7547 #define HAVE_PTRDIFF_T 1
7548 EOF
7549
7550    fi
7551
7552 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
7553 echo "configure:7554: checking return type of signal handlers" >&5
7554 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
7555   echo $ac_n "(cached) $ac_c" 1>&6
7556 else
7557   cat > conftest.$ac_ext <<EOF
7558 #line 7559 "configure"
7559 #include "confdefs.h"
7560 #include <sys/types.h>
7561 #include <signal.h>
7562 #ifdef signal
7563 #undef signal
7564 #endif
7565 #ifdef __cplusplus
7566 extern "C" void (*signal (int, void (*)(int)))(int);
7567 #else
7568 void (*signal ()) ();
7569 #endif
7570
7571 int main() {
7572 int i;
7573 ; return 0; }
7574 EOF
7575 if { (eval echo configure:7576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7576   rm -rf conftest*
7577   ac_cv_type_signal=void
7578 else
7579   echo "configure: failed program was:" >&5
7580   cat conftest.$ac_ext >&5
7581   rm -rf conftest*
7582   ac_cv_type_signal=int
7583 fi
7584 rm -f conftest*
7585 fi
7586
7587 echo "$ac_t""$ac_cv_type_signal" 1>&6
7588 cat >> confdefs.h <<EOF
7589 #define RETSIGTYPE $ac_cv_type_signal
7590 EOF
7591
7592
7593 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
7594 echo "configure:7595: checking for sig_atomic_t" >&5
7595 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
7596   echo $ac_n "(cached) $ac_c" 1>&6
7597 else
7598   cat > conftest.$ac_ext <<EOF
7599 #line 7600 "configure"
7600 #include "confdefs.h"
7601 #include <signal.h>
7602 int main() {
7603 sig_atomic_t atomic;
7604 ; return 0; }
7605 EOF
7606 if { (eval echo configure:7607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7607   rm -rf conftest*
7608   ol_cv_type_sig_atomic_t=yes
7609 else
7610   echo "configure: failed program was:" >&5
7611   cat conftest.$ac_ext >&5
7612   rm -rf conftest*
7613   ol_cv_type_sig_atomic_t=no
7614 fi
7615 rm -f conftest*
7616 fi
7617
7618 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
7619   if test $ol_cv_type_sig_atomic_t = no; then
7620     cat >> confdefs.h <<\EOF
7621 #define sig_atomic_t int
7622 EOF
7623
7624   fi
7625  
7626 echo $ac_n "checking for size_t""... $ac_c" 1>&6
7627 echo "configure:7628: checking for size_t" >&5
7628 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
7629   echo $ac_n "(cached) $ac_c" 1>&6
7630 else
7631   cat > conftest.$ac_ext <<EOF
7632 #line 7633 "configure"
7633 #include "confdefs.h"
7634 #include <sys/types.h>
7635 #if STDC_HEADERS
7636 #include <stdlib.h>
7637 #include <stddef.h>
7638 #endif
7639 EOF
7640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7641   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7642   rm -rf conftest*
7643   ac_cv_type_size_t=yes
7644 else
7645   rm -rf conftest*
7646   ac_cv_type_size_t=no
7647 fi
7648 rm -f conftest*
7649
7650 fi
7651 echo "$ac_t""$ac_cv_type_size_t" 1>&6
7652 if test $ac_cv_type_size_t = no; then
7653   cat >> confdefs.h <<\EOF
7654 #define size_t unsigned
7655 EOF
7656
7657 fi
7658
7659 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
7660 echo "configure:7661: checking for st_blksize in struct stat" >&5
7661 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
7662   echo $ac_n "(cached) $ac_c" 1>&6
7663 else
7664   cat > conftest.$ac_ext <<EOF
7665 #line 7666 "configure"
7666 #include "confdefs.h"
7667 #include <sys/types.h>
7668 #include <sys/stat.h>
7669 int main() {
7670 struct stat s; s.st_blksize;
7671 ; return 0; }
7672 EOF
7673 if { (eval echo configure:7674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7674   rm -rf conftest*
7675   ac_cv_struct_st_blksize=yes
7676 else
7677   echo "configure: failed program was:" >&5
7678   cat conftest.$ac_ext >&5
7679   rm -rf conftest*
7680   ac_cv_struct_st_blksize=no
7681 fi
7682 rm -f conftest*
7683 fi
7684
7685 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
7686 if test $ac_cv_struct_st_blksize = yes; then
7687   cat >> confdefs.h <<\EOF
7688 #define HAVE_ST_BLKSIZE 1
7689 EOF
7690
7691 fi
7692
7693 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
7694 echo "configure:7695: checking whether time.h and sys/time.h may both be included" >&5
7695 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
7696   echo $ac_n "(cached) $ac_c" 1>&6
7697 else
7698   cat > conftest.$ac_ext <<EOF
7699 #line 7700 "configure"
7700 #include "confdefs.h"
7701 #include <sys/types.h>
7702 #include <sys/time.h>
7703 #include <time.h>
7704 int main() {
7705 struct tm *tp;
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   ac_cv_header_time=yes
7711 else
7712   echo "configure: failed program was:" >&5
7713   cat conftest.$ac_ext >&5
7714   rm -rf conftest*
7715   ac_cv_header_time=no
7716 fi
7717 rm -f conftest*
7718 fi
7719
7720 echo "$ac_t""$ac_cv_header_time" 1>&6
7721 if test $ac_cv_header_time = yes; then
7722   cat >> confdefs.h <<\EOF
7723 #define TIME_WITH_SYS_TIME 1
7724 EOF
7725
7726 fi
7727
7728 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
7729 echo "configure:7730: checking whether struct tm is in sys/time.h or time.h" >&5
7730 if eval "test \"`echo '$''{'ac_cv_struct_tm'+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 <time.h>
7738 int main() {
7739 struct tm *tp; tp->tm_sec;
7740 ; return 0; }
7741 EOF
7742 if { (eval echo configure:7743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7743   rm -rf conftest*
7744   ac_cv_struct_tm=time.h
7745 else
7746   echo "configure: failed program was:" >&5
7747   cat conftest.$ac_ext >&5
7748   rm -rf conftest*
7749   ac_cv_struct_tm=sys/time.h
7750 fi
7751 rm -f conftest*
7752 fi
7753
7754 echo "$ac_t""$ac_cv_struct_tm" 1>&6
7755 if test $ac_cv_struct_tm = sys/time.h; then
7756   cat >> confdefs.h <<\EOF
7757 #define TM_IN_SYS_TIME 1
7758 EOF
7759
7760 fi
7761
7762
7763
7764 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
7765 echo "configure:7766: checking if toupper() requires islower()" >&5
7766 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
7767   echo $ac_n "(cached) $ac_c" 1>&6
7768 else
7769   
7770         if test "$cross_compiling" = yes; then
7771   ol_cv_c_upper_lower=safe
7772 else
7773   cat > conftest.$ac_ext <<EOF
7774 #line 7775 "configure"
7775 #include "confdefs.h"
7776
7777 #include <ctype.h>
7778 main()
7779 {
7780         if ('C' == toupper('C'))
7781                 exit(0);
7782         else
7783                 exit(1);
7784 }
7785 EOF
7786 if { (eval echo configure:7787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7787 then
7788   ol_cv_c_upper_lower=no
7789 else
7790   echo "configure: failed program was:" >&5
7791   cat conftest.$ac_ext >&5
7792   rm -fr conftest*
7793   ol_cv_c_upper_lower=yes
7794 fi
7795 rm -fr conftest*
7796 fi
7797
7798 fi
7799
7800 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
7801 if test $ol_cv_c_upper_lower != no ; then
7802         cat >> confdefs.h <<\EOF
7803 #define C_UPPER_LOWER 1
7804 EOF
7805
7806 fi
7807
7808 echo $ac_n "checking for working const""... $ac_c" 1>&6
7809 echo "configure:7810: checking for working const" >&5
7810 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
7811   echo $ac_n "(cached) $ac_c" 1>&6
7812 else
7813   cat > conftest.$ac_ext <<EOF
7814 #line 7815 "configure"
7815 #include "confdefs.h"
7816
7817 int main() {
7818
7819 /* Ultrix mips cc rejects this.  */
7820 typedef int charset[2]; const charset x;
7821 /* SunOS 4.1.1 cc rejects this.  */
7822 char const *const *ccp;
7823 char **p;
7824 /* NEC SVR4.0.2 mips cc rejects this.  */
7825 struct point {int x, y;};
7826 static struct point const zero = {0,0};
7827 /* AIX XL C 1.02.0.0 rejects this.
7828    It does not let you subtract one const X* pointer from another in an arm
7829    of an if-expression whose if-part is not a constant expression */
7830 const char *g = "string";
7831 ccp = &g + (g ? g-g : 0);
7832 /* HPUX 7.0 cc rejects these. */
7833 ++ccp;
7834 p = (char**) ccp;
7835 ccp = (char const *const *) p;
7836 { /* SCO 3.2v4 cc rejects this.  */
7837   char *t;
7838   char const *s = 0 ? (char *) 0 : (char const *) 0;
7839
7840   *t++ = 0;
7841 }
7842 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7843   int x[] = {25, 17};
7844   const int *foo = &x[0];
7845   ++foo;
7846 }
7847 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7848   typedef const int *iptr;
7849   iptr p = 0;
7850   ++p;
7851 }
7852 { /* AIX XL C 1.02.0.0 rejects this saying
7853      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7854   struct s { int j; const int *ap[3]; };
7855   struct s *b; b->j = 5;
7856 }
7857 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7858   const int foo = 10;
7859 }
7860
7861 ; return 0; }
7862 EOF
7863 if { (eval echo configure:7864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7864   rm -rf conftest*
7865   ac_cv_c_const=yes
7866 else
7867   echo "configure: failed program was:" >&5
7868   cat conftest.$ac_ext >&5
7869   rm -rf conftest*
7870   ac_cv_c_const=no
7871 fi
7872 rm -f conftest*
7873 fi
7874
7875 echo "$ac_t""$ac_cv_c_const" 1>&6
7876 if test $ac_cv_c_const = no; then
7877   cat >> confdefs.h <<\EOF
7878 #define const 
7879 EOF
7880
7881 fi
7882
7883 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
7884 echo "configure:7885: checking if compiler understands volatile" >&5
7885 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
7886   echo $ac_n "(cached) $ac_c" 1>&6
7887 else
7888   cat > conftest.$ac_ext <<EOF
7889 #line 7890 "configure"
7890 #include "confdefs.h"
7891 int x, y, z;
7892 int main() {
7893 volatile int a; int * volatile b = x ? &y : &z;
7894       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
7895       *b = 0;
7896 ; return 0; }
7897 EOF
7898 if { (eval echo configure:7899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7899   rm -rf conftest*
7900   ol_cv_c_volatile=yes
7901 else
7902   echo "configure: failed program was:" >&5
7903   cat conftest.$ac_ext >&5
7904   rm -rf conftest*
7905   ol_cv_c_volatile=no
7906 fi
7907 rm -f conftest*
7908 fi
7909
7910 echo "$ac_t""$ol_cv_c_volatile" 1>&6
7911   if test $ol_cv_c_volatile = yes; then
7912     : 
7913   else
7914     cat >> confdefs.h <<\EOF
7915 #define volatile 
7916 EOF
7917
7918   fi
7919  
7920
7921 if test $cross_compiling = yes ; then
7922         cat >> confdefs.h <<\EOF
7923 #define CROSS_COMPILING 1
7924 EOF
7925
7926 else
7927         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
7928 echo "configure:7929: checking whether byte ordering is bigendian" >&5
7929 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
7930   echo $ac_n "(cached) $ac_c" 1>&6
7931 else
7932   ac_cv_c_bigendian=unknown
7933 # See if sys/param.h defines the BYTE_ORDER macro.
7934 cat > conftest.$ac_ext <<EOF
7935 #line 7936 "configure"
7936 #include "confdefs.h"
7937 #include <sys/types.h>
7938 #include <sys/param.h>
7939 int main() {
7940
7941 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7942  bogus endian macros
7943 #endif
7944 ; return 0; }
7945 EOF
7946 if { (eval echo configure:7947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7947   rm -rf conftest*
7948   # It does; now see whether it defined to BIG_ENDIAN or not.
7949 cat > conftest.$ac_ext <<EOF
7950 #line 7951 "configure"
7951 #include "confdefs.h"
7952 #include <sys/types.h>
7953 #include <sys/param.h>
7954 int main() {
7955
7956 #if BYTE_ORDER != BIG_ENDIAN
7957  not big endian
7958 #endif
7959 ; return 0; }
7960 EOF
7961 if { (eval echo configure:7962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7962   rm -rf conftest*
7963   ac_cv_c_bigendian=yes
7964 else
7965   echo "configure: failed program was:" >&5
7966   cat conftest.$ac_ext >&5
7967   rm -rf conftest*
7968   ac_cv_c_bigendian=no
7969 fi
7970 rm -f conftest*
7971 else
7972   echo "configure: failed program was:" >&5
7973   cat conftest.$ac_ext >&5
7974 fi
7975 rm -f conftest*
7976 if test $ac_cv_c_bigendian = unknown; then
7977 if test "$cross_compiling" = yes; then
7978     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
7979 else
7980   cat > conftest.$ac_ext <<EOF
7981 #line 7982 "configure"
7982 #include "confdefs.h"
7983 main () {
7984   /* Are we little or big endian?  From Harbison&Steele.  */
7985   union
7986   {
7987     long l;
7988     char c[sizeof (long)];
7989   } u;
7990   u.l = 1;
7991   exit (u.c[sizeof (long) - 1] == 1);
7992 }
7993 EOF
7994 if { (eval echo configure:7995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7995 then
7996   ac_cv_c_bigendian=no
7997 else
7998   echo "configure: failed program was:" >&5
7999   cat conftest.$ac_ext >&5
8000   rm -fr conftest*
8001   ac_cv_c_bigendian=yes
8002 fi
8003 rm -fr conftest*
8004 fi
8005
8006 fi
8007 fi
8008
8009 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
8010 if test $ac_cv_c_bigendian = yes; then
8011   cat >> confdefs.h <<\EOF
8012 #define WORDS_BIGENDIAN 1
8013 EOF
8014
8015 fi
8016
8017         echo $ac_n "checking size of short""... $ac_c" 1>&6
8018 echo "configure:8019: checking size of short" >&5
8019 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
8020   echo $ac_n "(cached) $ac_c" 1>&6
8021 else
8022   if test "$cross_compiling" = yes; then
8023     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
8024 else
8025   cat > conftest.$ac_ext <<EOF
8026 #line 8027 "configure"
8027 #include "confdefs.h"
8028 #include <stdio.h>
8029 main()
8030 {
8031   FILE *f=fopen("conftestval", "w");
8032   if (!f) exit(1);
8033   fprintf(f, "%d\n", sizeof(short));
8034   exit(0);
8035 }
8036 EOF
8037 if { (eval echo configure:8038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8038 then
8039   ac_cv_sizeof_short=`cat conftestval`
8040 else
8041   echo "configure: failed program was:" >&5
8042   cat conftest.$ac_ext >&5
8043   rm -fr conftest*
8044   ac_cv_sizeof_short=0
8045 fi
8046 rm -fr conftest*
8047 fi
8048
8049 fi
8050 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
8051 cat >> confdefs.h <<EOF
8052 #define SIZEOF_SHORT $ac_cv_sizeof_short
8053 EOF
8054
8055  
8056         echo $ac_n "checking size of int""... $ac_c" 1>&6
8057 echo "configure:8058: checking size of int" >&5
8058 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
8059   echo $ac_n "(cached) $ac_c" 1>&6
8060 else
8061   if test "$cross_compiling" = yes; then
8062     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
8063 else
8064   cat > conftest.$ac_ext <<EOF
8065 #line 8066 "configure"
8066 #include "confdefs.h"
8067 #include <stdio.h>
8068 main()
8069 {
8070   FILE *f=fopen("conftestval", "w");
8071   if (!f) exit(1);
8072   fprintf(f, "%d\n", sizeof(int));
8073   exit(0);
8074 }
8075 EOF
8076 if { (eval echo configure:8077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8077 then
8078   ac_cv_sizeof_int=`cat conftestval`
8079 else
8080   echo "configure: failed program was:" >&5
8081   cat conftest.$ac_ext >&5
8082   rm -fr conftest*
8083   ac_cv_sizeof_int=0
8084 fi
8085 rm -fr conftest*
8086 fi
8087
8088 fi
8089 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
8090 cat >> confdefs.h <<EOF
8091 #define SIZEOF_INT $ac_cv_sizeof_int
8092 EOF
8093
8094  
8095         echo $ac_n "checking size of long""... $ac_c" 1>&6
8096 echo "configure:8097: checking size of long" >&5
8097 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
8098   echo $ac_n "(cached) $ac_c" 1>&6
8099 else
8100   if test "$cross_compiling" = yes; then
8101     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
8102 else
8103   cat > conftest.$ac_ext <<EOF
8104 #line 8105 "configure"
8105 #include "confdefs.h"
8106 #include <stdio.h>
8107 main()
8108 {
8109   FILE *f=fopen("conftestval", "w");
8110   if (!f) exit(1);
8111   fprintf(f, "%d\n", sizeof(long));
8112   exit(0);
8113 }
8114 EOF
8115 if { (eval echo configure:8116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8116 then
8117   ac_cv_sizeof_long=`cat conftestval`
8118 else
8119   echo "configure: failed program was:" >&5
8120   cat conftest.$ac_ext >&5
8121   rm -fr conftest*
8122   ac_cv_sizeof_long=0
8123 fi
8124 rm -fr conftest*
8125 fi
8126
8127 fi
8128 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
8129 cat >> confdefs.h <<EOF
8130 #define SIZEOF_LONG $ac_cv_sizeof_long
8131 EOF
8132
8133
8134 fi
8135
8136 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
8137 echo "configure:8138: checking for 8-bit clean memcmp" >&5
8138 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
8139   echo $ac_n "(cached) $ac_c" 1>&6
8140 else
8141   if test "$cross_compiling" = yes; then
8142   ac_cv_func_memcmp_clean=no
8143 else
8144   cat > conftest.$ac_ext <<EOF
8145 #line 8146 "configure"
8146 #include "confdefs.h"
8147
8148 main()
8149 {
8150   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
8151   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
8152 }
8153
8154 EOF
8155 if { (eval echo configure:8156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8156 then
8157   ac_cv_func_memcmp_clean=yes
8158 else
8159   echo "configure: failed program was:" >&5
8160   cat conftest.$ac_ext >&5
8161   rm -fr conftest*
8162   ac_cv_func_memcmp_clean=no
8163 fi
8164 rm -fr conftest*
8165 fi
8166
8167 fi
8168
8169 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
8170 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
8171
8172 echo $ac_n "checking for strftime""... $ac_c" 1>&6
8173 echo "configure:8174: checking for strftime" >&5
8174 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
8175   echo $ac_n "(cached) $ac_c" 1>&6
8176 else
8177   cat > conftest.$ac_ext <<EOF
8178 #line 8179 "configure"
8179 #include "confdefs.h"
8180 /* System header to define __stub macros and hopefully few prototypes,
8181     which can conflict with char strftime(); below.  */
8182 #include <assert.h>
8183 /* Override any gcc2 internal prototype to avoid an error.  */
8184 /* We use char because int might match the return type of a gcc2
8185     builtin and then its argument prototype would still apply.  */
8186 char strftime();
8187
8188 int main() {
8189
8190 /* The GNU C library defines this for functions which it implements
8191     to always fail with ENOSYS.  Some functions are actually named
8192     something starting with __ and the normal name is an alias.  */
8193 #if defined (__stub_strftime) || defined (__stub___strftime)
8194 choke me
8195 #else
8196 strftime();
8197 #endif
8198
8199 ; return 0; }
8200 EOF
8201 if { (eval echo configure:8202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8202   rm -rf conftest*
8203   eval "ac_cv_func_strftime=yes"
8204 else
8205   echo "configure: failed program was:" >&5
8206   cat conftest.$ac_ext >&5
8207   rm -rf conftest*
8208   eval "ac_cv_func_strftime=no"
8209 fi
8210 rm -f conftest*
8211 fi
8212
8213 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
8214   echo "$ac_t""yes" 1>&6
8215   cat >> confdefs.h <<\EOF
8216 #define HAVE_STRFTIME 1
8217 EOF
8218
8219 else
8220   echo "$ac_t""no" 1>&6
8221 # strftime is in -lintl on SCO UNIX.
8222 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
8223 echo "configure:8224: checking for strftime in -lintl" >&5
8224 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
8225 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8226   echo $ac_n "(cached) $ac_c" 1>&6
8227 else
8228   ac_save_LIBS="$LIBS"
8229 LIBS="-lintl  $LIBS"
8230 cat > conftest.$ac_ext <<EOF
8231 #line 8232 "configure"
8232 #include "confdefs.h"
8233 /* Override any gcc2 internal prototype to avoid an error.  */
8234 /* We use char because int might match the return type of a gcc2
8235     builtin and then its argument prototype would still apply.  */
8236 char strftime();
8237
8238 int main() {
8239 strftime()
8240 ; return 0; }
8241 EOF
8242 if { (eval echo configure:8243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8243   rm -rf conftest*
8244   eval "ac_cv_lib_$ac_lib_var=yes"
8245 else
8246   echo "configure: failed program was:" >&5
8247   cat conftest.$ac_ext >&5
8248   rm -rf conftest*
8249   eval "ac_cv_lib_$ac_lib_var=no"
8250 fi
8251 rm -f conftest*
8252 LIBS="$ac_save_LIBS"
8253
8254 fi
8255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8256   echo "$ac_t""yes" 1>&6
8257   cat >> confdefs.h <<\EOF
8258 #define HAVE_STRFTIME 1
8259 EOF
8260
8261 LIBS="-lintl $LIBS"
8262 else
8263   echo "$ac_t""no" 1>&6
8264 fi
8265
8266 fi
8267
8268 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
8269 echo "configure:8270: checking for vprintf" >&5
8270 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
8271   echo $ac_n "(cached) $ac_c" 1>&6
8272 else
8273   cat > conftest.$ac_ext <<EOF
8274 #line 8275 "configure"
8275 #include "confdefs.h"
8276 /* System header to define __stub macros and hopefully few prototypes,
8277     which can conflict with char vprintf(); below.  */
8278 #include <assert.h>
8279 /* Override any gcc2 internal prototype to avoid an error.  */
8280 /* We use char because int might match the return type of a gcc2
8281     builtin and then its argument prototype would still apply.  */
8282 char vprintf();
8283
8284 int main() {
8285
8286 /* The GNU C library defines this for functions which it implements
8287     to always fail with ENOSYS.  Some functions are actually named
8288     something starting with __ and the normal name is an alias.  */
8289 #if defined (__stub_vprintf) || defined (__stub___vprintf)
8290 choke me
8291 #else
8292 vprintf();
8293 #endif
8294
8295 ; return 0; }
8296 EOF
8297 if { (eval echo configure:8298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8298   rm -rf conftest*
8299   eval "ac_cv_func_vprintf=yes"
8300 else
8301   echo "configure: failed program was:" >&5
8302   cat conftest.$ac_ext >&5
8303   rm -rf conftest*
8304   eval "ac_cv_func_vprintf=no"
8305 fi
8306 rm -f conftest*
8307 fi
8308
8309 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
8310   echo "$ac_t""yes" 1>&6
8311   cat >> confdefs.h <<\EOF
8312 #define HAVE_VPRINTF 1
8313 EOF
8314
8315 else
8316   echo "$ac_t""no" 1>&6
8317 fi
8318
8319 if test "$ac_cv_func_vprintf" != yes; then
8320 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
8321 echo "configure:8322: checking for _doprnt" >&5
8322 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
8323   echo $ac_n "(cached) $ac_c" 1>&6
8324 else
8325   cat > conftest.$ac_ext <<EOF
8326 #line 8327 "configure"
8327 #include "confdefs.h"
8328 /* System header to define __stub macros and hopefully few prototypes,
8329     which can conflict with char _doprnt(); below.  */
8330 #include <assert.h>
8331 /* Override any gcc2 internal prototype to avoid an error.  */
8332 /* We use char because int might match the return type of a gcc2
8333     builtin and then its argument prototype would still apply.  */
8334 char _doprnt();
8335
8336 int main() {
8337
8338 /* The GNU C library defines this for functions which it implements
8339     to always fail with ENOSYS.  Some functions are actually named
8340     something starting with __ and the normal name is an alias.  */
8341 #if defined (__stub__doprnt) || defined (__stub____doprnt)
8342 choke me
8343 #else
8344 _doprnt();
8345 #endif
8346
8347 ; return 0; }
8348 EOF
8349 if { (eval echo configure:8350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8350   rm -rf conftest*
8351   eval "ac_cv_func__doprnt=yes"
8352 else
8353   echo "configure: failed program was:" >&5
8354   cat conftest.$ac_ext >&5
8355   rm -rf conftest*
8356   eval "ac_cv_func__doprnt=no"
8357 fi
8358 rm -f conftest*
8359 fi
8360
8361 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
8362   echo "$ac_t""yes" 1>&6
8363   cat >> confdefs.h <<\EOF
8364 #define HAVE_DOPRNT 1
8365 EOF
8366
8367 else
8368   echo "$ac_t""no" 1>&6
8369 fi
8370
8371 fi
8372
8373
8374 if test $ac_cv_func_vprintf = yes ; then
8375                 for ac_func in vsnprintf vsprintf
8376 do
8377 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8378 echo "configure:8379: checking for $ac_func" >&5
8379 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8380   echo $ac_n "(cached) $ac_c" 1>&6
8381 else
8382   cat > conftest.$ac_ext <<EOF
8383 #line 8384 "configure"
8384 #include "confdefs.h"
8385 /* System header to define __stub macros and hopefully few prototypes,
8386     which can conflict with char $ac_func(); below.  */
8387 #include <assert.h>
8388 /* Override any gcc2 internal prototype to avoid an error.  */
8389 /* We use char because int might match the return type of a gcc2
8390     builtin and then its argument prototype would still apply.  */
8391 char $ac_func();
8392
8393 int main() {
8394
8395 /* The GNU C library defines this for functions which it implements
8396     to always fail with ENOSYS.  Some functions are actually named
8397     something starting with __ and the normal name is an alias.  */
8398 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8399 choke me
8400 #else
8401 $ac_func();
8402 #endif
8403
8404 ; return 0; }
8405 EOF
8406 if { (eval echo configure:8407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8407   rm -rf conftest*
8408   eval "ac_cv_func_$ac_func=yes"
8409 else
8410   echo "configure: failed program was:" >&5
8411   cat conftest.$ac_ext >&5
8412   rm -rf conftest*
8413   eval "ac_cv_func_$ac_func=no"
8414 fi
8415 rm -f conftest*
8416 fi
8417
8418 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8419   echo "$ac_t""yes" 1>&6
8420     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8421   cat >> confdefs.h <<EOF
8422 #define $ac_tr_func 1
8423 EOF
8424  
8425 else
8426   echo "$ac_t""no" 1>&6
8427 fi
8428 done
8429
8430 fi
8431
8432 for ac_func in \
8433         bcopy                   \
8434         flock                   \
8435         getdtablesize   \
8436         gethostname             \
8437         getpwuid                \
8438         gettimeofday    \
8439         lockf                   \
8440         memcpy                  \
8441         memmove                 \
8442         mkstemp                 \
8443         select                  \
8444         setpwfile               \
8445         setsid                  \
8446         signal                  \
8447         sigset                  \
8448         snprintf                \
8449         socket                  \
8450         strdup                  \
8451         strerror                \
8452         strpbrk                 \
8453         strrchr                 \
8454         strsep                  \
8455         strstr                  \
8456         strtok                  \
8457         strtol                  \
8458         strtoul                 \
8459         strspn                  \
8460         sysconf                 \
8461         waitpid                 \
8462
8463 do
8464 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8465 echo "configure:8466: checking for $ac_func" >&5
8466 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8467   echo $ac_n "(cached) $ac_c" 1>&6
8468 else
8469   cat > conftest.$ac_ext <<EOF
8470 #line 8471 "configure"
8471 #include "confdefs.h"
8472 /* System header to define __stub macros and hopefully few prototypes,
8473     which can conflict with char $ac_func(); below.  */
8474 #include <assert.h>
8475 /* Override any gcc2 internal prototype to avoid an error.  */
8476 /* We use char because int might match the return type of a gcc2
8477     builtin and then its argument prototype would still apply.  */
8478 char $ac_func();
8479
8480 int main() {
8481
8482 /* The GNU C library defines this for functions which it implements
8483     to always fail with ENOSYS.  Some functions are actually named
8484     something starting with __ and the normal name is an alias.  */
8485 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8486 choke me
8487 #else
8488 $ac_func();
8489 #endif
8490
8491 ; return 0; }
8492 EOF
8493 if { (eval echo configure:8494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8494   rm -rf conftest*
8495   eval "ac_cv_func_$ac_func=yes"
8496 else
8497   echo "configure: failed program was:" >&5
8498   cat conftest.$ac_ext >&5
8499   rm -rf conftest*
8500   eval "ac_cv_func_$ac_func=no"
8501 fi
8502 rm -f conftest*
8503 fi
8504
8505 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8506   echo "$ac_t""yes" 1>&6
8507     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8508   cat >> confdefs.h <<EOF
8509 #define $ac_tr_func 1
8510 EOF
8511  
8512 else
8513   echo "$ac_t""no" 1>&6
8514 fi
8515 done
8516
8517
8518 # these functions are required to build a thread_safe -lldap
8519 for ac_func in \
8520         strtok_r                \
8521         ctime_r                 \
8522         gethostbyaddr_r \
8523         gethostbyname_r \
8524
8525 do
8526 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8527 echo "configure:8528: checking for $ac_func" >&5
8528 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8529   echo $ac_n "(cached) $ac_c" 1>&6
8530 else
8531   cat > conftest.$ac_ext <<EOF
8532 #line 8533 "configure"
8533 #include "confdefs.h"
8534 /* System header to define __stub macros and hopefully few prototypes,
8535     which can conflict with char $ac_func(); below.  */
8536 #include <assert.h>
8537 /* Override any gcc2 internal prototype to avoid an error.  */
8538 /* We use char because int might match the return type of a gcc2
8539     builtin and then its argument prototype would still apply.  */
8540 char $ac_func();
8541
8542 int main() {
8543
8544 /* The GNU C library defines this for functions which it implements
8545     to always fail with ENOSYS.  Some functions are actually named
8546     something starting with __ and the normal name is an alias.  */
8547 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8548 choke me
8549 #else
8550 $ac_func();
8551 #endif
8552
8553 ; return 0; }
8554 EOF
8555 if { (eval echo configure:8556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8556   rm -rf conftest*
8557   eval "ac_cv_func_$ac_func=yes"
8558 else
8559   echo "configure: failed program was:" >&5
8560   cat conftest.$ac_ext >&5
8561   rm -rf conftest*
8562   eval "ac_cv_func_$ac_func=no"
8563 fi
8564 rm -f conftest*
8565 fi
8566
8567 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8568   echo "$ac_t""yes" 1>&6
8569     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8570   cat >> confdefs.h <<EOF
8571 #define $ac_tr_func 1
8572 EOF
8573  
8574 else
8575   echo "$ac_t""no" 1>&6
8576 fi
8577 done
8578
8579
8580 if test "$ac_cv_func_ctime_r" = yes ; then
8581         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
8582 echo "configure:8583: checking number of arguments of ctime_r" >&5
8583 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
8584   echo $ac_n "(cached) $ac_c" 1>&6
8585 else
8586   cat > conftest.$ac_ext <<EOF
8587 #line 8588 "configure"
8588 #include "confdefs.h"
8589 #include <time.h>
8590 int main() {
8591 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
8592 ; return 0; }
8593 EOF
8594 if { (eval echo configure:8595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8595   rm -rf conftest*
8596   ol_cv_func_ctime_r_nargs=3
8597 else
8598   echo "configure: failed program was:" >&5
8599   cat conftest.$ac_ext >&5
8600   rm -rf conftest*
8601   ol_cv_func_ctime_r_nargs=0
8602 fi
8603 rm -f conftest*
8604                 if test $ol_cv_func_ctime_r_nargs = 0 ; then
8605                         cat > conftest.$ac_ext <<EOF
8606 #line 8607 "configure"
8607 #include "confdefs.h"
8608 #include <time.h>
8609 int main() {
8610 time_t ti; char *buffer;
8611                                         ctime_r(&ti,buffer);
8612 ; return 0; }
8613 EOF
8614 if { (eval echo configure:8615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8615   rm -rf conftest*
8616   ol_cv_func_ctime_r_nargs=2
8617 else
8618   echo "configure: failed program was:" >&5
8619   cat conftest.$ac_ext >&5
8620   rm -rf conftest*
8621   ol_cv_func_ctime_r_nargs=0
8622 fi
8623 rm -f conftest*
8624                 fi
8625         
8626 fi
8627
8628 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
8629   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
8630     cat >> confdefs.h <<EOF
8631 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
8632 EOF
8633
8634   fi
8635
8636 else
8637         ol_cv_func_ctime_r=0
8638 fi
8639
8640 if test "$ac_cv_func_strtok_r" = yes \
8641         -a "$ac_cv_func_ctime_r" = yes \
8642         -a "$ol_cv_func_ctime_r_nargs" -ge 2 -a "$ol_cv_func_ctime_r_nargs" -le 3 \
8643         -a "$ac_cv_func_gethostbyaddr_r" = yes \
8644         -a "$ac_cv_func_gethostbyname_r" = yes \
8645         ; then
8646
8647         cat >> confdefs.h <<\EOF
8648 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
8649 EOF
8650
8651 fi
8652
8653 if test $ol_link_threads != no ; then
8654         cat >> confdefs.h <<\EOF
8655 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
8656 EOF
8657
8658 fi
8659
8660 for ac_func in getopt tempnam
8661 do
8662 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8663 echo "configure:8664: checking for $ac_func" >&5
8664 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8665   echo $ac_n "(cached) $ac_c" 1>&6
8666 else
8667   cat > conftest.$ac_ext <<EOF
8668 #line 8669 "configure"
8669 #include "confdefs.h"
8670 /* System header to define __stub macros and hopefully few prototypes,
8671     which can conflict with char $ac_func(); below.  */
8672 #include <assert.h>
8673 /* Override any gcc2 internal prototype to avoid an error.  */
8674 /* We use char because int might match the return type of a gcc2
8675     builtin and then its argument prototype would still apply.  */
8676 char $ac_func();
8677
8678 int main() {
8679
8680 /* The GNU C library defines this for functions which it implements
8681     to always fail with ENOSYS.  Some functions are actually named
8682     something starting with __ and the normal name is an alias.  */
8683 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8684 choke me
8685 #else
8686 $ac_func();
8687 #endif
8688
8689 ; return 0; }
8690 EOF
8691 if { (eval echo configure:8692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8692   rm -rf conftest*
8693   eval "ac_cv_func_$ac_func=yes"
8694 else
8695   echo "configure: failed program was:" >&5
8696   cat conftest.$ac_ext >&5
8697   rm -rf conftest*
8698   eval "ac_cv_func_$ac_func=no"
8699 fi
8700 rm -f conftest*
8701 fi
8702
8703 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8704   echo "$ac_t""yes" 1>&6
8705     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8706   cat >> confdefs.h <<EOF
8707 #define $ac_tr_func 1
8708 EOF
8709  
8710 else
8711   echo "$ac_t""no" 1>&6
8712 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
8713 fi
8714 done
8715
8716
8717
8718 # Check Configuration
8719
8720 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
8721 echo "configure:8722: checking declaration of sys_errlist" >&5
8722 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
8723   echo $ac_n "(cached) $ac_c" 1>&6
8724 else
8725   
8726         cat > conftest.$ac_ext <<EOF
8727 #line 8728 "configure"
8728 #include "confdefs.h"
8729
8730 #include <stdio.h>
8731 #include <sys/types.h>
8732 #include <errno.h> 
8733 int main() {
8734 char *c = (char *) *sys_errlist
8735 ; return 0; }
8736 EOF
8737 if { (eval echo configure:8738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8738   rm -rf conftest*
8739   ol_cv_dcl_sys_errlist=yes
8740 else
8741   echo "configure: failed program was:" >&5
8742   cat conftest.$ac_ext >&5
8743   rm -rf conftest*
8744   ol_cv_dcl_sys_errlist=no
8745 fi
8746 rm -f conftest*
8747 fi
8748
8749 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
8750
8751 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
8752 if test $ol_cv_dcl_sys_errlist = no ; then
8753         cat >> confdefs.h <<\EOF
8754 #define DECL_SYS_ERRLIST 1
8755 EOF
8756
8757         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
8758 echo "configure:8759: checking existence of sys_errlist" >&5
8759         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
8760   echo $ac_n "(cached) $ac_c" 1>&6
8761 else
8762   
8763                 cat > conftest.$ac_ext <<EOF
8764 #line 8765 "configure"
8765 #include "confdefs.h"
8766 #include <errno.h>
8767 int main() {
8768 char *c = (char *) *sys_errlist
8769 ; return 0; }
8770 EOF
8771 if { (eval echo configure:8772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8772   rm -rf conftest*
8773   ol_cv_have_sys_errlist=yes
8774 else
8775   echo "configure: failed program was:" >&5
8776   cat conftest.$ac_ext >&5
8777   rm -rf conftest*
8778   ol_cv_have_sys_errlist=no
8779 fi
8780 rm -f conftest*
8781 fi
8782
8783         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
8784 fi
8785
8786
8787
8788 if test "$ol_enable_debug" != no ; then
8789         cat >> confdefs.h <<\EOF
8790 #define LDAP_DEBUG 1
8791 EOF
8792
8793 fi
8794 if test "$ol_enable_syslog" = yes ; then
8795         cat >> confdefs.h <<\EOF
8796 #define LDAP_SYSLOG 1
8797 EOF
8798
8799 fi
8800 if test "$ol_enable_libui" = yes ; then
8801         cat >> confdefs.h <<\EOF
8802 #define LDAP_LIBUI 1
8803 EOF
8804
8805 fi
8806 if test "$ol_enable_cache" = no ; then
8807         cat >> confdefs.h <<\EOF
8808 #define LDAP_NOCACHE 1
8809 EOF
8810
8811 fi
8812 if test "$ol_enable_dns" != no ; then
8813         cat >> confdefs.h <<\EOF
8814 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_API_VENDOR_VERSION
8815 EOF
8816
8817 fi
8818 if test "$ol_enable_proctitle" != no ; then
8819         cat >> confdefs.h <<\EOF
8820 #define LDAP_PROCTITLE 1
8821 EOF
8822
8823 fi
8824 if test "$ol_enable_referrals" != no ; then
8825         cat >> confdefs.h <<\EOF
8826 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_API_VENDOR_VERSION
8827 EOF
8828
8829 fi
8830 if test "$ol_enable_cldap" != no ; then
8831         cat >> confdefs.h <<\EOF
8832 #define LDAP_CONNECTIONLESS 1
8833 EOF
8834
8835 fi
8836
8837 if test "$ol_enable_aclgroups" != no ; then
8838         cat >> confdefs.h <<\EOF
8839 #define SLAPD_ACLGROUPS 1
8840 EOF
8841
8842 fi
8843 if test "$ol_enable_crypt" != no ; then
8844         cat >> confdefs.h <<\EOF
8845 #define SLAPD_CRYPT 1
8846 EOF
8847
8848 fi
8849 if test "$ol_enable_cleartext" != no ; then
8850         cat >> confdefs.h <<\EOF
8851 #define SLAPD_CLEARTEXT 1
8852 EOF
8853
8854 fi
8855 if test "$ol_enable_phonetic" != no ; then
8856         cat >> confdefs.h <<\EOF
8857 #define SLAPD_PHONETIC 1
8858 EOF
8859
8860 fi
8861 if test "$ol_enable_rlookups" != no ; then
8862         cat >> confdefs.h <<\EOF
8863 #define SLAPD_RLOOKUPS 1
8864 EOF
8865
8866 fi
8867
8868 if test "$ol_link_ldbm" != no ; then
8869         cat >> confdefs.h <<\EOF
8870 #define SLAPD_LDBM 1
8871 EOF
8872
8873         BUILD_SLAPD=yes
8874         BUILD_LDBM=yes
8875 fi
8876
8877 if test "$ol_enable_passwd" != no ; then
8878         cat >> confdefs.h <<\EOF
8879 #define SLAPD_PASSWD 1
8880 EOF
8881
8882         BUILD_SLAPD=yes
8883         BUILD_PASSWD=yes
8884 fi
8885
8886 if test "$ol_enable_perl" != no ; then
8887         cat >> confdefs.h <<\EOF
8888 #define SLAPD_PERL 1
8889 EOF
8890
8891         BUILD_SLAPD=yes
8892         BUILD_PERL=yes
8893 fi
8894
8895 if test "$ol_enable_shell" != no ; then
8896         cat >> confdefs.h <<\EOF
8897 #define SLAPD_SHELL 1
8898 EOF
8899
8900         BUILD_SLAPD=yes
8901         BUILD_SHELL=yes
8902 fi
8903
8904 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
8905         $BUILD_SLAPD = yes ; then
8906         BUILD_SLURPD=yes
8907 fi
8908
8909 if test "$ol_link_isode" != no ; then
8910         BUILD_LDAPD=yes
8911 fi
8912
8913
8914
8915
8916   
8917   
8918   
8919   
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937 trap '' 1 2 15
8938 cat > confcache <<\EOF
8939 # This file is a shell script that caches the results of configure
8940 # tests run on this system so they can be shared between configure
8941 # scripts and configure runs.  It is not useful on other systems.
8942 # If it contains results you don't want to keep, you may remove or edit it.
8943 #
8944 # By default, configure uses ./config.cache as the cache file,
8945 # creating it if it does not exist already.  You can give configure
8946 # the --cache-file=FILE option to use a different cache file; that is
8947 # what configure does when it calls configure scripts in
8948 # subdirectories, so they share the cache.
8949 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8950 # config.status only pays attention to the cache file if you give it the
8951 # --recheck option to rerun configure.
8952 #
8953 EOF
8954 # The following way of writing the cache mishandles newlines in values,
8955 # but we know of no workaround that is simple, portable, and efficient.
8956 # So, don't put newlines in cache variables' values.
8957 # Ultrix sh set writes to stderr and can't be redirected directly,
8958 # and sets the high bit in the cache file unless we assign to the vars.
8959 (set) 2>&1 |
8960   case `(ac_space=' '; set | grep ac_space) 2>&1` in
8961   *ac_space=\ *)
8962     # `set' does not quote correctly, so add quotes (double-quote substitution
8963     # turns \\\\ into \\, and sed turns \\ into \).
8964     sed -n \
8965       -e "s/'/'\\\\''/g" \
8966       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8967     ;;
8968   *)
8969     # `set' quotes correctly as required by POSIX, so do not add quotes.
8970     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8971     ;;
8972   esac >> confcache
8973 if cmp -s $cache_file confcache; then
8974   :
8975 else
8976   if test -w $cache_file; then
8977     echo "updating cache $cache_file"
8978     cat confcache > $cache_file
8979   else
8980     echo "not updating unwritable cache $cache_file"
8981   fi
8982 fi
8983 rm -f confcache
8984
8985 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8986
8987 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8988 # Let make expand exec_prefix.
8989 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8990
8991 # Any assignment to VPATH causes Sun make to only execute
8992 # the first set of double-colon rules, so remove it if not needed.
8993 # If there is a colon in the path, we need to keep it.
8994 if test "x$srcdir" = x.; then
8995   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
8996 fi
8997
8998 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8999
9000 DEFS=-DHAVE_CONFIG_H
9001
9002 # Without the "./", some shells look in PATH for config.status.
9003 : ${CONFIG_STATUS=./config.status}
9004
9005 echo creating $CONFIG_STATUS
9006 rm -f $CONFIG_STATUS
9007 cat > $CONFIG_STATUS <<EOF
9008 #! /bin/sh
9009 # Generated automatically by configure.
9010 # Run this file to recreate the current configuration.
9011 # This directory was configured as follows,
9012 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9013 #
9014 # $0 $ac_configure_args
9015 #
9016 # Compiler output produced by configure, useful for debugging
9017 # configure, is in ./config.log if it exists.
9018
9019 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9020 for ac_option
9021 do
9022   case "\$ac_option" in
9023   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9024     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9025     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9026   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9027     echo "$CONFIG_STATUS generated by autoconf version 2.13"
9028     exit 0 ;;
9029   -help | --help | --hel | --he | --h)
9030     echo "\$ac_cs_usage"; exit 0 ;;
9031   *) echo "\$ac_cs_usage"; exit 1 ;;
9032   esac
9033 done
9034
9035 ac_given_srcdir=$srcdir
9036 ac_given_INSTALL="$INSTALL"
9037
9038 trap 'rm -fr `echo "\
9039 Makefile:build/top.mk:Makefile.in:build/dir.mk \
9040 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
9041 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
9042 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
9043 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
9044 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
9045 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
9046 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
9047 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
9048 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
9049 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
9050 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
9051 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
9052 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
9053 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
9054 include/Makefile:build/top.mk:include/Makefile.in \
9055 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
9056 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
9057 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
9058 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
9059 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
9060 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
9061 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
9062 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
9063 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
9064 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
9065 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
9066 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
9067 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
9068 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
9069 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
9070 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
9071 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
9072 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
9073 tests/Makefile:build/top.mk:tests/Makefile.in \
9074  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9075 EOF
9076 cat >> $CONFIG_STATUS <<EOF
9077
9078 # Protect against being on the right side of a sed subst in config.status.
9079 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9080  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9081 $ac_vpsub
9082 $extrasub
9083 s%@SHELL@%$SHELL%g
9084 s%@CFLAGS@%$CFLAGS%g
9085 s%@CPPFLAGS@%$CPPFLAGS%g
9086 s%@CXXFLAGS@%$CXXFLAGS%g
9087 s%@FFLAGS@%$FFLAGS%g
9088 s%@DEFS@%$DEFS%g
9089 s%@LDFLAGS@%$LDFLAGS%g
9090 s%@LIBS@%$LIBS%g
9091 s%@exec_prefix@%$exec_prefix%g
9092 s%@prefix@%$prefix%g
9093 s%@program_transform_name@%$program_transform_name%g
9094 s%@bindir@%$bindir%g
9095 s%@sbindir@%$sbindir%g
9096 s%@libexecdir@%$libexecdir%g
9097 s%@datadir@%$datadir%g
9098 s%@sysconfdir@%$sysconfdir%g
9099 s%@sharedstatedir@%$sharedstatedir%g
9100 s%@localstatedir@%$localstatedir%g
9101 s%@libdir@%$libdir%g
9102 s%@includedir@%$includedir%g
9103 s%@oldincludedir@%$oldincludedir%g
9104 s%@infodir@%$infodir%g
9105 s%@mandir@%$mandir%g
9106 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9107 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9108 s%@INSTALL_DATA@%$INSTALL_DATA%g
9109 s%@PACKAGE@%$PACKAGE%g
9110 s%@VERSION@%$VERSION%g
9111 s%@ACLOCAL@%$ACLOCAL%g
9112 s%@AUTOCONF@%$AUTOCONF%g
9113 s%@AUTOMAKE@%$AUTOMAKE%g
9114 s%@AUTOHEADER@%$AUTOHEADER%g
9115 s%@MAKEINFO@%$MAKEINFO%g
9116 s%@SET_MAKE@%$SET_MAKE%g
9117 s%@top_builddir@%$top_builddir%g
9118 s%@ldap_subdir@%$ldap_subdir%g
9119 s%@host@%$host%g
9120 s%@host_alias@%$host_alias%g
9121 s%@host_cpu@%$host_cpu%g
9122 s%@host_vendor@%$host_vendor%g
9123 s%@host_os@%$host_os%g
9124 s%@RANLIB@%$RANLIB%g
9125 s%@CC@%$CC%g
9126 s%@LD@%$LD%g
9127 s%@NM@%$NM%g
9128 s%@LN_S@%$LN_S%g
9129 s%@LIBTOOL@%$LIBTOOL%g
9130 s%@SENDMAIL@%$SENDMAIL%g
9131 s%@EDITOR@%$EDITOR%g
9132 s%@FINGER@%$FINGER%g
9133 s%@PERLBIN@%$PERLBIN%g
9134 s%@CPP@%$CPP%g
9135 s%@PEPSY@%$PEPSY%g
9136 s%@LIBOBJS@%$LIBOBJS%g
9137 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
9138 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
9139 s%@BUILD_LDBM@%$BUILD_LDBM%g
9140 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
9141 s%@BUILD_PERL@%$BUILD_PERL%g
9142 s%@BUILD_SHELL@%$BUILD_SHELL%g
9143 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
9144 s%@LDAP_LIBS@%$LDAP_LIBS%g
9145 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
9146 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
9147 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
9148 s%@LDBM_LIBS@%$LDBM_LIBS%g
9149 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
9150 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
9151 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
9152 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
9153 s%@KRB_LIBS@%$KRB_LIBS%g
9154 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
9155
9156 CEOF
9157 EOF
9158
9159 cat >> $CONFIG_STATUS <<\EOF
9160
9161 # Split the substitutions into bite-sized pieces for seds with
9162 # small command number limits, like on Digital OSF/1 and HP-UX.
9163 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9164 ac_file=1 # Number of current file.
9165 ac_beg=1 # First line for current file.
9166 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9167 ac_more_lines=:
9168 ac_sed_cmds=""
9169 while $ac_more_lines; do
9170   if test $ac_beg -gt 1; then
9171     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9172   else
9173     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9174   fi
9175   if test ! -s conftest.s$ac_file; then
9176     ac_more_lines=false
9177     rm -f conftest.s$ac_file
9178   else
9179     if test -z "$ac_sed_cmds"; then
9180       ac_sed_cmds="sed -f conftest.s$ac_file"
9181     else
9182       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9183     fi
9184     ac_file=`expr $ac_file + 1`
9185     ac_beg=$ac_end
9186     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9187   fi
9188 done
9189 if test -z "$ac_sed_cmds"; then
9190   ac_sed_cmds=cat
9191 fi
9192 EOF
9193
9194 cat >> $CONFIG_STATUS <<EOF
9195
9196 CONFIG_FILES=\${CONFIG_FILES-"\
9197 Makefile:build/top.mk:Makefile.in:build/dir.mk \
9198 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
9199 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
9200 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
9201 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
9202 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
9203 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
9204 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
9205 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
9206 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
9207 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
9208 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
9209 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
9210 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
9211 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
9212 include/Makefile:build/top.mk:include/Makefile.in \
9213 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
9214 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
9215 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
9216 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
9217 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
9218 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
9219 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
9220 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
9221 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
9222 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
9223 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
9224 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
9225 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
9226 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
9227 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
9228 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
9229 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
9230 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
9231 tests/Makefile:build/top.mk:tests/Makefile.in \
9232 "}
9233 EOF
9234 cat >> $CONFIG_STATUS <<\EOF
9235 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9236   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9237   case "$ac_file" in
9238   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9239        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9240   *) ac_file_in="${ac_file}.in" ;;
9241   esac
9242
9243   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9244
9245   # Remove last slash and all that follows it.  Not all systems have dirname.
9246   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9247   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9248     # The file is in a subdirectory.
9249     test ! -d "$ac_dir" && mkdir "$ac_dir"
9250     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9251     # A "../" for each directory in $ac_dir_suffix.
9252     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9253   else
9254     ac_dir_suffix= ac_dots=
9255   fi
9256
9257   case "$ac_given_srcdir" in
9258   .)  srcdir=.
9259       if test -z "$ac_dots"; then top_srcdir=.
9260       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9261   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9262   *) # Relative path.
9263     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9264     top_srcdir="$ac_dots$ac_given_srcdir" ;;
9265   esac
9266
9267   case "$ac_given_INSTALL" in
9268   [/$]*) INSTALL="$ac_given_INSTALL" ;;
9269   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9270   esac
9271
9272   echo creating "$ac_file"
9273   rm -f "$ac_file"
9274   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9275   case "$ac_file" in
9276   *Makefile*) ac_comsub="1i\\
9277 # $configure_input" ;;
9278   *) ac_comsub= ;;
9279   esac
9280
9281   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9282   sed -e "$ac_comsub
9283 s%@configure_input@%$configure_input%g
9284 s%@srcdir@%$srcdir%g
9285 s%@top_srcdir@%$top_srcdir%g
9286 s%@INSTALL@%$INSTALL%g
9287 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9288 fi; done
9289 rm -f conftest.s*
9290
9291 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9292 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9293 #
9294 # ac_d sets the value in "#define NAME VALUE" lines.
9295 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9296 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9297 ac_dC='\3'
9298 ac_dD='%g'
9299 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9300 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9301 ac_uB='\([      ]\)%\1#\2define\3'
9302 ac_uC=' '
9303 ac_uD='\4%g'
9304 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9305 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9306 ac_eB='$%\1#\2define\3'
9307 ac_eC=' '
9308 ac_eD='%g'
9309
9310 if test "${CONFIG_HEADERS+set}" != set; then
9311 EOF
9312 cat >> $CONFIG_STATUS <<EOF
9313   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
9314 EOF
9315 cat >> $CONFIG_STATUS <<\EOF
9316 fi
9317 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9318   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9319   case "$ac_file" in
9320   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9321        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9322   *) ac_file_in="${ac_file}.in" ;;
9323   esac
9324
9325   echo creating $ac_file
9326
9327   rm -f conftest.frag conftest.in conftest.out
9328   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9329   cat $ac_file_inputs > conftest.in
9330
9331 EOF
9332
9333 # Transform confdefs.h into a sed script conftest.vals that substitutes
9334 # the proper values into config.h.in to produce config.h.  And first:
9335 # Protect against being on the right side of a sed subst in config.status.
9336 # Protect against being in an unquoted here document in config.status.
9337 rm -f conftest.vals
9338 cat > conftest.hdr <<\EOF
9339 s/[\\&%]/\\&/g
9340 s%[\\$`]%\\&%g
9341 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9342 s%ac_d%ac_u%gp
9343 s%ac_u%ac_e%gp
9344 EOF
9345 sed -n -f conftest.hdr confdefs.h > conftest.vals
9346 rm -f conftest.hdr
9347
9348 # This sed command replaces #undef with comments.  This is necessary, for
9349 # example, in the case of _POSIX_SOURCE, which is predefined and required
9350 # on some systems where configure will not decide to define it.
9351 cat >> conftest.vals <<\EOF
9352 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9353 EOF
9354
9355 # Break up conftest.vals because some shells have a limit on
9356 # the size of here documents, and old seds have small limits too.
9357
9358 rm -f conftest.tail
9359 while :
9360 do
9361   ac_lines=`grep -c . conftest.vals`
9362   # grep -c gives empty output for an empty file on some AIX systems.
9363   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9364   # Write a limited-size here document to conftest.frag.
9365   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9366   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9367   echo 'CEOF
9368   sed -f conftest.frag conftest.in > conftest.out
9369   rm -f conftest.in
9370   mv conftest.out conftest.in
9371 ' >> $CONFIG_STATUS
9372   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9373   rm -f conftest.vals
9374   mv conftest.tail conftest.vals
9375 done
9376 rm -f conftest.vals
9377
9378 cat >> $CONFIG_STATUS <<\EOF
9379   rm -f conftest.frag conftest.h
9380   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9381   cat conftest.in >> conftest.h
9382   rm -f conftest.in
9383   if cmp -s $ac_file conftest.h 2>/dev/null; then
9384     echo "$ac_file is unchanged"
9385     rm -f conftest.h
9386   else
9387     # Remove last slash and all that follows it.  Not all systems have dirname.
9388       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9389       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9390       # The file is in a subdirectory.
9391       test ! -d "$ac_dir" && mkdir "$ac_dir"
9392     fi
9393     rm -f $ac_file
9394     mv conftest.h $ac_file
9395   fi
9396 fi; done
9397
9398 EOF
9399 cat >> $CONFIG_STATUS <<EOF
9400
9401 EOF
9402 cat >> $CONFIG_STATUS <<\EOF
9403
9404 date > stamp-h
9405 echo Please \"make depend\" to build dependencies
9406
9407 exit 0
9408 EOF
9409 chmod +x $CONFIG_STATUS
9410 rm -fr confdefs* $ac_clean_files
9411 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9412