]> git.sur5r.net Git - openldap/blob - configure
Merged dynamic module support patch (see ITS #196). To enable, run ./configure w
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.14.1 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-syslog       enable syslog support (auto)"
21 ac_help="$ac_help
22   --enable-proctitle    enable proctitle support (yes)"
23 ac_help="$ac_help
24   --enable-cache        enable caching (yes)"
25 ac_help="$ac_help
26   --enable-dns          enable V2 DNS  extension (no)"
27 ac_help="$ac_help
28   --enable-referrals    enable V2 Referrals extension (yes)"
29 ac_help="$ac_help
30   --enable-cldap        enable connectionless ldap (no)"
31 ac_help="$ac_help
32   --enable-x-compile    enable cross compiling (no)"
33 ac_help="$ac_help
34   --enable-dmalloc      enable debug malloc support (no)"
35 ac_help="$ac_help
36   --with-kerberos       with Kerberos support (auto)"
37 ac_help="$ac_help
38   --with-readline  with readline support (auto)"
39 ac_help="$ac_help
40   --with-threads        use threads (auto)"
41 ac_help="$ac_help
42   --with-tls  with TLS/SSL support (auto)"
43 ac_help="$ac_help
44   --with-yielding-select        with implicitly yielding select (auto)"
45 ac_help="$ac_help
46 LDAPD Options:"
47 ac_help="$ac_help
48   --enable-ldapd        enable building ldapd (no)"
49 ac_help="$ac_help
50 SLAPD Options:"
51 ac_help="$ac_help
52   --enable-slapd        enable building slapd (yes)"
53 ac_help="$ac_help
54     --enable-aclgroups  enable ACL group support (auto)"
55 ac_help="$ac_help
56     --enable-cleartext  enable cleartext passwords (yes)"
57 ac_help="$ac_help
58     --enable-crypt      enable crypt(3) passwords (auto)"
59 ac_help="$ac_help
60     --enable-modules    enable dynamic module support (no)"
61 ac_help="$ac_help
62     --enable-phonetic   enable phonetic/soundex (no)"
63 ac_help="$ac_help
64     --enable-rlookups   enable reverse lookups (auto)"
65 ac_help="$ac_help
66     --enable-wrappers   enable tcp wrapper support (no)"
67 ac_help="$ac_help
68     --enable-bdb2       enable bdb2 backend (no)"
69 ac_help="$ac_help
70       --with-bdb2-module        module type (static)"
71 ac_help="$ac_help
72     --enable-ldap       enable ldap backend (no)"
73 ac_help="$ac_help
74       --with-ldap-module        module type (static)"
75 ac_help="$ac_help
76     --enable-ldbm       enable ldbm backend (yes)"
77 ac_help="$ac_help
78       --with-ldbm-module        module type (static)"
79 ac_help="$ac_help
80       --with-ldbm-api   use LDBM API (auto)"
81 ac_help="$ac_help
82       --with-ldbm-type  use LDBM type (auto)"
83 ac_help="$ac_help
84     --enable-passwd     enable passwd backend (no)"
85 ac_help="$ac_help
86       --with-passwd-module      module type (static)"
87 ac_help="$ac_help
88     --enable-perl       enable perl backend (no)"
89 ac_help="$ac_help
90       --with-perl-module        module type (static)"
91 ac_help="$ac_help
92     --enable-shell      enable shell backend (no)"
93 ac_help="$ac_help
94       --with-shell-module       module type (static)"
95 ac_help="$ac_help
96     --enable-tcl        enable tcl backend (no)"
97 ac_help="$ac_help
98       --with-tcl-module module type (static)"
99 ac_help="$ac_help
100 SLURPD Options:"
101 ac_help="$ac_help
102   --enable-slurpd       enable building slurpd (auto)"
103 ac_help="$ac_help
104 Library Generation & Linking Options"
105 ac_help="$ac_help
106   --enable-static         build static libraries [default=yes]
107   --enable-static=PKGS    only build shared libraries if the current package
108                           appears as an element in the PKGS list"
109 ac_help="$ac_help
110   --enable-shared         build shared libraries [default=yes]
111   --enable-shared=PKGS    only build shared libraries if the current package
112                           appears as an element in the PKGS list"
113 ac_help="$ac_help
114   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
115
116 # Initialize some variables set by options.
117 # The variables have the same names as the options, with
118 # dashes changed to underlines.
119 build=NONE
120 cache_file=./config.cache
121 exec_prefix=NONE
122 host=NONE
123 no_create=
124 nonopt=NONE
125 no_recursion=
126 prefix=NONE
127 program_prefix=NONE
128 program_suffix=NONE
129 program_transform_name=s,x,x,
130 silent=
131 site=
132 srcdir=
133 target=NONE
134 verbose=
135 x_includes=NONE
136 x_libraries=NONE
137 bindir='${exec_prefix}/bin'
138 sbindir='${exec_prefix}/sbin'
139 libexecdir='${exec_prefix}/libexec'
140 datadir='${prefix}/share'
141 sysconfdir='${prefix}/etc'
142 sharedstatedir='${prefix}/com'
143 localstatedir='${prefix}/var'
144 libdir='${exec_prefix}/lib'
145 includedir='${prefix}/include'
146 oldincludedir='/usr/include'
147 infodir='${prefix}/info'
148 mandir='${prefix}/man'
149
150 # Initialize some other variables.
151 subdirs=
152 MFLAGS= MAKEFLAGS=
153 SHELL=${CONFIG_SHELL-/bin/sh}
154 # Maximum number of lines to put in a shell here document.
155 ac_max_here_lines=12
156
157 ac_prev=
158 for ac_option
159 do
160
161   # If the previous option needs an argument, assign it.
162   if test -n "$ac_prev"; then
163     eval "$ac_prev=\$ac_option"
164     ac_prev=
165     continue
166   fi
167
168   case "$ac_option" in
169   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
170   *) ac_optarg= ;;
171   esac
172
173   # Accept the important Cygnus configure options, so we can diagnose typos.
174
175   case "$ac_option" in
176
177   -bindir | --bindir | --bindi | --bind | --bin | --bi)
178     ac_prev=bindir ;;
179   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
180     bindir="$ac_optarg" ;;
181
182   -build | --build | --buil | --bui | --bu)
183     ac_prev=build ;;
184   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
185     build="$ac_optarg" ;;
186
187   -cache-file | --cache-file | --cache-fil | --cache-fi \
188   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
189     ac_prev=cache_file ;;
190   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
191   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
192     cache_file="$ac_optarg" ;;
193
194   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
195     ac_prev=datadir ;;
196   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
197   | --da=*)
198     datadir="$ac_optarg" ;;
199
200   -disable-* | --disable-*)
201     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
202     # Reject names that are not valid shell variable names.
203     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
204       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
205     fi
206     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
207     eval "enable_${ac_feature}=no" ;;
208
209   -enable-* | --enable-*)
210     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
211     # Reject names that are not valid shell variable names.
212     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
213       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
214     fi
215     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
216     case "$ac_option" in
217       *=*) ;;
218       *) ac_optarg=yes ;;
219     esac
220     eval "enable_${ac_feature}='$ac_optarg'" ;;
221
222   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
223   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
224   | --exec | --exe | --ex)
225     ac_prev=exec_prefix ;;
226   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
227   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
228   | --exec=* | --exe=* | --ex=*)
229     exec_prefix="$ac_optarg" ;;
230
231   -gas | --gas | --ga | --g)
232     # Obsolete; use --with-gas.
233     with_gas=yes ;;
234
235   -help | --help | --hel | --he)
236     # Omit some internal or obsolete options to make the list less imposing.
237     # This message is too long to be a string in the A/UX 3.1 sh.
238     cat << EOF
239 Usage: configure [options] [host]
240 Options: [defaults in brackets after descriptions]
241 Configuration:
242   --cache-file=FILE       cache test results in FILE
243   --help                  print this message
244   --no-create             do not create output files
245   --quiet, --silent       do not print \`checking...' messages
246   --version               print the version of autoconf that created configure
247 Directory and file names:
248   --prefix=PREFIX         install architecture-independent files in PREFIX
249                           [$ac_default_prefix]
250   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
251                           [same as prefix]
252   --bindir=DIR            user executables in DIR [EPREFIX/bin]
253   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
254   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
255   --datadir=DIR           read-only architecture-independent data in DIR
256                           [PREFIX/share]
257   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
258   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
259                           [PREFIX/com]
260   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
261   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
262   --includedir=DIR        C header files in DIR [PREFIX/include]
263   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
264   --infodir=DIR           info documentation in DIR [PREFIX/info]
265   --mandir=DIR            man documentation in DIR [PREFIX/man]
266   --srcdir=DIR            find the sources in DIR [configure dir or ..]
267   --program-prefix=PREFIX prepend PREFIX to installed program names
268   --program-suffix=SUFFIX append SUFFIX to installed program names
269   --program-transform-name=PROGRAM
270                           run sed PROGRAM on installed program names
271 EOF
272     cat << EOF
273 Host type:
274   --build=BUILD           configure for building on BUILD [BUILD=HOST]
275   --host=HOST             configure for HOST [guessed]
276   --target=TARGET         configure for TARGET [TARGET=HOST]
277 Features and packages:
278   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
279   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
280   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
281   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
282   --x-includes=DIR        X include files are in DIR
283   --x-libraries=DIR       X library files are in DIR
284 EOF
285     if test -n "$ac_help"; then
286       echo "--enable and --with options recognized:$ac_help"
287     fi
288     exit 0 ;;
289
290   -host | --host | --hos | --ho)
291     ac_prev=host ;;
292   -host=* | --host=* | --hos=* | --ho=*)
293     host="$ac_optarg" ;;
294
295   -includedir | --includedir | --includedi | --included | --include \
296   | --includ | --inclu | --incl | --inc)
297     ac_prev=includedir ;;
298   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
299   | --includ=* | --inclu=* | --incl=* | --inc=*)
300     includedir="$ac_optarg" ;;
301
302   -infodir | --infodir | --infodi | --infod | --info | --inf)
303     ac_prev=infodir ;;
304   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
305     infodir="$ac_optarg" ;;
306
307   -libdir | --libdir | --libdi | --libd)
308     ac_prev=libdir ;;
309   -libdir=* | --libdir=* | --libdi=* | --libd=*)
310     libdir="$ac_optarg" ;;
311
312   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
313   | --libexe | --libex | --libe)
314     ac_prev=libexecdir ;;
315   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
316   | --libexe=* | --libex=* | --libe=*)
317     libexecdir="$ac_optarg" ;;
318
319   -localstatedir | --localstatedir | --localstatedi | --localstated \
320   | --localstate | --localstat | --localsta | --localst \
321   | --locals | --local | --loca | --loc | --lo)
322     ac_prev=localstatedir ;;
323   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
324   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
325   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
326     localstatedir="$ac_optarg" ;;
327
328   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
329     ac_prev=mandir ;;
330   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
331     mandir="$ac_optarg" ;;
332
333   -nfp | --nfp | --nf)
334     # Obsolete; use --without-fp.
335     with_fp=no ;;
336
337   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
338   | --no-cr | --no-c)
339     no_create=yes ;;
340
341   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
342   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
343     no_recursion=yes ;;
344
345   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
346   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
347   | --oldin | --oldi | --old | --ol | --o)
348     ac_prev=oldincludedir ;;
349   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
350   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
351   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
352     oldincludedir="$ac_optarg" ;;
353
354   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
355     ac_prev=prefix ;;
356   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
357     prefix="$ac_optarg" ;;
358
359   -program-prefix | --program-prefix | --program-prefi | --program-pref \
360   | --program-pre | --program-pr | --program-p)
361     ac_prev=program_prefix ;;
362   -program-prefix=* | --program-prefix=* | --program-prefi=* \
363   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
364     program_prefix="$ac_optarg" ;;
365
366   -program-suffix | --program-suffix | --program-suffi | --program-suff \
367   | --program-suf | --program-su | --program-s)
368     ac_prev=program_suffix ;;
369   -program-suffix=* | --program-suffix=* | --program-suffi=* \
370   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
371     program_suffix="$ac_optarg" ;;
372
373   -program-transform-name | --program-transform-name \
374   | --program-transform-nam | --program-transform-na \
375   | --program-transform-n | --program-transform- \
376   | --program-transform | --program-transfor \
377   | --program-transfo | --program-transf \
378   | --program-trans | --program-tran \
379   | --progr-tra | --program-tr | --program-t)
380     ac_prev=program_transform_name ;;
381   -program-transform-name=* | --program-transform-name=* \
382   | --program-transform-nam=* | --program-transform-na=* \
383   | --program-transform-n=* | --program-transform-=* \
384   | --program-transform=* | --program-transfor=* \
385   | --program-transfo=* | --program-transf=* \
386   | --program-trans=* | --program-tran=* \
387   | --progr-tra=* | --program-tr=* | --program-t=*)
388     program_transform_name="$ac_optarg" ;;
389
390   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
391   | -silent | --silent | --silen | --sile | --sil)
392     silent=yes ;;
393
394   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
395     ac_prev=sbindir ;;
396   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
397   | --sbi=* | --sb=*)
398     sbindir="$ac_optarg" ;;
399
400   -sharedstatedir | --sharedstatedir | --sharedstatedi \
401   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
402   | --sharedst | --shareds | --shared | --share | --shar \
403   | --sha | --sh)
404     ac_prev=sharedstatedir ;;
405   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
406   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
407   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
408   | --sha=* | --sh=*)
409     sharedstatedir="$ac_optarg" ;;
410
411   -site | --site | --sit)
412     ac_prev=site ;;
413   -site=* | --site=* | --sit=*)
414     site="$ac_optarg" ;;
415
416   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
417     ac_prev=srcdir ;;
418   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
419     srcdir="$ac_optarg" ;;
420
421   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
422   | --syscon | --sysco | --sysc | --sys | --sy)
423     ac_prev=sysconfdir ;;
424   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
425   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
426     sysconfdir="$ac_optarg" ;;
427
428   -target | --target | --targe | --targ | --tar | --ta | --t)
429     ac_prev=target ;;
430   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
431     target="$ac_optarg" ;;
432
433   -v | -verbose | --verbose | --verbos | --verbo | --verb)
434     verbose=yes ;;
435
436   -version | --version | --versio | --versi | --vers)
437     echo "configure generated by autoconf version 2.14.1"
438     exit 0 ;;
439
440   -with-* | --with-*)
441     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
442     # Reject names that are not valid shell variable names.
443     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
444       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
445     fi
446     ac_package=`echo $ac_package| sed 's/-/_/g'`
447     case "$ac_option" in
448       *=*) ;;
449       *) ac_optarg=yes ;;
450     esac
451     eval "with_${ac_package}='$ac_optarg'" ;;
452
453   -without-* | --without-*)
454     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
455     # Reject names that are not valid shell variable names.
456     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
457       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
458     fi
459     ac_package=`echo $ac_package| sed 's/-/_/g'`
460     eval "with_${ac_package}=no" ;;
461
462   --x)
463     # Obsolete; use --with-x.
464     with_x=yes ;;
465
466   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
467   | --x-incl | --x-inc | --x-in | --x-i)
468     ac_prev=x_includes ;;
469   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
470   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
471     x_includes="$ac_optarg" ;;
472
473   -x-libraries | --x-libraries | --x-librarie | --x-librari \
474   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
475     ac_prev=x_libraries ;;
476   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
477   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
478     x_libraries="$ac_optarg" ;;
479
480   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
481     ;;
482
483   *)
484     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
485       echo "configure: warning: $ac_option: invalid host type" 1>&2
486     fi
487     if test "x$nonopt" != xNONE; then
488       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
489     fi
490     nonopt="$ac_option"
491     ;;
492
493   esac
494 done
495
496 if test -n "$ac_prev"; then
497   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
498 fi
499
500 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
501
502 # File descriptor usage:
503 # 0 standard input
504 # 1 file creation
505 # 2 errors and warnings
506 # 3 some systems may open it to /dev/tty
507 # 4 used on the Kubota Titan
508 # 6 checking for... messages and results
509 # 5 compiler messages saved in config.log
510 if test "$silent" = yes; then
511   exec 6>/dev/null
512 else
513   exec 6>&1
514 fi
515 exec 5>./config.log
516
517 echo "\
518 This file contains any messages produced by compilers while
519 running configure, to aid debugging if configure makes a mistake.
520 " 1>&5
521
522 # Strip out --no-create and --no-recursion so they do not pile up.
523 # Also quote any args containing shell metacharacters.
524 ac_configure_args=
525 for ac_arg
526 do
527   case "$ac_arg" in
528   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
529   | --no-cr | --no-c) ;;
530   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
531   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
532   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
533   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
534   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
535   esac
536 done
537
538 # NLS nuisances.
539 # Only set these to C if already set.  These must not be set unconditionally
540 # because not all systems understand e.g. LANG=C (notably SCO).
541 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
542 # Non-C LC_CTYPE values break the ctype check.
543 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
544 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
545 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
546 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
547
548 # confdefs.h avoids OS command line length limits that DEFS can exceed.
549 rm -rf conftest* confdefs.h
550 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
551 echo > confdefs.h
552
553 # A filename unique to this package, relative to the directory that
554 # configure is in, which we can look for to find out if srcdir is correct.
555 ac_unique_file=build/version
556
557 # Find the source files, if location was not specified.
558 if test -z "$srcdir"; then
559   ac_srcdir_defaulted=yes
560   # Try the directory containing this script, then its parent.
561   ac_prog=$0
562   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
563   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
564   srcdir=$ac_confdir
565   if test ! -r $srcdir/$ac_unique_file; then
566     srcdir=..
567   fi
568 else
569   ac_srcdir_defaulted=no
570 fi
571 if test ! -r $srcdir/$ac_unique_file; then
572   if test "$ac_srcdir_defaulted" = yes; then
573     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
574   else
575     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
576   fi
577 fi
578 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
579
580 # Prefer explicitly selected file to automatically selected ones.
581 if test -z "$CONFIG_SITE"; then
582   if test "x$prefix" != xNONE; then
583     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
584   else
585     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
586   fi
587 fi
588 for ac_site_file in $CONFIG_SITE; do
589   if test -r "$ac_site_file"; then
590     echo "loading site script $ac_site_file"
591     . "$ac_site_file"
592   fi
593 done
594
595
596 ac_ext=c
597 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
598 ac_cpp='$CPP $CPPFLAGS'
599 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
600 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
601 cross_compiling=$ac_cv_prog_cc_cross
602
603 ac_exeext=
604 ac_objext=o
605 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
606   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
607   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
608     ac_n= ac_c='
609 ' ac_t='        '
610   else
611     ac_n=-n ac_c= ac_t=
612   fi
613 else
614   ac_n= ac_c='\c' ac_t=
615 fi
616
617 ac_aux_dir=
618 for ac_dir in build $srcdir/build; do
619   if test -f $ac_dir/install-sh; then
620     ac_aux_dir=$ac_dir
621     ac_install_sh="$ac_aux_dir/install-sh -c"
622     break
623   elif test -f $ac_dir/install.sh; then
624     ac_aux_dir=$ac_dir
625     ac_install_sh="$ac_aux_dir/install.sh -c"
626     break
627   fi
628 done
629 if test -z "$ac_aux_dir"; then
630   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
631 fi
632 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
633 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
634 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
635
636 OL_VERSION=`cat $ac_aux_dir/version`
637 if test -z "$OL_VERSION"; then
638         { echo "configure: error: could not determine version" 1>&2; exit 1; }
639 fi
640
641
642 echo $ac_n "checking host system type""... $ac_c" 1>&6
643 echo "configure:644: checking host system type" >&5
644 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
645
646 # Make sure we can run config.sub.
647   if $ac_config_sub sun4 >/dev/null 2>&1; then :
648     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
649   fi
650
651   ac_cv_host_alias=$host
652   case "$ac_cv_host_alias" in
653   NONE)
654     case $nonopt in
655     NONE)
656       if ac_cv_host_alias=`$ac_config_guess`; then :
657       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
658       fi ;;
659     *) ac_cv_host_alias=$nonopt ;;
660     esac ;;
661   esac
662
663   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
664   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
665   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
666   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
667 else
668   echo $ac_n "(cached) $ac_c" 1>&6
669 fi
670
671 echo "$ac_t""$ac_cv_host" 1>&6
672
673 host=$ac_cv_host
674 host_alias=$ac_cv_host_alias
675 host_cpu=$ac_cv_host_cpu
676 host_vendor=$ac_cv_host_vendor
677 host_os=$ac_cv_host_os
678
679
680
681
682
683 echo $ac_n "checking target system type""... $ac_c" 1>&6
684 echo "configure:685: checking target system type" >&5
685 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
686
687 # Make sure we can run config.sub.
688   if $ac_config_sub sun4 >/dev/null 2>&1; then :
689     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
690   fi
691
692   ac_cv_target_alias=$target
693   case "$ac_cv_target_alias" in
694   NONE)
695     case $nonopt in
696     NONE)
697       ac_cv_target_alias=$host_alias ;;
698
699     *) ac_cv_target_alias=$nonopt ;;
700     esac ;;
701   esac
702
703   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
704   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
705   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
706   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
707 else
708   echo $ac_n "(cached) $ac_c" 1>&6
709 fi
710
711 echo "$ac_t""$ac_cv_target" 1>&6
712
713 target=$ac_cv_target
714 target_alias=$ac_cv_target_alias
715 target_cpu=$ac_cv_target_cpu
716 target_vendor=$ac_cv_target_vendor
717 target_os=$ac_cv_target_os
718
719
720
721
722
723 echo $ac_n "checking build system type""... $ac_c" 1>&6
724 echo "configure:725: checking build system type" >&5
725 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
726
727 # Make sure we can run config.sub.
728   if $ac_config_sub sun4 >/dev/null 2>&1; then :
729     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
730   fi
731
732   ac_cv_build_alias=$build
733   case "$ac_cv_build_alias" in
734   NONE)
735     case $nonopt in
736     NONE)
737       ac_cv_build_alias=$host_alias ;;
738
739     *) ac_cv_build_alias=$nonopt ;;
740     esac ;;
741   esac
742
743   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
744   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
745   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
746   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
747 else
748   echo $ac_n "(cached) $ac_c" 1>&6
749 fi
750
751 echo "$ac_t""$ac_cv_build" 1>&6
752
753 build=$ac_cv_build
754 build_alias=$ac_cv_build_alias
755 build_cpu=$ac_cv_build_cpu
756 build_vendor=$ac_cv_build_vendor
757 build_os=$ac_cv_build_os
758
759
760
761
762
763 # Do some error checking and defaulting for the host and target type.
764 # The inputs are:
765 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
766 #
767 # The rules are:
768 # 1. You are not allowed to specify --host, --target, and nonopt at the
769 #    same time.
770 # 2. Host defaults to nonopt.
771 # 3. If nonopt is not specified, then host defaults to the current host,
772 #    as determined by config.guess.
773 # 4. Target and build default to nonopt.
774 # 5. If nonopt is not specified, then target and build default to host.
775
776 # The aliases save the names the user supplied, while $host etc.
777 # will get canonicalized.
778 case $host---$target---$nonopt in
779 NONE---*---* | *---NONE---* | *---*---NONE) ;;
780 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
781 esac
782
783 test "$host_alias" != "$target_alias" &&
784   test "$program_prefix$program_suffix$program_transform_name" = \
785     NONENONEs,x,x, &&
786   program_prefix=${target_alias}-
787
788
789 # Find a good install program.  We prefer a C program (faster),
790 # so one script is as good as another.  But avoid the broken or
791 # incompatible versions:
792 # SysV /etc/install, /usr/sbin/install
793 # SunOS /usr/etc/install
794 # IRIX /sbin/install
795 # AIX /bin/install
796 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
797 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
798 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
799 # ./install, which can be erroneously created by make from ./install.sh.
800 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
801 echo "configure:802: checking for a BSD compatible install" >&5
802 if test -z "$INSTALL"; then
803 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
804   echo $ac_n "(cached) $ac_c" 1>&6
805 else
806     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
807   for ac_dir in $PATH; do
808     # Account for people who put trailing slashes in PATH elements.
809     case "$ac_dir/" in
810     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
811     *)
812       # OSF1 and SCO ODT 3.0 have their own names for install.
813       # Don't use installbsd from OSF since it installs stuff as root
814       # by default.
815       for ac_prog in ginstall scoinst install; do
816         if test -f $ac_dir/$ac_prog; then
817           if test $ac_prog = install &&
818             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
819             # AIX install.  It has an incompatible calling convention.
820             :
821           elif test $ac_prog = install &&
822             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
823             # program-specific install script used by HP pwplus--don't use.
824             :
825           else
826             ac_cv_path_install="$ac_dir/$ac_prog -c"
827             break 2
828           fi
829         fi
830       done
831       ;;
832     esac
833   done
834   IFS="$ac_save_IFS"
835
836 fi
837   if test "${ac_cv_path_install+set}" = set; then
838     INSTALL="$ac_cv_path_install"
839   else
840     # As a last resort, use the slow shell script.  We don't cache a
841     # path for INSTALL within a source directory, because that will
842     # break other packages using the cache if that directory is
843     # removed, or if the path is relative.
844     INSTALL="$ac_install_sh"
845   fi
846 fi
847 echo "$ac_t""$INSTALL" 1>&6
848
849 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
850 # It thinks the first close brace ends the variable substitution.
851 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
852
853 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
854
855 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
856
857 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
858 echo "configure:859: checking whether build environment is sane" >&5
859 # Just in case
860 sleep 1
861 echo timestamp > conftestfile
862 # Do `set' in a subshell so we don't clobber the current shell's
863 # arguments.  Must try -L first in case configure is actually a
864 # symlink; some systems play weird games with the mod time of symlinks
865 # (eg FreeBSD returns the mod time of the symlink's containing
866 # directory).
867 if (
868    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
869    if test "$*" = "X"; then
870       # -L didn't work.
871       set X `ls -t $srcdir/configure conftestfile`
872    fi
873    if test "$*" != "X $srcdir/configure conftestfile" \
874       && test "$*" != "X conftestfile $srcdir/configure"; then
875
876       # If neither matched, then we have a broken ls.  This can happen
877       # if, for instance, CONFIG_SHELL is bash and it inherits a
878       # broken ls alias from the environment.  This has actually
879       # happened.  Such a system could not be considered "sane".
880       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
881 alias in your environment" 1>&2; exit 1; }
882    fi
883
884    test "$2" = conftestfile
885    )
886 then
887    # Ok.
888    :
889 else
890    { echo "configure: error: newly created file is older than distributed files!
891 Check your system clock" 1>&2; exit 1; }
892 fi
893 rm -f conftest*
894 echo "$ac_t""yes" 1>&6
895 if test "$program_transform_name" = s,x,x,; then
896   program_transform_name=
897 else
898   # Double any \ or $.  echo might interpret backslashes.
899   cat <<\EOF_SED > conftestsed
900 s,\\,\\\\,g; s,\$,$$,g
901 EOF_SED
902   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
903   rm -f conftestsed
904 fi
905 test "$program_prefix" != NONE &&
906   program_transform_name="s,^,${program_prefix},;$program_transform_name"
907 # Use a double $ so make ignores it.
908 test "$program_suffix" != NONE &&
909   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
910
911 # sed with no file args requires a program.
912 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
913
914 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
915 echo "configure:916: checking whether ${MAKE-make} sets \${MAKE}" >&5
916 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
917 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
918   echo $ac_n "(cached) $ac_c" 1>&6
919 else
920   cat > conftestmake <<\EOF
921 all:
922         @echo 'ac_maketemp="${MAKE}"'
923 EOF
924 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
925 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
926 if test -n "$ac_maketemp"; then
927   eval ac_cv_prog_make_${ac_make}_set=yes
928 else
929   eval ac_cv_prog_make_${ac_make}_set=no
930 fi
931 rm -f conftestmake
932 fi
933 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
934   echo "$ac_t""yes" 1>&6
935   SET_MAKE=
936 else
937   echo "$ac_t""no" 1>&6
938   SET_MAKE="MAKE=${MAKE-make}"
939 fi
940
941
942 PACKAGE=OpenLDAP
943
944 VERSION=$OL_VERSION
945
946 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
947   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
948 fi
949
950
951
952 missing_dir=`cd $ac_aux_dir && pwd`
953 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
954 echo "configure:955: checking for working aclocal" >&5
955 # Run test in a subshell; some versions of sh will print an error if
956 # an executable is not found, even if stderr is redirected.
957 # Redirect stdin to placate older versions of autoconf.  Sigh.
958 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
959    ACLOCAL=aclocal
960    echo "$ac_t""found" 1>&6
961 else
962    ACLOCAL="$missing_dir/missing aclocal"
963    echo "$ac_t""missing" 1>&6
964 fi
965
966 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
967 echo "configure:968: checking for working autoconf" >&5
968 # Run test in a subshell; some versions of sh will print an error if
969 # an executable is not found, even if stderr is redirected.
970 # Redirect stdin to placate older versions of autoconf.  Sigh.
971 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
972    AUTOCONF=autoconf
973    echo "$ac_t""found" 1>&6
974 else
975    AUTOCONF="$missing_dir/missing autoconf"
976    echo "$ac_t""missing" 1>&6
977 fi
978
979 echo $ac_n "checking for working automake""... $ac_c" 1>&6
980 echo "configure:981: checking for working automake" >&5
981 # Run test in a subshell; some versions of sh will print an error if
982 # an executable is not found, even if stderr is redirected.
983 # Redirect stdin to placate older versions of autoconf.  Sigh.
984 if (automake --version) < /dev/null > /dev/null 2>&1; then
985    AUTOMAKE=automake
986    echo "$ac_t""found" 1>&6
987 else
988    AUTOMAKE="$missing_dir/missing automake"
989    echo "$ac_t""missing" 1>&6
990 fi
991
992 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
993 echo "configure:994: checking for working autoheader" >&5
994 # Run test in a subshell; some versions of sh will print an error if
995 # an executable is not found, even if stderr is redirected.
996 # Redirect stdin to placate older versions of autoconf.  Sigh.
997 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
998    AUTOHEADER=autoheader
999    echo "$ac_t""found" 1>&6
1000 else
1001    AUTOHEADER="$missing_dir/missing autoheader"
1002    echo "$ac_t""missing" 1>&6
1003 fi
1004
1005 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1006 echo "configure:1007: checking for working makeinfo" >&5
1007 # Run test in a subshell; some versions of sh will print an error if
1008 # an executable is not found, even if stderr is redirected.
1009 # Redirect stdin to placate older versions of autoconf.  Sigh.
1010 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1011    MAKEINFO=makeinfo
1012    echo "$ac_t""found" 1>&6
1013 else
1014    MAKEINFO="$missing_dir/missing makeinfo"
1015    echo "$ac_t""missing" 1>&6
1016 fi
1017
1018
1019
1020 cat >> confdefs.h <<EOF
1021 #define OPENLDAP_PACKAGE "$PACKAGE"
1022 EOF
1023
1024 cat >> confdefs.h <<EOF
1025 #define OPENLDAP_VERSION "$VERSION"
1026 EOF
1027
1028
1029
1030
1031 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1032 echo "configure:1033: checking configure arguments" >&5
1033
1034
1035 top_builddir=`pwd`
1036
1037 cat >> confdefs.h <<\EOF
1038 #define HAVE_MKVERSION 1
1039 EOF
1040
1041
1042 ldap_subdir="openldap"
1043
1044 # Check whether --with-subdir or --without-subdir was given.
1045 if test "${with_subdir+set}" = set; then
1046   withval="$with_subdir"
1047   
1048         if test "$withval" = "no"; then
1049                 ldap_subdir=""
1050         elif test "$withval" != "yes"; then
1051                 ldap_subdir="$withval"
1052         fi
1053
1054 fi
1055
1056
1057 # OpenLDAP --enable-debug
1058         # Check whether --enable-debug or --disable-debug was given.
1059 if test "${enable_debug+set}" = set; then
1060   enableval="$enable_debug"
1061   
1062         ol_arg=invalid
1063         for ol_val in auto yes no ; do
1064                 if test "$enableval" = "$ol_val" ; then
1065                         ol_arg="$ol_val"
1066                 fi
1067         done
1068         if test "$ol_arg" = "invalid" ; then
1069                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1070         fi
1071         ol_enable_debug="$ol_arg"
1072
1073 else
1074         ol_enable_debug="yes"
1075 fi
1076 # end --enable-debug
1077 # OpenLDAP --enable-syslog
1078         # Check whether --enable-syslog or --disable-syslog was given.
1079 if test "${enable_syslog+set}" = set; then
1080   enableval="$enable_syslog"
1081   
1082         ol_arg=invalid
1083         for ol_val in auto yes no ; do
1084                 if test "$enableval" = "$ol_val" ; then
1085                         ol_arg="$ol_val"
1086                 fi
1087         done
1088         if test "$ol_arg" = "invalid" ; then
1089                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1090         fi
1091         ol_enable_syslog="$ol_arg"
1092
1093 else
1094         ol_enable_syslog="auto"
1095 fi
1096 # end --enable-syslog
1097 # OpenLDAP --enable-proctitle
1098         # Check whether --enable-proctitle or --disable-proctitle was given.
1099 if test "${enable_proctitle+set}" = set; then
1100   enableval="$enable_proctitle"
1101   
1102         ol_arg=invalid
1103         for ol_val in auto yes no ; do
1104                 if test "$enableval" = "$ol_val" ; then
1105                         ol_arg="$ol_val"
1106                 fi
1107         done
1108         if test "$ol_arg" = "invalid" ; then
1109                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1110         fi
1111         ol_enable_proctitle="$ol_arg"
1112
1113 else
1114         ol_enable_proctitle="yes"
1115 fi
1116 # end --enable-proctitle
1117 # OpenLDAP --enable-cache
1118         # Check whether --enable-cache or --disable-cache was given.
1119 if test "${enable_cache+set}" = set; then
1120   enableval="$enable_cache"
1121   
1122         ol_arg=invalid
1123         for ol_val in auto yes no ; do
1124                 if test "$enableval" = "$ol_val" ; then
1125                         ol_arg="$ol_val"
1126                 fi
1127         done
1128         if test "$ol_arg" = "invalid" ; then
1129                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1130         fi
1131         ol_enable_cache="$ol_arg"
1132
1133 else
1134         ol_enable_cache="yes"
1135 fi
1136 # end --enable-cache
1137 # OpenLDAP --enable-dns
1138         # Check whether --enable-dns or --disable-dns was given.
1139 if test "${enable_dns+set}" = set; then
1140   enableval="$enable_dns"
1141   
1142         ol_arg=invalid
1143         for ol_val in auto yes no ; do
1144                 if test "$enableval" = "$ol_val" ; then
1145                         ol_arg="$ol_val"
1146                 fi
1147         done
1148         if test "$ol_arg" = "invalid" ; then
1149                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1150         fi
1151         ol_enable_dns="$ol_arg"
1152
1153 else
1154         ol_enable_dns="no"
1155 fi
1156 # end --enable-dns
1157 # OpenLDAP --enable-referrals
1158         # Check whether --enable-referrals or --disable-referrals was given.
1159 if test "${enable_referrals+set}" = set; then
1160   enableval="$enable_referrals"
1161   
1162         ol_arg=invalid
1163         for ol_val in auto yes no ; do
1164                 if test "$enableval" = "$ol_val" ; then
1165                         ol_arg="$ol_val"
1166                 fi
1167         done
1168         if test "$ol_arg" = "invalid" ; then
1169                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1170         fi
1171         ol_enable_referrals="$ol_arg"
1172
1173 else
1174         ol_enable_referrals="yes"
1175 fi
1176 # end --enable-referrals
1177 # OpenLDAP --enable-cldap
1178         # Check whether --enable-cldap or --disable-cldap was given.
1179 if test "${enable_cldap+set}" = set; then
1180   enableval="$enable_cldap"
1181   
1182         ol_arg=invalid
1183         for ol_val in auto yes no ; do
1184                 if test "$enableval" = "$ol_val" ; then
1185                         ol_arg="$ol_val"
1186                 fi
1187         done
1188         if test "$ol_arg" = "invalid" ; then
1189                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1190         fi
1191         ol_enable_cldap="$ol_arg"
1192
1193 else
1194         ol_enable_cldap="no"
1195 fi
1196 # end --enable-cldap
1197 # OpenLDAP --enable-x_compile
1198         # Check whether --enable-x_compile or --disable-x_compile was given.
1199 if test "${enable_x_compile+set}" = set; then
1200   enableval="$enable_x_compile"
1201   
1202         ol_arg=invalid
1203         for ol_val in yes no ; do
1204                 if test "$enableval" = "$ol_val" ; then
1205                         ol_arg="$ol_val"
1206                 fi
1207         done
1208         if test "$ol_arg" = "invalid" ; then
1209                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1210         fi
1211         ol_enable_x_compile="$ol_arg"
1212
1213 else
1214         ol_enable_x_compile="no"
1215 fi
1216 # end --enable-x_compile
1217
1218 # OpenLDAP --enable-dmalloc
1219         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1220 if test "${enable_dmalloc+set}" = set; then
1221   enableval="$enable_dmalloc"
1222   
1223         ol_arg=invalid
1224         for ol_val in auto yes no ; do
1225                 if test "$enableval" = "$ol_val" ; then
1226                         ol_arg="$ol_val"
1227                 fi
1228         done
1229         if test "$ol_arg" = "invalid" ; then
1230                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1231         fi
1232         ol_enable_dmalloc="$ol_arg"
1233
1234 else
1235         ol_enable_dmalloc="no"
1236 fi
1237 # end --enable-dmalloc
1238
1239 # OpenLDAP --with-kerberos
1240         # Check whether --with-kerberos or --without-kerberos was given.
1241 if test "${with_kerberos+set}" = set; then
1242   withval="$with_kerberos"
1243   
1244         ol_arg=invalid
1245         for ol_val in auto k5 k4 afs yes no ; do
1246                 if test "$withval" = "$ol_val" ; then
1247                         ol_arg="$ol_val"
1248                 fi
1249         done
1250         if test "$ol_arg" = "invalid" ; then
1251                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1252         fi
1253         ol_with_kerberos="$ol_arg"
1254
1255 else
1256         ol_with_kerberos="auto"
1257 fi
1258 # end --with-kerberos
1259
1260 # OpenLDAP --with-readline
1261         # Check whether --with-readline or --without-readline was given.
1262 if test "${with_readline+set}" = set; then
1263   withval="$with_readline"
1264   
1265         ol_arg=invalid
1266         for ol_val in auto yes no  ; do
1267                 if test "$withval" = "$ol_val" ; then
1268                         ol_arg="$ol_val"
1269                 fi
1270         done
1271         if test "$ol_arg" = "invalid" ; then
1272                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1273         fi
1274         ol_with_readline="$ol_arg"
1275
1276 else
1277         ol_with_readline="auto"
1278 fi
1279 # end --with-readline
1280
1281 # OpenLDAP --with-threads
1282         # Check whether --with-threads or --without-threads was given.
1283 if test "${with_threads+set}" = set; then
1284   withval="$with_threads"
1285   
1286         ol_arg=invalid
1287         for ol_val in auto posix mach lwp yes no manual  ; do
1288                 if test "$withval" = "$ol_val" ; then
1289                         ol_arg="$ol_val"
1290                 fi
1291         done
1292         if test "$ol_arg" = "invalid" ; then
1293                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1294         fi
1295         ol_with_threads="$ol_arg"
1296
1297 else
1298         ol_with_threads="auto"
1299 fi
1300 # end --with-threads
1301
1302 # OpenLDAP --with-tls
1303         # Check whether --with-tls or --without-tls was given.
1304 if test "${with_tls+set}" = set; then
1305   withval="$with_tls"
1306   
1307         ol_arg=invalid
1308         for ol_val in auto ssleay openssl yes no  ; do
1309                 if test "$withval" = "$ol_val" ; then
1310                         ol_arg="$ol_val"
1311                 fi
1312         done
1313         if test "$ol_arg" = "invalid" ; then
1314                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1315         fi
1316         ol_with_tls="$ol_arg"
1317
1318 else
1319         ol_with_tls="auto"
1320 fi
1321 # end --with-tls
1322
1323 # OpenLDAP --with-yielding_select
1324         # Check whether --with-yielding_select or --without-yielding_select was given.
1325 if test "${with_yielding_select+set}" = set; then
1326   withval="$with_yielding_select"
1327   
1328         ol_arg=invalid
1329         for ol_val in auto yes no manual  ; do
1330                 if test "$withval" = "$ol_val" ; then
1331                         ol_arg="$ol_val"
1332                 fi
1333         done
1334         if test "$ol_arg" = "invalid" ; then
1335                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1336         fi
1337         ol_with_yielding_select="$ol_arg"
1338
1339 else
1340         ol_with_yielding_select="auto"
1341 fi
1342 # end --with-yielding_select
1343
1344
1345
1346 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1347 if test "${with_xxldapdoptions+set}" = set; then
1348   withval="$with_xxldapdoptions"
1349   :
1350 fi
1351
1352 # OpenLDAP --enable-ldapd
1353         # Check whether --enable-ldapd or --disable-ldapd was given.
1354 if test "${enable_ldapd+set}" = set; then
1355   enableval="$enable_ldapd"
1356   
1357         ol_arg=invalid
1358         for ol_val in auto yes no ; do
1359                 if test "$enableval" = "$ol_val" ; then
1360                         ol_arg="$ol_val"
1361                 fi
1362         done
1363         if test "$ol_arg" = "invalid" ; then
1364                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1365         fi
1366         ol_enable_ldapd="$ol_arg"
1367
1368 else
1369         ol_enable_ldapd="no"
1370 fi
1371 # end --enable-ldapd
1372
1373 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1374 if test "${with_xxslapdoptions+set}" = set; then
1375   withval="$with_xxslapdoptions"
1376   :
1377 fi
1378
1379 # OpenLDAP --enable-slapd
1380         # Check whether --enable-slapd or --disable-slapd was given.
1381 if test "${enable_slapd+set}" = set; then
1382   enableval="$enable_slapd"
1383   
1384         ol_arg=invalid
1385         for ol_val in auto yes no ; do
1386                 if test "$enableval" = "$ol_val" ; then
1387                         ol_arg="$ol_val"
1388                 fi
1389         done
1390         if test "$ol_arg" = "invalid" ; then
1391                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1392         fi
1393         ol_enable_slapd="$ol_arg"
1394
1395 else
1396         ol_enable_slapd="yes"
1397 fi
1398 # end --enable-slapd
1399 # OpenLDAP --enable-aclgroups
1400         # Check whether --enable-aclgroups or --disable-aclgroups was given.
1401 if test "${enable_aclgroups+set}" = set; then
1402   enableval="$enable_aclgroups"
1403   
1404         ol_arg=invalid
1405         for ol_val in auto yes no ; do
1406                 if test "$enableval" = "$ol_val" ; then
1407                         ol_arg="$ol_val"
1408                 fi
1409         done
1410         if test "$ol_arg" = "invalid" ; then
1411                 { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; }
1412         fi
1413         ol_enable_aclgroups="$ol_arg"
1414
1415 else
1416         ol_enable_aclgroups="auto"
1417 fi
1418 # end --enable-aclgroups
1419 # OpenLDAP --enable-cleartext
1420         # Check whether --enable-cleartext or --disable-cleartext was given.
1421 if test "${enable_cleartext+set}" = set; then
1422   enableval="$enable_cleartext"
1423   
1424         ol_arg=invalid
1425         for ol_val in auto yes no ; do
1426                 if test "$enableval" = "$ol_val" ; then
1427                         ol_arg="$ol_val"
1428                 fi
1429         done
1430         if test "$ol_arg" = "invalid" ; then
1431                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1432         fi
1433         ol_enable_cleartext="$ol_arg"
1434
1435 else
1436         ol_enable_cleartext="yes"
1437 fi
1438 # end --enable-cleartext
1439 # OpenLDAP --enable-crypt
1440         # Check whether --enable-crypt or --disable-crypt was given.
1441 if test "${enable_crypt+set}" = set; then
1442   enableval="$enable_crypt"
1443   
1444         ol_arg=invalid
1445         for ol_val in auto yes no ; do
1446                 if test "$enableval" = "$ol_val" ; then
1447                         ol_arg="$ol_val"
1448                 fi
1449         done
1450         if test "$ol_arg" = "invalid" ; then
1451                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1452         fi
1453         ol_enable_crypt="$ol_arg"
1454
1455 else
1456         ol_enable_crypt="auto"
1457 fi
1458 # end --enable-crypt
1459 # OpenLDAP --enable-modules
1460         # Check whether --enable-modules or --disable-modules was given.
1461 if test "${enable_modules+set}" = set; then
1462   enableval="$enable_modules"
1463   
1464         ol_arg=invalid
1465         for ol_val in auto yes no ; do
1466                 if test "$enableval" = "$ol_val" ; then
1467                         ol_arg="$ol_val"
1468                 fi
1469         done
1470         if test "$ol_arg" = "invalid" ; then
1471                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1472         fi
1473         ol_enable_modules="$ol_arg"
1474
1475 else
1476         ol_enable_modules="no"
1477 fi
1478 # end --enable-modules
1479 # OpenLDAP --enable-phonetic
1480         # Check whether --enable-phonetic or --disable-phonetic was given.
1481 if test "${enable_phonetic+set}" = set; then
1482   enableval="$enable_phonetic"
1483   
1484         ol_arg=invalid
1485         for ol_val in auto yes no ; do
1486                 if test "$enableval" = "$ol_val" ; then
1487                         ol_arg="$ol_val"
1488                 fi
1489         done
1490         if test "$ol_arg" = "invalid" ; then
1491                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1492         fi
1493         ol_enable_phonetic="$ol_arg"
1494
1495 else
1496         ol_enable_phonetic="no"
1497 fi
1498 # end --enable-phonetic
1499 # OpenLDAP --enable-rlookups
1500         # Check whether --enable-rlookups or --disable-rlookups was given.
1501 if test "${enable_rlookups+set}" = set; then
1502   enableval="$enable_rlookups"
1503   
1504         ol_arg=invalid
1505         for ol_val in auto yes no ; do
1506                 if test "$enableval" = "$ol_val" ; then
1507                         ol_arg="$ol_val"
1508                 fi
1509         done
1510         if test "$ol_arg" = "invalid" ; then
1511                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1512         fi
1513         ol_enable_rlookups="$ol_arg"
1514
1515 else
1516         ol_enable_rlookups="auto"
1517 fi
1518 # end --enable-rlookups
1519 # OpenLDAP --enable-wrappers
1520         # Check whether --enable-wrappers or --disable-wrappers was given.
1521 if test "${enable_wrappers+set}" = set; then
1522   enableval="$enable_wrappers"
1523   
1524         ol_arg=invalid
1525         for ol_val in auto yes no ; do
1526                 if test "$enableval" = "$ol_val" ; then
1527                         ol_arg="$ol_val"
1528                 fi
1529         done
1530         if test "$ol_arg" = "invalid" ; then
1531                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1532         fi
1533         ol_enable_wrappers="$ol_arg"
1534
1535 else
1536         ol_enable_wrappers="no"
1537 fi
1538 # end --enable-wrappers
1539
1540 # OpenLDAP --enable-bdb2
1541         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1542 if test "${enable_bdb2+set}" = set; then
1543   enableval="$enable_bdb2"
1544   
1545         ol_arg=invalid
1546         for ol_val in auto yes no ; do
1547                 if test "$enableval" = "$ol_val" ; then
1548                         ol_arg="$ol_val"
1549                 fi
1550         done
1551         if test "$ol_arg" = "invalid" ; then
1552                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1553         fi
1554         ol_enable_bdb2="$ol_arg"
1555
1556 else
1557         ol_enable_bdb2="no"
1558 fi
1559 # end --enable-bdb2
1560 # OpenLDAP --with-bdb2_module
1561         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1562 if test "${with_bdb2_module+set}" = set; then
1563   withval="$with_bdb2_module"
1564   
1565         ol_arg=invalid
1566         for ol_val in static dynamic ; do
1567                 if test "$withval" = "$ol_val" ; then
1568                         ol_arg="$ol_val"
1569                 fi
1570         done
1571         if test "$ol_arg" = "invalid" ; then
1572                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1573         fi
1574         ol_with_bdb2_module="$ol_arg"
1575
1576 else
1577         ol_with_bdb2_module="static"
1578 fi
1579 # end --with-bdb2_module
1580
1581 # OpenLDAP --enable-ldap
1582         # Check whether --enable-ldap or --disable-ldap was given.
1583 if test "${enable_ldap+set}" = set; then
1584   enableval="$enable_ldap"
1585   
1586         ol_arg=invalid
1587         for ol_val in auto yes no ; do
1588                 if test "$enableval" = "$ol_val" ; then
1589                         ol_arg="$ol_val"
1590                 fi
1591         done
1592         if test "$ol_arg" = "invalid" ; then
1593                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1594         fi
1595         ol_enable_ldap="$ol_arg"
1596
1597 else
1598         ol_enable_ldap="no"
1599 fi
1600 # end --enable-ldap
1601 # OpenLDAP --with-ldap_module
1602         # Check whether --with-ldap_module or --without-ldap_module was given.
1603 if test "${with_ldap_module+set}" = set; then
1604   withval="$with_ldap_module"
1605   
1606         ol_arg=invalid
1607         for ol_val in static dynamic ; do
1608                 if test "$withval" = "$ol_val" ; then
1609                         ol_arg="$ol_val"
1610                 fi
1611         done
1612         if test "$ol_arg" = "invalid" ; then
1613                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1614         fi
1615         ol_with_ldap_module="$ol_arg"
1616
1617 else
1618         ol_with_ldap_module="static"
1619 fi
1620 # end --with-ldap_module
1621
1622 # OpenLDAP --enable-ldbm
1623         # Check whether --enable-ldbm or --disable-ldbm was given.
1624 if test "${enable_ldbm+set}" = set; then
1625   enableval="$enable_ldbm"
1626   
1627         ol_arg=invalid
1628         for ol_val in auto yes no ; do
1629                 if test "$enableval" = "$ol_val" ; then
1630                         ol_arg="$ol_val"
1631                 fi
1632         done
1633         if test "$ol_arg" = "invalid" ; then
1634                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1635         fi
1636         ol_enable_ldbm="$ol_arg"
1637
1638 else
1639         ol_enable_ldbm="yes"
1640 fi
1641 # end --enable-ldbm
1642 # OpenLDAP --with-ldbm_module
1643         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1644 if test "${with_ldbm_module+set}" = set; then
1645   withval="$with_ldbm_module"
1646   
1647         ol_arg=invalid
1648         for ol_val in static dynamic ; do
1649                 if test "$withval" = "$ol_val" ; then
1650                         ol_arg="$ol_val"
1651                 fi
1652         done
1653         if test "$ol_arg" = "invalid" ; then
1654                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1655         fi
1656         ol_with_ldbm_module="$ol_arg"
1657
1658 else
1659         ol_with_ldbm_module="static"
1660 fi
1661 # end --with-ldbm_module
1662
1663 # OpenLDAP --with-ldbm_api
1664         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1665 if test "${with_ldbm_api+set}" = set; then
1666   withval="$with_ldbm_api"
1667   
1668         ol_arg=invalid
1669         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1670                 if test "$withval" = "$ol_val" ; then
1671                         ol_arg="$ol_val"
1672                 fi
1673         done
1674         if test "$ol_arg" = "invalid" ; then
1675                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1676         fi
1677         ol_with_ldbm_api="$ol_arg"
1678
1679 else
1680         ol_with_ldbm_api="auto"
1681 fi
1682 # end --with-ldbm_api
1683
1684 # OpenLDAP --with-ldbm_type
1685         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1686 if test "${with_ldbm_type+set}" = set; then
1687   withval="$with_ldbm_type"
1688   
1689         ol_arg=invalid
1690         for ol_val in auto btree hash ; do
1691                 if test "$withval" = "$ol_val" ; then
1692                         ol_arg="$ol_val"
1693                 fi
1694         done
1695         if test "$ol_arg" = "invalid" ; then
1696                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1697         fi
1698         ol_with_ldbm_type="$ol_arg"
1699
1700 else
1701         ol_with_ldbm_type="auto"
1702 fi
1703 # end --with-ldbm_type
1704
1705
1706 # OpenLDAP --enable-passwd
1707         # Check whether --enable-passwd or --disable-passwd was given.
1708 if test "${enable_passwd+set}" = set; then
1709   enableval="$enable_passwd"
1710   
1711         ol_arg=invalid
1712         for ol_val in auto yes no ; do
1713                 if test "$enableval" = "$ol_val" ; then
1714                         ol_arg="$ol_val"
1715                 fi
1716         done
1717         if test "$ol_arg" = "invalid" ; then
1718                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1719         fi
1720         ol_enable_passwd="$ol_arg"
1721
1722 else
1723         ol_enable_passwd="no"
1724 fi
1725 # end --enable-passwd
1726 # OpenLDAP --with-passwd_module
1727         # Check whether --with-passwd_module or --without-passwd_module was given.
1728 if test "${with_passwd_module+set}" = set; then
1729   withval="$with_passwd_module"
1730   
1731         ol_arg=invalid
1732         for ol_val in static dynamic ; do
1733                 if test "$withval" = "$ol_val" ; then
1734                         ol_arg="$ol_val"
1735                 fi
1736         done
1737         if test "$ol_arg" = "invalid" ; then
1738                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1739         fi
1740         ol_with_passwd_module="$ol_arg"
1741
1742 else
1743         ol_with_passwd_module="static"
1744 fi
1745 # end --with-passwd_module
1746
1747 # OpenLDAP --enable-perl
1748         # Check whether --enable-perl or --disable-perl was given.
1749 if test "${enable_perl+set}" = set; then
1750   enableval="$enable_perl"
1751   
1752         ol_arg=invalid
1753         for ol_val in auto yes no ; do
1754                 if test "$enableval" = "$ol_val" ; then
1755                         ol_arg="$ol_val"
1756                 fi
1757         done
1758         if test "$ol_arg" = "invalid" ; then
1759                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1760         fi
1761         ol_enable_perl="$ol_arg"
1762
1763 else
1764         ol_enable_perl="no"
1765 fi
1766 # end --enable-perl
1767 # OpenLDAP --with-perl_module
1768         # Check whether --with-perl_module or --without-perl_module was given.
1769 if test "${with_perl_module+set}" = set; then
1770   withval="$with_perl_module"
1771   
1772         ol_arg=invalid
1773         for ol_val in static dynamic ; do
1774                 if test "$withval" = "$ol_val" ; then
1775                         ol_arg="$ol_val"
1776                 fi
1777         done
1778         if test "$ol_arg" = "invalid" ; then
1779                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1780         fi
1781         ol_with_perl_module="$ol_arg"
1782
1783 else
1784         ol_with_perl_module="static"
1785 fi
1786 # end --with-perl_module
1787
1788 # OpenLDAP --enable-shell
1789         # Check whether --enable-shell or --disable-shell was given.
1790 if test "${enable_shell+set}" = set; then
1791   enableval="$enable_shell"
1792   
1793         ol_arg=invalid
1794         for ol_val in auto yes no ; do
1795                 if test "$enableval" = "$ol_val" ; then
1796                         ol_arg="$ol_val"
1797                 fi
1798         done
1799         if test "$ol_arg" = "invalid" ; then
1800                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1801         fi
1802         ol_enable_shell="$ol_arg"
1803
1804 else
1805         ol_enable_shell="no"
1806 fi
1807 # end --enable-shell
1808 # OpenLDAP --with-shell_module
1809         # Check whether --with-shell_module or --without-shell_module was given.
1810 if test "${with_shell_module+set}" = set; then
1811   withval="$with_shell_module"
1812   
1813         ol_arg=invalid
1814         for ol_val in static dynamic ; do
1815                 if test "$withval" = "$ol_val" ; then
1816                         ol_arg="$ol_val"
1817                 fi
1818         done
1819         if test "$ol_arg" = "invalid" ; then
1820                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1821         fi
1822         ol_with_shell_module="$ol_arg"
1823
1824 else
1825         ol_with_shell_module="static"
1826 fi
1827 # end --with-shell_module
1828
1829 # OpenLDAP --enable-tcl
1830         # Check whether --enable-tcl or --disable-tcl was given.
1831 if test "${enable_tcl+set}" = set; then
1832   enableval="$enable_tcl"
1833   
1834         ol_arg=invalid
1835         for ol_val in auto yes no ; do
1836                 if test "$enableval" = "$ol_val" ; then
1837                         ol_arg="$ol_val"
1838                 fi
1839         done
1840         if test "$ol_arg" = "invalid" ; then
1841                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1842         fi
1843         ol_enable_tcl="$ol_arg"
1844
1845 else
1846         ol_enable_tcl="no"
1847 fi
1848 # end --enable-tcl
1849 # OpenLDAP --with-tcl_module
1850         # Check whether --with-tcl_module or --without-tcl_module was given.
1851 if test "${with_tcl_module+set}" = set; then
1852   withval="$with_tcl_module"
1853   
1854         ol_arg=invalid
1855         for ol_val in static dynamic ; do
1856                 if test "$withval" = "$ol_val" ; then
1857                         ol_arg="$ol_val"
1858                 fi
1859         done
1860         if test "$ol_arg" = "invalid" ; then
1861                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
1862         fi
1863         ol_with_tcl_module="$ol_arg"
1864
1865 else
1866         ol_with_tcl_module="static"
1867 fi
1868 # end --with-tcl_module
1869
1870
1871 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1872 if test "${with_xxslurpdoptions+set}" = set; then
1873   withval="$with_xxslurpdoptions"
1874   :
1875 fi
1876
1877 # OpenLDAP --enable-slurpd
1878         # Check whether --enable-slurpd or --disable-slurpd was given.
1879 if test "${enable_slurpd+set}" = set; then
1880   enableval="$enable_slurpd"
1881   
1882         ol_arg=invalid
1883         for ol_val in auto yes no ; do
1884                 if test "$enableval" = "$ol_val" ; then
1885                         ol_arg="$ol_val"
1886                 fi
1887         done
1888         if test "$ol_arg" = "invalid" ; then
1889                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1890         fi
1891         ol_enable_slurpd="$ol_arg"
1892
1893 else
1894         ol_enable_slurpd="auto"
1895 fi
1896 # end --enable-slurpd
1897
1898 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1899 if test "${with_xxliboptions+set}" = set; then
1900   withval="$with_xxliboptions"
1901   :
1902 fi
1903
1904 # Check whether --enable-static or --disable-static was given.
1905 if test "${enable_static+set}" = set; then
1906   enableval="$enable_static"
1907   p=${PACKAGE-default}
1908 case "$enableval" in
1909 yes) enable_static=yes ;;
1910 no) enable_static=no ;;
1911 *)
1912   enable_static=no
1913   # Look at the argument we got.  We use all the common list separators.
1914   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1915   for pkg in $enableval; do
1916     if test "X$pkg" = "X$p"; then
1917       enable_static=yes
1918     fi
1919   done
1920   IFS="$ac_save_ifs"
1921   ;;
1922 esac
1923 else
1924   enable_static=yes
1925 fi
1926
1927 # Check whether --enable-shared or --disable-shared was given.
1928 if test "${enable_shared+set}" = set; then
1929   enableval="$enable_shared"
1930   p=${PACKAGE-default}
1931 case "$enableval" in
1932 yes) enable_shared=yes ;;
1933 no) enable_shared=no ;;
1934 *)
1935   enable_shared=no
1936   # Look at the argument we got.  We use all the common list separators.
1937   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1938   for pkg in $enableval; do
1939     if test "X$pkg" = "X$p"; then
1940       enable_shared=yes
1941     fi
1942   done
1943   IFS="$ac_save_ifs"
1944   ;;
1945 esac
1946 else
1947   enable_shared=yes
1948 fi
1949
1950
1951 # validate options
1952 if test $ol_enable_dns = yes ; then
1953         if test $ol_enable_referrals = no ; then
1954                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1955         fi
1956         if test $ol_enable_referrals = auto ; then
1957                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1958                 ol_enable_referrals=yes
1959         fi
1960 fi
1961
1962 if test $ol_enable_slapd = no ; then
1963                 if test $ol_enable_bdb2 = yes ; then
1964                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
1965         fi
1966         if test $ol_enable_ldap = yes ; then
1967                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
1968         fi
1969         if test $ol_enable_ldbm = yes ; then
1970                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
1971         fi
1972         if test $ol_enable_passwd = yes ; then
1973                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
1974         fi
1975         if test $ol_enable_perl = yes ; then
1976                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
1977         fi
1978         if test $ol_enable_shell = yes ; then
1979                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
1980         fi
1981         if test $ol_enable_tcl = yes ; then
1982                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
1983         fi
1984         if test $ol_enable_aclgroups = yes ; then
1985                 echo "configure: warning: slapd disabled, ignoring --enable-aclgroups argument" 1>&2
1986         fi
1987         if test $ol_enable_modules = yes ; then
1988                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
1989         fi
1990         if test $ol_enable_wrappers = yes ; then
1991                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
1992         fi
1993         if test $ol_enable_phonetic = yes ; then
1994                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
1995         fi
1996         if test $ol_enable_rlookups = yes ; then
1997                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
1998         fi
1999         if test $ol_with_ldbm_api != auto ; then
2000                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2001         fi
2002         if test $ol_with_ldbm_type != auto ; then
2003                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2004         fi
2005         if test $ol_with_bdb2_module != static ; then
2006                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
2007         fi
2008         if test $ol_with_ldap_module != static ; then
2009                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2010         fi
2011         if test $ol_with_ldbm_module != static ; then
2012                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2013         fi
2014         if test $ol_with_passwd_module != static ; then
2015                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2016         fi
2017         if test $ol_with_perl_module != static ; then
2018                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2019         fi
2020         if test $ol_with_shell_module != static ; then
2021                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2022         fi
2023         if test $ol_with_tcl_module != static ; then
2024                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2025         fi
2026         if test $ol_enable_slurpd = yes ; then
2027                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2028         fi
2029
2030         # force settings to no
2031         ol_enable_bdb2=no
2032         ol_enable_ldap=no
2033         ol_enable_ldbm=no
2034         ol_enable_passwd=no
2035         ol_enable_perl=no
2036         ol_enable_shell=no
2037         ol_enable_tcl=no
2038
2039         ol_enable_aclgroups=no
2040         ol_enable_modules=no
2041         ol_enable_phonetic=no
2042         ol_enable_rlookups=no
2043         ol_enable_wrappers=no
2044
2045         ol_with_ldbm_api=no
2046         ol_with_ldbm_type=no
2047
2048         ol_with_bdb2_module=static
2049         ol_with_ldap_module=static
2050         ol_with_ldbm_module=static
2051         ol_with_passwd_module=static
2052         ol_with_perl_module=static
2053         ol_with_shell_module=static
2054         ol_with_tcl_module=static
2055
2056         ol_enable_slurpd=no
2057
2058 elif test $ol_enable_ldbm = no ; then
2059         
2060         if test $ol_with_ldbm_api != auto ; then
2061                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2062         fi
2063
2064         if test $ol_with_ldbm_type != auto ; then
2065                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2066         fi
2067
2068         if test $ol_with_ldbm_module != static ; then
2069                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2070         fi
2071
2072         if test $ol_enable_bdb2 = yes ; then
2073                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2074         fi
2075
2076         if test $ol_enable_modules != yes -a \
2077                 $ol_enable_ldap = no -a \
2078                 $ol_enable_passwd = no -a \
2079                 $ol_enable_perl = no -a \
2080                 $ol_enable_shell = no -a \
2081                 $ol_enable_tcl = no ; then
2082                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2083         fi
2084
2085         ol_with_ldbm_api=no
2086         ol_with_ldbm_type=no
2087         ol_with_ldbm_module=static
2088
2089 elif test $ol_enable_bdb2 = yes ; then
2090         
2091         if test $ol_with_ldbm_api != auto -a \
2092                 $ol_with_ldbm_api != db2 ; then
2093                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2094         fi
2095
2096         ol_with_ldbm_api=db2
2097
2098 else
2099         
2100         if test $ol_enable_bdb2 != no ; then
2101                 if test $ol_with_ldbm_api != auto -a \
2102                         $ol_with_ldbm_api != db2 ; then
2103                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2104                         ol_enable_bdb2=no
2105                 fi
2106         fi
2107
2108         if test $ol_with_ldbm_api = gdbm -a \
2109                 $ol_with_ldbm_type = btree ; then
2110                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2111         fi
2112         if test $ol_with_ldbm_api = mdbm -a \
2113                 $ol_with_ldbm_type = btree ; then
2114                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2115         fi
2116         if test $ol_with_ldbm_api = ndbm -a \
2117                 $ol_with_ldbm_type = btree ; then
2118                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2119         fi
2120 fi
2121
2122 if test $ol_enable_slurpd = yes ; then
2123                 if test $ol_with_threads = no ; then
2124                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2125         fi
2126 fi
2127
2128 echo "$ac_t""done" 1>&6
2129
2130 ## Initialize vars
2131 LDAP_LIBS=
2132 LDBM_LIBS=
2133 LTHREAD_LIBS=
2134 LUTIL_LIBS=
2135
2136 LDAPD_LIBS=
2137 SLAPD_LIBS=
2138 SLURPD_LIBS=
2139
2140 BUILD_LDAPD=no
2141 BUILD_SLAPD=no
2142 BUILD_SLURPD=no
2143
2144 BUILD_BDB2=no
2145 BUILD_LDAP=no
2146 BUILD_LDBM=no
2147 BUILD_PASSWD=no
2148 BUILD_PERL=no
2149 BUILD_SHELL=no
2150 BUILD_TCL=no
2151 BUILD_THREAD=no
2152
2153 BUILD_BDB2_DYNAMIC=no
2154 BUILD_LDAP_DYNAMIC=no
2155 BUILD_LDBM_DYNAMIC=no
2156 BUILD_PASSWD_DYNAMIC=no
2157 BUILD_PERL_DYNAMIC=no
2158 BUILD_SHELL_DYNAMIC=no
2159 BUILD_TCL_DYNAMIC=no
2160
2161 SLAPD_MODULES_LDFLAGS=
2162 SLAPD_MODULES_CPPFLAGS=
2163
2164 SLAPD_PERL_LDFLAGS=
2165 SLAPD_PERL_CPPFLAGS=
2166
2167 KRB_LIBS=
2168 READLINE_LIBS=
2169 TERMCAP_LIBS=
2170 TLS_LIBS=
2171
2172
2173
2174
2175 ol_aix_threads=no
2176 case "$target" in
2177 *-*-aix*)       if test -z "CC" ; then
2178                 case "$ol_with_threads" in
2179                 auto | yes |  posix) ol_aix_threads=yes ;;
2180                 esac
2181         fi
2182 ;;
2183 esac
2184
2185 if test $ol_aix_threads = yes ; then
2186         if test -z "${CC}" ; then
2187                 for ac_prog in cc_r xlc_r cc
2188 do
2189 # Extract the first word of "$ac_prog", so it can be a program name with args.
2190 set dummy $ac_prog; ac_word=$2
2191 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2192 echo "configure:2193: checking for $ac_word" >&5
2193 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2194   echo $ac_n "(cached) $ac_c" 1>&6
2195 else
2196   if test -n "$CC"; then
2197   ac_cv_prog_CC="$CC" # Let the user override the test.
2198 else
2199   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2200   ac_dummy="$PATH"
2201   for ac_dir in $ac_dummy; do
2202     test -z "$ac_dir" && ac_dir=.
2203     if test -f $ac_dir/$ac_word; then
2204       ac_cv_prog_CC="$ac_prog"
2205       break
2206     fi
2207   done
2208   IFS="$ac_save_ifs"
2209 fi
2210 fi
2211 CC="$ac_cv_prog_CC"
2212 if test -n "$CC"; then
2213   echo "$ac_t""$CC" 1>&6
2214 else
2215   echo "$ac_t""no" 1>&6
2216 fi
2217
2218 test -n "$CC" && break
2219 done
2220
2221
2222                 if test "$CC" = cc ; then
2223                                                 if test $ol_with_threads != auto ; then
2224                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2225                         else
2226                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2227                         fi
2228                         ol_with_threads=no
2229                 fi
2230         fi
2231
2232         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2233                 ol_with_threads=posix
2234                 ol_cv_pthread_create=yes
2235         fi
2236 fi
2237
2238 if test -z "${CC}"; then
2239         for ac_prog in cc
2240 do
2241 # Extract the first word of "$ac_prog", so it can be a program name with args.
2242 set dummy $ac_prog; ac_word=$2
2243 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2244 echo "configure:2245: checking for $ac_word" >&5
2245 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2246   echo $ac_n "(cached) $ac_c" 1>&6
2247 else
2248   if test -n "$CC"; then
2249   ac_cv_prog_CC="$CC" # Let the user override the test.
2250 else
2251   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2252   ac_dummy="$PATH"
2253   for ac_dir in $ac_dummy; do
2254     test -z "$ac_dir" && ac_dir=.
2255     if test -f $ac_dir/$ac_word; then
2256       ac_cv_prog_CC="$ac_prog"
2257       break
2258     fi
2259   done
2260   IFS="$ac_save_ifs"
2261 fi
2262 fi
2263 CC="$ac_cv_prog_CC"
2264 if test -n "$CC"; then
2265   echo "$ac_t""$CC" 1>&6
2266 else
2267   echo "$ac_t""no" 1>&6
2268 fi
2269
2270 test -n "$CC" && break
2271 done
2272
2273 fi
2274
2275
2276 # Extract the first word of "ranlib", so it can be a program name with args.
2277 set dummy ranlib; ac_word=$2
2278 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2279 echo "configure:2280: checking for $ac_word" >&5
2280 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
2281   echo $ac_n "(cached) $ac_c" 1>&6
2282 else
2283   if test -n "$RANLIB"; then
2284   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2285 else
2286   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2287   ac_dummy="$PATH"
2288   for ac_dir in $ac_dummy; do
2289     test -z "$ac_dir" && ac_dir=.
2290     if test -f $ac_dir/$ac_word; then
2291       ac_cv_prog_RANLIB="ranlib"
2292       break
2293     fi
2294   done
2295   IFS="$ac_save_ifs"
2296   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2297 fi
2298 fi
2299 RANLIB="$ac_cv_prog_RANLIB"
2300 if test -n "$RANLIB"; then
2301   echo "$ac_t""$RANLIB" 1>&6
2302 else
2303   echo "$ac_t""no" 1>&6
2304 fi
2305
2306 # Extract the first word of "gcc", so it can be a program name with args.
2307 set dummy gcc; ac_word=$2
2308 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2309 echo "configure:2310: checking for $ac_word" >&5
2310 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2311   echo $ac_n "(cached) $ac_c" 1>&6
2312 else
2313   if test -n "$CC"; then
2314   ac_cv_prog_CC="$CC" # Let the user override the test.
2315 else
2316   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2317   ac_dummy="$PATH"
2318   for ac_dir in $ac_dummy; do
2319     test -z "$ac_dir" && ac_dir=.
2320     if test -f $ac_dir/$ac_word; then
2321       ac_cv_prog_CC="gcc"
2322       break
2323     fi
2324   done
2325   IFS="$ac_save_ifs"
2326 fi
2327 fi
2328 CC="$ac_cv_prog_CC"
2329 if test -n "$CC"; then
2330   echo "$ac_t""$CC" 1>&6
2331 else
2332   echo "$ac_t""no" 1>&6
2333 fi
2334
2335 if test -z "$CC"; then
2336   # Extract the first word of "cc", so it can be a program name with args.
2337 set dummy cc; ac_word=$2
2338 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2339 echo "configure:2340: checking for $ac_word" >&5
2340 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2341   echo $ac_n "(cached) $ac_c" 1>&6
2342 else
2343   if test -n "$CC"; then
2344   ac_cv_prog_CC="$CC" # Let the user override the test.
2345 else
2346   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2347   ac_prog_rejected=no
2348   ac_dummy="$PATH"
2349   for ac_dir in $ac_dummy; do
2350     test -z "$ac_dir" && ac_dir=.
2351     if test -f $ac_dir/$ac_word; then
2352       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2353         ac_prog_rejected=yes
2354         continue
2355       fi
2356       ac_cv_prog_CC="cc"
2357       break
2358     fi
2359   done
2360   IFS="$ac_save_ifs"
2361 if test $ac_prog_rejected = yes; then
2362   # We found a bogon in the path, so make sure we never use it.
2363   set dummy $ac_cv_prog_CC
2364   shift
2365   if test $# -gt 0; then
2366     # We chose a different compiler from the bogus one.
2367     # However, it has the same basename, so the bogon will be chosen
2368     # first if we set CC to just the basename; use the full file name.
2369     shift
2370     set dummy "$ac_dir/$ac_word" "$@"
2371     shift
2372     ac_cv_prog_CC="$@"
2373   fi
2374 fi
2375 fi
2376 fi
2377 CC="$ac_cv_prog_CC"
2378 if test -n "$CC"; then
2379   echo "$ac_t""$CC" 1>&6
2380 else
2381   echo "$ac_t""no" 1>&6
2382 fi
2383
2384   if test -z "$CC"; then
2385     case "`uname -s`" in
2386     *win32* | *WIN32* | *CYGWIN*)
2387       # Extract the first word of "cl", so it can be a program name with args.
2388 set dummy cl; ac_word=$2
2389 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2390 echo "configure:2391: checking for $ac_word" >&5
2391 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2392   echo $ac_n "(cached) $ac_c" 1>&6
2393 else
2394   if test -n "$CC"; then
2395   ac_cv_prog_CC="$CC" # Let the user override the test.
2396 else
2397   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2398   ac_dummy="$PATH"
2399   for ac_dir in $ac_dummy; do
2400     test -z "$ac_dir" && ac_dir=.
2401     if test -f $ac_dir/$ac_word; then
2402       ac_cv_prog_CC="cl"
2403       break
2404     fi
2405   done
2406   IFS="$ac_save_ifs"
2407 fi
2408 fi
2409 CC="$ac_cv_prog_CC"
2410 if test -n "$CC"; then
2411   echo "$ac_t""$CC" 1>&6
2412 else
2413   echo "$ac_t""no" 1>&6
2414 fi
2415  ;;
2416     esac
2417   fi
2418   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2419 fi
2420
2421 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2422 echo "configure:2423: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
2423
2424 ac_ext=c
2425 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2426 ac_cpp='$CPP $CPPFLAGS'
2427 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2428 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2429 cross_compiling=$ac_cv_prog_cc_cross
2430
2431 cat > conftest.$ac_ext << EOF
2432
2433 #line 2434 "configure"
2434 #include "confdefs.h"
2435
2436 main(){return(0);}
2437 EOF
2438 if { (eval echo configure:2439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2439   ac_cv_prog_cc_works=yes
2440   # If we can't run a trivial program, we are probably using a cross compiler.
2441   if (./conftest; exit) 2>/dev/null; then
2442     ac_cv_prog_cc_cross=no
2443   else
2444     ac_cv_prog_cc_cross=yes
2445   fi
2446 else
2447   echo "configure: failed program was:" >&5
2448   cat conftest.$ac_ext >&5
2449   ac_cv_prog_cc_works=no
2450 fi
2451 rm -fr conftest*
2452 ac_ext=c
2453 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2454 ac_cpp='$CPP $CPPFLAGS'
2455 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2456 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2457 cross_compiling=$ac_cv_prog_cc_cross
2458
2459 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2460 if test $ac_cv_prog_cc_works = no; then
2461   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2462 fi
2463 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2464 echo "configure:2465: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
2465 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2466 cross_compiling=$ac_cv_prog_cc_cross
2467
2468 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2469 echo "configure:2470: checking whether we are using GNU C" >&5
2470 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
2471   echo $ac_n "(cached) $ac_c" 1>&6
2472 else
2473   cat > conftest.c <<EOF
2474 #ifdef __GNUC__
2475   yes;
2476 #endif
2477 EOF
2478 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2479   ac_cv_prog_gcc=yes
2480 else
2481   ac_cv_prog_gcc=no
2482 fi
2483 fi
2484
2485 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2486
2487 if test $ac_cv_prog_gcc = yes; then
2488   GCC=yes
2489 else
2490   GCC=
2491 fi
2492
2493 ac_test_CFLAGS="${CFLAGS+set}"
2494 ac_save_CFLAGS="$CFLAGS"
2495 CFLAGS=
2496 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2497 echo "configure:2498: checking whether ${CC-cc} accepts -g" >&5
2498 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
2499   echo $ac_n "(cached) $ac_c" 1>&6
2500 else
2501   echo 'void f(){}' > conftest.c
2502 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2503   ac_cv_prog_cc_g=yes
2504 else
2505   ac_cv_prog_cc_g=no
2506 fi
2507 rm -f conftest*
2508
2509 fi
2510
2511 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2512 if test "$ac_test_CFLAGS" = set; then
2513   CFLAGS="$ac_save_CFLAGS"
2514 elif test $ac_cv_prog_cc_g = yes; then
2515   if test "$GCC" = yes; then
2516     CFLAGS="-g -O2"
2517   else
2518     CFLAGS="-g"
2519   fi
2520 else
2521   if test "$GCC" = yes; then
2522     CFLAGS="-O2"
2523   else
2524     CFLAGS=
2525   fi
2526 fi
2527
2528 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2529 if test "${with_gnu_ld+set}" = set; then
2530   withval="$with_gnu_ld"
2531   test "$withval" = no || with_gnu_ld=yes
2532 else
2533   with_gnu_ld=no
2534 fi
2535
2536
2537 ac_prog=ld
2538 if test "$ac_cv_prog_gcc" = yes; then
2539   # Check if gcc -print-prog-name=ld gives a path.
2540   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2541 echo "configure:2542: checking for ld used by GCC" >&5
2542   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2543   case "$ac_prog" in
2544   # Accept absolute paths.
2545   /* | A-Za-z:\\*)
2546     test -z "$LD" && LD="$ac_prog"
2547     ;;
2548   "")
2549     # If it fails, then pretend we aren't using GCC.
2550     ac_prog=ld
2551     ;;
2552   *)
2553     # If it is relative, then search for the first ld in PATH.
2554     with_gnu_ld=unknown
2555     ;;
2556   esac
2557 elif test "$with_gnu_ld" = yes; then
2558   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2559 echo "configure:2560: checking for GNU ld" >&5
2560 else
2561   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2562 echo "configure:2563: checking for non-GNU ld" >&5
2563 fi
2564 if eval "test \"\${ac_cv_path_LD+set}\" = set"; then
2565   echo $ac_n "(cached) $ac_c" 1>&6
2566 else
2567   if test -z "$LD"; then
2568   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2569   for ac_dir in $PATH; do
2570     test -z "$ac_dir" && ac_dir=.
2571     if test -f "$ac_dir/$ac_prog"; then
2572       ac_cv_path_LD="$ac_dir/$ac_prog"
2573       # Check to see if the program is GNU ld.  I'd rather use --version,
2574       # but apparently some GNU ld's only accept -v.
2575       # Break only if it was the GNU/non-GNU ld that we prefer.
2576       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2577         test "$with_gnu_ld" != no && break
2578       else
2579         test "$with_gnu_ld" != yes && break
2580       fi
2581     fi
2582   done
2583   IFS="$ac_save_ifs"
2584 else
2585   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2586 fi
2587 fi
2588
2589 LD="$ac_cv_path_LD"
2590 if test -n "$LD"; then
2591   echo "$ac_t""$LD" 1>&6
2592 else
2593   echo "$ac_t""no" 1>&6
2594 fi
2595 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2596
2597 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2598 echo "configure:2599: checking if the linker ($LD) is GNU ld" >&5
2599 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then
2600   echo $ac_n "(cached) $ac_c" 1>&6
2601 else
2602   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2603 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2604   ac_cv_prog_gnu_ld=yes
2605 else
2606   ac_cv_prog_gnu_ld=no
2607 fi
2608 fi
2609
2610 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2611
2612
2613 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2614 echo "configure:2615: checking for BSD-compatible nm" >&5
2615 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then
2616   echo $ac_n "(cached) $ac_c" 1>&6
2617 else
2618   case "$NM" in
2619 /* | A-Za-z:\\*)
2620   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2621   ;;
2622 *)
2623   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2624   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2625     test -z "$ac_dir" && ac_dir=.
2626     if test -f $ac_dir/nm; then
2627       # Check to see if the nm accepts a BSD-compat flag.
2628       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2629       #   nm: unknown option "B" ignored
2630       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2631         ac_cv_path_NM="$ac_dir/nm -B"
2632       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2633         ac_cv_path_NM="$ac_dir/nm -p"
2634       else
2635         ac_cv_path_NM="$ac_dir/nm"
2636       fi
2637       break
2638     fi
2639   done
2640   IFS="$ac_save_ifs"
2641   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2642   ;;
2643 esac
2644 fi
2645
2646 NM="$ac_cv_path_NM"
2647 echo "$ac_t""$NM" 1>&6
2648
2649
2650 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2651 echo "configure:2652: checking whether ln -s works" >&5
2652 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2653   echo $ac_n "(cached) $ac_c" 1>&6
2654 else
2655   rm -f conftestdata
2656 if ln -s X conftestdata 2>/dev/null
2657 then
2658   rm -f conftestdata
2659   ac_cv_prog_LN_S="ln -s"
2660 else
2661   ac_cv_prog_LN_S=ln
2662 fi
2663 fi
2664 LN_S="$ac_cv_prog_LN_S"
2665 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2666   echo "$ac_t""yes" 1>&6
2667 else
2668   echo "$ac_t""no" 1>&6
2669 fi
2670
2671 # Always use our own libtool.
2672 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2673
2674 # Check for any special flags to pass to ltconfig.
2675 libtool_flags=
2676 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2677 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2678 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2679 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2680 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2681
2682 # Some flags need to be propagated to the compiler or linker for good
2683 # libtool support.
2684 case "$host" in
2685 *-*-irix6*)
2686   # Find out which ABI we are using.
2687   echo '#line 2688 "configure"' > conftest.$ac_ext
2688   if { (eval echo configure:2689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2689     case "`/usr/bin/file conftest.o`" in
2690     *32-bit*)
2691       LD="${LD-ld} -32"
2692       ;;
2693     *N32*)
2694       LD="${LD-ld} -n32"
2695       ;;
2696     *64-bit*)
2697       LD="${LD-ld} -64"
2698       ;;
2699     esac
2700   fi
2701   rm -rf conftest*
2702   ;;
2703
2704 *-*-sco3.2v5*)
2705   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2706   CFLAGS="$CFLAGS -belf"
2707   ;;
2708 esac
2709
2710 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2711 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2712 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2713 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2714 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2715 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2716
2717
2718 for ac_prog in gawk mawk nawk awk
2719 do
2720 # Extract the first word of "$ac_prog", so it can be a program name with args.
2721 set dummy $ac_prog; ac_word=$2
2722 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2723 echo "configure:2724: checking for $ac_word" >&5
2724 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
2725   echo $ac_n "(cached) $ac_c" 1>&6
2726 else
2727   if test -n "$AWK"; then
2728   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2729 else
2730   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2731   ac_dummy="$PATH"
2732   for ac_dir in $ac_dummy; do
2733     test -z "$ac_dir" && ac_dir=.
2734     if test -f $ac_dir/$ac_word; then
2735       ac_cv_prog_AWK="$ac_prog"
2736       break
2737     fi
2738   done
2739   IFS="$ac_save_ifs"
2740 fi
2741 fi
2742 AWK="$ac_cv_prog_AWK"
2743 if test -n "$AWK"; then
2744   echo "$ac_t""$AWK" 1>&6
2745 else
2746   echo "$ac_t""no" 1>&6
2747 fi
2748
2749 test -n "$AWK" && break
2750 done
2751
2752 # test for ln hardlink support
2753 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2754 echo "configure:2755: checking whether ln works" >&5
2755 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
2756   echo $ac_n "(cached) $ac_c" 1>&6
2757 else
2758   rm -f conftest.src conftest.dst
2759 echo "conftest" > conftest.src
2760 if ln conftest.src conftest.dst 2>/dev/null
2761 then
2762   ol_cv_prog_LN_H="ln"
2763 else
2764   ol_cv_prog_LN_H="cp"
2765 fi
2766 rm -f conftest.src conftest.dst
2767
2768 fi
2769 LN_H="$ol_cv_prog_LN_H"
2770 if test "$ol_cv_prog_LN_H" = "ln"; then
2771         echo "$ac_t""yes" 1>&6
2772 else
2773         echo "$ac_t""no" 1>&6
2774 fi
2775
2776 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2777 echo "configure:2778: checking whether ln -s works" >&5
2778 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
2779   echo $ac_n "(cached) $ac_c" 1>&6
2780 else
2781   rm -f conftestdata
2782 if ln -s X conftestdata 2>/dev/null
2783 then
2784   rm -f conftestdata
2785   ac_cv_prog_LN_S="ln -s"
2786 else
2787   ac_cv_prog_LN_S=ln
2788 fi
2789 fi
2790 LN_S="$ac_cv_prog_LN_S"
2791 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2792   echo "$ac_t""yes" 1>&6
2793 else
2794   echo "$ac_t""no" 1>&6
2795 fi
2796
2797
2798 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2799         LN_S="$LN_H"
2800 fi
2801
2802 # Extract the first word of "sendmail", so it can be a program name with args.
2803 set dummy sendmail; ac_word=$2
2804 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2805 echo "configure:2806: checking for $ac_word" >&5
2806 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
2807   echo $ac_n "(cached) $ac_c" 1>&6
2808 else
2809   case "$SENDMAIL" in
2810   /*)
2811   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2812   ;;
2813   ?:/*)                  
2814   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2815   ;;
2816   *)
2817   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2818   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2819   for ac_dir in $ac_dummy; do 
2820     test -z "$ac_dir" && ac_dir=.
2821     if test -f $ac_dir/$ac_word; then
2822       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2823       break
2824     fi
2825   done
2826   IFS="$ac_save_ifs"
2827   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2828   ;;
2829 esac
2830 fi
2831 SENDMAIL="$ac_cv_path_SENDMAIL"
2832 if test -n "$SENDMAIL"; then
2833   echo "$ac_t""$SENDMAIL" 1>&6
2834 else
2835   echo "$ac_t""no" 1>&6
2836 fi
2837
2838 # Extract the first word of "vi", so it can be a program name with args.
2839 set dummy vi; ac_word=$2
2840 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2841 echo "configure:2842: checking for $ac_word" >&5
2842 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
2843   echo $ac_n "(cached) $ac_c" 1>&6
2844 else
2845   case "$EDITOR" in
2846   /*)
2847   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2848   ;;
2849   ?:/*)                  
2850   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2851   ;;
2852   *)
2853   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2854   ac_dummy="$PATH:/usr/ucb"
2855   for ac_dir in $ac_dummy; do 
2856     test -z "$ac_dir" && ac_dir=.
2857     if test -f $ac_dir/$ac_word; then
2858       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2859       break
2860     fi
2861   done
2862   IFS="$ac_save_ifs"
2863   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2864   ;;
2865 esac
2866 fi
2867 EDITOR="$ac_cv_path_EDITOR"
2868 if test -n "$EDITOR"; then
2869   echo "$ac_t""$EDITOR" 1>&6
2870 else
2871   echo "$ac_t""no" 1>&6
2872 fi
2873
2874 # Extract the first word of "finger", so it can be a program name with args.
2875 set dummy finger; ac_word=$2
2876 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2877 echo "configure:2878: checking for $ac_word" >&5
2878 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
2879   echo $ac_n "(cached) $ac_c" 1>&6
2880 else
2881   case "$FINGER" in
2882   /*)
2883   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2884   ;;
2885   ?:/*)                  
2886   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2887   ;;
2888   *)
2889   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2890   ac_dummy="$PATH:/usr/ucb"
2891   for ac_dir in $ac_dummy; do 
2892     test -z "$ac_dir" && ac_dir=.
2893     if test -f $ac_dir/$ac_word; then
2894       ac_cv_path_FINGER="$ac_dir/$ac_word"
2895       break
2896     fi
2897   done
2898   IFS="$ac_save_ifs"
2899   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2900   ;;
2901 esac
2902 fi
2903 FINGER="$ac_cv_path_FINGER"
2904 if test -n "$FINGER"; then
2905   echo "$ac_t""$FINGER" 1>&6
2906 else
2907   echo "$ac_t""no" 1>&6
2908 fi
2909
2910
2911 ol_link_modules=no
2912 if test $ol_enable_modules != no ; then
2913         # Extract the first word of "glib-config", so it can be a program name with args.
2914 set dummy glib-config; ac_word=$2
2915 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2916 echo "configure:2917: checking for $ac_word" >&5
2917 if eval "test \"\${ac_cv_path_GLIBCONFIG+set}\" = set"; then
2918   echo $ac_n "(cached) $ac_c" 1>&6
2919 else
2920   case "$GLIBCONFIG" in
2921   /*)
2922   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
2923   ;;
2924   ?:/*)                  
2925   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
2926   ;;
2927   *)
2928   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2929   ac_dummy="$PATH"
2930   for ac_dir in $ac_dummy; do 
2931     test -z "$ac_dir" && ac_dir=.
2932     if test -f $ac_dir/$ac_word; then
2933       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
2934       break
2935     fi
2936   done
2937   IFS="$ac_save_ifs"
2938   ;;
2939 esac
2940 fi
2941 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
2942 if test -n "$GLIBCONFIG"; then
2943   echo "$ac_t""$GLIBCONFIG" 1>&6
2944 else
2945   echo "$ac_t""no" 1>&6
2946 fi
2947
2948
2949         if test "no$GLIBCONFIG" = "no" ; then
2950                 if test $ol_enable_modules = yes ; then
2951                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
2952                 fi
2953
2954         else
2955                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
2956                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
2957                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
2958
2959                                 ol_link_modules=yes
2960         fi
2961 else
2962         ol_with_bdb2_module=static
2963         ol_with_ldap_module=static
2964         ol_with_ldbm_module=static
2965         ol_with_passwd_module=static
2966         ol_with_perl_module=static
2967         ol_with_shell_module=static
2968         ol_with_tcl_module=static
2969 fi
2970
2971 ol_link_perl=no
2972 if test $ol_enable_perl != no ; then
2973         # Extract the first word of "perl", so it can be a program name with args.
2974 set dummy perl; ac_word=$2
2975 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2976 echo "configure:2977: checking for $ac_word" >&5
2977 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
2978   echo $ac_n "(cached) $ac_c" 1>&6
2979 else
2980   case "$PERLBIN" in
2981   /*)
2982   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2983   ;;
2984   ?:/*)                  
2985   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2986   ;;
2987   *)
2988   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2989   ac_dummy="$PATH"
2990   for ac_dir in $ac_dummy; do 
2991     test -z "$ac_dir" && ac_dir=.
2992     if test -f $ac_dir/$ac_word; then
2993       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2994       break
2995     fi
2996   done
2997   IFS="$ac_save_ifs"
2998   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2999   ;;
3000 esac
3001 fi
3002 PERLBIN="$ac_cv_path_PERLBIN"
3003 if test -n "$PERLBIN"; then
3004   echo "$ac_t""$PERLBIN" 1>&6
3005 else
3006   echo "$ac_t""no" 1>&6
3007 fi
3008
3009
3010         if test "no$PERLBIN" = "no" ; then
3011                 if test $ol_enable_perl = yes ; then
3012                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
3013                 fi
3014
3015         else
3016                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
3017                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
3018
3019                                 ol_link_perl=yes
3020         fi
3021 fi
3022
3023 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3024 echo "configure:3025: checking how to run the C preprocessor" >&5
3025 # On Suns, sometimes $CPP names a directory.
3026 if test -n "$CPP" && test -d "$CPP"; then
3027   CPP=
3028 fi
3029 if test -z "$CPP"; then
3030 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3031   echo $ac_n "(cached) $ac_c" 1>&6
3032 else
3033     # This must be in double quotes, not single quotes, because CPP may get
3034   # substituted into the Makefile and "${CC-cc}" will confuse make.
3035   CPP="${CC-cc} -E"
3036   # On the NeXT, cc -E runs the code through the compiler's parser,
3037   # not just through cpp.
3038   cat > conftest.$ac_ext <<EOF
3039 #line 3040 "configure"
3040 #include "confdefs.h"
3041 #include <assert.h>
3042 Syntax Error
3043 EOF
3044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3045 { (eval echo configure:3046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3046 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3047 if test -z "$ac_err"; then
3048   :
3049 else
3050   echo "$ac_err" >&5
3051   echo "configure: failed program was:" >&5
3052   cat conftest.$ac_ext >&5
3053   rm -rf conftest*
3054   CPP="${CC-cc} -E -traditional-cpp"
3055   cat > conftest.$ac_ext <<EOF
3056 #line 3057 "configure"
3057 #include "confdefs.h"
3058 #include <assert.h>
3059 Syntax Error
3060 EOF
3061 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3062 { (eval echo configure:3063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3063 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3064 if test -z "$ac_err"; then
3065   :
3066 else
3067   echo "$ac_err" >&5
3068   echo "configure: failed program was:" >&5
3069   cat conftest.$ac_ext >&5
3070   rm -rf conftest*
3071   CPP="${CC-cc} -nologo -E"
3072   cat > conftest.$ac_ext <<EOF
3073 #line 3074 "configure"
3074 #include "confdefs.h"
3075 #include <assert.h>
3076 Syntax Error
3077 EOF
3078 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3079 { (eval echo configure:3080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3080 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3081 if test -z "$ac_err"; then
3082   :
3083 else
3084   echo "$ac_err" >&5
3085   echo "configure: failed program was:" >&5
3086   cat conftest.$ac_ext >&5
3087   rm -rf conftest*
3088   CPP=/lib/cpp
3089 fi
3090 rm -f conftest*
3091 fi
3092 rm -f conftest*
3093 fi
3094 rm -f conftest*
3095   ac_cv_prog_CPP="$CPP"
3096 fi
3097   CPP="$ac_cv_prog_CPP"
3098 else
3099   ac_cv_prog_CPP="$CPP"
3100 fi
3101 echo "$ac_t""$CPP" 1>&6
3102
3103
3104 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3105         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3106
3107 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3108         echo "configure: warning: programs compiled here do run here..." 1>&2
3109         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3110
3111 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3112         echo "configure: warning: programs compiled here do not run here..." 1>&2
3113         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3114 fi
3115
3116 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3117 echo "configure:3118: checking for AIX" >&5
3118 cat > conftest.$ac_ext <<EOF
3119 #line 3120 "configure"
3120 #include "confdefs.h"
3121 #ifdef _AIX
3122   yes
3123 #endif
3124
3125 EOF
3126 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3127   egrep "yes" >/dev/null 2>&1; then
3128   rm -rf conftest*
3129   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3130 #define _ALL_SOURCE 1
3131 EOF
3132
3133 else
3134   rm -rf conftest*
3135   echo "$ac_t""no" 1>&6
3136 fi
3137 rm -f conftest*
3138
3139
3140 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3141 echo "configure:3142: checking for POSIXized ISC" >&5
3142 if test -d /etc/conf/kconfig.d &&
3143   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3144 then
3145   echo "$ac_t""yes" 1>&6
3146   ISC=yes # If later tests want to check for ISC.
3147   cat >> confdefs.h <<\EOF
3148 #define _POSIX_SOURCE 1
3149 EOF
3150
3151   if test "$GCC" = yes; then
3152     CC="$CC -posix"
3153   else
3154     CC="$CC -Xp"
3155   fi
3156 else
3157   echo "$ac_t""no" 1>&6
3158   ISC=
3159 fi
3160
3161 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3162 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3163 echo "configure:3164: checking for minix/config.h" >&5
3164 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3165   echo $ac_n "(cached) $ac_c" 1>&6
3166 else
3167   cat > conftest.$ac_ext <<EOF
3168 #line 3169 "configure"
3169 #include "confdefs.h"
3170 #include <minix/config.h>
3171 EOF
3172 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3173 { (eval echo configure:3174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3174 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3175 if test -z "$ac_err"; then
3176   rm -rf conftest*
3177   eval "ac_cv_header_$ac_safe=yes"
3178 else
3179   echo "$ac_err" >&5
3180   echo "configure: failed program was:" >&5
3181   cat conftest.$ac_ext >&5
3182   rm -rf conftest*
3183   eval "ac_cv_header_$ac_safe=no"
3184 fi
3185 rm -f conftest*
3186 fi
3187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3188   echo "$ac_t""yes" 1>&6
3189   MINIX=yes
3190 else
3191   echo "$ac_t""no" 1>&6
3192 MINIX=
3193 fi
3194
3195 if test "$MINIX" = yes; then
3196   cat >> confdefs.h <<\EOF
3197 #define _POSIX_SOURCE 1
3198 EOF
3199
3200   cat >> confdefs.h <<\EOF
3201 #define _POSIX_1_SOURCE 2
3202 EOF
3203
3204   cat >> confdefs.h <<\EOF
3205 #define _MINIX 1
3206 EOF
3207
3208 fi
3209
3210
3211 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3212 echo "configure:3213: checking for be_app in -lbe" >&5
3213 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
3214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3215   echo $ac_n "(cached) $ac_c" 1>&6
3216 else
3217   ac_save_LIBS="$LIBS"
3218 LIBS="-lbe -lroot -lnet $LIBS"
3219 cat > conftest.$ac_ext <<EOF
3220 #line 3221 "configure"
3221 #include "confdefs.h"
3222 /* Override any gcc2 internal prototype to avoid an error.  */
3223 /* We use char because int might match the return type of a gcc2
3224     builtin and then its argument prototype would still apply.  */
3225 char be_app();
3226
3227 int main() {
3228 be_app()
3229 ; return 0; }
3230 EOF
3231 if { (eval echo configure:3232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3232   rm -rf conftest*
3233   eval "ac_cv_lib_$ac_lib_var=yes"
3234 else
3235   echo "configure: failed program was:" >&5
3236   cat conftest.$ac_ext >&5
3237   rm -rf conftest*
3238   eval "ac_cv_lib_$ac_lib_var=no"
3239 fi
3240 rm -f conftest*
3241 LIBS="$ac_save_LIBS"
3242
3243 fi
3244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3245   echo "$ac_t""yes" 1>&6
3246   LIBS="$LIBS -lbe -lroot -lnet"
3247 else
3248   echo "$ac_t""no" 1>&6
3249 :
3250 fi
3251
3252
3253 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3254 echo "configure:3255: checking for Cygwin environment" >&5
3255 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3256   echo $ac_n "(cached) $ac_c" 1>&6
3257 else
3258   cat > conftest.$ac_ext <<EOF
3259 #line 3260 "configure"
3260 #include "confdefs.h"
3261
3262 int main() {
3263
3264 #ifndef __CYGWIN__
3265 #define __CYGWIN__ __CYGWIN32__
3266 #endif
3267 return __CYGWIN__;
3268 ; return 0; }
3269 EOF
3270 if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3271   rm -rf conftest*
3272   ac_cv_cygwin=yes
3273 else
3274   echo "configure: failed program was:" >&5
3275   cat conftest.$ac_ext >&5
3276   rm -rf conftest*
3277   ac_cv_cygwin=no
3278 fi
3279 rm -f conftest*
3280 fi
3281
3282 echo "$ac_t""$ac_cv_cygwin" 1>&6
3283 CYGWIN=
3284 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3285 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3286 echo "configure:3287: checking for mingw32 environment" >&5
3287 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3288   echo $ac_n "(cached) $ac_c" 1>&6
3289 else
3290   cat > conftest.$ac_ext <<EOF
3291 #line 3292 "configure"
3292 #include "confdefs.h"
3293
3294 int main() {
3295 return __MINGW32__;
3296 ; return 0; }
3297 EOF
3298 if { (eval echo configure:3299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3299   rm -rf conftest*
3300   ac_cv_mingw32=yes
3301 else
3302   echo "configure: failed program was:" >&5
3303   cat conftest.$ac_ext >&5
3304   rm -rf conftest*
3305   ac_cv_mingw32=no
3306 fi
3307 rm -f conftest*
3308 fi
3309
3310 echo "$ac_t""$ac_cv_mingw32" 1>&6
3311 MINGW32=
3312 test "$ac_cv_mingw32" = yes && MINGW32=yes
3313 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3314 echo "configure:3315: checking for EMX OS/2 environment" >&5
3315 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3316   echo $ac_n "(cached) $ac_c" 1>&6
3317 else
3318   cat > conftest.$ac_ext <<EOF
3319 #line 3320 "configure"
3320 #include "confdefs.h"
3321
3322 int main() {
3323 return __EMX__;
3324 ; return 0; }
3325 EOF
3326 if { (eval echo configure:3327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3327   rm -rf conftest*
3328   ac_cv_emxos2=yes
3329 else
3330   echo "configure: failed program was:" >&5
3331   cat conftest.$ac_ext >&5
3332   rm -rf conftest*
3333   ac_cv_emxos2=no
3334 fi
3335 rm -f conftest*
3336 fi
3337
3338 echo "$ac_t""$ac_cv_emxos2" 1>&6
3339 EMXOS2=
3340 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3341
3342
3343
3344 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3345 echo "configure:3346: checking for executable suffix" >&5
3346 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3347   echo $ac_n "(cached) $ac_c" 1>&6
3348 else
3349   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3350   ac_cv_exeext=.exe
3351 else
3352   rm -f conftest*
3353   echo 'int main () { return 0; }' > conftest.$ac_ext
3354   ac_cv_exeext=
3355   if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3356     for file in conftest.*; do
3357       case $file in
3358       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3359       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3360       esac
3361     done
3362   else
3363     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3364   fi
3365   rm -f conftest*
3366   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3367 fi
3368 fi
3369
3370 EXEEXT=""
3371 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3372 echo "$ac_t""${ac_cv_exeext}" 1>&6
3373 ac_exeext=$EXEEXT
3374
3375 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3376 echo "configure:3377: checking for object suffix" >&5
3377 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3378   echo $ac_n "(cached) $ac_c" 1>&6
3379 else
3380   rm -f conftest*
3381 echo 'int i = 1;' > conftest.$ac_ext
3382 if { (eval echo configure:3383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3383   for ac_file in conftest.*; do
3384     case $ac_file in
3385     *.c) ;;
3386     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3387     esac
3388   done
3389 else
3390   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3391 fi
3392 rm -f conftest*
3393 fi
3394
3395 echo "$ac_t""$ac_cv_objext" 1>&6
3396 OBJEXT=$ac_cv_objext
3397 ac_objext=$ac_cv_objext
3398
3399
3400 cat >> confdefs.h <<EOF
3401 #define EXEEXT "${EXEEXT}"
3402 EOF
3403
3404
3405
3406
3407
3408 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3409 echo "configure:3410: checking for ${CC-cc} option to accept ANSI C" >&5
3410 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
3411   echo $ac_n "(cached) $ac_c" 1>&6
3412 else
3413   am_cv_prog_cc_stdc=no
3414 ac_save_CC="$CC"
3415 # Don't try gcc -ansi; that turns off useful extensions and
3416 # breaks some systems' header files.
3417 # AIX                   -qlanglvl=ansi
3418 # Ultrix and OSF/1      -std1
3419 # HP-UX                 -Aa -D_HPUX_SOURCE
3420 # SVR4                  -Xc -D__EXTENSIONS__
3421 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3422 do
3423   CC="$ac_save_CC $ac_arg"
3424   cat > conftest.$ac_ext <<EOF
3425 #line 3426 "configure"
3426 #include "confdefs.h"
3427 #include <stdarg.h>
3428 #include <stdio.h>
3429 #include <sys/types.h>
3430 #include <sys/stat.h>
3431 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3432 struct buf { int x; };
3433 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3434 static char *e (p, i)
3435      char **p;
3436      int i;
3437 {
3438   return p[i];
3439 }
3440 static char *f (char * (*g) (char **, int), char **p, ...)
3441 {
3442   char *s;
3443   va_list v;
3444   va_start (v,p);
3445   s = g (p, va_arg (v,int));
3446   va_end (v);
3447   return s;
3448 }
3449 int test (int i, double x);
3450 struct s1 {int (*f) (int a);};
3451 struct s2 {int (*f) (double a);};
3452 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3453 int argc;
3454 char **argv;
3455
3456 int main() {
3457
3458 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3459
3460 ; return 0; }
3461 EOF
3462 if { (eval echo configure:3463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3463   rm -rf conftest*
3464   am_cv_prog_cc_stdc="$ac_arg"; break
3465 else
3466   echo "configure: failed program was:" >&5
3467   cat conftest.$ac_ext >&5
3468 fi
3469 rm -f conftest*
3470 done
3471 CC="$ac_save_CC"
3472
3473 fi
3474
3475 if test -z "$am_cv_prog_cc_stdc"; then
3476   echo "$ac_t""none needed" 1>&6
3477 else
3478   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3479 fi
3480 case "x$am_cv_prog_cc_stdc" in
3481   x|xno) ;;
3482   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3483 esac
3484
3485 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3486         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3487 fi
3488
3489
3490 # test for make depend flag
3491 OL_MKDEP=
3492 OL_MKDEP_FLAGS=
3493 if test -z "${MKDEP}"; then
3494         OL_MKDEP="${CC-cc}"
3495         if test -z "${MKDEP_FLAGS}"; then
3496                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3497 echo "configure:3498: checking for ${OL_MKDEP} depend flag" >&5
3498 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
3499   echo $ac_n "(cached) $ac_c" 1>&6
3500 else
3501   
3502                         ol_cv_mkdep=no
3503                         for flag in "-M" "-xM"; do
3504                                 cat > conftest.c <<EOF
3505  noCode;
3506 EOF
3507                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3508                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3509                                 then
3510                                         if test ! -f conftest."${ac_object}" ; then
3511                                                 ol_cv_mkdep=$flag
3512                                                 OL_MKDEP_FLAGS="$flag"
3513                                                 break
3514                                         fi
3515                                 fi
3516                         done
3517                         rm -f conftest*
3518                 
3519 fi
3520
3521 echo "$ac_t""$ol_cv_mkdep" 1>&6
3522         else
3523                 cc_cv_mkdep=yes
3524                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3525         fi
3526 else
3527         cc_cv_mkdep=yes
3528         OL_MKDEP="${MKDEP}"
3529         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3530 fi
3531
3532
3533
3534 if test "${ol_cv_mkdep}" = no ; then
3535         # this will soon become an error
3536         echo "configure: warning: do not know how to generate dependencies" 1>&2
3537 fi
3538
3539
3540
3541 echo $ac_n "checking for socket""... $ac_c" 1>&6
3542 echo "configure:3543: checking for socket" >&5
3543 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
3544   echo $ac_n "(cached) $ac_c" 1>&6
3545 else
3546   cat > conftest.$ac_ext <<EOF
3547 #line 3548 "configure"
3548 #include "confdefs.h"
3549 /* System header to define __stub macros and hopefully few prototypes,
3550     which can conflict with char socket(); below.  */
3551 #include <assert.h>
3552 /* Override any gcc2 internal prototype to avoid an error.  */
3553 /* We use char because int might match the return type of a gcc2
3554     builtin and then its argument prototype would still apply.  */
3555 char socket();
3556 char (*f)();
3557
3558 int main() {
3559
3560 /* The GNU C library defines this for functions which it implements
3561     to always fail with ENOSYS.  Some functions are actually named
3562     something starting with __ and the normal name is an alias.  */
3563 #if defined (__stub_socket) || defined (__stub___socket)
3564 choke me
3565 #else
3566 f = socket;
3567 #endif
3568
3569 ; return 0; }
3570 EOF
3571 if { (eval echo configure:3572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3572   rm -rf conftest*
3573   eval "ac_cv_func_socket=yes"
3574 else
3575   echo "configure: failed program was:" >&5
3576   cat conftest.$ac_ext >&5
3577   rm -rf conftest*
3578   eval "ac_cv_func_socket=no"
3579 fi
3580 rm -f conftest*
3581 fi
3582
3583 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3584   echo "$ac_t""yes" 1>&6
3585   :
3586 else
3587   echo "$ac_t""no" 1>&6
3588         
3589         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3590 echo "configure:3591: checking for main in -lsocket" >&5
3591 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3592 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3593   echo $ac_n "(cached) $ac_c" 1>&6
3594 else
3595   ac_save_LIBS="$LIBS"
3596 LIBS="-lsocket  $LIBS"
3597 cat > conftest.$ac_ext <<EOF
3598 #line 3599 "configure"
3599 #include "confdefs.h"
3600
3601 int main() {
3602 main()
3603 ; return 0; }
3604 EOF
3605 if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3606   rm -rf conftest*
3607   eval "ac_cv_lib_$ac_lib_var=yes"
3608 else
3609   echo "configure: failed program was:" >&5
3610   cat conftest.$ac_ext >&5
3611   rm -rf conftest*
3612   eval "ac_cv_lib_$ac_lib_var=no"
3613 fi
3614 rm -f conftest*
3615 LIBS="$ac_save_LIBS"
3616
3617 fi
3618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3619   echo "$ac_t""yes" 1>&6
3620     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3621     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3622   cat >> confdefs.h <<EOF
3623 #define $ac_tr_lib 1
3624 EOF
3625
3626   LIBS="-lsocket $LIBS"
3627
3628 else
3629   echo "$ac_t""no" 1>&6
3630 fi
3631
3632         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3633 echo "configure:3634: checking for main in -lnet" >&5
3634 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3635 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3636   echo $ac_n "(cached) $ac_c" 1>&6
3637 else
3638   ac_save_LIBS="$LIBS"
3639 LIBS="-lnet  $LIBS"
3640 cat > conftest.$ac_ext <<EOF
3641 #line 3642 "configure"
3642 #include "confdefs.h"
3643
3644 int main() {
3645 main()
3646 ; return 0; }
3647 EOF
3648 if { (eval echo configure:3649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3649   rm -rf conftest*
3650   eval "ac_cv_lib_$ac_lib_var=yes"
3651 else
3652   echo "configure: failed program was:" >&5
3653   cat conftest.$ac_ext >&5
3654   rm -rf conftest*
3655   eval "ac_cv_lib_$ac_lib_var=no"
3656 fi
3657 rm -f conftest*
3658 LIBS="$ac_save_LIBS"
3659
3660 fi
3661 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3662   echo "$ac_t""yes" 1>&6
3663     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3664     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3665   cat >> confdefs.h <<EOF
3666 #define $ac_tr_lib 1
3667 EOF
3668
3669   LIBS="-lnet $LIBS"
3670
3671 else
3672   echo "$ac_t""no" 1>&6
3673 fi
3674
3675         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
3676 echo "configure:3677: checking for socket in -lnet" >&5
3677 ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3678 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3679   echo $ac_n "(cached) $ac_c" 1>&6
3680 else
3681   ac_save_LIBS="$LIBS"
3682 LIBS="-lnet  $LIBS"
3683 cat > conftest.$ac_ext <<EOF
3684 #line 3685 "configure"
3685 #include "confdefs.h"
3686 /* Override any gcc2 internal prototype to avoid an error.  */
3687 /* We use char because int might match the return type of a gcc2
3688     builtin and then its argument prototype would still apply.  */
3689 char socket();
3690
3691 int main() {
3692 socket()
3693 ; return 0; }
3694 EOF
3695 if { (eval echo configure:3696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3696   rm -rf conftest*
3697   eval "ac_cv_lib_$ac_lib_var=yes"
3698 else
3699   echo "configure: failed program was:" >&5
3700   cat conftest.$ac_ext >&5
3701   rm -rf conftest*
3702   eval "ac_cv_lib_$ac_lib_var=no"
3703 fi
3704 rm -f conftest*
3705 LIBS="$ac_save_LIBS"
3706
3707 fi
3708 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3709   echo "$ac_t""yes" 1>&6
3710     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3711     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3712   cat >> confdefs.h <<EOF
3713 #define $ac_tr_lib 1
3714 EOF
3715
3716   LIBS="-lnet $LIBS"
3717
3718 else
3719   echo "$ac_t""no" 1>&6
3720 fi
3721
3722         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3723 echo "configure:3724: checking for main in -lnsl_s" >&5
3724 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3725 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3726   echo $ac_n "(cached) $ac_c" 1>&6
3727 else
3728   ac_save_LIBS="$LIBS"
3729 LIBS="-lnsl_s  $LIBS"
3730 cat > conftest.$ac_ext <<EOF
3731 #line 3732 "configure"
3732 #include "confdefs.h"
3733
3734 int main() {
3735 main()
3736 ; return 0; }
3737 EOF
3738 if { (eval echo configure:3739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3739   rm -rf conftest*
3740   eval "ac_cv_lib_$ac_lib_var=yes"
3741 else
3742   echo "configure: failed program was:" >&5
3743   cat conftest.$ac_ext >&5
3744   rm -rf conftest*
3745   eval "ac_cv_lib_$ac_lib_var=no"
3746 fi
3747 rm -f conftest*
3748 LIBS="$ac_save_LIBS"
3749
3750 fi
3751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3752   echo "$ac_t""yes" 1>&6
3753     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3754     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3755   cat >> confdefs.h <<EOF
3756 #define $ac_tr_lib 1
3757 EOF
3758
3759   LIBS="-lnsl_s $LIBS"
3760
3761 else
3762   echo "$ac_t""no" 1>&6
3763 fi
3764
3765         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3766 echo "configure:3767: checking for main in -lnsl" >&5
3767 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3768 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3769   echo $ac_n "(cached) $ac_c" 1>&6
3770 else
3771   ac_save_LIBS="$LIBS"
3772 LIBS="-lnsl  $LIBS"
3773 cat > conftest.$ac_ext <<EOF
3774 #line 3775 "configure"
3775 #include "confdefs.h"
3776
3777 int main() {
3778 main()
3779 ; return 0; }
3780 EOF
3781 if { (eval echo configure:3782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3797     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3798   cat >> confdefs.h <<EOF
3799 #define $ac_tr_lib 1
3800 EOF
3801
3802   LIBS="-lnsl $LIBS"
3803
3804 else
3805   echo "$ac_t""no" 1>&6
3806 fi
3807
3808         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3809 echo "configure:3810: checking for socket in -linet" >&5
3810 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3811 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3812   echo $ac_n "(cached) $ac_c" 1>&6
3813 else
3814   ac_save_LIBS="$LIBS"
3815 LIBS="-linet  $LIBS"
3816 cat > conftest.$ac_ext <<EOF
3817 #line 3818 "configure"
3818 #include "confdefs.h"
3819 /* Override any gcc2 internal prototype to avoid an error.  */
3820 /* We use char because int might match the return type of a gcc2
3821     builtin and then its argument prototype would still apply.  */
3822 char socket();
3823
3824 int main() {
3825 socket()
3826 ; return 0; }
3827 EOF
3828 if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3829   rm -rf conftest*
3830   eval "ac_cv_lib_$ac_lib_var=yes"
3831 else
3832   echo "configure: failed program was:" >&5
3833   cat conftest.$ac_ext >&5
3834   rm -rf conftest*
3835   eval "ac_cv_lib_$ac_lib_var=no"
3836 fi
3837 rm -f conftest*
3838 LIBS="$ac_save_LIBS"
3839
3840 fi
3841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3842   echo "$ac_t""yes" 1>&6
3843     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3844     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3845   cat >> confdefs.h <<EOF
3846 #define $ac_tr_lib 1
3847 EOF
3848
3849   LIBS="-linet $LIBS"
3850
3851 else
3852   echo "$ac_t""no" 1>&6
3853 fi
3854
3855         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3856 echo "configure:3857: checking for main in -lgen" >&5
3857 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3858 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3859   echo $ac_n "(cached) $ac_c" 1>&6
3860 else
3861   ac_save_LIBS="$LIBS"
3862 LIBS="-lgen  $LIBS"
3863 cat > conftest.$ac_ext <<EOF
3864 #line 3865 "configure"
3865 #include "confdefs.h"
3866
3867 int main() {
3868 main()
3869 ; return 0; }
3870 EOF
3871 if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3872   rm -rf conftest*
3873   eval "ac_cv_lib_$ac_lib_var=yes"
3874 else
3875   echo "configure: failed program was:" >&5
3876   cat conftest.$ac_ext >&5
3877   rm -rf conftest*
3878   eval "ac_cv_lib_$ac_lib_var=no"
3879 fi
3880 rm -f conftest*
3881 LIBS="$ac_save_LIBS"
3882
3883 fi
3884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3885   echo "$ac_t""yes" 1>&6
3886     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3887     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3888   cat >> confdefs.h <<EOF
3889 #define $ac_tr_lib 1
3890 EOF
3891
3892   LIBS="-lgen $LIBS"
3893
3894 else
3895   echo "$ac_t""no" 1>&6
3896 fi
3897
3898
3899 fi
3900
3901
3902 for ac_func in res_search
3903 do
3904 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3905 echo "configure:3906: checking for $ac_func" >&5
3906 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
3907   echo $ac_n "(cached) $ac_c" 1>&6
3908 else
3909   cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912 /* System header to define __stub macros and hopefully few prototypes,
3913     which can conflict with char $ac_func(); below.  */
3914 #include <assert.h>
3915 /* Override any gcc2 internal prototype to avoid an error.  */
3916 /* We use char because int might match the return type of a gcc2
3917     builtin and then its argument prototype would still apply.  */
3918 char $ac_func();
3919 char (*f)();
3920
3921 int main() {
3922
3923 /* The GNU C library defines this for functions which it implements
3924     to always fail with ENOSYS.  Some functions are actually named
3925     something starting with __ and the normal name is an alias.  */
3926 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3927 choke me
3928 #else
3929 f = $ac_func;
3930 #endif
3931
3932 ; return 0; }
3933 EOF
3934 if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3935   rm -rf conftest*
3936   eval "ac_cv_func_$ac_func=yes"
3937 else
3938   echo "configure: failed program was:" >&5
3939   cat conftest.$ac_ext >&5
3940   rm -rf conftest*
3941   eval "ac_cv_func_$ac_func=no"
3942 fi
3943 rm -f conftest*
3944 fi
3945
3946 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3947   echo "$ac_t""yes" 1>&6
3948     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3949   cat >> confdefs.h <<EOF
3950 #define $ac_tr_func 1
3951 EOF
3952  
3953 else
3954   echo "$ac_t""no" 1>&6
3955 fi
3956 done
3957
3958 if test $ac_cv_func_res_search = "no" ; then 
3959         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3960 echo "configure:3961: checking for res_search in -lbind" >&5
3961 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3962 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3963   echo $ac_n "(cached) $ac_c" 1>&6
3964 else
3965   ac_save_LIBS="$LIBS"
3966 LIBS="-lbind  $LIBS"
3967 cat > conftest.$ac_ext <<EOF
3968 #line 3969 "configure"
3969 #include "confdefs.h"
3970 /* Override any gcc2 internal prototype to avoid an error.  */
3971 /* We use char because int might match the return type of a gcc2
3972     builtin and then its argument prototype would still apply.  */
3973 char res_search();
3974
3975 int main() {
3976 res_search()
3977 ; return 0; }
3978 EOF
3979 if { (eval echo configure:3980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3980   rm -rf conftest*
3981   eval "ac_cv_lib_$ac_lib_var=yes"
3982 else
3983   echo "configure: failed program was:" >&5
3984   cat conftest.$ac_ext >&5
3985   rm -rf conftest*
3986   eval "ac_cv_lib_$ac_lib_var=no"
3987 fi
3988 rm -f conftest*
3989 LIBS="$ac_save_LIBS"
3990
3991 fi
3992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3993   echo "$ac_t""yes" 1>&6
3994     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3995     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3996   cat >> confdefs.h <<EOF
3997 #define $ac_tr_lib 1
3998 EOF
3999
4000   LIBS="-lbind $LIBS"
4001
4002 else
4003   echo "$ac_t""no" 1>&6
4004 fi
4005
4006         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
4007                 cat >> confdefs.h <<\EOF
4008 #define HAVE_RES_SEARCH 1
4009 EOF
4010
4011         else
4012                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
4013 echo "configure:4014: checking for res_search in -lresolv" >&5
4014 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
4015 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4016   echo $ac_n "(cached) $ac_c" 1>&6
4017 else
4018   ac_save_LIBS="$LIBS"
4019 LIBS="-lresolv  $LIBS"
4020 cat > conftest.$ac_ext <<EOF
4021 #line 4022 "configure"
4022 #include "confdefs.h"
4023 /* Override any gcc2 internal prototype to avoid an error.  */
4024 /* We use char because int might match the return type of a gcc2
4025     builtin and then its argument prototype would still apply.  */
4026 char res_search();
4027
4028 int main() {
4029 res_search()
4030 ; return 0; }
4031 EOF
4032 if { (eval echo configure:4033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4033   rm -rf conftest*
4034   eval "ac_cv_lib_$ac_lib_var=yes"
4035 else
4036   echo "configure: failed program was:" >&5
4037   cat conftest.$ac_ext >&5
4038   rm -rf conftest*
4039   eval "ac_cv_lib_$ac_lib_var=no"
4040 fi
4041 rm -f conftest*
4042 LIBS="$ac_save_LIBS"
4043
4044 fi
4045 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4046   echo "$ac_t""yes" 1>&6
4047     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4048     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4049   cat >> confdefs.h <<EOF
4050 #define $ac_tr_lib 1
4051 EOF
4052
4053   LIBS="-lresolv $LIBS"
4054
4055 else
4056   echo "$ac_t""no" 1>&6
4057 fi
4058
4059                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
4060                         cat >> confdefs.h <<\EOF
4061 #define HAVE_RES_SEARCH 1
4062 EOF
4063
4064                 fi
4065         fi
4066 fi
4067
4068 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
4069 echo "configure:4070: checking for sigset in -lV3" >&5
4070 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
4071 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4072   echo $ac_n "(cached) $ac_c" 1>&6
4073 else
4074   ac_save_LIBS="$LIBS"
4075 LIBS="-lV3  $LIBS"
4076 cat > conftest.$ac_ext <<EOF
4077 #line 4078 "configure"
4078 #include "confdefs.h"
4079 /* Override any gcc2 internal prototype to avoid an error.  */
4080 /* We use char because int might match the return type of a gcc2
4081     builtin and then its argument prototype would still apply.  */
4082 char sigset();
4083
4084 int main() {
4085 sigset()
4086 ; return 0; }
4087 EOF
4088 if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4089   rm -rf conftest*
4090   eval "ac_cv_lib_$ac_lib_var=yes"
4091 else
4092   echo "configure: failed program was:" >&5
4093   cat conftest.$ac_ext >&5
4094   rm -rf conftest*
4095   eval "ac_cv_lib_$ac_lib_var=no"
4096 fi
4097 rm -f conftest*
4098 LIBS="$ac_save_LIBS"
4099
4100 fi
4101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4102   echo "$ac_t""yes" 1>&6
4103     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4104     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4105   cat >> confdefs.h <<EOF
4106 #define $ac_tr_lib 1
4107 EOF
4108
4109   LIBS="-lV3 $LIBS"
4110
4111 else
4112   echo "$ac_t""no" 1>&6
4113 fi
4114
4115
4116 for ac_hdr in regex.h 
4117 do
4118 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4119 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4120 echo "configure:4121: checking for $ac_hdr" >&5
4121 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4122   echo $ac_n "(cached) $ac_c" 1>&6
4123 else
4124   cat > conftest.$ac_ext <<EOF
4125 #line 4126 "configure"
4126 #include "confdefs.h"
4127 #include <$ac_hdr>
4128 EOF
4129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4130 { (eval echo configure:4131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4132 if test -z "$ac_err"; then
4133   rm -rf conftest*
4134   eval "ac_cv_header_$ac_safe=yes"
4135 else
4136   echo "$ac_err" >&5
4137   echo "configure: failed program was:" >&5
4138   cat conftest.$ac_ext >&5
4139   rm -rf conftest*
4140   eval "ac_cv_header_$ac_safe=no"
4141 fi
4142 rm -f conftest*
4143 fi
4144 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4145   echo "$ac_t""yes" 1>&6
4146     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4147   cat >> confdefs.h <<EOF
4148 #define $ac_tr_hdr 1
4149 EOF
4150  
4151 else
4152   echo "$ac_t""no" 1>&6
4153 fi
4154 done
4155
4156 if test "$ac_cv_header_regex_h" != yes ; then
4157         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4158 fi
4159 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4160 echo "configure:4161: checking for regfree" >&5
4161 if eval "test \"\${ac_cv_func_regfree+set}\" = set"; then
4162   echo $ac_n "(cached) $ac_c" 1>&6
4163 else
4164   cat > conftest.$ac_ext <<EOF
4165 #line 4166 "configure"
4166 #include "confdefs.h"
4167 /* System header to define __stub macros and hopefully few prototypes,
4168     which can conflict with char regfree(); below.  */
4169 #include <assert.h>
4170 /* Override any gcc2 internal prototype to avoid an error.  */
4171 /* We use char because int might match the return type of a gcc2
4172     builtin and then its argument prototype would still apply.  */
4173 char regfree();
4174 char (*f)();
4175
4176 int main() {
4177
4178 /* The GNU C library defines this for functions which it implements
4179     to always fail with ENOSYS.  Some functions are actually named
4180     something starting with __ and the normal name is an alias.  */
4181 #if defined (__stub_regfree) || defined (__stub___regfree)
4182 choke me
4183 #else
4184 f = regfree;
4185 #endif
4186
4187 ; return 0; }
4188 EOF
4189 if { (eval echo configure:4190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4190   rm -rf conftest*
4191   eval "ac_cv_func_regfree=yes"
4192 else
4193   echo "configure: failed program was:" >&5
4194   cat conftest.$ac_ext >&5
4195   rm -rf conftest*
4196   eval "ac_cv_func_regfree=no"
4197 fi
4198 rm -f conftest*
4199 fi
4200
4201 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4202   echo "$ac_t""yes" 1>&6
4203   :
4204 else
4205   echo "$ac_t""no" 1>&6
4206 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4207 fi
4208
4209
4210
4211 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4212 echo "configure:4213: checking for compatible POSIX regex" >&5
4213 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
4214   echo $ac_n "(cached) $ac_c" 1>&6
4215 else
4216   
4217         if test "$cross_compiling" = yes; then
4218   ol_cv_c_posix_regex=cross
4219 else
4220   cat > conftest.$ac_ext <<EOF
4221 #line 4222 "configure"
4222 #include "confdefs.h"
4223
4224 #include <sys/types.h>
4225 #include <regex.h>
4226 static char *pattern, *string;
4227 main()
4228 {
4229         int rc;
4230         regex_t re;
4231
4232         pattern = "^A";
4233
4234         if(regcomp(&re, pattern, 0)) {
4235                 return -1;
4236         }
4237         
4238         string = "ALL MATCH";
4239         
4240         rc = regexec(&re, string, 0, (void*)0, 0);
4241
4242         regfree(&re);
4243
4244         return rc;
4245 }
4246 EOF
4247 if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4248 then
4249   ol_cv_c_posix_regex=yes
4250 else
4251   echo "configure: failed program was:" >&5
4252   cat conftest.$ac_ext >&5
4253   rm -fr conftest*
4254   ol_cv_c_posix_regex=no
4255 fi
4256 rm -fr conftest*
4257 fi
4258
4259 fi
4260
4261 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4262
4263 if test "$ol_cv_c_posix_regex" = no ; then
4264         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4265 fi
4266
4267 echo $ac_n "checking for select""... $ac_c" 1>&6
4268 echo "configure:4269: checking for select" >&5
4269 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
4270   echo $ac_n "(cached) $ac_c" 1>&6
4271 else
4272   cat > conftest.$ac_ext <<EOF
4273 #line 4274 "configure"
4274 #include "confdefs.h"
4275 /* System header to define __stub macros and hopefully few prototypes,
4276     which can conflict with char select(); below.  */
4277 #include <assert.h>
4278 /* Override any gcc2 internal prototype to avoid an error.  */
4279 /* We use char because int might match the return type of a gcc2
4280     builtin and then its argument prototype would still apply.  */
4281 char select();
4282 char (*f)();
4283
4284 int main() {
4285
4286 /* The GNU C library defines this for functions which it implements
4287     to always fail with ENOSYS.  Some functions are actually named
4288     something starting with __ and the normal name is an alias.  */
4289 #if defined (__stub_select) || defined (__stub___select)
4290 choke me
4291 #else
4292 f = select;
4293 #endif
4294
4295 ; return 0; }
4296 EOF
4297 if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4298   rm -rf conftest*
4299   eval "ac_cv_func_select=yes"
4300 else
4301   echo "configure: failed program was:" >&5
4302   cat conftest.$ac_ext >&5
4303   rm -rf conftest*
4304   eval "ac_cv_func_select=no"
4305 fi
4306 rm -f conftest*
4307 fi
4308
4309 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4310   echo "$ac_t""yes" 1>&6
4311   :
4312 else
4313   echo "$ac_t""no" 1>&6
4314 { echo "configure: error: select() required." 1>&2; exit 1; }
4315 fi
4316
4317
4318 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4319 echo "configure:4320: checking types of arguments for select()" >&5
4320  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
4321   echo $ac_n "(cached) $ac_c" 1>&6
4322 else
4323    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
4324   echo $ac_n "(cached) $ac_c" 1>&6
4325 else
4326     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
4327   echo $ac_n "(cached) $ac_c" 1>&6
4328 else
4329      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4330      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4331       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4332        cat > conftest.$ac_ext <<EOF
4333 #line 4334 "configure"
4334 #include "confdefs.h"
4335 #ifdef HAVE_SYS_TYPES_H
4336 #include <sys/types.h>
4337 #endif
4338 #ifdef HAVE_SYS_TIME_H
4339 #include <sys/time.h>
4340 #endif
4341 #ifdef HAVE_SYS_SELECT_H
4342 #include <sys/select.h>
4343 #endif
4344 #ifdef HAVE_SYS_SOCKET_H
4345 #include <sys/socket.h>
4346 #endif
4347 extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
4348 int main() {
4349
4350 ; return 0; }
4351 EOF
4352 if { (eval echo configure:4353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4353   rm -rf conftest*
4354           ac_not_found=no ; break 3
4355 else
4356   echo "configure: failed program was:" >&5
4357   cat conftest.$ac_ext >&5
4358   rm -rf conftest*
4359   ac_not_found=yes
4360 fi
4361 rm -f conftest*
4362       done
4363      done
4364     done
4365    
4366 fi
4367   
4368 fi
4369  
4370 fi
4371  if test "$ac_not_found" = yes; then
4372   ac_cv_func_select_arg1=int 
4373   ac_cv_func_select_arg234='int *' 
4374   ac_cv_func_select_arg5='struct timeval *'
4375  fi
4376  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4377  cat >> confdefs.h <<EOF
4378 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4379 EOF
4380
4381  cat >> confdefs.h <<EOF
4382 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4383 EOF
4384
4385  cat >> confdefs.h <<EOF
4386 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4387 EOF
4388
4389
4390
4391 # ISODE tests
4392 ol_link_isode=no
4393 if test $ol_enable_ldapd != no ; then
4394         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
4395
4396                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
4397 echo "configure:4398: checking for main in -lxtpp" >&5
4398 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
4399 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4400   echo $ac_n "(cached) $ac_c" 1>&6
4401 else
4402   ac_save_LIBS="$LIBS"
4403 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
4404 cat > conftest.$ac_ext <<EOF
4405 #line 4406 "configure"
4406 #include "confdefs.h"
4407
4408 int main() {
4409 main()
4410 ; return 0; }
4411 EOF
4412 if { (eval echo configure:4413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4413   rm -rf conftest*
4414   eval "ac_cv_lib_$ac_lib_var=yes"
4415 else
4416   echo "configure: failed program was:" >&5
4417   cat conftest.$ac_ext >&5
4418   rm -rf conftest*
4419   eval "ac_cv_lib_$ac_lib_var=no"
4420 fi
4421 rm -f conftest*
4422 LIBS="$ac_save_LIBS"
4423
4424 fi
4425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4426   echo "$ac_t""yes" 1>&6
4427   
4428                 ol_link_isode=yes
4429                 cat >> confdefs.h <<\EOF
4430 #define HAVE_XTPP 1
4431 EOF
4432
4433                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
4434                 
4435 else
4436   echo "$ac_t""no" 1>&6
4437 :
4438 fi
4439
4440         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
4441 echo "configure:4442: checking for main in -ldsap" >&5
4442 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
4443 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4444   echo $ac_n "(cached) $ac_c" 1>&6
4445 else
4446   ac_save_LIBS="$LIBS"
4447 LIBS="-ldsap -lisode $LIBS"
4448 cat > conftest.$ac_ext <<EOF
4449 #line 4450 "configure"
4450 #include "confdefs.h"
4451
4452 int main() {
4453 main()
4454 ; return 0; }
4455 EOF
4456 if { (eval echo configure:4457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4457   rm -rf conftest*
4458   eval "ac_cv_lib_$ac_lib_var=yes"
4459 else
4460   echo "configure: failed program was:" >&5
4461   cat conftest.$ac_ext >&5
4462   rm -rf conftest*
4463   eval "ac_cv_lib_$ac_lib_var=no"
4464 fi
4465 rm -f conftest*
4466 LIBS="$ac_save_LIBS"
4467
4468 fi
4469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4470   echo "$ac_t""yes" 1>&6
4471   
4472                 ol_link_isode=yes
4473                 cat >> confdefs.h <<\EOF
4474 #define HAVE_DSAP 1
4475 EOF
4476
4477                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
4478                 
4479 else
4480   echo "$ac_t""no" 1>&6
4481 :
4482 fi
4483
4484         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
4485 echo "configure:4486: checking for main in -lisode" >&5
4486 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
4487 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4488   echo $ac_n "(cached) $ac_c" 1>&6
4489 else
4490   ac_save_LIBS="$LIBS"
4491 LIBS="-lisode  $LIBS"
4492 cat > conftest.$ac_ext <<EOF
4493 #line 4494 "configure"
4494 #include "confdefs.h"
4495
4496 int main() {
4497 main()
4498 ; return 0; }
4499 EOF
4500 if { (eval echo configure:4501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4501   rm -rf conftest*
4502   eval "ac_cv_lib_$ac_lib_var=yes"
4503 else
4504   echo "configure: failed program was:" >&5
4505   cat conftest.$ac_ext >&5
4506   rm -rf conftest*
4507   eval "ac_cv_lib_$ac_lib_var=no"
4508 fi
4509 rm -f conftest*
4510 LIBS="$ac_save_LIBS"
4511
4512 fi
4513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4514   echo "$ac_t""yes" 1>&6
4515   
4516                 ol_link_isode=yes
4517                 cat >> confdefs.h <<\EOF
4518 #define HAVE_ISODE 1
4519 EOF
4520
4521                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
4522                 
4523 else
4524   echo "$ac_t""no" 1>&6
4525 :
4526 fi
4527
4528 fi
4529
4530 if test $ol_link_isode != no; then
4531         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
4532 echo "configure:4533: checking for main in -lpp" >&5
4533 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
4534 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4535   echo $ac_n "(cached) $ac_c" 1>&6
4536 else
4537   ac_save_LIBS="$LIBS"
4538 LIBS="-lpp  $LIBS"
4539 cat > conftest.$ac_ext <<EOF
4540 #line 4541 "configure"
4541 #include "confdefs.h"
4542
4543 int main() {
4544 main()
4545 ; return 0; }
4546 EOF
4547 if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4548   rm -rf conftest*
4549   eval "ac_cv_lib_$ac_lib_var=yes"
4550 else
4551   echo "configure: failed program was:" >&5
4552   cat conftest.$ac_ext >&5
4553   rm -rf conftest*
4554   eval "ac_cv_lib_$ac_lib_var=no"
4555 fi
4556 rm -f conftest*
4557 LIBS="$ac_save_LIBS"
4558
4559 fi
4560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4561   echo "$ac_t""yes" 1>&6
4562   
4563                 cat >> confdefs.h <<\EOF
4564 #define HAVE_PP 1
4565 EOF
4566
4567                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
4568                 
4569 else
4570   echo "$ac_t""no" 1>&6
4571 :
4572 fi
4573
4574
4575         # Extract the first word of "pepsy", so it can be a program name with args.
4576 set dummy pepsy; ac_word=$2
4577 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4578 echo "configure:4579: checking for $ac_word" >&5
4579 if eval "test \"\${ac_cv_path_PEPSY+set}\" = set"; then
4580   echo $ac_n "(cached) $ac_c" 1>&6
4581 else
4582   case "$PEPSY" in
4583   /*)
4584   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
4585   ;;
4586   ?:/*)                  
4587   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
4588   ;;
4589   *)
4590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4591   ac_dummy="$PATH"
4592   for ac_dir in $ac_dummy; do 
4593     test -z "$ac_dir" && ac_dir=.
4594     if test -f $ac_dir/$ac_word; then
4595       ac_cv_path_PEPSY="$ac_dir/$ac_word"
4596       break
4597     fi
4598   done
4599   IFS="$ac_save_ifs"
4600   ;;
4601 esac
4602 fi
4603 PEPSY="$ac_cv_path_PEPSY"
4604 if test -n "$PEPSY"; then
4605   echo "$ac_t""$PEPSY" 1>&6
4606 else
4607   echo "$ac_t""no" 1>&6
4608 fi
4609
4610 fi
4611
4612 ol_link_kerberos=no
4613
4614 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
4615         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
4616 do
4617 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4618 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4619 echo "configure:4620: checking for $ac_hdr" >&5
4620 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4621   echo $ac_n "(cached) $ac_c" 1>&6
4622 else
4623   cat > conftest.$ac_ext <<EOF
4624 #line 4625 "configure"
4625 #include "confdefs.h"
4626 #include <$ac_hdr>
4627 EOF
4628 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4629 { (eval echo configure:4630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4630 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4631 if test -z "$ac_err"; then
4632   rm -rf conftest*
4633   eval "ac_cv_header_$ac_safe=yes"
4634 else
4635   echo "$ac_err" >&5
4636   echo "configure: failed program was:" >&5
4637   cat conftest.$ac_ext >&5
4638   rm -rf conftest*
4639   eval "ac_cv_header_$ac_safe=no"
4640 fi
4641 rm -f conftest*
4642 fi
4643 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4644   echo "$ac_t""yes" 1>&6
4645     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4646   cat >> confdefs.h <<EOF
4647 #define $ac_tr_hdr 1
4648 EOF
4649  
4650 else
4651   echo "$ac_t""no" 1>&6
4652 fi
4653 done
4654
4655
4656         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
4657                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
4658 echo "configure:4659: checking for main in -lkrb4" >&5
4659 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
4660 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4661   echo $ac_n "(cached) $ac_c" 1>&6
4662 else
4663   ac_save_LIBS="$LIBS"
4664 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
4665 cat > conftest.$ac_ext <<EOF
4666 #line 4667 "configure"
4667 #include "confdefs.h"
4668
4669 int main() {
4670 main()
4671 ; return 0; }
4672 EOF
4673 if { (eval echo configure:4674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4674   rm -rf conftest*
4675   eval "ac_cv_lib_$ac_lib_var=yes"
4676 else
4677   echo "configure: failed program was:" >&5
4678   cat conftest.$ac_ext >&5
4679   rm -rf conftest*
4680   eval "ac_cv_lib_$ac_lib_var=no"
4681 fi
4682 rm -f conftest*
4683 LIBS="$ac_save_LIBS"
4684
4685 fi
4686 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4687   echo "$ac_t""yes" 1>&6
4688   have_k5=yes
4689 else
4690   echo "$ac_t""no" 1>&6
4691 have_k5=no
4692 fi
4693
4694
4695                 if test $have_k5 = yes ; then
4696                         ol_with_kerberos=found
4697                         ol_link_kerberos=yes
4698
4699                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
4700
4701                         LIBS="$KRB_LIBS $LIBS"
4702
4703                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
4704 echo "configure:4705: checking for des_debug in Kerberos libraries" >&5
4705 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
4706   echo $ac_n "(cached) $ac_c" 1>&6
4707 else
4708   
4709                                                                 save_LIBS="$LIBS"
4710                                 LIBS="$KRB_LIBS $LIBS"
4711                                 cat > conftest.$ac_ext <<EOF
4712 #line 4713 "configure"
4713 #include "confdefs.h"
4714
4715 #include <kerberosIV/krb.h>
4716 #include <kerberosIV/des.h>
4717 extern int des_debug;
4718
4719 int main() {
4720
4721 des_debug = 1;
4722
4723 ; return 0; }
4724 EOF
4725 if { (eval echo configure:4726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4726   rm -rf conftest*
4727   ol_cv_var_des_debug=yes
4728 else
4729   echo "configure: failed program was:" >&5
4730   cat conftest.$ac_ext >&5
4731   rm -rf conftest*
4732   ol_cv_var_des_debug=no
4733 fi
4734 rm -f conftest*
4735                                                                 LIBS="$save_LIBS"
4736                         
4737 fi
4738
4739 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
4740
4741                         if test $ol_cv_var_des_debug = yes ; then
4742                                 cat >> confdefs.h <<\EOF
4743 #define HAVE_DES_DEBUG 1
4744 EOF
4745
4746                         fi
4747
4748                         LIBS="$save_LIBS"
4749                 fi
4750         fi
4751 fi
4752
4753 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
4754         for ac_hdr in krb.h des.h
4755 do
4756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4758 echo "configure:4759: checking for $ac_hdr" >&5
4759 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4760   echo $ac_n "(cached) $ac_c" 1>&6
4761 else
4762   cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765 #include <$ac_hdr>
4766 EOF
4767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4768 { (eval echo configure:4769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4770 if test -z "$ac_err"; then
4771   rm -rf conftest*
4772   eval "ac_cv_header_$ac_safe=yes"
4773 else
4774   echo "$ac_err" >&5
4775   echo "configure: failed program was:" >&5
4776   cat conftest.$ac_ext >&5
4777   rm -rf conftest*
4778   eval "ac_cv_header_$ac_safe=no"
4779 fi
4780 rm -f conftest*
4781 fi
4782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4783   echo "$ac_t""yes" 1>&6
4784     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4785   cat >> confdefs.h <<EOF
4786 #define $ac_tr_hdr 1
4787 EOF
4788  
4789 else
4790   echo "$ac_t""no" 1>&6
4791 fi
4792 done
4793
4794
4795         if test $ac_cv_header_krb_h = yes ; then
4796                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
4797 echo "configure:4798: checking for main in -lkrb" >&5
4798 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
4799 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4800   echo $ac_n "(cached) $ac_c" 1>&6
4801 else
4802   ac_save_LIBS="$LIBS"
4803 LIBS="-lkrb -ldes $LIBS"
4804 cat > conftest.$ac_ext <<EOF
4805 #line 4806 "configure"
4806 #include "confdefs.h"
4807
4808 int main() {
4809 main()
4810 ; return 0; }
4811 EOF
4812 if { (eval echo configure:4813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4813   rm -rf conftest*
4814   eval "ac_cv_lib_$ac_lib_var=yes"
4815 else
4816   echo "configure: failed program was:" >&5
4817   cat conftest.$ac_ext >&5
4818   rm -rf conftest*
4819   eval "ac_cv_lib_$ac_lib_var=no"
4820 fi
4821 rm -f conftest*
4822 LIBS="$ac_save_LIBS"
4823
4824 fi
4825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4826   echo "$ac_t""yes" 1>&6
4827   have_k4=yes
4828 else
4829   echo "$ac_t""no" 1>&6
4830 have_k4=no
4831 fi
4832
4833
4834                 if test $have_k4 = yes ; then
4835                         ol_with_kerberos=found
4836                         ol_link_kerberos=yes
4837
4838                         KRB_LIBS="-lkrb -ldes"
4839                 fi
4840         fi
4841 fi
4842
4843 if test $ol_link_kerberos = yes ; then
4844         cat >> confdefs.h <<\EOF
4845 #define HAVE_KERBEROS 1
4846 EOF
4847
4848 fi
4849
4850 ol_link_tls=no
4851 if test $ol_with_tls != no ; then
4852         
4853         for ac_hdr in ssl.h
4854 do
4855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4857 echo "configure:4858: checking for $ac_hdr" >&5
4858 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4859   echo $ac_n "(cached) $ac_c" 1>&6
4860 else
4861   cat > conftest.$ac_ext <<EOF
4862 #line 4863 "configure"
4863 #include "confdefs.h"
4864 #include <$ac_hdr>
4865 EOF
4866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4867 { (eval echo configure:4868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4869 if test -z "$ac_err"; then
4870   rm -rf conftest*
4871   eval "ac_cv_header_$ac_safe=yes"
4872 else
4873   echo "$ac_err" >&5
4874   echo "configure: failed program was:" >&5
4875   cat conftest.$ac_ext >&5
4876   rm -rf conftest*
4877   eval "ac_cv_header_$ac_safe=no"
4878 fi
4879 rm -f conftest*
4880 fi
4881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4882   echo "$ac_t""yes" 1>&6
4883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4884   cat >> confdefs.h <<EOF
4885 #define $ac_tr_hdr 1
4886 EOF
4887  
4888 else
4889   echo "$ac_t""no" 1>&6
4890 fi
4891 done
4892
4893         
4894         if test $ac_cv_header_ssl_h = yes ; then
4895                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
4896 echo "configure:4897: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
4897 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
4898 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4899   echo $ac_n "(cached) $ac_c" 1>&6
4900 else
4901   ac_save_LIBS="$LIBS"
4902 LIBS="-lssl -lcrypto $LIBS"
4903 cat > conftest.$ac_ext <<EOF
4904 #line 4905 "configure"
4905 #include "confdefs.h"
4906 /* Override any gcc2 internal prototype to avoid an error.  */
4907 /* We use char because int might match the return type of a gcc2
4908     builtin and then its argument prototype would still apply.  */
4909 char SSLeay_add_ssl_algorithms();
4910
4911 int main() {
4912 SSLeay_add_ssl_algorithms()
4913 ; return 0; }
4914 EOF
4915 if { (eval echo configure:4916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4916   rm -rf conftest*
4917   eval "ac_cv_lib_$ac_lib_var=yes"
4918 else
4919   echo "configure: failed program was:" >&5
4920   cat conftest.$ac_ext >&5
4921   rm -rf conftest*
4922   eval "ac_cv_lib_$ac_lib_var=no"
4923 fi
4924 rm -f conftest*
4925 LIBS="$ac_save_LIBS"
4926
4927 fi
4928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4929   echo "$ac_t""yes" 1>&6
4930   have_ssleay=yes
4931                         need_rsaref=no
4932 else
4933   echo "$ac_t""no" 1>&6
4934 have_ssleay=no
4935 fi
4936
4937                         
4938                 if test $have_ssleay = no ; then
4939                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4940 echo "configure:4941: checking for ssl3_accept in -lssl" >&5
4941 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4942 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
4943   echo $ac_n "(cached) $ac_c" 1>&6
4944 else
4945   ac_save_LIBS="$LIBS"
4946 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4947 cat > conftest.$ac_ext <<EOF
4948 #line 4949 "configure"
4949 #include "confdefs.h"
4950 /* Override any gcc2 internal prototype to avoid an error.  */
4951 /* We use char because int might match the return type of a gcc2
4952     builtin and then its argument prototype would still apply.  */
4953 char ssl3_accept();
4954
4955 int main() {
4956 ssl3_accept()
4957 ; return 0; }
4958 EOF
4959 if { (eval echo configure:4960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4960   rm -rf conftest*
4961   eval "ac_cv_lib_$ac_lib_var=yes"
4962 else
4963   echo "configure: failed program was:" >&5
4964   cat conftest.$ac_ext >&5
4965   rm -rf conftest*
4966   eval "ac_cv_lib_$ac_lib_var=no"
4967 fi
4968 rm -f conftest*
4969 LIBS="$ac_save_LIBS"
4970
4971 fi
4972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4973   echo "$ac_t""yes" 1>&6
4974   have_ssleay=yes
4975                                 need_rsaref=yes
4976 else
4977   echo "$ac_t""no" 1>&6
4978 have_ssleay=no
4979 fi
4980
4981                 fi
4982
4983                 if test $have_ssleay = yes ; then
4984                         ol_with_tls=found
4985                         ol_link_tls=yes
4986
4987                         cat >> confdefs.h <<\EOF
4988 #define HAVE_SSLEAY 1
4989 EOF
4990
4991
4992                         if test $need_rsaref = yes; then
4993                                 cat >> confdefs.h <<\EOF
4994 #define HAVE_RSAREF 1
4995 EOF
4996
4997
4998                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4999                         else
5000                                 TLS_LIBS="-lssl -lcrypto"
5001                         fi
5002                 fi
5003         fi
5004 fi
5005
5006 if test $ol_link_tls = yes ; then
5007         cat >> confdefs.h <<\EOF
5008 #define HAVE_TLS 1
5009 EOF
5010
5011 fi      
5012
5013 for ac_func in \
5014         ctime_r                 \
5015         gethostbyname_r gethostbyaddr_r \
5016
5017 do
5018 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5019 echo "configure:5020: checking for $ac_func" >&5
5020 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
5021   echo $ac_n "(cached) $ac_c" 1>&6
5022 else
5023   cat > conftest.$ac_ext <<EOF
5024 #line 5025 "configure"
5025 #include "confdefs.h"
5026 /* System header to define __stub macros and hopefully few prototypes,
5027     which can conflict with char $ac_func(); below.  */
5028 #include <assert.h>
5029 /* Override any gcc2 internal prototype to avoid an error.  */
5030 /* We use char because int might match the return type of a gcc2
5031     builtin and then its argument prototype would still apply.  */
5032 char $ac_func();
5033 char (*f)();
5034
5035 int main() {
5036
5037 /* The GNU C library defines this for functions which it implements
5038     to always fail with ENOSYS.  Some functions are actually named
5039     something starting with __ and the normal name is an alias.  */
5040 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5041 choke me
5042 #else
5043 f = $ac_func;
5044 #endif
5045
5046 ; return 0; }
5047 EOF
5048 if { (eval echo configure:5049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5049   rm -rf conftest*
5050   eval "ac_cv_func_$ac_func=yes"
5051 else
5052   echo "configure: failed program was:" >&5
5053   cat conftest.$ac_ext >&5
5054   rm -rf conftest*
5055   eval "ac_cv_func_$ac_func=no"
5056 fi
5057 rm -f conftest*
5058 fi
5059
5060 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5061   echo "$ac_t""yes" 1>&6
5062     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5063   cat >> confdefs.h <<EOF
5064 #define $ac_tr_func 1
5065 EOF
5066  
5067 else
5068   echo "$ac_t""no" 1>&6
5069 fi
5070 done
5071
5072
5073 if test "$ac_cv_func_ctime_r" = no ; then
5074         ol_cv_func_ctime_r_nargs=0
5075 else
5076         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
5077 echo "configure:5078: checking number of arguments of ctime_r" >&5
5078 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
5079   echo $ac_n "(cached) $ac_c" 1>&6
5080 else
5081   cat > conftest.$ac_ext <<EOF
5082 #line 5083 "configure"
5083 #include "confdefs.h"
5084 #include <time.h>
5085 int main() {
5086 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
5087 ; return 0; }
5088 EOF
5089 if { (eval echo configure:5090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5090   rm -rf conftest*
5091   ol_cv_func_ctime_r_nargs=3
5092 else
5093   echo "configure: failed program was:" >&5
5094   cat conftest.$ac_ext >&5
5095   rm -rf conftest*
5096   cat > conftest.$ac_ext <<EOF
5097 #line 5098 "configure"
5098 #include "confdefs.h"
5099 #include <time.h>
5100 int main() {
5101 time_t ti; char *buffer; ctime_r(&ti,buffer);
5102 ; return 0; }
5103 EOF
5104 if { (eval echo configure:5105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5105   rm -rf conftest*
5106   ol_cv_func_ctime_r_nargs=2
5107 else
5108   echo "configure: failed program was:" >&5
5109   cat conftest.$ac_ext >&5
5110   rm -rf conftest*
5111   ol_cv_func_ctime_r_nargs=0
5112 fi
5113 rm -f conftest*
5114 fi
5115 rm -f conftest*
5116 fi
5117
5118 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
5119   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5120     cat >> confdefs.h <<EOF
5121 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5122 EOF
5123
5124   fi
5125
5126 fi
5127
5128 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5129         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5130 echo "configure:5131: checking number of arguments of gethostbyname_r" >&5
5131 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
5132   echo $ac_n "(cached) $ac_c" 1>&6
5133 else
5134   cat > conftest.$ac_ext <<EOF
5135 #line 5136 "configure"
5136 #include "confdefs.h"
5137 #include <sys/types.h>
5138 #include <sys/socket.h>
5139 #include <netinet/in.h>
5140 #include <netdb.h>
5141 #define BUFSIZE (sizeof(struct hostent)+10)
5142 int main() {
5143 struct hostent hent; char buffer[BUFSIZE];
5144                 int bufsize=BUFSIZE;int h_errno;
5145                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5146                         buffer, bufsize, &h_errno);
5147 ; return 0; }
5148 EOF
5149 if { (eval echo configure:5150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5150   rm -rf conftest*
5151   ol_cv_func_gethostbyname_r_nargs=5
5152 else
5153   echo "configure: failed program was:" >&5
5154   cat conftest.$ac_ext >&5
5155   rm -rf conftest*
5156   cat > conftest.$ac_ext <<EOF
5157 #line 5158 "configure"
5158 #include "confdefs.h"
5159 #include <sys/types.h>
5160 #include <sys/socket.h>
5161 #include <netinet/in.h>
5162 #include <netdb.h>
5163 #define BUFSIZE (sizeof(struct hostent)+10)
5164 int main() {
5165 struct hostent hent;struct hostent *rhent;
5166                         char buffer[BUFSIZE];
5167                         int bufsize=BUFSIZE;int h_errno;
5168                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
5169                                 &rhent, &h_errno);
5170 ; return 0; }
5171 EOF
5172 if { (eval echo configure:5173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5173   rm -rf conftest*
5174   ol_cv_func_gethostbyname_r_nargs=6
5175 else
5176   echo "configure: failed program was:" >&5
5177   cat conftest.$ac_ext >&5
5178   rm -rf conftest*
5179   ol_cv_func_gethostbyname_r_nargs=0
5180 fi
5181 rm -f conftest*
5182 fi
5183 rm -f conftest*
5184 fi
5185
5186 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
5187   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
5188         cat >> confdefs.h <<EOF
5189 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
5190 EOF
5191
5192   fi
5193
5194 else
5195         ol_cv_func_gethostbyname_r_nargs=0
5196 fi
5197  
5198 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
5199         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
5200 echo "configure:5201: checking number of arguments of gethostbyaddr_r" >&5
5201 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
5202   echo $ac_n "(cached) $ac_c" 1>&6
5203 else
5204   cat > conftest.$ac_ext <<EOF
5205 #line 5206 "configure"
5206 #include "confdefs.h"
5207 #include <sys/types.h>
5208 #include <sys/socket.h>
5209 #include <netinet/in.h>
5210 #include <netdb.h>
5211 #define BUFSIZE (sizeof(struct hostent)+10)
5212 int main() {
5213 struct hostent hent; char buffer[BUFSIZE]; 
5214             struct in_addr add;
5215             size_t alen=sizeof(struct in_addr);
5216             int bufsize=BUFSIZE;int h_errno;
5217                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
5218                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
5219 ; return 0; }
5220 EOF
5221 if { (eval echo configure:5222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5222   rm -rf conftest*
5223   ol_cv_func_gethostbyaddr_r_nargs=7
5224 else
5225   echo "configure: failed program was:" >&5
5226   cat conftest.$ac_ext >&5
5227   rm -rf conftest*
5228   cat > conftest.$ac_ext <<EOF
5229 #line 5230 "configure"
5230 #include "confdefs.h"
5231 #include <sys/types.h>
5232 #include <sys/socket.h>
5233 #include <netinet/in.h>
5234 #include <netdb.h>
5235 #define BUFSIZE (sizeof(struct hostent)+10)
5236 int main() {
5237 struct hostent hent;
5238                         struct hostent *rhent; char buffer[BUFSIZE]; 
5239                         struct in_addr add;
5240                         size_t alen=sizeof(struct in_addr);
5241                         int bufsize=BUFSIZE;int h_errno;
5242                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
5243                                 alen, AF_INET, &hent, buffer, bufsize, 
5244                                 &rhent, &h_errno);
5245 ; return 0; }
5246 EOF
5247 if { (eval echo configure:5248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5248   rm -rf conftest*
5249   ol_cv_func_gethostbyaddr_r_nargs=8
5250 else
5251   echo "configure: failed program was:" >&5
5252   cat conftest.$ac_ext >&5
5253   rm -rf conftest*
5254   ol_cv_func_gethostbyaddr_r_nargs=0
5255 fi
5256 rm -f conftest*
5257 fi
5258 rm -f conftest*
5259 fi
5260
5261 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
5262   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
5263     cat >> confdefs.h <<EOF
5264 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
5265 EOF
5266
5267   fi
5268
5269 else
5270         ol_cv_func_gethostbyaddr_r_nargs=0
5271 fi
5272
5273 if test "$ac_cv_func_ctime_r" = yes \
5274         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
5275         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
5276         -a "$ac_cv_func_gethostbyname_r" = yes \
5277         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
5278         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
5279         -a "$ac_cv_func_gethostbyaddr_r" = yes \
5280         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
5281         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
5282         ; then
5283  
5284         cat >> confdefs.h <<\EOF
5285 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
5286 EOF
5287
5288 fi
5289
5290 ol_link_threads=no
5291 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5292         -o $ol_with_threads = posix ; then
5293
5294         for ac_hdr in pthread.h sched.h
5295 do
5296 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5297 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5298 echo "configure:5299: checking for $ac_hdr" >&5
5299 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
5300   echo $ac_n "(cached) $ac_c" 1>&6
5301 else
5302   cat > conftest.$ac_ext <<EOF
5303 #line 5304 "configure"
5304 #include "confdefs.h"
5305 #include <$ac_hdr>
5306 EOF
5307 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5308 { (eval echo configure:5309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5309 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5310 if test -z "$ac_err"; then
5311   rm -rf conftest*
5312   eval "ac_cv_header_$ac_safe=yes"
5313 else
5314   echo "$ac_err" >&5
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317   rm -rf conftest*
5318   eval "ac_cv_header_$ac_safe=no"
5319 fi
5320 rm -f conftest*
5321 fi
5322 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5323   echo "$ac_t""yes" 1>&6
5324     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5325   cat >> confdefs.h <<EOF
5326 #define $ac_tr_hdr 1
5327 EOF
5328  
5329 else
5330   echo "$ac_t""no" 1>&6
5331 fi
5332 done
5333
5334
5335         if test $ac_cv_header_pthread_h = yes ; then
5336                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
5337 echo "configure:5338: checking POSIX thread version" >&5
5338 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
5339   echo $ac_n "(cached) $ac_c" 1>&6
5340 else
5341   
5342         cat > conftest.$ac_ext <<EOF
5343 #line 5344 "configure"
5344 #include "confdefs.h"
5345
5346 #               include <pthread.h>
5347                 /* this check could be improved */
5348 #               ifdef PTHREAD_ONCE_INIT
5349                         pthread_version_final
5350 #               endif
5351         
5352 EOF
5353 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5354   egrep "pthread_version_final" >/dev/null 2>&1; then
5355   rm -rf conftest*
5356   ol_pthread_final=yes
5357 else
5358   rm -rf conftest*
5359   ol_pthread_final=no
5360 fi
5361 rm -f conftest*
5362
5363
5364         cat > conftest.$ac_ext <<EOF
5365 #line 5366 "configure"
5366 #include "confdefs.h"
5367
5368 #               include <pthread.h>
5369                 /* this check could be improved */
5370 #               ifdef pthread_once_init
5371                         pthread_version_draft4
5372 #               endif
5373         
5374 EOF
5375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5376   egrep "pthread_version_draft4" >/dev/null 2>&1; then
5377   rm -rf conftest*
5378   ol_pthread_draft4=yes
5379 else
5380   rm -rf conftest*
5381   ol_pthread_draft4=no
5382 fi
5383 rm -f conftest*
5384
5385
5386         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
5387                 ol_cv_pthread_version=final
5388         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
5389                 ol_cv_pthread_version=draft4
5390         else
5391                 ol_cv_pthread_version=unknown
5392         fi
5393
5394 fi
5395
5396 echo "$ac_t""$ol_cv_pthread_version" 1>&6
5397
5398
5399                 if test $ol_cv_pthread_version = final ; then
5400                         cat >> confdefs.h <<\EOF
5401 #define HAVE_PTHREADS_FINAL 1
5402 EOF
5403
5404                 elif test $ol_cv_pthread_version = draft4 ; then
5405                         cat >> confdefs.h <<\EOF
5406 #define HAVE_PTHREADS_D4 1
5407 EOF
5408
5409                 else
5410                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
5411                 fi
5412
5413                 # consider threads found
5414                 ol_with_threads=found
5415
5416                 
5417         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
5418 echo "configure:5419: checking for LinuxThreads pthread.h" >&5
5419 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
5420   echo $ac_n "(cached) $ac_c" 1>&6
5421 else
5422   cat > conftest.$ac_ext <<EOF
5423 #line 5424 "configure"
5424 #include "confdefs.h"
5425 #include <pthread.h>
5426 EOF
5427 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5428   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
5429   rm -rf conftest*
5430   ol_cv_header_linux_threads=yes
5431 else
5432   rm -rf conftest*
5433   ol_cv_header_linux_threads=no
5434 fi
5435 rm -f conftest*
5436
5437                 
5438 fi
5439
5440 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
5441         if test $ol_cv_header_linux_threads = yes; then
5442                 cat >> confdefs.h <<\EOF
5443 #define HAVE_LINUX_THREADS 1
5444 EOF
5445
5446         fi
5447
5448
5449                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
5450                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
5451 echo "configure:5452: checking for pthread_create in default libraries" >&5
5452                 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
5453   echo $ac_n "(cached) $ac_c" 1>&6
5454 else
5455   
5456                 if test "$cross_compiling" = yes; then
5457                         ol_cv_pthread_create=yes
5458 else
5459   cat > conftest.$ac_ext <<EOF
5460 #line 5461 "configure"
5461 #include "confdefs.h"
5462
5463 #include <pthread.h>
5464 #ifndef NULL
5465 #define NULL (void*)0
5466 #endif
5467
5468 static void *task(p)
5469         void *p;
5470 {
5471         return (void *) (p == NULL);
5472 }
5473
5474 int main(argc, argv)
5475         int argc;
5476         char **argv;
5477 {
5478         pthread_t t;
5479         int status;
5480
5481         /* make sure pthread_create() isn't just a stub */
5482 #if HAVE_PTHREADS_D4
5483         status = pthread_create(&t, pthread_attr_default, task, NULL);
5484 #else
5485         status = pthread_create(&t, NULL, task, NULL);
5486 #endif
5487
5488         if( status ) return status;
5489
5490         /* make sure pthread_detach() isn't just a stub */
5491 #if HAVE_PTHREADS_D4
5492         status = pthread_detach( &t );
5493 #else
5494         status = pthread_detach( t );
5495 #endif
5496
5497         if( status ) return status;
5498
5499         return status;
5500 }
5501
5502 EOF
5503 if { (eval echo configure:5504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5504 then
5505   ol_cv_pthread_create=yes
5506 else
5507   echo "configure: failed program was:" >&5
5508   cat conftest.$ac_ext >&5
5509   rm -fr conftest*
5510   ol_cv_pthread_create=no
5511 fi
5512 rm -fr conftest*
5513 fi
5514
5515 fi
5516
5517                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
5518
5519                 if test $ol_cv_pthread_create != no ; then
5520                         ol_link_threads=posix
5521                         ol_link_pthreads=""
5522                 fi
5523                 
5524                 # Pthread try link: -mt (ol_cv_pthread_mt)
5525         if test "$ol_link_threads" = no ; then
5526                 # try -mt
5527                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
5528 echo "configure:5529: checking for pthread link with -mt" >&5
5529 if eval "test \"\${ol_cv_pthread_mt+set}\" = set"; then
5530   echo $ac_n "(cached) $ac_c" 1>&6
5531 else
5532   
5533                         # save the flags
5534                         ol_LIBS="$LIBS"
5535                         LIBS="-mt $LIBS"
5536
5537                         cat > conftest.$ac_ext <<EOF
5538 #line 5539 "configure"
5539 #include "confdefs.h"
5540
5541 #include <pthread.h>
5542 #ifndef NULL
5543 #define NULL (void*)0
5544 #endif
5545
5546 int main() {
5547
5548         pthread_t t;
5549
5550 #if HAVE_PTHREADS_D4
5551         pthread_create(&t, pthread_attr_default, NULL, NULL);
5552         pthread_detach( &t );
5553 #else
5554         pthread_create(&t, NULL, NULL, NULL);
5555         pthread_detach( t );
5556 #endif
5557 #ifdef HAVE_LINUX_THREADS
5558         pthread_kill_other_threads_np();
5559 #endif
5560
5561 ; return 0; }
5562 EOF
5563 if { (eval echo configure:5564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5564   rm -rf conftest*
5565   ol_cv_pthread_mt=yes
5566 else
5567   echo "configure: failed program was:" >&5
5568   cat conftest.$ac_ext >&5
5569   rm -rf conftest*
5570   ol_cv_pthread_mt=no
5571 fi
5572 rm -f conftest*
5573
5574                 # restore the LIBS
5575                 LIBS="$ol_LIBS"
5576                 
5577 fi
5578
5579 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
5580
5581                 if test $ol_cv_pthread_mt = yes ; then
5582                         ol_link_pthreads="-mt"
5583                         ol_link_threads=posix
5584                 fi
5585         fi
5586
5587                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
5588         if test "$ol_link_threads" = no ; then
5589                 # try -kthread
5590                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
5591 echo "configure:5592: checking for pthread link with -kthread" >&5
5592 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
5593   echo $ac_n "(cached) $ac_c" 1>&6
5594 else
5595   
5596                         # save the flags
5597                         ol_LIBS="$LIBS"
5598                         LIBS="-kthread $LIBS"
5599
5600                         cat > conftest.$ac_ext <<EOF
5601 #line 5602 "configure"
5602 #include "confdefs.h"
5603
5604 #include <pthread.h>
5605 #ifndef NULL
5606 #define NULL (void*)0
5607 #endif
5608
5609 int main() {
5610
5611         pthread_t t;
5612
5613 #if HAVE_PTHREADS_D4
5614         pthread_create(&t, pthread_attr_default, NULL, NULL);
5615         pthread_detach( &t );
5616 #else
5617         pthread_create(&t, NULL, NULL, NULL);
5618         pthread_detach( t );
5619 #endif
5620 #ifdef HAVE_LINUX_THREADS
5621         pthread_kill_other_threads_np();
5622 #endif
5623
5624 ; return 0; }
5625 EOF
5626 if { (eval echo configure:5627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5627   rm -rf conftest*
5628   ol_cv_pthread_kthread=yes
5629 else
5630   echo "configure: failed program was:" >&5
5631   cat conftest.$ac_ext >&5
5632   rm -rf conftest*
5633   ol_cv_pthread_kthread=no
5634 fi
5635 rm -f conftest*
5636
5637                 # restore the LIBS
5638                 LIBS="$ol_LIBS"
5639                 
5640 fi
5641
5642 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
5643
5644                 if test $ol_cv_pthread_kthread = yes ; then
5645                         ol_link_pthreads="-kthread"
5646                         ol_link_threads=posix
5647                 fi
5648         fi
5649
5650                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
5651         if test "$ol_link_threads" = no ; then
5652                 # try -pthread
5653                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
5654 echo "configure:5655: checking for pthread link with -pthread" >&5
5655 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
5656   echo $ac_n "(cached) $ac_c" 1>&6
5657 else
5658   
5659                         # save the flags
5660                         ol_LIBS="$LIBS"
5661                         LIBS="-pthread $LIBS"
5662
5663                         cat > conftest.$ac_ext <<EOF
5664 #line 5665 "configure"
5665 #include "confdefs.h"
5666
5667 #include <pthread.h>
5668 #ifndef NULL
5669 #define NULL (void*)0
5670 #endif
5671
5672 int main() {
5673
5674         pthread_t t;
5675
5676 #if HAVE_PTHREADS_D4
5677         pthread_create(&t, pthread_attr_default, NULL, NULL);
5678         pthread_detach( &t );
5679 #else
5680         pthread_create(&t, NULL, NULL, NULL);
5681         pthread_detach( t );
5682 #endif
5683 #ifdef HAVE_LINUX_THREADS
5684         pthread_kill_other_threads_np();
5685 #endif
5686
5687 ; return 0; }
5688 EOF
5689 if { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5690   rm -rf conftest*
5691   ol_cv_pthread_pthread=yes
5692 else
5693   echo "configure: failed program was:" >&5
5694   cat conftest.$ac_ext >&5
5695   rm -rf conftest*
5696   ol_cv_pthread_pthread=no
5697 fi
5698 rm -f conftest*
5699
5700                 # restore the LIBS
5701                 LIBS="$ol_LIBS"
5702                 
5703 fi
5704
5705 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
5706
5707                 if test $ol_cv_pthread_pthread = yes ; then
5708                         ol_link_pthreads="-pthread"
5709                         ol_link_threads=posix
5710                 fi
5711         fi
5712
5713                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
5714         if test "$ol_link_threads" = no ; then
5715                 # try -pthreads
5716                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
5717 echo "configure:5718: checking for pthread link with -pthreads" >&5
5718 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
5719   echo $ac_n "(cached) $ac_c" 1>&6
5720 else
5721   
5722                         # save the flags
5723                         ol_LIBS="$LIBS"
5724                         LIBS="-pthreads $LIBS"
5725
5726                         cat > conftest.$ac_ext <<EOF
5727 #line 5728 "configure"
5728 #include "confdefs.h"
5729
5730 #include <pthread.h>
5731 #ifndef NULL
5732 #define NULL (void*)0
5733 #endif
5734
5735 int main() {
5736
5737         pthread_t t;
5738
5739 #if HAVE_PTHREADS_D4
5740         pthread_create(&t, pthread_attr_default, NULL, NULL);
5741         pthread_detach( &t );
5742 #else
5743         pthread_create(&t, NULL, NULL, NULL);
5744         pthread_detach( t );
5745 #endif
5746 #ifdef HAVE_LINUX_THREADS
5747         pthread_kill_other_threads_np();
5748 #endif
5749
5750 ; return 0; }
5751 EOF
5752 if { (eval echo configure:5753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5753   rm -rf conftest*
5754   ol_cv_pthread_pthreads=yes
5755 else
5756   echo "configure: failed program was:" >&5
5757   cat conftest.$ac_ext >&5
5758   rm -rf conftest*
5759   ol_cv_pthread_pthreads=no
5760 fi
5761 rm -f conftest*
5762
5763                 # restore the LIBS
5764                 LIBS="$ol_LIBS"
5765                 
5766 fi
5767
5768 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
5769
5770                 if test $ol_cv_pthread_pthreads = yes ; then
5771                         ol_link_pthreads="-pthreads"
5772                         ol_link_threads=posix
5773                 fi
5774         fi
5775
5776                 # Pthread try link: -thread (ol_cv_pthread_thread)
5777         if test "$ol_link_threads" = no ; then
5778                 # try -thread
5779                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
5780 echo "configure:5781: checking for pthread link with -thread" >&5
5781 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
5782   echo $ac_n "(cached) $ac_c" 1>&6
5783 else
5784   
5785                         # save the flags
5786                         ol_LIBS="$LIBS"
5787                         LIBS="-thread $LIBS"
5788
5789                         cat > conftest.$ac_ext <<EOF
5790 #line 5791 "configure"
5791 #include "confdefs.h"
5792
5793 #include <pthread.h>
5794 #ifndef NULL
5795 #define NULL (void*)0
5796 #endif
5797
5798 int main() {
5799
5800         pthread_t t;
5801
5802 #if HAVE_PTHREADS_D4
5803         pthread_create(&t, pthread_attr_default, NULL, NULL);
5804         pthread_detach( &t );
5805 #else
5806         pthread_create(&t, NULL, NULL, NULL);
5807         pthread_detach( t );
5808 #endif
5809 #ifdef HAVE_LINUX_THREADS
5810         pthread_kill_other_threads_np();
5811 #endif
5812
5813 ; return 0; }
5814 EOF
5815 if { (eval echo configure:5816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5816   rm -rf conftest*
5817   ol_cv_pthread_thread=yes
5818 else
5819   echo "configure: failed program was:" >&5
5820   cat conftest.$ac_ext >&5
5821   rm -rf conftest*
5822   ol_cv_pthread_thread=no
5823 fi
5824 rm -f conftest*
5825
5826                 # restore the LIBS
5827                 LIBS="$ol_LIBS"
5828                 
5829 fi
5830
5831 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
5832
5833                 if test $ol_cv_pthread_thread = yes ; then
5834                         ol_link_pthreads="-thread"
5835                         ol_link_threads=posix
5836                 fi
5837         fi
5838
5839
5840                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
5841         if test "$ol_link_threads" = no ; then
5842                 # try -lpthread -lmach -lexc -lc_r
5843                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
5844 echo "configure:5845: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
5845 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
5846   echo $ac_n "(cached) $ac_c" 1>&6
5847 else
5848   
5849                         # save the flags
5850                         ol_LIBS="$LIBS"
5851                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
5852
5853                         cat > conftest.$ac_ext <<EOF
5854 #line 5855 "configure"
5855 #include "confdefs.h"
5856
5857 #include <pthread.h>
5858 #ifndef NULL
5859 #define NULL (void*)0
5860 #endif
5861
5862 int main() {
5863
5864         pthread_t t;
5865
5866 #if HAVE_PTHREADS_D4
5867         pthread_create(&t, pthread_attr_default, NULL, NULL);
5868         pthread_detach( &t );
5869 #else
5870         pthread_create(&t, NULL, NULL, NULL);
5871         pthread_detach( t );
5872 #endif
5873 #ifdef HAVE_LINUX_THREADS
5874         pthread_kill_other_threads_np();
5875 #endif
5876
5877 ; return 0; }
5878 EOF
5879 if { (eval echo configure:5880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5880   rm -rf conftest*
5881   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
5882 else
5883   echo "configure: failed program was:" >&5
5884   cat conftest.$ac_ext >&5
5885   rm -rf conftest*
5886   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
5887 fi
5888 rm -f conftest*
5889
5890                 # restore the LIBS
5891                 LIBS="$ol_LIBS"
5892                 
5893 fi
5894
5895 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
5896
5897                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
5898                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
5899                         ol_link_threads=posix
5900                 fi
5901         fi
5902
5903                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
5904         if test "$ol_link_threads" = no ; then
5905                 # try -lpthread -lmach -lexc
5906                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
5907 echo "configure:5908: checking for pthread link with -lpthread -lmach -lexc" >&5
5908 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
5909   echo $ac_n "(cached) $ac_c" 1>&6
5910 else
5911   
5912                         # save the flags
5913                         ol_LIBS="$LIBS"
5914                         LIBS="-lpthread -lmach -lexc $LIBS"
5915
5916                         cat > conftest.$ac_ext <<EOF
5917 #line 5918 "configure"
5918 #include "confdefs.h"
5919
5920 #include <pthread.h>
5921 #ifndef NULL
5922 #define NULL (void*)0
5923 #endif
5924
5925 int main() {
5926
5927         pthread_t t;
5928
5929 #if HAVE_PTHREADS_D4
5930         pthread_create(&t, pthread_attr_default, NULL, NULL);
5931         pthread_detach( &t );
5932 #else
5933         pthread_create(&t, NULL, NULL, NULL);
5934         pthread_detach( t );
5935 #endif
5936 #ifdef HAVE_LINUX_THREADS
5937         pthread_kill_other_threads_np();
5938 #endif
5939
5940 ; return 0; }
5941 EOF
5942 if { (eval echo configure:5943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5943   rm -rf conftest*
5944   ol_cv_pthread_lpthread_lmach_lexc=yes
5945 else
5946   echo "configure: failed program was:" >&5
5947   cat conftest.$ac_ext >&5
5948   rm -rf conftest*
5949   ol_cv_pthread_lpthread_lmach_lexc=no
5950 fi
5951 rm -f conftest*
5952
5953                 # restore the LIBS
5954                 LIBS="$ol_LIBS"
5955                 
5956 fi
5957
5958 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
5959
5960                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
5961                         ol_link_pthreads="-lpthread -lmach -lexc"
5962                         ol_link_threads=posix
5963                 fi
5964         fi
5965
5966
5967                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
5968         if test "$ol_link_threads" = no ; then
5969                 # try -lpthread -Wl,-woff,85
5970                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
5971 echo "configure:5972: checking for pthread link with -lpthread -Wl,-woff,85" >&5
5972 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
5973   echo $ac_n "(cached) $ac_c" 1>&6
5974 else
5975   
5976                         # save the flags
5977                         ol_LIBS="$LIBS"
5978                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
5979
5980                         cat > conftest.$ac_ext <<EOF
5981 #line 5982 "configure"
5982 #include "confdefs.h"
5983
5984 #include <pthread.h>
5985 #ifndef NULL
5986 #define NULL (void*)0
5987 #endif
5988
5989 int main() {
5990
5991         pthread_t t;
5992
5993 #if HAVE_PTHREADS_D4
5994         pthread_create(&t, pthread_attr_default, NULL, NULL);
5995         pthread_detach( &t );
5996 #else
5997         pthread_create(&t, NULL, NULL, NULL);
5998         pthread_detach( t );
5999 #endif
6000 #ifdef HAVE_LINUX_THREADS
6001         pthread_kill_other_threads_np();
6002 #endif
6003
6004 ; return 0; }
6005 EOF
6006 if { (eval echo configure:6007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6007   rm -rf conftest*
6008   ol_cv_pthread_lib_lpthread_woff=yes
6009 else
6010   echo "configure: failed program was:" >&5
6011   cat conftest.$ac_ext >&5
6012   rm -rf conftest*
6013   ol_cv_pthread_lib_lpthread_woff=no
6014 fi
6015 rm -f conftest*
6016
6017                 # restore the LIBS
6018                 LIBS="$ol_LIBS"
6019                 
6020 fi
6021
6022 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
6023
6024                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
6025                         ol_link_pthreads="-lpthread -Wl,-woff,85"
6026                         ol_link_threads=posix
6027                 fi
6028         fi
6029
6030
6031                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
6032         if test "$ol_link_threads" = no ; then
6033                 # try -lpthread
6034                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
6035 echo "configure:6036: checking for pthread link with -lpthread" >&5
6036 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
6037   echo $ac_n "(cached) $ac_c" 1>&6
6038 else
6039   
6040                         # save the flags
6041                         ol_LIBS="$LIBS"
6042                         LIBS="-lpthread $LIBS"
6043
6044                         cat > conftest.$ac_ext <<EOF
6045 #line 6046 "configure"
6046 #include "confdefs.h"
6047
6048 #include <pthread.h>
6049 #ifndef NULL
6050 #define NULL (void*)0
6051 #endif
6052
6053 int main() {
6054
6055         pthread_t t;
6056
6057 #if HAVE_PTHREADS_D4
6058         pthread_create(&t, pthread_attr_default, NULL, NULL);
6059         pthread_detach( &t );
6060 #else
6061         pthread_create(&t, NULL, NULL, NULL);
6062         pthread_detach( t );
6063 #endif
6064 #ifdef HAVE_LINUX_THREADS
6065         pthread_kill_other_threads_np();
6066 #endif
6067
6068 ; return 0; }
6069 EOF
6070 if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6071   rm -rf conftest*
6072   ol_cv_pthread_lpthread=yes
6073 else
6074   echo "configure: failed program was:" >&5
6075   cat conftest.$ac_ext >&5
6076   rm -rf conftest*
6077   ol_cv_pthread_lpthread=no
6078 fi
6079 rm -f conftest*
6080
6081                 # restore the LIBS
6082                 LIBS="$ol_LIBS"
6083                 
6084 fi
6085
6086 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
6087
6088                 if test $ol_cv_pthread_lpthread = yes ; then
6089                         ol_link_pthreads="-lpthread"
6090                         ol_link_threads=posix
6091                 fi
6092         fi
6093
6094                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
6095         if test "$ol_link_threads" = no ; then
6096                 # try -lc_r
6097                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
6098 echo "configure:6099: checking for pthread link with -lc_r" >&5
6099 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
6100   echo $ac_n "(cached) $ac_c" 1>&6
6101 else
6102   
6103                         # save the flags
6104                         ol_LIBS="$LIBS"
6105                         LIBS="-lc_r $LIBS"
6106
6107                         cat > conftest.$ac_ext <<EOF
6108 #line 6109 "configure"
6109 #include "confdefs.h"
6110
6111 #include <pthread.h>
6112 #ifndef NULL
6113 #define NULL (void*)0
6114 #endif
6115
6116 int main() {
6117
6118         pthread_t t;
6119
6120 #if HAVE_PTHREADS_D4
6121         pthread_create(&t, pthread_attr_default, NULL, NULL);
6122         pthread_detach( &t );
6123 #else
6124         pthread_create(&t, NULL, NULL, NULL);
6125         pthread_detach( t );
6126 #endif
6127 #ifdef HAVE_LINUX_THREADS
6128         pthread_kill_other_threads_np();
6129 #endif
6130
6131 ; return 0; }
6132 EOF
6133 if { (eval echo configure:6134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6134   rm -rf conftest*
6135   ol_cv_pthread_lc_r=yes
6136 else
6137   echo "configure: failed program was:" >&5
6138   cat conftest.$ac_ext >&5
6139   rm -rf conftest*
6140   ol_cv_pthread_lc_r=no
6141 fi
6142 rm -f conftest*
6143
6144                 # restore the LIBS
6145                 LIBS="$ol_LIBS"
6146                 
6147 fi
6148
6149 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
6150
6151                 if test $ol_cv_pthread_lc_r = yes ; then
6152                         ol_link_pthreads="-lc_r"
6153                         ol_link_threads=posix
6154                 fi
6155         fi
6156
6157
6158                 # Pthread try link: -threads (ol_cv_pthread_threads)
6159         if test "$ol_link_threads" = no ; then
6160                 # try -threads
6161                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
6162 echo "configure:6163: checking for pthread link with -threads" >&5
6163 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
6164   echo $ac_n "(cached) $ac_c" 1>&6
6165 else
6166   
6167                         # save the flags
6168                         ol_LIBS="$LIBS"
6169                         LIBS="-threads $LIBS"
6170
6171                         cat > conftest.$ac_ext <<EOF
6172 #line 6173 "configure"
6173 #include "confdefs.h"
6174
6175 #include <pthread.h>
6176 #ifndef NULL
6177 #define NULL (void*)0
6178 #endif
6179
6180 int main() {
6181
6182         pthread_t t;
6183
6184 #if HAVE_PTHREADS_D4
6185         pthread_create(&t, pthread_attr_default, NULL, NULL);
6186         pthread_detach( &t );
6187 #else
6188         pthread_create(&t, NULL, NULL, NULL);
6189         pthread_detach( t );
6190 #endif
6191 #ifdef HAVE_LINUX_THREADS
6192         pthread_kill_other_threads_np();
6193 #endif
6194
6195 ; return 0; }
6196 EOF
6197 if { (eval echo configure:6198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6198   rm -rf conftest*
6199   ol_cv_pthread_threads=yes
6200 else
6201   echo "configure: failed program was:" >&5
6202   cat conftest.$ac_ext >&5
6203   rm -rf conftest*
6204   ol_cv_pthread_threads=no
6205 fi
6206 rm -f conftest*
6207
6208                 # restore the LIBS
6209                 LIBS="$ol_LIBS"
6210                 
6211 fi
6212
6213 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
6214
6215                 if test $ol_cv_pthread_threads = yes ; then
6216                         ol_link_pthreads="-threads"
6217                         ol_link_threads=posix
6218                 fi
6219         fi
6220
6221
6222                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
6223         if test "$ol_link_threads" = no ; then
6224                 # try -lpthreads -lmach -lexc -lc_r
6225                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
6226 echo "configure:6227: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
6227 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
6228   echo $ac_n "(cached) $ac_c" 1>&6
6229 else
6230   
6231                         # save the flags
6232                         ol_LIBS="$LIBS"
6233                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
6234
6235                         cat > conftest.$ac_ext <<EOF
6236 #line 6237 "configure"
6237 #include "confdefs.h"
6238
6239 #include <pthread.h>
6240 #ifndef NULL
6241 #define NULL (void*)0
6242 #endif
6243
6244 int main() {
6245
6246         pthread_t t;
6247
6248 #if HAVE_PTHREADS_D4
6249         pthread_create(&t, pthread_attr_default, NULL, NULL);
6250         pthread_detach( &t );
6251 #else
6252         pthread_create(&t, NULL, NULL, NULL);
6253         pthread_detach( t );
6254 #endif
6255 #ifdef HAVE_LINUX_THREADS
6256         pthread_kill_other_threads_np();
6257 #endif
6258
6259 ; return 0; }
6260 EOF
6261 if { (eval echo configure:6262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6262   rm -rf conftest*
6263   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
6264 else
6265   echo "configure: failed program was:" >&5
6266   cat conftest.$ac_ext >&5
6267   rm -rf conftest*
6268   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
6269 fi
6270 rm -f conftest*
6271
6272                 # restore the LIBS
6273                 LIBS="$ol_LIBS"
6274                 
6275 fi
6276
6277 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
6278
6279                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
6280                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
6281                         ol_link_threads=posix
6282                 fi
6283         fi
6284
6285                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
6286         if test "$ol_link_threads" = no ; then
6287                 # try -lpthreads -lmach -lexc
6288                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
6289 echo "configure:6290: checking for pthread link with -lpthreads -lmach -lexc" >&5
6290 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
6291   echo $ac_n "(cached) $ac_c" 1>&6
6292 else
6293   
6294                         # save the flags
6295                         ol_LIBS="$LIBS"
6296                         LIBS="-lpthreads -lmach -lexc $LIBS"
6297
6298                         cat > conftest.$ac_ext <<EOF
6299 #line 6300 "configure"
6300 #include "confdefs.h"
6301
6302 #include <pthread.h>
6303 #ifndef NULL
6304 #define NULL (void*)0
6305 #endif
6306
6307 int main() {
6308
6309         pthread_t t;
6310
6311 #if HAVE_PTHREADS_D4
6312         pthread_create(&t, pthread_attr_default, NULL, NULL);
6313         pthread_detach( &t );
6314 #else
6315         pthread_create(&t, NULL, NULL, NULL);
6316         pthread_detach( t );
6317 #endif
6318 #ifdef HAVE_LINUX_THREADS
6319         pthread_kill_other_threads_np();
6320 #endif
6321
6322 ; return 0; }
6323 EOF
6324 if { (eval echo configure:6325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6325   rm -rf conftest*
6326   ol_cv_pthread_lpthreads_lmach_lexc=yes
6327 else
6328   echo "configure: failed program was:" >&5
6329   cat conftest.$ac_ext >&5
6330   rm -rf conftest*
6331   ol_cv_pthread_lpthreads_lmach_lexc=no
6332 fi
6333 rm -f conftest*
6334
6335                 # restore the LIBS
6336                 LIBS="$ol_LIBS"
6337                 
6338 fi
6339
6340 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
6341
6342                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
6343                         ol_link_pthreads="-lpthreads -lmach -lexc"
6344                         ol_link_threads=posix
6345                 fi
6346         fi
6347
6348                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
6349         if test "$ol_link_threads" = no ; then
6350                 # try -lpthreads -lexc
6351                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
6352 echo "configure:6353: checking for pthread link with -lpthreads -lexc" >&5
6353 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
6354   echo $ac_n "(cached) $ac_c" 1>&6
6355 else
6356   
6357                         # save the flags
6358                         ol_LIBS="$LIBS"
6359                         LIBS="-lpthreads -lexc $LIBS"
6360
6361                         cat > conftest.$ac_ext <<EOF
6362 #line 6363 "configure"
6363 #include "confdefs.h"
6364
6365 #include <pthread.h>
6366 #ifndef NULL
6367 #define NULL (void*)0
6368 #endif
6369
6370 int main() {
6371
6372         pthread_t t;
6373
6374 #if HAVE_PTHREADS_D4
6375         pthread_create(&t, pthread_attr_default, NULL, NULL);
6376         pthread_detach( &t );
6377 #else
6378         pthread_create(&t, NULL, NULL, NULL);
6379         pthread_detach( t );
6380 #endif
6381 #ifdef HAVE_LINUX_THREADS
6382         pthread_kill_other_threads_np();
6383 #endif
6384
6385 ; return 0; }
6386 EOF
6387 if { (eval echo configure:6388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6388   rm -rf conftest*
6389   ol_cv_pthread_lpthreads_lexc=yes
6390 else
6391   echo "configure: failed program was:" >&5
6392   cat conftest.$ac_ext >&5
6393   rm -rf conftest*
6394   ol_cv_pthread_lpthreads_lexc=no
6395 fi
6396 rm -f conftest*
6397
6398                 # restore the LIBS
6399                 LIBS="$ol_LIBS"
6400                 
6401 fi
6402
6403 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
6404
6405                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
6406                         ol_link_pthreads="-lpthreads -lexc"
6407                         ol_link_threads=posix
6408                 fi
6409         fi
6410
6411
6412                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
6413         if test "$ol_link_threads" = no ; then
6414                 # try -lpthreads
6415                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
6416 echo "configure:6417: checking for pthread link with -lpthreads" >&5
6417 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
6418   echo $ac_n "(cached) $ac_c" 1>&6
6419 else
6420   
6421                         # save the flags
6422                         ol_LIBS="$LIBS"
6423                         LIBS="-lpthreads $LIBS"
6424
6425                         cat > conftest.$ac_ext <<EOF
6426 #line 6427 "configure"
6427 #include "confdefs.h"
6428
6429 #include <pthread.h>
6430 #ifndef NULL
6431 #define NULL (void*)0
6432 #endif
6433
6434 int main() {
6435
6436         pthread_t t;
6437
6438 #if HAVE_PTHREADS_D4
6439         pthread_create(&t, pthread_attr_default, NULL, NULL);
6440         pthread_detach( &t );
6441 #else
6442         pthread_create(&t, NULL, NULL, NULL);
6443         pthread_detach( t );
6444 #endif
6445 #ifdef HAVE_LINUX_THREADS
6446         pthread_kill_other_threads_np();
6447 #endif
6448
6449 ; return 0; }
6450 EOF
6451 if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6452   rm -rf conftest*
6453   ol_cv_pthread_lib_lpthreads=yes
6454 else
6455   echo "configure: failed program was:" >&5
6456   cat conftest.$ac_ext >&5
6457   rm -rf conftest*
6458   ol_cv_pthread_lib_lpthreads=no
6459 fi
6460 rm -f conftest*
6461
6462                 # restore the LIBS
6463                 LIBS="$ol_LIBS"
6464                 
6465 fi
6466
6467 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
6468
6469                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
6470                         ol_link_pthreads="-lpthreads"
6471                         ol_link_threads=posix
6472                 fi
6473         fi
6474
6475
6476                 if test $ol_link_threads != no ; then
6477                         cat >> confdefs.h <<\EOF
6478 #define HAVE_PTHREADS 1
6479 EOF
6480
6481
6482                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
6483
6484                                                 save_CPPFLAGS="$CPPFLAGS"
6485                         save_LIBS="$LIBS"
6486                         LIBS="$LTHREAD_LIBS $LIBS"
6487
6488                                                                                                 for ac_func in sched_yield pthread_yield
6489 do
6490 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6491 echo "configure:6492: checking for $ac_func" >&5
6492 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6493   echo $ac_n "(cached) $ac_c" 1>&6
6494 else
6495   cat > conftest.$ac_ext <<EOF
6496 #line 6497 "configure"
6497 #include "confdefs.h"
6498 /* System header to define __stub macros and hopefully few prototypes,
6499     which can conflict with char $ac_func(); below.  */
6500 #include <assert.h>
6501 /* Override any gcc2 internal prototype to avoid an error.  */
6502 /* We use char because int might match the return type of a gcc2
6503     builtin and then its argument prototype would still apply.  */
6504 char $ac_func();
6505 char (*f)();
6506
6507 int main() {
6508
6509 /* The GNU C library defines this for functions which it implements
6510     to always fail with ENOSYS.  Some functions are actually named
6511     something starting with __ and the normal name is an alias.  */
6512 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6513 choke me
6514 #else
6515 f = $ac_func;
6516 #endif
6517
6518 ; return 0; }
6519 EOF
6520 if { (eval echo configure:6521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6521   rm -rf conftest*
6522   eval "ac_cv_func_$ac_func=yes"
6523 else
6524   echo "configure: failed program was:" >&5
6525   cat conftest.$ac_ext >&5
6526   rm -rf conftest*
6527   eval "ac_cv_func_$ac_func=no"
6528 fi
6529 rm -f conftest*
6530 fi
6531
6532 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6533   echo "$ac_t""yes" 1>&6
6534     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6535   cat >> confdefs.h <<EOF
6536 #define $ac_tr_func 1
6537 EOF
6538  
6539 else
6540   echo "$ac_t""no" 1>&6
6541 fi
6542 done
6543
6544
6545                         if test $ac_cv_func_sched_yield = no -a \
6546                                 $ac_cv_func_pthread_yield = no ; then
6547                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
6548 echo "configure:6549: checking for sched_yield in -lrt" >&5
6549 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
6550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6551   echo $ac_n "(cached) $ac_c" 1>&6
6552 else
6553   ac_save_LIBS="$LIBS"
6554 LIBS="-lrt  $LIBS"
6555 cat > conftest.$ac_ext <<EOF
6556 #line 6557 "configure"
6557 #include "confdefs.h"
6558 /* Override any gcc2 internal prototype to avoid an error.  */
6559 /* We use char because int might match the return type of a gcc2
6560     builtin and then its argument prototype would still apply.  */
6561 char sched_yield();
6562
6563 int main() {
6564 sched_yield()
6565 ; return 0; }
6566 EOF
6567 if { (eval echo configure:6568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6568   rm -rf conftest*
6569   eval "ac_cv_lib_$ac_lib_var=yes"
6570 else
6571   echo "configure: failed program was:" >&5
6572   cat conftest.$ac_ext >&5
6573   rm -rf conftest*
6574   eval "ac_cv_lib_$ac_lib_var=no"
6575 fi
6576 rm -f conftest*
6577 LIBS="$ac_save_LIBS"
6578
6579 fi
6580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6581   echo "$ac_t""yes" 1>&6
6582   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
6583                                         cat >> confdefs.h <<\EOF
6584 #define HAVE_SCHED_YIELD 1
6585 EOF
6586
6587                                         ac_cv_func_sched_yield=yes
6588 else
6589   echo "$ac_t""no" 1>&6
6590 ac_cv_func_sched_yield=no
6591 fi
6592
6593                         fi
6594                         if test $ac_cv_func_sched_yield = no -a \
6595                                 $ac_cv_func_pthread_yield = no ; then
6596                                                                                                 for ac_func in thr_yield
6597 do
6598 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6599 echo "configure:6600: checking for $ac_func" >&5
6600 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6601   echo $ac_n "(cached) $ac_c" 1>&6
6602 else
6603   cat > conftest.$ac_ext <<EOF
6604 #line 6605 "configure"
6605 #include "confdefs.h"
6606 /* System header to define __stub macros and hopefully few prototypes,
6607     which can conflict with char $ac_func(); below.  */
6608 #include <assert.h>
6609 /* Override any gcc2 internal prototype to avoid an error.  */
6610 /* We use char because int might match the return type of a gcc2
6611     builtin and then its argument prototype would still apply.  */
6612 char $ac_func();
6613 char (*f)();
6614
6615 int main() {
6616
6617 /* The GNU C library defines this for functions which it implements
6618     to always fail with ENOSYS.  Some functions are actually named
6619     something starting with __ and the normal name is an alias.  */
6620 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6621 choke me
6622 #else
6623 f = $ac_func;
6624 #endif
6625
6626 ; return 0; }
6627 EOF
6628 if { (eval echo configure:6629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6629   rm -rf conftest*
6630   eval "ac_cv_func_$ac_func=yes"
6631 else
6632   echo "configure: failed program was:" >&5
6633   cat conftest.$ac_ext >&5
6634   rm -rf conftest*
6635   eval "ac_cv_func_$ac_func=no"
6636 fi
6637 rm -f conftest*
6638 fi
6639
6640 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6641   echo "$ac_t""yes" 1>&6
6642     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6643   cat >> confdefs.h <<EOF
6644 #define $ac_tr_func 1
6645 EOF
6646  
6647 else
6648   echo "$ac_t""no" 1>&6
6649 fi
6650 done
6651
6652                         fi
6653                         if test $ac_cv_func_sched_yield = no -a \
6654                                 $ac_cv_func_pthread_yield = no -a \
6655                                 "$ac_cv_func_thr_yield" = no ; then
6656                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
6657                         fi
6658
6659                                                 for ac_func in pthread_kill
6660 do
6661 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6662 echo "configure:6663: checking for $ac_func" >&5
6663 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6664   echo $ac_n "(cached) $ac_c" 1>&6
6665 else
6666   cat > conftest.$ac_ext <<EOF
6667 #line 6668 "configure"
6668 #include "confdefs.h"
6669 /* System header to define __stub macros and hopefully few prototypes,
6670     which can conflict with char $ac_func(); below.  */
6671 #include <assert.h>
6672 /* Override any gcc2 internal prototype to avoid an error.  */
6673 /* We use char because int might match the return type of a gcc2
6674     builtin and then its argument prototype would still apply.  */
6675 char $ac_func();
6676 char (*f)();
6677
6678 int main() {
6679
6680 /* The GNU C library defines this for functions which it implements
6681     to always fail with ENOSYS.  Some functions are actually named
6682     something starting with __ and the normal name is an alias.  */
6683 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6684 choke me
6685 #else
6686 f = $ac_func;
6687 #endif
6688
6689 ; return 0; }
6690 EOF
6691 if { (eval echo configure:6692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6692   rm -rf conftest*
6693   eval "ac_cv_func_$ac_func=yes"
6694 else
6695   echo "configure: failed program was:" >&5
6696   cat conftest.$ac_ext >&5
6697   rm -rf conftest*
6698   eval "ac_cv_func_$ac_func=no"
6699 fi
6700 rm -f conftest*
6701 fi
6702
6703 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6704   echo "$ac_t""yes" 1>&6
6705     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6706   cat >> confdefs.h <<EOF
6707 #define $ac_tr_func 1
6708 EOF
6709  
6710 else
6711   echo "$ac_t""no" 1>&6
6712 fi
6713 done
6714
6715
6716                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
6717 echo "configure:6718: checking for pthread_detach with <pthread.h>" >&5
6718 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
6719   echo $ac_n "(cached) $ac_c" 1>&6
6720 else
6721   
6722                                                                 cat > conftest.$ac_ext <<EOF
6723 #line 6724 "configure"
6724 #include "confdefs.h"
6725
6726 #include <pthread.h>
6727 #ifndef NULL
6728 #define NULL (void*)0
6729 #endif
6730
6731 int main() {
6732 pthread_detach(NULL);
6733 ; return 0; }
6734 EOF
6735 if { (eval echo configure:6736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6736   rm -rf conftest*
6737   ol_cv_func_pthread_detach=yes
6738 else
6739   echo "configure: failed program was:" >&5
6740   cat conftest.$ac_ext >&5
6741   rm -rf conftest*
6742   ol_cv_func_pthread_detach=no
6743 fi
6744 rm -f conftest*
6745                         
6746 fi
6747
6748 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
6749
6750                         if test $ol_cv_func_pthread_detach = no ; then
6751                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
6752                         fi
6753
6754                         cat >> confdefs.h <<\EOF
6755 #define HAVE_PTHREAD_DETACH 1
6756 EOF
6757
6758
6759                                                 for ac_func in \
6760                                 pthread_setconcurrency \
6761                                 pthread_getconcurrency \
6762                                 thr_setconcurrency \
6763                                 thr_getconcurrency \
6764                         
6765 do
6766 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6767 echo "configure:6768: checking for $ac_func" >&5
6768 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
6769   echo $ac_n "(cached) $ac_c" 1>&6
6770 else
6771   cat > conftest.$ac_ext <<EOF
6772 #line 6773 "configure"
6773 #include "confdefs.h"
6774 /* System header to define __stub macros and hopefully few prototypes,
6775     which can conflict with char $ac_func(); below.  */
6776 #include <assert.h>
6777 /* Override any gcc2 internal prototype to avoid an error.  */
6778 /* We use char because int might match the return type of a gcc2
6779     builtin and then its argument prototype would still apply.  */
6780 char $ac_func();
6781 char (*f)();
6782
6783 int main() {
6784
6785 /* The GNU C library defines this for functions which it implements
6786     to always fail with ENOSYS.  Some functions are actually named
6787     something starting with __ and the normal name is an alias.  */
6788 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6789 choke me
6790 #else
6791 f = $ac_func;
6792 #endif
6793
6794 ; return 0; }
6795 EOF
6796 if { (eval echo configure:6797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6797   rm -rf conftest*
6798   eval "ac_cv_func_$ac_func=yes"
6799 else
6800   echo "configure: failed program was:" >&5
6801   cat conftest.$ac_ext >&5
6802   rm -rf conftest*
6803   eval "ac_cv_func_$ac_func=no"
6804 fi
6805 rm -f conftest*
6806 fi
6807
6808 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6809   echo "$ac_t""yes" 1>&6
6810     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6811   cat >> confdefs.h <<EOF
6812 #define $ac_tr_func 1
6813 EOF
6814  
6815 else
6816   echo "$ac_t""no" 1>&6
6817 fi
6818 done
6819
6820
6821                         
6822         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
6823 echo "configure:6824: checking for pthread_kill_other_threads_np" >&5
6824 if eval "test \"\${ac_cv_func_pthread_kill_other_threads_np+set}\" = set"; then
6825   echo $ac_n "(cached) $ac_c" 1>&6
6826 else
6827   cat > conftest.$ac_ext <<EOF
6828 #line 6829 "configure"
6829 #include "confdefs.h"
6830 /* System header to define __stub macros and hopefully few prototypes,
6831     which can conflict with char pthread_kill_other_threads_np(); below.  */
6832 #include <assert.h>
6833 /* Override any gcc2 internal prototype to avoid an error.  */
6834 /* We use char because int might match the return type of a gcc2
6835     builtin and then its argument prototype would still apply.  */
6836 char pthread_kill_other_threads_np();
6837 char (*f)();
6838
6839 int main() {
6840
6841 /* The GNU C library defines this for functions which it implements
6842     to always fail with ENOSYS.  Some functions are actually named
6843     something starting with __ and the normal name is an alias.  */
6844 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
6845 choke me
6846 #else
6847 f = pthread_kill_other_threads_np;
6848 #endif
6849
6850 ; return 0; }
6851 EOF
6852 if { (eval echo configure:6853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6853   rm -rf conftest*
6854   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
6855 else
6856   echo "configure: failed program was:" >&5
6857   cat conftest.$ac_ext >&5
6858   rm -rf conftest*
6859   eval "ac_cv_func_pthread_kill_other_threads_np=no"
6860 fi
6861 rm -f conftest*
6862 fi
6863
6864 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
6865   echo "$ac_t""yes" 1>&6
6866   :
6867 else
6868   echo "$ac_t""no" 1>&6
6869 fi
6870
6871         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
6872 echo "configure:6873: checking for LinuxThreads implementation" >&5
6873 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
6874   echo $ac_n "(cached) $ac_c" 1>&6
6875 else
6876   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
6877 fi
6878
6879 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
6880
6881                         
6882         
6883         
6884         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
6885 echo "configure:6886: checking for LinuxThreads consistency" >&5
6886 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
6887   echo $ac_n "(cached) $ac_c" 1>&6
6888 else
6889   
6890                 if test $ol_cv_header_linux_threads = yes -a \
6891                         $ol_cv_sys_linux_threads = yes; then
6892                         ol_cv_linux_threads=yes
6893                 elif test $ol_cv_header_linux_threads = no -a \
6894                         $ol_cv_sys_linux_threads = no; then
6895                         ol_cv_linux_threads=no
6896                 else
6897                         ol_cv_linux_threads=error
6898                 fi
6899         
6900 fi
6901
6902 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6903
6904
6905                         if test $ol_cv_linux_threads = error; then
6906                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
6907                         fi
6908
6909                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
6910 echo "configure:6911: checking if pthread_create() works" >&5
6911                         if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
6912   echo $ac_n "(cached) $ac_c" 1>&6
6913 else
6914   
6915                         if test "$cross_compiling" = yes; then
6916                                 ol_cv_pthread_create_works=yes
6917 else
6918   cat > conftest.$ac_ext <<EOF
6919 #line 6920 "configure"
6920 #include "confdefs.h"
6921
6922 #include <pthread.h>
6923 #ifndef NULL
6924 #define NULL (void*)0
6925 #endif
6926
6927 static void *task(p)
6928         void *p;
6929 {
6930         return (void *) (p == NULL);
6931 }
6932
6933 int main(argc, argv)
6934         int argc;
6935         char **argv;
6936 {
6937         pthread_t t;
6938 #if HAVE_PTHREADS_D4
6939         exit(pthread_create(&t, pthread_attr_default, task, NULL));
6940 #else
6941         exit(pthread_create(&t, NULL, task, NULL));
6942 #endif
6943 }
6944
6945 EOF
6946 if { (eval echo configure:6947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6947 then
6948   ol_cv_pthread_create_works=yes
6949 else
6950   echo "configure: failed program was:" >&5
6951   cat conftest.$ac_ext >&5
6952   rm -fr conftest*
6953   ol_cv_pthread_create_works=no
6954 fi
6955 rm -fr conftest*
6956 fi
6957
6958 fi
6959
6960                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
6961
6962                         if test $ol_cv_pthread_create_works = no ; then
6963                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
6964                         fi
6965
6966                                                 if test $ol_with_yielding_select = auto ; then
6967                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
6968 echo "configure:6969: checking if select yields when using pthreads" >&5
6969                                 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
6970   echo $ac_n "(cached) $ac_c" 1>&6
6971 else
6972   
6973                                 if test "$cross_compiling" = yes; then
6974   
6975                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
6976 else
6977   cat > conftest.$ac_ext <<EOF
6978 #line 6979 "configure"
6979 #include "confdefs.h"
6980
6981 #include <sys/types.h>
6982 #include <sys/time.h>
6983 #include <unistd.h>
6984 #include <pthread.h>
6985 #ifndef NULL
6986 #define NULL (void*) 0
6987 #endif
6988
6989 static int fildes[2];
6990
6991 static void *task(p)
6992         void *p;
6993 {
6994         int i;
6995         struct timeval tv;
6996
6997         fd_set rfds;
6998
6999         tv.tv_sec=10;
7000         tv.tv_usec=0;
7001
7002         FD_ZERO(&rfds);
7003         FD_SET(fildes[0], &rfds);
7004
7005         /* we're not interested in any fds */
7006         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
7007
7008         if(i < 0) {
7009                 perror("select");
7010                 exit(10);
7011         }
7012
7013         exit(0); /* if we exit here, the select blocked the whole process */
7014 }
7015
7016 int main(argc, argv)
7017         int argc;
7018         char **argv;
7019 {
7020         pthread_t t;
7021
7022         /* create a pipe to select */
7023         if(pipe(&fildes[0])) {
7024                 perror("select");
7025                 exit(1);
7026         }
7027
7028 #ifdef HAVE_PTHREAD_SETCONCURRENCY
7029         (void) pthread_setconcurrency(2);
7030 #else
7031 #ifdef HAVE_THR_SETCONCURRENCY
7032         /* Set Solaris LWP concurrency to 2 */
7033         thr_setconcurrency(2);
7034 #endif
7035 #endif
7036
7037 #if HAVE_PTHREADS_D4
7038         pthread_create(&t, pthread_attr_default, task, NULL);
7039 #else
7040         pthread_create(&t, NULL, task, NULL);
7041 #endif
7042
7043 #if HAVE_SCHED_YIELD
7044         sched_yield();  /* make sure task runs first */
7045 #else
7046 #ifdef HAVE_PTHREAD_YIELD
7047         pthread_yield();        /* make sure task runs first */
7048 #endif
7049 #endif
7050
7051         exit(2);
7052 }
7053 EOF
7054 if { (eval echo configure:7055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7055 then
7056   ol_cv_pthread_select_yields=no
7057 else
7058   echo "configure: failed program was:" >&5
7059   cat conftest.$ac_ext >&5
7060   rm -fr conftest*
7061   ol_cv_pthread_select_yields=yes
7062 fi
7063 rm -fr conftest*
7064 fi
7065
7066 fi
7067
7068                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
7069
7070                                 if test $ol_cv_pthread_select_yields = yes ; then
7071                                         ol_with_yielding_select=yes
7072                                 fi
7073                         fi
7074
7075                                                 CPPFLAGS="$save_CPPFLAGS"
7076                         LIBS="$save_LIBS"
7077                 else
7078                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
7079                 fi
7080         fi
7081
7082         if test $ol_with_threads = posix ; then
7083                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
7084         fi
7085 fi
7086
7087 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7088         -o $ol_with_threads = mach ; then
7089
7090                 for ac_hdr in mach/cthreads.h
7091 do
7092 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7093 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7094 echo "configure:7095: checking for $ac_hdr" >&5
7095 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7096   echo $ac_n "(cached) $ac_c" 1>&6
7097 else
7098   cat > conftest.$ac_ext <<EOF
7099 #line 7100 "configure"
7100 #include "confdefs.h"
7101 #include <$ac_hdr>
7102 EOF
7103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7104 { (eval echo configure:7105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7106 if test -z "$ac_err"; then
7107   rm -rf conftest*
7108   eval "ac_cv_header_$ac_safe=yes"
7109 else
7110   echo "$ac_err" >&5
7111   echo "configure: failed program was:" >&5
7112   cat conftest.$ac_ext >&5
7113   rm -rf conftest*
7114   eval "ac_cv_header_$ac_safe=no"
7115 fi
7116 rm -f conftest*
7117 fi
7118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7119   echo "$ac_t""yes" 1>&6
7120     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7121   cat >> confdefs.h <<EOF
7122 #define $ac_tr_hdr 1
7123 EOF
7124  
7125 else
7126   echo "$ac_t""no" 1>&6
7127 fi
7128 done
7129
7130         if test $ac_cv_header_mach_cthreads_h = yes ; then
7131                 ol_with_threads=found
7132
7133                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
7134 echo "configure:7135: checking for cthread_fork" >&5
7135 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
7136   echo $ac_n "(cached) $ac_c" 1>&6
7137 else
7138   cat > conftest.$ac_ext <<EOF
7139 #line 7140 "configure"
7140 #include "confdefs.h"
7141 /* System header to define __stub macros and hopefully few prototypes,
7142     which can conflict with char cthread_fork(); below.  */
7143 #include <assert.h>
7144 /* Override any gcc2 internal prototype to avoid an error.  */
7145 /* We use char because int might match the return type of a gcc2
7146     builtin and then its argument prototype would still apply.  */
7147 char cthread_fork();
7148 char (*f)();
7149
7150 int main() {
7151
7152 /* The GNU C library defines this for functions which it implements
7153     to always fail with ENOSYS.  Some functions are actually named
7154     something starting with __ and the normal name is an alias.  */
7155 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
7156 choke me
7157 #else
7158 f = cthread_fork;
7159 #endif
7160
7161 ; return 0; }
7162 EOF
7163 if { (eval echo configure:7164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7164   rm -rf conftest*
7165   eval "ac_cv_func_cthread_fork=yes"
7166 else
7167   echo "configure: failed program was:" >&5
7168   cat conftest.$ac_ext >&5
7169   rm -rf conftest*
7170   eval "ac_cv_func_cthread_fork=no"
7171 fi
7172 rm -f conftest*
7173 fi
7174
7175 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
7176   echo "$ac_t""yes" 1>&6
7177   ol_link_threads=yes
7178 else
7179   echo "$ac_t""no" 1>&6
7180 fi
7181
7182
7183                 if test $ol_link_threads = no ; then
7184                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
7185 echo "configure:7186: checking for cthread_fork with -all_load" >&5
7186 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
7187   echo $ac_n "(cached) $ac_c" 1>&6
7188 else
7189   
7190                                                                 save_LIBS="$LIBS"
7191                                 LIBS="-all_load $LIBS"
7192                                 cat > conftest.$ac_ext <<EOF
7193 #line 7194 "configure"
7194 #include "confdefs.h"
7195 #include <mach/cthreads.h>
7196 int main() {
7197
7198                                         cthread_fork((void *)0, (void *)0);
7199                                         
7200 ; return 0; }
7201 EOF
7202 if { (eval echo configure:7203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7203   rm -rf conftest*
7204   ol_cv_cthread_all_load=yes
7205 else
7206   echo "configure: failed program was:" >&5
7207   cat conftest.$ac_ext >&5
7208   rm -rf conftest*
7209   ol_cv_cthread_all_load=no
7210 fi
7211 rm -f conftest*
7212                                                                 LIBS="$save_LIBS"
7213                         
7214 fi
7215
7216 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
7217
7218                         if test $ol_cv_cthread_all_load = yes ; then
7219                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
7220                                 ol_link_threads=mach
7221                         fi
7222                 fi
7223
7224                 if test $ol_link_threads != no ; then
7225                         : check for cthread specific functionality here
7226                         cat >> confdefs.h <<\EOF
7227 #define HAVE_MACH_CTHREADS 1
7228 EOF
7229
7230                 else
7231                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
7232                 fi
7233         fi
7234
7235         if test $ol_with_threads = mach ; then
7236                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
7237         fi
7238 fi
7239
7240 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7241         -o $ol_with_threads = lwp ; then
7242
7243                 for ac_hdr in thread.h synch.h
7244 do
7245 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7246 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7247 echo "configure:7248: checking for $ac_hdr" >&5
7248 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7249   echo $ac_n "(cached) $ac_c" 1>&6
7250 else
7251   cat > conftest.$ac_ext <<EOF
7252 #line 7253 "configure"
7253 #include "confdefs.h"
7254 #include <$ac_hdr>
7255 EOF
7256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7257 { (eval echo configure:7258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7259 if test -z "$ac_err"; then
7260   rm -rf conftest*
7261   eval "ac_cv_header_$ac_safe=yes"
7262 else
7263   echo "$ac_err" >&5
7264   echo "configure: failed program was:" >&5
7265   cat conftest.$ac_ext >&5
7266   rm -rf conftest*
7267   eval "ac_cv_header_$ac_safe=no"
7268 fi
7269 rm -f conftest*
7270 fi
7271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7272   echo "$ac_t""yes" 1>&6
7273     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7274   cat >> confdefs.h <<EOF
7275 #define $ac_tr_hdr 1
7276 EOF
7277  
7278 else
7279   echo "$ac_t""no" 1>&6
7280 fi
7281 done
7282
7283         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
7284                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
7285 echo "configure:7286: checking for thr_create in -lthread" >&5
7286 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
7287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7288   echo $ac_n "(cached) $ac_c" 1>&6
7289 else
7290   ac_save_LIBS="$LIBS"
7291 LIBS="-lthread  $LIBS"
7292 cat > conftest.$ac_ext <<EOF
7293 #line 7294 "configure"
7294 #include "confdefs.h"
7295 /* Override any gcc2 internal prototype to avoid an error.  */
7296 /* We use char because int might match the return type of a gcc2
7297     builtin and then its argument prototype would still apply.  */
7298 char thr_create();
7299
7300 int main() {
7301 thr_create()
7302 ; return 0; }
7303 EOF
7304 if { (eval echo configure:7305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7305   rm -rf conftest*
7306   eval "ac_cv_lib_$ac_lib_var=yes"
7307 else
7308   echo "configure: failed program was:" >&5
7309   cat conftest.$ac_ext >&5
7310   rm -rf conftest*
7311   eval "ac_cv_lib_$ac_lib_var=no"
7312 fi
7313 rm -f conftest*
7314 LIBS="$ac_save_LIBS"
7315
7316 fi
7317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7318   echo "$ac_t""yes" 1>&6
7319   have_thr=yes
7320 else
7321   echo "$ac_t""no" 1>&6
7322 have_thr=no
7323 fi
7324
7325
7326                 if test $have_thr = yes ; then
7327                         cat >> confdefs.h <<\EOF
7328 #define HAVE_THR 1
7329 EOF
7330
7331                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
7332                         ol_link_threads=thr
7333
7334                         if test $ol_with_yielding_select = auto ; then
7335                                 ol_with_yielding_select=yes
7336                         fi
7337
7338                                                 for ac_func in \
7339                                 thr_setconcurrency \
7340                                 thr_getconcurrency \
7341                         
7342 do
7343 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7344 echo "configure:7345: checking for $ac_func" >&5
7345 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7346   echo $ac_n "(cached) $ac_c" 1>&6
7347 else
7348   cat > conftest.$ac_ext <<EOF
7349 #line 7350 "configure"
7350 #include "confdefs.h"
7351 /* System header to define __stub macros and hopefully few prototypes,
7352     which can conflict with char $ac_func(); below.  */
7353 #include <assert.h>
7354 /* Override any gcc2 internal prototype to avoid an error.  */
7355 /* We use char because int might match the return type of a gcc2
7356     builtin and then its argument prototype would still apply.  */
7357 char $ac_func();
7358 char (*f)();
7359
7360 int main() {
7361
7362 /* The GNU C library defines this for functions which it implements
7363     to always fail with ENOSYS.  Some functions are actually named
7364     something starting with __ and the normal name is an alias.  */
7365 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7366 choke me
7367 #else
7368 f = $ac_func;
7369 #endif
7370
7371 ; return 0; }
7372 EOF
7373 if { (eval echo configure:7374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7374   rm -rf conftest*
7375   eval "ac_cv_func_$ac_func=yes"
7376 else
7377   echo "configure: failed program was:" >&5
7378   cat conftest.$ac_ext >&5
7379   rm -rf conftest*
7380   eval "ac_cv_func_$ac_func=no"
7381 fi
7382 rm -f conftest*
7383 fi
7384
7385 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7386   echo "$ac_t""yes" 1>&6
7387     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7388   cat >> confdefs.h <<EOF
7389 #define $ac_tr_func 1
7390 EOF
7391  
7392 else
7393   echo "$ac_t""no" 1>&6
7394 fi
7395 done
7396
7397                 fi
7398         fi
7399
7400                 for ac_hdr in lwp/lwp.h
7401 do
7402 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7403 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7404 echo "configure:7405: checking for $ac_hdr" >&5
7405 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7406   echo $ac_n "(cached) $ac_c" 1>&6
7407 else
7408   cat > conftest.$ac_ext <<EOF
7409 #line 7410 "configure"
7410 #include "confdefs.h"
7411 #include <$ac_hdr>
7412 EOF
7413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7414 { (eval echo configure:7415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7416 if test -z "$ac_err"; then
7417   rm -rf conftest*
7418   eval "ac_cv_header_$ac_safe=yes"
7419 else
7420   echo "$ac_err" >&5
7421   echo "configure: failed program was:" >&5
7422   cat conftest.$ac_ext >&5
7423   rm -rf conftest*
7424   eval "ac_cv_header_$ac_safe=no"
7425 fi
7426 rm -f conftest*
7427 fi
7428 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7429   echo "$ac_t""yes" 1>&6
7430     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7431   cat >> confdefs.h <<EOF
7432 #define $ac_tr_hdr 1
7433 EOF
7434  
7435 else
7436   echo "$ac_t""no" 1>&6
7437 fi
7438 done
7439
7440         if test $ac_cv_header_lwp_lwp_h = yes ; then
7441                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
7442 echo "configure:7443: checking for lwp_create in -llwp" >&5
7443 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
7444 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7445   echo $ac_n "(cached) $ac_c" 1>&6
7446 else
7447   ac_save_LIBS="$LIBS"
7448 LIBS="-llwp  $LIBS"
7449 cat > conftest.$ac_ext <<EOF
7450 #line 7451 "configure"
7451 #include "confdefs.h"
7452 /* Override any gcc2 internal prototype to avoid an error.  */
7453 /* We use char because int might match the return type of a gcc2
7454     builtin and then its argument prototype would still apply.  */
7455 char lwp_create();
7456
7457 int main() {
7458 lwp_create()
7459 ; return 0; }
7460 EOF
7461 if { (eval echo configure:7462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7462   rm -rf conftest*
7463   eval "ac_cv_lib_$ac_lib_var=yes"
7464 else
7465   echo "configure: failed program was:" >&5
7466   cat conftest.$ac_ext >&5
7467   rm -rf conftest*
7468   eval "ac_cv_lib_$ac_lib_var=no"
7469 fi
7470 rm -f conftest*
7471 LIBS="$ac_save_LIBS"
7472
7473 fi
7474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7475   echo "$ac_t""yes" 1>&6
7476   have_lwp=yes
7477 else
7478   echo "$ac_t""no" 1>&6
7479 have_lwp=no
7480 fi
7481
7482
7483                 if test $have_lwp = yes ; then
7484                         cat >> confdefs.h <<\EOF
7485 #define HAVE_LWP 1
7486 EOF
7487
7488                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
7489                         ol_link_threads=lwp
7490
7491                         if test $ol_with_yielding_select = auto ; then
7492                                 ol_with_yielding_select=no
7493                         fi
7494                 fi
7495         fi
7496 fi
7497
7498 if test $ol_with_yielding_select = yes ; then
7499         cat >> confdefs.h <<\EOF
7500 #define HAVE_YIELDING_SELECT 1
7501 EOF
7502
7503 fi
7504
7505 if test $ol_with_threads = manual ; then
7506                 ol_link_threads=yes
7507
7508         echo "configure: warning: thread defines and link options must be set manually" 1>&2
7509
7510         for ac_hdr in pthread.h sched.h
7511 do
7512 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7513 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7514 echo "configure:7515: checking for $ac_hdr" >&5
7515 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7516   echo $ac_n "(cached) $ac_c" 1>&6
7517 else
7518   cat > conftest.$ac_ext <<EOF
7519 #line 7520 "configure"
7520 #include "confdefs.h"
7521 #include <$ac_hdr>
7522 EOF
7523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7524 { (eval echo configure:7525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7526 if test -z "$ac_err"; then
7527   rm -rf conftest*
7528   eval "ac_cv_header_$ac_safe=yes"
7529 else
7530   echo "$ac_err" >&5
7531   echo "configure: failed program was:" >&5
7532   cat conftest.$ac_ext >&5
7533   rm -rf conftest*
7534   eval "ac_cv_header_$ac_safe=no"
7535 fi
7536 rm -f conftest*
7537 fi
7538 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7539   echo "$ac_t""yes" 1>&6
7540     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7541   cat >> confdefs.h <<EOF
7542 #define $ac_tr_hdr 1
7543 EOF
7544  
7545 else
7546   echo "$ac_t""no" 1>&6
7547 fi
7548 done
7549
7550         for ac_func in sched_yield pthread_yield
7551 do
7552 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7553 echo "configure:7554: checking for $ac_func" >&5
7554 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
7555   echo $ac_n "(cached) $ac_c" 1>&6
7556 else
7557   cat > conftest.$ac_ext <<EOF
7558 #line 7559 "configure"
7559 #include "confdefs.h"
7560 /* System header to define __stub macros and hopefully few prototypes,
7561     which can conflict with char $ac_func(); below.  */
7562 #include <assert.h>
7563 /* Override any gcc2 internal prototype to avoid an error.  */
7564 /* We use char because int might match the return type of a gcc2
7565     builtin and then its argument prototype would still apply.  */
7566 char $ac_func();
7567 char (*f)();
7568
7569 int main() {
7570
7571 /* The GNU C library defines this for functions which it implements
7572     to always fail with ENOSYS.  Some functions are actually named
7573     something starting with __ and the normal name is an alias.  */
7574 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7575 choke me
7576 #else
7577 f = $ac_func;
7578 #endif
7579
7580 ; return 0; }
7581 EOF
7582 if { (eval echo configure:7583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7583   rm -rf conftest*
7584   eval "ac_cv_func_$ac_func=yes"
7585 else
7586   echo "configure: failed program was:" >&5
7587   cat conftest.$ac_ext >&5
7588   rm -rf conftest*
7589   eval "ac_cv_func_$ac_func=no"
7590 fi
7591 rm -f conftest*
7592 fi
7593
7594 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7595   echo "$ac_t""yes" 1>&6
7596     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7597   cat >> confdefs.h <<EOF
7598 #define $ac_tr_func 1
7599 EOF
7600  
7601 else
7602   echo "$ac_t""no" 1>&6
7603 fi
7604 done
7605
7606         
7607         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7608 echo "configure:7609: checking for LinuxThreads pthread.h" >&5
7609 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
7610   echo $ac_n "(cached) $ac_c" 1>&6
7611 else
7612   cat > conftest.$ac_ext <<EOF
7613 #line 7614 "configure"
7614 #include "confdefs.h"
7615 #include <pthread.h>
7616 EOF
7617 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7618   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7619   rm -rf conftest*
7620   ol_cv_header_linux_threads=yes
7621 else
7622   rm -rf conftest*
7623   ol_cv_header_linux_threads=no
7624 fi
7625 rm -f conftest*
7626
7627                 
7628 fi
7629
7630 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7631         if test $ol_cv_header_linux_threads = yes; then
7632                 cat >> confdefs.h <<\EOF
7633 #define HAVE_LINUX_THREADS 1
7634 EOF
7635
7636         fi
7637
7638
7639         for ac_hdr in mach/cthreads.h
7640 do
7641 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7642 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7643 echo "configure:7644: checking for $ac_hdr" >&5
7644 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7645   echo $ac_n "(cached) $ac_c" 1>&6
7646 else
7647   cat > conftest.$ac_ext <<EOF
7648 #line 7649 "configure"
7649 #include "confdefs.h"
7650 #include <$ac_hdr>
7651 EOF
7652 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7653 { (eval echo configure:7654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7654 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7655 if test -z "$ac_err"; then
7656   rm -rf conftest*
7657   eval "ac_cv_header_$ac_safe=yes"
7658 else
7659   echo "$ac_err" >&5
7660   echo "configure: failed program was:" >&5
7661   cat conftest.$ac_ext >&5
7662   rm -rf conftest*
7663   eval "ac_cv_header_$ac_safe=no"
7664 fi
7665 rm -f conftest*
7666 fi
7667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7668   echo "$ac_t""yes" 1>&6
7669     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7670   cat >> confdefs.h <<EOF
7671 #define $ac_tr_hdr 1
7672 EOF
7673  
7674 else
7675   echo "$ac_t""no" 1>&6
7676 fi
7677 done
7678
7679         for ac_hdr in lwp/lwp.h
7680 do
7681 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7682 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7683 echo "configure:7684: checking for $ac_hdr" >&5
7684 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7685   echo $ac_n "(cached) $ac_c" 1>&6
7686 else
7687   cat > conftest.$ac_ext <<EOF
7688 #line 7689 "configure"
7689 #include "confdefs.h"
7690 #include <$ac_hdr>
7691 EOF
7692 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7693 { (eval echo configure:7694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7694 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7695 if test -z "$ac_err"; then
7696   rm -rf conftest*
7697   eval "ac_cv_header_$ac_safe=yes"
7698 else
7699   echo "$ac_err" >&5
7700   echo "configure: failed program was:" >&5
7701   cat conftest.$ac_ext >&5
7702   rm -rf conftest*
7703   eval "ac_cv_header_$ac_safe=no"
7704 fi
7705 rm -f conftest*
7706 fi
7707 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7708   echo "$ac_t""yes" 1>&6
7709     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7710   cat >> confdefs.h <<EOF
7711 #define $ac_tr_hdr 1
7712 EOF
7713  
7714 else
7715   echo "$ac_t""no" 1>&6
7716 fi
7717 done
7718
7719         for ac_hdr in thread.h synch.h
7720 do
7721 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7722 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7723 echo "configure:7724: checking for $ac_hdr" >&5
7724 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7725   echo $ac_n "(cached) $ac_c" 1>&6
7726 else
7727   cat > conftest.$ac_ext <<EOF
7728 #line 7729 "configure"
7729 #include "confdefs.h"
7730 #include <$ac_hdr>
7731 EOF
7732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7733 { (eval echo configure:7734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7735 if test -z "$ac_err"; then
7736   rm -rf conftest*
7737   eval "ac_cv_header_$ac_safe=yes"
7738 else
7739   echo "$ac_err" >&5
7740   echo "configure: failed program was:" >&5
7741   cat conftest.$ac_ext >&5
7742   rm -rf conftest*
7743   eval "ac_cv_header_$ac_safe=no"
7744 fi
7745 rm -f conftest*
7746 fi
7747 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7748   echo "$ac_t""yes" 1>&6
7749     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7750   cat >> confdefs.h <<EOF
7751 #define $ac_tr_hdr 1
7752 EOF
7753  
7754 else
7755   echo "$ac_t""no" 1>&6
7756 fi
7757 done
7758
7759 fi
7760
7761 if test $ol_link_threads != no ; then  
7762                         cat >> confdefs.h <<\EOF
7763 #define REENTRANT 1
7764 EOF
7765
7766         cat >> confdefs.h <<\EOF
7767 #define _REENTRANT 1
7768 EOF
7769
7770         cat >> confdefs.h <<\EOF
7771 #define THREAD_SAFE 1
7772 EOF
7773
7774         cat >> confdefs.h <<\EOF
7775 #define _THREAD_SAFE 1
7776 EOF
7777
7778         cat >> confdefs.h <<\EOF
7779 #define THREADSAFE 1
7780 EOF
7781
7782         cat >> confdefs.h <<\EOF
7783 #define _THREADSAFE 1
7784 EOF
7785
7786         cat >> confdefs.h <<\EOF
7787 #define _SGI_MP_SOURCE 1
7788 EOF
7789
7790
7791                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
7792 echo "configure:7793: checking for thread specific errno" >&5
7793 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
7794   echo $ac_n "(cached) $ac_c" 1>&6
7795 else
7796   
7797                 cat > conftest.$ac_ext <<EOF
7798 #line 7799 "configure"
7799 #include "confdefs.h"
7800 #include <errno.h>
7801 int main() {
7802 errno = 0;
7803 ; return 0; }
7804 EOF
7805 if { (eval echo configure:7806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7806   rm -rf conftest*
7807   ol_cv_errno_thread_specific=yes
7808 else
7809   echo "configure: failed program was:" >&5
7810   cat conftest.$ac_ext >&5
7811   rm -rf conftest*
7812   ol_cv_errno_thread_specific=no
7813 fi
7814 rm -f conftest*
7815         
7816 fi
7817
7818 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
7819
7820                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
7821 echo "configure:7822: checking for thread specific h_errno" >&5
7822 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
7823   echo $ac_n "(cached) $ac_c" 1>&6
7824 else
7825   
7826                 cat > conftest.$ac_ext <<EOF
7827 #line 7828 "configure"
7828 #include "confdefs.h"
7829 #include <netdb.h>
7830 int main() {
7831 h_errno = 0;
7832 ; return 0; }
7833 EOF
7834 if { (eval echo configure:7835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7835   rm -rf conftest*
7836   ol_cv_h_errno_thread_specific=yes
7837 else
7838   echo "configure: failed program was:" >&5
7839   cat conftest.$ac_ext >&5
7840   rm -rf conftest*
7841   ol_cv_h_errno_thread_specific=no
7842 fi
7843 rm -f conftest*
7844         
7845 fi
7846
7847 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
7848
7849         if test $ol_cv_errno_thread_specific != yes \
7850                 -o $ol_cv_h_errno_thread_specific != yes ; then
7851                 LIBS="$LTHREAD_LIBS $LIBS"
7852                 LTHREAD_LIBS=""
7853         fi
7854
7855 fi  
7856
7857 if test $ol_link_threads = no ; then
7858         if test $ol_with_threads = yes ; then
7859                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
7860         fi
7861
7862         if test $ol_with_threads = auto ; then
7863                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
7864                 ol_with_threads=no
7865         fi
7866
7867         cat >> confdefs.h <<\EOF
7868 #define NO_THREADS 1
7869 EOF
7870
7871         LTHREAD_LIBS=""
7872 fi
7873
7874 if test $ol_link_threads != no ; then
7875         cat >> confdefs.h <<\EOF
7876 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
7877 EOF
7878
7879 fi
7880
7881
7882 ol_link_ldbm=no 
7883 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
7884         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
7885 echo "configure:7886: checking for DB2 library" >&5
7886 if eval "test \"\${ol_cv_lib_db2+set}\" = set"; then
7887   echo $ac_n "(cached) $ac_c" 1>&6
7888 else
7889         ol_LIBS="$LIBS"
7890         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
7891 echo "configure:7892: checking for db_open in -ldb" >&5
7892 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
7893 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7894   echo $ac_n "(cached) $ac_c" 1>&6
7895 else
7896   ac_save_LIBS="$LIBS"
7897 LIBS="-ldb  $LIBS"
7898 cat > conftest.$ac_ext <<EOF
7899 #line 7900 "configure"
7900 #include "confdefs.h"
7901 /* Override any gcc2 internal prototype to avoid an error.  */
7902 /* We use char because int might match the return type of a gcc2
7903     builtin and then its argument prototype would still apply.  */
7904 char db_open();
7905
7906 int main() {
7907 db_open()
7908 ; return 0; }
7909 EOF
7910 if { (eval echo configure:7911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7911   rm -rf conftest*
7912   eval "ac_cv_lib_$ac_lib_var=yes"
7913 else
7914   echo "configure: failed program was:" >&5
7915   cat conftest.$ac_ext >&5
7916   rm -rf conftest*
7917   eval "ac_cv_lib_$ac_lib_var=no"
7918 fi
7919 rm -f conftest*
7920 LIBS="$ac_save_LIBS"
7921
7922 fi
7923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7924   echo "$ac_t""yes" 1>&6
7925   ol_cv_lib_db2=-ldb
7926 else
7927   echo "$ac_t""no" 1>&6
7928 ol_cv_lib_db2=no
7929 fi
7930
7931         LIBS="$ol_LIBS"
7932
7933 fi
7934
7935 echo "$ac_t""$ol_cv_lib_db2" 1>&6
7936
7937 for ac_hdr in db.h
7938 do
7939 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7940 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7941 echo "configure:7942: checking for $ac_hdr" >&5
7942 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
7943   echo $ac_n "(cached) $ac_c" 1>&6
7944 else
7945   cat > conftest.$ac_ext <<EOF
7946 #line 7947 "configure"
7947 #include "confdefs.h"
7948 #include <$ac_hdr>
7949 EOF
7950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7951 { (eval echo configure:7952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7952 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7953 if test -z "$ac_err"; then
7954   rm -rf conftest*
7955   eval "ac_cv_header_$ac_safe=yes"
7956 else
7957   echo "$ac_err" >&5
7958   echo "configure: failed program was:" >&5
7959   cat conftest.$ac_ext >&5
7960   rm -rf conftest*
7961   eval "ac_cv_header_$ac_safe=no"
7962 fi
7963 rm -f conftest*
7964 fi
7965 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7966   echo "$ac_t""yes" 1>&6
7967     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7968   cat >> confdefs.h <<EOF
7969 #define $ac_tr_hdr 1
7970 EOF
7971  
7972 else
7973   echo "$ac_t""no" 1>&6
7974 fi
7975 done
7976
7977 if test $ac_cv_header_db_h = yes ; then
7978         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
7979 echo "configure:7980: checking if db.h is DB2" >&5
7980 if eval "test \"\${ol_cv_header_db2+set}\" = set"; then
7981   echo $ac_n "(cached) $ac_c" 1>&6
7982 else
7983   
7984                 cat > conftest.$ac_ext <<EOF
7985 #line 7986 "configure"
7986 #include "confdefs.h"
7987
7988 #                       include <db.h>
7989                         /* this check could be improved */
7990 #                       ifdef DB_VERSION_MAJOR
7991 #                               if DB_VERSION_MAJOR == 2
7992                                         __db_version_2
7993 #                               endif
7994 #                       endif
7995                 
7996 EOF
7997 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7998   egrep "__db_version_2" >/dev/null 2>&1; then
7999   rm -rf conftest*
8000   ol_cv_header_db2=yes
8001 else
8002   rm -rf conftest*
8003   ol_cv_header_db2=no
8004 fi
8005 rm -f conftest*
8006
8007 fi
8008
8009 echo "$ac_t""$ol_cv_header_db2" 1>&6
8010 else
8011         ol_cv_header_db2=no
8012 fi
8013
8014
8015  
8016  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
8017 echo "configure:8018: checking for Berkeley DB2" >&5
8018 if eval "test \"\${ol_cv_berkeley_db2+set}\" = set"; then
8019   echo $ac_n "(cached) $ac_c" 1>&6
8020 else
8021   
8022         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
8023                 ol_cv_berkeley_db2=no
8024         else
8025                 ol_cv_berkeley_db2=yes
8026         fi
8027
8028 fi
8029
8030 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
8031  if test $ol_cv_berkeley_db2 = yes ; then
8032         cat >> confdefs.h <<\EOF
8033 #define HAVE_BERKELEY_DB2 1
8034 EOF
8035
8036  fi
8037
8038
8039         if test $ol_cv_berkeley_db2 = yes ; then
8040                 ol_link_ldbm=db2
8041                 ol_with_ldbm_api=db2
8042
8043                 if test $ol_with_ldbm_type = hash ; then
8044                         cat >> confdefs.h <<\EOF
8045 #define LDBM_USE_DBHASH 1
8046 EOF
8047
8048                 else
8049                         cat >> confdefs.h <<\EOF
8050 #define LDBM_USE_DBBTREE 1
8051 EOF
8052
8053                 fi
8054
8055                                                 if test $ol_cv_lib_db2 != yes ; then
8056                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
8057                 fi
8058         fi
8059 fi
8060
8061 ol_link_bdb2=no
8062 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
8063         ol_link_bdb2=yes
8064 fi
8065
8066 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
8067         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
8068 echo "configure:8069: checking for Berkeley DB library" >&5
8069 if eval "test \"\${ol_cv_lib_db+set}\" = set"; then
8070   echo $ac_n "(cached) $ac_c" 1>&6
8071 else
8072   
8073         for ac_hdr in db1/db.h
8074 do
8075 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8076 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8077 echo "configure:8078: checking for $ac_hdr" >&5
8078 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8079   echo $ac_n "(cached) $ac_c" 1>&6
8080 else
8081   cat > conftest.$ac_ext <<EOF
8082 #line 8083 "configure"
8083 #include "confdefs.h"
8084 #include <$ac_hdr>
8085 EOF
8086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8087 { (eval echo configure:8088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8089 if test -z "$ac_err"; then
8090   rm -rf conftest*
8091   eval "ac_cv_header_$ac_safe=yes"
8092 else
8093   echo "$ac_err" >&5
8094   echo "configure: failed program was:" >&5
8095   cat conftest.$ac_ext >&5
8096   rm -rf conftest*
8097   eval "ac_cv_header_$ac_safe=no"
8098 fi
8099 rm -f conftest*
8100 fi
8101 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8102   echo "$ac_t""yes" 1>&6
8103     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8104   cat >> confdefs.h <<EOF
8105 #define $ac_tr_hdr 1
8106 EOF
8107  
8108 else
8109   echo "$ac_t""no" 1>&6
8110 fi
8111 done
8112
8113         ol_LIBS="$LIBS"
8114         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
8115 echo "configure:8116: checking for dbopen" >&5
8116 if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
8117   echo $ac_n "(cached) $ac_c" 1>&6
8118 else
8119   cat > conftest.$ac_ext <<EOF
8120 #line 8121 "configure"
8121 #include "confdefs.h"
8122 /* System header to define __stub macros and hopefully few prototypes,
8123     which can conflict with char dbopen(); below.  */
8124 #include <assert.h>
8125 /* Override any gcc2 internal prototype to avoid an error.  */
8126 /* We use char because int might match the return type of a gcc2
8127     builtin and then its argument prototype would still apply.  */
8128 char dbopen();
8129 char (*f)();
8130
8131 int main() {
8132
8133 /* The GNU C library defines this for functions which it implements
8134     to always fail with ENOSYS.  Some functions are actually named
8135     something starting with __ and the normal name is an alias.  */
8136 #if defined (__stub_dbopen) || defined (__stub___dbopen)
8137 choke me
8138 #else
8139 f = dbopen;
8140 #endif
8141
8142 ; return 0; }
8143 EOF
8144 if { (eval echo configure:8145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8145   rm -rf conftest*
8146   eval "ac_cv_func_dbopen=yes"
8147 else
8148   echo "configure: failed program was:" >&5
8149   cat conftest.$ac_ext >&5
8150   rm -rf conftest*
8151   eval "ac_cv_func_dbopen=no"
8152 fi
8153 rm -f conftest*
8154 fi
8155
8156 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
8157   echo "$ac_t""yes" 1>&6
8158   ol_cv_lib_db=yes
8159 else
8160   echo "$ac_t""no" 1>&6
8161
8162                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
8163 echo "configure:8164: checking for dbopen in -ldb1" >&5
8164 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-%__p_%'`
8165 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8166   echo $ac_n "(cached) $ac_c" 1>&6
8167 else
8168   ac_save_LIBS="$LIBS"
8169 LIBS="-ldb1  $LIBS"
8170 cat > conftest.$ac_ext <<EOF
8171 #line 8172 "configure"
8172 #include "confdefs.h"
8173 /* Override any gcc2 internal prototype to avoid an error.  */
8174 /* We use char because int might match the return type of a gcc2
8175     builtin and then its argument prototype would still apply.  */
8176 char dbopen();
8177
8178 int main() {
8179 dbopen()
8180 ; return 0; }
8181 EOF
8182 if { (eval echo configure:8183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8183   rm -rf conftest*
8184   eval "ac_cv_lib_$ac_lib_var=yes"
8185 else
8186   echo "configure: failed program was:" >&5
8187   cat conftest.$ac_ext >&5
8188   rm -rf conftest*
8189   eval "ac_cv_lib_$ac_lib_var=no"
8190 fi
8191 rm -f conftest*
8192 LIBS="$ac_save_LIBS"
8193
8194 fi
8195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8196   echo "$ac_t""yes" 1>&6
8197   ol_cv_lib_db=-ldb1
8198 else
8199   echo "$ac_t""no" 1>&6
8200
8201                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
8202 echo "configure:8203: checking for dbopen in -ldb" >&5
8203 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
8204 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8205   echo $ac_n "(cached) $ac_c" 1>&6
8206 else
8207   ac_save_LIBS="$LIBS"
8208 LIBS="-ldb  $LIBS"
8209 cat > conftest.$ac_ext <<EOF
8210 #line 8211 "configure"
8211 #include "confdefs.h"
8212 /* Override any gcc2 internal prototype to avoid an error.  */
8213 /* We use char because int might match the return type of a gcc2
8214     builtin and then its argument prototype would still apply.  */
8215 char dbopen();
8216
8217 int main() {
8218 dbopen()
8219 ; return 0; }
8220 EOF
8221 if { (eval echo configure:8222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8222   rm -rf conftest*
8223   eval "ac_cv_lib_$ac_lib_var=yes"
8224 else
8225   echo "configure: failed program was:" >&5
8226   cat conftest.$ac_ext >&5
8227   rm -rf conftest*
8228   eval "ac_cv_lib_$ac_lib_var=no"
8229 fi
8230 rm -f conftest*
8231 LIBS="$ac_save_LIBS"
8232
8233 fi
8234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8235   echo "$ac_t""yes" 1>&6
8236   ol_cv_lib_db=-ldb
8237 else
8238   echo "$ac_t""no" 1>&6
8239 ol_cv_lib_db=no
8240 fi
8241
8242                 
8243 fi
8244
8245         
8246 fi
8247
8248         LIBS="$ol_LIBS"
8249
8250 fi
8251
8252 echo "$ac_t""$ol_cv_lib_db" 1>&6
8253
8254
8255 for ac_hdr in db_185.h
8256 do
8257 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8258 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8259 echo "configure:8260: checking for $ac_hdr" >&5
8260 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8261   echo $ac_n "(cached) $ac_c" 1>&6
8262 else
8263   cat > conftest.$ac_ext <<EOF
8264 #line 8265 "configure"
8265 #include "confdefs.h"
8266 #include <$ac_hdr>
8267 EOF
8268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8269 { (eval echo configure:8270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8271 if test -z "$ac_err"; then
8272   rm -rf conftest*
8273   eval "ac_cv_header_$ac_safe=yes"
8274 else
8275   echo "$ac_err" >&5
8276   echo "configure: failed program was:" >&5
8277   cat conftest.$ac_ext >&5
8278   rm -rf conftest*
8279   eval "ac_cv_header_$ac_safe=no"
8280 fi
8281 rm -f conftest*
8282 fi
8283 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8284   echo "$ac_t""yes" 1>&6
8285     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8286   cat >> confdefs.h <<EOF
8287 #define $ac_tr_hdr 1
8288 EOF
8289  
8290 else
8291   echo "$ac_t""no" 1>&6
8292 fi
8293 done
8294
8295 if test "$ol_cv_header_db2" = yes ; then
8296         
8297         ol_cv_header_db=$ac_cv_header_db_185_h
8298 else
8299         ol_cv_header_db=$ac_cv_header_db_h
8300 fi
8301
8302
8303  
8304  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
8305 echo "configure:8306: checking for Berkeley DB" >&5
8306 if eval "test \"\${ol_cv_berkeley_db+set}\" = set"; then
8307   echo $ac_n "(cached) $ac_c" 1>&6
8308 else
8309   
8310         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
8311                 ol_cv_berkeley_db=no
8312         else
8313                 ol_cv_berkeley_db=yes
8314         fi
8315
8316 fi
8317
8318 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
8319  if test $ol_cv_berkeley_db = yes ; then
8320         cat >> confdefs.h <<\EOF
8321 #define HAVE_BERKELEY_DB 1
8322 EOF
8323
8324  fi
8325
8326
8327         if test $ol_cv_berkeley_db = yes ; then
8328                 ol_link_ldbm=db
8329                 ol_with_ldbm_api=db
8330
8331                 if test $ol_with_ldbm_type = hash ; then
8332                         cat >> confdefs.h <<\EOF
8333 #define LDBM_USE_DBHASH 1
8334 EOF
8335
8336                 else
8337                         cat >> confdefs.h <<\EOF
8338 #define LDBM_USE_DBBTREE 1
8339 EOF
8340
8341                 fi
8342
8343                                                 if test $ol_cv_lib_db != yes ; then
8344                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
8345                 fi
8346         fi
8347 fi
8348
8349 if test $ol_with_ldbm_api = manual ; then
8350                 ol_link_ldbm=yes
8351
8352         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
8353
8354         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
8355 do
8356 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8357 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8358 echo "configure:8359: checking for $ac_hdr" >&5
8359 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8360   echo $ac_n "(cached) $ac_c" 1>&6
8361 else
8362   cat > conftest.$ac_ext <<EOF
8363 #line 8364 "configure"
8364 #include "confdefs.h"
8365 #include <$ac_hdr>
8366 EOF
8367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8368 { (eval echo configure:8369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8370 if test -z "$ac_err"; then
8371   rm -rf conftest*
8372   eval "ac_cv_header_$ac_safe=yes"
8373 else
8374   echo "$ac_err" >&5
8375   echo "configure: failed program was:" >&5
8376   cat conftest.$ac_ext >&5
8377   rm -rf conftest*
8378   eval "ac_cv_header_$ac_safe=no"
8379 fi
8380 rm -f conftest*
8381 fi
8382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8383   echo "$ac_t""yes" 1>&6
8384     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8385   cat >> confdefs.h <<EOF
8386 #define $ac_tr_hdr 1
8387 EOF
8388  
8389 else
8390   echo "$ac_t""no" 1>&6
8391 fi
8392 done
8393
8394 fi
8395
8396 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
8397         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
8398         ol_with_ldbm_api=none
8399 fi
8400
8401 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
8402         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
8403 echo "configure:8404: checking for MDBM library" >&5
8404 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
8405   echo $ac_n "(cached) $ac_c" 1>&6
8406 else
8407         ol_LIBS="$LIBS"
8408         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
8409 echo "configure:8410: checking for mdbm_set_chain" >&5
8410 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
8411   echo $ac_n "(cached) $ac_c" 1>&6
8412 else
8413   cat > conftest.$ac_ext <<EOF
8414 #line 8415 "configure"
8415 #include "confdefs.h"
8416 /* System header to define __stub macros and hopefully few prototypes,
8417     which can conflict with char mdbm_set_chain(); below.  */
8418 #include <assert.h>
8419 /* Override any gcc2 internal prototype to avoid an error.  */
8420 /* We use char because int might match the return type of a gcc2
8421     builtin and then its argument prototype would still apply.  */
8422 char mdbm_set_chain();
8423 char (*f)();
8424
8425 int main() {
8426
8427 /* The GNU C library defines this for functions which it implements
8428     to always fail with ENOSYS.  Some functions are actually named
8429     something starting with __ and the normal name is an alias.  */
8430 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
8431 choke me
8432 #else
8433 f = mdbm_set_chain;
8434 #endif
8435
8436 ; return 0; }
8437 EOF
8438 if { (eval echo configure:8439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8439   rm -rf conftest*
8440   eval "ac_cv_func_mdbm_set_chain=yes"
8441 else
8442   echo "configure: failed program was:" >&5
8443   cat conftest.$ac_ext >&5
8444   rm -rf conftest*
8445   eval "ac_cv_func_mdbm_set_chain=no"
8446 fi
8447 rm -f conftest*
8448 fi
8449
8450 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
8451   echo "$ac_t""yes" 1>&6
8452   ol_cv_lib_mdbm=yes
8453 else
8454   echo "$ac_t""no" 1>&6
8455
8456                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
8457 echo "configure:8458: checking for mdbm_set_chain in -lmdbm" >&5
8458 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
8459 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8460   echo $ac_n "(cached) $ac_c" 1>&6
8461 else
8462   ac_save_LIBS="$LIBS"
8463 LIBS="-lmdbm  $LIBS"
8464 cat > conftest.$ac_ext <<EOF
8465 #line 8466 "configure"
8466 #include "confdefs.h"
8467 /* Override any gcc2 internal prototype to avoid an error.  */
8468 /* We use char because int might match the return type of a gcc2
8469     builtin and then its argument prototype would still apply.  */
8470 char mdbm_set_chain();
8471
8472 int main() {
8473 mdbm_set_chain()
8474 ; return 0; }
8475 EOF
8476 if { (eval echo configure:8477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8477   rm -rf conftest*
8478   eval "ac_cv_lib_$ac_lib_var=yes"
8479 else
8480   echo "configure: failed program was:" >&5
8481   cat conftest.$ac_ext >&5
8482   rm -rf conftest*
8483   eval "ac_cv_lib_$ac_lib_var=no"
8484 fi
8485 rm -f conftest*
8486 LIBS="$ac_save_LIBS"
8487
8488 fi
8489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8490   echo "$ac_t""yes" 1>&6
8491   ol_cv_lib_mdbm=-lmdbm
8492 else
8493   echo "$ac_t""no" 1>&6
8494 ol_cv_lib_mdbm=no
8495 fi
8496
8497         
8498 fi
8499
8500         LIBS="$ol_LIBS"
8501
8502 fi
8503
8504 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
8505
8506
8507  for ac_hdr in mdbm.h
8508 do
8509 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8510 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8511 echo "configure:8512: checking for $ac_hdr" >&5
8512 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8513   echo $ac_n "(cached) $ac_c" 1>&6
8514 else
8515   cat > conftest.$ac_ext <<EOF
8516 #line 8517 "configure"
8517 #include "confdefs.h"
8518 #include <$ac_hdr>
8519 EOF
8520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8521 { (eval echo configure:8522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8523 if test -z "$ac_err"; then
8524   rm -rf conftest*
8525   eval "ac_cv_header_$ac_safe=yes"
8526 else
8527   echo "$ac_err" >&5
8528   echo "configure: failed program was:" >&5
8529   cat conftest.$ac_ext >&5
8530   rm -rf conftest*
8531   eval "ac_cv_header_$ac_safe=no"
8532 fi
8533 rm -f conftest*
8534 fi
8535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8536   echo "$ac_t""yes" 1>&6
8537     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8538   cat >> confdefs.h <<EOF
8539 #define $ac_tr_hdr 1
8540 EOF
8541  
8542 else
8543   echo "$ac_t""no" 1>&6
8544 fi
8545 done
8546
8547  echo $ac_n "checking for db""... $ac_c" 1>&6
8548 echo "configure:8549: checking for db" >&5
8549 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
8550   echo $ac_n "(cached) $ac_c" 1>&6
8551 else
8552   
8553         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
8554                 ol_cv_mdbm=no
8555         else
8556                 ol_cv_mdbm=yes
8557         fi
8558
8559 fi
8560
8561 echo "$ac_t""$ol_cv_mdbm" 1>&6
8562  if test $ol_cv_mdbm = yes ; then
8563         cat >> confdefs.h <<\EOF
8564 #define HAVE_MDBM 1
8565 EOF
8566
8567  fi
8568
8569
8570         if test $ol_cv_mdbm = yes ; then
8571                 ol_link_ldbm=mdbm
8572                 ol_with_ldbm_api=mdbm
8573                 if test $ol_cv_lib_mdbm != yes ; then
8574                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
8575                 fi
8576         fi
8577 fi
8578
8579 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
8580         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
8581 echo "configure:8582: checking for GDBM library" >&5
8582 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
8583   echo $ac_n "(cached) $ac_c" 1>&6
8584 else
8585         ol_LIBS="$LIBS"
8586         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
8587 echo "configure:8588: checking for gdbm_open" >&5
8588 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
8589   echo $ac_n "(cached) $ac_c" 1>&6
8590 else
8591   cat > conftest.$ac_ext <<EOF
8592 #line 8593 "configure"
8593 #include "confdefs.h"
8594 /* System header to define __stub macros and hopefully few prototypes,
8595     which can conflict with char gdbm_open(); below.  */
8596 #include <assert.h>
8597 /* Override any gcc2 internal prototype to avoid an error.  */
8598 /* We use char because int might match the return type of a gcc2
8599     builtin and then its argument prototype would still apply.  */
8600 char gdbm_open();
8601 char (*f)();
8602
8603 int main() {
8604
8605 /* The GNU C library defines this for functions which it implements
8606     to always fail with ENOSYS.  Some functions are actually named
8607     something starting with __ and the normal name is an alias.  */
8608 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
8609 choke me
8610 #else
8611 f = gdbm_open;
8612 #endif
8613
8614 ; return 0; }
8615 EOF
8616 if { (eval echo configure:8617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8617   rm -rf conftest*
8618   eval "ac_cv_func_gdbm_open=yes"
8619 else
8620   echo "configure: failed program was:" >&5
8621   cat conftest.$ac_ext >&5
8622   rm -rf conftest*
8623   eval "ac_cv_func_gdbm_open=no"
8624 fi
8625 rm -f conftest*
8626 fi
8627
8628 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
8629   echo "$ac_t""yes" 1>&6
8630   ol_cv_lib_gdbm=yes
8631 else
8632   echo "$ac_t""no" 1>&6
8633
8634                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
8635 echo "configure:8636: checking for gdbm_open in -lgdbm" >&5
8636 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
8637 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8638   echo $ac_n "(cached) $ac_c" 1>&6
8639 else
8640   ac_save_LIBS="$LIBS"
8641 LIBS="-lgdbm  $LIBS"
8642 cat > conftest.$ac_ext <<EOF
8643 #line 8644 "configure"
8644 #include "confdefs.h"
8645 /* Override any gcc2 internal prototype to avoid an error.  */
8646 /* We use char because int might match the return type of a gcc2
8647     builtin and then its argument prototype would still apply.  */
8648 char gdbm_open();
8649
8650 int main() {
8651 gdbm_open()
8652 ; return 0; }
8653 EOF
8654 if { (eval echo configure:8655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8655   rm -rf conftest*
8656   eval "ac_cv_lib_$ac_lib_var=yes"
8657 else
8658   echo "configure: failed program was:" >&5
8659   cat conftest.$ac_ext >&5
8660   rm -rf conftest*
8661   eval "ac_cv_lib_$ac_lib_var=no"
8662 fi
8663 rm -f conftest*
8664 LIBS="$ac_save_LIBS"
8665
8666 fi
8667 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8668   echo "$ac_t""yes" 1>&6
8669   ol_cv_lib_gdbm=-lgdbm
8670 else
8671   echo "$ac_t""no" 1>&6
8672 ol_cv_lib_gdbm=no
8673 fi
8674
8675         
8676 fi
8677
8678         LIBS="$ol_LIBS"
8679
8680 fi
8681
8682 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
8683
8684
8685  for ac_hdr in gdbm.h
8686 do
8687 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8688 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8689 echo "configure:8690: checking for $ac_hdr" >&5
8690 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8691   echo $ac_n "(cached) $ac_c" 1>&6
8692 else
8693   cat > conftest.$ac_ext <<EOF
8694 #line 8695 "configure"
8695 #include "confdefs.h"
8696 #include <$ac_hdr>
8697 EOF
8698 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8699 { (eval echo configure:8700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8700 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8701 if test -z "$ac_err"; then
8702   rm -rf conftest*
8703   eval "ac_cv_header_$ac_safe=yes"
8704 else
8705   echo "$ac_err" >&5
8706   echo "configure: failed program was:" >&5
8707   cat conftest.$ac_ext >&5
8708   rm -rf conftest*
8709   eval "ac_cv_header_$ac_safe=no"
8710 fi
8711 rm -f conftest*
8712 fi
8713 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8714   echo "$ac_t""yes" 1>&6
8715     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8716   cat >> confdefs.h <<EOF
8717 #define $ac_tr_hdr 1
8718 EOF
8719  
8720 else
8721   echo "$ac_t""no" 1>&6
8722 fi
8723 done
8724
8725  echo $ac_n "checking for db""... $ac_c" 1>&6
8726 echo "configure:8727: checking for db" >&5
8727 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
8728   echo $ac_n "(cached) $ac_c" 1>&6
8729 else
8730   
8731         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
8732                 ol_cv_gdbm=no
8733         else
8734                 ol_cv_gdbm=yes
8735         fi
8736
8737 fi
8738
8739 echo "$ac_t""$ol_cv_gdbm" 1>&6
8740  if test $ol_cv_gdbm = yes ; then
8741         cat >> confdefs.h <<\EOF
8742 #define HAVE_GDBM 1
8743 EOF
8744
8745  fi
8746
8747
8748         if test $ol_cv_gdbm = yes ; then
8749                 ol_link_ldbm=gdbm
8750                 ol_with_ldbm_api=gdbm
8751
8752                 if test $ol_cv_lib_gdbm != yes ; then
8753                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
8754                 fi
8755         fi
8756 fi
8757
8758 if test $ol_with_ldbm_api = auto ; then
8759         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
8760 elif test $ol_with_ldbm_api = ndbm ; then
8761         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
8762 echo "configure:8763: checking for NDBM library" >&5
8763 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
8764   echo $ac_n "(cached) $ac_c" 1>&6
8765 else
8766         ol_LIBS="$LIBS"
8767         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
8768 echo "configure:8769: checking for dbm_open" >&5
8769 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
8770   echo $ac_n "(cached) $ac_c" 1>&6
8771 else
8772   cat > conftest.$ac_ext <<EOF
8773 #line 8774 "configure"
8774 #include "confdefs.h"
8775 /* System header to define __stub macros and hopefully few prototypes,
8776     which can conflict with char dbm_open(); below.  */
8777 #include <assert.h>
8778 /* Override any gcc2 internal prototype to avoid an error.  */
8779 /* We use char because int might match the return type of a gcc2
8780     builtin and then its argument prototype would still apply.  */
8781 char dbm_open();
8782 char (*f)();
8783
8784 int main() {
8785
8786 /* The GNU C library defines this for functions which it implements
8787     to always fail with ENOSYS.  Some functions are actually named
8788     something starting with __ and the normal name is an alias.  */
8789 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
8790 choke me
8791 #else
8792 f = dbm_open;
8793 #endif
8794
8795 ; return 0; }
8796 EOF
8797 if { (eval echo configure:8798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8798   rm -rf conftest*
8799   eval "ac_cv_func_dbm_open=yes"
8800 else
8801   echo "configure: failed program was:" >&5
8802   cat conftest.$ac_ext >&5
8803   rm -rf conftest*
8804   eval "ac_cv_func_dbm_open=no"
8805 fi
8806 rm -f conftest*
8807 fi
8808
8809 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
8810   echo "$ac_t""yes" 1>&6
8811   ol_cv_lib_ndbm=yes
8812 else
8813   echo "$ac_t""no" 1>&6
8814
8815                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
8816 echo "configure:8817: checking for dbm_open in -lndbm" >&5
8817 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
8818 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8819   echo $ac_n "(cached) $ac_c" 1>&6
8820 else
8821   ac_save_LIBS="$LIBS"
8822 LIBS="-lndbm  $LIBS"
8823 cat > conftest.$ac_ext <<EOF
8824 #line 8825 "configure"
8825 #include "confdefs.h"
8826 /* Override any gcc2 internal prototype to avoid an error.  */
8827 /* We use char because int might match the return type of a gcc2
8828     builtin and then its argument prototype would still apply.  */
8829 char dbm_open();
8830
8831 int main() {
8832 dbm_open()
8833 ; return 0; }
8834 EOF
8835 if { (eval echo configure:8836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8836   rm -rf conftest*
8837   eval "ac_cv_lib_$ac_lib_var=yes"
8838 else
8839   echo "configure: failed program was:" >&5
8840   cat conftest.$ac_ext >&5
8841   rm -rf conftest*
8842   eval "ac_cv_lib_$ac_lib_var=no"
8843 fi
8844 rm -f conftest*
8845 LIBS="$ac_save_LIBS"
8846
8847 fi
8848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8849   echo "$ac_t""yes" 1>&6
8850   ol_cv_lib_ndbm=-lndbm
8851 else
8852   echo "$ac_t""no" 1>&6
8853
8854                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
8855 echo "configure:8856: checking for dbm_open in -ldbm" >&5
8856 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
8857 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8858   echo $ac_n "(cached) $ac_c" 1>&6
8859 else
8860   ac_save_LIBS="$LIBS"
8861 LIBS="-ldbm  $LIBS"
8862 cat > conftest.$ac_ext <<EOF
8863 #line 8864 "configure"
8864 #include "confdefs.h"
8865 /* Override any gcc2 internal prototype to avoid an error.  */
8866 /* We use char because int might match the return type of a gcc2
8867     builtin and then its argument prototype would still apply.  */
8868 char dbm_open();
8869
8870 int main() {
8871 dbm_open()
8872 ; return 0; }
8873 EOF
8874 if { (eval echo configure:8875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8875   rm -rf conftest*
8876   eval "ac_cv_lib_$ac_lib_var=yes"
8877 else
8878   echo "configure: failed program was:" >&5
8879   cat conftest.$ac_ext >&5
8880   rm -rf conftest*
8881   eval "ac_cv_lib_$ac_lib_var=no"
8882 fi
8883 rm -f conftest*
8884 LIBS="$ac_save_LIBS"
8885
8886 fi
8887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8888   echo "$ac_t""yes" 1>&6
8889   ol_cv_lib_ndbm=-ldbm
8890 else
8891   echo "$ac_t""no" 1>&6
8892 ol_cv_lib_ndbm=no
8893 fi
8894                 
8895 fi
8896
8897         
8898 fi
8899
8900         LIBS="$ol_LIBS"
8901
8902 fi
8903
8904 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
8905
8906
8907  for ac_hdr in ndbm.h
8908 do
8909 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8910 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8911 echo "configure:8912: checking for $ac_hdr" >&5
8912 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8913   echo $ac_n "(cached) $ac_c" 1>&6
8914 else
8915   cat > conftest.$ac_ext <<EOF
8916 #line 8917 "configure"
8917 #include "confdefs.h"
8918 #include <$ac_hdr>
8919 EOF
8920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8921 { (eval echo configure:8922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8922 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8923 if test -z "$ac_err"; then
8924   rm -rf conftest*
8925   eval "ac_cv_header_$ac_safe=yes"
8926 else
8927   echo "$ac_err" >&5
8928   echo "configure: failed program was:" >&5
8929   cat conftest.$ac_ext >&5
8930   rm -rf conftest*
8931   eval "ac_cv_header_$ac_safe=no"
8932 fi
8933 rm -f conftest*
8934 fi
8935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8936   echo "$ac_t""yes" 1>&6
8937     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8938   cat >> confdefs.h <<EOF
8939 #define $ac_tr_hdr 1
8940 EOF
8941  
8942 else
8943   echo "$ac_t""no" 1>&6
8944 fi
8945 done
8946
8947  echo $ac_n "checking for db""... $ac_c" 1>&6
8948 echo "configure:8949: checking for db" >&5
8949 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
8950   echo $ac_n "(cached) $ac_c" 1>&6
8951 else
8952   
8953         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
8954                 ol_cv_ndbm=no
8955         else
8956                 ol_cv_ndbm=yes
8957         fi
8958
8959 fi
8960
8961 echo "$ac_t""$ol_cv_ndbm" 1>&6
8962  if test $ol_cv_ndbm = yes ; then
8963         cat >> confdefs.h <<\EOF
8964 #define HAVE_NDBM 1
8965 EOF
8966
8967  fi
8968
8969
8970         if test $ol_cv_ndbm = yes ; then
8971                 ol_link_ldbm=ndbm
8972                 ol_with_ldbm_api=ndbm
8973
8974                 if test $ol_cv_lib_ndbm != yes ; then
8975                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
8976                 fi
8977         fi
8978 fi
8979
8980 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
8981         echo "configure: warning: could not find suitable LDBM backend" 1>&2
8982         if test $ol_enable_ldbm = yes ; then
8983                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
8984         fi
8985
8986         echo "configure: warning: disabling LDBM" 1>&2
8987         ol_enable_ldbm=no
8988 fi
8989
8990 if test $ol_enable_wrappers != no ; then
8991         for ac_hdr in tcpd.h
8992 do
8993 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8994 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8995 echo "configure:8996: checking for $ac_hdr" >&5
8996 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8997   echo $ac_n "(cached) $ac_c" 1>&6
8998 else
8999   cat > conftest.$ac_ext <<EOF
9000 #line 9001 "configure"
9001 #include "confdefs.h"
9002 #include <$ac_hdr>
9003 EOF
9004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9005 { (eval echo configure:9006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9007 if test -z "$ac_err"; then
9008   rm -rf conftest*
9009   eval "ac_cv_header_$ac_safe=yes"
9010 else
9011   echo "$ac_err" >&5
9012   echo "configure: failed program was:" >&5
9013   cat conftest.$ac_ext >&5
9014   rm -rf conftest*
9015   eval "ac_cv_header_$ac_safe=no"
9016 fi
9017 rm -f conftest*
9018 fi
9019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9020   echo "$ac_t""yes" 1>&6
9021     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9022   cat >> confdefs.h <<EOF
9023 #define $ac_tr_hdr 1
9024 EOF
9025  
9026 else
9027   echo "$ac_t""no" 1>&6
9028 fi
9029 done
9030
9031
9032         if test $ac_cv_header_tcpd_h != yes ; then
9033                 have_wrappers=no
9034         else
9035                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
9036 echo "configure:9037: checking for main in -lwrap" >&5
9037 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
9038 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9039   echo $ac_n "(cached) $ac_c" 1>&6
9040 else
9041   ac_save_LIBS="$LIBS"
9042 LIBS="-lwrap  $LIBS"
9043 cat > conftest.$ac_ext <<EOF
9044 #line 9045 "configure"
9045 #include "confdefs.h"
9046
9047 int main() {
9048 main()
9049 ; return 0; }
9050 EOF
9051 if { (eval echo configure:9052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9052   rm -rf conftest*
9053   eval "ac_cv_lib_$ac_lib_var=yes"
9054 else
9055   echo "configure: failed program was:" >&5
9056   cat conftest.$ac_ext >&5
9057   rm -rf conftest*
9058   eval "ac_cv_lib_$ac_lib_var=no"
9059 fi
9060 rm -f conftest*
9061 LIBS="$ac_save_LIBS"
9062
9063 fi
9064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9065   echo "$ac_t""yes" 1>&6
9066   have_wrappers=yes
9067 else
9068   echo "$ac_t""no" 1>&6
9069 have_wrappers=no
9070 fi
9071
9072         fi
9073
9074         if test $have_wrappers = yes ; then
9075                 cat >> confdefs.h <<\EOF
9076 #define HAVE_TCPD 1
9077 EOF
9078
9079                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
9080
9081                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9082 echo "configure:9083: checking for main in -lnsl" >&5
9083 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
9084 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9085   echo $ac_n "(cached) $ac_c" 1>&6
9086 else
9087   ac_save_LIBS="$LIBS"
9088 LIBS="-lnsl  $LIBS"
9089 cat > conftest.$ac_ext <<EOF
9090 #line 9091 "configure"
9091 #include "confdefs.h"
9092
9093 int main() {
9094 main()
9095 ; return 0; }
9096 EOF
9097 if { (eval echo configure:9098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9098   rm -rf conftest*
9099   eval "ac_cv_lib_$ac_lib_var=yes"
9100 else
9101   echo "configure: failed program was:" >&5
9102   cat conftest.$ac_ext >&5
9103   rm -rf conftest*
9104   eval "ac_cv_lib_$ac_lib_var=no"
9105 fi
9106 rm -f conftest*
9107 LIBS="$ac_save_LIBS"
9108
9109 fi
9110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9111   echo "$ac_t""yes" 1>&6
9112     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9113     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9114   cat >> confdefs.h <<EOF
9115 #define $ac_tr_lib 1
9116 EOF
9117
9118   LIBS="-lnsl $LIBS"
9119
9120 else
9121   echo "$ac_t""no" 1>&6
9122 fi
9123
9124         else
9125                 echo "configure: warning: could not find -lwrap" 1>&2
9126                 if test $ol_enable_wrappers = yes ; then
9127                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
9128                 fi
9129
9130                 echo "configure: warning: disabling wrappers support" 1>&2
9131                 ol_enable_wrappers=no
9132         fi
9133 fi
9134
9135 if test $ol_enable_syslog != no ; then
9136         echo $ac_n "checking for openlog""... $ac_c" 1>&6
9137 echo "configure:9138: checking for openlog" >&5
9138 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
9139   echo $ac_n "(cached) $ac_c" 1>&6
9140 else
9141   cat > conftest.$ac_ext <<EOF
9142 #line 9143 "configure"
9143 #include "confdefs.h"
9144 /* System header to define __stub macros and hopefully few prototypes,
9145     which can conflict with char openlog(); below.  */
9146 #include <assert.h>
9147 /* Override any gcc2 internal prototype to avoid an error.  */
9148 /* We use char because int might match the return type of a gcc2
9149     builtin and then its argument prototype would still apply.  */
9150 char openlog();
9151 char (*f)();
9152
9153 int main() {
9154
9155 /* The GNU C library defines this for functions which it implements
9156     to always fail with ENOSYS.  Some functions are actually named
9157     something starting with __ and the normal name is an alias.  */
9158 #if defined (__stub_openlog) || defined (__stub___openlog)
9159 choke me
9160 #else
9161 f = openlog;
9162 #endif
9163
9164 ; return 0; }
9165 EOF
9166 if { (eval echo configure:9167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9167   rm -rf conftest*
9168   eval "ac_cv_func_openlog=yes"
9169 else
9170   echo "configure: failed program was:" >&5
9171   cat conftest.$ac_ext >&5
9172   rm -rf conftest*
9173   eval "ac_cv_func_openlog=no"
9174 fi
9175 rm -f conftest*
9176 fi
9177
9178 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
9179   echo "$ac_t""yes" 1>&6
9180   :
9181 else
9182   echo "$ac_t""no" 1>&6
9183 fi
9184
9185         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
9186                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
9187         fi
9188         ol_enable_syslog=$ac_cv_func_openlog
9189 fi
9190
9191 if test $ol_enable_dmalloc != no ; then
9192         for ac_hdr in dmalloc.h
9193 do
9194 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9195 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9196 echo "configure:9197: checking for $ac_hdr" >&5
9197 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9198   echo $ac_n "(cached) $ac_c" 1>&6
9199 else
9200   cat > conftest.$ac_ext <<EOF
9201 #line 9202 "configure"
9202 #include "confdefs.h"
9203 #include <$ac_hdr>
9204 EOF
9205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9206 { (eval echo configure:9207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9208 if test -z "$ac_err"; then
9209   rm -rf conftest*
9210   eval "ac_cv_header_$ac_safe=yes"
9211 else
9212   echo "$ac_err" >&5
9213   echo "configure: failed program was:" >&5
9214   cat conftest.$ac_ext >&5
9215   rm -rf conftest*
9216   eval "ac_cv_header_$ac_safe=no"
9217 fi
9218 rm -f conftest*
9219 fi
9220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9221   echo "$ac_t""yes" 1>&6
9222     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9223   cat >> confdefs.h <<EOF
9224 #define $ac_tr_hdr 1
9225 EOF
9226  
9227 else
9228   echo "$ac_t""no" 1>&6
9229 fi
9230 done
9231
9232         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
9233 echo "configure:9234: checking for dmalloc_shutdown in -ldmalloc" >&5
9234 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
9235 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9236   echo $ac_n "(cached) $ac_c" 1>&6
9237 else
9238   ac_save_LIBS="$LIBS"
9239 LIBS="-ldmalloc  $LIBS"
9240 cat > conftest.$ac_ext <<EOF
9241 #line 9242 "configure"
9242 #include "confdefs.h"
9243 /* Override any gcc2 internal prototype to avoid an error.  */
9244 /* We use char because int might match the return type of a gcc2
9245     builtin and then its argument prototype would still apply.  */
9246 char dmalloc_shutdown();
9247
9248 int main() {
9249 dmalloc_shutdown()
9250 ; return 0; }
9251 EOF
9252 if { (eval echo configure:9253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9253   rm -rf conftest*
9254   eval "ac_cv_lib_$ac_lib_var=yes"
9255 else
9256   echo "configure: failed program was:" >&5
9257   cat conftest.$ac_ext >&5
9258   rm -rf conftest*
9259   eval "ac_cv_lib_$ac_lib_var=no"
9260 fi
9261 rm -f conftest*
9262 LIBS="$ac_save_LIBS"
9263
9264 fi
9265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9266   echo "$ac_t""yes" 1>&6
9267     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9268     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9269   cat >> confdefs.h <<EOF
9270 #define $ac_tr_lib 1
9271 EOF
9272
9273   LIBS="-ldmalloc $LIBS"
9274
9275 else
9276   echo "$ac_t""no" 1>&6
9277 fi
9278
9279 fi
9280
9281 if test $ol_enable_tcl != no ; then
9282         for ac_hdr in tcl.h
9283 do
9284 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9285 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9286 echo "configure:9287: checking for $ac_hdr" >&5
9287 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9288   echo $ac_n "(cached) $ac_c" 1>&6
9289 else
9290   cat > conftest.$ac_ext <<EOF
9291 #line 9292 "configure"
9292 #include "confdefs.h"
9293 #include <$ac_hdr>
9294 EOF
9295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9296 { (eval echo configure:9297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9298 if test -z "$ac_err"; then
9299   rm -rf conftest*
9300   eval "ac_cv_header_$ac_safe=yes"
9301 else
9302   echo "$ac_err" >&5
9303   echo "configure: failed program was:" >&5
9304   cat conftest.$ac_ext >&5
9305   rm -rf conftest*
9306   eval "ac_cv_header_$ac_safe=no"
9307 fi
9308 rm -f conftest*
9309 fi
9310 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9311   echo "$ac_t""yes" 1>&6
9312     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9313   cat >> confdefs.h <<EOF
9314 #define $ac_tr_hdr 1
9315 EOF
9316  
9317 else
9318   echo "$ac_t""no" 1>&6
9319 fi
9320 done
9321
9322
9323         if test $ac_cv_header_tcl_h != yes ; then
9324                 have_tcl=no
9325         else
9326                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
9327 echo "configure:9328: checking for main in -ltcl" >&5
9328 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
9329 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9330   echo $ac_n "(cached) $ac_c" 1>&6
9331 else
9332   ac_save_LIBS="$LIBS"
9333 LIBS="-ltcl  $LIBS"
9334 cat > conftest.$ac_ext <<EOF
9335 #line 9336 "configure"
9336 #include "confdefs.h"
9337
9338 int main() {
9339 main()
9340 ; return 0; }
9341 EOF
9342 if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9343   rm -rf conftest*
9344   eval "ac_cv_lib_$ac_lib_var=yes"
9345 else
9346   echo "configure: failed program was:" >&5
9347   cat conftest.$ac_ext >&5
9348   rm -rf conftest*
9349   eval "ac_cv_lib_$ac_lib_var=no"
9350 fi
9351 rm -f conftest*
9352 LIBS="$ac_save_LIBS"
9353
9354 fi
9355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9356   echo "$ac_t""yes" 1>&6
9357   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
9358 else
9359   echo "$ac_t""no" 1>&6
9360 have_tcl=no
9361 fi
9362
9363
9364                 if test $have_tcl != yes; then
9365                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
9366 echo "configure:9367: checking for main in -ltcl7.6" >&5
9367 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
9368 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9369   echo $ac_n "(cached) $ac_c" 1>&6
9370 else
9371   ac_save_LIBS="$LIBS"
9372 LIBS="-ltcl7.6  $LIBS"
9373 cat > conftest.$ac_ext <<EOF
9374 #line 9375 "configure"
9375 #include "confdefs.h"
9376
9377 int main() {
9378 main()
9379 ; return 0; }
9380 EOF
9381 if { (eval echo configure:9382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9382   rm -rf conftest*
9383   eval "ac_cv_lib_$ac_lib_var=yes"
9384 else
9385   echo "configure: failed program was:" >&5
9386   cat conftest.$ac_ext >&5
9387   rm -rf conftest*
9388   eval "ac_cv_lib_$ac_lib_var=no"
9389 fi
9390 rm -f conftest*
9391 LIBS="$ac_save_LIBS"
9392
9393 fi
9394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9395   echo "$ac_t""yes" 1>&6
9396   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
9397 else
9398   echo "$ac_t""no" 1>&6
9399 have_tcl=no
9400 fi
9401
9402                 fi
9403
9404                 if test $have_tcl != yes; then
9405                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
9406 echo "configure:9407: checking for main in -ltcl8.0" >&5
9407 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
9408 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9409   echo $ac_n "(cached) $ac_c" 1>&6
9410 else
9411   ac_save_LIBS="$LIBS"
9412 LIBS="-ltcl8.0  $LIBS"
9413 cat > conftest.$ac_ext <<EOF
9414 #line 9415 "configure"
9415 #include "confdefs.h"
9416
9417 int main() {
9418 main()
9419 ; return 0; }
9420 EOF
9421 if { (eval echo configure:9422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9422   rm -rf conftest*
9423   eval "ac_cv_lib_$ac_lib_var=yes"
9424 else
9425   echo "configure: failed program was:" >&5
9426   cat conftest.$ac_ext >&5
9427   rm -rf conftest*
9428   eval "ac_cv_lib_$ac_lib_var=no"
9429 fi
9430 rm -f conftest*
9431 LIBS="$ac_save_LIBS"
9432
9433 fi
9434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9435   echo "$ac_t""yes" 1>&6
9436   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
9437 else
9438   echo "$ac_t""no" 1>&6
9439 have_tcl=no
9440 fi
9441
9442                 fi
9443         fi
9444
9445         if test $have_tcl != yes ; then
9446                 echo "configure: warning: could not find -ltcl" 1>&2
9447                 if test $ol_enable_tcl = yes ; then
9448                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
9449                 fi
9450
9451                 ol_enable_tcl=no
9452         fi
9453 fi
9454
9455 # ud needs termcap (should insert check here)
9456 ol_link_termcap=no
9457 for ac_hdr in termcap.h ncurses.h
9458 do
9459 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9460 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9461 echo "configure:9462: checking for $ac_hdr" >&5
9462 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9463   echo $ac_n "(cached) $ac_c" 1>&6
9464 else
9465   cat > conftest.$ac_ext <<EOF
9466 #line 9467 "configure"
9467 #include "confdefs.h"
9468 #include <$ac_hdr>
9469 EOF
9470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9471 { (eval echo configure:9472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9473 if test -z "$ac_err"; then
9474   rm -rf conftest*
9475   eval "ac_cv_header_$ac_safe=yes"
9476 else
9477   echo "$ac_err" >&5
9478   echo "configure: failed program was:" >&5
9479   cat conftest.$ac_ext >&5
9480   rm -rf conftest*
9481   eval "ac_cv_header_$ac_safe=no"
9482 fi
9483 rm -f conftest*
9484 fi
9485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9486   echo "$ac_t""yes" 1>&6
9487     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9488   cat >> confdefs.h <<EOF
9489 #define $ac_tr_hdr 1
9490 EOF
9491  
9492 else
9493   echo "$ac_t""no" 1>&6
9494 fi
9495 done
9496
9497
9498 if test $ol_link_termcap = no ; then
9499         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
9500 echo "configure:9501: checking for tputs in -ltermcap" >&5
9501 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
9502 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9503   echo $ac_n "(cached) $ac_c" 1>&6
9504 else
9505   ac_save_LIBS="$LIBS"
9506 LIBS="-ltermcap  $LIBS"
9507 cat > conftest.$ac_ext <<EOF
9508 #line 9509 "configure"
9509 #include "confdefs.h"
9510 /* Override any gcc2 internal prototype to avoid an error.  */
9511 /* We use char because int might match the return type of a gcc2
9512     builtin and then its argument prototype would still apply.  */
9513 char tputs();
9514
9515 int main() {
9516 tputs()
9517 ; return 0; }
9518 EOF
9519 if { (eval echo configure:9520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9520   rm -rf conftest*
9521   eval "ac_cv_lib_$ac_lib_var=yes"
9522 else
9523   echo "configure: failed program was:" >&5
9524   cat conftest.$ac_ext >&5
9525   rm -rf conftest*
9526   eval "ac_cv_lib_$ac_lib_var=no"
9527 fi
9528 rm -f conftest*
9529 LIBS="$ac_save_LIBS"
9530
9531 fi
9532 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9533   echo "$ac_t""yes" 1>&6
9534   have_termcap=yes
9535 else
9536   echo "$ac_t""no" 1>&6
9537 have_termcap=no
9538 fi
9539
9540         if test $have_termcap = yes ; then
9541                 cat >> confdefs.h <<\EOF
9542 #define HAVE_TERMCAP 1
9543 EOF
9544
9545                 ol_link_termcap=yes
9546                 TERMCAP_LIBS=-ltermcap
9547         fi
9548 fi
9549
9550 if test $ol_link_termcap = no ; then
9551         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
9552 echo "configure:9553: checking for initscr in -lncurses" >&5
9553 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
9554 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9555   echo $ac_n "(cached) $ac_c" 1>&6
9556 else
9557   ac_save_LIBS="$LIBS"
9558 LIBS="-lncurses  $LIBS"
9559 cat > conftest.$ac_ext <<EOF
9560 #line 9561 "configure"
9561 #include "confdefs.h"
9562 /* Override any gcc2 internal prototype to avoid an error.  */
9563 /* We use char because int might match the return type of a gcc2
9564     builtin and then its argument prototype would still apply.  */
9565 char initscr();
9566
9567 int main() {
9568 initscr()
9569 ; return 0; }
9570 EOF
9571 if { (eval echo configure:9572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9572   rm -rf conftest*
9573   eval "ac_cv_lib_$ac_lib_var=yes"
9574 else
9575   echo "configure: failed program was:" >&5
9576   cat conftest.$ac_ext >&5
9577   rm -rf conftest*
9578   eval "ac_cv_lib_$ac_lib_var=no"
9579 fi
9580 rm -f conftest*
9581 LIBS="$ac_save_LIBS"
9582
9583 fi
9584 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9585   echo "$ac_t""yes" 1>&6
9586   have_ncurses=yes
9587 else
9588   echo "$ac_t""no" 1>&6
9589 have_ncurses=no
9590 fi
9591
9592         if test $have_ncurses = yes ; then
9593                 cat >> confdefs.h <<\EOF
9594 #define HAVE_NCURSES 1
9595 EOF
9596
9597                 ol_link_termcap=yes
9598                 TERMCAP_LIBS=-lncurses
9599         fi
9600 fi
9601
9602 if test $ol_link_termcap = no ; then
9603         cat >> confdefs.h <<\EOF
9604 #define NO_TERMCAP 1
9605 EOF
9606
9607         TERMCAP_LIBS=
9608 fi
9609
9610 ol_link_readline=no
9611 if test $ol_with_readline != no ; then
9612         for ac_hdr in readline/readline.h readline/history.h
9613 do
9614 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9615 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9616 echo "configure:9617: checking for $ac_hdr" >&5
9617 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9618   echo $ac_n "(cached) $ac_c" 1>&6
9619 else
9620   cat > conftest.$ac_ext <<EOF
9621 #line 9622 "configure"
9622 #include "confdefs.h"
9623 #include <$ac_hdr>
9624 EOF
9625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9626 { (eval echo configure:9627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9628 if test -z "$ac_err"; then
9629   rm -rf conftest*
9630   eval "ac_cv_header_$ac_safe=yes"
9631 else
9632   echo "$ac_err" >&5
9633   echo "configure: failed program was:" >&5
9634   cat conftest.$ac_ext >&5
9635   rm -rf conftest*
9636   eval "ac_cv_header_$ac_safe=no"
9637 fi
9638 rm -f conftest*
9639 fi
9640 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9641   echo "$ac_t""yes" 1>&6
9642     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9643   cat >> confdefs.h <<EOF
9644 #define $ac_tr_hdr 1
9645 EOF
9646  
9647 else
9648   echo "$ac_t""no" 1>&6
9649 fi
9650 done
9651
9652
9653         if test $ac_cv_header_readline_readline_h = yes ; then
9654                 save_LIBS="$LIBS"
9655                 LIBS="$TERMCAP_LIBS $LIBS"
9656                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
9657 echo "configure:9658: checking for readline in -lreadline" >&5
9658 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
9659 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9660   echo $ac_n "(cached) $ac_c" 1>&6
9661 else
9662   ac_save_LIBS="$LIBS"
9663 LIBS="-lreadline  $LIBS"
9664 cat > conftest.$ac_ext <<EOF
9665 #line 9666 "configure"
9666 #include "confdefs.h"
9667 /* Override any gcc2 internal prototype to avoid an error.  */
9668 /* We use char because int might match the return type of a gcc2
9669     builtin and then its argument prototype would still apply.  */
9670 char readline();
9671
9672 int main() {
9673 readline()
9674 ; return 0; }
9675 EOF
9676 if { (eval echo configure:9677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9677   rm -rf conftest*
9678   eval "ac_cv_lib_$ac_lib_var=yes"
9679 else
9680   echo "configure: failed program was:" >&5
9681   cat conftest.$ac_ext >&5
9682   rm -rf conftest*
9683   eval "ac_cv_lib_$ac_lib_var=no"
9684 fi
9685 rm -f conftest*
9686 LIBS="$ac_save_LIBS"
9687
9688 fi
9689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9690   echo "$ac_t""yes" 1>&6
9691   have_readline=yes
9692 else
9693   echo "$ac_t""no" 1>&6
9694 have_readline=no
9695 fi
9696
9697                 LIBS="$save_LIBS"
9698                         
9699                 if test $have_readline = yes ; then
9700                         ol_with_readline=found
9701                         ol_link_readline=yes
9702
9703                         READLINE_LIBS="-lreadline"
9704                 fi
9705         fi
9706 fi
9707
9708 if test $ol_link_readline = yes ; then
9709         cat >> confdefs.h <<\EOF
9710 #define HAVE_READLINE 1
9711 EOF
9712
9713 fi
9714
9715
9716 # FreeBSD (and others) have crypt(3) in -lcrypt
9717 if test $ol_enable_crypt != no ; then
9718         echo $ac_n "checking for crypt""... $ac_c" 1>&6
9719 echo "configure:9720: checking for crypt" >&5
9720 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
9721   echo $ac_n "(cached) $ac_c" 1>&6
9722 else
9723   cat > conftest.$ac_ext <<EOF
9724 #line 9725 "configure"
9725 #include "confdefs.h"
9726 /* System header to define __stub macros and hopefully few prototypes,
9727     which can conflict with char crypt(); below.  */
9728 #include <assert.h>
9729 /* Override any gcc2 internal prototype to avoid an error.  */
9730 /* We use char because int might match the return type of a gcc2
9731     builtin and then its argument prototype would still apply.  */
9732 char crypt();
9733 char (*f)();
9734
9735 int main() {
9736
9737 /* The GNU C library defines this for functions which it implements
9738     to always fail with ENOSYS.  Some functions are actually named
9739     something starting with __ and the normal name is an alias.  */
9740 #if defined (__stub_crypt) || defined (__stub___crypt)
9741 choke me
9742 #else
9743 f = crypt;
9744 #endif
9745
9746 ; return 0; }
9747 EOF
9748 if { (eval echo configure:9749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9749   rm -rf conftest*
9750   eval "ac_cv_func_crypt=yes"
9751 else
9752   echo "configure: failed program was:" >&5
9753   cat conftest.$ac_ext >&5
9754   rm -rf conftest*
9755   eval "ac_cv_func_crypt=no"
9756 fi
9757 rm -f conftest*
9758 fi
9759
9760 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
9761   echo "$ac_t""yes" 1>&6
9762   have_crypt=yes
9763 else
9764   echo "$ac_t""no" 1>&6
9765
9766                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9767 echo "configure:9768: checking for crypt in -lcrypt" >&5
9768 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9769 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9770   echo $ac_n "(cached) $ac_c" 1>&6
9771 else
9772   ac_save_LIBS="$LIBS"
9773 LIBS="-lcrypt  $LIBS"
9774 cat > conftest.$ac_ext <<EOF
9775 #line 9776 "configure"
9776 #include "confdefs.h"
9777 /* Override any gcc2 internal prototype to avoid an error.  */
9778 /* We use char because int might match the return type of a gcc2
9779     builtin and then its argument prototype would still apply.  */
9780 char crypt();
9781
9782 int main() {
9783 crypt()
9784 ; return 0; }
9785 EOF
9786 if { (eval echo configure:9787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9787   rm -rf conftest*
9788   eval "ac_cv_lib_$ac_lib_var=yes"
9789 else
9790   echo "configure: failed program was:" >&5
9791   cat conftest.$ac_ext >&5
9792   rm -rf conftest*
9793   eval "ac_cv_lib_$ac_lib_var=no"
9794 fi
9795 rm -f conftest*
9796 LIBS="$ac_save_LIBS"
9797
9798 fi
9799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9800   echo "$ac_t""yes" 1>&6
9801   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
9802                         have_crypt=yes
9803 else
9804   echo "$ac_t""no" 1>&6
9805 have_crypt=no
9806 fi
9807
9808 fi
9809
9810
9811         if test $have_crypt = yes ; then
9812                 cat >> confdefs.h <<\EOF
9813 #define HAVE_CRYPT 1
9814 EOF
9815
9816         else
9817                 echo "configure: warning: could not find crypt" 1>&2
9818                 if test $ol_enable_crypt = yes ; then
9819                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
9820                 fi
9821
9822                 echo "configure: warning: disabling crypt support" 1>&2
9823                 ol_enable_crypt=no
9824         fi
9825 fi
9826
9827 # FreeBSD (and others) have setproctitle(3) in -lutil
9828 if test $ol_enable_proctitle != no ; then
9829         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
9830 echo "configure:9831: checking for setproctitle" >&5
9831 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
9832   echo $ac_n "(cached) $ac_c" 1>&6
9833 else
9834   cat > conftest.$ac_ext <<EOF
9835 #line 9836 "configure"
9836 #include "confdefs.h"
9837 /* System header to define __stub macros and hopefully few prototypes,
9838     which can conflict with char setproctitle(); below.  */
9839 #include <assert.h>
9840 /* Override any gcc2 internal prototype to avoid an error.  */
9841 /* We use char because int might match the return type of a gcc2
9842     builtin and then its argument prototype would still apply.  */
9843 char setproctitle();
9844 char (*f)();
9845
9846 int main() {
9847
9848 /* The GNU C library defines this for functions which it implements
9849     to always fail with ENOSYS.  Some functions are actually named
9850     something starting with __ and the normal name is an alias.  */
9851 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
9852 choke me
9853 #else
9854 f = setproctitle;
9855 #endif
9856
9857 ; return 0; }
9858 EOF
9859 if { (eval echo configure:9860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9860   rm -rf conftest*
9861   eval "ac_cv_func_setproctitle=yes"
9862 else
9863   echo "configure: failed program was:" >&5
9864   cat conftest.$ac_ext >&5
9865   rm -rf conftest*
9866   eval "ac_cv_func_setproctitle=no"
9867 fi
9868 rm -f conftest*
9869 fi
9870
9871 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
9872   echo "$ac_t""yes" 1>&6
9873   have_setproctitle=yes
9874 else
9875   echo "$ac_t""no" 1>&6
9876
9877                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
9878 echo "configure:9879: checking for setproctitle in -lutil" >&5
9879 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
9880 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9881   echo $ac_n "(cached) $ac_c" 1>&6
9882 else
9883   ac_save_LIBS="$LIBS"
9884 LIBS="-lutil  $LIBS"
9885 cat > conftest.$ac_ext <<EOF
9886 #line 9887 "configure"
9887 #include "confdefs.h"
9888 /* Override any gcc2 internal prototype to avoid an error.  */
9889 /* We use char because int might match the return type of a gcc2
9890     builtin and then its argument prototype would still apply.  */
9891 char setproctitle();
9892
9893 int main() {
9894 setproctitle()
9895 ; return 0; }
9896 EOF
9897 if { (eval echo configure:9898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9898   rm -rf conftest*
9899   eval "ac_cv_lib_$ac_lib_var=yes"
9900 else
9901   echo "configure: failed program was:" >&5
9902   cat conftest.$ac_ext >&5
9903   rm -rf conftest*
9904   eval "ac_cv_lib_$ac_lib_var=no"
9905 fi
9906 rm -f conftest*
9907 LIBS="$ac_save_LIBS"
9908
9909 fi
9910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9911   echo "$ac_t""yes" 1>&6
9912   have_setproctitle=yes
9913                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
9914 else
9915   echo "$ac_t""no" 1>&6
9916 have_setproctitle=no
9917                         LIBOBJS="$LIBOBJS setproctitle.o"
9918 fi
9919
9920 fi
9921
9922
9923         if test $have_setproctitle = yes ; then
9924                 cat >> confdefs.h <<\EOF
9925 #define HAVE_SETPROCTITLE 1
9926 EOF
9927
9928         fi
9929 fi
9930
9931 # test for EBCDIC
9932 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
9933 echo "configure:9934: checking for EBCDIC" >&5
9934 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
9935   echo $ac_n "(cached) $ac_c" 1>&6
9936 else
9937   
9938         cat > conftest.$ac_ext <<EOF
9939 #line 9940 "configure"
9940 #include "confdefs.h"
9941
9942 #if !('M' == 0xd4)
9943 #include <__ASCII__/generate_error.h>
9944 #endif
9945
9946 EOF
9947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9948 { (eval echo configure:9949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9950 if test -z "$ac_err"; then
9951   rm -rf conftest*
9952   ol_cv_cpp_ebcdic=yes
9953 else
9954   echo "$ac_err" >&5
9955   echo "configure: failed program was:" >&5
9956   cat conftest.$ac_ext >&5
9957   rm -rf conftest*
9958   ol_cv_cpp_ebcdic=no
9959 fi
9960 rm -f conftest*
9961 fi
9962
9963 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
9964 if test $ol_cv_cpp_ebcdic = yes ; then
9965         cat >> confdefs.h <<\EOF
9966 #define HAVE_EBCDIC 1
9967 EOF
9968
9969 fi
9970
9971 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9972 echo "configure:9973: checking for ANSI C header files" >&5
9973 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
9974   echo $ac_n "(cached) $ac_c" 1>&6
9975 else
9976   cat > conftest.$ac_ext <<EOF
9977 #line 9978 "configure"
9978 #include "confdefs.h"
9979 #include <stdlib.h>
9980 #include <stdarg.h>
9981 #include <string.h>
9982 #include <float.h>
9983 EOF
9984 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9985 { (eval echo configure:9986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9986 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9987 if test -z "$ac_err"; then
9988   rm -rf conftest*
9989   ol_cv_header_stdc=yes
9990 else
9991   echo "$ac_err" >&5
9992   echo "configure: failed program was:" >&5
9993   cat conftest.$ac_ext >&5
9994   rm -rf conftest*
9995   ol_cv_header_stdc=no
9996 fi
9997 rm -f conftest*
9998
9999 if test $ol_cv_header_stdc = yes; then
10000   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10001 cat > conftest.$ac_ext <<EOF
10002 #line 10003 "configure"
10003 #include "confdefs.h"
10004 #include <string.h>
10005 EOF
10006 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10007   egrep "memchr" >/dev/null 2>&1; then
10008   :
10009 else
10010   rm -rf conftest*
10011   ol_cv_header_stdc=no
10012 fi
10013 rm -f conftest*
10014
10015 fi
10016
10017 if test $ol_cv_header_stdc = yes; then
10018   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10019 cat > conftest.$ac_ext <<EOF
10020 #line 10021 "configure"
10021 #include "confdefs.h"
10022 #include <stdlib.h>
10023 EOF
10024 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10025   egrep "free" >/dev/null 2>&1; then
10026   :
10027 else
10028   rm -rf conftest*
10029   ol_cv_header_stdc=no
10030 fi
10031 rm -f conftest*
10032
10033 fi
10034
10035 if test $ol_cv_header_stdc = yes; then
10036   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10037 if test "$cross_compiling" = yes; then
10038   :
10039 else
10040   cat > conftest.$ac_ext <<EOF
10041 #line 10042 "configure"
10042 #include "confdefs.h"
10043 #include <ctype.h>
10044 #ifndef HAVE_EBCDIC
10045 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10046 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10047 #else
10048 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10049                 || ('j' <= (c) && (c) <= 'r') \
10050                 || ('s' <= (c) && (c) <= 'z'))
10051 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
10052 #endif
10053 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10054 int main () { int i; for (i = 0; i < 256; i++)
10055 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10056 exit (0); }
10057
10058 EOF
10059 if { (eval echo configure:10060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10060 then
10061   :
10062 else
10063   echo "configure: failed program was:" >&5
10064   cat conftest.$ac_ext >&5
10065   rm -fr conftest*
10066   ol_cv_header_stdc=no
10067 fi
10068 rm -fr conftest*
10069 fi
10070
10071 fi
10072 fi
10073
10074 echo "$ac_t""$ol_cv_header_stdc" 1>&6
10075 if test $ol_cv_header_stdc = yes; then
10076   cat >> confdefs.h <<\EOF
10077 #define STDC_HEADERS 1
10078 EOF
10079
10080 fi
10081 ac_cv_header_stdc=disable
10082
10083
10084 if test $ol_cv_header_stdc != yes; then
10085         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
10086 fi
10087
10088 ac_header_dirent=no
10089 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
10090 do
10091 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10092 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
10093 echo "configure:10094: checking for $ac_hdr that defines DIR" >&5
10094 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
10095   echo $ac_n "(cached) $ac_c" 1>&6
10096 else
10097   cat > conftest.$ac_ext <<EOF
10098 #line 10099 "configure"
10099 #include "confdefs.h"
10100 #include <sys/types.h>
10101 #include <$ac_hdr>
10102 int main() {
10103 DIR *dirp = 0;
10104 ; return 0; }
10105 EOF
10106 if { (eval echo configure:10107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10107   rm -rf conftest*
10108   eval "ac_cv_header_dirent_$ac_safe=yes"
10109 else
10110   echo "configure: failed program was:" >&5
10111   cat conftest.$ac_ext >&5
10112   rm -rf conftest*
10113   eval "ac_cv_header_dirent_$ac_safe=no"
10114 fi
10115 rm -f conftest*
10116 fi
10117 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
10118   echo "$ac_t""yes" 1>&6
10119     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10120   cat >> confdefs.h <<EOF
10121 #define $ac_tr_hdr 1
10122 EOF
10123  ac_header_dirent=$ac_hdr; break
10124 else
10125   echo "$ac_t""no" 1>&6
10126 fi
10127 done
10128 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10129 if test $ac_header_dirent = dirent.h; then
10130 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
10131 echo "configure:10132: checking for opendir in -ldir" >&5
10132 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
10133 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10134   echo $ac_n "(cached) $ac_c" 1>&6
10135 else
10136   ac_save_LIBS="$LIBS"
10137 LIBS="-ldir  $LIBS"
10138 cat > conftest.$ac_ext <<EOF
10139 #line 10140 "configure"
10140 #include "confdefs.h"
10141 /* Override any gcc2 internal prototype to avoid an error.  */
10142 /* We use char because int might match the return type of a gcc2
10143     builtin and then its argument prototype would still apply.  */
10144 char opendir();
10145
10146 int main() {
10147 opendir()
10148 ; return 0; }
10149 EOF
10150 if { (eval echo configure:10151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10151   rm -rf conftest*
10152   eval "ac_cv_lib_$ac_lib_var=yes"
10153 else
10154   echo "configure: failed program was:" >&5
10155   cat conftest.$ac_ext >&5
10156   rm -rf conftest*
10157   eval "ac_cv_lib_$ac_lib_var=no"
10158 fi
10159 rm -f conftest*
10160 LIBS="$ac_save_LIBS"
10161
10162 fi
10163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10164   echo "$ac_t""yes" 1>&6
10165   LIBS="$LIBS -ldir"
10166 else
10167   echo "$ac_t""no" 1>&6
10168 fi
10169
10170 else
10171 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
10172 echo "configure:10173: checking for opendir in -lx" >&5
10173 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
10174 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10175   echo $ac_n "(cached) $ac_c" 1>&6
10176 else
10177   ac_save_LIBS="$LIBS"
10178 LIBS="-lx  $LIBS"
10179 cat > conftest.$ac_ext <<EOF
10180 #line 10181 "configure"
10181 #include "confdefs.h"
10182 /* Override any gcc2 internal prototype to avoid an error.  */
10183 /* We use char because int might match the return type of a gcc2
10184     builtin and then its argument prototype would still apply.  */
10185 char opendir();
10186
10187 int main() {
10188 opendir()
10189 ; return 0; }
10190 EOF
10191 if { (eval echo configure:10192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10192   rm -rf conftest*
10193   eval "ac_cv_lib_$ac_lib_var=yes"
10194 else
10195   echo "configure: failed program was:" >&5
10196   cat conftest.$ac_ext >&5
10197   rm -rf conftest*
10198   eval "ac_cv_lib_$ac_lib_var=no"
10199 fi
10200 rm -f conftest*
10201 LIBS="$ac_save_LIBS"
10202
10203 fi
10204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10205   echo "$ac_t""yes" 1>&6
10206   LIBS="$LIBS -lx"
10207 else
10208   echo "$ac_t""no" 1>&6
10209 fi
10210
10211 fi
10212
10213 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
10214 echo "configure:10215: checking for sys/wait.h that is POSIX.1 compatible" >&5
10215 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
10216   echo $ac_n "(cached) $ac_c" 1>&6
10217 else
10218   cat > conftest.$ac_ext <<EOF
10219 #line 10220 "configure"
10220 #include "confdefs.h"
10221 #include <sys/types.h>
10222 #include <sys/wait.h>
10223 #ifndef WEXITSTATUS
10224 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
10225 #endif
10226 #ifndef WIFEXITED
10227 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
10228 #endif
10229 int main() {
10230 int s;
10231 wait (&s);
10232 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
10233 ; return 0; }
10234 EOF
10235 if { (eval echo configure:10236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10236   rm -rf conftest*
10237   ac_cv_header_sys_wait_h=yes
10238 else
10239   echo "configure: failed program was:" >&5
10240   cat conftest.$ac_ext >&5
10241   rm -rf conftest*
10242   ac_cv_header_sys_wait_h=no
10243 fi
10244 rm -f conftest*
10245 fi
10246
10247 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
10248 if test $ac_cv_header_sys_wait_h = yes; then
10249   cat >> confdefs.h <<\EOF
10250 #define HAVE_SYS_WAIT_H 1
10251 EOF
10252
10253 fi
10254
10255 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
10256 echo "configure:10257: checking POSIX termios" >&5
10257 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
10258   echo $ac_n "(cached) $ac_c" 1>&6
10259 else
10260   cat > conftest.$ac_ext <<EOF
10261 #line 10262 "configure"
10262 #include "confdefs.h"
10263 #include <sys/types.h>
10264 #include <unistd.h>
10265 #include <termios.h>
10266 int main() {
10267 /* SunOS 4.0.3 has termios.h but not the library calls.  */
10268    tcgetattr(0, 0);
10269 ; return 0; }
10270 EOF
10271 if { (eval echo configure:10272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10272   rm -rf conftest*
10273   am_cv_sys_posix_termios=yes
10274 else
10275   echo "configure: failed program was:" >&5
10276   cat conftest.$ac_ext >&5
10277   rm -rf conftest*
10278   am_cv_sys_posix_termios=no
10279 fi
10280 rm -f conftest*
10281 fi
10282
10283 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
10284
10285
10286  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
10287 echo "configure:10288: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
10288 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
10289   echo $ac_n "(cached) $ac_c" 1>&6
10290 else
10291   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
10292
10293   gwinsz_in_termios_h=no
10294   if test $am_cv_sys_posix_termios = yes; then
10295     cat > conftest.$ac_ext <<EOF
10296 #line 10297 "configure"
10297 #include "confdefs.h"
10298 #include <sys/types.h>
10299 #     include <termios.h>
10300 #     ifdef TIOCGWINSZ
10301         yes
10302 #     endif
10303     
10304 EOF
10305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10306   egrep "yes" >/dev/null 2>&1; then
10307   rm -rf conftest*
10308   gwinsz_in_termios_h=yes
10309 fi
10310 rm -f conftest*
10311
10312   fi
10313
10314   if test $gwinsz_in_termios_h = no; then
10315     cat > conftest.$ac_ext <<EOF
10316 #line 10317 "configure"
10317 #include "confdefs.h"
10318 #include <sys/types.h>
10319 #     include <sys/ioctl.h>
10320 #     ifdef TIOCGWINSZ
10321         yes
10322 #     endif
10323     
10324 EOF
10325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10326   egrep "yes" >/dev/null 2>&1; then
10327   rm -rf conftest*
10328   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
10329 fi
10330 rm -f conftest*
10331
10332   fi
10333   
10334 fi
10335
10336 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
10337   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
10338     cat >> confdefs.h <<\EOF
10339 #define GWINSZ_IN_SYS_IOCTL 1
10340 EOF
10341
10342   fi
10343
10344 if test $am_cv_sys_posix_termios = yes ; then
10345         cat >> confdefs.h <<\EOF
10346 #define HAVE_POSIX_TERMIOS 1
10347 EOF
10348
10349 fi
10350
10351 for ac_hdr in \
10352         arpa/inet.h             \
10353         arpa/nameser.h  \
10354         assert.h                \
10355         crypt.h                 \
10356         errno.h                 \
10357         fcntl.h                 \
10358         filio.h                 \
10359         getopt.h                \
10360         grp.h                   \
10361         libutil.h               \
10362         limits.h                \
10363         locale.h                \
10364         malloc.h                \
10365         memory.h                \
10366         psap.h                  \
10367         pwd.h                   \
10368         resolv.h                \
10369         sgtty.h                 \
10370         stdarg.h                \
10371         stddef.h                \
10372         string.h                \
10373         strings.h               \
10374         sysexits.h              \
10375         sys/file.h              \
10376         sys/filio.h             \
10377         sys/errno.h             \
10378         sys/ioctl.h             \
10379         sys/param.h             \
10380         sys/resource.h  \
10381         sys/select.h    \
10382         sys/socket.h    \
10383         sys/syslog.h    \
10384         sys/time.h              \
10385         sys/types.h             \
10386         syslog.h                \
10387         termios.h               \
10388         unistd.h                \
10389
10390 do
10391 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10392 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10393 echo "configure:10394: checking for $ac_hdr" >&5
10394 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10395   echo $ac_n "(cached) $ac_c" 1>&6
10396 else
10397   cat > conftest.$ac_ext <<EOF
10398 #line 10399 "configure"
10399 #include "confdefs.h"
10400 #include <$ac_hdr>
10401 EOF
10402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10403 { (eval echo configure:10404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10405 if test -z "$ac_err"; then
10406   rm -rf conftest*
10407   eval "ac_cv_header_$ac_safe=yes"
10408 else
10409   echo "$ac_err" >&5
10410   echo "configure: failed program was:" >&5
10411   cat conftest.$ac_ext >&5
10412   rm -rf conftest*
10413   eval "ac_cv_header_$ac_safe=no"
10414 fi
10415 rm -f conftest*
10416 fi
10417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10418   echo "$ac_t""yes" 1>&6
10419     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10420   cat >> confdefs.h <<EOF
10421 #define $ac_tr_hdr 1
10422 EOF
10423  
10424 else
10425   echo "$ac_t""no" 1>&6
10426 fi
10427 done
10428
10429
10430 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10431 echo "configure:10432: checking for uid_t in sys/types.h" >&5
10432 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
10433   echo $ac_n "(cached) $ac_c" 1>&6
10434 else
10435   cat > conftest.$ac_ext <<EOF
10436 #line 10437 "configure"
10437 #include "confdefs.h"
10438 #include <sys/types.h>
10439 EOF
10440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10441   egrep "uid_t" >/dev/null 2>&1; then
10442   rm -rf conftest*
10443   ac_cv_type_uid_t=yes
10444 else
10445   rm -rf conftest*
10446   ac_cv_type_uid_t=no
10447 fi
10448 rm -f conftest*
10449
10450 fi
10451
10452 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10453 if test $ac_cv_type_uid_t = no; then
10454   cat >> confdefs.h <<\EOF
10455 #define uid_t int
10456 EOF
10457
10458   cat >> confdefs.h <<\EOF
10459 #define gid_t int
10460 EOF
10461
10462 fi
10463
10464 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
10465 echo "configure:10466: checking type of array argument to getgroups" >&5
10466 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then
10467   echo $ac_n "(cached) $ac_c" 1>&6
10468 else
10469   if test "$cross_compiling" = yes; then
10470   ac_cv_type_getgroups=cross
10471 else
10472   cat > conftest.$ac_ext <<EOF
10473 #line 10474 "configure"
10474 #include "confdefs.h"
10475
10476 /* Thanks to Mike Rendell for this test.  */
10477 #include <sys/types.h>
10478 #define NGID 256
10479 #undef MAX
10480 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10481 main()
10482 {
10483   gid_t gidset[NGID];
10484   int i, n;
10485   union { gid_t gval; long lval; }  val;
10486
10487   val.lval = -1;
10488   for (i = 0; i < NGID; i++)
10489     gidset[i] = val.gval;
10490   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10491                  gidset);
10492   /* Exit non-zero if getgroups seems to require an array of ints.  This
10493      happens when gid_t is short but getgroups modifies an array of ints.  */
10494   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
10495 }
10496
10497 EOF
10498 if { (eval echo configure:10499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10499 then
10500     ac_cv_type_getgroups=gid_t
10501 else
10502   echo "configure: failed program was:" >&5
10503   cat conftest.$ac_ext >&5
10504   rm -fr conftest*
10505   ac_cv_type_getgroups=int
10506 fi
10507 rm -fr conftest*
10508 fi
10509
10510 if test $ac_cv_type_getgroups = cross; then
10511         cat > conftest.$ac_ext <<EOF
10512 #line 10513 "configure"
10513 #include "confdefs.h"
10514 #include <unistd.h>
10515 EOF
10516 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10517   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
10518   rm -rf conftest*
10519   ac_cv_type_getgroups=gid_t
10520 else
10521   rm -rf conftest*
10522   ac_cv_type_getgroups=int
10523 fi
10524 rm -f conftest*
10525
10526 fi
10527 fi
10528
10529 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
10530 cat >> confdefs.h <<EOF
10531 #define GETGROUPS_T $ac_cv_type_getgroups
10532 EOF
10533
10534  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10535 echo "configure:10536: checking for ANSI C header files" >&5
10536 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
10537   echo $ac_n "(cached) $ac_c" 1>&6
10538 else
10539   cat > conftest.$ac_ext <<EOF
10540 #line 10541 "configure"
10541 #include "confdefs.h"
10542 #include <stdlib.h>
10543 #include <stdarg.h>
10544 #include <string.h>
10545 #include <float.h>
10546 EOF
10547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10548 { (eval echo configure:10549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10550 if test -z "$ac_err"; then
10551   rm -rf conftest*
10552   ac_cv_header_stdc=yes
10553 else
10554   echo "$ac_err" >&5
10555   echo "configure: failed program was:" >&5
10556   cat conftest.$ac_ext >&5
10557   rm -rf conftest*
10558   ac_cv_header_stdc=no
10559 fi
10560 rm -f conftest*
10561
10562 if test $ac_cv_header_stdc = yes; then
10563   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10564 cat > conftest.$ac_ext <<EOF
10565 #line 10566 "configure"
10566 #include "confdefs.h"
10567 #include <string.h>
10568 EOF
10569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10570   egrep "memchr" >/dev/null 2>&1; then
10571   :
10572 else
10573   rm -rf conftest*
10574   ac_cv_header_stdc=no
10575 fi
10576 rm -f conftest*
10577
10578 fi
10579
10580 if test $ac_cv_header_stdc = yes; then
10581   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10582 cat > conftest.$ac_ext <<EOF
10583 #line 10584 "configure"
10584 #include "confdefs.h"
10585 #include <stdlib.h>
10586 EOF
10587 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10588   egrep "free" >/dev/null 2>&1; then
10589   :
10590 else
10591   rm -rf conftest*
10592   ac_cv_header_stdc=no
10593 fi
10594 rm -f conftest*
10595
10596 fi
10597
10598 if test $ac_cv_header_stdc = yes; then
10599   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10600 if test "$cross_compiling" = yes; then
10601   :
10602 else
10603   cat > conftest.$ac_ext <<EOF
10604 #line 10605 "configure"
10605 #include "confdefs.h"
10606 #include <ctype.h>
10607 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10608 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10609 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10610 int main () { int i; for (i = 0; i < 256; i++)
10611 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10612 exit (0); }
10613
10614 EOF
10615 if { (eval echo configure:10616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10616 then
10617   :
10618 else
10619   echo "configure: failed program was:" >&5
10620   cat conftest.$ac_ext >&5
10621   rm -fr conftest*
10622   ac_cv_header_stdc=no
10623 fi
10624 rm -fr conftest*
10625 fi
10626
10627 fi
10628 fi
10629
10630 echo "$ac_t""$ac_cv_header_stdc" 1>&6
10631 if test $ac_cv_header_stdc = yes; then
10632   cat >> confdefs.h <<\EOF
10633 #define STDC_HEADERS 1
10634 EOF
10635
10636 fi
10637
10638 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
10639 echo "configure:10640: checking for mode_t" >&5
10640 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
10641   echo $ac_n "(cached) $ac_c" 1>&6
10642 else
10643   cat > conftest.$ac_ext <<EOF
10644 #line 10645 "configure"
10645 #include "confdefs.h"
10646 #include <sys/types.h>
10647 #if STDC_HEADERS
10648 #include <stdlib.h>
10649 #include <stddef.h>
10650 #endif
10651 EOF
10652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10653   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10654   rm -rf conftest*
10655   eval "ac_cv_type_mode_t=yes"
10656 else
10657   rm -rf conftest*
10658   eval "ac_cv_type_mode_t=no"
10659 fi
10660 rm -f conftest*
10661
10662 fi
10663 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
10664   echo "$ac_t""yes" 1>&6
10665 else
10666   echo "$ac_t""no" 1>&6
10667   cat >> confdefs.h <<EOF
10668 #define mode_t int
10669 EOF
10670
10671 fi
10672
10673 echo $ac_n "checking for off_t""... $ac_c" 1>&6
10674 echo "configure:10675: checking for off_t" >&5
10675 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
10676   echo $ac_n "(cached) $ac_c" 1>&6
10677 else
10678   cat > conftest.$ac_ext <<EOF
10679 #line 10680 "configure"
10680 #include "confdefs.h"
10681 #include <sys/types.h>
10682 #if STDC_HEADERS
10683 #include <stdlib.h>
10684 #include <stddef.h>
10685 #endif
10686 EOF
10687 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10688   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10689   rm -rf conftest*
10690   eval "ac_cv_type_off_t=yes"
10691 else
10692   rm -rf conftest*
10693   eval "ac_cv_type_off_t=no"
10694 fi
10695 rm -f conftest*
10696
10697 fi
10698 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
10699   echo "$ac_t""yes" 1>&6
10700 else
10701   echo "$ac_t""no" 1>&6
10702   cat >> confdefs.h <<EOF
10703 #define off_t long
10704 EOF
10705
10706 fi
10707
10708 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
10709 echo "configure:10710: checking for pid_t" >&5
10710 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
10711   echo $ac_n "(cached) $ac_c" 1>&6
10712 else
10713   cat > conftest.$ac_ext <<EOF
10714 #line 10715 "configure"
10715 #include "confdefs.h"
10716 #include <sys/types.h>
10717 #if STDC_HEADERS
10718 #include <stdlib.h>
10719 #include <stddef.h>
10720 #endif
10721 EOF
10722 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10723   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10724   rm -rf conftest*
10725   eval "ac_cv_type_pid_t=yes"
10726 else
10727   rm -rf conftest*
10728   eval "ac_cv_type_pid_t=no"
10729 fi
10730 rm -f conftest*
10731
10732 fi
10733 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
10734   echo "$ac_t""yes" 1>&6
10735 else
10736   echo "$ac_t""no" 1>&6
10737   cat >> confdefs.h <<EOF
10738 #define pid_t int
10739 EOF
10740
10741 fi
10742
10743 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
10744 echo "configure:10745: checking for ptrdiff_t" >&5
10745 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
10746   echo $ac_n "(cached) $ac_c" 1>&6
10747 else
10748   cat > conftest.$ac_ext <<EOF
10749 #line 10750 "configure"
10750 #include "confdefs.h"
10751 #include <stddef.h>
10752 int main() {
10753 ptrdiff_t p
10754 ; return 0; }
10755 EOF
10756 if { (eval echo configure:10757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10757   rm -rf conftest*
10758   am_cv_type_ptrdiff_t=yes
10759 else
10760   echo "configure: failed program was:" >&5
10761   cat conftest.$ac_ext >&5
10762   rm -rf conftest*
10763   am_cv_type_ptrdiff_t=no
10764 fi
10765 rm -f conftest*
10766 fi
10767
10768 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
10769    if test $am_cv_type_ptrdiff_t = yes; then
10770      cat >> confdefs.h <<\EOF
10771 #define HAVE_PTRDIFF_T 1
10772 EOF
10773
10774    fi
10775
10776 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
10777 echo "configure:10778: checking return type of signal handlers" >&5
10778 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
10779   echo $ac_n "(cached) $ac_c" 1>&6
10780 else
10781   cat > conftest.$ac_ext <<EOF
10782 #line 10783 "configure"
10783 #include "confdefs.h"
10784 #include <sys/types.h>
10785 #include <signal.h>
10786 #ifdef signal
10787 #undef signal
10788 #endif
10789 #ifdef __cplusplus
10790 extern "C" void (*signal (int, void (*)(int)))(int);
10791 #else
10792 void (*signal ()) ();
10793 #endif
10794
10795 int main() {
10796 int i;
10797 ; return 0; }
10798 EOF
10799 if { (eval echo configure:10800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10800   rm -rf conftest*
10801   ac_cv_type_signal=void
10802 else
10803   echo "configure: failed program was:" >&5
10804   cat conftest.$ac_ext >&5
10805   rm -rf conftest*
10806   ac_cv_type_signal=int
10807 fi
10808 rm -f conftest*
10809 fi
10810
10811 echo "$ac_t""$ac_cv_type_signal" 1>&6
10812 cat >> confdefs.h <<EOF
10813 #define RETSIGTYPE $ac_cv_type_signal
10814 EOF
10815
10816
10817 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
10818 echo "configure:10819: checking for sig_atomic_t" >&5
10819 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
10820   echo $ac_n "(cached) $ac_c" 1>&6
10821 else
10822   cat > conftest.$ac_ext <<EOF
10823 #line 10824 "configure"
10824 #include "confdefs.h"
10825 #include <signal.h>
10826 int main() {
10827 sig_atomic_t atomic;
10828 ; return 0; }
10829 EOF
10830 if { (eval echo configure:10831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10831   rm -rf conftest*
10832   ol_cv_type_sig_atomic_t=yes
10833 else
10834   echo "configure: failed program was:" >&5
10835   cat conftest.$ac_ext >&5
10836   rm -rf conftest*
10837   ol_cv_type_sig_atomic_t=no
10838 fi
10839 rm -f conftest*
10840 fi
10841
10842 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
10843   if test $ol_cv_type_sig_atomic_t = no; then
10844     cat >> confdefs.h <<\EOF
10845 #define sig_atomic_t int
10846 EOF
10847
10848   fi
10849  
10850 echo $ac_n "checking for size_t""... $ac_c" 1>&6
10851 echo "configure:10852: checking for size_t" >&5
10852 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
10853   echo $ac_n "(cached) $ac_c" 1>&6
10854 else
10855   cat > conftest.$ac_ext <<EOF
10856 #line 10857 "configure"
10857 #include "confdefs.h"
10858 #include <sys/types.h>
10859 #if STDC_HEADERS
10860 #include <stdlib.h>
10861 #include <stddef.h>
10862 #endif
10863 EOF
10864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10865   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10866   rm -rf conftest*
10867   eval "ac_cv_type_size_t=yes"
10868 else
10869   rm -rf conftest*
10870   eval "ac_cv_type_size_t=no"
10871 fi
10872 rm -f conftest*
10873
10874 fi
10875 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
10876   echo "$ac_t""yes" 1>&6
10877 else
10878   echo "$ac_t""no" 1>&6
10879   cat >> confdefs.h <<EOF
10880 #define size_t unsigned
10881 EOF
10882
10883 fi
10884
10885 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
10886 echo "configure:10887: checking for member st_blksize in aggregate type struct stat" >&5
10887 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
10888   echo $ac_n "(cached) $ac_c" 1>&6
10889 else
10890   cat > conftest.$ac_ext <<EOF
10891 #line 10892 "configure"
10892 #include "confdefs.h"
10893 #include <sys/types.h>
10894 #include <sys/stat.h>
10895 int main() {
10896 struct stat foo; foo.st_blksize;
10897 ; return 0; }
10898 EOF
10899 if { (eval echo configure:10900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10900   rm -rf conftest*
10901   ac_cv_c_struct_member_st_blksize=yes
10902 else
10903   echo "configure: failed program was:" >&5
10904   cat conftest.$ac_ext >&5
10905   rm -rf conftest*
10906   ac_cv_c_struct_member_st_blksize=no
10907 fi
10908 rm -f conftest*
10909 fi
10910
10911 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
10912 st_blksize="$ac_cv_c_struct_member_st_blksize"
10913 if test $ac_cv_c_struct_member_st_blksize = yes; then
10914   cat >> confdefs.h <<\EOF
10915 #define HAVE_ST_BLKSIZE 1
10916 EOF
10917
10918 fi
10919
10920 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
10921 echo "configure:10922: checking whether time.h and sys/time.h may both be included" >&5
10922 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
10923   echo $ac_n "(cached) $ac_c" 1>&6
10924 else
10925   cat > conftest.$ac_ext <<EOF
10926 #line 10927 "configure"
10927 #include "confdefs.h"
10928 #include <sys/types.h>
10929 #include <sys/time.h>
10930 #include <time.h>
10931 int main() {
10932 struct tm *tp;
10933 ; return 0; }
10934 EOF
10935 if { (eval echo configure:10936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10936   rm -rf conftest*
10937   ac_cv_header_time=yes
10938 else
10939   echo "configure: failed program was:" >&5
10940   cat conftest.$ac_ext >&5
10941   rm -rf conftest*
10942   ac_cv_header_time=no
10943 fi
10944 rm -f conftest*
10945 fi
10946
10947 echo "$ac_t""$ac_cv_header_time" 1>&6
10948 if test $ac_cv_header_time = yes; then
10949   cat >> confdefs.h <<\EOF
10950 #define TIME_WITH_SYS_TIME 1
10951 EOF
10952
10953 fi
10954
10955 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
10956 echo "configure:10957: checking whether struct tm is in sys/time.h or time.h" >&5
10957 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
10958   echo $ac_n "(cached) $ac_c" 1>&6
10959 else
10960   cat > conftest.$ac_ext <<EOF
10961 #line 10962 "configure"
10962 #include "confdefs.h"
10963 #include <sys/types.h>
10964 #include <time.h>
10965 int main() {
10966 struct tm *tp; tp->tm_sec;
10967 ; return 0; }
10968 EOF
10969 if { (eval echo configure:10970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10970   rm -rf conftest*
10971   ac_cv_struct_tm=time.h
10972 else
10973   echo "configure: failed program was:" >&5
10974   cat conftest.$ac_ext >&5
10975   rm -rf conftest*
10976   ac_cv_struct_tm=sys/time.h
10977 fi
10978 rm -f conftest*
10979 fi
10980
10981 echo "$ac_t""$ac_cv_struct_tm" 1>&6
10982 if test $ac_cv_struct_tm = sys/time.h; then
10983   cat >> confdefs.h <<\EOF
10984 #define TM_IN_SYS_TIME 1
10985 EOF
10986
10987 fi
10988
10989 # test for pw_gecos in struct passwd
10990 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
10991 echo "configure:10992: checking struct passwd for pw_gecos" >&5
10992 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
10993   echo $ac_n "(cached) $ac_c" 1>&6
10994 else
10995   
10996         cat > conftest.$ac_ext <<EOF
10997 #line 10998 "configure"
10998 #include "confdefs.h"
10999 #include <pwd.h>
11000 int main() {
11001
11002         struct passwd pwd;
11003         pwd.pw_gecos = pwd.pw_name;
11004
11005 ; return 0; }
11006 EOF
11007 if { (eval echo configure:11008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11008   rm -rf conftest*
11009   ol_cv_struct_passwd_pw_gecos=yes
11010 else
11011   echo "configure: failed program was:" >&5
11012   cat conftest.$ac_ext >&5
11013   rm -rf conftest*
11014   ol_cv_struct_passwd_pw_gecos=no
11015 fi
11016 rm -f conftest*
11017 fi
11018
11019 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
11020 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
11021         cat >> confdefs.h <<\EOF
11022 #define HAVE_PW_GECOS 1
11023 EOF
11024
11025 fi
11026
11027
11028
11029 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
11030 echo "configure:11031: checking if toupper() requires islower()" >&5
11031 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
11032   echo $ac_n "(cached) $ac_c" 1>&6
11033 else
11034   
11035         if test "$cross_compiling" = yes; then
11036   ol_cv_c_upper_lower=safe
11037 else
11038   cat > conftest.$ac_ext <<EOF
11039 #line 11040 "configure"
11040 #include "confdefs.h"
11041
11042 #include <ctype.h>
11043 main()
11044 {
11045         if ('C' == toupper('C'))
11046                 exit(0);
11047         else
11048                 exit(1);
11049 }
11050 EOF
11051 if { (eval echo configure:11052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11052 then
11053   ol_cv_c_upper_lower=no
11054 else
11055   echo "configure: failed program was:" >&5
11056   cat conftest.$ac_ext >&5
11057   rm -fr conftest*
11058   ol_cv_c_upper_lower=yes
11059 fi
11060 rm -fr conftest*
11061 fi
11062
11063 fi
11064
11065 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
11066 if test $ol_cv_c_upper_lower != no ; then
11067         cat >> confdefs.h <<\EOF
11068 #define C_UPPER_LOWER 1
11069 EOF
11070
11071 fi
11072
11073 echo $ac_n "checking for working const""... $ac_c" 1>&6
11074 echo "configure:11075: checking for working const" >&5
11075 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
11076   echo $ac_n "(cached) $ac_c" 1>&6
11077 else
11078   cat > conftest.$ac_ext <<EOF
11079 #line 11080 "configure"
11080 #include "confdefs.h"
11081
11082 int main() {
11083
11084 /* Ultrix mips cc rejects this.  */
11085 typedef int charset[2]; const charset x;
11086 /* SunOS 4.1.1 cc rejects this.  */
11087 char const *const *ccp;
11088 char **p;
11089 /* NEC SVR4.0.2 mips cc rejects this.  */
11090 struct point {int x, y;};
11091 static struct point const zero = {0,0};
11092 /* AIX XL C 1.02.0.0 rejects this.
11093    It does not let you subtract one const X* pointer from another in an arm
11094    of an if-expression whose if-part is not a constant expression */
11095 const char *g = "string";
11096 ccp = &g + (g ? g-g : 0);
11097 /* HPUX 7.0 cc rejects these. */
11098 ++ccp;
11099 p = (char**) ccp;
11100 ccp = (char const *const *) p;
11101 { /* SCO 3.2v4 cc rejects this.  */
11102   char *t;
11103   char const *s = 0 ? (char *) 0 : (char const *) 0;
11104
11105   *t++ = 0;
11106 }
11107 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11108   int x[] = {25, 17};
11109   const int *foo = &x[0];
11110   ++foo;
11111 }
11112 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11113   typedef const int *iptr;
11114   iptr p = 0;
11115   ++p;
11116 }
11117 { /* AIX XL C 1.02.0.0 rejects this saying
11118      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11119   struct s { int j; const int *ap[3]; };
11120   struct s *b; b->j = 5;
11121 }
11122 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11123   const int foo = 10;
11124 }
11125
11126 ; return 0; }
11127 EOF
11128 if { (eval echo configure:11129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11129   rm -rf conftest*
11130   ac_cv_c_const=yes
11131 else
11132   echo "configure: failed program was:" >&5
11133   cat conftest.$ac_ext >&5
11134   rm -rf conftest*
11135   ac_cv_c_const=no
11136 fi
11137 rm -f conftest*
11138 fi
11139
11140 echo "$ac_t""$ac_cv_c_const" 1>&6
11141 if test $ac_cv_c_const = no; then
11142   cat >> confdefs.h <<\EOF
11143 #define const 
11144 EOF
11145
11146 fi
11147
11148 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11149 echo "configure:11150: checking if compiler understands volatile" >&5
11150 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
11151   echo $ac_n "(cached) $ac_c" 1>&6
11152 else
11153   cat > conftest.$ac_ext <<EOF
11154 #line 11155 "configure"
11155 #include "confdefs.h"
11156 int x, y, z;
11157 int main() {
11158 volatile int a; int * volatile b = x ? &y : &z;
11159       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11160       *b = 0;
11161 ; return 0; }
11162 EOF
11163 if { (eval echo configure:11164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11164   rm -rf conftest*
11165   ol_cv_c_volatile=yes
11166 else
11167   echo "configure: failed program was:" >&5
11168   cat conftest.$ac_ext >&5
11169   rm -rf conftest*
11170   ol_cv_c_volatile=no
11171 fi
11172 rm -f conftest*
11173 fi
11174
11175 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11176   if test $ol_cv_c_volatile = yes; then
11177     : 
11178   else
11179     cat >> confdefs.h <<\EOF
11180 #define volatile 
11181 EOF
11182
11183   fi
11184  
11185
11186 if test $cross_compiling = yes ; then
11187         cat >> confdefs.h <<\EOF
11188 #define CROSS_COMPILING 1
11189 EOF
11190
11191
11192         cat >> confdefs.h <<\EOF
11193 #define LBER_INT_T long
11194 EOF
11195
11196         cat >> confdefs.h <<\EOF
11197 #define LBER_TAG_T long
11198 EOF
11199
11200         cat >> confdefs.h <<\EOF
11201 #define LBER_SOCKET_T int
11202 EOF
11203
11204
11205 else
11206         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11207 echo "configure:11208: checking whether byte ordering is bigendian" >&5
11208 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
11209   echo $ac_n "(cached) $ac_c" 1>&6
11210 else
11211   ac_cv_c_bigendian=unknown
11212 # See if sys/param.h defines the BYTE_ORDER macro.
11213 cat > conftest.$ac_ext <<EOF
11214 #line 11215 "configure"
11215 #include "confdefs.h"
11216 #include <sys/types.h>
11217 #include <sys/param.h>
11218 int main() {
11219
11220 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11221  bogus endian macros
11222 #endif
11223 ; return 0; }
11224 EOF
11225 if { (eval echo configure:11226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11226   rm -rf conftest*
11227   # It does; now see whether it defined to BIG_ENDIAN or not.
11228 cat > conftest.$ac_ext <<EOF
11229 #line 11230 "configure"
11230 #include "confdefs.h"
11231 #include <sys/types.h>
11232 #include <sys/param.h>
11233 int main() {
11234
11235 #if BYTE_ORDER != BIG_ENDIAN
11236  not big endian
11237 #endif
11238 ; return 0; }
11239 EOF
11240 if { (eval echo configure:11241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11241   rm -rf conftest*
11242   ac_cv_c_bigendian=yes
11243 else
11244   echo "configure: failed program was:" >&5
11245   cat conftest.$ac_ext >&5
11246   rm -rf conftest*
11247   ac_cv_c_bigendian=no
11248 fi
11249 rm -f conftest*
11250 else
11251   echo "configure: failed program was:" >&5
11252   cat conftest.$ac_ext >&5
11253 fi
11254 rm -f conftest*
11255 if test $ac_cv_c_bigendian = unknown; then
11256 if test "$cross_compiling" = yes; then
11257     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11258 else
11259   cat > conftest.$ac_ext <<EOF
11260 #line 11261 "configure"
11261 #include "confdefs.h"
11262 main () {
11263   /* Are we little or big endian?  From Harbison&Steele.  */
11264   union
11265   {
11266     long l;
11267     char c[sizeof (long)];
11268   } u;
11269   u.l = 1;
11270   exit (u.c[sizeof (long) - 1] == 1);
11271 }
11272 EOF
11273 if { (eval echo configure:11274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11274 then
11275   ac_cv_c_bigendian=no
11276 else
11277   echo "configure: failed program was:" >&5
11278   cat conftest.$ac_ext >&5
11279   rm -fr conftest*
11280   ac_cv_c_bigendian=yes
11281 fi
11282 rm -fr conftest*
11283 fi
11284
11285 fi
11286 fi
11287
11288 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
11289 if test $ac_cv_c_bigendian = yes; then
11290   cat >> confdefs.h <<\EOF
11291 #define WORDS_BIGENDIAN 1
11292 EOF
11293
11294 fi
11295
11296         echo $ac_n "checking size of short""... $ac_c" 1>&6
11297 echo "configure:11298: checking size of short" >&5
11298 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
11299   echo $ac_n "(cached) $ac_c" 1>&6
11300 else
11301   if test "$cross_compiling" = yes; then
11302     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11303 else
11304   cat > conftest.$ac_ext <<EOF
11305 #line 11306 "configure"
11306 #include "confdefs.h"
11307 #include <stdio.h>
11308 main()
11309 {
11310   FILE *f=fopen("conftestval", "w");
11311   if (!f) exit(1);
11312   fprintf(f, "%d\n", sizeof(short));
11313   exit(0);
11314 }
11315 EOF
11316 if { (eval echo configure:11317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11317 then
11318   ac_cv_sizeof_short=`cat conftestval`
11319 else
11320   echo "configure: failed program was:" >&5
11321   cat conftest.$ac_ext >&5
11322   rm -fr conftest*
11323   ac_cv_sizeof_short=0
11324 fi
11325 rm -fr conftest*
11326 fi
11327
11328 fi
11329 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
11330 cat >> confdefs.h <<EOF
11331 #define SIZEOF_SHORT $ac_cv_sizeof_short
11332 EOF
11333
11334  
11335         echo $ac_n "checking size of int""... $ac_c" 1>&6
11336 echo "configure:11337: checking size of int" >&5
11337 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
11338   echo $ac_n "(cached) $ac_c" 1>&6
11339 else
11340   if test "$cross_compiling" = yes; then
11341     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11342 else
11343   cat > conftest.$ac_ext <<EOF
11344 #line 11345 "configure"
11345 #include "confdefs.h"
11346 #include <stdio.h>
11347 main()
11348 {
11349   FILE *f=fopen("conftestval", "w");
11350   if (!f) exit(1);
11351   fprintf(f, "%d\n", sizeof(int));
11352   exit(0);
11353 }
11354 EOF
11355 if { (eval echo configure:11356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11356 then
11357   ac_cv_sizeof_int=`cat conftestval`
11358 else
11359   echo "configure: failed program was:" >&5
11360   cat conftest.$ac_ext >&5
11361   rm -fr conftest*
11362   ac_cv_sizeof_int=0
11363 fi
11364 rm -fr conftest*
11365 fi
11366
11367 fi
11368 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11369 cat >> confdefs.h <<EOF
11370 #define SIZEOF_INT $ac_cv_sizeof_int
11371 EOF
11372
11373  
11374         echo $ac_n "checking size of long""... $ac_c" 1>&6
11375 echo "configure:11376: checking size of long" >&5
11376 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
11377   echo $ac_n "(cached) $ac_c" 1>&6
11378 else
11379   if test "$cross_compiling" = yes; then
11380     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11381 else
11382   cat > conftest.$ac_ext <<EOF
11383 #line 11384 "configure"
11384 #include "confdefs.h"
11385 #include <stdio.h>
11386 main()
11387 {
11388   FILE *f=fopen("conftestval", "w");
11389   if (!f) exit(1);
11390   fprintf(f, "%d\n", sizeof(long));
11391   exit(0);
11392 }
11393 EOF
11394 if { (eval echo configure:11395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11395 then
11396   ac_cv_sizeof_long=`cat conftestval`
11397 else
11398   echo "configure: failed program was:" >&5
11399   cat conftest.$ac_ext >&5
11400   rm -fr conftest*
11401   ac_cv_sizeof_long=0
11402 fi
11403 rm -fr conftest*
11404 fi
11405
11406 fi
11407 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
11408 cat >> confdefs.h <<EOF
11409 #define SIZEOF_LONG $ac_cv_sizeof_long
11410 EOF
11411
11412
11413
11414         if test "$ac_cv_sizeof_int" -lt 4 ; then
11415                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
11416
11417                 cat >> confdefs.h <<\EOF
11418 #define LBER_INT_T long
11419 EOF
11420
11421                 cat >> confdefs.h <<\EOF
11422 #define LBER_TAG_T long
11423 EOF
11424
11425                 cat >> confdefs.h <<\EOF
11426 #define LBER_SOCKET_T int
11427 EOF
11428
11429         else
11430                 cat >> confdefs.h <<\EOF
11431 #define LBER_INT_T int
11432 EOF
11433
11434                 cat >> confdefs.h <<\EOF
11435 #define LBER_TAG_T long
11436 EOF
11437
11438                 cat >> confdefs.h <<\EOF
11439 #define LBER_SOCKET_T int
11440 EOF
11441
11442         fi
11443 fi
11444
11445 cat >> confdefs.h <<\EOF
11446 #define LBER_LEN_T long
11447 EOF
11448
11449
11450 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11451 echo "configure:11452: checking for 8-bit clean memcmp" >&5
11452 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
11453   echo $ac_n "(cached) $ac_c" 1>&6
11454 else
11455   if test "$cross_compiling" = yes; then
11456   ac_cv_func_memcmp_clean=no
11457 else
11458   cat > conftest.$ac_ext <<EOF
11459 #line 11460 "configure"
11460 #include "confdefs.h"
11461
11462 main()
11463 {
11464   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11465   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11466 }
11467
11468 EOF
11469 if { (eval echo configure:11470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11470 then
11471   ac_cv_func_memcmp_clean=yes
11472 else
11473   echo "configure: failed program was:" >&5
11474   cat conftest.$ac_ext >&5
11475   rm -fr conftest*
11476   ac_cv_func_memcmp_clean=no
11477 fi
11478 rm -fr conftest*
11479 fi
11480
11481 fi
11482
11483 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11484 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11485
11486 echo $ac_n "checking for strftime""... $ac_c" 1>&6
11487 echo "configure:11488: checking for strftime" >&5
11488 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
11489   echo $ac_n "(cached) $ac_c" 1>&6
11490 else
11491   cat > conftest.$ac_ext <<EOF
11492 #line 11493 "configure"
11493 #include "confdefs.h"
11494 /* System header to define __stub macros and hopefully few prototypes,
11495     which can conflict with char strftime(); below.  */
11496 #include <assert.h>
11497 /* Override any gcc2 internal prototype to avoid an error.  */
11498 /* We use char because int might match the return type of a gcc2
11499     builtin and then its argument prototype would still apply.  */
11500 char strftime();
11501 char (*f)();
11502
11503 int main() {
11504
11505 /* The GNU C library defines this for functions which it implements
11506     to always fail with ENOSYS.  Some functions are actually named
11507     something starting with __ and the normal name is an alias.  */
11508 #if defined (__stub_strftime) || defined (__stub___strftime)
11509 choke me
11510 #else
11511 f = strftime;
11512 #endif
11513
11514 ; return 0; }
11515 EOF
11516 if { (eval echo configure:11517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11517   rm -rf conftest*
11518   eval "ac_cv_func_strftime=yes"
11519 else
11520   echo "configure: failed program was:" >&5
11521   cat conftest.$ac_ext >&5
11522   rm -rf conftest*
11523   eval "ac_cv_func_strftime=no"
11524 fi
11525 rm -f conftest*
11526 fi
11527
11528 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
11529   echo "$ac_t""yes" 1>&6
11530   cat >> confdefs.h <<\EOF
11531 #define HAVE_STRFTIME 1
11532 EOF
11533
11534 else
11535   echo "$ac_t""no" 1>&6
11536 # strftime is in -lintl on SCO UNIX.
11537 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
11538 echo "configure:11539: checking for strftime in -lintl" >&5
11539 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
11540 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11541   echo $ac_n "(cached) $ac_c" 1>&6
11542 else
11543   ac_save_LIBS="$LIBS"
11544 LIBS="-lintl  $LIBS"
11545 cat > conftest.$ac_ext <<EOF
11546 #line 11547 "configure"
11547 #include "confdefs.h"
11548 /* Override any gcc2 internal prototype to avoid an error.  */
11549 /* We use char because int might match the return type of a gcc2
11550     builtin and then its argument prototype would still apply.  */
11551 char strftime();
11552
11553 int main() {
11554 strftime()
11555 ; return 0; }
11556 EOF
11557 if { (eval echo configure:11558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11558   rm -rf conftest*
11559   eval "ac_cv_lib_$ac_lib_var=yes"
11560 else
11561   echo "configure: failed program was:" >&5
11562   cat conftest.$ac_ext >&5
11563   rm -rf conftest*
11564   eval "ac_cv_lib_$ac_lib_var=no"
11565 fi
11566 rm -f conftest*
11567 LIBS="$ac_save_LIBS"
11568
11569 fi
11570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11571   echo "$ac_t""yes" 1>&6
11572   cat >> confdefs.h <<\EOF
11573 #define HAVE_STRFTIME 1
11574 EOF
11575
11576 LIBS="-lintl $LIBS"
11577 else
11578   echo "$ac_t""no" 1>&6
11579 fi
11580
11581 fi
11582
11583
11584 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
11585 echo "configure:11586: checking for vprintf" >&5
11586 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
11587   echo $ac_n "(cached) $ac_c" 1>&6
11588 else
11589   cat > conftest.$ac_ext <<EOF
11590 #line 11591 "configure"
11591 #include "confdefs.h"
11592 /* System header to define __stub macros and hopefully few prototypes,
11593     which can conflict with char vprintf(); below.  */
11594 #include <assert.h>
11595 /* Override any gcc2 internal prototype to avoid an error.  */
11596 /* We use char because int might match the return type of a gcc2
11597     builtin and then its argument prototype would still apply.  */
11598 char vprintf();
11599 char (*f)();
11600
11601 int main() {
11602
11603 /* The GNU C library defines this for functions which it implements
11604     to always fail with ENOSYS.  Some functions are actually named
11605     something starting with __ and the normal name is an alias.  */
11606 #if defined (__stub_vprintf) || defined (__stub___vprintf)
11607 choke me
11608 #else
11609 f = vprintf;
11610 #endif
11611
11612 ; return 0; }
11613 EOF
11614 if { (eval echo configure:11615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11615   rm -rf conftest*
11616   eval "ac_cv_func_vprintf=yes"
11617 else
11618   echo "configure: failed program was:" >&5
11619   cat conftest.$ac_ext >&5
11620   rm -rf conftest*
11621   eval "ac_cv_func_vprintf=no"
11622 fi
11623 rm -f conftest*
11624 fi
11625
11626 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
11627   echo "$ac_t""yes" 1>&6
11628   cat >> confdefs.h <<\EOF
11629 #define HAVE_VPRINTF 1
11630 EOF
11631
11632 else
11633   echo "$ac_t""no" 1>&6
11634 fi
11635
11636 if test "$ac_cv_func_vprintf" != yes; then
11637 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
11638 echo "configure:11639: checking for _doprnt" >&5
11639 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
11640   echo $ac_n "(cached) $ac_c" 1>&6
11641 else
11642   cat > conftest.$ac_ext <<EOF
11643 #line 11644 "configure"
11644 #include "confdefs.h"
11645 /* System header to define __stub macros and hopefully few prototypes,
11646     which can conflict with char _doprnt(); below.  */
11647 #include <assert.h>
11648 /* Override any gcc2 internal prototype to avoid an error.  */
11649 /* We use char because int might match the return type of a gcc2
11650     builtin and then its argument prototype would still apply.  */
11651 char _doprnt();
11652 char (*f)();
11653
11654 int main() {
11655
11656 /* The GNU C library defines this for functions which it implements
11657     to always fail with ENOSYS.  Some functions are actually named
11658     something starting with __ and the normal name is an alias.  */
11659 #if defined (__stub__doprnt) || defined (__stub____doprnt)
11660 choke me
11661 #else
11662 f = _doprnt;
11663 #endif
11664
11665 ; return 0; }
11666 EOF
11667 if { (eval echo configure:11668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11668   rm -rf conftest*
11669   eval "ac_cv_func__doprnt=yes"
11670 else
11671   echo "configure: failed program was:" >&5
11672   cat conftest.$ac_ext >&5
11673   rm -rf conftest*
11674   eval "ac_cv_func__doprnt=no"
11675 fi
11676 rm -f conftest*
11677 fi
11678
11679 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
11680   echo "$ac_t""yes" 1>&6
11681   cat >> confdefs.h <<\EOF
11682 #define HAVE_DOPRNT 1
11683 EOF
11684
11685 else
11686   echo "$ac_t""no" 1>&6
11687 fi
11688
11689 fi
11690
11691
11692 if test $ac_cv_func_vprintf = yes ; then
11693                 for ac_func in vsnprintf vsprintf
11694 do
11695 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11696 echo "configure:11697: checking for $ac_func" >&5
11697 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11698   echo $ac_n "(cached) $ac_c" 1>&6
11699 else
11700   cat > conftest.$ac_ext <<EOF
11701 #line 11702 "configure"
11702 #include "confdefs.h"
11703 /* System header to define __stub macros and hopefully few prototypes,
11704     which can conflict with char $ac_func(); below.  */
11705 #include <assert.h>
11706 /* Override any gcc2 internal prototype to avoid an error.  */
11707 /* We use char because int might match the return type of a gcc2
11708     builtin and then its argument prototype would still apply.  */
11709 char $ac_func();
11710 char (*f)();
11711
11712 int main() {
11713
11714 /* The GNU C library defines this for functions which it implements
11715     to always fail with ENOSYS.  Some functions are actually named
11716     something starting with __ and the normal name is an alias.  */
11717 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11718 choke me
11719 #else
11720 f = $ac_func;
11721 #endif
11722
11723 ; return 0; }
11724 EOF
11725 if { (eval echo configure:11726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11726   rm -rf conftest*
11727   eval "ac_cv_func_$ac_func=yes"
11728 else
11729   echo "configure: failed program was:" >&5
11730   cat conftest.$ac_ext >&5
11731   rm -rf conftest*
11732   eval "ac_cv_func_$ac_func=no"
11733 fi
11734 rm -f conftest*
11735 fi
11736
11737 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11738   echo "$ac_t""yes" 1>&6
11739     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11740   cat >> confdefs.h <<EOF
11741 #define $ac_tr_func 1
11742 EOF
11743  
11744 else
11745   echo "$ac_t""no" 1>&6
11746 fi
11747 done
11748
11749 fi
11750
11751 for ac_func in \
11752         bcopy                   \
11753         closesocket             \
11754         endgrent                \
11755         endpwent                \
11756         flock                   \
11757         getdtablesize   \
11758         getgrgid                \
11759         gethostname             \
11760         getpass                 \
11761         getpwuid                \
11762         gettimeofday    \
11763         initgroups              \
11764         lockf                   \
11765         memcpy                  \
11766         memmove                 \
11767         mkstemp                 \
11768         recv                    \
11769         recvfrom                \
11770         setpwfile               \
11771         setgid                  \
11772         setegid                 \
11773         setsid                  \
11774         setuid                  \
11775         seteuid                 \
11776         signal                  \
11777         sigset                  \
11778         snprintf                \
11779         strdup                  \
11780         strerror                \
11781         strpbrk                 \
11782         strrchr                 \
11783         strsep                  \
11784         strstr                  \
11785         strtol                  \
11786         strtoul                 \
11787         strspn                  \
11788         sysconf                 \
11789         waitpid                 \
11790         wait4                   \
11791
11792 do
11793 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11794 echo "configure:11795: checking for $ac_func" >&5
11795 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11796   echo $ac_n "(cached) $ac_c" 1>&6
11797 else
11798   cat > conftest.$ac_ext <<EOF
11799 #line 11800 "configure"
11800 #include "confdefs.h"
11801 /* System header to define __stub macros and hopefully few prototypes,
11802     which can conflict with char $ac_func(); below.  */
11803 #include <assert.h>
11804 /* Override any gcc2 internal prototype to avoid an error.  */
11805 /* We use char because int might match the return type of a gcc2
11806     builtin and then its argument prototype would still apply.  */
11807 char $ac_func();
11808 char (*f)();
11809
11810 int main() {
11811
11812 /* The GNU C library defines this for functions which it implements
11813     to always fail with ENOSYS.  Some functions are actually named
11814     something starting with __ and the normal name is an alias.  */
11815 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11816 choke me
11817 #else
11818 f = $ac_func;
11819 #endif
11820
11821 ; return 0; }
11822 EOF
11823 if { (eval echo configure:11824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11824   rm -rf conftest*
11825   eval "ac_cv_func_$ac_func=yes"
11826 else
11827   echo "configure: failed program was:" >&5
11828   cat conftest.$ac_ext >&5
11829   rm -rf conftest*
11830   eval "ac_cv_func_$ac_func=no"
11831 fi
11832 rm -f conftest*
11833 fi
11834
11835 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11836   echo "$ac_t""yes" 1>&6
11837     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11838   cat >> confdefs.h <<EOF
11839 #define $ac_tr_func 1
11840 EOF
11841  
11842 else
11843   echo "$ac_t""no" 1>&6
11844 fi
11845 done
11846
11847
11848 for ac_func in getopt tempnam
11849 do
11850 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11851 echo "configure:11852: checking for $ac_func" >&5
11852 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11853   echo $ac_n "(cached) $ac_c" 1>&6
11854 else
11855   cat > conftest.$ac_ext <<EOF
11856 #line 11857 "configure"
11857 #include "confdefs.h"
11858 /* System header to define __stub macros and hopefully few prototypes,
11859     which can conflict with char $ac_func(); below.  */
11860 #include <assert.h>
11861 /* Override any gcc2 internal prototype to avoid an error.  */
11862 /* We use char because int might match the return type of a gcc2
11863     builtin and then its argument prototype would still apply.  */
11864 char $ac_func();
11865 char (*f)();
11866
11867 int main() {
11868
11869 /* The GNU C library defines this for functions which it implements
11870     to always fail with ENOSYS.  Some functions are actually named
11871     something starting with __ and the normal name is an alias.  */
11872 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11873 choke me
11874 #else
11875 f = $ac_func;
11876 #endif
11877
11878 ; return 0; }
11879 EOF
11880 if { (eval echo configure:11881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11881   rm -rf conftest*
11882   eval "ac_cv_func_$ac_func=yes"
11883 else
11884   echo "configure: failed program was:" >&5
11885   cat conftest.$ac_ext >&5
11886   rm -rf conftest*
11887   eval "ac_cv_func_$ac_func=no"
11888 fi
11889 rm -f conftest*
11890 fi
11891
11892 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11893   echo "$ac_t""yes" 1>&6
11894     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11895   cat >> confdefs.h <<EOF
11896 #define $ac_tr_func 1
11897 EOF
11898  
11899 else
11900   echo "$ac_t""no" 1>&6
11901 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
11902 fi
11903 done
11904
11905
11906
11907 # Check Configuration
11908
11909 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
11910 echo "configure:11911: checking declaration of sys_errlist" >&5
11911 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
11912   echo $ac_n "(cached) $ac_c" 1>&6
11913 else
11914   
11915         cat > conftest.$ac_ext <<EOF
11916 #line 11917 "configure"
11917 #include "confdefs.h"
11918
11919 #include <stdio.h>
11920 #include <sys/types.h>
11921 #include <errno.h> 
11922 int main() {
11923 char *c = (char *) *sys_errlist
11924 ; return 0; }
11925 EOF
11926 if { (eval echo configure:11927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11927   rm -rf conftest*
11928   ol_cv_dcl_sys_errlist=yes
11929 else
11930   echo "configure: failed program was:" >&5
11931   cat conftest.$ac_ext >&5
11932   rm -rf conftest*
11933   ol_cv_dcl_sys_errlist=no
11934 fi
11935 rm -f conftest*
11936 fi
11937
11938 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
11939 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
11940 if test $ol_cv_dcl_sys_errlist = no ; then
11941         cat >> confdefs.h <<\EOF
11942 #define DECL_SYS_ERRLIST 1
11943 EOF
11944
11945         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
11946 echo "configure:11947: checking existence of sys_errlist" >&5
11947         if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
11948   echo $ac_n "(cached) $ac_c" 1>&6
11949 else
11950   
11951                 cat > conftest.$ac_ext <<EOF
11952 #line 11953 "configure"
11953 #include "confdefs.h"
11954 #include <errno.h>
11955 int main() {
11956 char *c = (char *) *sys_errlist
11957 ; return 0; }
11958 EOF
11959 if { (eval echo configure:11960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11960   rm -rf conftest*
11961   ol_cv_have_sys_errlist=yes
11962 else
11963   echo "configure: failed program was:" >&5
11964   cat conftest.$ac_ext >&5
11965   rm -rf conftest*
11966   ol_cv_have_sys_errlist=no
11967 fi
11968 rm -f conftest*
11969 fi
11970
11971         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
11972         if test $ol_cv_have_sys_errlist = yes ; then
11973                 cat >> confdefs.h <<\EOF
11974 #define HAVE_SYS_ERRLIST 1
11975 EOF
11976
11977         fi
11978 fi
11979
11980
11981
11982 if test "$ol_enable_debug" != no ; then
11983         cat >> confdefs.h <<\EOF
11984 #define LDAP_DEBUG 1
11985 EOF
11986
11987 fi
11988 if test "$ol_enable_syslog" = yes ; then
11989         cat >> confdefs.h <<\EOF
11990 #define LDAP_SYSLOG 1
11991 EOF
11992
11993 fi
11994 if test "$ol_enable_libui" = yes ; then
11995         cat >> confdefs.h <<\EOF
11996 #define LDAP_LIBUI 1
11997 EOF
11998
11999 fi
12000 if test "$ol_enable_cache" = no ; then
12001         cat >> confdefs.h <<\EOF
12002 #define LDAP_NOCACHE 1
12003 EOF
12004
12005 fi
12006 if test "$ol_enable_dns" != no ; then
12007         cat >> confdefs.h <<\EOF
12008 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
12009 EOF
12010
12011 fi
12012 if test "$ol_enable_proctitle" != no ; then
12013         cat >> confdefs.h <<\EOF
12014 #define LDAP_PROCTITLE 1
12015 EOF
12016
12017 fi
12018 if test "$ol_enable_referrals" != no ; then
12019         cat >> confdefs.h <<\EOF
12020 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
12021 EOF
12022
12023 fi
12024 if test "$ol_enable_cldap" != no ; then
12025         cat >> confdefs.h <<\EOF
12026 #define LDAP_CONNECTIONLESS 1
12027 EOF
12028
12029 fi
12030
12031 if test "$ol_enable_aclgroups" != no ; then
12032         cat >> confdefs.h <<\EOF
12033 #define SLAPD_ACLGROUPS 1
12034 EOF
12035
12036 fi
12037 if test "$ol_enable_crypt" != no ; then
12038         cat >> confdefs.h <<\EOF
12039 #define SLAPD_CRYPT 1
12040 EOF
12041
12042 fi
12043 if test "$ol_enable_cleartext" != no ; then
12044         cat >> confdefs.h <<\EOF
12045 #define SLAPD_CLEARTEXT 1
12046 EOF
12047
12048 fi
12049 if test "$ol_enable_phonetic" != no ; then
12050         cat >> confdefs.h <<\EOF
12051 #define SLAPD_PHONETIC 1
12052 EOF
12053
12054 fi
12055 if test "$ol_enable_rlookups" != no ; then
12056         cat >> confdefs.h <<\EOF
12057 #define SLAPD_RLOOKUPS 1
12058 EOF
12059
12060 fi
12061
12062 if test "$ol_link_modules" != no ; then
12063         cat >> confdefs.h <<\EOF
12064 #define SLAPD_MODULES 1
12065 EOF
12066
12067         BUILD_SLAPD=yes
12068 fi
12069
12070 if test "$ol_link_bdb2" != no ; then
12071         cat >> confdefs.h <<\EOF
12072 #define SLAPD_BDB2 1
12073 EOF
12074
12075         BUILD_SLAPD=yes
12076         BUILD_BDB2=yes
12077         if test "$ol_with_bdb2_module" != static ; then
12078                 cat >> confdefs.h <<\EOF
12079 #define SLAPD_BDB2_DYNAMIC 1
12080 EOF
12081
12082                 BUILD_BDB2_DYNAMIC=yes
12083         fi
12084 fi
12085
12086 if test "$ol_enable_ldap" != no ; then
12087         cat >> confdefs.h <<\EOF
12088 #define SLAPD_LDAP 1
12089 EOF
12090
12091         BUILD_SLAPD=yes
12092         BUILD_LDAP=yes
12093         if test "$ol_with_ldap_module" != static ; then
12094                 cat >> confdefs.h <<\EOF
12095 #define SLAPD_LDAP_DYNAMIC 1
12096 EOF
12097
12098                 BUILD_LDAP_DYNAMIC=yes
12099         fi
12100 fi
12101
12102 if test "$ol_link_ldbm" != no ; then
12103         cat >> confdefs.h <<\EOF
12104 #define SLAPD_LDBM 1
12105 EOF
12106
12107         BUILD_SLAPD=yes
12108         BUILD_LDBM=yes
12109         if test "$ol_with_ldbm_module" != static ; then
12110                 cat >> confdefs.h <<\EOF
12111 #define SLAPD_LDBM_DYNAMIC 1
12112 EOF
12113
12114                 BUILD_LDBM_DYNAMIC=yes
12115         fi
12116 fi
12117
12118 if test "$ol_enable_passwd" != no ; then
12119         cat >> confdefs.h <<\EOF
12120 #define SLAPD_PASSWD 1
12121 EOF
12122
12123         BUILD_SLAPD=yes
12124         BUILD_PASSWD=yes
12125         if test "$ol_with_passwd_module" != static ; then
12126                 cat >> confdefs.h <<\EOF
12127 #define SLAPD_PASSWD_DYNAMIC 1
12128 EOF
12129
12130                 BUILD_PASSWD_DYNAMIC=yes
12131         fi
12132 fi
12133
12134 if test "$ol_link_perl" != no ; then
12135         cat >> confdefs.h <<\EOF
12136 #define SLAPD_PERL 1
12137 EOF
12138
12139         BUILD_SLAPD=yes
12140         BUILD_PERL=yes
12141         if test "$ol_with_perl_module" != static ; then
12142                 cat >> confdefs.h <<\EOF
12143 #define SLAPD_PERL_DYNAMIC 1
12144 EOF
12145
12146                 BUILD_PERL_DYNAMIC=yes
12147         fi
12148 fi
12149
12150 if test "$ol_enable_shell" != no ; then
12151         cat >> confdefs.h <<\EOF
12152 #define SLAPD_SHELL 1
12153 EOF
12154
12155         BUILD_SLAPD=yes
12156         BUILD_SHELL=yes
12157         if test "$ol_with_shell_module" != static ; then
12158                 cat >> confdefs.h <<\EOF
12159 #define SLAPD_SHELL_DYNAMIC 1
12160 EOF
12161
12162                 BUILD_SHELL_DYNAMIC=yes
12163         fi
12164 fi
12165
12166 if test "$ol_enable_tcl" != no ; then
12167         cat >> confdefs.h <<\EOF
12168 #define SLAPD_TCL 1
12169 EOF
12170
12171         BUILD_SLAPD=yes
12172         BUILD_TCL=yes
12173         if test "$ol_with_tcl_module" != static; then
12174                 cat >> confdefs.h <<\EOF
12175 #define SLAPD_TCL_DYNAMIC 1
12176 EOF
12177
12178                 BUILD_TCL_DYNAMIC=yes
12179         fi
12180 fi
12181
12182 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12183         $BUILD_SLAPD = yes ; then
12184         BUILD_SLURPD=yes
12185 fi
12186
12187 if test "$ol_link_isode" != no ; then
12188         BUILD_LDAPD=yes
12189 fi
12190
12191
12192
12193
12194   
12195   
12196   
12197   
12198   
12199   
12200   
12201   
12202   
12203   
12204   
12205   
12206   
12207   
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230 trap '' 1 2 15
12231
12232 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12233
12234 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12235 # Let make expand exec_prefix.
12236 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12237
12238 # Any assignment to VPATH causes Sun make to only execute
12239 # the first set of double-colon rules, so remove it if not needed.
12240 # If there is a colon in the path, we need to keep it.
12241 if test "x$srcdir" = x.; then
12242   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12243 fi
12244
12245 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12246
12247 DEFS=-DHAVE_CONFIG_H
12248
12249 # Without the "./", some shells look in PATH for config.status.
12250 : ${CONFIG_STATUS=./config.status}
12251
12252 echo creating $CONFIG_STATUS
12253 rm -f $CONFIG_STATUS
12254 cat > $CONFIG_STATUS <<EOF
12255 #! /bin/sh
12256 # Generated automatically by configure.
12257 # Run this file to recreate the current configuration.
12258 # This directory was configured as follows,
12259 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12260 #
12261 # $0 $ac_configure_args
12262 #
12263 # Compiler output produced by configure, useful for debugging
12264 # configure, is in ./config.log if it exists.
12265
12266 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12267 for ac_option
12268 do
12269   case "\$ac_option" in
12270   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12271     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12272     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12273   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12274     echo "$CONFIG_STATUS generated by autoconf version 2.14.1"
12275     exit 0 ;;
12276   -help | --help | --hel | --he | --h)
12277     echo "\$ac_cs_usage"; exit 0 ;;
12278   *) echo "\$ac_cs_usage"; exit 1 ;;
12279   esac
12280 done
12281
12282 ac_given_srcdir=$srcdir
12283 ac_given_INSTALL="$INSTALL"
12284
12285 trap 'rm -fr `echo "\
12286 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12287 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12288 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12289 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12290 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12291 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12292 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12293 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12294 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12295 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12296 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12297 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12298 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12299 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12300 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12301 include/Makefile:build/top.mk:include/Makefile.in \
12302 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12303 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12304 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12305 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12306 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12307 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12308 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12309 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12310 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12311 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12312 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12313 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12314 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12315 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12316 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12317 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12318 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12319 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12320 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12321 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12322 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12323 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12324 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12325 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12326 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12327 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12328  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12329 EOF
12330 cat >> $CONFIG_STATUS <<EOF
12331
12332 # Protect against being on the right side of a sed subst in config.status.
12333 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12334  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12335 $ac_vpsub
12336 $extrasub
12337 s%@SHELL@%$SHELL%g
12338 s%@CFLAGS@%$CFLAGS%g
12339 s%@CPPFLAGS@%$CPPFLAGS%g
12340 s%@CXXFLAGS@%$CXXFLAGS%g
12341 s%@FFLAGS@%$FFLAGS%g
12342 s%@DEFS@%$DEFS%g
12343 s%@LDFLAGS@%$LDFLAGS%g
12344 s%@LIBS@%$LIBS%g
12345 s%@exec_prefix@%$exec_prefix%g
12346 s%@prefix@%$prefix%g
12347 s%@program_transform_name@%$program_transform_name%g
12348 s%@bindir@%$bindir%g
12349 s%@sbindir@%$sbindir%g
12350 s%@libexecdir@%$libexecdir%g
12351 s%@datadir@%$datadir%g
12352 s%@sysconfdir@%$sysconfdir%g
12353 s%@sharedstatedir@%$sharedstatedir%g
12354 s%@localstatedir@%$localstatedir%g
12355 s%@libdir@%$libdir%g
12356 s%@includedir@%$includedir%g
12357 s%@oldincludedir@%$oldincludedir%g
12358 s%@infodir@%$infodir%g
12359 s%@mandir@%$mandir%g
12360 s%@host@%$host%g
12361 s%@host_alias@%$host_alias%g
12362 s%@host_cpu@%$host_cpu%g
12363 s%@host_vendor@%$host_vendor%g
12364 s%@host_os@%$host_os%g
12365 s%@target@%$target%g
12366 s%@target_alias@%$target_alias%g
12367 s%@target_cpu@%$target_cpu%g
12368 s%@target_vendor@%$target_vendor%g
12369 s%@target_os@%$target_os%g
12370 s%@build@%$build%g
12371 s%@build_alias@%$build_alias%g
12372 s%@build_cpu@%$build_cpu%g
12373 s%@build_vendor@%$build_vendor%g
12374 s%@build_os@%$build_os%g
12375 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12376 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12377 s%@INSTALL_DATA@%$INSTALL_DATA%g
12378 s%@PACKAGE@%$PACKAGE%g
12379 s%@VERSION@%$VERSION%g
12380 s%@ACLOCAL@%$ACLOCAL%g
12381 s%@AUTOCONF@%$AUTOCONF%g
12382 s%@AUTOMAKE@%$AUTOMAKE%g
12383 s%@AUTOHEADER@%$AUTOHEADER%g
12384 s%@MAKEINFO@%$MAKEINFO%g
12385 s%@SET_MAKE@%$SET_MAKE%g
12386 s%@top_builddir@%$top_builddir%g
12387 s%@ldap_subdir@%$ldap_subdir%g
12388 s%@CC@%$CC%g
12389 s%@RANLIB@%$RANLIB%g
12390 s%@LD@%$LD%g
12391 s%@NM@%$NM%g
12392 s%@LN_S@%$LN_S%g
12393 s%@LIBTOOL@%$LIBTOOL%g
12394 s%@AWK@%$AWK%g
12395 s%@LN_H@%$LN_H%g
12396 s%@SENDMAIL@%$SENDMAIL%g
12397 s%@EDITOR@%$EDITOR%g
12398 s%@FINGER@%$FINGER%g
12399 s%@GLIBCONFIG@%$GLIBCONFIG%g
12400 s%@PERLBIN@%$PERLBIN%g
12401 s%@CPP@%$CPP%g
12402 s%@EXEEXT@%$EXEEXT%g
12403 s%@OBJEXT@%$OBJEXT%g
12404 s%@OL_MKDEP@%$OL_MKDEP%g
12405 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
12406 s%@PEPSY@%$PEPSY%g
12407 s%@LIBOBJS@%$LIBOBJS%g
12408 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
12409 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
12410 s%@BUILD_BDB2@%$BUILD_BDB2%g
12411 s%@BUILD_LDAP@%$BUILD_LDAP%g
12412 s%@BUILD_LDBM@%$BUILD_LDBM%g
12413 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
12414 s%@BUILD_PERL@%$BUILD_PERL%g
12415 s%@BUILD_SHELL@%$BUILD_SHELL%g
12416 s%@BUILD_TCL@%$BUILD_TCL%g
12417 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
12418 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
12419 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
12420 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
12421 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
12422 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
12423 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
12424 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
12425 s%@LDAP_LIBS@%$LDAP_LIBS%g
12426 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
12427 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
12428 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
12429 s%@LDBM_LIBS@%$LDBM_LIBS%g
12430 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
12431 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
12432 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
12433 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
12434 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
12435 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
12436 s%@KRB_LIBS@%$KRB_LIBS%g
12437 s%@READLINE_LIBS@%$READLINE_LIBS%g
12438 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
12439 s%@TLS_LIBS@%$TLS_LIBS%g
12440
12441 CEOF
12442 EOF
12443
12444 cat >> $CONFIG_STATUS <<\EOF
12445
12446 # Split the substitutions into bite-sized pieces for seds with
12447 # small command number limits, like on Digital OSF/1 and HP-UX.
12448 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12449 ac_file=1 # Number of current file.
12450 ac_beg=1 # First line for current file.
12451 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12452 ac_more_lines=:
12453 ac_sed_cmds=""
12454 while $ac_more_lines; do
12455   if test $ac_beg -gt 1; then
12456     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12457   else
12458     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12459   fi
12460   if test ! -s conftest.s$ac_file; then
12461     ac_more_lines=false
12462     rm -f conftest.s$ac_file
12463   else
12464     if test -z "$ac_sed_cmds"; then
12465       ac_sed_cmds="sed -f conftest.s$ac_file"
12466     else
12467       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12468     fi
12469     ac_file=`expr $ac_file + 1`
12470     ac_beg=$ac_end
12471     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12472   fi
12473 done
12474 if test -z "$ac_sed_cmds"; then
12475   ac_sed_cmds=cat
12476 fi
12477 EOF
12478
12479 cat >> $CONFIG_STATUS <<EOF
12480
12481 CONFIG_FILES=\${CONFIG_FILES-"\
12482 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12483 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12484 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12485 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12486 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12487 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12488 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12489 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12490 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12491 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12492 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12493 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12494 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12495 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12496 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12497 include/Makefile:build/top.mk:include/Makefile.in \
12498 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12499 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12500 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12501 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12502 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12503 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12504 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12505 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12506 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12507 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12508 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12509 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12510 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12511 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12512 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12513 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12514 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12515 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12516 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12517 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12518 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12519 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12520 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12521 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12522 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12523 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12524 "}
12525 EOF
12526 cat >> $CONFIG_STATUS <<\EOF
12527 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12528   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12529   case "$ac_file" in
12530   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12531        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12532   *) ac_file_in="${ac_file}.in" ;;
12533   esac
12534
12535   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12536
12537   # Remove last slash and all that follows it.  Not all systems have dirname.
12538   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12539   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12540     # The file is in a subdirectory.
12541     test ! -d "$ac_dir" && mkdir "$ac_dir"
12542     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12543     # A "../" for each directory in $ac_dir_suffix.
12544     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12545   else
12546     ac_dir_suffix= ac_dots=
12547   fi
12548
12549   case "$ac_given_srcdir" in
12550   .)  srcdir=.
12551       if test -z "$ac_dots"; then top_srcdir=.
12552       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12553   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12554   *) # Relative path.
12555     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12556     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12557   esac
12558
12559   case "$ac_given_INSTALL" in
12560   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12561   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12562   esac
12563
12564   echo creating "$ac_file"
12565   rm -f "$ac_file"
12566   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12567   case "$ac_file" in
12568   *Makefile*) ac_comsub="1i\\
12569 # $configure_input" ;;
12570   *) ac_comsub= ;;
12571   esac
12572
12573   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12574   sed -e "$ac_comsub
12575 s%@configure_input@%$configure_input%g
12576 s%@srcdir@%$srcdir%g
12577 s%@top_srcdir@%$top_srcdir%g
12578 s%@INSTALL@%$INSTALL%g
12579 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12580 fi; done
12581 rm -f conftest.s*
12582
12583 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12584 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12585 #
12586 # ac_d sets the value in "#define NAME VALUE" lines.
12587 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12588 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12589 ac_dC='\3'
12590 ac_dD='%g'
12591 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12592 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12593 ac_uB='\([      ]\)%\1#\2define\3'
12594 ac_uC=' '
12595 ac_uD='\4%g'
12596 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12597 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12598 ac_eB='$%\1#\2define\3'
12599 ac_eC=' '
12600 ac_eD='%g'
12601
12602 if test "${CONFIG_HEADERS+set}" != set; then
12603 EOF
12604 cat >> $CONFIG_STATUS <<EOF
12605   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
12606 EOF
12607 cat >> $CONFIG_STATUS <<\EOF
12608 fi
12609 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12610   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12611   case "$ac_file" in
12612   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12613        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12614   *) ac_file_in="${ac_file}.in" ;;
12615   esac
12616
12617   echo creating $ac_file
12618
12619   rm -f conftest.frag conftest.in conftest.out
12620   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12621   cat $ac_file_inputs > conftest.in
12622
12623 EOF
12624
12625 # Transform confdefs.h into a sed script conftest.vals that substitutes
12626 # the proper values into config.h.in to produce config.h.  And first:
12627 # Protect against being on the right side of a sed subst in config.status.
12628 # Protect against being in an unquoted here document in config.status.
12629 rm -f conftest.vals
12630 cat > conftest.hdr <<\EOF
12631 s/[\\&%]/\\&/g
12632 s%[\\$`]%\\&%g
12633 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12634 s%ac_d%ac_u%gp
12635 s%ac_u%ac_e%gp
12636 EOF
12637 sed -n -f conftest.hdr confdefs.h > conftest.vals
12638 rm -f conftest.hdr
12639
12640 # This sed command replaces #undef with comments.  This is necessary, for
12641 # example, in the case of _POSIX_SOURCE, which is predefined and required
12642 # on some systems where configure will not decide to define it.
12643 cat >> conftest.vals <<\EOF
12644 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12645 EOF
12646
12647 # Break up conftest.vals because some shells have a limit on
12648 # the size of here documents, and old seds have small limits too.
12649
12650 rm -f conftest.tail
12651 while :
12652 do
12653   ac_lines=`grep -c . conftest.vals`
12654   # grep -c gives empty output for an empty file on some AIX systems.
12655   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12656   # Write a limited-size here document to conftest.frag.
12657   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12658   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12659   echo 'CEOF
12660   sed -f conftest.frag conftest.in > conftest.out
12661   rm -f conftest.in
12662   mv conftest.out conftest.in
12663 ' >> $CONFIG_STATUS
12664   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12665   rm -f conftest.vals
12666   mv conftest.tail conftest.vals
12667 done
12668 rm -f conftest.vals
12669
12670 cat >> $CONFIG_STATUS <<\EOF
12671   rm -f conftest.frag conftest.h
12672   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12673   cat conftest.in >> conftest.h
12674   rm -f conftest.in
12675   if cmp -s $ac_file conftest.h 2>/dev/null; then
12676     echo "$ac_file is unchanged"
12677     rm -f conftest.h
12678   else
12679     # Remove last slash and all that follows it.  Not all systems have dirname.
12680       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12681       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12682       # The file is in a subdirectory.
12683       test ! -d "$ac_dir" && mkdir "$ac_dir"
12684     fi
12685     rm -f $ac_file
12686     mv conftest.h $ac_file
12687   fi
12688 fi; done
12689
12690 EOF
12691 cat >> $CONFIG_STATUS <<EOF
12692
12693 EOF
12694 cat >> $CONFIG_STATUS <<\EOF
12695
12696 date > stamp-h
12697 echo Please \"make depend\" to build dependencies
12698
12699 exit 0
12700 EOF
12701 chmod +x $CONFIG_STATUS
12702 rm -fr confdefs* $ac_clean_files
12703 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
12704