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