]> git.sur5r.net Git - openldap/blob - configure
0c12cb51e08f9497023903b9e94e5d9b51c91cb8
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-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.13"
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=$ac_aux_dir/config.guess
633 ac_config_sub=$ac_aux_dir/config.sub
634 ac_configure=$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 # Do some error checking and defaulting for the host and target type.
643 # The inputs are:
644 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
645 #
646 # The rules are:
647 # 1. You are not allowed to specify --host, --target, and nonopt at the
648 #    same time.
649 # 2. Host defaults to nonopt.
650 # 3. If nonopt is not specified, then host defaults to the current host,
651 #    as determined by config.guess.
652 # 4. Target and build default to nonopt.
653 # 5. If nonopt is not specified, then target and build default to host.
654
655 # The aliases save the names the user supplied, while $host etc.
656 # will get canonicalized.
657 case $host---$target---$nonopt in
658 NONE---*---* | *---NONE---* | *---*---NONE) ;;
659 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
660 esac
661
662
663 # Make sure we can run config.sub.
664 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
665 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
666 fi
667
668 echo $ac_n "checking host system type""... $ac_c" 1>&6
669 echo "configure:670: checking host system type" >&5
670
671 host_alias=$host
672 case "$host_alias" in
673 NONE)
674   case $nonopt in
675   NONE)
676     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
677     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
678     fi ;;
679   *) host_alias=$nonopt ;;
680   esac ;;
681 esac
682
683 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
684 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
685 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
686 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
687 echo "$ac_t""$host" 1>&6
688
689 echo $ac_n "checking target system type""... $ac_c" 1>&6
690 echo "configure:691: checking target system type" >&5
691
692 target_alias=$target
693 case "$target_alias" in
694 NONE)
695   case $nonopt in
696   NONE) target_alias=$host_alias ;;
697   *) target_alias=$nonopt ;;
698   esac ;;
699 esac
700
701 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
702 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
703 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
704 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
705 echo "$ac_t""$target" 1>&6
706
707 echo $ac_n "checking build system type""... $ac_c" 1>&6
708 echo "configure:709: checking build system type" >&5
709
710 build_alias=$build
711 case "$build_alias" in
712 NONE)
713   case $nonopt in
714   NONE) build_alias=$host_alias ;;
715   *) build_alias=$nonopt ;;
716   esac ;;
717 esac
718
719 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
720 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
721 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
722 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
723 echo "$ac_t""$build" 1>&6
724
725 test "$host_alias" != "$target_alias" &&
726   test "$program_prefix$program_suffix$program_transform_name" = \
727     NONENONEs,x,x, &&
728   program_prefix=${target_alias}-
729
730
731 # Find a good install program.  We prefer a C program (faster),
732 # so one script is as good as another.  But avoid the broken or
733 # incompatible versions:
734 # SysV /etc/install, /usr/sbin/install
735 # SunOS /usr/etc/install
736 # IRIX /sbin/install
737 # AIX /bin/install
738 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
739 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
740 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
741 # ./install, which can be erroneously created by make from ./install.sh.
742 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
743 echo "configure:744: checking for a BSD compatible install" >&5
744 if test -z "$INSTALL"; then
745 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
746   echo $ac_n "(cached) $ac_c" 1>&6
747 else
748     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
749   for ac_dir in $PATH; do
750     # Account for people who put trailing slashes in PATH elements.
751     case "$ac_dir/" in
752     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
753     *)
754       # OSF1 and SCO ODT 3.0 have their own names for install.
755       # Don't use installbsd from OSF since it installs stuff as root
756       # by default.
757       for ac_prog in ginstall scoinst install; do
758         if test -f $ac_dir/$ac_prog; then
759           if test $ac_prog = install &&
760             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
761             # AIX install.  It has an incompatible calling convention.
762             :
763           else
764             ac_cv_path_install="$ac_dir/$ac_prog -c"
765             break 2
766           fi
767         fi
768       done
769       ;;
770     esac
771   done
772   IFS="$ac_save_IFS"
773
774 fi
775   if test "${ac_cv_path_install+set}" = set; then
776     INSTALL="$ac_cv_path_install"
777   else
778     # As a last resort, use the slow shell script.  We don't cache a
779     # path for INSTALL within a source directory, because that will
780     # break other packages using the cache if that directory is
781     # removed, or if the path is relative.
782     INSTALL="$ac_install_sh"
783   fi
784 fi
785 echo "$ac_t""$INSTALL" 1>&6
786
787 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
788 # It thinks the first close brace ends the variable substitution.
789 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
790
791 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
792
793 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
794
795 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
796 echo "configure:797: checking whether build environment is sane" >&5
797 # Just in case
798 sleep 1
799 echo timestamp > conftestfile
800 # Do `set' in a subshell so we don't clobber the current shell's
801 # arguments.  Must try -L first in case configure is actually a
802 # symlink; some systems play weird games with the mod time of symlinks
803 # (eg FreeBSD returns the mod time of the symlink's containing
804 # directory).
805 if (
806    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
807    if test "$*" = "X"; then
808       # -L didn't work.
809       set X `ls -t $srcdir/configure conftestfile`
810    fi
811    if test "$*" != "X $srcdir/configure conftestfile" \
812       && test "$*" != "X conftestfile $srcdir/configure"; then
813
814       # If neither matched, then we have a broken ls.  This can happen
815       # if, for instance, CONFIG_SHELL is bash and it inherits a
816       # broken ls alias from the environment.  This has actually
817       # happened.  Such a system could not be considered "sane".
818       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
819 alias in your environment" 1>&2; exit 1; }
820    fi
821
822    test "$2" = conftestfile
823    )
824 then
825    # Ok.
826    :
827 else
828    { echo "configure: error: newly created file is older than distributed files!
829 Check your system clock" 1>&2; exit 1; }
830 fi
831 rm -f conftest*
832 echo "$ac_t""yes" 1>&6
833 if test "$program_transform_name" = s,x,x,; then
834   program_transform_name=
835 else
836   # Double any \ or $.  echo might interpret backslashes.
837   cat <<\EOF_SED > conftestsed
838 s,\\,\\\\,g; s,\$,$$,g
839 EOF_SED
840   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
841   rm -f conftestsed
842 fi
843 test "$program_prefix" != NONE &&
844   program_transform_name="s,^,${program_prefix},; $program_transform_name"
845 # Use a double $ so make ignores it.
846 test "$program_suffix" != NONE &&
847   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
848
849 # sed with no file args requires a program.
850 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
851
852 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
853 echo "configure:854: checking whether ${MAKE-make} sets \${MAKE}" >&5
854 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
855 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
856   echo $ac_n "(cached) $ac_c" 1>&6
857 else
858   cat > conftestmake <<\EOF
859 all:
860         @echo 'ac_maketemp="${MAKE}"'
861 EOF
862 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
863 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
864 if test -n "$ac_maketemp"; then
865   eval ac_cv_prog_make_${ac_make}_set=yes
866 else
867   eval ac_cv_prog_make_${ac_make}_set=no
868 fi
869 rm -f conftestmake
870 fi
871 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
872   echo "$ac_t""yes" 1>&6
873   SET_MAKE=
874 else
875   echo "$ac_t""no" 1>&6
876   SET_MAKE="MAKE=${MAKE-make}"
877 fi
878
879
880 PACKAGE=OpenLDAP
881
882 VERSION=$OL_VERSION
883
884 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
885   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
886 fi
887
888
889
890 missing_dir=`cd $ac_aux_dir && pwd`
891 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
892 echo "configure:893: checking for working aclocal" >&5
893 # Run test in a subshell; some versions of sh will print an error if
894 # an executable is not found, even if stderr is redirected.
895 # Redirect stdin to placate older versions of autoconf.  Sigh.
896 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
897    ACLOCAL=aclocal
898    echo "$ac_t""found" 1>&6
899 else
900    ACLOCAL="$missing_dir/missing aclocal"
901    echo "$ac_t""missing" 1>&6
902 fi
903
904 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
905 echo "configure:906: checking for working autoconf" >&5
906 # Run test in a subshell; some versions of sh will print an error if
907 # an executable is not found, even if stderr is redirected.
908 # Redirect stdin to placate older versions of autoconf.  Sigh.
909 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
910    AUTOCONF=autoconf
911    echo "$ac_t""found" 1>&6
912 else
913    AUTOCONF="$missing_dir/missing autoconf"
914    echo "$ac_t""missing" 1>&6
915 fi
916
917 echo $ac_n "checking for working automake""... $ac_c" 1>&6
918 echo "configure:919: checking for working automake" >&5
919 # Run test in a subshell; some versions of sh will print an error if
920 # an executable is not found, even if stderr is redirected.
921 # Redirect stdin to placate older versions of autoconf.  Sigh.
922 if (automake --version) < /dev/null > /dev/null 2>&1; then
923    AUTOMAKE=automake
924    echo "$ac_t""found" 1>&6
925 else
926    AUTOMAKE="$missing_dir/missing automake"
927    echo "$ac_t""missing" 1>&6
928 fi
929
930 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
931 echo "configure:932: checking for working autoheader" >&5
932 # Run test in a subshell; some versions of sh will print an error if
933 # an executable is not found, even if stderr is redirected.
934 # Redirect stdin to placate older versions of autoconf.  Sigh.
935 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
936    AUTOHEADER=autoheader
937    echo "$ac_t""found" 1>&6
938 else
939    AUTOHEADER="$missing_dir/missing autoheader"
940    echo "$ac_t""missing" 1>&6
941 fi
942
943 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
944 echo "configure:945: checking for working makeinfo" >&5
945 # Run test in a subshell; some versions of sh will print an error if
946 # an executable is not found, even if stderr is redirected.
947 # Redirect stdin to placate older versions of autoconf.  Sigh.
948 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
949    MAKEINFO=makeinfo
950    echo "$ac_t""found" 1>&6
951 else
952    MAKEINFO="$missing_dir/missing makeinfo"
953    echo "$ac_t""missing" 1>&6
954 fi
955
956
957
958 cat >> confdefs.h <<EOF
959 #define OPENLDAP_PACKAGE "$PACKAGE"
960 EOF
961
962 cat >> confdefs.h <<EOF
963 #define OPENLDAP_VERSION "$VERSION"
964 EOF
965
966
967
968
969 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
970 echo "configure:971: checking configure arguments" >&5
971
972
973 top_builddir=`pwd`
974
975 cat >> confdefs.h <<\EOF
976 #define HAVE_MKVERSION 1
977 EOF
978
979
980 ldap_subdir="openldap"
981
982 # Check whether --with-subdir or --without-subdir was given.
983 if test "${with_subdir+set}" = set; then
984   withval="$with_subdir"
985   
986         if test "$withval" = "no"; then
987                 ldap_subdir=""
988         elif test "$withval" != "yes"; then
989                 ldap_subdir="$withval"
990         fi
991
992 fi
993
994
995 # OpenLDAP --enable-debug
996         # Check whether --enable-debug or --disable-debug was given.
997 if test "${enable_debug+set}" = set; then
998   enableval="$enable_debug"
999   
1000         ol_arg=invalid
1001         for ol_val in auto yes no ; do
1002                 if test "$enableval" = "$ol_val" ; then
1003                         ol_arg="$ol_val"
1004                 fi
1005         done
1006         if test "$ol_arg" = "invalid" ; then
1007                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1008         fi
1009         ol_enable_debug="$ol_arg"
1010
1011 else
1012         ol_enable_debug="yes"
1013 fi
1014 # end --enable-debug
1015 # OpenLDAP --enable-syslog
1016         # Check whether --enable-syslog or --disable-syslog was given.
1017 if test "${enable_syslog+set}" = set; then
1018   enableval="$enable_syslog"
1019   
1020         ol_arg=invalid
1021         for ol_val in auto yes no ; do
1022                 if test "$enableval" = "$ol_val" ; then
1023                         ol_arg="$ol_val"
1024                 fi
1025         done
1026         if test "$ol_arg" = "invalid" ; then
1027                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1028         fi
1029         ol_enable_syslog="$ol_arg"
1030
1031 else
1032         ol_enable_syslog="auto"
1033 fi
1034 # end --enable-syslog
1035 # OpenLDAP --enable-proctitle
1036         # Check whether --enable-proctitle or --disable-proctitle was given.
1037 if test "${enable_proctitle+set}" = set; then
1038   enableval="$enable_proctitle"
1039   
1040         ol_arg=invalid
1041         for ol_val in auto yes no ; do
1042                 if test "$enableval" = "$ol_val" ; then
1043                         ol_arg="$ol_val"
1044                 fi
1045         done
1046         if test "$ol_arg" = "invalid" ; then
1047                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1048         fi
1049         ol_enable_proctitle="$ol_arg"
1050
1051 else
1052         ol_enable_proctitle="yes"
1053 fi
1054 # end --enable-proctitle
1055 # OpenLDAP --enable-cache
1056         # Check whether --enable-cache or --disable-cache was given.
1057 if test "${enable_cache+set}" = set; then
1058   enableval="$enable_cache"
1059   
1060         ol_arg=invalid
1061         for ol_val in auto yes no ; do
1062                 if test "$enableval" = "$ol_val" ; then
1063                         ol_arg="$ol_val"
1064                 fi
1065         done
1066         if test "$ol_arg" = "invalid" ; then
1067                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1068         fi
1069         ol_enable_cache="$ol_arg"
1070
1071 else
1072         ol_enable_cache="yes"
1073 fi
1074 # end --enable-cache
1075 # OpenLDAP --enable-dns
1076         # Check whether --enable-dns or --disable-dns was given.
1077 if test "${enable_dns+set}" = set; then
1078   enableval="$enable_dns"
1079   
1080         ol_arg=invalid
1081         for ol_val in auto yes no ; do
1082                 if test "$enableval" = "$ol_val" ; then
1083                         ol_arg="$ol_val"
1084                 fi
1085         done
1086         if test "$ol_arg" = "invalid" ; then
1087                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1088         fi
1089         ol_enable_dns="$ol_arg"
1090
1091 else
1092         ol_enable_dns="no"
1093 fi
1094 # end --enable-dns
1095 # OpenLDAP --enable-referrals
1096         # Check whether --enable-referrals or --disable-referrals was given.
1097 if test "${enable_referrals+set}" = set; then
1098   enableval="$enable_referrals"
1099   
1100         ol_arg=invalid
1101         for ol_val in auto yes no ; do
1102                 if test "$enableval" = "$ol_val" ; then
1103                         ol_arg="$ol_val"
1104                 fi
1105         done
1106         if test "$ol_arg" = "invalid" ; then
1107                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1108         fi
1109         ol_enable_referrals="$ol_arg"
1110
1111 else
1112         ol_enable_referrals="yes"
1113 fi
1114 # end --enable-referrals
1115 # OpenLDAP --enable-cldap
1116         # Check whether --enable-cldap or --disable-cldap was given.
1117 if test "${enable_cldap+set}" = set; then
1118   enableval="$enable_cldap"
1119   
1120         ol_arg=invalid
1121         for ol_val in auto yes no ; do
1122                 if test "$enableval" = "$ol_val" ; then
1123                         ol_arg="$ol_val"
1124                 fi
1125         done
1126         if test "$ol_arg" = "invalid" ; then
1127                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1128         fi
1129         ol_enable_cldap="$ol_arg"
1130
1131 else
1132         ol_enable_cldap="no"
1133 fi
1134 # end --enable-cldap
1135 # OpenLDAP --enable-x_compile
1136         # Check whether --enable-x_compile or --disable-x_compile was given.
1137 if test "${enable_x_compile+set}" = set; then
1138   enableval="$enable_x_compile"
1139   
1140         ol_arg=invalid
1141         for ol_val in yes no ; do
1142                 if test "$enableval" = "$ol_val" ; then
1143                         ol_arg="$ol_val"
1144                 fi
1145         done
1146         if test "$ol_arg" = "invalid" ; then
1147                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1148         fi
1149         ol_enable_x_compile="$ol_arg"
1150
1151 else
1152         ol_enable_x_compile="no"
1153 fi
1154 # end --enable-x_compile
1155
1156 # OpenLDAP --enable-dmalloc
1157         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1158 if test "${enable_dmalloc+set}" = set; then
1159   enableval="$enable_dmalloc"
1160   
1161         ol_arg=invalid
1162         for ol_val in auto yes no ; do
1163                 if test "$enableval" = "$ol_val" ; then
1164                         ol_arg="$ol_val"
1165                 fi
1166         done
1167         if test "$ol_arg" = "invalid" ; then
1168                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1169         fi
1170         ol_enable_dmalloc="$ol_arg"
1171
1172 else
1173         ol_enable_dmalloc="no"
1174 fi
1175 # end --enable-dmalloc
1176
1177 # OpenLDAP --with-kerberos
1178         # Check whether --with-kerberos or --without-kerberos was given.
1179 if test "${with_kerberos+set}" = set; then
1180   withval="$with_kerberos"
1181   
1182         ol_arg=invalid
1183         for ol_val in auto k5 k4 afs yes no ; do
1184                 if test "$withval" = "$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 $withval for --with-kerberos" 1>&2; exit 1; }
1190         fi
1191         ol_with_kerberos="$ol_arg"
1192
1193 else
1194         ol_with_kerberos="auto"
1195 fi
1196 # end --with-kerberos
1197
1198 # OpenLDAP --with-readline
1199         # Check whether --with-readline or --without-readline was given.
1200 if test "${with_readline+set}" = set; then
1201   withval="$with_readline"
1202   
1203         ol_arg=invalid
1204         for ol_val in auto yes no  ; do
1205                 if test "$withval" = "$ol_val" ; then
1206                         ol_arg="$ol_val"
1207                 fi
1208         done
1209         if test "$ol_arg" = "invalid" ; then
1210                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1211         fi
1212         ol_with_readline="$ol_arg"
1213
1214 else
1215         ol_with_readline="auto"
1216 fi
1217 # end --with-readline
1218
1219 # OpenLDAP --with-threads
1220         # Check whether --with-threads or --without-threads was given.
1221 if test "${with_threads+set}" = set; then
1222   withval="$with_threads"
1223   
1224         ol_arg=invalid
1225         for ol_val in auto posix mach lwp yes no manual  ; do
1226                 if test "$withval" = "$ol_val" ; then
1227                         ol_arg="$ol_val"
1228                 fi
1229         done
1230         if test "$ol_arg" = "invalid" ; then
1231                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1232         fi
1233         ol_with_threads="$ol_arg"
1234
1235 else
1236         ol_with_threads="auto"
1237 fi
1238 # end --with-threads
1239
1240 # OpenLDAP --with-tls
1241         # Check whether --with-tls or --without-tls was given.
1242 if test "${with_tls+set}" = set; then
1243   withval="$with_tls"
1244   
1245         ol_arg=invalid
1246         for ol_val in auto ssleay openssl yes no  ; do
1247                 if test "$withval" = "$ol_val" ; then
1248                         ol_arg="$ol_val"
1249                 fi
1250         done
1251         if test "$ol_arg" = "invalid" ; then
1252                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1253         fi
1254         ol_with_tls="$ol_arg"
1255
1256 else
1257         ol_with_tls="auto"
1258 fi
1259 # end --with-tls
1260
1261 # OpenLDAP --with-yielding_select
1262         # Check whether --with-yielding_select or --without-yielding_select was given.
1263 if test "${with_yielding_select+set}" = set; then
1264   withval="$with_yielding_select"
1265   
1266         ol_arg=invalid
1267         for ol_val in auto yes no manual  ; do
1268                 if test "$withval" = "$ol_val" ; then
1269                         ol_arg="$ol_val"
1270                 fi
1271         done
1272         if test "$ol_arg" = "invalid" ; then
1273                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1274         fi
1275         ol_with_yielding_select="$ol_arg"
1276
1277 else
1278         ol_with_yielding_select="auto"
1279 fi
1280 # end --with-yielding_select
1281
1282
1283
1284 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1285 if test "${with_xxldapdoptions+set}" = set; then
1286   withval="$with_xxldapdoptions"
1287   :
1288 fi
1289
1290 # OpenLDAP --enable-ldapd
1291         # Check whether --enable-ldapd or --disable-ldapd was given.
1292 if test "${enable_ldapd+set}" = set; then
1293   enableval="$enable_ldapd"
1294   
1295         ol_arg=invalid
1296         for ol_val in auto yes no ; do
1297                 if test "$enableval" = "$ol_val" ; then
1298                         ol_arg="$ol_val"
1299                 fi
1300         done
1301         if test "$ol_arg" = "invalid" ; then
1302                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1303         fi
1304         ol_enable_ldapd="$ol_arg"
1305
1306 else
1307         ol_enable_ldapd="no"
1308 fi
1309 # end --enable-ldapd
1310
1311 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1312 if test "${with_xxslapdoptions+set}" = set; then
1313   withval="$with_xxslapdoptions"
1314   :
1315 fi
1316
1317 # OpenLDAP --enable-slapd
1318         # Check whether --enable-slapd or --disable-slapd was given.
1319 if test "${enable_slapd+set}" = set; then
1320   enableval="$enable_slapd"
1321   
1322         ol_arg=invalid
1323         for ol_val in auto yes no ; do
1324                 if test "$enableval" = "$ol_val" ; then
1325                         ol_arg="$ol_val"
1326                 fi
1327         done
1328         if test "$ol_arg" = "invalid" ; then
1329                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1330         fi
1331         ol_enable_slapd="$ol_arg"
1332
1333 else
1334         ol_enable_slapd="yes"
1335 fi
1336 # end --enable-slapd
1337 # OpenLDAP --enable-aclgroups
1338         # Check whether --enable-aclgroups or --disable-aclgroups was given.
1339 if test "${enable_aclgroups+set}" = set; then
1340   enableval="$enable_aclgroups"
1341   
1342         ol_arg=invalid
1343         for ol_val in auto yes no ; do
1344                 if test "$enableval" = "$ol_val" ; then
1345                         ol_arg="$ol_val"
1346                 fi
1347         done
1348         if test "$ol_arg" = "invalid" ; then
1349                 { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; }
1350         fi
1351         ol_enable_aclgroups="$ol_arg"
1352
1353 else
1354         ol_enable_aclgroups="auto"
1355 fi
1356 # end --enable-aclgroups
1357 # OpenLDAP --enable-cleartext
1358         # Check whether --enable-cleartext or --disable-cleartext was given.
1359 if test "${enable_cleartext+set}" = set; then
1360   enableval="$enable_cleartext"
1361   
1362         ol_arg=invalid
1363         for ol_val in auto yes no ; do
1364                 if test "$enableval" = "$ol_val" ; then
1365                         ol_arg="$ol_val"
1366                 fi
1367         done
1368         if test "$ol_arg" = "invalid" ; then
1369                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1370         fi
1371         ol_enable_cleartext="$ol_arg"
1372
1373 else
1374         ol_enable_cleartext="yes"
1375 fi
1376 # end --enable-cleartext
1377 # OpenLDAP --enable-crypt
1378         # Check whether --enable-crypt or --disable-crypt was given.
1379 if test "${enable_crypt+set}" = set; then
1380   enableval="$enable_crypt"
1381   
1382         ol_arg=invalid
1383         for ol_val in auto yes no ; do
1384                 if test "$enableval" = "$ol_val" ; then
1385                         ol_arg="$ol_val"
1386                 fi
1387         done
1388         if test "$ol_arg" = "invalid" ; then
1389                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1390         fi
1391         ol_enable_crypt="$ol_arg"
1392
1393 else
1394         ol_enable_crypt="auto"
1395 fi
1396 # end --enable-crypt
1397 # OpenLDAP --enable-modules
1398         # Check whether --enable-modules or --disable-modules was given.
1399 if test "${enable_modules+set}" = set; then
1400   enableval="$enable_modules"
1401   
1402         ol_arg=invalid
1403         for ol_val in auto yes no ; do
1404                 if test "$enableval" = "$ol_val" ; then
1405                         ol_arg="$ol_val"
1406                 fi
1407         done
1408         if test "$ol_arg" = "invalid" ; then
1409                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1410         fi
1411         ol_enable_modules="$ol_arg"
1412
1413 else
1414         ol_enable_modules="no"
1415 fi
1416 # end --enable-modules
1417 # OpenLDAP --enable-phonetic
1418         # Check whether --enable-phonetic or --disable-phonetic was given.
1419 if test "${enable_phonetic+set}" = set; then
1420   enableval="$enable_phonetic"
1421   
1422         ol_arg=invalid
1423         for ol_val in auto yes no ; do
1424                 if test "$enableval" = "$ol_val" ; then
1425                         ol_arg="$ol_val"
1426                 fi
1427         done
1428         if test "$ol_arg" = "invalid" ; then
1429                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1430         fi
1431         ol_enable_phonetic="$ol_arg"
1432
1433 else
1434         ol_enable_phonetic="no"
1435 fi
1436 # end --enable-phonetic
1437 # OpenLDAP --enable-rlookups
1438         # Check whether --enable-rlookups or --disable-rlookups was given.
1439 if test "${enable_rlookups+set}" = set; then
1440   enableval="$enable_rlookups"
1441   
1442         ol_arg=invalid
1443         for ol_val in auto yes no ; do
1444                 if test "$enableval" = "$ol_val" ; then
1445                         ol_arg="$ol_val"
1446                 fi
1447         done
1448         if test "$ol_arg" = "invalid" ; then
1449                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1450         fi
1451         ol_enable_rlookups="$ol_arg"
1452
1453 else
1454         ol_enable_rlookups="auto"
1455 fi
1456 # end --enable-rlookups
1457 # OpenLDAP --enable-wrappers
1458         # Check whether --enable-wrappers or --disable-wrappers was given.
1459 if test "${enable_wrappers+set}" = set; then
1460   enableval="$enable_wrappers"
1461   
1462         ol_arg=invalid
1463         for ol_val in auto yes no ; do
1464                 if test "$enableval" = "$ol_val" ; then
1465                         ol_arg="$ol_val"
1466                 fi
1467         done
1468         if test "$ol_arg" = "invalid" ; then
1469                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1470         fi
1471         ol_enable_wrappers="$ol_arg"
1472
1473 else
1474         ol_enable_wrappers="no"
1475 fi
1476 # end --enable-wrappers
1477
1478 # OpenLDAP --enable-bdb2
1479         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1480 if test "${enable_bdb2+set}" = set; then
1481   enableval="$enable_bdb2"
1482   
1483         ol_arg=invalid
1484         for ol_val in auto yes no ; do
1485                 if test "$enableval" = "$ol_val" ; then
1486                         ol_arg="$ol_val"
1487                 fi
1488         done
1489         if test "$ol_arg" = "invalid" ; then
1490                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1491         fi
1492         ol_enable_bdb2="$ol_arg"
1493
1494 else
1495         ol_enable_bdb2="no"
1496 fi
1497 # end --enable-bdb2
1498 # OpenLDAP --with-bdb2_module
1499         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1500 if test "${with_bdb2_module+set}" = set; then
1501   withval="$with_bdb2_module"
1502   
1503         ol_arg=invalid
1504         for ol_val in static dynamic ; do
1505                 if test "$withval" = "$ol_val" ; then
1506                         ol_arg="$ol_val"
1507                 fi
1508         done
1509         if test "$ol_arg" = "invalid" ; then
1510                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1511         fi
1512         ol_with_bdb2_module="$ol_arg"
1513
1514 else
1515         ol_with_bdb2_module="static"
1516 fi
1517 # end --with-bdb2_module
1518
1519 # OpenLDAP --enable-ldap
1520         # Check whether --enable-ldap or --disable-ldap was given.
1521 if test "${enable_ldap+set}" = set; then
1522   enableval="$enable_ldap"
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-ldap" 1>&2; exit 1; }
1532         fi
1533         ol_enable_ldap="$ol_arg"
1534
1535 else
1536         ol_enable_ldap="no"
1537 fi
1538 # end --enable-ldap
1539 # OpenLDAP --with-ldap_module
1540         # Check whether --with-ldap_module or --without-ldap_module was given.
1541 if test "${with_ldap_module+set}" = set; then
1542   withval="$with_ldap_module"
1543   
1544         ol_arg=invalid
1545         for ol_val in static dynamic ; do
1546                 if test "$withval" = "$ol_val" ; then
1547                         ol_arg="$ol_val"
1548                 fi
1549         done
1550         if test "$ol_arg" = "invalid" ; then
1551                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1552         fi
1553         ol_with_ldap_module="$ol_arg"
1554
1555 else
1556         ol_with_ldap_module="static"
1557 fi
1558 # end --with-ldap_module
1559
1560 # OpenLDAP --enable-ldbm
1561         # Check whether --enable-ldbm or --disable-ldbm was given.
1562 if test "${enable_ldbm+set}" = set; then
1563   enableval="$enable_ldbm"
1564   
1565         ol_arg=invalid
1566         for ol_val in auto yes no ; do
1567                 if test "$enableval" = "$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 $enableval for --enable-ldbm" 1>&2; exit 1; }
1573         fi
1574         ol_enable_ldbm="$ol_arg"
1575
1576 else
1577         ol_enable_ldbm="yes"
1578 fi
1579 # end --enable-ldbm
1580 # OpenLDAP --with-ldbm_module
1581         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1582 if test "${with_ldbm_module+set}" = set; then
1583   withval="$with_ldbm_module"
1584   
1585         ol_arg=invalid
1586         for ol_val in static dynamic ; do
1587                 if test "$withval" = "$ol_val" ; then
1588                         ol_arg="$ol_val"
1589                 fi
1590         done
1591         if test "$ol_arg" = "invalid" ; then
1592                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1593         fi
1594         ol_with_ldbm_module="$ol_arg"
1595
1596 else
1597         ol_with_ldbm_module="static"
1598 fi
1599 # end --with-ldbm_module
1600
1601 # OpenLDAP --with-ldbm_api
1602         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1603 if test "${with_ldbm_api+set}" = set; then
1604   withval="$with_ldbm_api"
1605   
1606         ol_arg=invalid
1607         for ol_val in auto db2 db mdbm gdbm ndbm manual ; 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-ldbm_api" 1>&2; exit 1; }
1614         fi
1615         ol_with_ldbm_api="$ol_arg"
1616
1617 else
1618         ol_with_ldbm_api="auto"
1619 fi
1620 # end --with-ldbm_api
1621
1622 # OpenLDAP --with-ldbm_type
1623         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1624 if test "${with_ldbm_type+set}" = set; then
1625   withval="$with_ldbm_type"
1626   
1627         ol_arg=invalid
1628         for ol_val in auto btree hash ; do
1629                 if test "$withval" = "$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 $withval for --with-ldbm_type" 1>&2; exit 1; }
1635         fi
1636         ol_with_ldbm_type="$ol_arg"
1637
1638 else
1639         ol_with_ldbm_type="auto"
1640 fi
1641 # end --with-ldbm_type
1642
1643
1644 # OpenLDAP --enable-passwd
1645         # Check whether --enable-passwd or --disable-passwd was given.
1646 if test "${enable_passwd+set}" = set; then
1647   enableval="$enable_passwd"
1648   
1649         ol_arg=invalid
1650         for ol_val in auto yes no ; do
1651                 if test "$enableval" = "$ol_val" ; then
1652                         ol_arg="$ol_val"
1653                 fi
1654         done
1655         if test "$ol_arg" = "invalid" ; then
1656                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1657         fi
1658         ol_enable_passwd="$ol_arg"
1659
1660 else
1661         ol_enable_passwd="no"
1662 fi
1663 # end --enable-passwd
1664 # OpenLDAP --with-passwd_module
1665         # Check whether --with-passwd_module or --without-passwd_module was given.
1666 if test "${with_passwd_module+set}" = set; then
1667   withval="$with_passwd_module"
1668   
1669         ol_arg=invalid
1670         for ol_val in static dynamic ; do
1671                 if test "$withval" = "$ol_val" ; then
1672                         ol_arg="$ol_val"
1673                 fi
1674         done
1675         if test "$ol_arg" = "invalid" ; then
1676                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1677         fi
1678         ol_with_passwd_module="$ol_arg"
1679
1680 else
1681         ol_with_passwd_module="static"
1682 fi
1683 # end --with-passwd_module
1684
1685 # OpenLDAP --enable-perl
1686         # Check whether --enable-perl or --disable-perl was given.
1687 if test "${enable_perl+set}" = set; then
1688   enableval="$enable_perl"
1689   
1690         ol_arg=invalid
1691         for ol_val in auto yes no ; do
1692                 if test "$enableval" = "$ol_val" ; then
1693                         ol_arg="$ol_val"
1694                 fi
1695         done
1696         if test "$ol_arg" = "invalid" ; then
1697                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1698         fi
1699         ol_enable_perl="$ol_arg"
1700
1701 else
1702         ol_enable_perl="no"
1703 fi
1704 # end --enable-perl
1705 # OpenLDAP --with-perl_module
1706         # Check whether --with-perl_module or --without-perl_module was given.
1707 if test "${with_perl_module+set}" = set; then
1708   withval="$with_perl_module"
1709   
1710         ol_arg=invalid
1711         for ol_val in static dynamic ; do
1712                 if test "$withval" = "$ol_val" ; then
1713                         ol_arg="$ol_val"
1714                 fi
1715         done
1716         if test "$ol_arg" = "invalid" ; then
1717                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1718         fi
1719         ol_with_perl_module="$ol_arg"
1720
1721 else
1722         ol_with_perl_module="static"
1723 fi
1724 # end --with-perl_module
1725
1726 # OpenLDAP --enable-shell
1727         # Check whether --enable-shell or --disable-shell was given.
1728 if test "${enable_shell+set}" = set; then
1729   enableval="$enable_shell"
1730   
1731         ol_arg=invalid
1732         for ol_val in auto yes no ; do
1733                 if test "$enableval" = "$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 $enableval for --enable-shell" 1>&2; exit 1; }
1739         fi
1740         ol_enable_shell="$ol_arg"
1741
1742 else
1743         ol_enable_shell="no"
1744 fi
1745 # end --enable-shell
1746 # OpenLDAP --with-shell_module
1747         # Check whether --with-shell_module or --without-shell_module was given.
1748 if test "${with_shell_module+set}" = set; then
1749   withval="$with_shell_module"
1750   
1751         ol_arg=invalid
1752         for ol_val in static dynamic ; do
1753                 if test "$withval" = "$ol_val" ; then
1754                         ol_arg="$ol_val"
1755                 fi
1756         done
1757         if test "$ol_arg" = "invalid" ; then
1758                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1759         fi
1760         ol_with_shell_module="$ol_arg"
1761
1762 else
1763         ol_with_shell_module="static"
1764 fi
1765 # end --with-shell_module
1766
1767 # OpenLDAP --enable-tcl
1768         # Check whether --enable-tcl or --disable-tcl was given.
1769 if test "${enable_tcl+set}" = set; then
1770   enableval="$enable_tcl"
1771   
1772         ol_arg=invalid
1773         for ol_val in auto yes no ; do
1774                 if test "$enableval" = "$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 $enableval for --enable-tcl" 1>&2; exit 1; }
1780         fi
1781         ol_enable_tcl="$ol_arg"
1782
1783 else
1784         ol_enable_tcl="no"
1785 fi
1786 # end --enable-tcl
1787 # OpenLDAP --with-tcl_module
1788         # Check whether --with-tcl_module or --without-tcl_module was given.
1789 if test "${with_tcl_module+set}" = set; then
1790   withval="$with_tcl_module"
1791   
1792         ol_arg=invalid
1793         for ol_val in static dynamic ; do
1794                 if test "$withval" = "$ol_val" ; then
1795                         ol_arg="$ol_val"
1796                 fi
1797         done
1798         if test "$ol_arg" = "invalid" ; then
1799                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
1800         fi
1801         ol_with_tcl_module="$ol_arg"
1802
1803 else
1804         ol_with_tcl_module="static"
1805 fi
1806 # end --with-tcl_module
1807
1808
1809 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1810 if test "${with_xxslurpdoptions+set}" = set; then
1811   withval="$with_xxslurpdoptions"
1812   :
1813 fi
1814
1815 # OpenLDAP --enable-slurpd
1816         # Check whether --enable-slurpd or --disable-slurpd was given.
1817 if test "${enable_slurpd+set}" = set; then
1818   enableval="$enable_slurpd"
1819   
1820         ol_arg=invalid
1821         for ol_val in auto yes no ; do
1822                 if test "$enableval" = "$ol_val" ; then
1823                         ol_arg="$ol_val"
1824                 fi
1825         done
1826         if test "$ol_arg" = "invalid" ; then
1827                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1828         fi
1829         ol_enable_slurpd="$ol_arg"
1830
1831 else
1832         ol_enable_slurpd="auto"
1833 fi
1834 # end --enable-slurpd
1835
1836 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1837 if test "${with_xxliboptions+set}" = set; then
1838   withval="$with_xxliboptions"
1839   :
1840 fi
1841
1842 # Check whether --enable-static or --disable-static was given.
1843 if test "${enable_static+set}" = set; then
1844   enableval="$enable_static"
1845   p=${PACKAGE-default}
1846 case "$enableval" in
1847 yes) enable_static=yes ;;
1848 no) enable_static=no ;;
1849 *)
1850   enable_static=no
1851   # Look at the argument we got.  We use all the common list separators.
1852   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1853   for pkg in $enableval; do
1854     if test "X$pkg" = "X$p"; then
1855       enable_static=yes
1856     fi
1857   done
1858   IFS="$ac_save_ifs"
1859   ;;
1860 esac
1861 else
1862   enable_static=yes
1863 fi
1864
1865 # Check whether --enable-shared or --disable-shared was given.
1866 if test "${enable_shared+set}" = set; then
1867   enableval="$enable_shared"
1868   p=${PACKAGE-default}
1869 case "$enableval" in
1870 yes) enable_shared=yes ;;
1871 no) enable_shared=no ;;
1872 *)
1873   enable_shared=no
1874   # Look at the argument we got.  We use all the common list separators.
1875   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1876   for pkg in $enableval; do
1877     if test "X$pkg" = "X$p"; then
1878       enable_shared=yes
1879     fi
1880   done
1881   IFS="$ac_save_ifs"
1882   ;;
1883 esac
1884 else
1885   enable_shared=yes
1886 fi
1887
1888
1889 # validate options
1890 if test $ol_enable_dns = yes ; then
1891         if test $ol_enable_referrals = no ; then
1892                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1893         fi
1894         if test $ol_enable_referrals = auto ; then
1895                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1896                 ol_enable_referrals=yes
1897         fi
1898 fi
1899
1900 if test $ol_enable_slapd = no ; then
1901                 if test $ol_enable_bdb2 = yes ; then
1902                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
1903         fi
1904         if test $ol_enable_ldap = yes ; then
1905                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
1906         fi
1907         if test $ol_enable_ldbm = yes ; then
1908                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
1909         fi
1910         if test $ol_enable_passwd = yes ; then
1911                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
1912         fi
1913         if test $ol_enable_perl = yes ; then
1914                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
1915         fi
1916         if test $ol_enable_shell = yes ; then
1917                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
1918         fi
1919         if test $ol_enable_tcl = yes ; then
1920                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
1921         fi
1922         if test $ol_enable_aclgroups = yes ; then
1923                 echo "configure: warning: slapd disabled, ignoring --enable-aclgroups argument" 1>&2
1924         fi
1925         if test $ol_enable_modules = yes ; then
1926                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
1927         fi
1928         if test $ol_enable_wrappers = yes ; then
1929                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
1930         fi
1931         if test $ol_enable_phonetic = yes ; then
1932                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
1933         fi
1934         if test $ol_enable_rlookups = yes ; then
1935                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
1936         fi
1937         if test $ol_with_ldbm_api != auto ; then
1938                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
1939         fi
1940         if test $ol_with_ldbm_type != auto ; then
1941                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
1942         fi
1943         if test $ol_with_bdb2_module != static ; then
1944                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
1945         fi
1946         if test $ol_with_ldap_module != static ; then
1947                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
1948         fi
1949         if test $ol_with_ldbm_module != static ; then
1950                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
1951         fi
1952         if test $ol_with_passwd_module != static ; then
1953                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
1954         fi
1955         if test $ol_with_perl_module != static ; then
1956                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
1957         fi
1958         if test $ol_with_shell_module != static ; then
1959                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
1960         fi
1961         if test $ol_with_tcl_module != static ; then
1962                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
1963         fi
1964         if test $ol_enable_slurpd = yes ; then
1965                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1966         fi
1967
1968         # force settings to no
1969         ol_enable_bdb2=no
1970         ol_enable_ldap=no
1971         ol_enable_ldbm=no
1972         ol_enable_passwd=no
1973         ol_enable_perl=no
1974         ol_enable_shell=no
1975         ol_enable_tcl=no
1976
1977         ol_enable_aclgroups=no
1978         ol_enable_modules=no
1979         ol_enable_phonetic=no
1980         ol_enable_rlookups=no
1981         ol_enable_wrappers=no
1982
1983         ol_with_ldbm_api=no
1984         ol_with_ldbm_type=no
1985
1986         ol_with_bdb2_module=static
1987         ol_with_ldap_module=static
1988         ol_with_ldbm_module=static
1989         ol_with_passwd_module=static
1990         ol_with_perl_module=static
1991         ol_with_shell_module=static
1992         ol_with_tcl_module=static
1993
1994         ol_enable_slurpd=no
1995
1996 elif test $ol_enable_ldbm = no ; then
1997         
1998         if test $ol_with_ldbm_api != auto ; then
1999                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2000         fi
2001
2002         if test $ol_with_ldbm_type != auto ; then
2003                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2004         fi
2005
2006         if test $ol_with_ldbm_module != static ; then
2007                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2008         fi
2009
2010         if test $ol_enable_bdb2 = yes ; then
2011                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
2012         fi
2013
2014         if test $ol_enable_modules != yes -a \
2015                 $ol_enable_ldap = no -a \
2016                 $ol_enable_passwd = no -a \
2017                 $ol_enable_perl = no -a \
2018                 $ol_enable_shell = no -a \
2019                 $ol_enable_tcl = no ; then
2020                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2021         fi
2022
2023         ol_with_ldbm_api=no
2024         ol_with_ldbm_type=no
2025         ol_with_ldbm_module=static
2026
2027 elif test $ol_enable_bdb2 = yes ; then
2028         
2029         if test $ol_with_ldbm_api != auto -a \
2030                 $ol_with_ldbm_api != db2 ; then
2031                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2032         fi
2033
2034         ol_with_ldbm_api=db2
2035
2036 else
2037         
2038         if test $ol_enable_bdb2 != no ; then
2039                 if test $ol_with_ldbm_api != auto -a \
2040                         $ol_with_ldbm_api != db2 ; then
2041                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2042                         ol_enable_bdb2=no
2043                 fi
2044         fi
2045
2046         if test $ol_with_ldbm_api = gdbm -a \
2047                 $ol_with_ldbm_type = btree ; then
2048                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2049         fi
2050         if test $ol_with_ldbm_api = mdbm -a \
2051                 $ol_with_ldbm_type = btree ; then
2052                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2053         fi
2054         if test $ol_with_ldbm_api = ndbm -a \
2055                 $ol_with_ldbm_type = btree ; then
2056                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2057         fi
2058 fi
2059
2060 if test $ol_enable_slurpd = yes ; then
2061                 if test $ol_with_threads = no ; then
2062                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2063         fi
2064 fi
2065
2066 echo "$ac_t""done" 1>&6
2067
2068 ## Initialize vars
2069 LDAP_LIBS=
2070 LDBM_LIBS=
2071 LTHREAD_LIBS=
2072 LUTIL_LIBS=
2073
2074 LDAPD_LIBS=
2075 SLAPD_LIBS=
2076 SLURPD_LIBS=
2077
2078 BUILD_LDAPD=no
2079 BUILD_SLAPD=no
2080 BUILD_SLURPD=no
2081
2082 BUILD_BDB2=no
2083 BUILD_LDAP=no
2084 BUILD_LDBM=no
2085 BUILD_PASSWD=no
2086 BUILD_PERL=no
2087 BUILD_SHELL=no
2088 BUILD_TCL=no
2089 BUILD_THREAD=no
2090
2091 BUILD_BDB2_DYNAMIC=no
2092 BUILD_LDAP_DYNAMIC=no
2093 BUILD_LDBM_DYNAMIC=no
2094 BUILD_PASSWD_DYNAMIC=no
2095 BUILD_PERL_DYNAMIC=no
2096 BUILD_SHELL_DYNAMIC=no
2097 BUILD_TCL_DYNAMIC=no
2098
2099 SLAPD_MODULES_LDFLAGS=
2100 SLAPD_MODULES_CPPFLAGS=
2101
2102 SLAPD_PERL_LDFLAGS=
2103 SLAPD_PERL_CPPFLAGS=
2104
2105 KRB_LIBS=
2106 READLINE_LIBS=
2107 TERMCAP_LIBS=
2108 TLS_LIBS=
2109
2110
2111
2112
2113 ol_aix_threads=no
2114 case "$target" in
2115 *-*-aix*)       if test -z "CC" ; then
2116                 case "$ol_with_threads" in
2117                 auto | yes |  posix) ol_aix_threads=yes ;;
2118                 esac
2119         fi
2120 ;;
2121 esac
2122
2123 if test $ol_aix_threads = yes ; then
2124         if test -z "${CC}" ; then
2125                 for ac_prog in cc_r xlc_r cc
2126 do
2127 # Extract the first word of "$ac_prog", so it can be a program name with args.
2128 set dummy $ac_prog; ac_word=$2
2129 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2130 echo "configure:2131: checking for $ac_word" >&5
2131 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2132   echo $ac_n "(cached) $ac_c" 1>&6
2133 else
2134   if test -n "$CC"; then
2135   ac_cv_prog_CC="$CC" # Let the user override the test.
2136 else
2137   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2138   ac_dummy="$PATH"
2139   for ac_dir in $ac_dummy; do
2140     test -z "$ac_dir" && ac_dir=.
2141     if test -f $ac_dir/$ac_word; then
2142       ac_cv_prog_CC="$ac_prog"
2143       break
2144     fi
2145   done
2146   IFS="$ac_save_ifs"
2147 fi
2148 fi
2149 CC="$ac_cv_prog_CC"
2150 if test -n "$CC"; then
2151   echo "$ac_t""$CC" 1>&6
2152 else
2153   echo "$ac_t""no" 1>&6
2154 fi
2155
2156 test -n "$CC" && break
2157 done
2158
2159
2160                 if test "$CC" = cc ; then
2161                                                 if test $ol_with_threads != auto ; then
2162                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2163                         else
2164                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2165                         fi
2166                         ol_with_threads=no
2167                 fi
2168         fi
2169
2170         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2171                 ol_with_threads=posix
2172                 ol_cv_pthread_create=yes
2173         fi
2174 fi
2175
2176 if test -z "${CC}"; then
2177         for ac_prog in cc
2178 do
2179 # Extract the first word of "$ac_prog", so it can be a program name with args.
2180 set dummy $ac_prog; ac_word=$2
2181 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2182 echo "configure:2183: checking for $ac_word" >&5
2183 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2184   echo $ac_n "(cached) $ac_c" 1>&6
2185 else
2186   if test -n "$CC"; then
2187   ac_cv_prog_CC="$CC" # Let the user override the test.
2188 else
2189   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2190   ac_dummy="$PATH"
2191   for ac_dir in $ac_dummy; do
2192     test -z "$ac_dir" && ac_dir=.
2193     if test -f $ac_dir/$ac_word; then
2194       ac_cv_prog_CC="$ac_prog"
2195       break
2196     fi
2197   done
2198   IFS="$ac_save_ifs"
2199 fi
2200 fi
2201 CC="$ac_cv_prog_CC"
2202 if test -n "$CC"; then
2203   echo "$ac_t""$CC" 1>&6
2204 else
2205   echo "$ac_t""no" 1>&6
2206 fi
2207
2208 test -n "$CC" && break
2209 done
2210
2211 fi
2212
2213
2214 # Extract the first word of "ranlib", so it can be a program name with args.
2215 set dummy ranlib; ac_word=$2
2216 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2217 echo "configure:2218: checking for $ac_word" >&5
2218 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2219   echo $ac_n "(cached) $ac_c" 1>&6
2220 else
2221   if test -n "$RANLIB"; then
2222   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2223 else
2224   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2225   ac_dummy="$PATH"
2226   for ac_dir in $ac_dummy; do
2227     test -z "$ac_dir" && ac_dir=.
2228     if test -f $ac_dir/$ac_word; then
2229       ac_cv_prog_RANLIB="ranlib"
2230       break
2231     fi
2232   done
2233   IFS="$ac_save_ifs"
2234   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2235 fi
2236 fi
2237 RANLIB="$ac_cv_prog_RANLIB"
2238 if test -n "$RANLIB"; then
2239   echo "$ac_t""$RANLIB" 1>&6
2240 else
2241   echo "$ac_t""no" 1>&6
2242 fi
2243
2244 # Extract the first word of "gcc", so it can be a program name with args.
2245 set dummy gcc; ac_word=$2
2246 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2247 echo "configure:2248: checking for $ac_word" >&5
2248 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2249   echo $ac_n "(cached) $ac_c" 1>&6
2250 else
2251   if test -n "$CC"; then
2252   ac_cv_prog_CC="$CC" # Let the user override the test.
2253 else
2254   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2255   ac_dummy="$PATH"
2256   for ac_dir in $ac_dummy; do
2257     test -z "$ac_dir" && ac_dir=.
2258     if test -f $ac_dir/$ac_word; then
2259       ac_cv_prog_CC="gcc"
2260       break
2261     fi
2262   done
2263   IFS="$ac_save_ifs"
2264 fi
2265 fi
2266 CC="$ac_cv_prog_CC"
2267 if test -n "$CC"; then
2268   echo "$ac_t""$CC" 1>&6
2269 else
2270   echo "$ac_t""no" 1>&6
2271 fi
2272
2273 if test -z "$CC"; then
2274   # Extract the first word of "cc", so it can be a program name with args.
2275 set dummy cc; ac_word=$2
2276 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2277 echo "configure:2278: checking for $ac_word" >&5
2278 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2279   echo $ac_n "(cached) $ac_c" 1>&6
2280 else
2281   if test -n "$CC"; then
2282   ac_cv_prog_CC="$CC" # Let the user override the test.
2283 else
2284   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2285   ac_prog_rejected=no
2286   ac_dummy="$PATH"
2287   for ac_dir in $ac_dummy; do
2288     test -z "$ac_dir" && ac_dir=.
2289     if test -f $ac_dir/$ac_word; then
2290       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2291         ac_prog_rejected=yes
2292         continue
2293       fi
2294       ac_cv_prog_CC="cc"
2295       break
2296     fi
2297   done
2298   IFS="$ac_save_ifs"
2299 if test $ac_prog_rejected = yes; then
2300   # We found a bogon in the path, so make sure we never use it.
2301   set dummy $ac_cv_prog_CC
2302   shift
2303   if test $# -gt 0; then
2304     # We chose a different compiler from the bogus one.
2305     # However, it has the same basename, so the bogon will be chosen
2306     # first if we set CC to just the basename; use the full file name.
2307     shift
2308     set dummy "$ac_dir/$ac_word" "$@"
2309     shift
2310     ac_cv_prog_CC="$@"
2311   fi
2312 fi
2313 fi
2314 fi
2315 CC="$ac_cv_prog_CC"
2316 if test -n "$CC"; then
2317   echo "$ac_t""$CC" 1>&6
2318 else
2319   echo "$ac_t""no" 1>&6
2320 fi
2321
2322   if test -z "$CC"; then
2323     case "`uname -s`" in
2324     *win32* | *WIN32*)
2325       # Extract the first word of "cl", so it can be a program name with args.
2326 set dummy cl; ac_word=$2
2327 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2328 echo "configure:2329: checking for $ac_word" >&5
2329 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2330   echo $ac_n "(cached) $ac_c" 1>&6
2331 else
2332   if test -n "$CC"; then
2333   ac_cv_prog_CC="$CC" # Let the user override the test.
2334 else
2335   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2336   ac_dummy="$PATH"
2337   for ac_dir in $ac_dummy; do
2338     test -z "$ac_dir" && ac_dir=.
2339     if test -f $ac_dir/$ac_word; then
2340       ac_cv_prog_CC="cl"
2341       break
2342     fi
2343   done
2344   IFS="$ac_save_ifs"
2345 fi
2346 fi
2347 CC="$ac_cv_prog_CC"
2348 if test -n "$CC"; then
2349   echo "$ac_t""$CC" 1>&6
2350 else
2351   echo "$ac_t""no" 1>&6
2352 fi
2353  ;;
2354     esac
2355   fi
2356   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2357 fi
2358
2359 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2360 echo "configure:2361: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2361
2362 ac_ext=c
2363 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2364 ac_cpp='$CPP $CPPFLAGS'
2365 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2366 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2367 cross_compiling=$ac_cv_prog_cc_cross
2368
2369 cat > conftest.$ac_ext << EOF
2370
2371 #line 2372 "configure"
2372 #include "confdefs.h"
2373
2374 main(){return(0);}
2375 EOF
2376 if { (eval echo configure:2377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2377   ac_cv_prog_cc_works=yes
2378   # If we can't run a trivial program, we are probably using a cross compiler.
2379   if (./conftest; exit) 2>/dev/null; then
2380     ac_cv_prog_cc_cross=no
2381   else
2382     ac_cv_prog_cc_cross=yes
2383   fi
2384 else
2385   echo "configure: failed program was:" >&5
2386   cat conftest.$ac_ext >&5
2387   ac_cv_prog_cc_works=no
2388 fi
2389 rm -fr conftest*
2390 ac_ext=c
2391 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2392 ac_cpp='$CPP $CPPFLAGS'
2393 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2394 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2395 cross_compiling=$ac_cv_prog_cc_cross
2396
2397 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2398 if test $ac_cv_prog_cc_works = no; then
2399   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2400 fi
2401 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2402 echo "configure:2403: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2403 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2404 cross_compiling=$ac_cv_prog_cc_cross
2405
2406 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2407 echo "configure:2408: checking whether we are using GNU C" >&5
2408 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2409   echo $ac_n "(cached) $ac_c" 1>&6
2410 else
2411   cat > conftest.c <<EOF
2412 #ifdef __GNUC__
2413   yes;
2414 #endif
2415 EOF
2416 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2417   ac_cv_prog_gcc=yes
2418 else
2419   ac_cv_prog_gcc=no
2420 fi
2421 fi
2422
2423 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2424
2425 if test $ac_cv_prog_gcc = yes; then
2426   GCC=yes
2427 else
2428   GCC=
2429 fi
2430
2431 ac_test_CFLAGS="${CFLAGS+set}"
2432 ac_save_CFLAGS="$CFLAGS"
2433 CFLAGS=
2434 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2435 echo "configure:2436: checking whether ${CC-cc} accepts -g" >&5
2436 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2437   echo $ac_n "(cached) $ac_c" 1>&6
2438 else
2439   echo 'void f(){}' > conftest.c
2440 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2441   ac_cv_prog_cc_g=yes
2442 else
2443   ac_cv_prog_cc_g=no
2444 fi
2445 rm -f conftest*
2446
2447 fi
2448
2449 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2450 if test "$ac_test_CFLAGS" = set; then
2451   CFLAGS="$ac_save_CFLAGS"
2452 elif test $ac_cv_prog_cc_g = yes; then
2453   if test "$GCC" = yes; then
2454     CFLAGS="-g -O2"
2455   else
2456     CFLAGS="-g"
2457   fi
2458 else
2459   if test "$GCC" = yes; then
2460     CFLAGS="-O2"
2461   else
2462     CFLAGS=
2463   fi
2464 fi
2465
2466 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2467 if test "${with_gnu_ld+set}" = set; then
2468   withval="$with_gnu_ld"
2469   test "$withval" = no || with_gnu_ld=yes
2470 else
2471   with_gnu_ld=no
2472 fi
2473
2474
2475 ac_prog=ld
2476 if test "$ac_cv_prog_gcc" = yes; then
2477   # Check if gcc -print-prog-name=ld gives a path.
2478   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2479 echo "configure:2480: checking for ld used by GCC" >&5
2480   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2481   case "$ac_prog" in
2482   # Accept absolute paths.
2483   /* | A-Za-z:\\*)
2484     test -z "$LD" && LD="$ac_prog"
2485     ;;
2486   "")
2487     # If it fails, then pretend we aren't using GCC.
2488     ac_prog=ld
2489     ;;
2490   *)
2491     # If it is relative, then search for the first ld in PATH.
2492     with_gnu_ld=unknown
2493     ;;
2494   esac
2495 elif test "$with_gnu_ld" = yes; then
2496   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2497 echo "configure:2498: checking for GNU ld" >&5
2498 else
2499   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2500 echo "configure:2501: checking for non-GNU ld" >&5
2501 fi
2502 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2503   echo $ac_n "(cached) $ac_c" 1>&6
2504 else
2505   if test -z "$LD"; then
2506   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2507   for ac_dir in $PATH; do
2508     test -z "$ac_dir" && ac_dir=.
2509     if test -f "$ac_dir/$ac_prog"; then
2510       ac_cv_path_LD="$ac_dir/$ac_prog"
2511       # Check to see if the program is GNU ld.  I'd rather use --version,
2512       # but apparently some GNU ld's only accept -v.
2513       # Break only if it was the GNU/non-GNU ld that we prefer.
2514       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2515         test "$with_gnu_ld" != no && break
2516       else
2517         test "$with_gnu_ld" != yes && break
2518       fi
2519     fi
2520   done
2521   IFS="$ac_save_ifs"
2522 else
2523   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2524 fi
2525 fi
2526
2527 LD="$ac_cv_path_LD"
2528 if test -n "$LD"; then
2529   echo "$ac_t""$LD" 1>&6
2530 else
2531   echo "$ac_t""no" 1>&6
2532 fi
2533 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2534
2535 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2536 echo "configure:2537: checking if the linker ($LD) is GNU ld" >&5
2537 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2538   echo $ac_n "(cached) $ac_c" 1>&6
2539 else
2540   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2541 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2542   ac_cv_prog_gnu_ld=yes
2543 else
2544   ac_cv_prog_gnu_ld=no
2545 fi
2546 fi
2547
2548 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2549
2550
2551 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2552 echo "configure:2553: checking for BSD-compatible nm" >&5
2553 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2554   echo $ac_n "(cached) $ac_c" 1>&6
2555 else
2556   case "$NM" in
2557 /* | A-Za-z:\\*)
2558   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2559   ;;
2560 *)
2561   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2562   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2563     test -z "$ac_dir" && ac_dir=.
2564     if test -f $ac_dir/nm; then
2565       # Check to see if the nm accepts a BSD-compat flag.
2566       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2567       #   nm: unknown option "B" ignored
2568       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2569         ac_cv_path_NM="$ac_dir/nm -B"
2570       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2571         ac_cv_path_NM="$ac_dir/nm -p"
2572       else
2573         ac_cv_path_NM="$ac_dir/nm"
2574       fi
2575       break
2576     fi
2577   done
2578   IFS="$ac_save_ifs"
2579   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2580   ;;
2581 esac
2582 fi
2583
2584 NM="$ac_cv_path_NM"
2585 echo "$ac_t""$NM" 1>&6
2586
2587
2588 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2589 echo "configure:2590: checking whether ln -s works" >&5
2590 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2591   echo $ac_n "(cached) $ac_c" 1>&6
2592 else
2593   rm -f conftestdata
2594 if ln -s X conftestdata 2>/dev/null
2595 then
2596   rm -f conftestdata
2597   ac_cv_prog_LN_S="ln -s"
2598 else
2599   ac_cv_prog_LN_S=ln
2600 fi
2601 fi
2602 LN_S="$ac_cv_prog_LN_S"
2603 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2604   echo "$ac_t""yes" 1>&6
2605 else
2606   echo "$ac_t""no" 1>&6
2607 fi
2608
2609 # Always use our own libtool.
2610 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2611
2612 # Check for any special flags to pass to ltconfig.
2613 libtool_flags=
2614 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2615 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2616 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2617 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2618 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2619
2620 # Some flags need to be propagated to the compiler or linker for good
2621 # libtool support.
2622 case "$host" in
2623 *-*-irix6*)
2624   # Find out which ABI we are using.
2625   echo '#line 2626 "configure"' > conftest.$ac_ext
2626   if { (eval echo configure:2627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2627     case "`/usr/bin/file conftest.o`" in
2628     *32-bit*)
2629       LD="${LD-ld} -32"
2630       ;;
2631     *N32*)
2632       LD="${LD-ld} -n32"
2633       ;;
2634     *64-bit*)
2635       LD="${LD-ld} -64"
2636       ;;
2637     esac
2638   fi
2639   rm -rf conftest*
2640   ;;
2641
2642 *-*-sco3.2v5*)
2643   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2644   CFLAGS="$CFLAGS -belf"
2645   ;;
2646 esac
2647
2648 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2649 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2650 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2651 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2652 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2653 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2654
2655
2656 for ac_prog in mawk gawk nawk awk
2657 do
2658 # Extract the first word of "$ac_prog", so it can be a program name with args.
2659 set dummy $ac_prog; ac_word=$2
2660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2661 echo "configure:2662: checking for $ac_word" >&5
2662 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2663   echo $ac_n "(cached) $ac_c" 1>&6
2664 else
2665   if test -n "$AWK"; then
2666   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2667 else
2668   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2669   ac_dummy="$PATH"
2670   for ac_dir in $ac_dummy; do
2671     test -z "$ac_dir" && ac_dir=.
2672     if test -f $ac_dir/$ac_word; then
2673       ac_cv_prog_AWK="$ac_prog"
2674       break
2675     fi
2676   done
2677   IFS="$ac_save_ifs"
2678 fi
2679 fi
2680 AWK="$ac_cv_prog_AWK"
2681 if test -n "$AWK"; then
2682   echo "$ac_t""$AWK" 1>&6
2683 else
2684   echo "$ac_t""no" 1>&6
2685 fi
2686
2687 test -n "$AWK" && break
2688 done
2689
2690 # test for ln hardlink support
2691 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2692 echo "configure:2693: checking whether ln works" >&5
2693 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2694   echo $ac_n "(cached) $ac_c" 1>&6
2695 else
2696   rm -f conftest.src conftest.dst
2697 echo "conftest" > conftest.src
2698 if ln conftest.src conftest.dst 2>/dev/null
2699 then
2700   ol_cv_prog_LN_H="ln"
2701 else
2702   ol_cv_prog_LN_H="cp"
2703 fi
2704 rm -f conftest.src conftest.dst
2705
2706 fi
2707 LN_H="$ol_cv_prog_LN_H"
2708 if test "$ol_cv_prog_LN_H" = "ln"; then
2709         echo "$ac_t""yes" 1>&6
2710 else
2711         echo "$ac_t""no" 1>&6
2712 fi
2713
2714 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2715 echo "configure:2716: checking whether ln -s works" >&5
2716 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2717   echo $ac_n "(cached) $ac_c" 1>&6
2718 else
2719   rm -f conftestdata
2720 if ln -s X conftestdata 2>/dev/null
2721 then
2722   rm -f conftestdata
2723   ac_cv_prog_LN_S="ln -s"
2724 else
2725   ac_cv_prog_LN_S=ln
2726 fi
2727 fi
2728 LN_S="$ac_cv_prog_LN_S"
2729 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2730   echo "$ac_t""yes" 1>&6
2731 else
2732   echo "$ac_t""no" 1>&6
2733 fi
2734
2735
2736 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2737         LN_S="$LN_H"
2738 fi
2739
2740 # Extract the first word of "sendmail", so it can be a program name with args.
2741 set dummy sendmail; ac_word=$2
2742 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2743 echo "configure:2744: checking for $ac_word" >&5
2744 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2745   echo $ac_n "(cached) $ac_c" 1>&6
2746 else
2747   case "$SENDMAIL" in
2748   /*)
2749   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2750   ;;
2751   ?:/*)                  
2752   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2753   ;;
2754   *)
2755   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2756   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2757   for ac_dir in $ac_dummy; do 
2758     test -z "$ac_dir" && ac_dir=.
2759     if test -f $ac_dir/$ac_word; then
2760       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2761       break
2762     fi
2763   done
2764   IFS="$ac_save_ifs"
2765   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2766   ;;
2767 esac
2768 fi
2769 SENDMAIL="$ac_cv_path_SENDMAIL"
2770 if test -n "$SENDMAIL"; then
2771   echo "$ac_t""$SENDMAIL" 1>&6
2772 else
2773   echo "$ac_t""no" 1>&6
2774 fi
2775
2776 # Extract the first word of "vi", so it can be a program name with args.
2777 set dummy vi; ac_word=$2
2778 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2779 echo "configure:2780: checking for $ac_word" >&5
2780 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2781   echo $ac_n "(cached) $ac_c" 1>&6
2782 else
2783   case "$EDITOR" in
2784   /*)
2785   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2786   ;;
2787   ?:/*)                  
2788   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2789   ;;
2790   *)
2791   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2792   ac_dummy="$PATH:/usr/ucb"
2793   for ac_dir in $ac_dummy; do 
2794     test -z "$ac_dir" && ac_dir=.
2795     if test -f $ac_dir/$ac_word; then
2796       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2797       break
2798     fi
2799   done
2800   IFS="$ac_save_ifs"
2801   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2802   ;;
2803 esac
2804 fi
2805 EDITOR="$ac_cv_path_EDITOR"
2806 if test -n "$EDITOR"; then
2807   echo "$ac_t""$EDITOR" 1>&6
2808 else
2809   echo "$ac_t""no" 1>&6
2810 fi
2811
2812 # Extract the first word of "finger", so it can be a program name with args.
2813 set dummy finger; ac_word=$2
2814 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2815 echo "configure:2816: checking for $ac_word" >&5
2816 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2817   echo $ac_n "(cached) $ac_c" 1>&6
2818 else
2819   case "$FINGER" in
2820   /*)
2821   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2822   ;;
2823   ?:/*)                  
2824   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2825   ;;
2826   *)
2827   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2828   ac_dummy="$PATH:/usr/ucb"
2829   for ac_dir in $ac_dummy; do 
2830     test -z "$ac_dir" && ac_dir=.
2831     if test -f $ac_dir/$ac_word; then
2832       ac_cv_path_FINGER="$ac_dir/$ac_word"
2833       break
2834     fi
2835   done
2836   IFS="$ac_save_ifs"
2837   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2838   ;;
2839 esac
2840 fi
2841 FINGER="$ac_cv_path_FINGER"
2842 if test -n "$FINGER"; then
2843   echo "$ac_t""$FINGER" 1>&6
2844 else
2845   echo "$ac_t""no" 1>&6
2846 fi
2847
2848
2849 ol_link_modules=no
2850 if test $ol_enable_modules != no ; then
2851         # Extract the first word of "glib-config", so it can be a program name with args.
2852 set dummy glib-config; ac_word=$2
2853 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2854 echo "configure:2855: checking for $ac_word" >&5
2855 if eval "test \"`echo '$''{'ac_cv_path_GLIBCONFIG'+set}'`\" = set"; then
2856   echo $ac_n "(cached) $ac_c" 1>&6
2857 else
2858   case "$GLIBCONFIG" in
2859   /*)
2860   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
2861   ;;
2862   ?:/*)                  
2863   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
2864   ;;
2865   *)
2866   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2867   ac_dummy="$PATH"
2868   for ac_dir in $ac_dummy; do 
2869     test -z "$ac_dir" && ac_dir=.
2870     if test -f $ac_dir/$ac_word; then
2871       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
2872       break
2873     fi
2874   done
2875   IFS="$ac_save_ifs"
2876   ;;
2877 esac
2878 fi
2879 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
2880 if test -n "$GLIBCONFIG"; then
2881   echo "$ac_t""$GLIBCONFIG" 1>&6
2882 else
2883   echo "$ac_t""no" 1>&6
2884 fi
2885
2886
2887         if test "no$GLIBCONFIG" = "no" ; then
2888                 if test $ol_enable_modules = yes ; then
2889                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
2890                 fi
2891
2892         else
2893                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
2894                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
2895                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
2896
2897                                 ol_link_modules=yes
2898         fi
2899 else
2900         ol_with_bdb2_module=static
2901         ol_with_ldap_module=static
2902         ol_with_ldbm_module=static
2903         ol_with_passwd_module=static
2904         ol_with_perl_module=static
2905         ol_with_shell_module=static
2906         ol_with_tcl_module=static
2907 fi
2908
2909 ol_link_perl=no
2910 if test $ol_enable_perl != no ; then
2911         # Extract the first word of "perl", so it can be a program name with args.
2912 set dummy perl; ac_word=$2
2913 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2914 echo "configure:2915: checking for $ac_word" >&5
2915 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2916   echo $ac_n "(cached) $ac_c" 1>&6
2917 else
2918   case "$PERLBIN" in
2919   /*)
2920   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2921   ;;
2922   ?:/*)                  
2923   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2924   ;;
2925   *)
2926   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2927   ac_dummy="$PATH"
2928   for ac_dir in $ac_dummy; do 
2929     test -z "$ac_dir" && ac_dir=.
2930     if test -f $ac_dir/$ac_word; then
2931       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2932       break
2933     fi
2934   done
2935   IFS="$ac_save_ifs"
2936   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2937   ;;
2938 esac
2939 fi
2940 PERLBIN="$ac_cv_path_PERLBIN"
2941 if test -n "$PERLBIN"; then
2942   echo "$ac_t""$PERLBIN" 1>&6
2943 else
2944   echo "$ac_t""no" 1>&6
2945 fi
2946
2947
2948         if test "no$PERLBIN" = "no" ; then
2949                 if test $ol_enable_perl = yes ; then
2950                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
2951                 fi
2952
2953         else
2954                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2955                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
2956
2957                                 ol_link_perl=yes
2958         fi
2959 fi
2960
2961 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2962 echo "configure:2963: checking how to run the C preprocessor" >&5
2963 # On Suns, sometimes $CPP names a directory.
2964 if test -n "$CPP" && test -d "$CPP"; then
2965   CPP=
2966 fi
2967 if test -z "$CPP"; then
2968 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2969   echo $ac_n "(cached) $ac_c" 1>&6
2970 else
2971     # This must be in double quotes, not single quotes, because CPP may get
2972   # substituted into the Makefile and "${CC-cc}" will confuse make.
2973   CPP="${CC-cc} -E"
2974   # On the NeXT, cc -E runs the code through the compiler's parser,
2975   # not just through cpp.
2976   cat > conftest.$ac_ext <<EOF
2977 #line 2978 "configure"
2978 #include "confdefs.h"
2979 #include <assert.h>
2980 Syntax Error
2981 EOF
2982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2983 { (eval echo configure:2984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2985 if test -z "$ac_err"; then
2986   :
2987 else
2988   echo "$ac_err" >&5
2989   echo "configure: failed program was:" >&5
2990   cat conftest.$ac_ext >&5
2991   rm -rf conftest*
2992   CPP="${CC-cc} -E -traditional-cpp"
2993   cat > conftest.$ac_ext <<EOF
2994 #line 2995 "configure"
2995 #include "confdefs.h"
2996 #include <assert.h>
2997 Syntax Error
2998 EOF
2999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3000 { (eval echo configure:3001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3002 if test -z "$ac_err"; then
3003   :
3004 else
3005   echo "$ac_err" >&5
3006   echo "configure: failed program was:" >&5
3007   cat conftest.$ac_ext >&5
3008   rm -rf conftest*
3009   CPP="${CC-cc} -nologo -E"
3010   cat > conftest.$ac_ext <<EOF
3011 #line 3012 "configure"
3012 #include "confdefs.h"
3013 #include <assert.h>
3014 Syntax Error
3015 EOF
3016 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3017 { (eval echo configure:3018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3018 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3019 if test -z "$ac_err"; then
3020   :
3021 else
3022   echo "$ac_err" >&5
3023   echo "configure: failed program was:" >&5
3024   cat conftest.$ac_ext >&5
3025   rm -rf conftest*
3026   CPP=/lib/cpp
3027 fi
3028 rm -f conftest*
3029 fi
3030 rm -f conftest*
3031 fi
3032 rm -f conftest*
3033   ac_cv_prog_CPP="$CPP"
3034 fi
3035   CPP="$ac_cv_prog_CPP"
3036 else
3037   ac_cv_prog_CPP="$CPP"
3038 fi
3039 echo "$ac_t""$CPP" 1>&6
3040
3041
3042 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3043         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3044
3045 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3046         echo "configure: warning: programs compiled here do run here..." 1>&2
3047         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3048
3049 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3050         echo "configure: warning: programs compiled here do not run here..." 1>&2
3051         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3052 fi
3053
3054 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3055 echo "configure:3056: checking for AIX" >&5
3056 cat > conftest.$ac_ext <<EOF
3057 #line 3058 "configure"
3058 #include "confdefs.h"
3059 #ifdef _AIX
3060   yes
3061 #endif
3062
3063 EOF
3064 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3065   egrep "yes" >/dev/null 2>&1; then
3066   rm -rf conftest*
3067   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3068 #define _ALL_SOURCE 1
3069 EOF
3070
3071 else
3072   rm -rf conftest*
3073   echo "$ac_t""no" 1>&6
3074 fi
3075 rm -f conftest*
3076
3077
3078 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3079 echo "configure:3080: checking for POSIXized ISC" >&5
3080 if test -d /etc/conf/kconfig.d &&
3081   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3082 then
3083   echo "$ac_t""yes" 1>&6
3084   ISC=yes # If later tests want to check for ISC.
3085   cat >> confdefs.h <<\EOF
3086 #define _POSIX_SOURCE 1
3087 EOF
3088
3089   if test "$GCC" = yes; then
3090     CC="$CC -posix"
3091   else
3092     CC="$CC -Xp"
3093   fi
3094 else
3095   echo "$ac_t""no" 1>&6
3096   ISC=
3097 fi
3098
3099 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3100 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3101 echo "configure:3102: checking for minix/config.h" >&5
3102 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3103   echo $ac_n "(cached) $ac_c" 1>&6
3104 else
3105   cat > conftest.$ac_ext <<EOF
3106 #line 3107 "configure"
3107 #include "confdefs.h"
3108 #include <minix/config.h>
3109 EOF
3110 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3111 { (eval echo configure:3112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3112 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3113 if test -z "$ac_err"; then
3114   rm -rf conftest*
3115   eval "ac_cv_header_$ac_safe=yes"
3116 else
3117   echo "$ac_err" >&5
3118   echo "configure: failed program was:" >&5
3119   cat conftest.$ac_ext >&5
3120   rm -rf conftest*
3121   eval "ac_cv_header_$ac_safe=no"
3122 fi
3123 rm -f conftest*
3124 fi
3125 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3126   echo "$ac_t""yes" 1>&6
3127   MINIX=yes
3128 else
3129   echo "$ac_t""no" 1>&6
3130 MINIX=
3131 fi
3132
3133 if test "$MINIX" = yes; then
3134   cat >> confdefs.h <<\EOF
3135 #define _POSIX_SOURCE 1
3136 EOF
3137
3138   cat >> confdefs.h <<\EOF
3139 #define _POSIX_1_SOURCE 2
3140 EOF
3141
3142   cat >> confdefs.h <<\EOF
3143 #define _MINIX 1
3144 EOF
3145
3146 fi
3147
3148
3149 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3150 echo "configure:3151: checking for be_app in -lbe" >&5
3151 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
3152 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3153   echo $ac_n "(cached) $ac_c" 1>&6
3154 else
3155   ac_save_LIBS="$LIBS"
3156 LIBS="-lbe -lroot -lnet $LIBS"
3157 cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160 /* Override any gcc2 internal prototype to avoid an error.  */
3161 /* We use char because int might match the return type of a gcc2
3162     builtin and then its argument prototype would still apply.  */
3163 char be_app();
3164
3165 int main() {
3166 be_app()
3167 ; return 0; }
3168 EOF
3169 if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3170   rm -rf conftest*
3171   eval "ac_cv_lib_$ac_lib_var=yes"
3172 else
3173   echo "configure: failed program was:" >&5
3174   cat conftest.$ac_ext >&5
3175   rm -rf conftest*
3176   eval "ac_cv_lib_$ac_lib_var=no"
3177 fi
3178 rm -f conftest*
3179 LIBS="$ac_save_LIBS"
3180
3181 fi
3182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3183   echo "$ac_t""yes" 1>&6
3184   LIBS="$LIBS -lbe -lroot -lnet"
3185 else
3186   echo "$ac_t""no" 1>&6
3187 :
3188 fi
3189
3190
3191 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3192 echo "configure:3193: checking for Cygwin environment" >&5
3193 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
3194   echo $ac_n "(cached) $ac_c" 1>&6
3195 else
3196   cat > conftest.$ac_ext <<EOF
3197 #line 3198 "configure"
3198 #include "confdefs.h"
3199
3200 int main() {
3201
3202 #ifndef __CYGWIN__
3203 #define __CYGWIN__ __CYGWIN32__
3204 #endif
3205 return __CYGWIN__;
3206 ; return 0; }
3207 EOF
3208 if { (eval echo configure:3209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3209   rm -rf conftest*
3210   ac_cv_cygwin=yes
3211 else
3212   echo "configure: failed program was:" >&5
3213   cat conftest.$ac_ext >&5
3214   rm -rf conftest*
3215   ac_cv_cygwin=no
3216 fi
3217 rm -f conftest*
3218 rm -f conftest*
3219 fi
3220
3221 echo "$ac_t""$ac_cv_cygwin" 1>&6
3222 CYGWIN=
3223 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3224 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3225 echo "configure:3226: checking for mingw32 environment" >&5
3226 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3227   echo $ac_n "(cached) $ac_c" 1>&6
3228 else
3229   cat > conftest.$ac_ext <<EOF
3230 #line 3231 "configure"
3231 #include "confdefs.h"
3232
3233 int main() {
3234 return __MINGW32__;
3235 ; return 0; }
3236 EOF
3237 if { (eval echo configure:3238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3238   rm -rf conftest*
3239   ac_cv_mingw32=yes
3240 else
3241   echo "configure: failed program was:" >&5
3242   cat conftest.$ac_ext >&5
3243   rm -rf conftest*
3244   ac_cv_mingw32=no
3245 fi
3246 rm -f conftest*
3247 rm -f conftest*
3248 fi
3249
3250 echo "$ac_t""$ac_cv_mingw32" 1>&6
3251 MINGW32=
3252 test "$ac_cv_mingw32" = yes && MINGW32=yes
3253
3254
3255 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3256 echo "configure:3257: checking for executable suffix" >&5
3257 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3258   echo $ac_n "(cached) $ac_c" 1>&6
3259 else
3260   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3261   ac_cv_exeext=.exe
3262 else
3263   rm -f conftest*
3264   echo 'int main () { return 0; }' > conftest.$ac_ext
3265   ac_cv_exeext=
3266   if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3267     for file in conftest.*; do
3268       case $file in
3269       *.c | *.o | *.obj) ;;
3270       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3271       esac
3272     done
3273   else
3274     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3275   fi
3276   rm -f conftest*
3277   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3278 fi
3279 fi
3280
3281 EXEEXT=""
3282 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3283 echo "$ac_t""${ac_cv_exeext}" 1>&6
3284 ac_exeext=$EXEEXT
3285
3286 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3287 echo "configure:3288: checking for object suffix" >&5
3288 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
3289   echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291   rm -f conftest*
3292 echo 'int i = 1;' > conftest.$ac_ext
3293 if { (eval echo configure:3294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3294   for ac_file in conftest.*; do
3295     case $ac_file in
3296     *.c) ;;
3297     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3298     esac
3299   done
3300 else
3301   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3302 fi
3303 rm -f conftest*
3304 fi
3305
3306 echo "$ac_t""$ac_cv_objext" 1>&6
3307 OBJEXT=$ac_cv_objext
3308 ac_objext=$ac_cv_objext
3309
3310
3311 cat >> confdefs.h <<EOF
3312 #define EXEEXT "${EXEEXT}"
3313 EOF
3314
3315
3316
3317
3318
3319 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3320 echo "configure:3321: checking for ${CC-cc} option to accept ANSI C" >&5
3321 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
3322   echo $ac_n "(cached) $ac_c" 1>&6
3323 else
3324   am_cv_prog_cc_stdc=no
3325 ac_save_CC="$CC"
3326 # Don't try gcc -ansi; that turns off useful extensions and
3327 # breaks some systems' header files.
3328 # AIX                   -qlanglvl=ansi
3329 # Ultrix and OSF/1      -std1
3330 # HP-UX                 -Aa -D_HPUX_SOURCE
3331 # SVR4                  -Xc -D__EXTENSIONS__
3332 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3333 do
3334   CC="$ac_save_CC $ac_arg"
3335   cat > conftest.$ac_ext <<EOF
3336 #line 3337 "configure"
3337 #include "confdefs.h"
3338 #include <stdarg.h>
3339 #include <stdio.h>
3340 #include <sys/types.h>
3341 #include <sys/stat.h>
3342 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3343 struct buf { int x; };
3344 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3345 static char *e (p, i)
3346      char **p;
3347      int i;
3348 {
3349   return p[i];
3350 }
3351 static char *f (char * (*g) (char **, int), char **p, ...)
3352 {
3353   char *s;
3354   va_list v;
3355   va_start (v,p);
3356   s = g (p, va_arg (v,int));
3357   va_end (v);
3358   return s;
3359 }
3360 int test (int i, double x);
3361 struct s1 {int (*f) (int a);};
3362 struct s2 {int (*f) (double a);};
3363 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3364 int argc;
3365 char **argv;
3366
3367 int main() {
3368
3369 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3370
3371 ; return 0; }
3372 EOF
3373 if { (eval echo configure:3374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3374   rm -rf conftest*
3375   am_cv_prog_cc_stdc="$ac_arg"; break
3376 else
3377   echo "configure: failed program was:" >&5
3378   cat conftest.$ac_ext >&5
3379 fi
3380 rm -f conftest*
3381 done
3382 CC="$ac_save_CC"
3383
3384 fi
3385
3386 if test -z "$am_cv_prog_cc_stdc"; then
3387   echo "$ac_t""none needed" 1>&6
3388 else
3389   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3390 fi
3391 case "x$am_cv_prog_cc_stdc" in
3392   x|xno) ;;
3393   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3394 esac
3395
3396 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3397         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3398 fi
3399
3400
3401 # test for make depend flag
3402 OL_MKDEP=
3403 OL_MKDEP_FLAGS=
3404 if test -z "${MKDEP}"; then
3405         OL_MKDEP="${CC-cc}"
3406         if test -z "${MKDEP_FLAGS}"; then
3407                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3408 echo "configure:3409: checking for ${OL_MKDEP} depend flag" >&5
3409 if eval "test \"`echo '$''{'ol_cv_mkdep'+set}'`\" = set"; then
3410   echo $ac_n "(cached) $ac_c" 1>&6
3411 else
3412   
3413                         ol_cv_mkdep=no
3414                         for flag in "-M" "-xM"; do
3415                                 cat > conftest.c <<EOF
3416  noCode;
3417 EOF
3418                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3419                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3420                                 then
3421                                         if test ! -f conftest."${ac_object}" ; then
3422                                                 ol_cv_mkdep=$flag
3423                                                 OL_MKDEP_FLAGS="$flag"
3424                                                 break
3425                                         fi
3426                                 fi
3427                         done
3428                         rm -f conftest*
3429                 
3430 fi
3431
3432 echo "$ac_t""$ol_cv_mkdep" 1>&6
3433         else
3434                 cc_cv_mkdep=yes
3435                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3436         fi
3437 else
3438         cc_cv_mkdep=yes
3439         OL_MKDEP="${MKDEP}"
3440         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3441 fi
3442
3443
3444
3445 if test "${ol_cv_mkdep}" = no ; then
3446         # this will soon become an error
3447         echo "configure: warning: do not know how to generate dependencies" 1>&2
3448 fi
3449
3450
3451
3452 echo $ac_n "checking for socket""... $ac_c" 1>&6
3453 echo "configure:3454: checking for socket" >&5
3454 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
3455   echo $ac_n "(cached) $ac_c" 1>&6
3456 else
3457   cat > conftest.$ac_ext <<EOF
3458 #line 3459 "configure"
3459 #include "confdefs.h"
3460 /* System header to define __stub macros and hopefully few prototypes,
3461     which can conflict with char socket(); below.  */
3462 #include <assert.h>
3463 /* Override any gcc2 internal prototype to avoid an error.  */
3464 /* We use char because int might match the return type of a gcc2
3465     builtin and then its argument prototype would still apply.  */
3466 char socket();
3467
3468 int main() {
3469
3470 /* The GNU C library defines this for functions which it implements
3471     to always fail with ENOSYS.  Some functions are actually named
3472     something starting with __ and the normal name is an alias.  */
3473 #if defined (__stub_socket) || defined (__stub___socket)
3474 choke me
3475 #else
3476 socket();
3477 #endif
3478
3479 ; return 0; }
3480 EOF
3481 if { (eval echo configure:3482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3482   rm -rf conftest*
3483   eval "ac_cv_func_socket=yes"
3484 else
3485   echo "configure: failed program was:" >&5
3486   cat conftest.$ac_ext >&5
3487   rm -rf conftest*
3488   eval "ac_cv_func_socket=no"
3489 fi
3490 rm -f conftest*
3491 fi
3492
3493 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3494   echo "$ac_t""yes" 1>&6
3495   :
3496 else
3497   echo "$ac_t""no" 1>&6
3498         
3499         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3500 echo "configure:3501: checking for main in -lsocket" >&5
3501 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3502 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3503   echo $ac_n "(cached) $ac_c" 1>&6
3504 else
3505   ac_save_LIBS="$LIBS"
3506 LIBS="-lsocket  $LIBS"
3507 cat > conftest.$ac_ext <<EOF
3508 #line 3509 "configure"
3509 #include "confdefs.h"
3510
3511 int main() {
3512 main()
3513 ; return 0; }
3514 EOF
3515 if { (eval echo configure:3516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3516   rm -rf conftest*
3517   eval "ac_cv_lib_$ac_lib_var=yes"
3518 else
3519   echo "configure: failed program was:" >&5
3520   cat conftest.$ac_ext >&5
3521   rm -rf conftest*
3522   eval "ac_cv_lib_$ac_lib_var=no"
3523 fi
3524 rm -f conftest*
3525 LIBS="$ac_save_LIBS"
3526
3527 fi
3528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3529   echo "$ac_t""yes" 1>&6
3530     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3531     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3532   cat >> confdefs.h <<EOF
3533 #define $ac_tr_lib 1
3534 EOF
3535
3536   LIBS="-lsocket $LIBS"
3537
3538 else
3539   echo "$ac_t""no" 1>&6
3540 fi
3541
3542         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3543 echo "configure:3544: checking for main in -lnet" >&5
3544 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3545 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3546   echo $ac_n "(cached) $ac_c" 1>&6
3547 else
3548   ac_save_LIBS="$LIBS"
3549 LIBS="-lnet  $LIBS"
3550 cat > conftest.$ac_ext <<EOF
3551 #line 3552 "configure"
3552 #include "confdefs.h"
3553
3554 int main() {
3555 main()
3556 ; return 0; }
3557 EOF
3558 if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3559   rm -rf conftest*
3560   eval "ac_cv_lib_$ac_lib_var=yes"
3561 else
3562   echo "configure: failed program was:" >&5
3563   cat conftest.$ac_ext >&5
3564   rm -rf conftest*
3565   eval "ac_cv_lib_$ac_lib_var=no"
3566 fi
3567 rm -f conftest*
3568 LIBS="$ac_save_LIBS"
3569
3570 fi
3571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3572   echo "$ac_t""yes" 1>&6
3573     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3574     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3575   cat >> confdefs.h <<EOF
3576 #define $ac_tr_lib 1
3577 EOF
3578
3579   LIBS="-lnet $LIBS"
3580
3581 else
3582   echo "$ac_t""no" 1>&6
3583 fi
3584
3585         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
3586 echo "configure:3587: checking for socket in -lnet" >&5
3587 ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3588 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3589   echo $ac_n "(cached) $ac_c" 1>&6
3590 else
3591   ac_save_LIBS="$LIBS"
3592 LIBS="-lnet  $LIBS"
3593 cat > conftest.$ac_ext <<EOF
3594 #line 3595 "configure"
3595 #include "confdefs.h"
3596 /* Override any gcc2 internal prototype to avoid an error.  */
3597 /* We use char because int might match the return type of a gcc2
3598     builtin and then its argument prototype would still apply.  */
3599 char socket();
3600
3601 int main() {
3602 socket()
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 net | 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="-lnet $LIBS"
3627
3628 else
3629   echo "$ac_t""no" 1>&6
3630 fi
3631
3632         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3633 echo "configure:3634: checking for main in -lnsl_s" >&5
3634 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3635 if eval "test \"`echo '$''{'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="-lnsl_s  $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 nsl_s | 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="-lnsl_s $LIBS"
3670
3671 else
3672   echo "$ac_t""no" 1>&6
3673 fi
3674
3675         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3676 echo "configure:3677: checking for main in -lnsl" >&5
3677 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3678 if eval "test \"`echo '$''{'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="-lnsl  $LIBS"
3683 cat > conftest.$ac_ext <<EOF
3684 #line 3685 "configure"
3685 #include "confdefs.h"
3686
3687 int main() {
3688 main()
3689 ; return 0; }
3690 EOF
3691 if { (eval echo configure:3692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3692   rm -rf conftest*
3693   eval "ac_cv_lib_$ac_lib_var=yes"
3694 else
3695   echo "configure: failed program was:" >&5
3696   cat conftest.$ac_ext >&5
3697   rm -rf conftest*
3698   eval "ac_cv_lib_$ac_lib_var=no"
3699 fi
3700 rm -f conftest*
3701 LIBS="$ac_save_LIBS"
3702
3703 fi
3704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3705   echo "$ac_t""yes" 1>&6
3706     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3707     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3708   cat >> confdefs.h <<EOF
3709 #define $ac_tr_lib 1
3710 EOF
3711
3712   LIBS="-lnsl $LIBS"
3713
3714 else
3715   echo "$ac_t""no" 1>&6
3716 fi
3717
3718         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3719 echo "configure:3720: checking for socket in -linet" >&5
3720 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3721 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3722   echo $ac_n "(cached) $ac_c" 1>&6
3723 else
3724   ac_save_LIBS="$LIBS"
3725 LIBS="-linet  $LIBS"
3726 cat > conftest.$ac_ext <<EOF
3727 #line 3728 "configure"
3728 #include "confdefs.h"
3729 /* Override any gcc2 internal prototype to avoid an error.  */
3730 /* We use char because int might match the return type of a gcc2
3731     builtin and then its argument prototype would still apply.  */
3732 char socket();
3733
3734 int main() {
3735 socket()
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 inet | 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="-linet $LIBS"
3760
3761 else
3762   echo "$ac_t""no" 1>&6
3763 fi
3764
3765         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3766 echo "configure:3767: checking for main in -lgen" >&5
3767 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3768 if eval "test \"`echo '$''{'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="-lgen  $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 gen | 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="-lgen $LIBS"
3803
3804 else
3805   echo "$ac_t""no" 1>&6
3806 fi
3807
3808
3809 fi
3810
3811
3812 for ac_func in res_search
3813 do
3814 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3815 echo "configure:3816: checking for $ac_func" >&5
3816 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3817   echo $ac_n "(cached) $ac_c" 1>&6
3818 else
3819   cat > conftest.$ac_ext <<EOF
3820 #line 3821 "configure"
3821 #include "confdefs.h"
3822 /* System header to define __stub macros and hopefully few prototypes,
3823     which can conflict with char $ac_func(); below.  */
3824 #include <assert.h>
3825 /* Override any gcc2 internal prototype to avoid an error.  */
3826 /* We use char because int might match the return type of a gcc2
3827     builtin and then its argument prototype would still apply.  */
3828 char $ac_func();
3829
3830 int main() {
3831
3832 /* The GNU C library defines this for functions which it implements
3833     to always fail with ENOSYS.  Some functions are actually named
3834     something starting with __ and the normal name is an alias.  */
3835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3836 choke me
3837 #else
3838 $ac_func();
3839 #endif
3840
3841 ; return 0; }
3842 EOF
3843 if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3844   rm -rf conftest*
3845   eval "ac_cv_func_$ac_func=yes"
3846 else
3847   echo "configure: failed program was:" >&5
3848   cat conftest.$ac_ext >&5
3849   rm -rf conftest*
3850   eval "ac_cv_func_$ac_func=no"
3851 fi
3852 rm -f conftest*
3853 fi
3854
3855 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3856   echo "$ac_t""yes" 1>&6
3857     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3858   cat >> confdefs.h <<EOF
3859 #define $ac_tr_func 1
3860 EOF
3861  
3862 else
3863   echo "$ac_t""no" 1>&6
3864 fi
3865 done
3866
3867 if test $ac_cv_func_res_search = "no" ; then 
3868         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3869 echo "configure:3870: checking for res_search in -lbind" >&5
3870 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3871 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3872   echo $ac_n "(cached) $ac_c" 1>&6
3873 else
3874   ac_save_LIBS="$LIBS"
3875 LIBS="-lbind  $LIBS"
3876 cat > conftest.$ac_ext <<EOF
3877 #line 3878 "configure"
3878 #include "confdefs.h"
3879 /* Override any gcc2 internal prototype to avoid an error.  */
3880 /* We use char because int might match the return type of a gcc2
3881     builtin and then its argument prototype would still apply.  */
3882 char res_search();
3883
3884 int main() {
3885 res_search()
3886 ; return 0; }
3887 EOF
3888 if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3889   rm -rf conftest*
3890   eval "ac_cv_lib_$ac_lib_var=yes"
3891 else
3892   echo "configure: failed program was:" >&5
3893   cat conftest.$ac_ext >&5
3894   rm -rf conftest*
3895   eval "ac_cv_lib_$ac_lib_var=no"
3896 fi
3897 rm -f conftest*
3898 LIBS="$ac_save_LIBS"
3899
3900 fi
3901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3902   echo "$ac_t""yes" 1>&6
3903     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3904     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3905   cat >> confdefs.h <<EOF
3906 #define $ac_tr_lib 1
3907 EOF
3908
3909   LIBS="-lbind $LIBS"
3910
3911 else
3912   echo "$ac_t""no" 1>&6
3913 fi
3914
3915         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3916                 cat >> confdefs.h <<\EOF
3917 #define HAVE_RES_SEARCH 1
3918 EOF
3919
3920         else
3921                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3922 echo "configure:3923: checking for res_search in -lresolv" >&5
3923 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
3924 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3925   echo $ac_n "(cached) $ac_c" 1>&6
3926 else
3927   ac_save_LIBS="$LIBS"
3928 LIBS="-lresolv  $LIBS"
3929 cat > conftest.$ac_ext <<EOF
3930 #line 3931 "configure"
3931 #include "confdefs.h"
3932 /* Override any gcc2 internal prototype to avoid an error.  */
3933 /* We use char because int might match the return type of a gcc2
3934     builtin and then its argument prototype would still apply.  */
3935 char res_search();
3936
3937 int main() {
3938 res_search()
3939 ; return 0; }
3940 EOF
3941 if { (eval echo configure:3942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3942   rm -rf conftest*
3943   eval "ac_cv_lib_$ac_lib_var=yes"
3944 else
3945   echo "configure: failed program was:" >&5
3946   cat conftest.$ac_ext >&5
3947   rm -rf conftest*
3948   eval "ac_cv_lib_$ac_lib_var=no"
3949 fi
3950 rm -f conftest*
3951 LIBS="$ac_save_LIBS"
3952
3953 fi
3954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3955   echo "$ac_t""yes" 1>&6
3956     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3957     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3958   cat >> confdefs.h <<EOF
3959 #define $ac_tr_lib 1
3960 EOF
3961
3962   LIBS="-lresolv $LIBS"
3963
3964 else
3965   echo "$ac_t""no" 1>&6
3966 fi
3967
3968                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3969                         cat >> confdefs.h <<\EOF
3970 #define HAVE_RES_SEARCH 1
3971 EOF
3972
3973                 fi
3974         fi
3975 fi
3976
3977 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3978 echo "configure:3979: checking for sigset in -lV3" >&5
3979 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3980 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3981   echo $ac_n "(cached) $ac_c" 1>&6
3982 else
3983   ac_save_LIBS="$LIBS"
3984 LIBS="-lV3  $LIBS"
3985 cat > conftest.$ac_ext <<EOF
3986 #line 3987 "configure"
3987 #include "confdefs.h"
3988 /* Override any gcc2 internal prototype to avoid an error.  */
3989 /* We use char because int might match the return type of a gcc2
3990     builtin and then its argument prototype would still apply.  */
3991 char sigset();
3992
3993 int main() {
3994 sigset()
3995 ; return 0; }
3996 EOF
3997 if { (eval echo configure:3998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3998   rm -rf conftest*
3999   eval "ac_cv_lib_$ac_lib_var=yes"
4000 else
4001   echo "configure: failed program was:" >&5
4002   cat conftest.$ac_ext >&5
4003   rm -rf conftest*
4004   eval "ac_cv_lib_$ac_lib_var=no"
4005 fi
4006 rm -f conftest*
4007 LIBS="$ac_save_LIBS"
4008
4009 fi
4010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4011   echo "$ac_t""yes" 1>&6
4012     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4013     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4014   cat >> confdefs.h <<EOF
4015 #define $ac_tr_lib 1
4016 EOF
4017
4018   LIBS="-lV3 $LIBS"
4019
4020 else
4021   echo "$ac_t""no" 1>&6
4022 fi
4023
4024
4025 for ac_hdr in regex.h 
4026 do
4027 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4028 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4029 echo "configure:4030: checking for $ac_hdr" >&5
4030 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4031   echo $ac_n "(cached) $ac_c" 1>&6
4032 else
4033   cat > conftest.$ac_ext <<EOF
4034 #line 4035 "configure"
4035 #include "confdefs.h"
4036 #include <$ac_hdr>
4037 EOF
4038 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4039 { (eval echo configure:4040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4040 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4041 if test -z "$ac_err"; then
4042   rm -rf conftest*
4043   eval "ac_cv_header_$ac_safe=yes"
4044 else
4045   echo "$ac_err" >&5
4046   echo "configure: failed program was:" >&5
4047   cat conftest.$ac_ext >&5
4048   rm -rf conftest*
4049   eval "ac_cv_header_$ac_safe=no"
4050 fi
4051 rm -f conftest*
4052 fi
4053 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4054   echo "$ac_t""yes" 1>&6
4055     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4056   cat >> confdefs.h <<EOF
4057 #define $ac_tr_hdr 1
4058 EOF
4059  
4060 else
4061   echo "$ac_t""no" 1>&6
4062 fi
4063 done
4064
4065 if test "$ac_cv_header_regex_h" != yes ; then
4066         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4067 fi
4068 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4069 echo "configure:4070: checking for regfree" >&5
4070 if eval "test \"`echo '$''{'ac_cv_func_regfree'+set}'`\" = set"; then
4071   echo $ac_n "(cached) $ac_c" 1>&6
4072 else
4073   cat > conftest.$ac_ext <<EOF
4074 #line 4075 "configure"
4075 #include "confdefs.h"
4076 /* System header to define __stub macros and hopefully few prototypes,
4077     which can conflict with char regfree(); below.  */
4078 #include <assert.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 regfree();
4083
4084 int main() {
4085
4086 /* The GNU C library defines this for functions which it implements
4087     to always fail with ENOSYS.  Some functions are actually named
4088     something starting with __ and the normal name is an alias.  */
4089 #if defined (__stub_regfree) || defined (__stub___regfree)
4090 choke me
4091 #else
4092 regfree();
4093 #endif
4094
4095 ; return 0; }
4096 EOF
4097 if { (eval echo configure:4098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4098   rm -rf conftest*
4099   eval "ac_cv_func_regfree=yes"
4100 else
4101   echo "configure: failed program was:" >&5
4102   cat conftest.$ac_ext >&5
4103   rm -rf conftest*
4104   eval "ac_cv_func_regfree=no"
4105 fi
4106 rm -f conftest*
4107 fi
4108
4109 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4110   echo "$ac_t""yes" 1>&6
4111   :
4112 else
4113   echo "$ac_t""no" 1>&6
4114 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4115 fi
4116
4117
4118
4119 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4120 echo "configure:4121: checking for compatible POSIX regex" >&5
4121 if eval "test \"`echo '$''{'ol_cv_c_posix_regex'+set}'`\" = set"; then
4122   echo $ac_n "(cached) $ac_c" 1>&6
4123 else
4124   
4125         if test "$cross_compiling" = yes; then
4126   ol_cv_c_posix_regex=cross
4127 else
4128   cat > conftest.$ac_ext <<EOF
4129 #line 4130 "configure"
4130 #include "confdefs.h"
4131
4132 #include <sys/types.h>
4133 #include <regex.h>
4134 static char *pattern, *string;
4135 main()
4136 {
4137         int rc;
4138         regex_t re;
4139
4140         pattern = "^A";
4141
4142         if(regcomp(&re, pattern, 0)) {
4143                 return -1;
4144         }
4145         
4146         string = "ALL MATCH";
4147         
4148         rc = regexec(&re, string, 0, (void*)0, 0);
4149
4150         regfree(&re);
4151
4152         return rc;
4153 }
4154 EOF
4155 if { (eval echo configure:4156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4156 then
4157   ol_cv_c_posix_regex=yes
4158 else
4159   echo "configure: failed program was:" >&5
4160   cat conftest.$ac_ext >&5
4161   rm -fr conftest*
4162   ol_cv_c_posix_regex=no
4163 fi
4164 rm -fr conftest*
4165 fi
4166
4167 fi
4168
4169 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4170
4171 if test "$ol_cv_c_posix_regex" = no ; then
4172         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4173 fi
4174
4175 echo $ac_n "checking for select""... $ac_c" 1>&6
4176 echo "configure:4177: checking for select" >&5
4177 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
4178   echo $ac_n "(cached) $ac_c" 1>&6
4179 else
4180   cat > conftest.$ac_ext <<EOF
4181 #line 4182 "configure"
4182 #include "confdefs.h"
4183 /* System header to define __stub macros and hopefully few prototypes,
4184     which can conflict with char select(); below.  */
4185 #include <assert.h>
4186 /* Override any gcc2 internal prototype to avoid an error.  */
4187 /* We use char because int might match the return type of a gcc2
4188     builtin and then its argument prototype would still apply.  */
4189 char select();
4190
4191 int main() {
4192
4193 /* The GNU C library defines this for functions which it implements
4194     to always fail with ENOSYS.  Some functions are actually named
4195     something starting with __ and the normal name is an alias.  */
4196 #if defined (__stub_select) || defined (__stub___select)
4197 choke me
4198 #else
4199 select();
4200 #endif
4201
4202 ; return 0; }
4203 EOF
4204 if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4205   rm -rf conftest*
4206   eval "ac_cv_func_select=yes"
4207 else
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   eval "ac_cv_func_select=no"
4212 fi
4213 rm -f conftest*
4214 fi
4215
4216 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4217   echo "$ac_t""yes" 1>&6
4218   :
4219 else
4220   echo "$ac_t""no" 1>&6
4221 { echo "configure: error: select() required." 1>&2; exit 1; }
4222 fi
4223
4224
4225 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4226 echo "configure:4227: checking types of arguments for select()" >&5
4227  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
4228   echo $ac_n "(cached) $ac_c" 1>&6
4229 else
4230    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
4231   echo $ac_n "(cached) $ac_c" 1>&6
4232 else
4233     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
4234   echo $ac_n "(cached) $ac_c" 1>&6
4235 else
4236      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4237      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4238       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4239        cat > conftest.$ac_ext <<EOF
4240 #line 4241 "configure"
4241 #include "confdefs.h"
4242 #ifdef HAVE_SYS_TYPES_H
4243 #include <sys/types.h>
4244 #endif
4245 #ifdef HAVE_SYS_TIME_H
4246 #include <sys/time.h>
4247 #endif
4248 #ifdef HAVE_SYS_SELECT_H
4249 #include <sys/select.h>
4250 #endif
4251 #ifdef HAVE_SYS_SOCKET_H
4252 #include <sys/socket.h>
4253 #endif
4254 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);
4255 int main() {
4256
4257 ; return 0; }
4258 EOF
4259 if { (eval echo configure:4260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4260   rm -rf conftest*
4261           ac_not_found=no ; break 3
4262 else
4263   echo "configure: failed program was:" >&5
4264   cat conftest.$ac_ext >&5
4265   rm -rf conftest*
4266   ac_not_found=yes
4267 fi
4268 rm -f conftest*
4269       done
4270      done
4271     done
4272    
4273 fi
4274   
4275 fi
4276  
4277 fi
4278  if test "$ac_not_found" = yes; then
4279   ac_cv_func_select_arg1=int 
4280   ac_cv_func_select_arg234='int *' 
4281   ac_cv_func_select_arg5='struct timeval *'
4282  fi
4283  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4284  cat >> confdefs.h <<EOF
4285 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4286 EOF
4287
4288  cat >> confdefs.h <<EOF
4289 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4290 EOF
4291
4292  cat >> confdefs.h <<EOF
4293 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4294 EOF
4295
4296
4297
4298 # ISODE tests
4299 ol_link_isode=no
4300 if test $ol_enable_ldapd != no ; then
4301         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
4302
4303                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
4304 echo "configure:4305: checking for main in -lxtpp" >&5
4305 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
4306 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4307   echo $ac_n "(cached) $ac_c" 1>&6
4308 else
4309   ac_save_LIBS="$LIBS"
4310 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
4311 cat > conftest.$ac_ext <<EOF
4312 #line 4313 "configure"
4313 #include "confdefs.h"
4314
4315 int main() {
4316 main()
4317 ; return 0; }
4318 EOF
4319 if { (eval echo configure:4320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4320   rm -rf conftest*
4321   eval "ac_cv_lib_$ac_lib_var=yes"
4322 else
4323   echo "configure: failed program was:" >&5
4324   cat conftest.$ac_ext >&5
4325   rm -rf conftest*
4326   eval "ac_cv_lib_$ac_lib_var=no"
4327 fi
4328 rm -f conftest*
4329 LIBS="$ac_save_LIBS"
4330
4331 fi
4332 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4333   echo "$ac_t""yes" 1>&6
4334   
4335                 ol_link_isode=yes
4336                 cat >> confdefs.h <<\EOF
4337 #define HAVE_XTPP 1
4338 EOF
4339
4340                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
4341                 
4342 else
4343   echo "$ac_t""no" 1>&6
4344 :
4345 fi
4346
4347         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
4348 echo "configure:4349: checking for main in -ldsap" >&5
4349 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
4350 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4351   echo $ac_n "(cached) $ac_c" 1>&6
4352 else
4353   ac_save_LIBS="$LIBS"
4354 LIBS="-ldsap -lisode $LIBS"
4355 cat > conftest.$ac_ext <<EOF
4356 #line 4357 "configure"
4357 #include "confdefs.h"
4358
4359 int main() {
4360 main()
4361 ; return 0; }
4362 EOF
4363 if { (eval echo configure:4364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4364   rm -rf conftest*
4365   eval "ac_cv_lib_$ac_lib_var=yes"
4366 else
4367   echo "configure: failed program was:" >&5
4368   cat conftest.$ac_ext >&5
4369   rm -rf conftest*
4370   eval "ac_cv_lib_$ac_lib_var=no"
4371 fi
4372 rm -f conftest*
4373 LIBS="$ac_save_LIBS"
4374
4375 fi
4376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4377   echo "$ac_t""yes" 1>&6
4378   
4379                 ol_link_isode=yes
4380                 cat >> confdefs.h <<\EOF
4381 #define HAVE_DSAP 1
4382 EOF
4383
4384                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
4385                 
4386 else
4387   echo "$ac_t""no" 1>&6
4388 :
4389 fi
4390
4391         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
4392 echo "configure:4393: checking for main in -lisode" >&5
4393 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
4394 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4395   echo $ac_n "(cached) $ac_c" 1>&6
4396 else
4397   ac_save_LIBS="$LIBS"
4398 LIBS="-lisode  $LIBS"
4399 cat > conftest.$ac_ext <<EOF
4400 #line 4401 "configure"
4401 #include "confdefs.h"
4402
4403 int main() {
4404 main()
4405 ; return 0; }
4406 EOF
4407 if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4408   rm -rf conftest*
4409   eval "ac_cv_lib_$ac_lib_var=yes"
4410 else
4411   echo "configure: failed program was:" >&5
4412   cat conftest.$ac_ext >&5
4413   rm -rf conftest*
4414   eval "ac_cv_lib_$ac_lib_var=no"
4415 fi
4416 rm -f conftest*
4417 LIBS="$ac_save_LIBS"
4418
4419 fi
4420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4421   echo "$ac_t""yes" 1>&6
4422   
4423                 ol_link_isode=yes
4424                 cat >> confdefs.h <<\EOF
4425 #define HAVE_ISODE 1
4426 EOF
4427
4428                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
4429                 
4430 else
4431   echo "$ac_t""no" 1>&6
4432 :
4433 fi
4434
4435 fi
4436
4437 if test $ol_link_isode != no; then
4438         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
4439 echo "configure:4440: checking for main in -lpp" >&5
4440 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
4441 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4442   echo $ac_n "(cached) $ac_c" 1>&6
4443 else
4444   ac_save_LIBS="$LIBS"
4445 LIBS="-lpp  $LIBS"
4446 cat > conftest.$ac_ext <<EOF
4447 #line 4448 "configure"
4448 #include "confdefs.h"
4449
4450 int main() {
4451 main()
4452 ; return 0; }
4453 EOF
4454 if { (eval echo configure:4455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4455   rm -rf conftest*
4456   eval "ac_cv_lib_$ac_lib_var=yes"
4457 else
4458   echo "configure: failed program was:" >&5
4459   cat conftest.$ac_ext >&5
4460   rm -rf conftest*
4461   eval "ac_cv_lib_$ac_lib_var=no"
4462 fi
4463 rm -f conftest*
4464 LIBS="$ac_save_LIBS"
4465
4466 fi
4467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4468   echo "$ac_t""yes" 1>&6
4469   
4470                 cat >> confdefs.h <<\EOF
4471 #define HAVE_PP 1
4472 EOF
4473
4474                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
4475                 
4476 else
4477   echo "$ac_t""no" 1>&6
4478 :
4479 fi
4480
4481
4482         # Extract the first word of "pepsy", so it can be a program name with args.
4483 set dummy pepsy; ac_word=$2
4484 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4485 echo "configure:4486: checking for $ac_word" >&5
4486 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
4487   echo $ac_n "(cached) $ac_c" 1>&6
4488 else
4489   case "$PEPSY" in
4490   /*)
4491   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
4492   ;;
4493   ?:/*)                  
4494   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
4495   ;;
4496   *)
4497   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4498   ac_dummy="$PATH"
4499   for ac_dir in $ac_dummy; do 
4500     test -z "$ac_dir" && ac_dir=.
4501     if test -f $ac_dir/$ac_word; then
4502       ac_cv_path_PEPSY="$ac_dir/$ac_word"
4503       break
4504     fi
4505   done
4506   IFS="$ac_save_ifs"
4507   ;;
4508 esac
4509 fi
4510 PEPSY="$ac_cv_path_PEPSY"
4511 if test -n "$PEPSY"; then
4512   echo "$ac_t""$PEPSY" 1>&6
4513 else
4514   echo "$ac_t""no" 1>&6
4515 fi
4516
4517 fi
4518
4519 ol_link_kerberos=no
4520
4521 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
4522         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
4523 do
4524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4526 echo "configure:4527: checking for $ac_hdr" >&5
4527 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   cat > conftest.$ac_ext <<EOF
4531 #line 4532 "configure"
4532 #include "confdefs.h"
4533 #include <$ac_hdr>
4534 EOF
4535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4536 { (eval echo configure:4537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4538 if test -z "$ac_err"; then
4539   rm -rf conftest*
4540   eval "ac_cv_header_$ac_safe=yes"
4541 else
4542   echo "$ac_err" >&5
4543   echo "configure: failed program was:" >&5
4544   cat conftest.$ac_ext >&5
4545   rm -rf conftest*
4546   eval "ac_cv_header_$ac_safe=no"
4547 fi
4548 rm -f conftest*
4549 fi
4550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4551   echo "$ac_t""yes" 1>&6
4552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4553   cat >> confdefs.h <<EOF
4554 #define $ac_tr_hdr 1
4555 EOF
4556  
4557 else
4558   echo "$ac_t""no" 1>&6
4559 fi
4560 done
4561
4562
4563         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
4564                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
4565 echo "configure:4566: checking for main in -lkrb4" >&5
4566 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
4567 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4568   echo $ac_n "(cached) $ac_c" 1>&6
4569 else
4570   ac_save_LIBS="$LIBS"
4571 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
4572 cat > conftest.$ac_ext <<EOF
4573 #line 4574 "configure"
4574 #include "confdefs.h"
4575
4576 int main() {
4577 main()
4578 ; return 0; }
4579 EOF
4580 if { (eval echo configure:4581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4581   rm -rf conftest*
4582   eval "ac_cv_lib_$ac_lib_var=yes"
4583 else
4584   echo "configure: failed program was:" >&5
4585   cat conftest.$ac_ext >&5
4586   rm -rf conftest*
4587   eval "ac_cv_lib_$ac_lib_var=no"
4588 fi
4589 rm -f conftest*
4590 LIBS="$ac_save_LIBS"
4591
4592 fi
4593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4594   echo "$ac_t""yes" 1>&6
4595   have_k5=yes
4596 else
4597   echo "$ac_t""no" 1>&6
4598 have_k5=no
4599 fi
4600
4601
4602                 if test $have_k5 = yes ; then
4603                         ol_with_kerberos=found
4604                         ol_link_kerberos=yes
4605
4606                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
4607
4608                         LIBS="$KRB_LIBS $LIBS"
4609
4610                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
4611 echo "configure:4612: checking for des_debug in Kerberos libraries" >&5
4612 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
4613   echo $ac_n "(cached) $ac_c" 1>&6
4614 else
4615   
4616                                                                 save_LIBS="$LIBS"
4617                                 LIBS="$KRB_LIBS $LIBS"
4618                                 cat > conftest.$ac_ext <<EOF
4619 #line 4620 "configure"
4620 #include "confdefs.h"
4621
4622 #include <kerberosIV/krb.h>
4623 #include <kerberosIV/des.h>
4624 extern int des_debug;
4625
4626 int main() {
4627
4628 des_debug = 1;
4629
4630 ; return 0; }
4631 EOF
4632 if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4633   rm -rf conftest*
4634   ol_cv_var_des_debug=yes
4635 else
4636   echo "configure: failed program was:" >&5
4637   cat conftest.$ac_ext >&5
4638   rm -rf conftest*
4639   ol_cv_var_des_debug=no
4640 fi
4641 rm -f conftest*
4642                                                                 LIBS="$save_LIBS"
4643                         
4644 fi
4645
4646 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
4647
4648                         if test $ol_cv_var_des_debug = yes ; then
4649                                 cat >> confdefs.h <<\EOF
4650 #define HAVE_DES_DEBUG 1
4651 EOF
4652
4653                         fi
4654
4655                         LIBS="$save_LIBS"
4656                 fi
4657         fi
4658 fi
4659
4660 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
4661         for ac_hdr in krb.h des.h
4662 do
4663 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4664 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4665 echo "configure:4666: checking for $ac_hdr" >&5
4666 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4667   echo $ac_n "(cached) $ac_c" 1>&6
4668 else
4669   cat > conftest.$ac_ext <<EOF
4670 #line 4671 "configure"
4671 #include "confdefs.h"
4672 #include <$ac_hdr>
4673 EOF
4674 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4675 { (eval echo configure:4676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4676 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4677 if test -z "$ac_err"; then
4678   rm -rf conftest*
4679   eval "ac_cv_header_$ac_safe=yes"
4680 else
4681   echo "$ac_err" >&5
4682   echo "configure: failed program was:" >&5
4683   cat conftest.$ac_ext >&5
4684   rm -rf conftest*
4685   eval "ac_cv_header_$ac_safe=no"
4686 fi
4687 rm -f conftest*
4688 fi
4689 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4690   echo "$ac_t""yes" 1>&6
4691     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4692   cat >> confdefs.h <<EOF
4693 #define $ac_tr_hdr 1
4694 EOF
4695  
4696 else
4697   echo "$ac_t""no" 1>&6
4698 fi
4699 done
4700
4701
4702         if test $ac_cv_header_krb_h = yes ; then
4703                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
4704 echo "configure:4705: checking for main in -lkrb" >&5
4705 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
4706 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4707   echo $ac_n "(cached) $ac_c" 1>&6
4708 else
4709   ac_save_LIBS="$LIBS"
4710 LIBS="-lkrb -ldes $LIBS"
4711 cat > conftest.$ac_ext <<EOF
4712 #line 4713 "configure"
4713 #include "confdefs.h"
4714
4715 int main() {
4716 main()
4717 ; return 0; }
4718 EOF
4719 if { (eval echo configure:4720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4720   rm -rf conftest*
4721   eval "ac_cv_lib_$ac_lib_var=yes"
4722 else
4723   echo "configure: failed program was:" >&5
4724   cat conftest.$ac_ext >&5
4725   rm -rf conftest*
4726   eval "ac_cv_lib_$ac_lib_var=no"
4727 fi
4728 rm -f conftest*
4729 LIBS="$ac_save_LIBS"
4730
4731 fi
4732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4733   echo "$ac_t""yes" 1>&6
4734   have_k4=yes
4735 else
4736   echo "$ac_t""no" 1>&6
4737 have_k4=no
4738 fi
4739
4740
4741                 if test $have_k4 = yes ; then
4742                         ol_with_kerberos=found
4743                         ol_link_kerberos=yes
4744
4745                         KRB_LIBS="-lkrb -ldes"
4746                 fi
4747         fi
4748 fi
4749
4750 if test $ol_link_kerberos = yes ; then
4751         cat >> confdefs.h <<\EOF
4752 #define HAVE_KERBEROS 1
4753 EOF
4754
4755 fi
4756
4757 ol_link_tls=no
4758 if test $ol_with_tls != no ; then
4759         
4760         for ac_hdr in ssl.h
4761 do
4762 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4763 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4764 echo "configure:4765: checking for $ac_hdr" >&5
4765 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4766   echo $ac_n "(cached) $ac_c" 1>&6
4767 else
4768   cat > conftest.$ac_ext <<EOF
4769 #line 4770 "configure"
4770 #include "confdefs.h"
4771 #include <$ac_hdr>
4772 EOF
4773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4774 { (eval echo configure:4775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4776 if test -z "$ac_err"; then
4777   rm -rf conftest*
4778   eval "ac_cv_header_$ac_safe=yes"
4779 else
4780   echo "$ac_err" >&5
4781   echo "configure: failed program was:" >&5
4782   cat conftest.$ac_ext >&5
4783   rm -rf conftest*
4784   eval "ac_cv_header_$ac_safe=no"
4785 fi
4786 rm -f conftest*
4787 fi
4788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4789   echo "$ac_t""yes" 1>&6
4790     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4791   cat >> confdefs.h <<EOF
4792 #define $ac_tr_hdr 1
4793 EOF
4794  
4795 else
4796   echo "$ac_t""no" 1>&6
4797 fi
4798 done
4799
4800         
4801         if test $ac_cv_header_ssl_h = yes ; then
4802                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
4803 echo "configure:4804: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
4804 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
4805 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4806   echo $ac_n "(cached) $ac_c" 1>&6
4807 else
4808   ac_save_LIBS="$LIBS"
4809 LIBS="-lssl -lcrypto $LIBS"
4810 cat > conftest.$ac_ext <<EOF
4811 #line 4812 "configure"
4812 #include "confdefs.h"
4813 /* Override any gcc2 internal prototype to avoid an error.  */
4814 /* We use char because int might match the return type of a gcc2
4815     builtin and then its argument prototype would still apply.  */
4816 char SSLeay_add_ssl_algorithms();
4817
4818 int main() {
4819 SSLeay_add_ssl_algorithms()
4820 ; return 0; }
4821 EOF
4822 if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4823   rm -rf conftest*
4824   eval "ac_cv_lib_$ac_lib_var=yes"
4825 else
4826   echo "configure: failed program was:" >&5
4827   cat conftest.$ac_ext >&5
4828   rm -rf conftest*
4829   eval "ac_cv_lib_$ac_lib_var=no"
4830 fi
4831 rm -f conftest*
4832 LIBS="$ac_save_LIBS"
4833
4834 fi
4835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4836   echo "$ac_t""yes" 1>&6
4837   have_ssleay=yes
4838                         need_rsaref=no
4839 else
4840   echo "$ac_t""no" 1>&6
4841 have_ssleay=no
4842 fi
4843
4844                         
4845                 if test $have_ssleay = no ; then
4846                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4847 echo "configure:4848: checking for ssl3_accept in -lssl" >&5
4848 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4849 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4850   echo $ac_n "(cached) $ac_c" 1>&6
4851 else
4852   ac_save_LIBS="$LIBS"
4853 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4854 cat > conftest.$ac_ext <<EOF
4855 #line 4856 "configure"
4856 #include "confdefs.h"
4857 /* Override any gcc2 internal prototype to avoid an error.  */
4858 /* We use char because int might match the return type of a gcc2
4859     builtin and then its argument prototype would still apply.  */
4860 char ssl3_accept();
4861
4862 int main() {
4863 ssl3_accept()
4864 ; return 0; }
4865 EOF
4866 if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4867   rm -rf conftest*
4868   eval "ac_cv_lib_$ac_lib_var=yes"
4869 else
4870   echo "configure: failed program was:" >&5
4871   cat conftest.$ac_ext >&5
4872   rm -rf conftest*
4873   eval "ac_cv_lib_$ac_lib_var=no"
4874 fi
4875 rm -f conftest*
4876 LIBS="$ac_save_LIBS"
4877
4878 fi
4879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4880   echo "$ac_t""yes" 1>&6
4881   have_ssleay=yes
4882                                 need_rsaref=yes
4883 else
4884   echo "$ac_t""no" 1>&6
4885 have_ssleay=no
4886 fi
4887
4888                 fi
4889
4890                 if test $have_ssleay = yes ; then
4891                         ol_with_tls=found
4892                         ol_link_tls=yes
4893
4894                         cat >> confdefs.h <<\EOF
4895 #define HAVE_SSLEAY 1
4896 EOF
4897
4898
4899                         if test $need_rsaref = yes; then
4900                                 cat >> confdefs.h <<\EOF
4901 #define HAVE_RSAREF 1
4902 EOF
4903
4904
4905                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4906                         else
4907                                 TLS_LIBS="-lssl -lcrypto"
4908                         fi
4909                 fi
4910         fi
4911 fi
4912
4913 if test $ol_link_tls = yes ; then
4914         cat >> confdefs.h <<\EOF
4915 #define HAVE_TLS 1
4916 EOF
4917
4918 fi      
4919
4920 for ac_func in \
4921         ctime_r                 \
4922         gethostbyname_r gethostbyaddr_r \
4923
4924 do
4925 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4926 echo "configure:4927: checking for $ac_func" >&5
4927 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4928   echo $ac_n "(cached) $ac_c" 1>&6
4929 else
4930   cat > conftest.$ac_ext <<EOF
4931 #line 4932 "configure"
4932 #include "confdefs.h"
4933 /* System header to define __stub macros and hopefully few prototypes,
4934     which can conflict with char $ac_func(); below.  */
4935 #include <assert.h>
4936 /* Override any gcc2 internal prototype to avoid an error.  */
4937 /* We use char because int might match the return type of a gcc2
4938     builtin and then its argument prototype would still apply.  */
4939 char $ac_func();
4940
4941 int main() {
4942
4943 /* The GNU C library defines this for functions which it implements
4944     to always fail with ENOSYS.  Some functions are actually named
4945     something starting with __ and the normal name is an alias.  */
4946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4947 choke me
4948 #else
4949 $ac_func();
4950 #endif
4951
4952 ; return 0; }
4953 EOF
4954 if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4955   rm -rf conftest*
4956   eval "ac_cv_func_$ac_func=yes"
4957 else
4958   echo "configure: failed program was:" >&5
4959   cat conftest.$ac_ext >&5
4960   rm -rf conftest*
4961   eval "ac_cv_func_$ac_func=no"
4962 fi
4963 rm -f conftest*
4964 fi
4965
4966 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4967   echo "$ac_t""yes" 1>&6
4968     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4969   cat >> confdefs.h <<EOF
4970 #define $ac_tr_func 1
4971 EOF
4972  
4973 else
4974   echo "$ac_t""no" 1>&6
4975 fi
4976 done
4977
4978
4979 if test "$ac_cv_func_ctime_r" = no ; then
4980         ol_cv_func_ctime_r_nargs=0
4981 else
4982         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4983 echo "configure:4984: checking number of arguments of ctime_r" >&5
4984 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
4985   echo $ac_n "(cached) $ac_c" 1>&6
4986 else
4987   cat > conftest.$ac_ext <<EOF
4988 #line 4989 "configure"
4989 #include "confdefs.h"
4990 #include <time.h>
4991 int main() {
4992 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4993 ; return 0; }
4994 EOF
4995 if { (eval echo configure:4996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4996   rm -rf conftest*
4997   ol_cv_func_ctime_r_nargs=3
4998 else
4999   echo "configure: failed program was:" >&5
5000   cat conftest.$ac_ext >&5
5001   rm -rf conftest*
5002   cat > conftest.$ac_ext <<EOF
5003 #line 5004 "configure"
5004 #include "confdefs.h"
5005 #include <time.h>
5006 int main() {
5007 time_t ti; char *buffer; ctime_r(&ti,buffer);
5008 ; return 0; }
5009 EOF
5010 if { (eval echo configure:5011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5011   rm -rf conftest*
5012   ol_cv_func_ctime_r_nargs=2
5013 else
5014   echo "configure: failed program was:" >&5
5015   cat conftest.$ac_ext >&5
5016   rm -rf conftest*
5017   ol_cv_func_ctime_r_nargs=0
5018 fi
5019 rm -f conftest*
5020 fi
5021 rm -f conftest*
5022 fi
5023
5024 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
5025   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5026     cat >> confdefs.h <<EOF
5027 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5028 EOF
5029
5030   fi
5031
5032 fi
5033
5034 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5035         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5036 echo "configure:5037: checking number of arguments of gethostbyname_r" >&5
5037 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
5038   echo $ac_n "(cached) $ac_c" 1>&6
5039 else
5040   cat > conftest.$ac_ext <<EOF
5041 #line 5042 "configure"
5042 #include "confdefs.h"
5043 #include <sys/types.h>
5044 #include <sys/socket.h>
5045 #include <netinet/in.h>
5046 #include <netdb.h>
5047 #define BUFSIZE (sizeof(struct hostent)+10)
5048 int main() {
5049 struct hostent hent; char buffer[BUFSIZE];
5050                 int bufsize=BUFSIZE;int h_errno;
5051                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5052                         buffer, bufsize, &h_errno);
5053 ; return 0; }
5054 EOF
5055 if { (eval echo configure:5056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5056   rm -rf conftest*
5057   ol_cv_func_gethostbyname_r_nargs=5
5058 else
5059   echo "configure: failed program was:" >&5
5060   cat conftest.$ac_ext >&5
5061   rm -rf conftest*
5062   cat > conftest.$ac_ext <<EOF
5063 #line 5064 "configure"
5064 #include "confdefs.h"
5065 #include <sys/types.h>
5066 #include <sys/socket.h>
5067 #include <netinet/in.h>
5068 #include <netdb.h>
5069 #define BUFSIZE (sizeof(struct hostent)+10)
5070 int main() {
5071 struct hostent hent;struct hostent *rhent;
5072                         char buffer[BUFSIZE];
5073                         int bufsize=BUFSIZE;int h_errno;
5074                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
5075                                 &rhent, &h_errno);
5076 ; return 0; }
5077 EOF
5078 if { (eval echo configure:5079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5079   rm -rf conftest*
5080   ol_cv_func_gethostbyname_r_nargs=6
5081 else
5082   echo "configure: failed program was:" >&5
5083   cat conftest.$ac_ext >&5
5084   rm -rf conftest*
5085   ol_cv_func_gethostbyname_r_nargs=0
5086 fi
5087 rm -f conftest*
5088 fi
5089 rm -f conftest*
5090 fi
5091
5092 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
5093   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
5094         cat >> confdefs.h <<EOF
5095 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
5096 EOF
5097
5098   fi
5099
5100 else
5101         ol_cv_func_gethostbyname_r_nargs=0
5102 fi
5103  
5104 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
5105         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
5106 echo "configure:5107: checking number of arguments of gethostbyaddr_r" >&5
5107 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
5108   echo $ac_n "(cached) $ac_c" 1>&6
5109 else
5110   cat > conftest.$ac_ext <<EOF
5111 #line 5112 "configure"
5112 #include "confdefs.h"
5113 #include <sys/types.h>
5114 #include <sys/socket.h>
5115 #include <netinet/in.h>
5116 #include <netdb.h>
5117 #define BUFSIZE (sizeof(struct hostent)+10)
5118 int main() {
5119 struct hostent hent; char buffer[BUFSIZE]; 
5120             struct in_addr add;
5121             size_t alen=sizeof(struct in_addr);
5122             int bufsize=BUFSIZE;int h_errno;
5123                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
5124                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
5125 ; return 0; }
5126 EOF
5127 if { (eval echo configure:5128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5128   rm -rf conftest*
5129   ol_cv_func_gethostbyaddr_r_nargs=7
5130 else
5131   echo "configure: failed program was:" >&5
5132   cat conftest.$ac_ext >&5
5133   rm -rf conftest*
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;
5144                         struct hostent *rhent; char buffer[BUFSIZE]; 
5145                         struct in_addr add;
5146                         size_t alen=sizeof(struct in_addr);
5147                         int bufsize=BUFSIZE;int h_errno;
5148                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
5149                                 alen, AF_INET, &hent, buffer, bufsize, 
5150                                 &rhent, &h_errno);
5151 ; return 0; }
5152 EOF
5153 if { (eval echo configure:5154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5154   rm -rf conftest*
5155   ol_cv_func_gethostbyaddr_r_nargs=8
5156 else
5157   echo "configure: failed program was:" >&5
5158   cat conftest.$ac_ext >&5
5159   rm -rf conftest*
5160   ol_cv_func_gethostbyaddr_r_nargs=0
5161 fi
5162 rm -f conftest*
5163 fi
5164 rm -f conftest*
5165 fi
5166
5167 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
5168   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
5169     cat >> confdefs.h <<EOF
5170 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
5171 EOF
5172
5173   fi
5174
5175 else
5176         ol_cv_func_gethostbyaddr_r_nargs=0
5177 fi
5178
5179 if test "$ac_cv_func_ctime_r" = yes \
5180         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
5181         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
5182         -a "$ac_cv_func_gethostbyname_r" = yes \
5183         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
5184         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
5185         -a "$ac_cv_func_gethostbyaddr_r" = yes \
5186         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
5187         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
5188         ; then
5189  
5190         cat >> confdefs.h <<\EOF
5191 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
5192 EOF
5193
5194 fi
5195
5196 ol_link_threads=no
5197 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5198         -o $ol_with_threads = posix ; then
5199
5200         for ac_hdr in pthread.h sched.h
5201 do
5202 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5203 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5204 echo "configure:5205: checking for $ac_hdr" >&5
5205 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5206   echo $ac_n "(cached) $ac_c" 1>&6
5207 else
5208   cat > conftest.$ac_ext <<EOF
5209 #line 5210 "configure"
5210 #include "confdefs.h"
5211 #include <$ac_hdr>
5212 EOF
5213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5214 { (eval echo configure:5215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5216 if test -z "$ac_err"; then
5217   rm -rf conftest*
5218   eval "ac_cv_header_$ac_safe=yes"
5219 else
5220   echo "$ac_err" >&5
5221   echo "configure: failed program was:" >&5
5222   cat conftest.$ac_ext >&5
5223   rm -rf conftest*
5224   eval "ac_cv_header_$ac_safe=no"
5225 fi
5226 rm -f conftest*
5227 fi
5228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5229   echo "$ac_t""yes" 1>&6
5230     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5231   cat >> confdefs.h <<EOF
5232 #define $ac_tr_hdr 1
5233 EOF
5234  
5235 else
5236   echo "$ac_t""no" 1>&6
5237 fi
5238 done
5239
5240
5241         if test $ac_cv_header_pthread_h = yes ; then
5242                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
5243 echo "configure:5244: checking POSIX thread version" >&5
5244 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
5245   echo $ac_n "(cached) $ac_c" 1>&6
5246 else
5247   
5248         cat > conftest.$ac_ext <<EOF
5249 #line 5250 "configure"
5250 #include "confdefs.h"
5251
5252 #               include <pthread.h>
5253                 /* this check could be improved */
5254 #               ifdef PTHREAD_ONCE_INIT
5255                         pthread_version_final
5256 #               endif
5257         
5258 EOF
5259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5260   egrep "pthread_version_final" >/dev/null 2>&1; then
5261   rm -rf conftest*
5262   ol_pthread_final=yes
5263 else
5264   rm -rf conftest*
5265   ol_pthread_final=no
5266 fi
5267 rm -f conftest*
5268
5269
5270         cat > conftest.$ac_ext <<EOF
5271 #line 5272 "configure"
5272 #include "confdefs.h"
5273
5274 #               include <pthread.h>
5275                 /* this check could be improved */
5276 #               ifdef pthread_once_init
5277                         pthread_version_draft4
5278 #               endif
5279         
5280 EOF
5281 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5282   egrep "pthread_version_draft4" >/dev/null 2>&1; then
5283   rm -rf conftest*
5284   ol_pthread_draft4=yes
5285 else
5286   rm -rf conftest*
5287   ol_pthread_draft4=no
5288 fi
5289 rm -f conftest*
5290
5291
5292         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
5293                 ol_cv_pthread_version=final
5294         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
5295                 ol_cv_pthread_version=draft4
5296         else
5297                 ol_cv_pthread_version=unknown
5298         fi
5299
5300 fi
5301
5302 echo "$ac_t""$ol_cv_pthread_version" 1>&6
5303
5304
5305                 if test $ol_cv_pthread_version = final ; then
5306                         cat >> confdefs.h <<\EOF
5307 #define HAVE_PTHREADS_FINAL 1
5308 EOF
5309
5310                 elif test $ol_cv_pthread_version = draft4 ; then
5311                         cat >> confdefs.h <<\EOF
5312 #define HAVE_PTHREADS_D4 1
5313 EOF
5314
5315                 else
5316                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
5317                 fi
5318
5319                 # consider threads found
5320                 ol_with_threads=found
5321
5322                 
5323         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
5324 echo "configure:5325: checking for LinuxThreads pthread.h" >&5
5325 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
5326   echo $ac_n "(cached) $ac_c" 1>&6
5327 else
5328   cat > conftest.$ac_ext <<EOF
5329 #line 5330 "configure"
5330 #include "confdefs.h"
5331 #include <pthread.h>
5332 EOF
5333 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5334   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
5335   rm -rf conftest*
5336   ol_cv_header_linux_threads=yes
5337 else
5338   rm -rf conftest*
5339   ol_cv_header_linux_threads=no
5340 fi
5341 rm -f conftest*
5342
5343                 
5344 fi
5345
5346 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
5347         if test $ol_cv_header_linux_threads = yes; then
5348                 cat >> confdefs.h <<\EOF
5349 #define HAVE_LINUX_THREADS 1
5350 EOF
5351
5352         fi
5353
5354
5355                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
5356                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
5357 echo "configure:5358: checking for pthread_create in default libraries" >&5
5358                 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
5359   echo $ac_n "(cached) $ac_c" 1>&6
5360 else
5361   
5362                 if test "$cross_compiling" = yes; then
5363                         ol_cv_pthread_create=yes
5364 else
5365   cat > conftest.$ac_ext <<EOF
5366 #line 5367 "configure"
5367 #include "confdefs.h"
5368
5369 #include <pthread.h>
5370 #ifndef NULL
5371 #define NULL (void*)0
5372 #endif
5373
5374 static void *task(p)
5375         void *p;
5376 {
5377         return (void *) (p == NULL);
5378 }
5379
5380 int main(argc, argv)
5381         int argc;
5382         char **argv;
5383 {
5384         pthread_t t;
5385         int status;
5386
5387         /* make sure pthread_create() isn't just a stub */
5388 #if HAVE_PTHREADS_D4
5389         status = pthread_create(&t, pthread_attr_default, task, NULL);
5390 #else
5391         status = pthread_create(&t, NULL, task, NULL);
5392 #endif
5393
5394         if( status ) return status;
5395
5396         /* make sure pthread_detach() isn't just a stub */
5397 #if HAVE_PTHREADS_D4
5398         status = pthread_detach( &t );
5399 #else
5400         status = pthread_detach( t );
5401 #endif
5402
5403         if( status ) return status;
5404
5405         return status;
5406 }
5407
5408 EOF
5409 if { (eval echo configure:5410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5410 then
5411   ol_cv_pthread_create=yes
5412 else
5413   echo "configure: failed program was:" >&5
5414   cat conftest.$ac_ext >&5
5415   rm -fr conftest*
5416   ol_cv_pthread_create=no
5417 fi
5418 rm -fr conftest*
5419 fi
5420
5421 fi
5422
5423                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
5424
5425                 if test $ol_cv_pthread_create != no ; then
5426                         ol_link_threads=posix
5427                         ol_link_pthreads=""
5428                 fi
5429                 
5430                 # Pthread try link: -mt (ol_cv_pthread_mt)
5431         if test "$ol_link_threads" = no ; then
5432                 # try -mt
5433                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
5434 echo "configure:5435: checking for pthread link with -mt" >&5
5435 if eval "test \"`echo '$''{'ol_cv_pthread_mt'+set}'`\" = set"; then
5436   echo $ac_n "(cached) $ac_c" 1>&6
5437 else
5438   
5439                         # save the flags
5440                         ol_LIBS="$LIBS"
5441                         LIBS="-mt $LIBS"
5442
5443                         cat > conftest.$ac_ext <<EOF
5444 #line 5445 "configure"
5445 #include "confdefs.h"
5446
5447 #include <pthread.h>
5448 #ifndef NULL
5449 #define NULL (void*)0
5450 #endif
5451
5452 int main() {
5453
5454         pthread_t t;
5455
5456 #if HAVE_PTHREADS_D4
5457         pthread_create(&t, pthread_attr_default, NULL, NULL);
5458         pthread_detach( &t );
5459 #else
5460         pthread_create(&t, NULL, NULL, NULL);
5461         pthread_detach( t );
5462 #endif
5463 #ifdef HAVE_LINUX_THREADS
5464         pthread_kill_other_threads_np();
5465 #endif
5466
5467 ; return 0; }
5468 EOF
5469 if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5470   rm -rf conftest*
5471   ol_cv_pthread_mt=yes
5472 else
5473   echo "configure: failed program was:" >&5
5474   cat conftest.$ac_ext >&5
5475   rm -rf conftest*
5476   ol_cv_pthread_mt=no
5477 fi
5478 rm -f conftest*
5479
5480                 # restore the LIBS
5481                 LIBS="$ol_LIBS"
5482                 
5483 fi
5484
5485 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
5486
5487                 if test $ol_cv_pthread_mt = yes ; then
5488                         ol_link_pthreads="-mt"
5489                         ol_link_threads=posix
5490                 fi
5491         fi
5492
5493                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
5494         if test "$ol_link_threads" = no ; then
5495                 # try -kthread
5496                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
5497 echo "configure:5498: checking for pthread link with -kthread" >&5
5498 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
5499   echo $ac_n "(cached) $ac_c" 1>&6
5500 else
5501   
5502                         # save the flags
5503                         ol_LIBS="$LIBS"
5504                         LIBS="-kthread $LIBS"
5505
5506                         cat > conftest.$ac_ext <<EOF
5507 #line 5508 "configure"
5508 #include "confdefs.h"
5509
5510 #include <pthread.h>
5511 #ifndef NULL
5512 #define NULL (void*)0
5513 #endif
5514
5515 int main() {
5516
5517         pthread_t t;
5518
5519 #if HAVE_PTHREADS_D4
5520         pthread_create(&t, pthread_attr_default, NULL, NULL);
5521         pthread_detach( &t );
5522 #else
5523         pthread_create(&t, NULL, NULL, NULL);
5524         pthread_detach( t );
5525 #endif
5526 #ifdef HAVE_LINUX_THREADS
5527         pthread_kill_other_threads_np();
5528 #endif
5529
5530 ; return 0; }
5531 EOF
5532 if { (eval echo configure:5533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5533   rm -rf conftest*
5534   ol_cv_pthread_kthread=yes
5535 else
5536   echo "configure: failed program was:" >&5
5537   cat conftest.$ac_ext >&5
5538   rm -rf conftest*
5539   ol_cv_pthread_kthread=no
5540 fi
5541 rm -f conftest*
5542
5543                 # restore the LIBS
5544                 LIBS="$ol_LIBS"
5545                 
5546 fi
5547
5548 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
5549
5550                 if test $ol_cv_pthread_kthread = yes ; then
5551                         ol_link_pthreads="-kthread"
5552                         ol_link_threads=posix
5553                 fi
5554         fi
5555
5556                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
5557         if test "$ol_link_threads" = no ; then
5558                 # try -pthread
5559                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
5560 echo "configure:5561: checking for pthread link with -pthread" >&5
5561 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
5562   echo $ac_n "(cached) $ac_c" 1>&6
5563 else
5564   
5565                         # save the flags
5566                         ol_LIBS="$LIBS"
5567                         LIBS="-pthread $LIBS"
5568
5569                         cat > conftest.$ac_ext <<EOF
5570 #line 5571 "configure"
5571 #include "confdefs.h"
5572
5573 #include <pthread.h>
5574 #ifndef NULL
5575 #define NULL (void*)0
5576 #endif
5577
5578 int main() {
5579
5580         pthread_t t;
5581
5582 #if HAVE_PTHREADS_D4
5583         pthread_create(&t, pthread_attr_default, NULL, NULL);
5584         pthread_detach( &t );
5585 #else
5586         pthread_create(&t, NULL, NULL, NULL);
5587         pthread_detach( t );
5588 #endif
5589 #ifdef HAVE_LINUX_THREADS
5590         pthread_kill_other_threads_np();
5591 #endif
5592
5593 ; return 0; }
5594 EOF
5595 if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5596   rm -rf conftest*
5597   ol_cv_pthread_pthread=yes
5598 else
5599   echo "configure: failed program was:" >&5
5600   cat conftest.$ac_ext >&5
5601   rm -rf conftest*
5602   ol_cv_pthread_pthread=no
5603 fi
5604 rm -f conftest*
5605
5606                 # restore the LIBS
5607                 LIBS="$ol_LIBS"
5608                 
5609 fi
5610
5611 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
5612
5613                 if test $ol_cv_pthread_pthread = yes ; then
5614                         ol_link_pthreads="-pthread"
5615                         ol_link_threads=posix
5616                 fi
5617         fi
5618
5619                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
5620         if test "$ol_link_threads" = no ; then
5621                 # try -pthreads
5622                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
5623 echo "configure:5624: checking for pthread link with -pthreads" >&5
5624 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
5625   echo $ac_n "(cached) $ac_c" 1>&6
5626 else
5627   
5628                         # save the flags
5629                         ol_LIBS="$LIBS"
5630                         LIBS="-pthreads $LIBS"
5631
5632                         cat > conftest.$ac_ext <<EOF
5633 #line 5634 "configure"
5634 #include "confdefs.h"
5635
5636 #include <pthread.h>
5637 #ifndef NULL
5638 #define NULL (void*)0
5639 #endif
5640
5641 int main() {
5642
5643         pthread_t t;
5644
5645 #if HAVE_PTHREADS_D4
5646         pthread_create(&t, pthread_attr_default, NULL, NULL);
5647         pthread_detach( &t );
5648 #else
5649         pthread_create(&t, NULL, NULL, NULL);
5650         pthread_detach( t );
5651 #endif
5652 #ifdef HAVE_LINUX_THREADS
5653         pthread_kill_other_threads_np();
5654 #endif
5655
5656 ; return 0; }
5657 EOF
5658 if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5659   rm -rf conftest*
5660   ol_cv_pthread_pthreads=yes
5661 else
5662   echo "configure: failed program was:" >&5
5663   cat conftest.$ac_ext >&5
5664   rm -rf conftest*
5665   ol_cv_pthread_pthreads=no
5666 fi
5667 rm -f conftest*
5668
5669                 # restore the LIBS
5670                 LIBS="$ol_LIBS"
5671                 
5672 fi
5673
5674 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
5675
5676                 if test $ol_cv_pthread_pthreads = yes ; then
5677                         ol_link_pthreads="-pthreads"
5678                         ol_link_threads=posix
5679                 fi
5680         fi
5681
5682                 # Pthread try link: -thread (ol_cv_pthread_thread)
5683         if test "$ol_link_threads" = no ; then
5684                 # try -thread
5685                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
5686 echo "configure:5687: checking for pthread link with -thread" >&5
5687 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
5688   echo $ac_n "(cached) $ac_c" 1>&6
5689 else
5690   
5691                         # save the flags
5692                         ol_LIBS="$LIBS"
5693                         LIBS="-thread $LIBS"
5694
5695                         cat > conftest.$ac_ext <<EOF
5696 #line 5697 "configure"
5697 #include "confdefs.h"
5698
5699 #include <pthread.h>
5700 #ifndef NULL
5701 #define NULL (void*)0
5702 #endif
5703
5704 int main() {
5705
5706         pthread_t t;
5707
5708 #if HAVE_PTHREADS_D4
5709         pthread_create(&t, pthread_attr_default, NULL, NULL);
5710         pthread_detach( &t );
5711 #else
5712         pthread_create(&t, NULL, NULL, NULL);
5713         pthread_detach( t );
5714 #endif
5715 #ifdef HAVE_LINUX_THREADS
5716         pthread_kill_other_threads_np();
5717 #endif
5718
5719 ; return 0; }
5720 EOF
5721 if { (eval echo configure:5722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5722   rm -rf conftest*
5723   ol_cv_pthread_thread=yes
5724 else
5725   echo "configure: failed program was:" >&5
5726   cat conftest.$ac_ext >&5
5727   rm -rf conftest*
5728   ol_cv_pthread_thread=no
5729 fi
5730 rm -f conftest*
5731
5732                 # restore the LIBS
5733                 LIBS="$ol_LIBS"
5734                 
5735 fi
5736
5737 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
5738
5739                 if test $ol_cv_pthread_thread = yes ; then
5740                         ol_link_pthreads="-thread"
5741                         ol_link_threads=posix
5742                 fi
5743         fi
5744
5745
5746                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
5747         if test "$ol_link_threads" = no ; then
5748                 # try -lpthread -lmach -lexc -lc_r
5749                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
5750 echo "configure:5751: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
5751 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
5752   echo $ac_n "(cached) $ac_c" 1>&6
5753 else
5754   
5755                         # save the flags
5756                         ol_LIBS="$LIBS"
5757                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
5758
5759                         cat > conftest.$ac_ext <<EOF
5760 #line 5761 "configure"
5761 #include "confdefs.h"
5762
5763 #include <pthread.h>
5764 #ifndef NULL
5765 #define NULL (void*)0
5766 #endif
5767
5768 int main() {
5769
5770         pthread_t t;
5771
5772 #if HAVE_PTHREADS_D4
5773         pthread_create(&t, pthread_attr_default, NULL, NULL);
5774         pthread_detach( &t );
5775 #else
5776         pthread_create(&t, NULL, NULL, NULL);
5777         pthread_detach( t );
5778 #endif
5779 #ifdef HAVE_LINUX_THREADS
5780         pthread_kill_other_threads_np();
5781 #endif
5782
5783 ; return 0; }
5784 EOF
5785 if { (eval echo configure:5786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5786   rm -rf conftest*
5787   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
5788 else
5789   echo "configure: failed program was:" >&5
5790   cat conftest.$ac_ext >&5
5791   rm -rf conftest*
5792   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
5793 fi
5794 rm -f conftest*
5795
5796                 # restore the LIBS
5797                 LIBS="$ol_LIBS"
5798                 
5799 fi
5800
5801 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
5802
5803                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
5804                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
5805                         ol_link_threads=posix
5806                 fi
5807         fi
5808
5809                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
5810         if test "$ol_link_threads" = no ; then
5811                 # try -lpthread -lmach -lexc
5812                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
5813 echo "configure:5814: checking for pthread link with -lpthread -lmach -lexc" >&5
5814 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
5815   echo $ac_n "(cached) $ac_c" 1>&6
5816 else
5817   
5818                         # save the flags
5819                         ol_LIBS="$LIBS"
5820                         LIBS="-lpthread -lmach -lexc $LIBS"
5821
5822                         cat > conftest.$ac_ext <<EOF
5823 #line 5824 "configure"
5824 #include "confdefs.h"
5825
5826 #include <pthread.h>
5827 #ifndef NULL
5828 #define NULL (void*)0
5829 #endif
5830
5831 int main() {
5832
5833         pthread_t t;
5834
5835 #if HAVE_PTHREADS_D4
5836         pthread_create(&t, pthread_attr_default, NULL, NULL);
5837         pthread_detach( &t );
5838 #else
5839         pthread_create(&t, NULL, NULL, NULL);
5840         pthread_detach( t );
5841 #endif
5842 #ifdef HAVE_LINUX_THREADS
5843         pthread_kill_other_threads_np();
5844 #endif
5845
5846 ; return 0; }
5847 EOF
5848 if { (eval echo configure:5849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5849   rm -rf conftest*
5850   ol_cv_pthread_lpthread_lmach_lexc=yes
5851 else
5852   echo "configure: failed program was:" >&5
5853   cat conftest.$ac_ext >&5
5854   rm -rf conftest*
5855   ol_cv_pthread_lpthread_lmach_lexc=no
5856 fi
5857 rm -f conftest*
5858
5859                 # restore the LIBS
5860                 LIBS="$ol_LIBS"
5861                 
5862 fi
5863
5864 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
5865
5866                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
5867                         ol_link_pthreads="-lpthread -lmach -lexc"
5868                         ol_link_threads=posix
5869                 fi
5870         fi
5871
5872
5873                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
5874         if test "$ol_link_threads" = no ; then
5875                 # try -lpthread -Wl,-woff,85
5876                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
5877 echo "configure:5878: checking for pthread link with -lpthread -Wl,-woff,85" >&5
5878 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
5879   echo $ac_n "(cached) $ac_c" 1>&6
5880 else
5881   
5882                         # save the flags
5883                         ol_LIBS="$LIBS"
5884                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
5885
5886                         cat > conftest.$ac_ext <<EOF
5887 #line 5888 "configure"
5888 #include "confdefs.h"
5889
5890 #include <pthread.h>
5891 #ifndef NULL
5892 #define NULL (void*)0
5893 #endif
5894
5895 int main() {
5896
5897         pthread_t t;
5898
5899 #if HAVE_PTHREADS_D4
5900         pthread_create(&t, pthread_attr_default, NULL, NULL);
5901         pthread_detach( &t );
5902 #else
5903         pthread_create(&t, NULL, NULL, NULL);
5904         pthread_detach( t );
5905 #endif
5906 #ifdef HAVE_LINUX_THREADS
5907         pthread_kill_other_threads_np();
5908 #endif
5909
5910 ; return 0; }
5911 EOF
5912 if { (eval echo configure:5913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5913   rm -rf conftest*
5914   ol_cv_pthread_lib_lpthread_woff=yes
5915 else
5916   echo "configure: failed program was:" >&5
5917   cat conftest.$ac_ext >&5
5918   rm -rf conftest*
5919   ol_cv_pthread_lib_lpthread_woff=no
5920 fi
5921 rm -f conftest*
5922
5923                 # restore the LIBS
5924                 LIBS="$ol_LIBS"
5925                 
5926 fi
5927
5928 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
5929
5930                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
5931                         ol_link_pthreads="-lpthread -Wl,-woff,85"
5932                         ol_link_threads=posix
5933                 fi
5934         fi
5935
5936
5937                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
5938         if test "$ol_link_threads" = no ; then
5939                 # try -lpthread
5940                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
5941 echo "configure:5942: checking for pthread link with -lpthread" >&5
5942 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
5943   echo $ac_n "(cached) $ac_c" 1>&6
5944 else
5945   
5946                         # save the flags
5947                         ol_LIBS="$LIBS"
5948                         LIBS="-lpthread $LIBS"
5949
5950                         cat > conftest.$ac_ext <<EOF
5951 #line 5952 "configure"
5952 #include "confdefs.h"
5953
5954 #include <pthread.h>
5955 #ifndef NULL
5956 #define NULL (void*)0
5957 #endif
5958
5959 int main() {
5960
5961         pthread_t t;
5962
5963 #if HAVE_PTHREADS_D4
5964         pthread_create(&t, pthread_attr_default, NULL, NULL);
5965         pthread_detach( &t );
5966 #else
5967         pthread_create(&t, NULL, NULL, NULL);
5968         pthread_detach( t );
5969 #endif
5970 #ifdef HAVE_LINUX_THREADS
5971         pthread_kill_other_threads_np();
5972 #endif
5973
5974 ; return 0; }
5975 EOF
5976 if { (eval echo configure:5977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5977   rm -rf conftest*
5978   ol_cv_pthread_lpthread=yes
5979 else
5980   echo "configure: failed program was:" >&5
5981   cat conftest.$ac_ext >&5
5982   rm -rf conftest*
5983   ol_cv_pthread_lpthread=no
5984 fi
5985 rm -f conftest*
5986
5987                 # restore the LIBS
5988                 LIBS="$ol_LIBS"
5989                 
5990 fi
5991
5992 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
5993
5994                 if test $ol_cv_pthread_lpthread = yes ; then
5995                         ol_link_pthreads="-lpthread"
5996                         ol_link_threads=posix
5997                 fi
5998         fi
5999
6000                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
6001         if test "$ol_link_threads" = no ; then
6002                 # try -lc_r
6003                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
6004 echo "configure:6005: checking for pthread link with -lc_r" >&5
6005 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
6006   echo $ac_n "(cached) $ac_c" 1>&6
6007 else
6008   
6009                         # save the flags
6010                         ol_LIBS="$LIBS"
6011                         LIBS="-lc_r $LIBS"
6012
6013                         cat > conftest.$ac_ext <<EOF
6014 #line 6015 "configure"
6015 #include "confdefs.h"
6016
6017 #include <pthread.h>
6018 #ifndef NULL
6019 #define NULL (void*)0
6020 #endif
6021
6022 int main() {
6023
6024         pthread_t t;
6025
6026 #if HAVE_PTHREADS_D4
6027         pthread_create(&t, pthread_attr_default, NULL, NULL);
6028         pthread_detach( &t );
6029 #else
6030         pthread_create(&t, NULL, NULL, NULL);
6031         pthread_detach( t );
6032 #endif
6033 #ifdef HAVE_LINUX_THREADS
6034         pthread_kill_other_threads_np();
6035 #endif
6036
6037 ; return 0; }
6038 EOF
6039 if { (eval echo configure:6040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6040   rm -rf conftest*
6041   ol_cv_pthread_lc_r=yes
6042 else
6043   echo "configure: failed program was:" >&5
6044   cat conftest.$ac_ext >&5
6045   rm -rf conftest*
6046   ol_cv_pthread_lc_r=no
6047 fi
6048 rm -f conftest*
6049
6050                 # restore the LIBS
6051                 LIBS="$ol_LIBS"
6052                 
6053 fi
6054
6055 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
6056
6057                 if test $ol_cv_pthread_lc_r = yes ; then
6058                         ol_link_pthreads="-lc_r"
6059                         ol_link_threads=posix
6060                 fi
6061         fi
6062
6063
6064                 # Pthread try link: -threads (ol_cv_pthread_threads)
6065         if test "$ol_link_threads" = no ; then
6066                 # try -threads
6067                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
6068 echo "configure:6069: checking for pthread link with -threads" >&5
6069 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
6070   echo $ac_n "(cached) $ac_c" 1>&6
6071 else
6072   
6073                         # save the flags
6074                         ol_LIBS="$LIBS"
6075                         LIBS="-threads $LIBS"
6076
6077                         cat > conftest.$ac_ext <<EOF
6078 #line 6079 "configure"
6079 #include "confdefs.h"
6080
6081 #include <pthread.h>
6082 #ifndef NULL
6083 #define NULL (void*)0
6084 #endif
6085
6086 int main() {
6087
6088         pthread_t t;
6089
6090 #if HAVE_PTHREADS_D4
6091         pthread_create(&t, pthread_attr_default, NULL, NULL);
6092         pthread_detach( &t );
6093 #else
6094         pthread_create(&t, NULL, NULL, NULL);
6095         pthread_detach( t );
6096 #endif
6097 #ifdef HAVE_LINUX_THREADS
6098         pthread_kill_other_threads_np();
6099 #endif
6100
6101 ; return 0; }
6102 EOF
6103 if { (eval echo configure:6104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6104   rm -rf conftest*
6105   ol_cv_pthread_threads=yes
6106 else
6107   echo "configure: failed program was:" >&5
6108   cat conftest.$ac_ext >&5
6109   rm -rf conftest*
6110   ol_cv_pthread_threads=no
6111 fi
6112 rm -f conftest*
6113
6114                 # restore the LIBS
6115                 LIBS="$ol_LIBS"
6116                 
6117 fi
6118
6119 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
6120
6121                 if test $ol_cv_pthread_threads = yes ; then
6122                         ol_link_pthreads="-threads"
6123                         ol_link_threads=posix
6124                 fi
6125         fi
6126
6127
6128                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
6129         if test "$ol_link_threads" = no ; then
6130                 # try -lpthreads -lmach -lexc -lc_r
6131                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
6132 echo "configure:6133: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
6133 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
6134   echo $ac_n "(cached) $ac_c" 1>&6
6135 else
6136   
6137                         # save the flags
6138                         ol_LIBS="$LIBS"
6139                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
6140
6141                         cat > conftest.$ac_ext <<EOF
6142 #line 6143 "configure"
6143 #include "confdefs.h"
6144
6145 #include <pthread.h>
6146 #ifndef NULL
6147 #define NULL (void*)0
6148 #endif
6149
6150 int main() {
6151
6152         pthread_t t;
6153
6154 #if HAVE_PTHREADS_D4
6155         pthread_create(&t, pthread_attr_default, NULL, NULL);
6156         pthread_detach( &t );
6157 #else
6158         pthread_create(&t, NULL, NULL, NULL);
6159         pthread_detach( t );
6160 #endif
6161 #ifdef HAVE_LINUX_THREADS
6162         pthread_kill_other_threads_np();
6163 #endif
6164
6165 ; return 0; }
6166 EOF
6167 if { (eval echo configure:6168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6168   rm -rf conftest*
6169   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
6170 else
6171   echo "configure: failed program was:" >&5
6172   cat conftest.$ac_ext >&5
6173   rm -rf conftest*
6174   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
6175 fi
6176 rm -f conftest*
6177
6178                 # restore the LIBS
6179                 LIBS="$ol_LIBS"
6180                 
6181 fi
6182
6183 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
6184
6185                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
6186                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
6187                         ol_link_threads=posix
6188                 fi
6189         fi
6190
6191                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
6192         if test "$ol_link_threads" = no ; then
6193                 # try -lpthreads -lmach -lexc
6194                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
6195 echo "configure:6196: checking for pthread link with -lpthreads -lmach -lexc" >&5
6196 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
6197   echo $ac_n "(cached) $ac_c" 1>&6
6198 else
6199   
6200                         # save the flags
6201                         ol_LIBS="$LIBS"
6202                         LIBS="-lpthreads -lmach -lexc $LIBS"
6203
6204                         cat > conftest.$ac_ext <<EOF
6205 #line 6206 "configure"
6206 #include "confdefs.h"
6207
6208 #include <pthread.h>
6209 #ifndef NULL
6210 #define NULL (void*)0
6211 #endif
6212
6213 int main() {
6214
6215         pthread_t t;
6216
6217 #if HAVE_PTHREADS_D4
6218         pthread_create(&t, pthread_attr_default, NULL, NULL);
6219         pthread_detach( &t );
6220 #else
6221         pthread_create(&t, NULL, NULL, NULL);
6222         pthread_detach( t );
6223 #endif
6224 #ifdef HAVE_LINUX_THREADS
6225         pthread_kill_other_threads_np();
6226 #endif
6227
6228 ; return 0; }
6229 EOF
6230 if { (eval echo configure:6231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6231   rm -rf conftest*
6232   ol_cv_pthread_lpthreads_lmach_lexc=yes
6233 else
6234   echo "configure: failed program was:" >&5
6235   cat conftest.$ac_ext >&5
6236   rm -rf conftest*
6237   ol_cv_pthread_lpthreads_lmach_lexc=no
6238 fi
6239 rm -f conftest*
6240
6241                 # restore the LIBS
6242                 LIBS="$ol_LIBS"
6243                 
6244 fi
6245
6246 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
6247
6248                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
6249                         ol_link_pthreads="-lpthreads -lmach -lexc"
6250                         ol_link_threads=posix
6251                 fi
6252         fi
6253
6254                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
6255         if test "$ol_link_threads" = no ; then
6256                 # try -lpthreads -lexc
6257                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
6258 echo "configure:6259: checking for pthread link with -lpthreads -lexc" >&5
6259 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
6260   echo $ac_n "(cached) $ac_c" 1>&6
6261 else
6262   
6263                         # save the flags
6264                         ol_LIBS="$LIBS"
6265                         LIBS="-lpthreads -lexc $LIBS"
6266
6267                         cat > conftest.$ac_ext <<EOF
6268 #line 6269 "configure"
6269 #include "confdefs.h"
6270
6271 #include <pthread.h>
6272 #ifndef NULL
6273 #define NULL (void*)0
6274 #endif
6275
6276 int main() {
6277
6278         pthread_t t;
6279
6280 #if HAVE_PTHREADS_D4
6281         pthread_create(&t, pthread_attr_default, NULL, NULL);
6282         pthread_detach( &t );
6283 #else
6284         pthread_create(&t, NULL, NULL, NULL);
6285         pthread_detach( t );
6286 #endif
6287 #ifdef HAVE_LINUX_THREADS
6288         pthread_kill_other_threads_np();
6289 #endif
6290
6291 ; return 0; }
6292 EOF
6293 if { (eval echo configure:6294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6294   rm -rf conftest*
6295   ol_cv_pthread_lpthreads_lexc=yes
6296 else
6297   echo "configure: failed program was:" >&5
6298   cat conftest.$ac_ext >&5
6299   rm -rf conftest*
6300   ol_cv_pthread_lpthreads_lexc=no
6301 fi
6302 rm -f conftest*
6303
6304                 # restore the LIBS
6305                 LIBS="$ol_LIBS"
6306                 
6307 fi
6308
6309 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
6310
6311                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
6312                         ol_link_pthreads="-lpthreads -lexc"
6313                         ol_link_threads=posix
6314                 fi
6315         fi
6316
6317
6318                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
6319         if test "$ol_link_threads" = no ; then
6320                 # try -lpthreads
6321                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
6322 echo "configure:6323: checking for pthread link with -lpthreads" >&5
6323 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
6324   echo $ac_n "(cached) $ac_c" 1>&6
6325 else
6326   
6327                         # save the flags
6328                         ol_LIBS="$LIBS"
6329                         LIBS="-lpthreads $LIBS"
6330
6331                         cat > conftest.$ac_ext <<EOF
6332 #line 6333 "configure"
6333 #include "confdefs.h"
6334
6335 #include <pthread.h>
6336 #ifndef NULL
6337 #define NULL (void*)0
6338 #endif
6339
6340 int main() {
6341
6342         pthread_t t;
6343
6344 #if HAVE_PTHREADS_D4
6345         pthread_create(&t, pthread_attr_default, NULL, NULL);
6346         pthread_detach( &t );
6347 #else
6348         pthread_create(&t, NULL, NULL, NULL);
6349         pthread_detach( t );
6350 #endif
6351 #ifdef HAVE_LINUX_THREADS
6352         pthread_kill_other_threads_np();
6353 #endif
6354
6355 ; return 0; }
6356 EOF
6357 if { (eval echo configure:6358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6358   rm -rf conftest*
6359   ol_cv_pthread_lib_lpthreads=yes
6360 else
6361   echo "configure: failed program was:" >&5
6362   cat conftest.$ac_ext >&5
6363   rm -rf conftest*
6364   ol_cv_pthread_lib_lpthreads=no
6365 fi
6366 rm -f conftest*
6367
6368                 # restore the LIBS
6369                 LIBS="$ol_LIBS"
6370                 
6371 fi
6372
6373 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
6374
6375                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
6376                         ol_link_pthreads="-lpthreads"
6377                         ol_link_threads=posix
6378                 fi
6379         fi
6380
6381
6382                 if test $ol_link_threads != no ; then
6383                         cat >> confdefs.h <<\EOF
6384 #define HAVE_PTHREADS 1
6385 EOF
6386
6387
6388                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
6389
6390                                                 save_CPPFLAGS="$CPPFLAGS"
6391                         save_LIBS="$LIBS"
6392                         LIBS="$LTHREAD_LIBS $LIBS"
6393
6394                                                                                                 for ac_func in sched_yield pthread_yield
6395 do
6396 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6397 echo "configure:6398: checking for $ac_func" >&5
6398 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6399   echo $ac_n "(cached) $ac_c" 1>&6
6400 else
6401   cat > conftest.$ac_ext <<EOF
6402 #line 6403 "configure"
6403 #include "confdefs.h"
6404 /* System header to define __stub macros and hopefully few prototypes,
6405     which can conflict with char $ac_func(); below.  */
6406 #include <assert.h>
6407 /* Override any gcc2 internal prototype to avoid an error.  */
6408 /* We use char because int might match the return type of a gcc2
6409     builtin and then its argument prototype would still apply.  */
6410 char $ac_func();
6411
6412 int main() {
6413
6414 /* The GNU C library defines this for functions which it implements
6415     to always fail with ENOSYS.  Some functions are actually named
6416     something starting with __ and the normal name is an alias.  */
6417 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6418 choke me
6419 #else
6420 $ac_func();
6421 #endif
6422
6423 ; return 0; }
6424 EOF
6425 if { (eval echo configure:6426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6426   rm -rf conftest*
6427   eval "ac_cv_func_$ac_func=yes"
6428 else
6429   echo "configure: failed program was:" >&5
6430   cat conftest.$ac_ext >&5
6431   rm -rf conftest*
6432   eval "ac_cv_func_$ac_func=no"
6433 fi
6434 rm -f conftest*
6435 fi
6436
6437 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6438   echo "$ac_t""yes" 1>&6
6439     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6440   cat >> confdefs.h <<EOF
6441 #define $ac_tr_func 1
6442 EOF
6443  
6444 else
6445   echo "$ac_t""no" 1>&6
6446 fi
6447 done
6448
6449
6450                         if test $ac_cv_func_sched_yield = no -a \
6451                                 $ac_cv_func_pthread_yield = no ; then
6452                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
6453 echo "configure:6454: checking for sched_yield in -lrt" >&5
6454 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
6455 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6456   echo $ac_n "(cached) $ac_c" 1>&6
6457 else
6458   ac_save_LIBS="$LIBS"
6459 LIBS="-lrt  $LIBS"
6460 cat > conftest.$ac_ext <<EOF
6461 #line 6462 "configure"
6462 #include "confdefs.h"
6463 /* Override any gcc2 internal prototype to avoid an error.  */
6464 /* We use char because int might match the return type of a gcc2
6465     builtin and then its argument prototype would still apply.  */
6466 char sched_yield();
6467
6468 int main() {
6469 sched_yield()
6470 ; return 0; }
6471 EOF
6472 if { (eval echo configure:6473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6473   rm -rf conftest*
6474   eval "ac_cv_lib_$ac_lib_var=yes"
6475 else
6476   echo "configure: failed program was:" >&5
6477   cat conftest.$ac_ext >&5
6478   rm -rf conftest*
6479   eval "ac_cv_lib_$ac_lib_var=no"
6480 fi
6481 rm -f conftest*
6482 LIBS="$ac_save_LIBS"
6483
6484 fi
6485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6486   echo "$ac_t""yes" 1>&6
6487   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
6488                                         cat >> confdefs.h <<\EOF
6489 #define HAVE_SCHED_YIELD 1
6490 EOF
6491
6492                                         ac_cv_func_sched_yield=yes
6493 else
6494   echo "$ac_t""no" 1>&6
6495 ac_cv_func_sched_yield=no
6496 fi
6497
6498                         fi
6499                         if test $ac_cv_func_sched_yield = no -a \
6500                                 $ac_cv_func_pthread_yield = no ; then
6501                                                                                                 for ac_func in thr_yield
6502 do
6503 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6504 echo "configure:6505: checking for $ac_func" >&5
6505 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6506   echo $ac_n "(cached) $ac_c" 1>&6
6507 else
6508   cat > conftest.$ac_ext <<EOF
6509 #line 6510 "configure"
6510 #include "confdefs.h"
6511 /* System header to define __stub macros and hopefully few prototypes,
6512     which can conflict with char $ac_func(); below.  */
6513 #include <assert.h>
6514 /* Override any gcc2 internal prototype to avoid an error.  */
6515 /* We use char because int might match the return type of a gcc2
6516     builtin and then its argument prototype would still apply.  */
6517 char $ac_func();
6518
6519 int main() {
6520
6521 /* The GNU C library defines this for functions which it implements
6522     to always fail with ENOSYS.  Some functions are actually named
6523     something starting with __ and the normal name is an alias.  */
6524 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6525 choke me
6526 #else
6527 $ac_func();
6528 #endif
6529
6530 ; return 0; }
6531 EOF
6532 if { (eval echo configure:6533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6533   rm -rf conftest*
6534   eval "ac_cv_func_$ac_func=yes"
6535 else
6536   echo "configure: failed program was:" >&5
6537   cat conftest.$ac_ext >&5
6538   rm -rf conftest*
6539   eval "ac_cv_func_$ac_func=no"
6540 fi
6541 rm -f conftest*
6542 fi
6543
6544 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6545   echo "$ac_t""yes" 1>&6
6546     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6547   cat >> confdefs.h <<EOF
6548 #define $ac_tr_func 1
6549 EOF
6550  
6551 else
6552   echo "$ac_t""no" 1>&6
6553 fi
6554 done
6555
6556                         fi
6557                         if test $ac_cv_func_sched_yield = no -a \
6558                                 $ac_cv_func_pthread_yield = no -a \
6559                                 "$ac_cv_func_thr_yield" = no ; then
6560                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
6561                         fi
6562
6563                                                 for ac_func in pthread_kill
6564 do
6565 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6566 echo "configure:6567: checking for $ac_func" >&5
6567 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6568   echo $ac_n "(cached) $ac_c" 1>&6
6569 else
6570   cat > conftest.$ac_ext <<EOF
6571 #line 6572 "configure"
6572 #include "confdefs.h"
6573 /* System header to define __stub macros and hopefully few prototypes,
6574     which can conflict with char $ac_func(); below.  */
6575 #include <assert.h>
6576 /* Override any gcc2 internal prototype to avoid an error.  */
6577 /* We use char because int might match the return type of a gcc2
6578     builtin and then its argument prototype would still apply.  */
6579 char $ac_func();
6580
6581 int main() {
6582
6583 /* The GNU C library defines this for functions which it implements
6584     to always fail with ENOSYS.  Some functions are actually named
6585     something starting with __ and the normal name is an alias.  */
6586 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6587 choke me
6588 #else
6589 $ac_func();
6590 #endif
6591
6592 ; return 0; }
6593 EOF
6594 if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6595   rm -rf conftest*
6596   eval "ac_cv_func_$ac_func=yes"
6597 else
6598   echo "configure: failed program was:" >&5
6599   cat conftest.$ac_ext >&5
6600   rm -rf conftest*
6601   eval "ac_cv_func_$ac_func=no"
6602 fi
6603 rm -f conftest*
6604 fi
6605
6606 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6607   echo "$ac_t""yes" 1>&6
6608     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6609   cat >> confdefs.h <<EOF
6610 #define $ac_tr_func 1
6611 EOF
6612  
6613 else
6614   echo "$ac_t""no" 1>&6
6615 fi
6616 done
6617
6618
6619                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
6620 echo "configure:6621: checking for pthread_detach with <pthread.h>" >&5
6621 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
6622   echo $ac_n "(cached) $ac_c" 1>&6
6623 else
6624   
6625                                                                 cat > conftest.$ac_ext <<EOF
6626 #line 6627 "configure"
6627 #include "confdefs.h"
6628
6629 #include <pthread.h>
6630 #ifndef NULL
6631 #define NULL (void*)0
6632 #endif
6633
6634 int main() {
6635 pthread_detach(NULL);
6636 ; return 0; }
6637 EOF
6638 if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6639   rm -rf conftest*
6640   ol_cv_func_pthread_detach=yes
6641 else
6642   echo "configure: failed program was:" >&5
6643   cat conftest.$ac_ext >&5
6644   rm -rf conftest*
6645   ol_cv_func_pthread_detach=no
6646 fi
6647 rm -f conftest*
6648                         
6649 fi
6650
6651 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
6652
6653                         if test $ol_cv_func_pthread_detach = no ; then
6654                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
6655                         fi
6656
6657                         cat >> confdefs.h <<\EOF
6658 #define HAVE_PTHREAD_DETACH 1
6659 EOF
6660
6661
6662                                                 for ac_func in \
6663                                 pthread_setconcurrency \
6664                                 pthread_getconcurrency \
6665                                 thr_setconcurrency \
6666                                 thr_getconcurrency \
6667                         
6668 do
6669 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6670 echo "configure:6671: checking for $ac_func" >&5
6671 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6672   echo $ac_n "(cached) $ac_c" 1>&6
6673 else
6674   cat > conftest.$ac_ext <<EOF
6675 #line 6676 "configure"
6676 #include "confdefs.h"
6677 /* System header to define __stub macros and hopefully few prototypes,
6678     which can conflict with char $ac_func(); below.  */
6679 #include <assert.h>
6680 /* Override any gcc2 internal prototype to avoid an error.  */
6681 /* We use char because int might match the return type of a gcc2
6682     builtin and then its argument prototype would still apply.  */
6683 char $ac_func();
6684
6685 int main() {
6686
6687 /* The GNU C library defines this for functions which it implements
6688     to always fail with ENOSYS.  Some functions are actually named
6689     something starting with __ and the normal name is an alias.  */
6690 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6691 choke me
6692 #else
6693 $ac_func();
6694 #endif
6695
6696 ; return 0; }
6697 EOF
6698 if { (eval echo configure:6699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6699   rm -rf conftest*
6700   eval "ac_cv_func_$ac_func=yes"
6701 else
6702   echo "configure: failed program was:" >&5
6703   cat conftest.$ac_ext >&5
6704   rm -rf conftest*
6705   eval "ac_cv_func_$ac_func=no"
6706 fi
6707 rm -f conftest*
6708 fi
6709
6710 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6711   echo "$ac_t""yes" 1>&6
6712     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6713   cat >> confdefs.h <<EOF
6714 #define $ac_tr_func 1
6715 EOF
6716  
6717 else
6718   echo "$ac_t""no" 1>&6
6719 fi
6720 done
6721
6722
6723                         
6724         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
6725 echo "configure:6726: checking for pthread_kill_other_threads_np" >&5
6726 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
6727   echo $ac_n "(cached) $ac_c" 1>&6
6728 else
6729   cat > conftest.$ac_ext <<EOF
6730 #line 6731 "configure"
6731 #include "confdefs.h"
6732 /* System header to define __stub macros and hopefully few prototypes,
6733     which can conflict with char pthread_kill_other_threads_np(); below.  */
6734 #include <assert.h>
6735 /* Override any gcc2 internal prototype to avoid an error.  */
6736 /* We use char because int might match the return type of a gcc2
6737     builtin and then its argument prototype would still apply.  */
6738 char pthread_kill_other_threads_np();
6739
6740 int main() {
6741
6742 /* The GNU C library defines this for functions which it implements
6743     to always fail with ENOSYS.  Some functions are actually named
6744     something starting with __ and the normal name is an alias.  */
6745 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
6746 choke me
6747 #else
6748 pthread_kill_other_threads_np();
6749 #endif
6750
6751 ; return 0; }
6752 EOF
6753 if { (eval echo configure:6754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6754   rm -rf conftest*
6755   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
6756 else
6757   echo "configure: failed program was:" >&5
6758   cat conftest.$ac_ext >&5
6759   rm -rf conftest*
6760   eval "ac_cv_func_pthread_kill_other_threads_np=no"
6761 fi
6762 rm -f conftest*
6763 fi
6764
6765 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
6766   echo "$ac_t""yes" 1>&6
6767   :
6768 else
6769   echo "$ac_t""no" 1>&6
6770 fi
6771
6772         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
6773 echo "configure:6774: checking for LinuxThreads implementation" >&5
6774 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
6775   echo $ac_n "(cached) $ac_c" 1>&6
6776 else
6777   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
6778 fi
6779
6780 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
6781
6782                         
6783         
6784         
6785         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
6786 echo "configure:6787: checking for LinuxThreads consistency" >&5
6787 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6788   echo $ac_n "(cached) $ac_c" 1>&6
6789 else
6790   
6791                 if test $ol_cv_header_linux_threads = yes -a \
6792                         $ol_cv_sys_linux_threads = yes; then
6793                         ol_cv_linux_threads=yes
6794                 elif test $ol_cv_header_linux_threads = no -a \
6795                         $ol_cv_sys_linux_threads = no; then
6796                         ol_cv_linux_threads=no
6797                 else
6798                         ol_cv_linux_threads=error
6799                 fi
6800         
6801 fi
6802
6803 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6804
6805
6806                         if test $ol_cv_linux_threads = error; then
6807                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
6808                         fi
6809
6810                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
6811 echo "configure:6812: checking if pthread_create() works" >&5
6812                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
6813   echo $ac_n "(cached) $ac_c" 1>&6
6814 else
6815   
6816                         if test "$cross_compiling" = yes; then
6817                                 ol_cv_pthread_create_works=yes
6818 else
6819   cat > conftest.$ac_ext <<EOF
6820 #line 6821 "configure"
6821 #include "confdefs.h"
6822
6823 #include <pthread.h>
6824 #ifndef NULL
6825 #define NULL (void*)0
6826 #endif
6827
6828 static void *task(p)
6829         void *p;
6830 {
6831         return (void *) (p == NULL);
6832 }
6833
6834 int main(argc, argv)
6835         int argc;
6836         char **argv;
6837 {
6838         pthread_t t;
6839 #if HAVE_PTHREADS_D4
6840         exit(pthread_create(&t, pthread_attr_default, task, NULL));
6841 #else
6842         exit(pthread_create(&t, NULL, task, NULL));
6843 #endif
6844 }
6845
6846 EOF
6847 if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6848 then
6849   ol_cv_pthread_create_works=yes
6850 else
6851   echo "configure: failed program was:" >&5
6852   cat conftest.$ac_ext >&5
6853   rm -fr conftest*
6854   ol_cv_pthread_create_works=no
6855 fi
6856 rm -fr conftest*
6857 fi
6858
6859 fi
6860
6861                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
6862
6863                         if test $ol_cv_pthread_create_works = no ; then
6864                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
6865                         fi
6866
6867                                                 if test $ol_with_yielding_select = auto ; then
6868                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
6869 echo "configure:6870: checking if select yields when using pthreads" >&5
6870                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
6871   echo $ac_n "(cached) $ac_c" 1>&6
6872 else
6873   
6874                                 if test "$cross_compiling" = yes; then
6875   
6876                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
6877 else
6878   cat > conftest.$ac_ext <<EOF
6879 #line 6880 "configure"
6880 #include "confdefs.h"
6881
6882 #include <sys/types.h>
6883 #include <sys/time.h>
6884 #include <unistd.h>
6885 #include <pthread.h>
6886 #ifndef NULL
6887 #define NULL (void*) 0
6888 #endif
6889
6890 static int fildes[2];
6891
6892 static void *task(p)
6893         void *p;
6894 {
6895         int i;
6896         struct timeval tv;
6897
6898         fd_set rfds;
6899
6900         tv.tv_sec=10;
6901         tv.tv_usec=0;
6902
6903         FD_ZERO(&rfds);
6904         FD_SET(fildes[0], &rfds);
6905
6906         /* we're not interested in any fds */
6907         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
6908
6909         if(i < 0) {
6910                 perror("select");
6911                 exit(10);
6912         }
6913
6914         exit(0); /* if we exit here, the select blocked the whole process */
6915 }
6916
6917 int main(argc, argv)
6918         int argc;
6919         char **argv;
6920 {
6921         pthread_t t;
6922
6923         /* create a pipe to select */
6924         if(pipe(&fildes[0])) {
6925                 perror("select");
6926                 exit(1);
6927         }
6928
6929 #ifdef HAVE_PTHREAD_SETCONCURRENCY
6930         (void) pthread_setconcurrency(2);
6931 #else
6932 #ifdef HAVE_THR_SETCONCURRENCY
6933         /* Set Solaris LWP concurrency to 2 */
6934         thr_setconcurrency(2);
6935 #endif
6936 #endif
6937
6938 #if HAVE_PTHREADS_D4
6939         pthread_create(&t, pthread_attr_default, task, NULL);
6940 #else
6941         pthread_create(&t, NULL, task, NULL);
6942 #endif
6943
6944 #if HAVE_SCHED_YIELD
6945         sched_yield();  /* make sure task runs first */
6946 #else
6947 #ifdef HAVE_PTHREAD_YIELD
6948         pthread_yield();        /* make sure task runs first */
6949 #endif
6950 #endif
6951
6952         exit(2);
6953 }
6954 EOF
6955 if { (eval echo configure:6956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6956 then
6957   ol_cv_pthread_select_yields=no
6958 else
6959   echo "configure: failed program was:" >&5
6960   cat conftest.$ac_ext >&5
6961   rm -fr conftest*
6962   ol_cv_pthread_select_yields=yes
6963 fi
6964 rm -fr conftest*
6965 fi
6966
6967 fi
6968
6969                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
6970
6971                                 if test $ol_cv_pthread_select_yields = yes ; then
6972                                         ol_with_yielding_select=yes
6973                                 fi
6974                         fi
6975
6976                                                 CPPFLAGS="$save_CPPFLAGS"
6977                         LIBS="$save_LIBS"
6978                 else
6979                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
6980                 fi
6981         fi
6982
6983         if test $ol_with_threads = posix ; then
6984                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
6985         fi
6986 fi
6987
6988 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6989         -o $ol_with_threads = mach ; then
6990
6991                 for ac_hdr in mach/cthreads.h
6992 do
6993 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6994 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6995 echo "configure:6996: checking for $ac_hdr" >&5
6996 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6997   echo $ac_n "(cached) $ac_c" 1>&6
6998 else
6999   cat > conftest.$ac_ext <<EOF
7000 #line 7001 "configure"
7001 #include "confdefs.h"
7002 #include <$ac_hdr>
7003 EOF
7004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7005 { (eval echo configure:7006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7007 if test -z "$ac_err"; then
7008   rm -rf conftest*
7009   eval "ac_cv_header_$ac_safe=yes"
7010 else
7011   echo "$ac_err" >&5
7012   echo "configure: failed program was:" >&5
7013   cat conftest.$ac_ext >&5
7014   rm -rf conftest*
7015   eval "ac_cv_header_$ac_safe=no"
7016 fi
7017 rm -f conftest*
7018 fi
7019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7020   echo "$ac_t""yes" 1>&6
7021     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7022   cat >> confdefs.h <<EOF
7023 #define $ac_tr_hdr 1
7024 EOF
7025  
7026 else
7027   echo "$ac_t""no" 1>&6
7028 fi
7029 done
7030
7031         if test $ac_cv_header_mach_cthreads_h = yes ; then
7032                 ol_with_threads=found
7033
7034                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
7035 echo "configure:7036: checking for cthread_fork" >&5
7036 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
7037   echo $ac_n "(cached) $ac_c" 1>&6
7038 else
7039   cat > conftest.$ac_ext <<EOF
7040 #line 7041 "configure"
7041 #include "confdefs.h"
7042 /* System header to define __stub macros and hopefully few prototypes,
7043     which can conflict with char cthread_fork(); below.  */
7044 #include <assert.h>
7045 /* Override any gcc2 internal prototype to avoid an error.  */
7046 /* We use char because int might match the return type of a gcc2
7047     builtin and then its argument prototype would still apply.  */
7048 char cthread_fork();
7049
7050 int main() {
7051
7052 /* The GNU C library defines this for functions which it implements
7053     to always fail with ENOSYS.  Some functions are actually named
7054     something starting with __ and the normal name is an alias.  */
7055 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
7056 choke me
7057 #else
7058 cthread_fork();
7059 #endif
7060
7061 ; return 0; }
7062 EOF
7063 if { (eval echo configure:7064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7064   rm -rf conftest*
7065   eval "ac_cv_func_cthread_fork=yes"
7066 else
7067   echo "configure: failed program was:" >&5
7068   cat conftest.$ac_ext >&5
7069   rm -rf conftest*
7070   eval "ac_cv_func_cthread_fork=no"
7071 fi
7072 rm -f conftest*
7073 fi
7074
7075 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
7076   echo "$ac_t""yes" 1>&6
7077   ol_link_threads=yes
7078 else
7079   echo "$ac_t""no" 1>&6
7080 fi
7081
7082
7083                 if test $ol_link_threads = no ; then
7084                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
7085 echo "configure:7086: checking for cthread_fork with -all_load" >&5
7086 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
7087   echo $ac_n "(cached) $ac_c" 1>&6
7088 else
7089   
7090                                                                 save_LIBS="$LIBS"
7091                                 LIBS="-all_load $LIBS"
7092                                 cat > conftest.$ac_ext <<EOF
7093 #line 7094 "configure"
7094 #include "confdefs.h"
7095 #include <mach/cthreads.h>
7096 int main() {
7097
7098                                         cthread_fork((void *)0, (void *)0);
7099                                         
7100 ; return 0; }
7101 EOF
7102 if { (eval echo configure:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7103   rm -rf conftest*
7104   ol_cv_cthread_all_load=yes
7105 else
7106   echo "configure: failed program was:" >&5
7107   cat conftest.$ac_ext >&5
7108   rm -rf conftest*
7109   ol_cv_cthread_all_load=no
7110 fi
7111 rm -f conftest*
7112                                                                 LIBS="$save_LIBS"
7113                         
7114 fi
7115
7116 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
7117
7118                         if test $ol_cv_cthread_all_load = yes ; then
7119                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
7120                                 ol_link_threads=mach
7121                         fi
7122                 fi
7123
7124                 if test $ol_link_threads != no ; then
7125                         : check for cthread specific functionality here
7126                         cat >> confdefs.h <<\EOF
7127 #define HAVE_MACH_CTHREADS 1
7128 EOF
7129
7130                 else
7131                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
7132                 fi
7133         fi
7134
7135         if test $ol_with_threads = mach ; then
7136                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
7137         fi
7138 fi
7139
7140 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7141         -o $ol_with_threads = lwp ; then
7142
7143                 for ac_hdr in thread.h synch.h
7144 do
7145 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7146 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7147 echo "configure:7148: checking for $ac_hdr" >&5
7148 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7149   echo $ac_n "(cached) $ac_c" 1>&6
7150 else
7151   cat > conftest.$ac_ext <<EOF
7152 #line 7153 "configure"
7153 #include "confdefs.h"
7154 #include <$ac_hdr>
7155 EOF
7156 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7157 { (eval echo configure:7158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7158 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7159 if test -z "$ac_err"; then
7160   rm -rf conftest*
7161   eval "ac_cv_header_$ac_safe=yes"
7162 else
7163   echo "$ac_err" >&5
7164   echo "configure: failed program was:" >&5
7165   cat conftest.$ac_ext >&5
7166   rm -rf conftest*
7167   eval "ac_cv_header_$ac_safe=no"
7168 fi
7169 rm -f conftest*
7170 fi
7171 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7172   echo "$ac_t""yes" 1>&6
7173     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7174   cat >> confdefs.h <<EOF
7175 #define $ac_tr_hdr 1
7176 EOF
7177  
7178 else
7179   echo "$ac_t""no" 1>&6
7180 fi
7181 done
7182
7183         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
7184                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
7185 echo "configure:7186: checking for thr_create in -lthread" >&5
7186 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
7187 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7188   echo $ac_n "(cached) $ac_c" 1>&6
7189 else
7190   ac_save_LIBS="$LIBS"
7191 LIBS="-lthread  $LIBS"
7192 cat > conftest.$ac_ext <<EOF
7193 #line 7194 "configure"
7194 #include "confdefs.h"
7195 /* Override any gcc2 internal prototype to avoid an error.  */
7196 /* We use char because int might match the return type of a gcc2
7197     builtin and then its argument prototype would still apply.  */
7198 char thr_create();
7199
7200 int main() {
7201 thr_create()
7202 ; return 0; }
7203 EOF
7204 if { (eval echo configure:7205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7205   rm -rf conftest*
7206   eval "ac_cv_lib_$ac_lib_var=yes"
7207 else
7208   echo "configure: failed program was:" >&5
7209   cat conftest.$ac_ext >&5
7210   rm -rf conftest*
7211   eval "ac_cv_lib_$ac_lib_var=no"
7212 fi
7213 rm -f conftest*
7214 LIBS="$ac_save_LIBS"
7215
7216 fi
7217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7218   echo "$ac_t""yes" 1>&6
7219   have_thr=yes
7220 else
7221   echo "$ac_t""no" 1>&6
7222 have_thr=no
7223 fi
7224
7225
7226                 if test $have_thr = yes ; then
7227                         cat >> confdefs.h <<\EOF
7228 #define HAVE_THR 1
7229 EOF
7230
7231                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
7232                         ol_link_threads=thr
7233
7234                         if test $ol_with_yielding_select = auto ; then
7235                                 ol_with_yielding_select=yes
7236                         fi
7237
7238                                                 for ac_func in \
7239                                 thr_setconcurrency \
7240                                 thr_getconcurrency \
7241                         
7242 do
7243 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7244 echo "configure:7245: checking for $ac_func" >&5
7245 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7246   echo $ac_n "(cached) $ac_c" 1>&6
7247 else
7248   cat > conftest.$ac_ext <<EOF
7249 #line 7250 "configure"
7250 #include "confdefs.h"
7251 /* System header to define __stub macros and hopefully few prototypes,
7252     which can conflict with char $ac_func(); below.  */
7253 #include <assert.h>
7254 /* Override any gcc2 internal prototype to avoid an error.  */
7255 /* We use char because int might match the return type of a gcc2
7256     builtin and then its argument prototype would still apply.  */
7257 char $ac_func();
7258
7259 int main() {
7260
7261 /* The GNU C library defines this for functions which it implements
7262     to always fail with ENOSYS.  Some functions are actually named
7263     something starting with __ and the normal name is an alias.  */
7264 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7265 choke me
7266 #else
7267 $ac_func();
7268 #endif
7269
7270 ; return 0; }
7271 EOF
7272 if { (eval echo configure:7273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7273   rm -rf conftest*
7274   eval "ac_cv_func_$ac_func=yes"
7275 else
7276   echo "configure: failed program was:" >&5
7277   cat conftest.$ac_ext >&5
7278   rm -rf conftest*
7279   eval "ac_cv_func_$ac_func=no"
7280 fi
7281 rm -f conftest*
7282 fi
7283
7284 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7285   echo "$ac_t""yes" 1>&6
7286     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7287   cat >> confdefs.h <<EOF
7288 #define $ac_tr_func 1
7289 EOF
7290  
7291 else
7292   echo "$ac_t""no" 1>&6
7293 fi
7294 done
7295
7296                 fi
7297         fi
7298
7299                 for ac_hdr in lwp/lwp.h
7300 do
7301 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7302 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7303 echo "configure:7304: checking for $ac_hdr" >&5
7304 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7305   echo $ac_n "(cached) $ac_c" 1>&6
7306 else
7307   cat > conftest.$ac_ext <<EOF
7308 #line 7309 "configure"
7309 #include "confdefs.h"
7310 #include <$ac_hdr>
7311 EOF
7312 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7313 { (eval echo configure:7314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7314 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7315 if test -z "$ac_err"; then
7316   rm -rf conftest*
7317   eval "ac_cv_header_$ac_safe=yes"
7318 else
7319   echo "$ac_err" >&5
7320   echo "configure: failed program was:" >&5
7321   cat conftest.$ac_ext >&5
7322   rm -rf conftest*
7323   eval "ac_cv_header_$ac_safe=no"
7324 fi
7325 rm -f conftest*
7326 fi
7327 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7328   echo "$ac_t""yes" 1>&6
7329     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7330   cat >> confdefs.h <<EOF
7331 #define $ac_tr_hdr 1
7332 EOF
7333  
7334 else
7335   echo "$ac_t""no" 1>&6
7336 fi
7337 done
7338
7339         if test $ac_cv_header_lwp_lwp_h = yes ; then
7340                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
7341 echo "configure:7342: checking for lwp_create in -llwp" >&5
7342 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
7343 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7344   echo $ac_n "(cached) $ac_c" 1>&6
7345 else
7346   ac_save_LIBS="$LIBS"
7347 LIBS="-llwp  $LIBS"
7348 cat > conftest.$ac_ext <<EOF
7349 #line 7350 "configure"
7350 #include "confdefs.h"
7351 /* Override any gcc2 internal prototype to avoid an error.  */
7352 /* We use char because int might match the return type of a gcc2
7353     builtin and then its argument prototype would still apply.  */
7354 char lwp_create();
7355
7356 int main() {
7357 lwp_create()
7358 ; return 0; }
7359 EOF
7360 if { (eval echo configure:7361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7361   rm -rf conftest*
7362   eval "ac_cv_lib_$ac_lib_var=yes"
7363 else
7364   echo "configure: failed program was:" >&5
7365   cat conftest.$ac_ext >&5
7366   rm -rf conftest*
7367   eval "ac_cv_lib_$ac_lib_var=no"
7368 fi
7369 rm -f conftest*
7370 LIBS="$ac_save_LIBS"
7371
7372 fi
7373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7374   echo "$ac_t""yes" 1>&6
7375   have_lwp=yes
7376 else
7377   echo "$ac_t""no" 1>&6
7378 have_lwp=no
7379 fi
7380
7381
7382                 if test $have_lwp = yes ; then
7383                         cat >> confdefs.h <<\EOF
7384 #define HAVE_LWP 1
7385 EOF
7386
7387                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
7388                         ol_link_threads=lwp
7389
7390                         if test $ol_with_yielding_select = auto ; then
7391                                 ol_with_yielding_select=no
7392                         fi
7393                 fi
7394         fi
7395 fi
7396
7397 if test $ol_with_yielding_select = yes ; then
7398         cat >> confdefs.h <<\EOF
7399 #define HAVE_YIELDING_SELECT 1
7400 EOF
7401
7402 fi
7403
7404 if test $ol_with_threads = manual ; then
7405                 ol_link_threads=yes
7406
7407         echo "configure: warning: thread defines and link options must be set manually" 1>&2
7408
7409         for ac_hdr in pthread.h sched.h
7410 do
7411 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7412 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7413 echo "configure:7414: checking for $ac_hdr" >&5
7414 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7415   echo $ac_n "(cached) $ac_c" 1>&6
7416 else
7417   cat > conftest.$ac_ext <<EOF
7418 #line 7419 "configure"
7419 #include "confdefs.h"
7420 #include <$ac_hdr>
7421 EOF
7422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7423 { (eval echo configure:7424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7425 if test -z "$ac_err"; then
7426   rm -rf conftest*
7427   eval "ac_cv_header_$ac_safe=yes"
7428 else
7429   echo "$ac_err" >&5
7430   echo "configure: failed program was:" >&5
7431   cat conftest.$ac_ext >&5
7432   rm -rf conftest*
7433   eval "ac_cv_header_$ac_safe=no"
7434 fi
7435 rm -f conftest*
7436 fi
7437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7438   echo "$ac_t""yes" 1>&6
7439     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7440   cat >> confdefs.h <<EOF
7441 #define $ac_tr_hdr 1
7442 EOF
7443  
7444 else
7445   echo "$ac_t""no" 1>&6
7446 fi
7447 done
7448
7449         for ac_func in sched_yield pthread_yield
7450 do
7451 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7452 echo "configure:7453: checking for $ac_func" >&5
7453 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7454   echo $ac_n "(cached) $ac_c" 1>&6
7455 else
7456   cat > conftest.$ac_ext <<EOF
7457 #line 7458 "configure"
7458 #include "confdefs.h"
7459 /* System header to define __stub macros and hopefully few prototypes,
7460     which can conflict with char $ac_func(); below.  */
7461 #include <assert.h>
7462 /* Override any gcc2 internal prototype to avoid an error.  */
7463 /* We use char because int might match the return type of a gcc2
7464     builtin and then its argument prototype would still apply.  */
7465 char $ac_func();
7466
7467 int main() {
7468
7469 /* The GNU C library defines this for functions which it implements
7470     to always fail with ENOSYS.  Some functions are actually named
7471     something starting with __ and the normal name is an alias.  */
7472 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7473 choke me
7474 #else
7475 $ac_func();
7476 #endif
7477
7478 ; return 0; }
7479 EOF
7480 if { (eval echo configure:7481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7481   rm -rf conftest*
7482   eval "ac_cv_func_$ac_func=yes"
7483 else
7484   echo "configure: failed program was:" >&5
7485   cat conftest.$ac_ext >&5
7486   rm -rf conftest*
7487   eval "ac_cv_func_$ac_func=no"
7488 fi
7489 rm -f conftest*
7490 fi
7491
7492 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7493   echo "$ac_t""yes" 1>&6
7494     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7495   cat >> confdefs.h <<EOF
7496 #define $ac_tr_func 1
7497 EOF
7498  
7499 else
7500   echo "$ac_t""no" 1>&6
7501 fi
7502 done
7503
7504         
7505         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7506 echo "configure:7507: checking for LinuxThreads pthread.h" >&5
7507 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
7508   echo $ac_n "(cached) $ac_c" 1>&6
7509 else
7510   cat > conftest.$ac_ext <<EOF
7511 #line 7512 "configure"
7512 #include "confdefs.h"
7513 #include <pthread.h>
7514 EOF
7515 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7516   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7517   rm -rf conftest*
7518   ol_cv_header_linux_threads=yes
7519 else
7520   rm -rf conftest*
7521   ol_cv_header_linux_threads=no
7522 fi
7523 rm -f conftest*
7524
7525                 
7526 fi
7527
7528 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7529         if test $ol_cv_header_linux_threads = yes; then
7530                 cat >> confdefs.h <<\EOF
7531 #define HAVE_LINUX_THREADS 1
7532 EOF
7533
7534         fi
7535
7536
7537         for ac_hdr in mach/cthreads.h
7538 do
7539 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7540 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7541 echo "configure:7542: checking for $ac_hdr" >&5
7542 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7543   echo $ac_n "(cached) $ac_c" 1>&6
7544 else
7545   cat > conftest.$ac_ext <<EOF
7546 #line 7547 "configure"
7547 #include "confdefs.h"
7548 #include <$ac_hdr>
7549 EOF
7550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7551 { (eval echo configure:7552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7553 if test -z "$ac_err"; then
7554   rm -rf conftest*
7555   eval "ac_cv_header_$ac_safe=yes"
7556 else
7557   echo "$ac_err" >&5
7558   echo "configure: failed program was:" >&5
7559   cat conftest.$ac_ext >&5
7560   rm -rf conftest*
7561   eval "ac_cv_header_$ac_safe=no"
7562 fi
7563 rm -f conftest*
7564 fi
7565 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7566   echo "$ac_t""yes" 1>&6
7567     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7568   cat >> confdefs.h <<EOF
7569 #define $ac_tr_hdr 1
7570 EOF
7571  
7572 else
7573   echo "$ac_t""no" 1>&6
7574 fi
7575 done
7576
7577         for ac_hdr in lwp/lwp.h
7578 do
7579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7581 echo "configure:7582: checking for $ac_hdr" >&5
7582 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7583   echo $ac_n "(cached) $ac_c" 1>&6
7584 else
7585   cat > conftest.$ac_ext <<EOF
7586 #line 7587 "configure"
7587 #include "confdefs.h"
7588 #include <$ac_hdr>
7589 EOF
7590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7591 { (eval echo configure:7592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7593 if test -z "$ac_err"; then
7594   rm -rf conftest*
7595   eval "ac_cv_header_$ac_safe=yes"
7596 else
7597   echo "$ac_err" >&5
7598   echo "configure: failed program was:" >&5
7599   cat conftest.$ac_ext >&5
7600   rm -rf conftest*
7601   eval "ac_cv_header_$ac_safe=no"
7602 fi
7603 rm -f conftest*
7604 fi
7605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7606   echo "$ac_t""yes" 1>&6
7607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7608   cat >> confdefs.h <<EOF
7609 #define $ac_tr_hdr 1
7610 EOF
7611  
7612 else
7613   echo "$ac_t""no" 1>&6
7614 fi
7615 done
7616
7617         for ac_hdr in thread.h synch.h
7618 do
7619 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7620 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7621 echo "configure:7622: checking for $ac_hdr" >&5
7622 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7623   echo $ac_n "(cached) $ac_c" 1>&6
7624 else
7625   cat > conftest.$ac_ext <<EOF
7626 #line 7627 "configure"
7627 #include "confdefs.h"
7628 #include <$ac_hdr>
7629 EOF
7630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7631 { (eval echo configure:7632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7633 if test -z "$ac_err"; then
7634   rm -rf conftest*
7635   eval "ac_cv_header_$ac_safe=yes"
7636 else
7637   echo "$ac_err" >&5
7638   echo "configure: failed program was:" >&5
7639   cat conftest.$ac_ext >&5
7640   rm -rf conftest*
7641   eval "ac_cv_header_$ac_safe=no"
7642 fi
7643 rm -f conftest*
7644 fi
7645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7646   echo "$ac_t""yes" 1>&6
7647     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7648   cat >> confdefs.h <<EOF
7649 #define $ac_tr_hdr 1
7650 EOF
7651  
7652 else
7653   echo "$ac_t""no" 1>&6
7654 fi
7655 done
7656
7657 fi
7658
7659 if test $ol_link_threads != no ; then  
7660                         cat >> confdefs.h <<\EOF
7661 #define REENTRANT 1
7662 EOF
7663
7664         cat >> confdefs.h <<\EOF
7665 #define _REENTRANT 1
7666 EOF
7667
7668         cat >> confdefs.h <<\EOF
7669 #define THREAD_SAFE 1
7670 EOF
7671
7672         cat >> confdefs.h <<\EOF
7673 #define _THREAD_SAFE 1
7674 EOF
7675
7676         cat >> confdefs.h <<\EOF
7677 #define THREADSAFE 1
7678 EOF
7679
7680         cat >> confdefs.h <<\EOF
7681 #define _THREADSAFE 1
7682 EOF
7683
7684         cat >> confdefs.h <<\EOF
7685 #define _SGI_MP_SOURCE 1
7686 EOF
7687
7688
7689                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
7690 echo "configure:7691: checking for thread specific errno" >&5
7691 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
7692   echo $ac_n "(cached) $ac_c" 1>&6
7693 else
7694   
7695                 cat > conftest.$ac_ext <<EOF
7696 #line 7697 "configure"
7697 #include "confdefs.h"
7698 #include <errno.h>
7699 int main() {
7700 errno = 0;
7701 ; return 0; }
7702 EOF
7703 if { (eval echo configure:7704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7704   rm -rf conftest*
7705   ol_cv_errno_thread_specific=yes
7706 else
7707   echo "configure: failed program was:" >&5
7708   cat conftest.$ac_ext >&5
7709   rm -rf conftest*
7710   ol_cv_errno_thread_specific=no
7711 fi
7712 rm -f conftest*
7713         
7714 fi
7715
7716 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
7717
7718                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
7719 echo "configure:7720: checking for thread specific h_errno" >&5
7720 if eval "test \"`echo '$''{'ol_cv_h_errno_thread_specific'+set}'`\" = set"; then
7721   echo $ac_n "(cached) $ac_c" 1>&6
7722 else
7723   
7724                 cat > conftest.$ac_ext <<EOF
7725 #line 7726 "configure"
7726 #include "confdefs.h"
7727 #include <netdb.h>
7728 int main() {
7729 h_errno = 0;
7730 ; return 0; }
7731 EOF
7732 if { (eval echo configure:7733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7733   rm -rf conftest*
7734   ol_cv_h_errno_thread_specific=yes
7735 else
7736   echo "configure: failed program was:" >&5
7737   cat conftest.$ac_ext >&5
7738   rm -rf conftest*
7739   ol_cv_h_errno_thread_specific=no
7740 fi
7741 rm -f conftest*
7742         
7743 fi
7744
7745 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
7746
7747         if test $ol_cv_errno_thread_specific != yes \
7748                 -o $ol_cv_h_errno_thread_specific != yes ; then
7749                 LIBS="$LTHREAD_LIBS $LIBS"
7750                 LTHREAD_LIBS=""
7751         fi
7752
7753 fi  
7754
7755 if test $ol_link_threads = no ; then
7756         if test $ol_with_threads = yes ; then
7757                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
7758         fi
7759
7760         if test $ol_with_threads = auto ; then
7761                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
7762                 ol_with_threads=no
7763         fi
7764
7765         cat >> confdefs.h <<\EOF
7766 #define NO_THREADS 1
7767 EOF
7768
7769         LTHREAD_LIBS=""
7770 fi
7771
7772 if test $ol_link_threads != no ; then
7773         cat >> confdefs.h <<\EOF
7774 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
7775 EOF
7776
7777 fi
7778
7779
7780 ol_link_ldbm=no 
7781 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
7782         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
7783 echo "configure:7784: checking for DB2 library" >&5
7784 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
7785   echo $ac_n "(cached) $ac_c" 1>&6
7786 else
7787         ol_LIBS="$LIBS"
7788         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
7789 echo "configure:7790: checking for db_open in -ldb" >&5
7790 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
7791 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7792   echo $ac_n "(cached) $ac_c" 1>&6
7793 else
7794   ac_save_LIBS="$LIBS"
7795 LIBS="-ldb  $LIBS"
7796 cat > conftest.$ac_ext <<EOF
7797 #line 7798 "configure"
7798 #include "confdefs.h"
7799 /* Override any gcc2 internal prototype to avoid an error.  */
7800 /* We use char because int might match the return type of a gcc2
7801     builtin and then its argument prototype would still apply.  */
7802 char db_open();
7803
7804 int main() {
7805 db_open()
7806 ; return 0; }
7807 EOF
7808 if { (eval echo configure:7809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7809   rm -rf conftest*
7810   eval "ac_cv_lib_$ac_lib_var=yes"
7811 else
7812   echo "configure: failed program was:" >&5
7813   cat conftest.$ac_ext >&5
7814   rm -rf conftest*
7815   eval "ac_cv_lib_$ac_lib_var=no"
7816 fi
7817 rm -f conftest*
7818 LIBS="$ac_save_LIBS"
7819
7820 fi
7821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7822   echo "$ac_t""yes" 1>&6
7823   ol_cv_lib_db2=-ldb
7824 else
7825   echo "$ac_t""no" 1>&6
7826 ol_cv_lib_db2=no
7827 fi
7828
7829         LIBS="$ol_LIBS"
7830
7831 fi
7832
7833 echo "$ac_t""$ol_cv_lib_db2" 1>&6
7834
7835 for ac_hdr in db.h
7836 do
7837 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7838 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7839 echo "configure:7840: checking for $ac_hdr" >&5
7840 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7841   echo $ac_n "(cached) $ac_c" 1>&6
7842 else
7843   cat > conftest.$ac_ext <<EOF
7844 #line 7845 "configure"
7845 #include "confdefs.h"
7846 #include <$ac_hdr>
7847 EOF
7848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7849 { (eval echo configure:7850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7851 if test -z "$ac_err"; then
7852   rm -rf conftest*
7853   eval "ac_cv_header_$ac_safe=yes"
7854 else
7855   echo "$ac_err" >&5
7856   echo "configure: failed program was:" >&5
7857   cat conftest.$ac_ext >&5
7858   rm -rf conftest*
7859   eval "ac_cv_header_$ac_safe=no"
7860 fi
7861 rm -f conftest*
7862 fi
7863 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7864   echo "$ac_t""yes" 1>&6
7865     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7866   cat >> confdefs.h <<EOF
7867 #define $ac_tr_hdr 1
7868 EOF
7869  
7870 else
7871   echo "$ac_t""no" 1>&6
7872 fi
7873 done
7874
7875 if test $ac_cv_header_db_h = yes ; then
7876         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
7877 echo "configure:7878: checking if db.h is DB2" >&5
7878 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
7879   echo $ac_n "(cached) $ac_c" 1>&6
7880 else
7881   
7882                 cat > conftest.$ac_ext <<EOF
7883 #line 7884 "configure"
7884 #include "confdefs.h"
7885
7886 #                       include <db.h>
7887                         /* this check could be improved */
7888 #                       ifdef DB_VERSION_MAJOR
7889 #                               if DB_VERSION_MAJOR == 2
7890                                         __db_version_2
7891 #                               endif
7892 #                       endif
7893                 
7894 EOF
7895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7896   egrep "__db_version_2" >/dev/null 2>&1; then
7897   rm -rf conftest*
7898   ol_cv_header_db2=yes
7899 else
7900   rm -rf conftest*
7901   ol_cv_header_db2=no
7902 fi
7903 rm -f conftest*
7904
7905 fi
7906
7907 echo "$ac_t""$ol_cv_header_db2" 1>&6
7908 else
7909         ol_cv_header_db2=no
7910 fi
7911
7912
7913  
7914  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
7915 echo "configure:7916: checking for Berkeley DB2" >&5
7916 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
7917   echo $ac_n "(cached) $ac_c" 1>&6
7918 else
7919   
7920         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
7921                 ol_cv_berkeley_db2=no
7922         else
7923                 ol_cv_berkeley_db2=yes
7924         fi
7925
7926 fi
7927
7928 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
7929  if test $ol_cv_berkeley_db2 = yes ; then
7930         cat >> confdefs.h <<\EOF
7931 #define HAVE_BERKELEY_DB2 1
7932 EOF
7933
7934  fi
7935
7936
7937         if test $ol_cv_berkeley_db2 = yes ; then
7938                 ol_link_ldbm=db2
7939                 ol_with_ldbm_api=db2
7940
7941                 if test $ol_with_ldbm_type = hash ; then
7942                         cat >> confdefs.h <<\EOF
7943 #define LDBM_USE_DBHASH 1
7944 EOF
7945
7946                 else
7947                         cat >> confdefs.h <<\EOF
7948 #define LDBM_USE_DBBTREE 1
7949 EOF
7950
7951                 fi
7952
7953                                                 if test $ol_cv_lib_db2 != yes ; then
7954                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
7955                 fi
7956         fi
7957 fi
7958
7959 ol_link_bdb2=no
7960 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
7961         ol_link_bdb2=yes
7962 fi
7963
7964 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
7965         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
7966 echo "configure:7967: checking for Berkeley DB library" >&5
7967 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
7968   echo $ac_n "(cached) $ac_c" 1>&6
7969 else
7970   
7971         for ac_hdr in db1/db.h
7972 do
7973 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7974 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7975 echo "configure:7976: checking for $ac_hdr" >&5
7976 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7977   echo $ac_n "(cached) $ac_c" 1>&6
7978 else
7979   cat > conftest.$ac_ext <<EOF
7980 #line 7981 "configure"
7981 #include "confdefs.h"
7982 #include <$ac_hdr>
7983 EOF
7984 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7985 { (eval echo configure:7986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7986 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7987 if test -z "$ac_err"; then
7988   rm -rf conftest*
7989   eval "ac_cv_header_$ac_safe=yes"
7990 else
7991   echo "$ac_err" >&5
7992   echo "configure: failed program was:" >&5
7993   cat conftest.$ac_ext >&5
7994   rm -rf conftest*
7995   eval "ac_cv_header_$ac_safe=no"
7996 fi
7997 rm -f conftest*
7998 fi
7999 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8000   echo "$ac_t""yes" 1>&6
8001     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8002   cat >> confdefs.h <<EOF
8003 #define $ac_tr_hdr 1
8004 EOF
8005  
8006 else
8007   echo "$ac_t""no" 1>&6
8008 fi
8009 done
8010
8011         ol_LIBS="$LIBS"
8012         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
8013 echo "configure:8014: checking for dbopen" >&5
8014 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
8015   echo $ac_n "(cached) $ac_c" 1>&6
8016 else
8017   cat > conftest.$ac_ext <<EOF
8018 #line 8019 "configure"
8019 #include "confdefs.h"
8020 /* System header to define __stub macros and hopefully few prototypes,
8021     which can conflict with char dbopen(); below.  */
8022 #include <assert.h>
8023 /* Override any gcc2 internal prototype to avoid an error.  */
8024 /* We use char because int might match the return type of a gcc2
8025     builtin and then its argument prototype would still apply.  */
8026 char dbopen();
8027
8028 int main() {
8029
8030 /* The GNU C library defines this for functions which it implements
8031     to always fail with ENOSYS.  Some functions are actually named
8032     something starting with __ and the normal name is an alias.  */
8033 #if defined (__stub_dbopen) || defined (__stub___dbopen)
8034 choke me
8035 #else
8036 dbopen();
8037 #endif
8038
8039 ; return 0; }
8040 EOF
8041 if { (eval echo configure:8042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8042   rm -rf conftest*
8043   eval "ac_cv_func_dbopen=yes"
8044 else
8045   echo "configure: failed program was:" >&5
8046   cat conftest.$ac_ext >&5
8047   rm -rf conftest*
8048   eval "ac_cv_func_dbopen=no"
8049 fi
8050 rm -f conftest*
8051 fi
8052
8053 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
8054   echo "$ac_t""yes" 1>&6
8055   ol_cv_lib_db=yes
8056 else
8057   echo "$ac_t""no" 1>&6
8058
8059                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
8060 echo "configure:8061: checking for dbopen in -ldb1" >&5
8061 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-%__p_%'`
8062 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8063   echo $ac_n "(cached) $ac_c" 1>&6
8064 else
8065   ac_save_LIBS="$LIBS"
8066 LIBS="-ldb1  $LIBS"
8067 cat > conftest.$ac_ext <<EOF
8068 #line 8069 "configure"
8069 #include "confdefs.h"
8070 /* Override any gcc2 internal prototype to avoid an error.  */
8071 /* We use char because int might match the return type of a gcc2
8072     builtin and then its argument prototype would still apply.  */
8073 char dbopen();
8074
8075 int main() {
8076 dbopen()
8077 ; return 0; }
8078 EOF
8079 if { (eval echo configure:8080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8080   rm -rf conftest*
8081   eval "ac_cv_lib_$ac_lib_var=yes"
8082 else
8083   echo "configure: failed program was:" >&5
8084   cat conftest.$ac_ext >&5
8085   rm -rf conftest*
8086   eval "ac_cv_lib_$ac_lib_var=no"
8087 fi
8088 rm -f conftest*
8089 LIBS="$ac_save_LIBS"
8090
8091 fi
8092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8093   echo "$ac_t""yes" 1>&6
8094   ol_cv_lib_db=-ldb1
8095 else
8096   echo "$ac_t""no" 1>&6
8097
8098                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
8099 echo "configure:8100: checking for dbopen in -ldb" >&5
8100 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
8101 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8102   echo $ac_n "(cached) $ac_c" 1>&6
8103 else
8104   ac_save_LIBS="$LIBS"
8105 LIBS="-ldb  $LIBS"
8106 cat > conftest.$ac_ext <<EOF
8107 #line 8108 "configure"
8108 #include "confdefs.h"
8109 /* Override any gcc2 internal prototype to avoid an error.  */
8110 /* We use char because int might match the return type of a gcc2
8111     builtin and then its argument prototype would still apply.  */
8112 char dbopen();
8113
8114 int main() {
8115 dbopen()
8116 ; return 0; }
8117 EOF
8118 if { (eval echo configure:8119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8119   rm -rf conftest*
8120   eval "ac_cv_lib_$ac_lib_var=yes"
8121 else
8122   echo "configure: failed program was:" >&5
8123   cat conftest.$ac_ext >&5
8124   rm -rf conftest*
8125   eval "ac_cv_lib_$ac_lib_var=no"
8126 fi
8127 rm -f conftest*
8128 LIBS="$ac_save_LIBS"
8129
8130 fi
8131 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8132   echo "$ac_t""yes" 1>&6
8133   ol_cv_lib_db=-ldb
8134 else
8135   echo "$ac_t""no" 1>&6
8136 ol_cv_lib_db=no
8137 fi
8138
8139                 
8140 fi
8141
8142         
8143 fi
8144
8145         LIBS="$ol_LIBS"
8146
8147 fi
8148
8149 echo "$ac_t""$ol_cv_lib_db" 1>&6
8150
8151
8152 for ac_hdr in db_185.h
8153 do
8154 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8155 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8156 echo "configure:8157: checking for $ac_hdr" >&5
8157 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8158   echo $ac_n "(cached) $ac_c" 1>&6
8159 else
8160   cat > conftest.$ac_ext <<EOF
8161 #line 8162 "configure"
8162 #include "confdefs.h"
8163 #include <$ac_hdr>
8164 EOF
8165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8166 { (eval echo configure:8167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8168 if test -z "$ac_err"; then
8169   rm -rf conftest*
8170   eval "ac_cv_header_$ac_safe=yes"
8171 else
8172   echo "$ac_err" >&5
8173   echo "configure: failed program was:" >&5
8174   cat conftest.$ac_ext >&5
8175   rm -rf conftest*
8176   eval "ac_cv_header_$ac_safe=no"
8177 fi
8178 rm -f conftest*
8179 fi
8180 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8181   echo "$ac_t""yes" 1>&6
8182     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8183   cat >> confdefs.h <<EOF
8184 #define $ac_tr_hdr 1
8185 EOF
8186  
8187 else
8188   echo "$ac_t""no" 1>&6
8189 fi
8190 done
8191
8192 if test "$ol_cv_header_db2" = yes ; then
8193         
8194         ol_cv_header_db=$ac_cv_header_db_185_h
8195 else
8196         ol_cv_header_db=$ac_cv_header_db_h
8197 fi
8198
8199
8200  
8201  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
8202 echo "configure:8203: checking for Berkeley DB" >&5
8203 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
8204   echo $ac_n "(cached) $ac_c" 1>&6
8205 else
8206   
8207         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
8208                 ol_cv_berkeley_db=no
8209         else
8210                 ol_cv_berkeley_db=yes
8211         fi
8212
8213 fi
8214
8215 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
8216  if test $ol_cv_berkeley_db = yes ; then
8217         cat >> confdefs.h <<\EOF
8218 #define HAVE_BERKELEY_DB 1
8219 EOF
8220
8221  fi
8222
8223
8224         if test $ol_cv_berkeley_db = yes ; then
8225                 ol_link_ldbm=db
8226                 ol_with_ldbm_api=db
8227
8228                 if test $ol_with_ldbm_type = hash ; then
8229                         cat >> confdefs.h <<\EOF
8230 #define LDBM_USE_DBHASH 1
8231 EOF
8232
8233                 else
8234                         cat >> confdefs.h <<\EOF
8235 #define LDBM_USE_DBBTREE 1
8236 EOF
8237
8238                 fi
8239
8240                                                 if test $ol_cv_lib_db != yes ; then
8241                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
8242                 fi
8243         fi
8244 fi
8245
8246 if test $ol_with_ldbm_api = manual ; then
8247                 ol_link_ldbm=yes
8248
8249         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
8250
8251         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
8252 do
8253 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8254 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8255 echo "configure:8256: checking for $ac_hdr" >&5
8256 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8257   echo $ac_n "(cached) $ac_c" 1>&6
8258 else
8259   cat > conftest.$ac_ext <<EOF
8260 #line 8261 "configure"
8261 #include "confdefs.h"
8262 #include <$ac_hdr>
8263 EOF
8264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8265 { (eval echo configure:8266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8267 if test -z "$ac_err"; then
8268   rm -rf conftest*
8269   eval "ac_cv_header_$ac_safe=yes"
8270 else
8271   echo "$ac_err" >&5
8272   echo "configure: failed program was:" >&5
8273   cat conftest.$ac_ext >&5
8274   rm -rf conftest*
8275   eval "ac_cv_header_$ac_safe=no"
8276 fi
8277 rm -f conftest*
8278 fi
8279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8280   echo "$ac_t""yes" 1>&6
8281     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8282   cat >> confdefs.h <<EOF
8283 #define $ac_tr_hdr 1
8284 EOF
8285  
8286 else
8287   echo "$ac_t""no" 1>&6
8288 fi
8289 done
8290
8291 fi
8292
8293 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
8294         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
8295         ol_with_ldbm_api=none
8296 fi
8297
8298 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
8299         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
8300 echo "configure:8301: checking for MDBM library" >&5
8301 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
8302   echo $ac_n "(cached) $ac_c" 1>&6
8303 else
8304         ol_LIBS="$LIBS"
8305         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
8306 echo "configure:8307: checking for mdbm_set_chain" >&5
8307 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
8308   echo $ac_n "(cached) $ac_c" 1>&6
8309 else
8310   cat > conftest.$ac_ext <<EOF
8311 #line 8312 "configure"
8312 #include "confdefs.h"
8313 /* System header to define __stub macros and hopefully few prototypes,
8314     which can conflict with char mdbm_set_chain(); below.  */
8315 #include <assert.h>
8316 /* Override any gcc2 internal prototype to avoid an error.  */
8317 /* We use char because int might match the return type of a gcc2
8318     builtin and then its argument prototype would still apply.  */
8319 char mdbm_set_chain();
8320
8321 int main() {
8322
8323 /* The GNU C library defines this for functions which it implements
8324     to always fail with ENOSYS.  Some functions are actually named
8325     something starting with __ and the normal name is an alias.  */
8326 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
8327 choke me
8328 #else
8329 mdbm_set_chain();
8330 #endif
8331
8332 ; return 0; }
8333 EOF
8334 if { (eval echo configure:8335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8335   rm -rf conftest*
8336   eval "ac_cv_func_mdbm_set_chain=yes"
8337 else
8338   echo "configure: failed program was:" >&5
8339   cat conftest.$ac_ext >&5
8340   rm -rf conftest*
8341   eval "ac_cv_func_mdbm_set_chain=no"
8342 fi
8343 rm -f conftest*
8344 fi
8345
8346 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
8347   echo "$ac_t""yes" 1>&6
8348   ol_cv_lib_mdbm=yes
8349 else
8350   echo "$ac_t""no" 1>&6
8351
8352                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
8353 echo "configure:8354: checking for mdbm_set_chain in -lmdbm" >&5
8354 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
8355 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8356   echo $ac_n "(cached) $ac_c" 1>&6
8357 else
8358   ac_save_LIBS="$LIBS"
8359 LIBS="-lmdbm  $LIBS"
8360 cat > conftest.$ac_ext <<EOF
8361 #line 8362 "configure"
8362 #include "confdefs.h"
8363 /* Override any gcc2 internal prototype to avoid an error.  */
8364 /* We use char because int might match the return type of a gcc2
8365     builtin and then its argument prototype would still apply.  */
8366 char mdbm_set_chain();
8367
8368 int main() {
8369 mdbm_set_chain()
8370 ; return 0; }
8371 EOF
8372 if { (eval echo configure:8373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8373   rm -rf conftest*
8374   eval "ac_cv_lib_$ac_lib_var=yes"
8375 else
8376   echo "configure: failed program was:" >&5
8377   cat conftest.$ac_ext >&5
8378   rm -rf conftest*
8379   eval "ac_cv_lib_$ac_lib_var=no"
8380 fi
8381 rm -f conftest*
8382 LIBS="$ac_save_LIBS"
8383
8384 fi
8385 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8386   echo "$ac_t""yes" 1>&6
8387   ol_cv_lib_mdbm=-lmdbm
8388 else
8389   echo "$ac_t""no" 1>&6
8390 ol_cv_lib_mdbm=no
8391 fi
8392
8393         
8394 fi
8395
8396         LIBS="$ol_LIBS"
8397
8398 fi
8399
8400 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
8401
8402
8403  for ac_hdr in mdbm.h
8404 do
8405 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8406 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8407 echo "configure:8408: checking for $ac_hdr" >&5
8408 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8409   echo $ac_n "(cached) $ac_c" 1>&6
8410 else
8411   cat > conftest.$ac_ext <<EOF
8412 #line 8413 "configure"
8413 #include "confdefs.h"
8414 #include <$ac_hdr>
8415 EOF
8416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8417 { (eval echo configure:8418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8419 if test -z "$ac_err"; then
8420   rm -rf conftest*
8421   eval "ac_cv_header_$ac_safe=yes"
8422 else
8423   echo "$ac_err" >&5
8424   echo "configure: failed program was:" >&5
8425   cat conftest.$ac_ext >&5
8426   rm -rf conftest*
8427   eval "ac_cv_header_$ac_safe=no"
8428 fi
8429 rm -f conftest*
8430 fi
8431 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8432   echo "$ac_t""yes" 1>&6
8433     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8434   cat >> confdefs.h <<EOF
8435 #define $ac_tr_hdr 1
8436 EOF
8437  
8438 else
8439   echo "$ac_t""no" 1>&6
8440 fi
8441 done
8442
8443  echo $ac_n "checking for db""... $ac_c" 1>&6
8444 echo "configure:8445: checking for db" >&5
8445 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
8446   echo $ac_n "(cached) $ac_c" 1>&6
8447 else
8448   
8449         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
8450                 ol_cv_mdbm=no
8451         else
8452                 ol_cv_mdbm=yes
8453         fi
8454
8455 fi
8456
8457 echo "$ac_t""$ol_cv_mdbm" 1>&6
8458  if test $ol_cv_mdbm = yes ; then
8459         cat >> confdefs.h <<\EOF
8460 #define HAVE_MDBM 1
8461 EOF
8462
8463  fi
8464
8465
8466         if test $ol_cv_mdbm = yes ; then
8467                 ol_link_ldbm=mdbm
8468                 ol_with_ldbm_api=mdbm
8469                 if test $ol_cv_lib_mdbm != yes ; then
8470                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
8471                 fi
8472         fi
8473 fi
8474
8475 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
8476         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
8477 echo "configure:8478: checking for GDBM library" >&5
8478 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
8479   echo $ac_n "(cached) $ac_c" 1>&6
8480 else
8481         ol_LIBS="$LIBS"
8482         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
8483 echo "configure:8484: checking for gdbm_open" >&5
8484 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
8485   echo $ac_n "(cached) $ac_c" 1>&6
8486 else
8487   cat > conftest.$ac_ext <<EOF
8488 #line 8489 "configure"
8489 #include "confdefs.h"
8490 /* System header to define __stub macros and hopefully few prototypes,
8491     which can conflict with char gdbm_open(); below.  */
8492 #include <assert.h>
8493 /* Override any gcc2 internal prototype to avoid an error.  */
8494 /* We use char because int might match the return type of a gcc2
8495     builtin and then its argument prototype would still apply.  */
8496 char gdbm_open();
8497
8498 int main() {
8499
8500 /* The GNU C library defines this for functions which it implements
8501     to always fail with ENOSYS.  Some functions are actually named
8502     something starting with __ and the normal name is an alias.  */
8503 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
8504 choke me
8505 #else
8506 gdbm_open();
8507 #endif
8508
8509 ; return 0; }
8510 EOF
8511 if { (eval echo configure:8512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8512   rm -rf conftest*
8513   eval "ac_cv_func_gdbm_open=yes"
8514 else
8515   echo "configure: failed program was:" >&5
8516   cat conftest.$ac_ext >&5
8517   rm -rf conftest*
8518   eval "ac_cv_func_gdbm_open=no"
8519 fi
8520 rm -f conftest*
8521 fi
8522
8523 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
8524   echo "$ac_t""yes" 1>&6
8525   ol_cv_lib_gdbm=yes
8526 else
8527   echo "$ac_t""no" 1>&6
8528
8529                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
8530 echo "configure:8531: checking for gdbm_open in -lgdbm" >&5
8531 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
8532 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8533   echo $ac_n "(cached) $ac_c" 1>&6
8534 else
8535   ac_save_LIBS="$LIBS"
8536 LIBS="-lgdbm  $LIBS"
8537 cat > conftest.$ac_ext <<EOF
8538 #line 8539 "configure"
8539 #include "confdefs.h"
8540 /* Override any gcc2 internal prototype to avoid an error.  */
8541 /* We use char because int might match the return type of a gcc2
8542     builtin and then its argument prototype would still apply.  */
8543 char gdbm_open();
8544
8545 int main() {
8546 gdbm_open()
8547 ; return 0; }
8548 EOF
8549 if { (eval echo configure:8550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8550   rm -rf conftest*
8551   eval "ac_cv_lib_$ac_lib_var=yes"
8552 else
8553   echo "configure: failed program was:" >&5
8554   cat conftest.$ac_ext >&5
8555   rm -rf conftest*
8556   eval "ac_cv_lib_$ac_lib_var=no"
8557 fi
8558 rm -f conftest*
8559 LIBS="$ac_save_LIBS"
8560
8561 fi
8562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8563   echo "$ac_t""yes" 1>&6
8564   ol_cv_lib_gdbm=-lgdbm
8565 else
8566   echo "$ac_t""no" 1>&6
8567 ol_cv_lib_gdbm=no
8568 fi
8569
8570         
8571 fi
8572
8573         LIBS="$ol_LIBS"
8574
8575 fi
8576
8577 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
8578
8579
8580  for ac_hdr in gdbm.h
8581 do
8582 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8583 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8584 echo "configure:8585: checking for $ac_hdr" >&5
8585 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8586   echo $ac_n "(cached) $ac_c" 1>&6
8587 else
8588   cat > conftest.$ac_ext <<EOF
8589 #line 8590 "configure"
8590 #include "confdefs.h"
8591 #include <$ac_hdr>
8592 EOF
8593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8594 { (eval echo configure:8595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8596 if test -z "$ac_err"; then
8597   rm -rf conftest*
8598   eval "ac_cv_header_$ac_safe=yes"
8599 else
8600   echo "$ac_err" >&5
8601   echo "configure: failed program was:" >&5
8602   cat conftest.$ac_ext >&5
8603   rm -rf conftest*
8604   eval "ac_cv_header_$ac_safe=no"
8605 fi
8606 rm -f conftest*
8607 fi
8608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8609   echo "$ac_t""yes" 1>&6
8610     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8611   cat >> confdefs.h <<EOF
8612 #define $ac_tr_hdr 1
8613 EOF
8614  
8615 else
8616   echo "$ac_t""no" 1>&6
8617 fi
8618 done
8619
8620  echo $ac_n "checking for db""... $ac_c" 1>&6
8621 echo "configure:8622: checking for db" >&5
8622 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
8623   echo $ac_n "(cached) $ac_c" 1>&6
8624 else
8625   
8626         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
8627                 ol_cv_gdbm=no
8628         else
8629                 ol_cv_gdbm=yes
8630         fi
8631
8632 fi
8633
8634 echo "$ac_t""$ol_cv_gdbm" 1>&6
8635  if test $ol_cv_gdbm = yes ; then
8636         cat >> confdefs.h <<\EOF
8637 #define HAVE_GDBM 1
8638 EOF
8639
8640  fi
8641
8642
8643         if test $ol_cv_gdbm = yes ; then
8644                 ol_link_ldbm=gdbm
8645                 ol_with_ldbm_api=gdbm
8646
8647                 if test $ol_cv_lib_gdbm != yes ; then
8648                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
8649                 fi
8650         fi
8651 fi
8652
8653 if test $ol_with_ldbm_api = auto ; then
8654         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
8655 elif test $ol_with_ldbm_api = ndbm ; then
8656         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
8657 echo "configure:8658: checking for NDBM library" >&5
8658 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
8659   echo $ac_n "(cached) $ac_c" 1>&6
8660 else
8661         ol_LIBS="$LIBS"
8662         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
8663 echo "configure:8664: checking for dbm_open" >&5
8664 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
8665   echo $ac_n "(cached) $ac_c" 1>&6
8666 else
8667   cat > conftest.$ac_ext <<EOF
8668 #line 8669 "configure"
8669 #include "confdefs.h"
8670 /* System header to define __stub macros and hopefully few prototypes,
8671     which can conflict with char dbm_open(); below.  */
8672 #include <assert.h>
8673 /* Override any gcc2 internal prototype to avoid an error.  */
8674 /* We use char because int might match the return type of a gcc2
8675     builtin and then its argument prototype would still apply.  */
8676 char dbm_open();
8677
8678 int main() {
8679
8680 /* The GNU C library defines this for functions which it implements
8681     to always fail with ENOSYS.  Some functions are actually named
8682     something starting with __ and the normal name is an alias.  */
8683 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
8684 choke me
8685 #else
8686 dbm_open();
8687 #endif
8688
8689 ; return 0; }
8690 EOF
8691 if { (eval echo configure:8692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8692   rm -rf conftest*
8693   eval "ac_cv_func_dbm_open=yes"
8694 else
8695   echo "configure: failed program was:" >&5
8696   cat conftest.$ac_ext >&5
8697   rm -rf conftest*
8698   eval "ac_cv_func_dbm_open=no"
8699 fi
8700 rm -f conftest*
8701 fi
8702
8703 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
8704   echo "$ac_t""yes" 1>&6
8705   ol_cv_lib_ndbm=yes
8706 else
8707   echo "$ac_t""no" 1>&6
8708
8709                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
8710 echo "configure:8711: checking for dbm_open in -lndbm" >&5
8711 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
8712 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8713   echo $ac_n "(cached) $ac_c" 1>&6
8714 else
8715   ac_save_LIBS="$LIBS"
8716 LIBS="-lndbm  $LIBS"
8717 cat > conftest.$ac_ext <<EOF
8718 #line 8719 "configure"
8719 #include "confdefs.h"
8720 /* Override any gcc2 internal prototype to avoid an error.  */
8721 /* We use char because int might match the return type of a gcc2
8722     builtin and then its argument prototype would still apply.  */
8723 char dbm_open();
8724
8725 int main() {
8726 dbm_open()
8727 ; return 0; }
8728 EOF
8729 if { (eval echo configure:8730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8730   rm -rf conftest*
8731   eval "ac_cv_lib_$ac_lib_var=yes"
8732 else
8733   echo "configure: failed program was:" >&5
8734   cat conftest.$ac_ext >&5
8735   rm -rf conftest*
8736   eval "ac_cv_lib_$ac_lib_var=no"
8737 fi
8738 rm -f conftest*
8739 LIBS="$ac_save_LIBS"
8740
8741 fi
8742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8743   echo "$ac_t""yes" 1>&6
8744   ol_cv_lib_ndbm=-lndbm
8745 else
8746   echo "$ac_t""no" 1>&6
8747
8748                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
8749 echo "configure:8750: checking for dbm_open in -ldbm" >&5
8750 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
8751 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8752   echo $ac_n "(cached) $ac_c" 1>&6
8753 else
8754   ac_save_LIBS="$LIBS"
8755 LIBS="-ldbm  $LIBS"
8756 cat > conftest.$ac_ext <<EOF
8757 #line 8758 "configure"
8758 #include "confdefs.h"
8759 /* Override any gcc2 internal prototype to avoid an error.  */
8760 /* We use char because int might match the return type of a gcc2
8761     builtin and then its argument prototype would still apply.  */
8762 char dbm_open();
8763
8764 int main() {
8765 dbm_open()
8766 ; return 0; }
8767 EOF
8768 if { (eval echo configure:8769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8769   rm -rf conftest*
8770   eval "ac_cv_lib_$ac_lib_var=yes"
8771 else
8772   echo "configure: failed program was:" >&5
8773   cat conftest.$ac_ext >&5
8774   rm -rf conftest*
8775   eval "ac_cv_lib_$ac_lib_var=no"
8776 fi
8777 rm -f conftest*
8778 LIBS="$ac_save_LIBS"
8779
8780 fi
8781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8782   echo "$ac_t""yes" 1>&6
8783   ol_cv_lib_ndbm=-ldbm
8784 else
8785   echo "$ac_t""no" 1>&6
8786 ol_cv_lib_ndbm=no
8787 fi
8788                 
8789 fi
8790
8791         
8792 fi
8793
8794         LIBS="$ol_LIBS"
8795
8796 fi
8797
8798 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
8799
8800
8801  for ac_hdr in ndbm.h
8802 do
8803 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8804 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8805 echo "configure:8806: checking for $ac_hdr" >&5
8806 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8807   echo $ac_n "(cached) $ac_c" 1>&6
8808 else
8809   cat > conftest.$ac_ext <<EOF
8810 #line 8811 "configure"
8811 #include "confdefs.h"
8812 #include <$ac_hdr>
8813 EOF
8814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8815 { (eval echo configure:8816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8817 if test -z "$ac_err"; then
8818   rm -rf conftest*
8819   eval "ac_cv_header_$ac_safe=yes"
8820 else
8821   echo "$ac_err" >&5
8822   echo "configure: failed program was:" >&5
8823   cat conftest.$ac_ext >&5
8824   rm -rf conftest*
8825   eval "ac_cv_header_$ac_safe=no"
8826 fi
8827 rm -f conftest*
8828 fi
8829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8830   echo "$ac_t""yes" 1>&6
8831     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8832   cat >> confdefs.h <<EOF
8833 #define $ac_tr_hdr 1
8834 EOF
8835  
8836 else
8837   echo "$ac_t""no" 1>&6
8838 fi
8839 done
8840
8841  echo $ac_n "checking for db""... $ac_c" 1>&6
8842 echo "configure:8843: checking for db" >&5
8843 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
8844   echo $ac_n "(cached) $ac_c" 1>&6
8845 else
8846   
8847         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
8848                 ol_cv_ndbm=no
8849         else
8850                 ol_cv_ndbm=yes
8851         fi
8852
8853 fi
8854
8855 echo "$ac_t""$ol_cv_ndbm" 1>&6
8856  if test $ol_cv_ndbm = yes ; then
8857         cat >> confdefs.h <<\EOF
8858 #define HAVE_NDBM 1
8859 EOF
8860
8861  fi
8862
8863
8864         if test $ol_cv_ndbm = yes ; then
8865                 ol_link_ldbm=ndbm
8866                 ol_with_ldbm_api=ndbm
8867
8868                 if test $ol_cv_lib_ndbm != yes ; then
8869                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
8870                 fi
8871         fi
8872 fi
8873
8874 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
8875         echo "configure: warning: could not find suitable LDBM backend" 1>&2
8876         if test $ol_enable_ldbm = yes ; then
8877                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
8878         fi
8879
8880         echo "configure: warning: disabling LDBM" 1>&2
8881         ol_enable_ldbm=no
8882 fi
8883
8884 if test $ol_enable_wrappers != no ; then
8885         for ac_hdr in tcpd.h
8886 do
8887 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8888 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8889 echo "configure:8890: checking for $ac_hdr" >&5
8890 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8891   echo $ac_n "(cached) $ac_c" 1>&6
8892 else
8893   cat > conftest.$ac_ext <<EOF
8894 #line 8895 "configure"
8895 #include "confdefs.h"
8896 #include <$ac_hdr>
8897 EOF
8898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8899 { (eval echo configure:8900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8901 if test -z "$ac_err"; then
8902   rm -rf conftest*
8903   eval "ac_cv_header_$ac_safe=yes"
8904 else
8905   echo "$ac_err" >&5
8906   echo "configure: failed program was:" >&5
8907   cat conftest.$ac_ext >&5
8908   rm -rf conftest*
8909   eval "ac_cv_header_$ac_safe=no"
8910 fi
8911 rm -f conftest*
8912 fi
8913 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8914   echo "$ac_t""yes" 1>&6
8915     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8916   cat >> confdefs.h <<EOF
8917 #define $ac_tr_hdr 1
8918 EOF
8919  
8920 else
8921   echo "$ac_t""no" 1>&6
8922 fi
8923 done
8924
8925
8926         if test $ac_cv_header_tcpd_h != yes ; then
8927                 have_wrappers=no
8928         else
8929                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
8930 echo "configure:8931: checking for main in -lwrap" >&5
8931 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
8932 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8933   echo $ac_n "(cached) $ac_c" 1>&6
8934 else
8935   ac_save_LIBS="$LIBS"
8936 LIBS="-lwrap  $LIBS"
8937 cat > conftest.$ac_ext <<EOF
8938 #line 8939 "configure"
8939 #include "confdefs.h"
8940
8941 int main() {
8942 main()
8943 ; return 0; }
8944 EOF
8945 if { (eval echo configure:8946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8946   rm -rf conftest*
8947   eval "ac_cv_lib_$ac_lib_var=yes"
8948 else
8949   echo "configure: failed program was:" >&5
8950   cat conftest.$ac_ext >&5
8951   rm -rf conftest*
8952   eval "ac_cv_lib_$ac_lib_var=no"
8953 fi
8954 rm -f conftest*
8955 LIBS="$ac_save_LIBS"
8956
8957 fi
8958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8959   echo "$ac_t""yes" 1>&6
8960   have_wrappers=yes
8961 else
8962   echo "$ac_t""no" 1>&6
8963 have_wrappers=no
8964 fi
8965
8966         fi
8967
8968         if test $have_wrappers = yes ; then
8969                 cat >> confdefs.h <<\EOF
8970 #define HAVE_TCPD 1
8971 EOF
8972
8973                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
8974
8975                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
8976 echo "configure:8977: checking for main in -lnsl" >&5
8977 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
8978 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8979   echo $ac_n "(cached) $ac_c" 1>&6
8980 else
8981   ac_save_LIBS="$LIBS"
8982 LIBS="-lnsl  $LIBS"
8983 cat > conftest.$ac_ext <<EOF
8984 #line 8985 "configure"
8985 #include "confdefs.h"
8986
8987 int main() {
8988 main()
8989 ; return 0; }
8990 EOF
8991 if { (eval echo configure:8992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8992   rm -rf conftest*
8993   eval "ac_cv_lib_$ac_lib_var=yes"
8994 else
8995   echo "configure: failed program was:" >&5
8996   cat conftest.$ac_ext >&5
8997   rm -rf conftest*
8998   eval "ac_cv_lib_$ac_lib_var=no"
8999 fi
9000 rm -f conftest*
9001 LIBS="$ac_save_LIBS"
9002
9003 fi
9004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9005   echo "$ac_t""yes" 1>&6
9006     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9007     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9008   cat >> confdefs.h <<EOF
9009 #define $ac_tr_lib 1
9010 EOF
9011
9012   LIBS="-lnsl $LIBS"
9013
9014 else
9015   echo "$ac_t""no" 1>&6
9016 fi
9017
9018         else
9019                 echo "configure: warning: could not find -lwrap" 1>&2
9020                 if test $ol_enable_wrappers = yes ; then
9021                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
9022                 fi
9023
9024                 echo "configure: warning: disabling wrappers support" 1>&2
9025                 ol_enable_wrappers=no
9026         fi
9027 fi
9028
9029 if test $ol_enable_syslog != no ; then
9030         echo $ac_n "checking for openlog""... $ac_c" 1>&6
9031 echo "configure:9032: checking for openlog" >&5
9032 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
9033   echo $ac_n "(cached) $ac_c" 1>&6
9034 else
9035   cat > conftest.$ac_ext <<EOF
9036 #line 9037 "configure"
9037 #include "confdefs.h"
9038 /* System header to define __stub macros and hopefully few prototypes,
9039     which can conflict with char openlog(); below.  */
9040 #include <assert.h>
9041 /* Override any gcc2 internal prototype to avoid an error.  */
9042 /* We use char because int might match the return type of a gcc2
9043     builtin and then its argument prototype would still apply.  */
9044 char openlog();
9045
9046 int main() {
9047
9048 /* The GNU C library defines this for functions which it implements
9049     to always fail with ENOSYS.  Some functions are actually named
9050     something starting with __ and the normal name is an alias.  */
9051 #if defined (__stub_openlog) || defined (__stub___openlog)
9052 choke me
9053 #else
9054 openlog();
9055 #endif
9056
9057 ; return 0; }
9058 EOF
9059 if { (eval echo configure:9060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9060   rm -rf conftest*
9061   eval "ac_cv_func_openlog=yes"
9062 else
9063   echo "configure: failed program was:" >&5
9064   cat conftest.$ac_ext >&5
9065   rm -rf conftest*
9066   eval "ac_cv_func_openlog=no"
9067 fi
9068 rm -f conftest*
9069 fi
9070
9071 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
9072   echo "$ac_t""yes" 1>&6
9073   :
9074 else
9075   echo "$ac_t""no" 1>&6
9076 fi
9077
9078         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
9079                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
9080         fi
9081         ol_enable_syslog=$ac_cv_func_openlog
9082 fi
9083
9084 if test $ol_enable_dmalloc != no ; then
9085         for ac_hdr in dmalloc.h
9086 do
9087 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9088 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9089 echo "configure:9090: checking for $ac_hdr" >&5
9090 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9091   echo $ac_n "(cached) $ac_c" 1>&6
9092 else
9093   cat > conftest.$ac_ext <<EOF
9094 #line 9095 "configure"
9095 #include "confdefs.h"
9096 #include <$ac_hdr>
9097 EOF
9098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9099 { (eval echo configure:9100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9101 if test -z "$ac_err"; then
9102   rm -rf conftest*
9103   eval "ac_cv_header_$ac_safe=yes"
9104 else
9105   echo "$ac_err" >&5
9106   echo "configure: failed program was:" >&5
9107   cat conftest.$ac_ext >&5
9108   rm -rf conftest*
9109   eval "ac_cv_header_$ac_safe=no"
9110 fi
9111 rm -f conftest*
9112 fi
9113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9114   echo "$ac_t""yes" 1>&6
9115     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9116   cat >> confdefs.h <<EOF
9117 #define $ac_tr_hdr 1
9118 EOF
9119  
9120 else
9121   echo "$ac_t""no" 1>&6
9122 fi
9123 done
9124
9125         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
9126 echo "configure:9127: checking for dmalloc_shutdown in -ldmalloc" >&5
9127 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
9128 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9129   echo $ac_n "(cached) $ac_c" 1>&6
9130 else
9131   ac_save_LIBS="$LIBS"
9132 LIBS="-ldmalloc  $LIBS"
9133 cat > conftest.$ac_ext <<EOF
9134 #line 9135 "configure"
9135 #include "confdefs.h"
9136 /* Override any gcc2 internal prototype to avoid an error.  */
9137 /* We use char because int might match the return type of a gcc2
9138     builtin and then its argument prototype would still apply.  */
9139 char dmalloc_shutdown();
9140
9141 int main() {
9142 dmalloc_shutdown()
9143 ; return 0; }
9144 EOF
9145 if { (eval echo configure:9146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9146   rm -rf conftest*
9147   eval "ac_cv_lib_$ac_lib_var=yes"
9148 else
9149   echo "configure: failed program was:" >&5
9150   cat conftest.$ac_ext >&5
9151   rm -rf conftest*
9152   eval "ac_cv_lib_$ac_lib_var=no"
9153 fi
9154 rm -f conftest*
9155 LIBS="$ac_save_LIBS"
9156
9157 fi
9158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9159   echo "$ac_t""yes" 1>&6
9160     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9161     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9162   cat >> confdefs.h <<EOF
9163 #define $ac_tr_lib 1
9164 EOF
9165
9166   LIBS="-ldmalloc $LIBS"
9167
9168 else
9169   echo "$ac_t""no" 1>&6
9170 fi
9171
9172 fi
9173
9174 if test $ol_enable_tcl != no ; then
9175         for ac_hdr in tcl.h
9176 do
9177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9179 echo "configure:9180: checking for $ac_hdr" >&5
9180 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9181   echo $ac_n "(cached) $ac_c" 1>&6
9182 else
9183   cat > conftest.$ac_ext <<EOF
9184 #line 9185 "configure"
9185 #include "confdefs.h"
9186 #include <$ac_hdr>
9187 EOF
9188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9189 { (eval echo configure:9190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9191 if test -z "$ac_err"; then
9192   rm -rf conftest*
9193   eval "ac_cv_header_$ac_safe=yes"
9194 else
9195   echo "$ac_err" >&5
9196   echo "configure: failed program was:" >&5
9197   cat conftest.$ac_ext >&5
9198   rm -rf conftest*
9199   eval "ac_cv_header_$ac_safe=no"
9200 fi
9201 rm -f conftest*
9202 fi
9203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9204   echo "$ac_t""yes" 1>&6
9205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9206   cat >> confdefs.h <<EOF
9207 #define $ac_tr_hdr 1
9208 EOF
9209  
9210 else
9211   echo "$ac_t""no" 1>&6
9212 fi
9213 done
9214
9215
9216         if test $ac_cv_header_tcl_h != yes ; then
9217                 have_tcl=no
9218         else
9219                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
9220 echo "configure:9221: checking for main in -ltcl" >&5
9221 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
9222 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9223   echo $ac_n "(cached) $ac_c" 1>&6
9224 else
9225   ac_save_LIBS="$LIBS"
9226 LIBS="-ltcl  $LIBS"
9227 cat > conftest.$ac_ext <<EOF
9228 #line 9229 "configure"
9229 #include "confdefs.h"
9230
9231 int main() {
9232 main()
9233 ; return 0; }
9234 EOF
9235 if { (eval echo configure:9236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9236   rm -rf conftest*
9237   eval "ac_cv_lib_$ac_lib_var=yes"
9238 else
9239   echo "configure: failed program was:" >&5
9240   cat conftest.$ac_ext >&5
9241   rm -rf conftest*
9242   eval "ac_cv_lib_$ac_lib_var=no"
9243 fi
9244 rm -f conftest*
9245 LIBS="$ac_save_LIBS"
9246
9247 fi
9248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9249   echo "$ac_t""yes" 1>&6
9250   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
9251 else
9252   echo "$ac_t""no" 1>&6
9253 have_tcl=no
9254 fi
9255
9256
9257                 if test $have_tcl != yes; then
9258                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
9259 echo "configure:9260: checking for main in -ltcl7.6" >&5
9260 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
9261 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9262   echo $ac_n "(cached) $ac_c" 1>&6
9263 else
9264   ac_save_LIBS="$LIBS"
9265 LIBS="-ltcl7.6  $LIBS"
9266 cat > conftest.$ac_ext <<EOF
9267 #line 9268 "configure"
9268 #include "confdefs.h"
9269
9270 int main() {
9271 main()
9272 ; return 0; }
9273 EOF
9274 if { (eval echo configure:9275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9275   rm -rf conftest*
9276   eval "ac_cv_lib_$ac_lib_var=yes"
9277 else
9278   echo "configure: failed program was:" >&5
9279   cat conftest.$ac_ext >&5
9280   rm -rf conftest*
9281   eval "ac_cv_lib_$ac_lib_var=no"
9282 fi
9283 rm -f conftest*
9284 LIBS="$ac_save_LIBS"
9285
9286 fi
9287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9288   echo "$ac_t""yes" 1>&6
9289   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
9290 else
9291   echo "$ac_t""no" 1>&6
9292 have_tcl=no
9293 fi
9294
9295                 fi
9296
9297                 if test $have_tcl != yes; then
9298                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
9299 echo "configure:9300: checking for main in -ltcl8.0" >&5
9300 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
9301 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9302   echo $ac_n "(cached) $ac_c" 1>&6
9303 else
9304   ac_save_LIBS="$LIBS"
9305 LIBS="-ltcl8.0  $LIBS"
9306 cat > conftest.$ac_ext <<EOF
9307 #line 9308 "configure"
9308 #include "confdefs.h"
9309
9310 int main() {
9311 main()
9312 ; return 0; }
9313 EOF
9314 if { (eval echo configure:9315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9315   rm -rf conftest*
9316   eval "ac_cv_lib_$ac_lib_var=yes"
9317 else
9318   echo "configure: failed program was:" >&5
9319   cat conftest.$ac_ext >&5
9320   rm -rf conftest*
9321   eval "ac_cv_lib_$ac_lib_var=no"
9322 fi
9323 rm -f conftest*
9324 LIBS="$ac_save_LIBS"
9325
9326 fi
9327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9328   echo "$ac_t""yes" 1>&6
9329   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
9330 else
9331   echo "$ac_t""no" 1>&6
9332 have_tcl=no
9333 fi
9334
9335                 fi
9336         fi
9337
9338         if test $have_tcl != yes ; then
9339                 echo "configure: warning: could not find -ltcl" 1>&2
9340                 if test $ol_enable_tcl = yes ; then
9341                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
9342                 fi
9343
9344                 ol_enable_tcl=no
9345         fi
9346 fi
9347
9348 # ud needs termcap (should insert check here)
9349 ol_link_termcap=no
9350 for ac_hdr in termcap.h ncurses.h
9351 do
9352 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9354 echo "configure:9355: checking for $ac_hdr" >&5
9355 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9356   echo $ac_n "(cached) $ac_c" 1>&6
9357 else
9358   cat > conftest.$ac_ext <<EOF
9359 #line 9360 "configure"
9360 #include "confdefs.h"
9361 #include <$ac_hdr>
9362 EOF
9363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9364 { (eval echo configure:9365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9366 if test -z "$ac_err"; then
9367   rm -rf conftest*
9368   eval "ac_cv_header_$ac_safe=yes"
9369 else
9370   echo "$ac_err" >&5
9371   echo "configure: failed program was:" >&5
9372   cat conftest.$ac_ext >&5
9373   rm -rf conftest*
9374   eval "ac_cv_header_$ac_safe=no"
9375 fi
9376 rm -f conftest*
9377 fi
9378 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9379   echo "$ac_t""yes" 1>&6
9380     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9381   cat >> confdefs.h <<EOF
9382 #define $ac_tr_hdr 1
9383 EOF
9384  
9385 else
9386   echo "$ac_t""no" 1>&6
9387 fi
9388 done
9389
9390
9391 if test $ol_link_termcap = no ; then
9392         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
9393 echo "configure:9394: checking for tputs in -ltermcap" >&5
9394 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
9395 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9396   echo $ac_n "(cached) $ac_c" 1>&6
9397 else
9398   ac_save_LIBS="$LIBS"
9399 LIBS="-ltermcap  $LIBS"
9400 cat > conftest.$ac_ext <<EOF
9401 #line 9402 "configure"
9402 #include "confdefs.h"
9403 /* Override any gcc2 internal prototype to avoid an error.  */
9404 /* We use char because int might match the return type of a gcc2
9405     builtin and then its argument prototype would still apply.  */
9406 char tputs();
9407
9408 int main() {
9409 tputs()
9410 ; return 0; }
9411 EOF
9412 if { (eval echo configure:9413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9413   rm -rf conftest*
9414   eval "ac_cv_lib_$ac_lib_var=yes"
9415 else
9416   echo "configure: failed program was:" >&5
9417   cat conftest.$ac_ext >&5
9418   rm -rf conftest*
9419   eval "ac_cv_lib_$ac_lib_var=no"
9420 fi
9421 rm -f conftest*
9422 LIBS="$ac_save_LIBS"
9423
9424 fi
9425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9426   echo "$ac_t""yes" 1>&6
9427   have_termcap=yes
9428 else
9429   echo "$ac_t""no" 1>&6
9430 have_termcap=no
9431 fi
9432
9433         if test $have_termcap = yes ; then
9434                 cat >> confdefs.h <<\EOF
9435 #define HAVE_TERMCAP 1
9436 EOF
9437
9438                 ol_link_termcap=yes
9439                 TERMCAP_LIBS=-ltermcap
9440         fi
9441 fi
9442
9443 if test $ol_link_termcap = no ; then
9444         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
9445 echo "configure:9446: checking for initscr in -lncurses" >&5
9446 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
9447 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9448   echo $ac_n "(cached) $ac_c" 1>&6
9449 else
9450   ac_save_LIBS="$LIBS"
9451 LIBS="-lncurses  $LIBS"
9452 cat > conftest.$ac_ext <<EOF
9453 #line 9454 "configure"
9454 #include "confdefs.h"
9455 /* Override any gcc2 internal prototype to avoid an error.  */
9456 /* We use char because int might match the return type of a gcc2
9457     builtin and then its argument prototype would still apply.  */
9458 char initscr();
9459
9460 int main() {
9461 initscr()
9462 ; return 0; }
9463 EOF
9464 if { (eval echo configure:9465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9465   rm -rf conftest*
9466   eval "ac_cv_lib_$ac_lib_var=yes"
9467 else
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -rf conftest*
9471   eval "ac_cv_lib_$ac_lib_var=no"
9472 fi
9473 rm -f conftest*
9474 LIBS="$ac_save_LIBS"
9475
9476 fi
9477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9478   echo "$ac_t""yes" 1>&6
9479   have_ncurses=yes
9480 else
9481   echo "$ac_t""no" 1>&6
9482 have_ncurses=no
9483 fi
9484
9485         if test $have_ncurses = yes ; then
9486                 cat >> confdefs.h <<\EOF
9487 #define HAVE_NCURSES 1
9488 EOF
9489
9490                 ol_link_termcap=yes
9491                 TERMCAP_LIBS=-lncurses
9492         fi
9493 fi
9494
9495 if test $ol_link_termcap = no ; then
9496         cat >> confdefs.h <<\EOF
9497 #define NO_TERMCAP 1
9498 EOF
9499
9500         TERMCAP_LIBS=
9501 fi
9502
9503 ol_link_readline=no
9504 if test $ol_with_readline != no ; then
9505         for ac_hdr in readline/readline.h readline/history.h
9506 do
9507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9508 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9509 echo "configure:9510: checking for $ac_hdr" >&5
9510 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9511   echo $ac_n "(cached) $ac_c" 1>&6
9512 else
9513   cat > conftest.$ac_ext <<EOF
9514 #line 9515 "configure"
9515 #include "confdefs.h"
9516 #include <$ac_hdr>
9517 EOF
9518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9519 { (eval echo configure:9520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9521 if test -z "$ac_err"; then
9522   rm -rf conftest*
9523   eval "ac_cv_header_$ac_safe=yes"
9524 else
9525   echo "$ac_err" >&5
9526   echo "configure: failed program was:" >&5
9527   cat conftest.$ac_ext >&5
9528   rm -rf conftest*
9529   eval "ac_cv_header_$ac_safe=no"
9530 fi
9531 rm -f conftest*
9532 fi
9533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9534   echo "$ac_t""yes" 1>&6
9535     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9536   cat >> confdefs.h <<EOF
9537 #define $ac_tr_hdr 1
9538 EOF
9539  
9540 else
9541   echo "$ac_t""no" 1>&6
9542 fi
9543 done
9544
9545
9546         if test $ac_cv_header_readline_readline_h = yes ; then
9547                 save_LIBS="$LIBS"
9548                 LIBS="$TERMCAP_LIBS $LIBS"
9549                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
9550 echo "configure:9551: checking for readline in -lreadline" >&5
9551 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
9552 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9553   echo $ac_n "(cached) $ac_c" 1>&6
9554 else
9555   ac_save_LIBS="$LIBS"
9556 LIBS="-lreadline  $LIBS"
9557 cat > conftest.$ac_ext <<EOF
9558 #line 9559 "configure"
9559 #include "confdefs.h"
9560 /* Override any gcc2 internal prototype to avoid an error.  */
9561 /* We use char because int might match the return type of a gcc2
9562     builtin and then its argument prototype would still apply.  */
9563 char readline();
9564
9565 int main() {
9566 readline()
9567 ; return 0; }
9568 EOF
9569 if { (eval echo configure:9570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9570   rm -rf conftest*
9571   eval "ac_cv_lib_$ac_lib_var=yes"
9572 else
9573   echo "configure: failed program was:" >&5
9574   cat conftest.$ac_ext >&5
9575   rm -rf conftest*
9576   eval "ac_cv_lib_$ac_lib_var=no"
9577 fi
9578 rm -f conftest*
9579 LIBS="$ac_save_LIBS"
9580
9581 fi
9582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9583   echo "$ac_t""yes" 1>&6
9584   have_readline=yes
9585 else
9586   echo "$ac_t""no" 1>&6
9587 have_readline=no
9588 fi
9589
9590                 LIBS="$save_LIBS"
9591                         
9592                 if test $have_readline = yes ; then
9593                         ol_with_readline=found
9594                         ol_link_readline=yes
9595
9596                         READLINE_LIBS="-lreadline"
9597                 fi
9598         fi
9599 fi
9600
9601 if test $ol_link_readline = yes ; then
9602         cat >> confdefs.h <<\EOF
9603 #define HAVE_READLINE 1
9604 EOF
9605
9606 fi
9607
9608
9609 # FreeBSD (and others) have crypt(3) in -lcrypt
9610 if test $ol_enable_crypt != no ; then
9611         echo $ac_n "checking for crypt""... $ac_c" 1>&6
9612 echo "configure:9613: checking for crypt" >&5
9613 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
9614   echo $ac_n "(cached) $ac_c" 1>&6
9615 else
9616   cat > conftest.$ac_ext <<EOF
9617 #line 9618 "configure"
9618 #include "confdefs.h"
9619 /* System header to define __stub macros and hopefully few prototypes,
9620     which can conflict with char crypt(); below.  */
9621 #include <assert.h>
9622 /* Override any gcc2 internal prototype to avoid an error.  */
9623 /* We use char because int might match the return type of a gcc2
9624     builtin and then its argument prototype would still apply.  */
9625 char crypt();
9626
9627 int main() {
9628
9629 /* The GNU C library defines this for functions which it implements
9630     to always fail with ENOSYS.  Some functions are actually named
9631     something starting with __ and the normal name is an alias.  */
9632 #if defined (__stub_crypt) || defined (__stub___crypt)
9633 choke me
9634 #else
9635 crypt();
9636 #endif
9637
9638 ; return 0; }
9639 EOF
9640 if { (eval echo configure:9641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9641   rm -rf conftest*
9642   eval "ac_cv_func_crypt=yes"
9643 else
9644   echo "configure: failed program was:" >&5
9645   cat conftest.$ac_ext >&5
9646   rm -rf conftest*
9647   eval "ac_cv_func_crypt=no"
9648 fi
9649 rm -f conftest*
9650 fi
9651
9652 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
9653   echo "$ac_t""yes" 1>&6
9654   have_crypt=yes
9655 else
9656   echo "$ac_t""no" 1>&6
9657
9658                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9659 echo "configure:9660: checking for crypt in -lcrypt" >&5
9660 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9661 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9662   echo $ac_n "(cached) $ac_c" 1>&6
9663 else
9664   ac_save_LIBS="$LIBS"
9665 LIBS="-lcrypt  $LIBS"
9666 cat > conftest.$ac_ext <<EOF
9667 #line 9668 "configure"
9668 #include "confdefs.h"
9669 /* Override any gcc2 internal prototype to avoid an error.  */
9670 /* We use char because int might match the return type of a gcc2
9671     builtin and then its argument prototype would still apply.  */
9672 char crypt();
9673
9674 int main() {
9675 crypt()
9676 ; return 0; }
9677 EOF
9678 if { (eval echo configure:9679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9679   rm -rf conftest*
9680   eval "ac_cv_lib_$ac_lib_var=yes"
9681 else
9682   echo "configure: failed program was:" >&5
9683   cat conftest.$ac_ext >&5
9684   rm -rf conftest*
9685   eval "ac_cv_lib_$ac_lib_var=no"
9686 fi
9687 rm -f conftest*
9688 LIBS="$ac_save_LIBS"
9689
9690 fi
9691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9692   echo "$ac_t""yes" 1>&6
9693   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
9694                         have_crypt=yes
9695 else
9696   echo "$ac_t""no" 1>&6
9697 have_crypt=no
9698 fi
9699
9700 fi
9701
9702
9703         if test $have_crypt = yes ; then
9704                 cat >> confdefs.h <<\EOF
9705 #define HAVE_CRYPT 1
9706 EOF
9707
9708         else
9709                 echo "configure: warning: could not find crypt" 1>&2
9710                 if test $ol_enable_crypt = yes ; then
9711                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
9712                 fi
9713
9714                 echo "configure: warning: disabling crypt support" 1>&2
9715                 ol_enable_crypt=no
9716         fi
9717 fi
9718
9719 # FreeBSD (and others) have setproctitle(3) in -lutil
9720 if test $ol_enable_proctitle != no ; then
9721         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
9722 echo "configure:9723: checking for setproctitle" >&5
9723 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
9724   echo $ac_n "(cached) $ac_c" 1>&6
9725 else
9726   cat > conftest.$ac_ext <<EOF
9727 #line 9728 "configure"
9728 #include "confdefs.h"
9729 /* System header to define __stub macros and hopefully few prototypes,
9730     which can conflict with char setproctitle(); below.  */
9731 #include <assert.h>
9732 /* Override any gcc2 internal prototype to avoid an error.  */
9733 /* We use char because int might match the return type of a gcc2
9734     builtin and then its argument prototype would still apply.  */
9735 char setproctitle();
9736
9737 int main() {
9738
9739 /* The GNU C library defines this for functions which it implements
9740     to always fail with ENOSYS.  Some functions are actually named
9741     something starting with __ and the normal name is an alias.  */
9742 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
9743 choke me
9744 #else
9745 setproctitle();
9746 #endif
9747
9748 ; return 0; }
9749 EOF
9750 if { (eval echo configure:9751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9751   rm -rf conftest*
9752   eval "ac_cv_func_setproctitle=yes"
9753 else
9754   echo "configure: failed program was:" >&5
9755   cat conftest.$ac_ext >&5
9756   rm -rf conftest*
9757   eval "ac_cv_func_setproctitle=no"
9758 fi
9759 rm -f conftest*
9760 fi
9761
9762 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
9763   echo "$ac_t""yes" 1>&6
9764   have_setproctitle=yes
9765 else
9766   echo "$ac_t""no" 1>&6
9767
9768                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
9769 echo "configure:9770: checking for setproctitle in -lutil" >&5
9770 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
9771 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9772   echo $ac_n "(cached) $ac_c" 1>&6
9773 else
9774   ac_save_LIBS="$LIBS"
9775 LIBS="-lutil  $LIBS"
9776 cat > conftest.$ac_ext <<EOF
9777 #line 9778 "configure"
9778 #include "confdefs.h"
9779 /* Override any gcc2 internal prototype to avoid an error.  */
9780 /* We use char because int might match the return type of a gcc2
9781     builtin and then its argument prototype would still apply.  */
9782 char setproctitle();
9783
9784 int main() {
9785 setproctitle()
9786 ; return 0; }
9787 EOF
9788 if { (eval echo configure:9789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9789   rm -rf conftest*
9790   eval "ac_cv_lib_$ac_lib_var=yes"
9791 else
9792   echo "configure: failed program was:" >&5
9793   cat conftest.$ac_ext >&5
9794   rm -rf conftest*
9795   eval "ac_cv_lib_$ac_lib_var=no"
9796 fi
9797 rm -f conftest*
9798 LIBS="$ac_save_LIBS"
9799
9800 fi
9801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9802   echo "$ac_t""yes" 1>&6
9803   have_setproctitle=yes
9804                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
9805 else
9806   echo "$ac_t""no" 1>&6
9807 have_setproctitle=no
9808                         LIBOBJS="$LIBOBJS setproctitle.o"
9809 fi
9810
9811 fi
9812
9813
9814         if test $have_setproctitle = yes ; then
9815                 cat >> confdefs.h <<\EOF
9816 #define HAVE_SETPROCTITLE 1
9817 EOF
9818
9819         fi
9820 fi
9821
9822 # test for EBCDIC
9823 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
9824 echo "configure:9825: checking for EBCDIC" >&5
9825 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
9826   echo $ac_n "(cached) $ac_c" 1>&6
9827 else
9828   
9829         cat > conftest.$ac_ext <<EOF
9830 #line 9831 "configure"
9831 #include "confdefs.h"
9832
9833 #if !('M' == 0xd4)
9834 #include <__ASCII__/generate_error.h>
9835 #endif
9836
9837 EOF
9838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9839 { (eval echo configure:9840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9841 if test -z "$ac_err"; then
9842   rm -rf conftest*
9843   ol_cv_cpp_ebcdic=yes
9844 else
9845   echo "$ac_err" >&5
9846   echo "configure: failed program was:" >&5
9847   cat conftest.$ac_ext >&5
9848   rm -rf conftest*
9849   ol_cv_cpp_ebcdic=no
9850 fi
9851 rm -f conftest*
9852 fi
9853
9854 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
9855 if test $ol_cv_cpp_ebcdic = yes ; then
9856         cat >> confdefs.h <<\EOF
9857 #define HAVE_EBCDIC 1
9858 EOF
9859
9860 fi
9861
9862 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9863 echo "configure:9864: checking for ANSI C header files" >&5
9864 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
9865   echo $ac_n "(cached) $ac_c" 1>&6
9866 else
9867   cat > conftest.$ac_ext <<EOF
9868 #line 9869 "configure"
9869 #include "confdefs.h"
9870 #include <stdlib.h>
9871 #include <stdarg.h>
9872 #include <string.h>
9873 #include <float.h>
9874 EOF
9875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9876 { (eval echo configure:9877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9878 if test -z "$ac_err"; then
9879   rm -rf conftest*
9880   ol_cv_header_stdc=yes
9881 else
9882   echo "$ac_err" >&5
9883   echo "configure: failed program was:" >&5
9884   cat conftest.$ac_ext >&5
9885   rm -rf conftest*
9886   ol_cv_header_stdc=no
9887 fi
9888 rm -f conftest*
9889
9890 if test $ol_cv_header_stdc = yes; then
9891   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9892 cat > conftest.$ac_ext <<EOF
9893 #line 9894 "configure"
9894 #include "confdefs.h"
9895 #include <string.h>
9896 EOF
9897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9898   egrep "memchr" >/dev/null 2>&1; then
9899   :
9900 else
9901   rm -rf conftest*
9902   ol_cv_header_stdc=no
9903 fi
9904 rm -f conftest*
9905
9906 fi
9907
9908 if test $ol_cv_header_stdc = yes; then
9909   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9910 cat > conftest.$ac_ext <<EOF
9911 #line 9912 "configure"
9912 #include "confdefs.h"
9913 #include <stdlib.h>
9914 EOF
9915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9916   egrep "free" >/dev/null 2>&1; then
9917   :
9918 else
9919   rm -rf conftest*
9920   ol_cv_header_stdc=no
9921 fi
9922 rm -f conftest*
9923
9924 fi
9925
9926 if test $ol_cv_header_stdc = yes; then
9927   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9928 if test "$cross_compiling" = yes; then
9929   :
9930 else
9931   cat > conftest.$ac_ext <<EOF
9932 #line 9933 "configure"
9933 #include "confdefs.h"
9934 #include <ctype.h>
9935 #ifndef HAVE_EBCDIC
9936 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9937 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9938 #else
9939 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9940                 || ('j' <= (c) && (c) <= 'r') \
9941                 || ('s' <= (c) && (c) <= 'z'))
9942 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
9943 #endif
9944 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9945 int main () { int i; for (i = 0; i < 256; i++)
9946 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9947 exit (0); }
9948
9949 EOF
9950 if { (eval echo configure:9951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9951 then
9952   :
9953 else
9954   echo "configure: failed program was:" >&5
9955   cat conftest.$ac_ext >&5
9956   rm -fr conftest*
9957   ol_cv_header_stdc=no
9958 fi
9959 rm -fr conftest*
9960 fi
9961
9962 fi
9963 fi
9964
9965 echo "$ac_t""$ol_cv_header_stdc" 1>&6
9966 if test $ol_cv_header_stdc = yes; then
9967   cat >> confdefs.h <<\EOF
9968 #define STDC_HEADERS 1
9969 EOF
9970
9971 fi
9972 ac_cv_header_stdc=disable
9973
9974
9975 if test $ol_cv_header_stdc != yes; then
9976         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
9977 fi
9978
9979 ac_header_dirent=no
9980 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
9981 do
9982 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9983 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
9984 echo "configure:9985: checking for $ac_hdr that defines DIR" >&5
9985 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
9986   echo $ac_n "(cached) $ac_c" 1>&6
9987 else
9988   cat > conftest.$ac_ext <<EOF
9989 #line 9990 "configure"
9990 #include "confdefs.h"
9991 #include <sys/types.h>
9992 #include <$ac_hdr>
9993 int main() {
9994 DIR *dirp = 0;
9995 ; return 0; }
9996 EOF
9997 if { (eval echo configure:9998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9998   rm -rf conftest*
9999   eval "ac_cv_header_dirent_$ac_safe=yes"
10000 else
10001   echo "configure: failed program was:" >&5
10002   cat conftest.$ac_ext >&5
10003   rm -rf conftest*
10004   eval "ac_cv_header_dirent_$ac_safe=no"
10005 fi
10006 rm -f conftest*
10007 fi
10008 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
10009   echo "$ac_t""yes" 1>&6
10010     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10011   cat >> confdefs.h <<EOF
10012 #define $ac_tr_hdr 1
10013 EOF
10014  ac_header_dirent=$ac_hdr; break
10015 else
10016   echo "$ac_t""no" 1>&6
10017 fi
10018 done
10019 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10020 if test $ac_header_dirent = dirent.h; then
10021 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
10022 echo "configure:10023: checking for opendir in -ldir" >&5
10023 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
10024 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10025   echo $ac_n "(cached) $ac_c" 1>&6
10026 else
10027   ac_save_LIBS="$LIBS"
10028 LIBS="-ldir  $LIBS"
10029 cat > conftest.$ac_ext <<EOF
10030 #line 10031 "configure"
10031 #include "confdefs.h"
10032 /* Override any gcc2 internal prototype to avoid an error.  */
10033 /* We use char because int might match the return type of a gcc2
10034     builtin and then its argument prototype would still apply.  */
10035 char opendir();
10036
10037 int main() {
10038 opendir()
10039 ; return 0; }
10040 EOF
10041 if { (eval echo configure:10042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10042   rm -rf conftest*
10043   eval "ac_cv_lib_$ac_lib_var=yes"
10044 else
10045   echo "configure: failed program was:" >&5
10046   cat conftest.$ac_ext >&5
10047   rm -rf conftest*
10048   eval "ac_cv_lib_$ac_lib_var=no"
10049 fi
10050 rm -f conftest*
10051 LIBS="$ac_save_LIBS"
10052
10053 fi
10054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10055   echo "$ac_t""yes" 1>&6
10056   LIBS="$LIBS -ldir"
10057 else
10058   echo "$ac_t""no" 1>&6
10059 fi
10060
10061 else
10062 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
10063 echo "configure:10064: checking for opendir in -lx" >&5
10064 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
10065 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10066   echo $ac_n "(cached) $ac_c" 1>&6
10067 else
10068   ac_save_LIBS="$LIBS"
10069 LIBS="-lx  $LIBS"
10070 cat > conftest.$ac_ext <<EOF
10071 #line 10072 "configure"
10072 #include "confdefs.h"
10073 /* Override any gcc2 internal prototype to avoid an error.  */
10074 /* We use char because int might match the return type of a gcc2
10075     builtin and then its argument prototype would still apply.  */
10076 char opendir();
10077
10078 int main() {
10079 opendir()
10080 ; return 0; }
10081 EOF
10082 if { (eval echo configure:10083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10083   rm -rf conftest*
10084   eval "ac_cv_lib_$ac_lib_var=yes"
10085 else
10086   echo "configure: failed program was:" >&5
10087   cat conftest.$ac_ext >&5
10088   rm -rf conftest*
10089   eval "ac_cv_lib_$ac_lib_var=no"
10090 fi
10091 rm -f conftest*
10092 LIBS="$ac_save_LIBS"
10093
10094 fi
10095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10096   echo "$ac_t""yes" 1>&6
10097   LIBS="$LIBS -lx"
10098 else
10099   echo "$ac_t""no" 1>&6
10100 fi
10101
10102 fi
10103
10104 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
10105 echo "configure:10106: checking for sys/wait.h that is POSIX.1 compatible" >&5
10106 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
10107   echo $ac_n "(cached) $ac_c" 1>&6
10108 else
10109   cat > conftest.$ac_ext <<EOF
10110 #line 10111 "configure"
10111 #include "confdefs.h"
10112 #include <sys/types.h>
10113 #include <sys/wait.h>
10114 #ifndef WEXITSTATUS
10115 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
10116 #endif
10117 #ifndef WIFEXITED
10118 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
10119 #endif
10120 int main() {
10121 int s;
10122 wait (&s);
10123 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
10124 ; return 0; }
10125 EOF
10126 if { (eval echo configure:10127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10127   rm -rf conftest*
10128   ac_cv_header_sys_wait_h=yes
10129 else
10130   echo "configure: failed program was:" >&5
10131   cat conftest.$ac_ext >&5
10132   rm -rf conftest*
10133   ac_cv_header_sys_wait_h=no
10134 fi
10135 rm -f conftest*
10136 fi
10137
10138 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
10139 if test $ac_cv_header_sys_wait_h = yes; then
10140   cat >> confdefs.h <<\EOF
10141 #define HAVE_SYS_WAIT_H 1
10142 EOF
10143
10144 fi
10145
10146 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
10147 echo "configure:10148: checking POSIX termios" >&5
10148 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
10149   echo $ac_n "(cached) $ac_c" 1>&6
10150 else
10151   cat > conftest.$ac_ext <<EOF
10152 #line 10153 "configure"
10153 #include "confdefs.h"
10154 #include <sys/types.h>
10155 #include <unistd.h>
10156 #include <termios.h>
10157 int main() {
10158 /* SunOS 4.0.3 has termios.h but not the library calls.  */
10159    tcgetattr(0, 0);
10160 ; return 0; }
10161 EOF
10162 if { (eval echo configure:10163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10163   rm -rf conftest*
10164   am_cv_sys_posix_termios=yes
10165 else
10166   echo "configure: failed program was:" >&5
10167   cat conftest.$ac_ext >&5
10168   rm -rf conftest*
10169   am_cv_sys_posix_termios=no
10170 fi
10171 rm -f conftest*
10172 fi
10173
10174 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
10175
10176
10177  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
10178 echo "configure:10179: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
10179 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
10180   echo $ac_n "(cached) $ac_c" 1>&6
10181 else
10182   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
10183
10184   gwinsz_in_termios_h=no
10185   if test $am_cv_sys_posix_termios = yes; then
10186     cat > conftest.$ac_ext <<EOF
10187 #line 10188 "configure"
10188 #include "confdefs.h"
10189 #include <sys/types.h>
10190 #     include <termios.h>
10191 #     ifdef TIOCGWINSZ
10192         yes
10193 #     endif
10194     
10195 EOF
10196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10197   egrep "yes" >/dev/null 2>&1; then
10198   rm -rf conftest*
10199   gwinsz_in_termios_h=yes
10200 fi
10201 rm -f conftest*
10202
10203   fi
10204
10205   if test $gwinsz_in_termios_h = no; then
10206     cat > conftest.$ac_ext <<EOF
10207 #line 10208 "configure"
10208 #include "confdefs.h"
10209 #include <sys/types.h>
10210 #     include <sys/ioctl.h>
10211 #     ifdef TIOCGWINSZ
10212         yes
10213 #     endif
10214     
10215 EOF
10216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10217   egrep "yes" >/dev/null 2>&1; then
10218   rm -rf conftest*
10219   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
10220 fi
10221 rm -f conftest*
10222
10223   fi
10224   
10225 fi
10226
10227 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
10228   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
10229     cat >> confdefs.h <<\EOF
10230 #define GWINSZ_IN_SYS_IOCTL 1
10231 EOF
10232
10233   fi
10234
10235 if test $am_cv_sys_posix_termios = yes ; then
10236         cat >> confdefs.h <<\EOF
10237 #define HAVE_POSIX_TERMIOS 1
10238 EOF
10239
10240 fi
10241
10242 for ac_hdr in \
10243         arpa/inet.h             \
10244         arpa/nameser.h  \
10245         assert.h                \
10246         crypt.h                 \
10247         errno.h                 \
10248         fcntl.h                 \
10249         filio.h                 \
10250         getopt.h                \
10251         grp.h                   \
10252         libutil.h               \
10253         limits.h                \
10254         locale.h                \
10255         malloc.h                \
10256         memory.h                \
10257         psap.h                  \
10258         pwd.h                   \
10259         resolv.h                \
10260         sgtty.h                 \
10261         shadow.h                \
10262         stdarg.h                \
10263         stddef.h                \
10264         string.h                \
10265         strings.h               \
10266         sysexits.h              \
10267         sys/file.h              \
10268         sys/filio.h             \
10269         sys/errno.h             \
10270         sys/ioctl.h             \
10271         sys/param.h             \
10272         sys/resource.h  \
10273         sys/select.h    \
10274         sys/socket.h    \
10275         sys/syslog.h    \
10276         sys/time.h              \
10277         sys/types.h             \
10278         syslog.h                \
10279         termios.h               \
10280         unistd.h                \
10281
10282 do
10283 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10284 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10285 echo "configure:10286: checking for $ac_hdr" >&5
10286 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10287   echo $ac_n "(cached) $ac_c" 1>&6
10288 else
10289   cat > conftest.$ac_ext <<EOF
10290 #line 10291 "configure"
10291 #include "confdefs.h"
10292 #include <$ac_hdr>
10293 EOF
10294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10295 { (eval echo configure:10296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10297 if test -z "$ac_err"; then
10298   rm -rf conftest*
10299   eval "ac_cv_header_$ac_safe=yes"
10300 else
10301   echo "$ac_err" >&5
10302   echo "configure: failed program was:" >&5
10303   cat conftest.$ac_ext >&5
10304   rm -rf conftest*
10305   eval "ac_cv_header_$ac_safe=no"
10306 fi
10307 rm -f conftest*
10308 fi
10309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10310   echo "$ac_t""yes" 1>&6
10311     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10312   cat >> confdefs.h <<EOF
10313 #define $ac_tr_hdr 1
10314 EOF
10315  
10316 else
10317   echo "$ac_t""no" 1>&6
10318 fi
10319 done
10320
10321
10322 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10323 echo "configure:10324: checking for uid_t in sys/types.h" >&5
10324 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
10325   echo $ac_n "(cached) $ac_c" 1>&6
10326 else
10327   cat > conftest.$ac_ext <<EOF
10328 #line 10329 "configure"
10329 #include "confdefs.h"
10330 #include <sys/types.h>
10331 EOF
10332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10333   egrep "uid_t" >/dev/null 2>&1; then
10334   rm -rf conftest*
10335   ac_cv_type_uid_t=yes
10336 else
10337   rm -rf conftest*
10338   ac_cv_type_uid_t=no
10339 fi
10340 rm -f conftest*
10341
10342 fi
10343
10344 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10345 if test $ac_cv_type_uid_t = no; then
10346   cat >> confdefs.h <<\EOF
10347 #define uid_t int
10348 EOF
10349
10350   cat >> confdefs.h <<\EOF
10351 #define gid_t int
10352 EOF
10353
10354 fi
10355
10356 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
10357 echo "configure:10358: checking type of array argument to getgroups" >&5
10358 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
10359   echo $ac_n "(cached) $ac_c" 1>&6
10360 else
10361   if test "$cross_compiling" = yes; then
10362   ac_cv_type_getgroups=cross
10363 else
10364   cat > conftest.$ac_ext <<EOF
10365 #line 10366 "configure"
10366 #include "confdefs.h"
10367
10368 /* Thanks to Mike Rendell for this test.  */
10369 #include <sys/types.h>
10370 #define NGID 256
10371 #undef MAX
10372 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10373 main()
10374 {
10375   gid_t gidset[NGID];
10376   int i, n;
10377   union { gid_t gval; long lval; }  val;
10378
10379   val.lval = -1;
10380   for (i = 0; i < NGID; i++)
10381     gidset[i] = val.gval;
10382   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10383                  gidset);
10384   /* Exit non-zero if getgroups seems to require an array of ints.  This
10385      happens when gid_t is short but getgroups modifies an array of ints.  */
10386   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
10387 }
10388
10389 EOF
10390 if { (eval echo configure:10391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10391 then
10392     ac_cv_type_getgroups=gid_t
10393 else
10394   echo "configure: failed program was:" >&5
10395   cat conftest.$ac_ext >&5
10396   rm -fr conftest*
10397   ac_cv_type_getgroups=int
10398 fi
10399 rm -fr conftest*
10400 fi
10401
10402 if test $ac_cv_type_getgroups = cross; then
10403         cat > conftest.$ac_ext <<EOF
10404 #line 10405 "configure"
10405 #include "confdefs.h"
10406 #include <unistd.h>
10407 EOF
10408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10409   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
10410   rm -rf conftest*
10411   ac_cv_type_getgroups=gid_t
10412 else
10413   rm -rf conftest*
10414   ac_cv_type_getgroups=int
10415 fi
10416 rm -f conftest*
10417
10418 fi
10419 fi
10420
10421 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
10422 cat >> confdefs.h <<EOF
10423 #define GETGROUPS_T $ac_cv_type_getgroups
10424 EOF
10425
10426  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10427 echo "configure:10428: checking for ANSI C header files" >&5
10428 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
10429   echo $ac_n "(cached) $ac_c" 1>&6
10430 else
10431   cat > conftest.$ac_ext <<EOF
10432 #line 10433 "configure"
10433 #include "confdefs.h"
10434 #include <stdlib.h>
10435 #include <stdarg.h>
10436 #include <string.h>
10437 #include <float.h>
10438 EOF
10439 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10440 { (eval echo configure:10441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10441 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10442 if test -z "$ac_err"; then
10443   rm -rf conftest*
10444   ac_cv_header_stdc=yes
10445 else
10446   echo "$ac_err" >&5
10447   echo "configure: failed program was:" >&5
10448   cat conftest.$ac_ext >&5
10449   rm -rf conftest*
10450   ac_cv_header_stdc=no
10451 fi
10452 rm -f conftest*
10453
10454 if test $ac_cv_header_stdc = yes; then
10455   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10456 cat > conftest.$ac_ext <<EOF
10457 #line 10458 "configure"
10458 #include "confdefs.h"
10459 #include <string.h>
10460 EOF
10461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10462   egrep "memchr" >/dev/null 2>&1; then
10463   :
10464 else
10465   rm -rf conftest*
10466   ac_cv_header_stdc=no
10467 fi
10468 rm -f conftest*
10469
10470 fi
10471
10472 if test $ac_cv_header_stdc = yes; then
10473   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10474 cat > conftest.$ac_ext <<EOF
10475 #line 10476 "configure"
10476 #include "confdefs.h"
10477 #include <stdlib.h>
10478 EOF
10479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10480   egrep "free" >/dev/null 2>&1; then
10481   :
10482 else
10483   rm -rf conftest*
10484   ac_cv_header_stdc=no
10485 fi
10486 rm -f conftest*
10487
10488 fi
10489
10490 if test $ac_cv_header_stdc = yes; then
10491   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10492 if test "$cross_compiling" = yes; then
10493   :
10494 else
10495   cat > conftest.$ac_ext <<EOF
10496 #line 10497 "configure"
10497 #include "confdefs.h"
10498 #include <ctype.h>
10499 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10500 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10501 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10502 int main () { int i; for (i = 0; i < 256; i++)
10503 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10504 exit (0); }
10505
10506 EOF
10507 if { (eval echo configure:10508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10508 then
10509   :
10510 else
10511   echo "configure: failed program was:" >&5
10512   cat conftest.$ac_ext >&5
10513   rm -fr conftest*
10514   ac_cv_header_stdc=no
10515 fi
10516 rm -fr conftest*
10517 fi
10518
10519 fi
10520 fi
10521
10522 echo "$ac_t""$ac_cv_header_stdc" 1>&6
10523 if test $ac_cv_header_stdc = yes; then
10524   cat >> confdefs.h <<\EOF
10525 #define STDC_HEADERS 1
10526 EOF
10527
10528 fi
10529
10530 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
10531 echo "configure:10532: checking for mode_t" >&5
10532 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
10533   echo $ac_n "(cached) $ac_c" 1>&6
10534 else
10535   cat > conftest.$ac_ext <<EOF
10536 #line 10537 "configure"
10537 #include "confdefs.h"
10538 #include <sys/types.h>
10539 #if STDC_HEADERS
10540 #include <stdlib.h>
10541 #include <stddef.h>
10542 #endif
10543 EOF
10544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10545   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10546   rm -rf conftest*
10547   ac_cv_type_mode_t=yes
10548 else
10549   rm -rf conftest*
10550   ac_cv_type_mode_t=no
10551 fi
10552 rm -f conftest*
10553
10554 fi
10555 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
10556 if test $ac_cv_type_mode_t = no; then
10557   cat >> confdefs.h <<\EOF
10558 #define mode_t int
10559 EOF
10560
10561 fi
10562
10563 echo $ac_n "checking for off_t""... $ac_c" 1>&6
10564 echo "configure:10565: checking for off_t" >&5
10565 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
10566   echo $ac_n "(cached) $ac_c" 1>&6
10567 else
10568   cat > conftest.$ac_ext <<EOF
10569 #line 10570 "configure"
10570 #include "confdefs.h"
10571 #include <sys/types.h>
10572 #if STDC_HEADERS
10573 #include <stdlib.h>
10574 #include <stddef.h>
10575 #endif
10576 EOF
10577 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10578   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10579   rm -rf conftest*
10580   ac_cv_type_off_t=yes
10581 else
10582   rm -rf conftest*
10583   ac_cv_type_off_t=no
10584 fi
10585 rm -f conftest*
10586
10587 fi
10588 echo "$ac_t""$ac_cv_type_off_t" 1>&6
10589 if test $ac_cv_type_off_t = no; then
10590   cat >> confdefs.h <<\EOF
10591 #define off_t long
10592 EOF
10593
10594 fi
10595
10596 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
10597 echo "configure:10598: checking for pid_t" >&5
10598 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
10599   echo $ac_n "(cached) $ac_c" 1>&6
10600 else
10601   cat > conftest.$ac_ext <<EOF
10602 #line 10603 "configure"
10603 #include "confdefs.h"
10604 #include <sys/types.h>
10605 #if STDC_HEADERS
10606 #include <stdlib.h>
10607 #include <stddef.h>
10608 #endif
10609 EOF
10610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10611   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10612   rm -rf conftest*
10613   ac_cv_type_pid_t=yes
10614 else
10615   rm -rf conftest*
10616   ac_cv_type_pid_t=no
10617 fi
10618 rm -f conftest*
10619
10620 fi
10621 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
10622 if test $ac_cv_type_pid_t = no; then
10623   cat >> confdefs.h <<\EOF
10624 #define pid_t int
10625 EOF
10626
10627 fi
10628
10629 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
10630 echo "configure:10631: checking for ptrdiff_t" >&5
10631 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
10632   echo $ac_n "(cached) $ac_c" 1>&6
10633 else
10634   cat > conftest.$ac_ext <<EOF
10635 #line 10636 "configure"
10636 #include "confdefs.h"
10637 #include <stddef.h>
10638 int main() {
10639 ptrdiff_t p
10640 ; return 0; }
10641 EOF
10642 if { (eval echo configure:10643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10643   rm -rf conftest*
10644   am_cv_type_ptrdiff_t=yes
10645 else
10646   echo "configure: failed program was:" >&5
10647   cat conftest.$ac_ext >&5
10648   rm -rf conftest*
10649   am_cv_type_ptrdiff_t=no
10650 fi
10651 rm -f conftest*
10652 fi
10653
10654 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
10655    if test $am_cv_type_ptrdiff_t = yes; then
10656      cat >> confdefs.h <<\EOF
10657 #define HAVE_PTRDIFF_T 1
10658 EOF
10659
10660    fi
10661
10662 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
10663 echo "configure:10664: checking return type of signal handlers" >&5
10664 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
10665   echo $ac_n "(cached) $ac_c" 1>&6
10666 else
10667   cat > conftest.$ac_ext <<EOF
10668 #line 10669 "configure"
10669 #include "confdefs.h"
10670 #include <sys/types.h>
10671 #include <signal.h>
10672 #ifdef signal
10673 #undef signal
10674 #endif
10675 #ifdef __cplusplus
10676 extern "C" void (*signal (int, void (*)(int)))(int);
10677 #else
10678 void (*signal ()) ();
10679 #endif
10680
10681 int main() {
10682 int i;
10683 ; return 0; }
10684 EOF
10685 if { (eval echo configure:10686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10686   rm -rf conftest*
10687   ac_cv_type_signal=void
10688 else
10689   echo "configure: failed program was:" >&5
10690   cat conftest.$ac_ext >&5
10691   rm -rf conftest*
10692   ac_cv_type_signal=int
10693 fi
10694 rm -f conftest*
10695 fi
10696
10697 echo "$ac_t""$ac_cv_type_signal" 1>&6
10698 cat >> confdefs.h <<EOF
10699 #define RETSIGTYPE $ac_cv_type_signal
10700 EOF
10701
10702
10703 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
10704 echo "configure:10705: checking for sig_atomic_t" >&5
10705 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
10706   echo $ac_n "(cached) $ac_c" 1>&6
10707 else
10708   cat > conftest.$ac_ext <<EOF
10709 #line 10710 "configure"
10710 #include "confdefs.h"
10711 #include <signal.h>
10712 int main() {
10713 sig_atomic_t atomic;
10714 ; return 0; }
10715 EOF
10716 if { (eval echo configure:10717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10717   rm -rf conftest*
10718   ol_cv_type_sig_atomic_t=yes
10719 else
10720   echo "configure: failed program was:" >&5
10721   cat conftest.$ac_ext >&5
10722   rm -rf conftest*
10723   ol_cv_type_sig_atomic_t=no
10724 fi
10725 rm -f conftest*
10726 fi
10727
10728 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
10729   if test $ol_cv_type_sig_atomic_t = no; then
10730     cat >> confdefs.h <<\EOF
10731 #define sig_atomic_t int
10732 EOF
10733
10734   fi
10735  
10736 echo $ac_n "checking for size_t""... $ac_c" 1>&6
10737 echo "configure:10738: checking for size_t" >&5
10738 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
10739   echo $ac_n "(cached) $ac_c" 1>&6
10740 else
10741   cat > conftest.$ac_ext <<EOF
10742 #line 10743 "configure"
10743 #include "confdefs.h"
10744 #include <sys/types.h>
10745 #if STDC_HEADERS
10746 #include <stdlib.h>
10747 #include <stddef.h>
10748 #endif
10749 EOF
10750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10751   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10752   rm -rf conftest*
10753   ac_cv_type_size_t=yes
10754 else
10755   rm -rf conftest*
10756   ac_cv_type_size_t=no
10757 fi
10758 rm -f conftest*
10759
10760 fi
10761 echo "$ac_t""$ac_cv_type_size_t" 1>&6
10762 if test $ac_cv_type_size_t = no; then
10763   cat >> confdefs.h <<\EOF
10764 #define size_t unsigned
10765 EOF
10766
10767 fi
10768
10769 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
10770 echo "configure:10771: checking for st_blksize in struct stat" >&5
10771 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
10772   echo $ac_n "(cached) $ac_c" 1>&6
10773 else
10774   cat > conftest.$ac_ext <<EOF
10775 #line 10776 "configure"
10776 #include "confdefs.h"
10777 #include <sys/types.h>
10778 #include <sys/stat.h>
10779 int main() {
10780 struct stat s; s.st_blksize;
10781 ; return 0; }
10782 EOF
10783 if { (eval echo configure:10784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10784   rm -rf conftest*
10785   ac_cv_struct_st_blksize=yes
10786 else
10787   echo "configure: failed program was:" >&5
10788   cat conftest.$ac_ext >&5
10789   rm -rf conftest*
10790   ac_cv_struct_st_blksize=no
10791 fi
10792 rm -f conftest*
10793 fi
10794
10795 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
10796 if test $ac_cv_struct_st_blksize = yes; then
10797   cat >> confdefs.h <<\EOF
10798 #define HAVE_ST_BLKSIZE 1
10799 EOF
10800
10801 fi
10802
10803 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
10804 echo "configure:10805: checking whether time.h and sys/time.h may both be included" >&5
10805 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
10806   echo $ac_n "(cached) $ac_c" 1>&6
10807 else
10808   cat > conftest.$ac_ext <<EOF
10809 #line 10810 "configure"
10810 #include "confdefs.h"
10811 #include <sys/types.h>
10812 #include <sys/time.h>
10813 #include <time.h>
10814 int main() {
10815 struct tm *tp;
10816 ; return 0; }
10817 EOF
10818 if { (eval echo configure:10819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10819   rm -rf conftest*
10820   ac_cv_header_time=yes
10821 else
10822   echo "configure: failed program was:" >&5
10823   cat conftest.$ac_ext >&5
10824   rm -rf conftest*
10825   ac_cv_header_time=no
10826 fi
10827 rm -f conftest*
10828 fi
10829
10830 echo "$ac_t""$ac_cv_header_time" 1>&6
10831 if test $ac_cv_header_time = yes; then
10832   cat >> confdefs.h <<\EOF
10833 #define TIME_WITH_SYS_TIME 1
10834 EOF
10835
10836 fi
10837
10838 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
10839 echo "configure:10840: checking whether struct tm is in sys/time.h or time.h" >&5
10840 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
10841   echo $ac_n "(cached) $ac_c" 1>&6
10842 else
10843   cat > conftest.$ac_ext <<EOF
10844 #line 10845 "configure"
10845 #include "confdefs.h"
10846 #include <sys/types.h>
10847 #include <time.h>
10848 int main() {
10849 struct tm *tp; tp->tm_sec;
10850 ; return 0; }
10851 EOF
10852 if { (eval echo configure:10853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10853   rm -rf conftest*
10854   ac_cv_struct_tm=time.h
10855 else
10856   echo "configure: failed program was:" >&5
10857   cat conftest.$ac_ext >&5
10858   rm -rf conftest*
10859   ac_cv_struct_tm=sys/time.h
10860 fi
10861 rm -f conftest*
10862 fi
10863
10864 echo "$ac_t""$ac_cv_struct_tm" 1>&6
10865 if test $ac_cv_struct_tm = sys/time.h; then
10866   cat >> confdefs.h <<\EOF
10867 #define TM_IN_SYS_TIME 1
10868 EOF
10869
10870 fi
10871
10872 # test for pw_gecos in struct passwd
10873 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
10874 echo "configure:10875: checking struct passwd for pw_gecos" >&5
10875 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
10876   echo $ac_n "(cached) $ac_c" 1>&6
10877 else
10878   
10879         cat > conftest.$ac_ext <<EOF
10880 #line 10881 "configure"
10881 #include "confdefs.h"
10882 #include <pwd.h>
10883 int main() {
10884
10885         struct passwd pwd;
10886         pwd.pw_gecos = pwd.pw_name;
10887
10888 ; return 0; }
10889 EOF
10890 if { (eval echo configure:10891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10891   rm -rf conftest*
10892   ol_cv_struct_passwd_pw_gecos=yes
10893 else
10894   echo "configure: failed program was:" >&5
10895   cat conftest.$ac_ext >&5
10896   rm -rf conftest*
10897   ol_cv_struct_passwd_pw_gecos=no
10898 fi
10899 rm -f conftest*
10900 fi
10901
10902 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
10903 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
10904         cat >> confdefs.h <<\EOF
10905 #define HAVE_PW_GECOS 1
10906 EOF
10907
10908 fi
10909
10910 # test for pw_passwd in struct passwd
10911 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
10912 echo "configure:10913: checking struct passwd for pw_passwd" >&5
10913 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_passwd'+set}'`\" = set"; then
10914   echo $ac_n "(cached) $ac_c" 1>&6
10915 else
10916   
10917         cat > conftest.$ac_ext <<EOF
10918 #line 10919 "configure"
10919 #include "confdefs.h"
10920 #include <pwd.h>
10921 int main() {
10922
10923         struct passwd pwd;
10924         pwd.pw_passwd = pwd.pw_name;
10925
10926 ; return 0; }
10927 EOF
10928 if { (eval echo configure:10929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10929   rm -rf conftest*
10930   ol_cv_struct_passwd_pw_passwd=yes
10931 else
10932   echo "configure: failed program was:" >&5
10933   cat conftest.$ac_ext >&5
10934   rm -rf conftest*
10935   ol_cv_struct_passwd_pw_passwd=no
10936 fi
10937 rm -f conftest*
10938 fi
10939
10940 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
10941 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
10942         cat >> confdefs.h <<\EOF
10943 #define HAVE_PW_PASSWD 1
10944 EOF
10945
10946 fi
10947
10948
10949
10950 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
10951 echo "configure:10952: checking if toupper() requires islower()" >&5
10952 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
10953   echo $ac_n "(cached) $ac_c" 1>&6
10954 else
10955   
10956         if test "$cross_compiling" = yes; then
10957   ol_cv_c_upper_lower=safe
10958 else
10959   cat > conftest.$ac_ext <<EOF
10960 #line 10961 "configure"
10961 #include "confdefs.h"
10962
10963 #include <ctype.h>
10964 main()
10965 {
10966         if ('C' == toupper('C'))
10967                 exit(0);
10968         else
10969                 exit(1);
10970 }
10971 EOF
10972 if { (eval echo configure:10973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10973 then
10974   ol_cv_c_upper_lower=no
10975 else
10976   echo "configure: failed program was:" >&5
10977   cat conftest.$ac_ext >&5
10978   rm -fr conftest*
10979   ol_cv_c_upper_lower=yes
10980 fi
10981 rm -fr conftest*
10982 fi
10983
10984 fi
10985
10986 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
10987 if test $ol_cv_c_upper_lower != no ; then
10988         cat >> confdefs.h <<\EOF
10989 #define C_UPPER_LOWER 1
10990 EOF
10991
10992 fi
10993
10994 echo $ac_n "checking for working const""... $ac_c" 1>&6
10995 echo "configure:10996: checking for working const" >&5
10996 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
10997   echo $ac_n "(cached) $ac_c" 1>&6
10998 else
10999   cat > conftest.$ac_ext <<EOF
11000 #line 11001 "configure"
11001 #include "confdefs.h"
11002
11003 int main() {
11004
11005 /* Ultrix mips cc rejects this.  */
11006 typedef int charset[2]; const charset x;
11007 /* SunOS 4.1.1 cc rejects this.  */
11008 char const *const *ccp;
11009 char **p;
11010 /* NEC SVR4.0.2 mips cc rejects this.  */
11011 struct point {int x, y;};
11012 static struct point const zero = {0,0};
11013 /* AIX XL C 1.02.0.0 rejects this.
11014    It does not let you subtract one const X* pointer from another in an arm
11015    of an if-expression whose if-part is not a constant expression */
11016 const char *g = "string";
11017 ccp = &g + (g ? g-g : 0);
11018 /* HPUX 7.0 cc rejects these. */
11019 ++ccp;
11020 p = (char**) ccp;
11021 ccp = (char const *const *) p;
11022 { /* SCO 3.2v4 cc rejects this.  */
11023   char *t;
11024   char const *s = 0 ? (char *) 0 : (char const *) 0;
11025
11026   *t++ = 0;
11027 }
11028 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11029   int x[] = {25, 17};
11030   const int *foo = &x[0];
11031   ++foo;
11032 }
11033 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11034   typedef const int *iptr;
11035   iptr p = 0;
11036   ++p;
11037 }
11038 { /* AIX XL C 1.02.0.0 rejects this saying
11039      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11040   struct s { int j; const int *ap[3]; };
11041   struct s *b; b->j = 5;
11042 }
11043 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11044   const int foo = 10;
11045 }
11046
11047 ; return 0; }
11048 EOF
11049 if { (eval echo configure:11050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11050   rm -rf conftest*
11051   ac_cv_c_const=yes
11052 else
11053   echo "configure: failed program was:" >&5
11054   cat conftest.$ac_ext >&5
11055   rm -rf conftest*
11056   ac_cv_c_const=no
11057 fi
11058 rm -f conftest*
11059 fi
11060
11061 echo "$ac_t""$ac_cv_c_const" 1>&6
11062 if test $ac_cv_c_const = no; then
11063   cat >> confdefs.h <<\EOF
11064 #define const 
11065 EOF
11066
11067 fi
11068
11069 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11070 echo "configure:11071: checking if compiler understands volatile" >&5
11071 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
11072   echo $ac_n "(cached) $ac_c" 1>&6
11073 else
11074   cat > conftest.$ac_ext <<EOF
11075 #line 11076 "configure"
11076 #include "confdefs.h"
11077 int x, y, z;
11078 int main() {
11079 volatile int a; int * volatile b = x ? &y : &z;
11080       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11081       *b = 0;
11082 ; return 0; }
11083 EOF
11084 if { (eval echo configure:11085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11085   rm -rf conftest*
11086   ol_cv_c_volatile=yes
11087 else
11088   echo "configure: failed program was:" >&5
11089   cat conftest.$ac_ext >&5
11090   rm -rf conftest*
11091   ol_cv_c_volatile=no
11092 fi
11093 rm -f conftest*
11094 fi
11095
11096 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11097   if test $ol_cv_c_volatile = yes; then
11098     : 
11099   else
11100     cat >> confdefs.h <<\EOF
11101 #define volatile 
11102 EOF
11103
11104   fi
11105  
11106
11107 if test $cross_compiling = yes ; then
11108         cat >> confdefs.h <<\EOF
11109 #define CROSS_COMPILING 1
11110 EOF
11111
11112
11113         cat >> confdefs.h <<\EOF
11114 #define LBER_INT_T long
11115 EOF
11116
11117         cat >> confdefs.h <<\EOF
11118 #define LBER_TAG_T long
11119 EOF
11120
11121         cat >> confdefs.h <<\EOF
11122 #define LBER_SOCKET_T int
11123 EOF
11124
11125
11126 else
11127         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11128 echo "configure:11129: checking whether byte ordering is bigendian" >&5
11129 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
11130   echo $ac_n "(cached) $ac_c" 1>&6
11131 else
11132   ac_cv_c_bigendian=unknown
11133 # See if sys/param.h defines the BYTE_ORDER macro.
11134 cat > conftest.$ac_ext <<EOF
11135 #line 11136 "configure"
11136 #include "confdefs.h"
11137 #include <sys/types.h>
11138 #include <sys/param.h>
11139 int main() {
11140
11141 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11142  bogus endian macros
11143 #endif
11144 ; return 0; }
11145 EOF
11146 if { (eval echo configure:11147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11147   rm -rf conftest*
11148   # It does; now see whether it defined to BIG_ENDIAN or not.
11149 cat > conftest.$ac_ext <<EOF
11150 #line 11151 "configure"
11151 #include "confdefs.h"
11152 #include <sys/types.h>
11153 #include <sys/param.h>
11154 int main() {
11155
11156 #if BYTE_ORDER != BIG_ENDIAN
11157  not big endian
11158 #endif
11159 ; return 0; }
11160 EOF
11161 if { (eval echo configure:11162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11162   rm -rf conftest*
11163   ac_cv_c_bigendian=yes
11164 else
11165   echo "configure: failed program was:" >&5
11166   cat conftest.$ac_ext >&5
11167   rm -rf conftest*
11168   ac_cv_c_bigendian=no
11169 fi
11170 rm -f conftest*
11171 else
11172   echo "configure: failed program was:" >&5
11173   cat conftest.$ac_ext >&5
11174 fi
11175 rm -f conftest*
11176 if test $ac_cv_c_bigendian = unknown; then
11177 if test "$cross_compiling" = yes; then
11178     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11179 else
11180   cat > conftest.$ac_ext <<EOF
11181 #line 11182 "configure"
11182 #include "confdefs.h"
11183 main () {
11184   /* Are we little or big endian?  From Harbison&Steele.  */
11185   union
11186   {
11187     long l;
11188     char c[sizeof (long)];
11189   } u;
11190   u.l = 1;
11191   exit (u.c[sizeof (long) - 1] == 1);
11192 }
11193 EOF
11194 if { (eval echo configure:11195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11195 then
11196   ac_cv_c_bigendian=no
11197 else
11198   echo "configure: failed program was:" >&5
11199   cat conftest.$ac_ext >&5
11200   rm -fr conftest*
11201   ac_cv_c_bigendian=yes
11202 fi
11203 rm -fr conftest*
11204 fi
11205
11206 fi
11207 fi
11208
11209 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
11210 if test $ac_cv_c_bigendian = yes; then
11211   cat >> confdefs.h <<\EOF
11212 #define WORDS_BIGENDIAN 1
11213 EOF
11214
11215 fi
11216
11217         echo $ac_n "checking size of short""... $ac_c" 1>&6
11218 echo "configure:11219: checking size of short" >&5
11219 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
11220   echo $ac_n "(cached) $ac_c" 1>&6
11221 else
11222   if test "$cross_compiling" = yes; then
11223     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11224 else
11225   cat > conftest.$ac_ext <<EOF
11226 #line 11227 "configure"
11227 #include "confdefs.h"
11228 #include <stdio.h>
11229 main()
11230 {
11231   FILE *f=fopen("conftestval", "w");
11232   if (!f) exit(1);
11233   fprintf(f, "%d\n", sizeof(short));
11234   exit(0);
11235 }
11236 EOF
11237 if { (eval echo configure:11238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11238 then
11239   ac_cv_sizeof_short=`cat conftestval`
11240 else
11241   echo "configure: failed program was:" >&5
11242   cat conftest.$ac_ext >&5
11243   rm -fr conftest*
11244   ac_cv_sizeof_short=0
11245 fi
11246 rm -fr conftest*
11247 fi
11248
11249 fi
11250 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
11251 cat >> confdefs.h <<EOF
11252 #define SIZEOF_SHORT $ac_cv_sizeof_short
11253 EOF
11254
11255  
11256         echo $ac_n "checking size of int""... $ac_c" 1>&6
11257 echo "configure:11258: checking size of int" >&5
11258 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
11259   echo $ac_n "(cached) $ac_c" 1>&6
11260 else
11261   if test "$cross_compiling" = yes; then
11262     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11263 else
11264   cat > conftest.$ac_ext <<EOF
11265 #line 11266 "configure"
11266 #include "confdefs.h"
11267 #include <stdio.h>
11268 main()
11269 {
11270   FILE *f=fopen("conftestval", "w");
11271   if (!f) exit(1);
11272   fprintf(f, "%d\n", sizeof(int));
11273   exit(0);
11274 }
11275 EOF
11276 if { (eval echo configure:11277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11277 then
11278   ac_cv_sizeof_int=`cat conftestval`
11279 else
11280   echo "configure: failed program was:" >&5
11281   cat conftest.$ac_ext >&5
11282   rm -fr conftest*
11283   ac_cv_sizeof_int=0
11284 fi
11285 rm -fr conftest*
11286 fi
11287
11288 fi
11289 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11290 cat >> confdefs.h <<EOF
11291 #define SIZEOF_INT $ac_cv_sizeof_int
11292 EOF
11293
11294  
11295         echo $ac_n "checking size of long""... $ac_c" 1>&6
11296 echo "configure:11297: checking size of long" >&5
11297 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
11298   echo $ac_n "(cached) $ac_c" 1>&6
11299 else
11300   if test "$cross_compiling" = yes; then
11301     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11302 else
11303   cat > conftest.$ac_ext <<EOF
11304 #line 11305 "configure"
11305 #include "confdefs.h"
11306 #include <stdio.h>
11307 main()
11308 {
11309   FILE *f=fopen("conftestval", "w");
11310   if (!f) exit(1);
11311   fprintf(f, "%d\n", sizeof(long));
11312   exit(0);
11313 }
11314 EOF
11315 if { (eval echo configure:11316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11316 then
11317   ac_cv_sizeof_long=`cat conftestval`
11318 else
11319   echo "configure: failed program was:" >&5
11320   cat conftest.$ac_ext >&5
11321   rm -fr conftest*
11322   ac_cv_sizeof_long=0
11323 fi
11324 rm -fr conftest*
11325 fi
11326
11327 fi
11328 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
11329 cat >> confdefs.h <<EOF
11330 #define SIZEOF_LONG $ac_cv_sizeof_long
11331 EOF
11332
11333
11334
11335         if test "$ac_cv_sizeof_int" -lt 4 ; then
11336                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
11337
11338                 cat >> confdefs.h <<\EOF
11339 #define LBER_INT_T long
11340 EOF
11341
11342                 cat >> confdefs.h <<\EOF
11343 #define LBER_TAG_T long
11344 EOF
11345
11346                 cat >> confdefs.h <<\EOF
11347 #define LBER_SOCKET_T int
11348 EOF
11349
11350         else
11351                 cat >> confdefs.h <<\EOF
11352 #define LBER_INT_T int
11353 EOF
11354
11355                 cat >> confdefs.h <<\EOF
11356 #define LBER_TAG_T long
11357 EOF
11358
11359                 cat >> confdefs.h <<\EOF
11360 #define LBER_SOCKET_T int
11361 EOF
11362
11363         fi
11364 fi
11365
11366 cat >> confdefs.h <<\EOF
11367 #define LBER_LEN_T long
11368 EOF
11369
11370
11371 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11372 echo "configure:11373: checking for 8-bit clean memcmp" >&5
11373 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
11374   echo $ac_n "(cached) $ac_c" 1>&6
11375 else
11376   if test "$cross_compiling" = yes; then
11377   ac_cv_func_memcmp_clean=no
11378 else
11379   cat > conftest.$ac_ext <<EOF
11380 #line 11381 "configure"
11381 #include "confdefs.h"
11382
11383 main()
11384 {
11385   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11386   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11387 }
11388
11389 EOF
11390 if { (eval echo configure:11391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11391 then
11392   ac_cv_func_memcmp_clean=yes
11393 else
11394   echo "configure: failed program was:" >&5
11395   cat conftest.$ac_ext >&5
11396   rm -fr conftest*
11397   ac_cv_func_memcmp_clean=no
11398 fi
11399 rm -fr conftest*
11400 fi
11401
11402 fi
11403
11404 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11405 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11406
11407 echo $ac_n "checking for strftime""... $ac_c" 1>&6
11408 echo "configure:11409: checking for strftime" >&5
11409 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
11410   echo $ac_n "(cached) $ac_c" 1>&6
11411 else
11412   cat > conftest.$ac_ext <<EOF
11413 #line 11414 "configure"
11414 #include "confdefs.h"
11415 /* System header to define __stub macros and hopefully few prototypes,
11416     which can conflict with char strftime(); below.  */
11417 #include <assert.h>
11418 /* Override any gcc2 internal prototype to avoid an error.  */
11419 /* We use char because int might match the return type of a gcc2
11420     builtin and then its argument prototype would still apply.  */
11421 char strftime();
11422
11423 int main() {
11424
11425 /* The GNU C library defines this for functions which it implements
11426     to always fail with ENOSYS.  Some functions are actually named
11427     something starting with __ and the normal name is an alias.  */
11428 #if defined (__stub_strftime) || defined (__stub___strftime)
11429 choke me
11430 #else
11431 strftime();
11432 #endif
11433
11434 ; return 0; }
11435 EOF
11436 if { (eval echo configure:11437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11437   rm -rf conftest*
11438   eval "ac_cv_func_strftime=yes"
11439 else
11440   echo "configure: failed program was:" >&5
11441   cat conftest.$ac_ext >&5
11442   rm -rf conftest*
11443   eval "ac_cv_func_strftime=no"
11444 fi
11445 rm -f conftest*
11446 fi
11447
11448 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
11449   echo "$ac_t""yes" 1>&6
11450   cat >> confdefs.h <<\EOF
11451 #define HAVE_STRFTIME 1
11452 EOF
11453
11454 else
11455   echo "$ac_t""no" 1>&6
11456 # strftime is in -lintl on SCO UNIX.
11457 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
11458 echo "configure:11459: checking for strftime in -lintl" >&5
11459 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
11460 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11461   echo $ac_n "(cached) $ac_c" 1>&6
11462 else
11463   ac_save_LIBS="$LIBS"
11464 LIBS="-lintl  $LIBS"
11465 cat > conftest.$ac_ext <<EOF
11466 #line 11467 "configure"
11467 #include "confdefs.h"
11468 /* Override any gcc2 internal prototype to avoid an error.  */
11469 /* We use char because int might match the return type of a gcc2
11470     builtin and then its argument prototype would still apply.  */
11471 char strftime();
11472
11473 int main() {
11474 strftime()
11475 ; return 0; }
11476 EOF
11477 if { (eval echo configure:11478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11478   rm -rf conftest*
11479   eval "ac_cv_lib_$ac_lib_var=yes"
11480 else
11481   echo "configure: failed program was:" >&5
11482   cat conftest.$ac_ext >&5
11483   rm -rf conftest*
11484   eval "ac_cv_lib_$ac_lib_var=no"
11485 fi
11486 rm -f conftest*
11487 LIBS="$ac_save_LIBS"
11488
11489 fi
11490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11491   echo "$ac_t""yes" 1>&6
11492   cat >> confdefs.h <<\EOF
11493 #define HAVE_STRFTIME 1
11494 EOF
11495
11496 LIBS="-lintl $LIBS"
11497 else
11498   echo "$ac_t""no" 1>&6
11499 fi
11500
11501 fi
11502
11503
11504 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
11505 echo "configure:11506: checking for vprintf" >&5
11506 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
11507   echo $ac_n "(cached) $ac_c" 1>&6
11508 else
11509   cat > conftest.$ac_ext <<EOF
11510 #line 11511 "configure"
11511 #include "confdefs.h"
11512 /* System header to define __stub macros and hopefully few prototypes,
11513     which can conflict with char vprintf(); below.  */
11514 #include <assert.h>
11515 /* Override any gcc2 internal prototype to avoid an error.  */
11516 /* We use char because int might match the return type of a gcc2
11517     builtin and then its argument prototype would still apply.  */
11518 char vprintf();
11519
11520 int main() {
11521
11522 /* The GNU C library defines this for functions which it implements
11523     to always fail with ENOSYS.  Some functions are actually named
11524     something starting with __ and the normal name is an alias.  */
11525 #if defined (__stub_vprintf) || defined (__stub___vprintf)
11526 choke me
11527 #else
11528 vprintf();
11529 #endif
11530
11531 ; return 0; }
11532 EOF
11533 if { (eval echo configure:11534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11534   rm -rf conftest*
11535   eval "ac_cv_func_vprintf=yes"
11536 else
11537   echo "configure: failed program was:" >&5
11538   cat conftest.$ac_ext >&5
11539   rm -rf conftest*
11540   eval "ac_cv_func_vprintf=no"
11541 fi
11542 rm -f conftest*
11543 fi
11544
11545 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
11546   echo "$ac_t""yes" 1>&6
11547   cat >> confdefs.h <<\EOF
11548 #define HAVE_VPRINTF 1
11549 EOF
11550
11551 else
11552   echo "$ac_t""no" 1>&6
11553 fi
11554
11555 if test "$ac_cv_func_vprintf" != yes; then
11556 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
11557 echo "configure:11558: checking for _doprnt" >&5
11558 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
11559   echo $ac_n "(cached) $ac_c" 1>&6
11560 else
11561   cat > conftest.$ac_ext <<EOF
11562 #line 11563 "configure"
11563 #include "confdefs.h"
11564 /* System header to define __stub macros and hopefully few prototypes,
11565     which can conflict with char _doprnt(); below.  */
11566 #include <assert.h>
11567 /* Override any gcc2 internal prototype to avoid an error.  */
11568 /* We use char because int might match the return type of a gcc2
11569     builtin and then its argument prototype would still apply.  */
11570 char _doprnt();
11571
11572 int main() {
11573
11574 /* The GNU C library defines this for functions which it implements
11575     to always fail with ENOSYS.  Some functions are actually named
11576     something starting with __ and the normal name is an alias.  */
11577 #if defined (__stub__doprnt) || defined (__stub____doprnt)
11578 choke me
11579 #else
11580 _doprnt();
11581 #endif
11582
11583 ; return 0; }
11584 EOF
11585 if { (eval echo configure:11586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11586   rm -rf conftest*
11587   eval "ac_cv_func__doprnt=yes"
11588 else
11589   echo "configure: failed program was:" >&5
11590   cat conftest.$ac_ext >&5
11591   rm -rf conftest*
11592   eval "ac_cv_func__doprnt=no"
11593 fi
11594 rm -f conftest*
11595 fi
11596
11597 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
11598   echo "$ac_t""yes" 1>&6
11599   cat >> confdefs.h <<\EOF
11600 #define HAVE_DOPRNT 1
11601 EOF
11602
11603 else
11604   echo "$ac_t""no" 1>&6
11605 fi
11606
11607 fi
11608
11609
11610 if test $ac_cv_func_vprintf = yes ; then
11611                 for ac_func in vsnprintf vsprintf
11612 do
11613 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11614 echo "configure:11615: checking for $ac_func" >&5
11615 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11616   echo $ac_n "(cached) $ac_c" 1>&6
11617 else
11618   cat > conftest.$ac_ext <<EOF
11619 #line 11620 "configure"
11620 #include "confdefs.h"
11621 /* System header to define __stub macros and hopefully few prototypes,
11622     which can conflict with char $ac_func(); below.  */
11623 #include <assert.h>
11624 /* Override any gcc2 internal prototype to avoid an error.  */
11625 /* We use char because int might match the return type of a gcc2
11626     builtin and then its argument prototype would still apply.  */
11627 char $ac_func();
11628
11629 int main() {
11630
11631 /* The GNU C library defines this for functions which it implements
11632     to always fail with ENOSYS.  Some functions are actually named
11633     something starting with __ and the normal name is an alias.  */
11634 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11635 choke me
11636 #else
11637 $ac_func();
11638 #endif
11639
11640 ; return 0; }
11641 EOF
11642 if { (eval echo configure:11643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11643   rm -rf conftest*
11644   eval "ac_cv_func_$ac_func=yes"
11645 else
11646   echo "configure: failed program was:" >&5
11647   cat conftest.$ac_ext >&5
11648   rm -rf conftest*
11649   eval "ac_cv_func_$ac_func=no"
11650 fi
11651 rm -f conftest*
11652 fi
11653
11654 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11655   echo "$ac_t""yes" 1>&6
11656     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11657   cat >> confdefs.h <<EOF
11658 #define $ac_tr_func 1
11659 EOF
11660  
11661 else
11662   echo "$ac_t""no" 1>&6
11663 fi
11664 done
11665
11666 fi
11667
11668 for ac_func in \
11669         bcopy                   \
11670         closesocket             \
11671         endgrent                \
11672         endpwent                \
11673         flock                   \
11674         getdtablesize   \
11675         getgrgid                \
11676         gethostname             \
11677         getpass                 \
11678         getpwuid                \
11679         getpwnam                \
11680         getspnam                \
11681         gettimeofday    \
11682         initgroups              \
11683         lockf                   \
11684         memcpy                  \
11685         memmove                 \
11686         mkstemp                 \
11687         read                    \
11688         recv                    \
11689         recvfrom                \
11690         setpwfile               \
11691         setgid                  \
11692         setegid                 \
11693         setsid                  \
11694         setuid                  \
11695         seteuid                 \
11696         signal                  \
11697         sigset                  \
11698         snprintf                \
11699         strdup                  \
11700         strerror                \
11701         strpbrk                 \
11702         strrchr                 \
11703         strsep                  \
11704         strstr                  \
11705         strtol                  \
11706         strtoul                 \
11707         strspn                  \
11708         sysconf                 \
11709         waitpid                 \
11710         wait4                   \
11711         write                   \
11712         send                    \
11713         sendto                  \
11714
11715 do
11716 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11717 echo "configure:11718: checking for $ac_func" >&5
11718 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11719   echo $ac_n "(cached) $ac_c" 1>&6
11720 else
11721   cat > conftest.$ac_ext <<EOF
11722 #line 11723 "configure"
11723 #include "confdefs.h"
11724 /* System header to define __stub macros and hopefully few prototypes,
11725     which can conflict with char $ac_func(); below.  */
11726 #include <assert.h>
11727 /* Override any gcc2 internal prototype to avoid an error.  */
11728 /* We use char because int might match the return type of a gcc2
11729     builtin and then its argument prototype would still apply.  */
11730 char $ac_func();
11731
11732 int main() {
11733
11734 /* The GNU C library defines this for functions which it implements
11735     to always fail with ENOSYS.  Some functions are actually named
11736     something starting with __ and the normal name is an alias.  */
11737 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11738 choke me
11739 #else
11740 $ac_func();
11741 #endif
11742
11743 ; return 0; }
11744 EOF
11745 if { (eval echo configure:11746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11746   rm -rf conftest*
11747   eval "ac_cv_func_$ac_func=yes"
11748 else
11749   echo "configure: failed program was:" >&5
11750   cat conftest.$ac_ext >&5
11751   rm -rf conftest*
11752   eval "ac_cv_func_$ac_func=no"
11753 fi
11754 rm -f conftest*
11755 fi
11756
11757 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11758   echo "$ac_t""yes" 1>&6
11759     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11760   cat >> confdefs.h <<EOF
11761 #define $ac_tr_func 1
11762 EOF
11763  
11764 else
11765   echo "$ac_t""no" 1>&6
11766 fi
11767 done
11768
11769
11770 for ac_func in getopt tempnam
11771 do
11772 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11773 echo "configure:11774: checking for $ac_func" >&5
11774 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11775   echo $ac_n "(cached) $ac_c" 1>&6
11776 else
11777   cat > conftest.$ac_ext <<EOF
11778 #line 11779 "configure"
11779 #include "confdefs.h"
11780 /* System header to define __stub macros and hopefully few prototypes,
11781     which can conflict with char $ac_func(); below.  */
11782 #include <assert.h>
11783 /* Override any gcc2 internal prototype to avoid an error.  */
11784 /* We use char because int might match the return type of a gcc2
11785     builtin and then its argument prototype would still apply.  */
11786 char $ac_func();
11787
11788 int main() {
11789
11790 /* The GNU C library defines this for functions which it implements
11791     to always fail with ENOSYS.  Some functions are actually named
11792     something starting with __ and the normal name is an alias.  */
11793 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11794 choke me
11795 #else
11796 $ac_func();
11797 #endif
11798
11799 ; return 0; }
11800 EOF
11801 if { (eval echo configure:11802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11802   rm -rf conftest*
11803   eval "ac_cv_func_$ac_func=yes"
11804 else
11805   echo "configure: failed program was:" >&5
11806   cat conftest.$ac_ext >&5
11807   rm -rf conftest*
11808   eval "ac_cv_func_$ac_func=no"
11809 fi
11810 rm -f conftest*
11811 fi
11812
11813 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11814   echo "$ac_t""yes" 1>&6
11815     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11816   cat >> confdefs.h <<EOF
11817 #define $ac_tr_func 1
11818 EOF
11819  
11820 else
11821   echo "$ac_t""no" 1>&6
11822 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
11823 fi
11824 done
11825
11826
11827
11828 # Check Configuration
11829
11830 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
11831 echo "configure:11832: checking declaration of sys_errlist" >&5
11832 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
11833   echo $ac_n "(cached) $ac_c" 1>&6
11834 else
11835   
11836         cat > conftest.$ac_ext <<EOF
11837 #line 11838 "configure"
11838 #include "confdefs.h"
11839
11840 #include <stdio.h>
11841 #include <sys/types.h>
11842 #include <errno.h> 
11843 int main() {
11844 char *c = (char *) *sys_errlist
11845 ; return 0; }
11846 EOF
11847 if { (eval echo configure:11848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11848   rm -rf conftest*
11849   ol_cv_dcl_sys_errlist=yes
11850 else
11851   echo "configure: failed program was:" >&5
11852   cat conftest.$ac_ext >&5
11853   rm -rf conftest*
11854   ol_cv_dcl_sys_errlist=no
11855 fi
11856 rm -f conftest*
11857 fi
11858
11859 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
11860 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
11861 if test $ol_cv_dcl_sys_errlist = no ; then
11862         cat >> confdefs.h <<\EOF
11863 #define DECL_SYS_ERRLIST 1
11864 EOF
11865
11866         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
11867 echo "configure:11868: checking existence of sys_errlist" >&5
11868         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
11869   echo $ac_n "(cached) $ac_c" 1>&6
11870 else
11871   
11872                 cat > conftest.$ac_ext <<EOF
11873 #line 11874 "configure"
11874 #include "confdefs.h"
11875 #include <errno.h>
11876 int main() {
11877 char *c = (char *) *sys_errlist
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   ol_cv_have_sys_errlist=yes
11883 else
11884   echo "configure: failed program was:" >&5
11885   cat conftest.$ac_ext >&5
11886   rm -rf conftest*
11887   ol_cv_have_sys_errlist=no
11888 fi
11889 rm -f conftest*
11890 fi
11891
11892         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
11893         if test $ol_cv_have_sys_errlist = yes ; then
11894                 cat >> confdefs.h <<\EOF
11895 #define HAVE_SYS_ERRLIST 1
11896 EOF
11897
11898         fi
11899 fi
11900
11901
11902
11903 if test "$ol_enable_debug" != no ; then
11904         cat >> confdefs.h <<\EOF
11905 #define LDAP_DEBUG 1
11906 EOF
11907
11908 fi
11909 if test "$ol_enable_syslog" = yes ; then
11910         cat >> confdefs.h <<\EOF
11911 #define LDAP_SYSLOG 1
11912 EOF
11913
11914 fi
11915 if test "$ol_enable_libui" = yes ; then
11916         cat >> confdefs.h <<\EOF
11917 #define LDAP_LIBUI 1
11918 EOF
11919
11920 fi
11921 if test "$ol_enable_cache" = no ; then
11922         cat >> confdefs.h <<\EOF
11923 #define LDAP_NOCACHE 1
11924 EOF
11925
11926 fi
11927 if test "$ol_enable_dns" != no ; then
11928         cat >> confdefs.h <<\EOF
11929 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
11930 EOF
11931
11932 fi
11933 if test "$ol_enable_proctitle" != no ; then
11934         cat >> confdefs.h <<\EOF
11935 #define LDAP_PROCTITLE 1
11936 EOF
11937
11938 fi
11939 if test "$ol_enable_referrals" != no ; then
11940         cat >> confdefs.h <<\EOF
11941 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
11942 EOF
11943
11944 fi
11945 if test "$ol_enable_cldap" != no ; then
11946         cat >> confdefs.h <<\EOF
11947 #define LDAP_CONNECTIONLESS 1
11948 EOF
11949
11950 fi
11951
11952 if test "$ol_enable_aclgroups" != no ; then
11953         cat >> confdefs.h <<\EOF
11954 #define SLAPD_ACLGROUPS 1
11955 EOF
11956
11957 fi
11958 if test "$ol_enable_crypt" != no ; then
11959         cat >> confdefs.h <<\EOF
11960 #define SLAPD_CRYPT 1
11961 EOF
11962
11963 fi
11964 if test "$ol_enable_cleartext" != no ; then
11965         cat >> confdefs.h <<\EOF
11966 #define SLAPD_CLEARTEXT 1
11967 EOF
11968
11969 fi
11970 if test "$ol_enable_phonetic" != no ; then
11971         cat >> confdefs.h <<\EOF
11972 #define SLAPD_PHONETIC 1
11973 EOF
11974
11975 fi
11976 if test "$ol_enable_rlookups" != no ; then
11977         cat >> confdefs.h <<\EOF
11978 #define SLAPD_RLOOKUPS 1
11979 EOF
11980
11981 fi
11982
11983 if test "$ol_link_modules" != no ; then
11984         cat >> confdefs.h <<\EOF
11985 #define SLAPD_MODULES 1
11986 EOF
11987
11988         BUILD_SLAPD=yes
11989 fi
11990
11991 if test "$ol_link_bdb2" != no ; then
11992         cat >> confdefs.h <<\EOF
11993 #define SLAPD_BDB2 1
11994 EOF
11995
11996         BUILD_SLAPD=yes
11997         BUILD_BDB2=yes
11998         if test "$ol_with_bdb2_module" != static ; then
11999                 cat >> confdefs.h <<\EOF
12000 #define SLAPD_BDB2_DYNAMIC 1
12001 EOF
12002
12003                 BUILD_BDB2_DYNAMIC=yes
12004         fi
12005 fi
12006
12007 if test "$ol_enable_ldap" != no ; then
12008         cat >> confdefs.h <<\EOF
12009 #define SLAPD_LDAP 1
12010 EOF
12011
12012         BUILD_SLAPD=yes
12013         BUILD_LDAP=yes
12014         if test "$ol_with_ldap_module" != static ; then
12015                 cat >> confdefs.h <<\EOF
12016 #define SLAPD_LDAP_DYNAMIC 1
12017 EOF
12018
12019                 BUILD_LDAP_DYNAMIC=yes
12020         fi
12021 fi
12022
12023 if test "$ol_link_ldbm" != no ; then
12024         cat >> confdefs.h <<\EOF
12025 #define SLAPD_LDBM 1
12026 EOF
12027
12028         BUILD_SLAPD=yes
12029         BUILD_LDBM=yes
12030         if test "$ol_with_ldbm_module" != static ; then
12031                 cat >> confdefs.h <<\EOF
12032 #define SLAPD_LDBM_DYNAMIC 1
12033 EOF
12034
12035                 BUILD_LDBM_DYNAMIC=yes
12036         fi
12037 fi
12038
12039 if test "$ol_enable_passwd" != no ; then
12040         cat >> confdefs.h <<\EOF
12041 #define SLAPD_PASSWD 1
12042 EOF
12043
12044         BUILD_SLAPD=yes
12045         BUILD_PASSWD=yes
12046         if test "$ol_with_passwd_module" != static ; then
12047                 cat >> confdefs.h <<\EOF
12048 #define SLAPD_PASSWD_DYNAMIC 1
12049 EOF
12050
12051                 BUILD_PASSWD_DYNAMIC=yes
12052         fi
12053 fi
12054
12055 if test "$ol_link_perl" != no ; then
12056         cat >> confdefs.h <<\EOF
12057 #define SLAPD_PERL 1
12058 EOF
12059
12060         BUILD_SLAPD=yes
12061         BUILD_PERL=yes
12062         if test "$ol_with_perl_module" != static ; then
12063                 cat >> confdefs.h <<\EOF
12064 #define SLAPD_PERL_DYNAMIC 1
12065 EOF
12066
12067                 BUILD_PERL_DYNAMIC=yes
12068         fi
12069 fi
12070
12071 if test "$ol_enable_shell" != no ; then
12072         cat >> confdefs.h <<\EOF
12073 #define SLAPD_SHELL 1
12074 EOF
12075
12076         BUILD_SLAPD=yes
12077         BUILD_SHELL=yes
12078         if test "$ol_with_shell_module" != static ; then
12079                 cat >> confdefs.h <<\EOF
12080 #define SLAPD_SHELL_DYNAMIC 1
12081 EOF
12082
12083                 BUILD_SHELL_DYNAMIC=yes
12084         fi
12085 fi
12086
12087 if test "$ol_enable_tcl" != no ; then
12088         cat >> confdefs.h <<\EOF
12089 #define SLAPD_TCL 1
12090 EOF
12091
12092         BUILD_SLAPD=yes
12093         BUILD_TCL=yes
12094         if test "$ol_with_tcl_module" != static; then
12095                 cat >> confdefs.h <<\EOF
12096 #define SLAPD_TCL_DYNAMIC 1
12097 EOF
12098
12099                 BUILD_TCL_DYNAMIC=yes
12100         fi
12101 fi
12102
12103 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12104         $BUILD_SLAPD = yes ; then
12105         BUILD_SLURPD=yes
12106 fi
12107
12108 if test "$ol_link_isode" != no ; then
12109         BUILD_LDAPD=yes
12110 fi
12111
12112
12113
12114
12115   
12116   
12117   
12118   
12119   
12120   
12121   
12122   
12123   
12124   
12125   
12126   
12127   
12128   
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151 trap '' 1 2 15
12152
12153 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12154
12155 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12156 # Let make expand exec_prefix.
12157 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12158
12159 # Any assignment to VPATH causes Sun make to only execute
12160 # the first set of double-colon rules, so remove it if not needed.
12161 # If there is a colon in the path, we need to keep it.
12162 if test "x$srcdir" = x.; then
12163   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12164 fi
12165
12166 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12167
12168 DEFS=-DHAVE_CONFIG_H
12169
12170 # Without the "./", some shells look in PATH for config.status.
12171 : ${CONFIG_STATUS=./config.status}
12172
12173 echo creating $CONFIG_STATUS
12174 rm -f $CONFIG_STATUS
12175 cat > $CONFIG_STATUS <<EOF
12176 #! /bin/sh
12177 # Generated automatically by configure.
12178 # Run this file to recreate the current configuration.
12179 # This directory was configured as follows,
12180 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12181 #
12182 # $0 $ac_configure_args
12183 #
12184 # Compiler output produced by configure, useful for debugging
12185 # configure, is in ./config.log if it exists.
12186
12187 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12188 for ac_option
12189 do
12190   case "\$ac_option" in
12191   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12192     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12193     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12194   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12195     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12196     exit 0 ;;
12197   -help | --help | --hel | --he | --h)
12198     echo "\$ac_cs_usage"; exit 0 ;;
12199   *) echo "\$ac_cs_usage"; exit 1 ;;
12200   esac
12201 done
12202
12203 ac_given_srcdir=$srcdir
12204 ac_given_INSTALL="$INSTALL"
12205
12206 trap 'rm -fr `echo "\
12207 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12208 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12209 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12210 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12211 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12212 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12213 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12214 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12215 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12216 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12217 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12218 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12219 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12220 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12221 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12222 include/Makefile:build/top.mk:include/Makefile.in \
12223 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12224 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12225 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12226 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12227 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12228 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12229 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12230 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12231 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12232 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12233 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12234 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12235 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12236 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12237 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12238 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12239 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12240 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12241 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12242 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12243 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12244 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12245 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12246 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12247 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12248 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12249  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12250 EOF
12251 cat >> $CONFIG_STATUS <<EOF
12252
12253 # Protect against being on the right side of a sed subst in config.status.
12254 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12255  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12256 $ac_vpsub
12257 $extrasub
12258 s%@SHELL@%$SHELL%g
12259 s%@CFLAGS@%$CFLAGS%g
12260 s%@CPPFLAGS@%$CPPFLAGS%g
12261 s%@CXXFLAGS@%$CXXFLAGS%g
12262 s%@FFLAGS@%$FFLAGS%g
12263 s%@DEFS@%$DEFS%g
12264 s%@LDFLAGS@%$LDFLAGS%g
12265 s%@LIBS@%$LIBS%g
12266 s%@exec_prefix@%$exec_prefix%g
12267 s%@prefix@%$prefix%g
12268 s%@program_transform_name@%$program_transform_name%g
12269 s%@bindir@%$bindir%g
12270 s%@sbindir@%$sbindir%g
12271 s%@libexecdir@%$libexecdir%g
12272 s%@datadir@%$datadir%g
12273 s%@sysconfdir@%$sysconfdir%g
12274 s%@sharedstatedir@%$sharedstatedir%g
12275 s%@localstatedir@%$localstatedir%g
12276 s%@libdir@%$libdir%g
12277 s%@includedir@%$includedir%g
12278 s%@oldincludedir@%$oldincludedir%g
12279 s%@infodir@%$infodir%g
12280 s%@mandir@%$mandir%g
12281 s%@host@%$host%g
12282 s%@host_alias@%$host_alias%g
12283 s%@host_cpu@%$host_cpu%g
12284 s%@host_vendor@%$host_vendor%g
12285 s%@host_os@%$host_os%g
12286 s%@target@%$target%g
12287 s%@target_alias@%$target_alias%g
12288 s%@target_cpu@%$target_cpu%g
12289 s%@target_vendor@%$target_vendor%g
12290 s%@target_os@%$target_os%g
12291 s%@build@%$build%g
12292 s%@build_alias@%$build_alias%g
12293 s%@build_cpu@%$build_cpu%g
12294 s%@build_vendor@%$build_vendor%g
12295 s%@build_os@%$build_os%g
12296 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12297 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12298 s%@INSTALL_DATA@%$INSTALL_DATA%g
12299 s%@PACKAGE@%$PACKAGE%g
12300 s%@VERSION@%$VERSION%g
12301 s%@ACLOCAL@%$ACLOCAL%g
12302 s%@AUTOCONF@%$AUTOCONF%g
12303 s%@AUTOMAKE@%$AUTOMAKE%g
12304 s%@AUTOHEADER@%$AUTOHEADER%g
12305 s%@MAKEINFO@%$MAKEINFO%g
12306 s%@SET_MAKE@%$SET_MAKE%g
12307 s%@top_builddir@%$top_builddir%g
12308 s%@ldap_subdir@%$ldap_subdir%g
12309 s%@CC@%$CC%g
12310 s%@RANLIB@%$RANLIB%g
12311 s%@LD@%$LD%g
12312 s%@NM@%$NM%g
12313 s%@LN_S@%$LN_S%g
12314 s%@LIBTOOL@%$LIBTOOL%g
12315 s%@AWK@%$AWK%g
12316 s%@LN_H@%$LN_H%g
12317 s%@SENDMAIL@%$SENDMAIL%g
12318 s%@EDITOR@%$EDITOR%g
12319 s%@FINGER@%$FINGER%g
12320 s%@GLIBCONFIG@%$GLIBCONFIG%g
12321 s%@PERLBIN@%$PERLBIN%g
12322 s%@CPP@%$CPP%g
12323 s%@EXEEXT@%$EXEEXT%g
12324 s%@OBJEXT@%$OBJEXT%g
12325 s%@OL_MKDEP@%$OL_MKDEP%g
12326 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
12327 s%@PEPSY@%$PEPSY%g
12328 s%@LIBOBJS@%$LIBOBJS%g
12329 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
12330 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
12331 s%@BUILD_BDB2@%$BUILD_BDB2%g
12332 s%@BUILD_LDAP@%$BUILD_LDAP%g
12333 s%@BUILD_LDBM@%$BUILD_LDBM%g
12334 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
12335 s%@BUILD_PERL@%$BUILD_PERL%g
12336 s%@BUILD_SHELL@%$BUILD_SHELL%g
12337 s%@BUILD_TCL@%$BUILD_TCL%g
12338 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
12339 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
12340 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
12341 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
12342 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
12343 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
12344 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
12345 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
12346 s%@LDAP_LIBS@%$LDAP_LIBS%g
12347 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
12348 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
12349 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
12350 s%@LDBM_LIBS@%$LDBM_LIBS%g
12351 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
12352 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
12353 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
12354 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
12355 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
12356 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
12357 s%@KRB_LIBS@%$KRB_LIBS%g
12358 s%@READLINE_LIBS@%$READLINE_LIBS%g
12359 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
12360 s%@TLS_LIBS@%$TLS_LIBS%g
12361
12362 CEOF
12363 EOF
12364
12365 cat >> $CONFIG_STATUS <<\EOF
12366
12367 # Split the substitutions into bite-sized pieces for seds with
12368 # small command number limits, like on Digital OSF/1 and HP-UX.
12369 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12370 ac_file=1 # Number of current file.
12371 ac_beg=1 # First line for current file.
12372 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12373 ac_more_lines=:
12374 ac_sed_cmds=""
12375 while $ac_more_lines; do
12376   if test $ac_beg -gt 1; then
12377     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12378   else
12379     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12380   fi
12381   if test ! -s conftest.s$ac_file; then
12382     ac_more_lines=false
12383     rm -f conftest.s$ac_file
12384   else
12385     if test -z "$ac_sed_cmds"; then
12386       ac_sed_cmds="sed -f conftest.s$ac_file"
12387     else
12388       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12389     fi
12390     ac_file=`expr $ac_file + 1`
12391     ac_beg=$ac_end
12392     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12393   fi
12394 done
12395 if test -z "$ac_sed_cmds"; then
12396   ac_sed_cmds=cat
12397 fi
12398 EOF
12399
12400 cat >> $CONFIG_STATUS <<EOF
12401
12402 CONFIG_FILES=\${CONFIG_FILES-"\
12403 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12404 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12405 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12406 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12407 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12408 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12409 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12410 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12411 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12412 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12413 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12414 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12415 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12416 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12417 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12418 include/Makefile:build/top.mk:include/Makefile.in \
12419 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12420 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12421 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12422 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12423 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12424 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12425 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12426 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12427 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12428 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12429 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12430 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12431 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12432 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12433 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12434 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12435 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12436 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12437 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12438 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12439 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12440 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12441 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12442 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12443 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12444 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12445 "}
12446 EOF
12447 cat >> $CONFIG_STATUS <<\EOF
12448 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12449   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12450   case "$ac_file" in
12451   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12452        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12453   *) ac_file_in="${ac_file}.in" ;;
12454   esac
12455
12456   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12457
12458   # Remove last slash and all that follows it.  Not all systems have dirname.
12459   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12460   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12461     # The file is in a subdirectory.
12462     test ! -d "$ac_dir" && mkdir "$ac_dir"
12463     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12464     # A "../" for each directory in $ac_dir_suffix.
12465     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12466   else
12467     ac_dir_suffix= ac_dots=
12468   fi
12469
12470   case "$ac_given_srcdir" in
12471   .)  srcdir=.
12472       if test -z "$ac_dots"; then top_srcdir=.
12473       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12474   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12475   *) # Relative path.
12476     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12477     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12478   esac
12479
12480   case "$ac_given_INSTALL" in
12481   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12482   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12483   esac
12484
12485   echo creating "$ac_file"
12486   rm -f "$ac_file"
12487   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12488   case "$ac_file" in
12489   *Makefile*) ac_comsub="1i\\
12490 # $configure_input" ;;
12491   *) ac_comsub= ;;
12492   esac
12493
12494   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12495   sed -e "$ac_comsub
12496 s%@configure_input@%$configure_input%g
12497 s%@srcdir@%$srcdir%g
12498 s%@top_srcdir@%$top_srcdir%g
12499 s%@INSTALL@%$INSTALL%g
12500 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12501 fi; done
12502 rm -f conftest.s*
12503
12504 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12505 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12506 #
12507 # ac_d sets the value in "#define NAME VALUE" lines.
12508 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12509 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12510 ac_dC='\3'
12511 ac_dD='%g'
12512 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12513 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12514 ac_uB='\([      ]\)%\1#\2define\3'
12515 ac_uC=' '
12516 ac_uD='\4%g'
12517 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12518 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12519 ac_eB='$%\1#\2define\3'
12520 ac_eC=' '
12521 ac_eD='%g'
12522
12523 if test "${CONFIG_HEADERS+set}" != set; then
12524 EOF
12525 cat >> $CONFIG_STATUS <<EOF
12526   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
12527 EOF
12528 cat >> $CONFIG_STATUS <<\EOF
12529 fi
12530 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12531   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12532   case "$ac_file" in
12533   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12534        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12535   *) ac_file_in="${ac_file}.in" ;;
12536   esac
12537
12538   echo creating $ac_file
12539
12540   rm -f conftest.frag conftest.in conftest.out
12541   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12542   cat $ac_file_inputs > conftest.in
12543
12544 EOF
12545
12546 # Transform confdefs.h into a sed script conftest.vals that substitutes
12547 # the proper values into config.h.in to produce config.h.  And first:
12548 # Protect against being on the right side of a sed subst in config.status.
12549 # Protect against being in an unquoted here document in config.status.
12550 rm -f conftest.vals
12551 cat > conftest.hdr <<\EOF
12552 s/[\\&%]/\\&/g
12553 s%[\\$`]%\\&%g
12554 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12555 s%ac_d%ac_u%gp
12556 s%ac_u%ac_e%gp
12557 EOF
12558 sed -n -f conftest.hdr confdefs.h > conftest.vals
12559 rm -f conftest.hdr
12560
12561 # This sed command replaces #undef with comments.  This is necessary, for
12562 # example, in the case of _POSIX_SOURCE, which is predefined and required
12563 # on some systems where configure will not decide to define it.
12564 cat >> conftest.vals <<\EOF
12565 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12566 EOF
12567
12568 # Break up conftest.vals because some shells have a limit on
12569 # the size of here documents, and old seds have small limits too.
12570
12571 rm -f conftest.tail
12572 while :
12573 do
12574   ac_lines=`grep -c . conftest.vals`
12575   # grep -c gives empty output for an empty file on some AIX systems.
12576   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12577   # Write a limited-size here document to conftest.frag.
12578   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12579   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12580   echo 'CEOF
12581   sed -f conftest.frag conftest.in > conftest.out
12582   rm -f conftest.in
12583   mv conftest.out conftest.in
12584 ' >> $CONFIG_STATUS
12585   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12586   rm -f conftest.vals
12587   mv conftest.tail conftest.vals
12588 done
12589 rm -f conftest.vals
12590
12591 cat >> $CONFIG_STATUS <<\EOF
12592   rm -f conftest.frag conftest.h
12593   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12594   cat conftest.in >> conftest.h
12595   rm -f conftest.in
12596   if cmp -s $ac_file conftest.h 2>/dev/null; then
12597     echo "$ac_file is unchanged"
12598     rm -f conftest.h
12599   else
12600     # Remove last slash and all that follows it.  Not all systems have dirname.
12601       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12602       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12603       # The file is in a subdirectory.
12604       test ! -d "$ac_dir" && mkdir "$ac_dir"
12605     fi
12606     rm -f $ac_file
12607     mv conftest.h $ac_file
12608   fi
12609 fi; done
12610
12611 EOF
12612 cat >> $CONFIG_STATUS <<EOF
12613
12614 EOF
12615 cat >> $CONFIG_STATUS <<\EOF
12616
12617 date > stamp-h
12618 echo Please \"make depend\" to build dependencies
12619
12620 exit 0
12621 EOF
12622 chmod +x $CONFIG_STATUS
12623 rm -fr confdefs* $ac_clean_files
12624 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
12625