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