]> git.sur5r.net Git - openldap/blob - configure
Fix typo "CC" -> "$CC" in AIX cc_r detection
[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-cleartext  enable cleartext passwords (yes)"
55 ac_help="$ac_help
56     --enable-crypt      enable crypt(3) passwords (auto)"
57 ac_help="$ac_help
58     --enable-modules    enable dynamic module support (no)"
59 ac_help="$ac_help
60     --enable-phonetic   enable phonetic/soundex (no)"
61 ac_help="$ac_help
62     --enable-rlookups   enable reverse lookups (auto)"
63 ac_help="$ac_help
64     --enable-wrappers   enable tcp wrapper support (no)"
65 ac_help="$ac_help
66     --enable-bdb2       enable bdb2 backend (no)"
67 ac_help="$ac_help
68       --with-bdb2-module        module type (static)"
69 ac_help="$ac_help
70     --enable-ldap       enable ldap backend (no)"
71 ac_help="$ac_help
72       --with-ldap-module        module type (static)"
73 ac_help="$ac_help
74     --enable-ldbm       enable ldbm backend (yes)"
75 ac_help="$ac_help
76       --with-ldbm-module        module type (static)"
77 ac_help="$ac_help
78       --with-ldbm-api   use LDBM API (auto)"
79 ac_help="$ac_help
80       --with-ldbm-type  use LDBM type (auto)"
81 ac_help="$ac_help
82     --enable-passwd     enable passwd backend (no)"
83 ac_help="$ac_help
84       --with-passwd-module      module type (static)"
85 ac_help="$ac_help
86     --enable-perl       enable perl backend (no)"
87 ac_help="$ac_help
88       --with-perl-module        module type (static)"
89 ac_help="$ac_help
90     --enable-shell      enable shell backend (no)"
91 ac_help="$ac_help
92       --with-shell-module       module type (static)"
93 ac_help="$ac_help
94     --enable-tcl        enable tcl backend (no)"
95 ac_help="$ac_help
96       --with-tcl-module module type (static)"
97 ac_help="$ac_help
98 SLURPD Options:"
99 ac_help="$ac_help
100   --enable-slurpd       enable building slurpd (auto)"
101 ac_help="$ac_help
102 Library Generation & Linking Options"
103 ac_help="$ac_help
104   --enable-static         build static libraries [default=yes]
105   --enable-static=PKGS    only build shared libraries if the current package
106                           appears as an element in the PKGS list"
107 ac_help="$ac_help
108   --enable-shared         build shared libraries [default=yes]
109   --enable-shared=PKGS    only build shared libraries if the current package
110                           appears as an element in the PKGS list"
111 ac_help="$ac_help
112   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
113
114 # Initialize some variables set by options.
115 # The variables have the same names as the options, with
116 # dashes changed to underlines.
117 build=NONE
118 cache_file=./config.cache
119 exec_prefix=NONE
120 host=NONE
121 no_create=
122 nonopt=NONE
123 no_recursion=
124 prefix=NONE
125 program_prefix=NONE
126 program_suffix=NONE
127 program_transform_name=s,x,x,
128 silent=
129 site=
130 srcdir=
131 target=NONE
132 verbose=
133 x_includes=NONE
134 x_libraries=NONE
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datadir='${prefix}/share'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${prefix}/info'
146 mandir='${prefix}/man'
147
148 # Initialize some other variables.
149 subdirs=
150 MFLAGS= MAKEFLAGS=
151 SHELL=${CONFIG_SHELL-/bin/sh}
152 # Maximum number of lines to put in a shell here document.
153 ac_max_here_lines=12
154
155 ac_prev=
156 for ac_option
157 do
158
159   # If the previous option needs an argument, assign it.
160   if test -n "$ac_prev"; then
161     eval "$ac_prev=\$ac_option"
162     ac_prev=
163     continue
164   fi
165
166   case "$ac_option" in
167   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
168   *) ac_optarg= ;;
169   esac
170
171   # Accept the important Cygnus configure options, so we can diagnose typos.
172
173   case "$ac_option" in
174
175   -bindir | --bindir | --bindi | --bind | --bin | --bi)
176     ac_prev=bindir ;;
177   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
178     bindir="$ac_optarg" ;;
179
180   -build | --build | --buil | --bui | --bu)
181     ac_prev=build ;;
182   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
183     build="$ac_optarg" ;;
184
185   -cache-file | --cache-file | --cache-fil | --cache-fi \
186   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
187     ac_prev=cache_file ;;
188   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
189   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
190     cache_file="$ac_optarg" ;;
191
192   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
193     ac_prev=datadir ;;
194   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
195   | --da=*)
196     datadir="$ac_optarg" ;;
197
198   -disable-* | --disable-*)
199     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
200     # Reject names that are not valid shell variable names.
201     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
202       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
203     fi
204     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
205     eval "enable_${ac_feature}=no" ;;
206
207   -enable-* | --enable-*)
208     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
209     # Reject names that are not valid shell variable names.
210     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
211       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
212     fi
213     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
214     case "$ac_option" in
215       *=*) ;;
216       *) ac_optarg=yes ;;
217     esac
218     eval "enable_${ac_feature}='$ac_optarg'" ;;
219
220   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
221   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
222   | --exec | --exe | --ex)
223     ac_prev=exec_prefix ;;
224   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
225   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
226   | --exec=* | --exe=* | --ex=*)
227     exec_prefix="$ac_optarg" ;;
228
229   -gas | --gas | --ga | --g)
230     # Obsolete; use --with-gas.
231     with_gas=yes ;;
232
233   -help | --help | --hel | --he)
234     # Omit some internal or obsolete options to make the list less imposing.
235     # This message is too long to be a string in the A/UX 3.1 sh.
236     cat << EOF
237 Usage: configure [options] [host]
238 Options: [defaults in brackets after descriptions]
239 Configuration:
240   --cache-file=FILE       cache test results in FILE
241   --help                  print this message
242   --no-create             do not create output files
243   --quiet, --silent       do not print \`checking...' messages
244   --version               print the version of autoconf that created configure
245 Directory and file names:
246   --prefix=PREFIX         install architecture-independent files in PREFIX
247                           [$ac_default_prefix]
248   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
249                           [same as prefix]
250   --bindir=DIR            user executables in DIR [EPREFIX/bin]
251   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
252   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
253   --datadir=DIR           read-only architecture-independent data in DIR
254                           [PREFIX/share]
255   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
256   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
257                           [PREFIX/com]
258   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
259   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
260   --includedir=DIR        C header files in DIR [PREFIX/include]
261   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
262   --infodir=DIR           info documentation in DIR [PREFIX/info]
263   --mandir=DIR            man documentation in DIR [PREFIX/man]
264   --srcdir=DIR            find the sources in DIR [configure dir or ..]
265   --program-prefix=PREFIX prepend PREFIX to installed program names
266   --program-suffix=SUFFIX append SUFFIX to installed program names
267   --program-transform-name=PROGRAM
268                           run sed PROGRAM on installed program names
269 EOF
270     cat << EOF
271 Host type:
272   --build=BUILD           configure for building on BUILD [BUILD=HOST]
273   --host=HOST             configure for HOST [guessed]
274   --target=TARGET         configure for TARGET [TARGET=HOST]
275 Features and packages:
276   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
277   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
278   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
279   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
280   --x-includes=DIR        X include files are in DIR
281   --x-libraries=DIR       X library files are in DIR
282 EOF
283     if test -n "$ac_help"; then
284       echo "--enable and --with options recognized:$ac_help"
285     fi
286     exit 0 ;;
287
288   -host | --host | --hos | --ho)
289     ac_prev=host ;;
290   -host=* | --host=* | --hos=* | --ho=*)
291     host="$ac_optarg" ;;
292
293   -includedir | --includedir | --includedi | --included | --include \
294   | --includ | --inclu | --incl | --inc)
295     ac_prev=includedir ;;
296   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
297   | --includ=* | --inclu=* | --incl=* | --inc=*)
298     includedir="$ac_optarg" ;;
299
300   -infodir | --infodir | --infodi | --infod | --info | --inf)
301     ac_prev=infodir ;;
302   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
303     infodir="$ac_optarg" ;;
304
305   -libdir | --libdir | --libdi | --libd)
306     ac_prev=libdir ;;
307   -libdir=* | --libdir=* | --libdi=* | --libd=*)
308     libdir="$ac_optarg" ;;
309
310   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
311   | --libexe | --libex | --libe)
312     ac_prev=libexecdir ;;
313   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
314   | --libexe=* | --libex=* | --libe=*)
315     libexecdir="$ac_optarg" ;;
316
317   -localstatedir | --localstatedir | --localstatedi | --localstated \
318   | --localstate | --localstat | --localsta | --localst \
319   | --locals | --local | --loca | --loc | --lo)
320     ac_prev=localstatedir ;;
321   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
322   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
323   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
324     localstatedir="$ac_optarg" ;;
325
326   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
327     ac_prev=mandir ;;
328   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
329     mandir="$ac_optarg" ;;
330
331   -nfp | --nfp | --nf)
332     # Obsolete; use --without-fp.
333     with_fp=no ;;
334
335   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
336   | --no-cr | --no-c)
337     no_create=yes ;;
338
339   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
340   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
341     no_recursion=yes ;;
342
343   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
344   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
345   | --oldin | --oldi | --old | --ol | --o)
346     ac_prev=oldincludedir ;;
347   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
348   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
349   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
350     oldincludedir="$ac_optarg" ;;
351
352   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
353     ac_prev=prefix ;;
354   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
355     prefix="$ac_optarg" ;;
356
357   -program-prefix | --program-prefix | --program-prefi | --program-pref \
358   | --program-pre | --program-pr | --program-p)
359     ac_prev=program_prefix ;;
360   -program-prefix=* | --program-prefix=* | --program-prefi=* \
361   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
362     program_prefix="$ac_optarg" ;;
363
364   -program-suffix | --program-suffix | --program-suffi | --program-suff \
365   | --program-suf | --program-su | --program-s)
366     ac_prev=program_suffix ;;
367   -program-suffix=* | --program-suffix=* | --program-suffi=* \
368   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
369     program_suffix="$ac_optarg" ;;
370
371   -program-transform-name | --program-transform-name \
372   | --program-transform-nam | --program-transform-na \
373   | --program-transform-n | --program-transform- \
374   | --program-transform | --program-transfor \
375   | --program-transfo | --program-transf \
376   | --program-trans | --program-tran \
377   | --progr-tra | --program-tr | --program-t)
378     ac_prev=program_transform_name ;;
379   -program-transform-name=* | --program-transform-name=* \
380   | --program-transform-nam=* | --program-transform-na=* \
381   | --program-transform-n=* | --program-transform-=* \
382   | --program-transform=* | --program-transfor=* \
383   | --program-transfo=* | --program-transf=* \
384   | --program-trans=* | --program-tran=* \
385   | --progr-tra=* | --program-tr=* | --program-t=*)
386     program_transform_name="$ac_optarg" ;;
387
388   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
389   | -silent | --silent | --silen | --sile | --sil)
390     silent=yes ;;
391
392   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
393     ac_prev=sbindir ;;
394   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
395   | --sbi=* | --sb=*)
396     sbindir="$ac_optarg" ;;
397
398   -sharedstatedir | --sharedstatedir | --sharedstatedi \
399   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
400   | --sharedst | --shareds | --shared | --share | --shar \
401   | --sha | --sh)
402     ac_prev=sharedstatedir ;;
403   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
404   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
405   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
406   | --sha=* | --sh=*)
407     sharedstatedir="$ac_optarg" ;;
408
409   -site | --site | --sit)
410     ac_prev=site ;;
411   -site=* | --site=* | --sit=*)
412     site="$ac_optarg" ;;
413
414   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
415     ac_prev=srcdir ;;
416   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
417     srcdir="$ac_optarg" ;;
418
419   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
420   | --syscon | --sysco | --sysc | --sys | --sy)
421     ac_prev=sysconfdir ;;
422   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
423   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
424     sysconfdir="$ac_optarg" ;;
425
426   -target | --target | --targe | --targ | --tar | --ta | --t)
427     ac_prev=target ;;
428   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
429     target="$ac_optarg" ;;
430
431   -v | -verbose | --verbose | --verbos | --verbo | --verb)
432     verbose=yes ;;
433
434   -version | --version | --versio | --versi | --vers)
435     echo "configure generated by autoconf version 2.13"
436     exit 0 ;;
437
438   -with-* | --with-*)
439     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
440     # Reject names that are not valid shell variable names.
441     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
442       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
443     fi
444     ac_package=`echo $ac_package| sed 's/-/_/g'`
445     case "$ac_option" in
446       *=*) ;;
447       *) ac_optarg=yes ;;
448     esac
449     eval "with_${ac_package}='$ac_optarg'" ;;
450
451   -without-* | --without-*)
452     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
453     # Reject names that are not valid shell variable names.
454     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
455       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
456     fi
457     ac_package=`echo $ac_package| sed 's/-/_/g'`
458     eval "with_${ac_package}=no" ;;
459
460   --x)
461     # Obsolete; use --with-x.
462     with_x=yes ;;
463
464   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
465   | --x-incl | --x-inc | --x-in | --x-i)
466     ac_prev=x_includes ;;
467   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
468   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
469     x_includes="$ac_optarg" ;;
470
471   -x-libraries | --x-libraries | --x-librarie | --x-librari \
472   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
473     ac_prev=x_libraries ;;
474   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
475   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
476     x_libraries="$ac_optarg" ;;
477
478   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
479     ;;
480
481   *)
482     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
483       echo "configure: warning: $ac_option: invalid host type" 1>&2
484     fi
485     if test "x$nonopt" != xNONE; then
486       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
487     fi
488     nonopt="$ac_option"
489     ;;
490
491   esac
492 done
493
494 if test -n "$ac_prev"; then
495   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
496 fi
497
498 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
499
500 # File descriptor usage:
501 # 0 standard input
502 # 1 file creation
503 # 2 errors and warnings
504 # 3 some systems may open it to /dev/tty
505 # 4 used on the Kubota Titan
506 # 6 checking for... messages and results
507 # 5 compiler messages saved in config.log
508 if test "$silent" = yes; then
509   exec 6>/dev/null
510 else
511   exec 6>&1
512 fi
513 exec 5>./config.log
514
515 echo "\
516 This file contains any messages produced by compilers while
517 running configure, to aid debugging if configure makes a mistake.
518 " 1>&5
519
520 # Strip out --no-create and --no-recursion so they do not pile up.
521 # Also quote any args containing shell metacharacters.
522 ac_configure_args=
523 for ac_arg
524 do
525   case "$ac_arg" in
526   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
527   | --no-cr | --no-c) ;;
528   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
529   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
530   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
531   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
532   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
533   esac
534 done
535
536 # NLS nuisances.
537 # Only set these to C if already set.  These must not be set unconditionally
538 # because not all systems understand e.g. LANG=C (notably SCO).
539 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
540 # Non-C LC_CTYPE values break the ctype check.
541 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
542 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
543 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
544 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
545
546 # confdefs.h avoids OS command line length limits that DEFS can exceed.
547 rm -rf conftest* confdefs.h
548 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
549 echo > confdefs.h
550
551 # A filename unique to this package, relative to the directory that
552 # configure is in, which we can look for to find out if srcdir is correct.
553 ac_unique_file=build/version
554
555 # Find the source files, if location was not specified.
556 if test -z "$srcdir"; then
557   ac_srcdir_defaulted=yes
558   # Try the directory containing this script, then its parent.
559   ac_prog=$0
560   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
561   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
562   srcdir=$ac_confdir
563   if test ! -r $srcdir/$ac_unique_file; then
564     srcdir=..
565   fi
566 else
567   ac_srcdir_defaulted=no
568 fi
569 if test ! -r $srcdir/$ac_unique_file; then
570   if test "$ac_srcdir_defaulted" = yes; then
571     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
572   else
573     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
574   fi
575 fi
576 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
577
578 # Prefer explicitly selected file to automatically selected ones.
579 if test -z "$CONFIG_SITE"; then
580   if test "x$prefix" != xNONE; then
581     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
582   else
583     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
584   fi
585 fi
586 for ac_site_file in $CONFIG_SITE; do
587   if test -r "$ac_site_file"; then
588     echo "loading site script $ac_site_file"
589     . "$ac_site_file"
590   fi
591 done
592
593
594 ac_ext=c
595 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
596 ac_cpp='$CPP $CPPFLAGS'
597 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
598 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
599 cross_compiling=$ac_cv_prog_cc_cross
600
601 ac_exeext=
602 ac_objext=o
603 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
604   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
605   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
606     ac_n= ac_c='
607 ' ac_t='        '
608   else
609     ac_n=-n ac_c= ac_t=
610   fi
611 else
612   ac_n= ac_c='\c' ac_t=
613 fi
614
615 ac_aux_dir=
616 for ac_dir in build $srcdir/build; do
617   if test -f $ac_dir/install-sh; then
618     ac_aux_dir=$ac_dir
619     ac_install_sh="$ac_aux_dir/install-sh -c"
620     break
621   elif test -f $ac_dir/install.sh; then
622     ac_aux_dir=$ac_dir
623     ac_install_sh="$ac_aux_dir/install.sh -c"
624     break
625   fi
626 done
627 if test -z "$ac_aux_dir"; then
628   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
629 fi
630 ac_config_guess=$ac_aux_dir/config.guess
631 ac_config_sub=$ac_aux_dir/config.sub
632 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
633
634 OL_VERSION=`cat $ac_aux_dir/version`
635 if test -z "$OL_VERSION"; then
636         { echo "configure: error: could not determine version" 1>&2; exit 1; }
637 fi
638
639
640 # Do some error checking and defaulting for the host and target type.
641 # The inputs are:
642 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
643 #
644 # The rules are:
645 # 1. You are not allowed to specify --host, --target, and nonopt at the
646 #    same time.
647 # 2. Host defaults to nonopt.
648 # 3. If nonopt is not specified, then host defaults to the current host,
649 #    as determined by config.guess.
650 # 4. Target and build default to nonopt.
651 # 5. If nonopt is not specified, then target and build default to host.
652
653 # The aliases save the names the user supplied, while $host etc.
654 # will get canonicalized.
655 case $host---$target---$nonopt in
656 NONE---*---* | *---NONE---* | *---*---NONE) ;;
657 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
658 esac
659
660
661 # Make sure we can run config.sub.
662 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
663 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
664 fi
665
666 echo $ac_n "checking host system type""... $ac_c" 1>&6
667 echo "configure:668: checking host system type" >&5
668
669 host_alias=$host
670 case "$host_alias" in
671 NONE)
672   case $nonopt in
673   NONE)
674     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
675     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
676     fi ;;
677   *) host_alias=$nonopt ;;
678   esac ;;
679 esac
680
681 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
682 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
683 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
684 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
685 echo "$ac_t""$host" 1>&6
686
687 echo $ac_n "checking target system type""... $ac_c" 1>&6
688 echo "configure:689: checking target system type" >&5
689
690 target_alias=$target
691 case "$target_alias" in
692 NONE)
693   case $nonopt in
694   NONE) target_alias=$host_alias ;;
695   *) target_alias=$nonopt ;;
696   esac ;;
697 esac
698
699 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
700 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
701 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
702 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
703 echo "$ac_t""$target" 1>&6
704
705 echo $ac_n "checking build system type""... $ac_c" 1>&6
706 echo "configure:707: checking build system type" >&5
707
708 build_alias=$build
709 case "$build_alias" in
710 NONE)
711   case $nonopt in
712   NONE) build_alias=$host_alias ;;
713   *) build_alias=$nonopt ;;
714   esac ;;
715 esac
716
717 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
718 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
719 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
720 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
721 echo "$ac_t""$build" 1>&6
722
723 test "$host_alias" != "$target_alias" &&
724   test "$program_prefix$program_suffix$program_transform_name" = \
725     NONENONEs,x,x, &&
726   program_prefix=${target_alias}-
727
728
729 # Find a good install program.  We prefer a C program (faster),
730 # so one script is as good as another.  But avoid the broken or
731 # incompatible versions:
732 # SysV /etc/install, /usr/sbin/install
733 # SunOS /usr/etc/install
734 # IRIX /sbin/install
735 # AIX /bin/install
736 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
737 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
738 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
739 # ./install, which can be erroneously created by make from ./install.sh.
740 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
741 echo "configure:742: checking for a BSD compatible install" >&5
742 if test -z "$INSTALL"; then
743 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
744   echo $ac_n "(cached) $ac_c" 1>&6
745 else
746     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
747   for ac_dir in $PATH; do
748     # Account for people who put trailing slashes in PATH elements.
749     case "$ac_dir/" in
750     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
751     *)
752       # OSF1 and SCO ODT 3.0 have their own names for install.
753       # Don't use installbsd from OSF since it installs stuff as root
754       # by default.
755       for ac_prog in ginstall scoinst install; do
756         if test -f $ac_dir/$ac_prog; then
757           if test $ac_prog = install &&
758             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
759             # AIX install.  It has an incompatible calling convention.
760             :
761           else
762             ac_cv_path_install="$ac_dir/$ac_prog -c"
763             break 2
764           fi
765         fi
766       done
767       ;;
768     esac
769   done
770   IFS="$ac_save_IFS"
771
772 fi
773   if test "${ac_cv_path_install+set}" = set; then
774     INSTALL="$ac_cv_path_install"
775   else
776     # As a last resort, use the slow shell script.  We don't cache a
777     # path for INSTALL within a source directory, because that will
778     # break other packages using the cache if that directory is
779     # removed, or if the path is relative.
780     INSTALL="$ac_install_sh"
781   fi
782 fi
783 echo "$ac_t""$INSTALL" 1>&6
784
785 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
786 # It thinks the first close brace ends the variable substitution.
787 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
788
789 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
790
791 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
792
793 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
794 echo "configure:795: checking whether build environment is sane" >&5
795 # Just in case
796 sleep 1
797 echo timestamp > conftestfile
798 # Do `set' in a subshell so we don't clobber the current shell's
799 # arguments.  Must try -L first in case configure is actually a
800 # symlink; some systems play weird games with the mod time of symlinks
801 # (eg FreeBSD returns the mod time of the symlink's containing
802 # directory).
803 if (
804    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
805    if test "$*" = "X"; then
806       # -L didn't work.
807       set X `ls -t $srcdir/configure conftestfile`
808    fi
809    if test "$*" != "X $srcdir/configure conftestfile" \
810       && test "$*" != "X conftestfile $srcdir/configure"; then
811
812       # If neither matched, then we have a broken ls.  This can happen
813       # if, for instance, CONFIG_SHELL is bash and it inherits a
814       # broken ls alias from the environment.  This has actually
815       # happened.  Such a system could not be considered "sane".
816       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
817 alias in your environment" 1>&2; exit 1; }
818    fi
819
820    test "$2" = conftestfile
821    )
822 then
823    # Ok.
824    :
825 else
826    { echo "configure: error: newly created file is older than distributed files!
827 Check your system clock" 1>&2; exit 1; }
828 fi
829 rm -f conftest*
830 echo "$ac_t""yes" 1>&6
831 if test "$program_transform_name" = s,x,x,; then
832   program_transform_name=
833 else
834   # Double any \ or $.  echo might interpret backslashes.
835   cat <<\EOF_SED > conftestsed
836 s,\\,\\\\,g; s,\$,$$,g
837 EOF_SED
838   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
839   rm -f conftestsed
840 fi
841 test "$program_prefix" != NONE &&
842   program_transform_name="s,^,${program_prefix},; $program_transform_name"
843 # Use a double $ so make ignores it.
844 test "$program_suffix" != NONE &&
845   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
846
847 # sed with no file args requires a program.
848 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
849
850 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
851 echo "configure:852: checking whether ${MAKE-make} sets \${MAKE}" >&5
852 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
853 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
854   echo $ac_n "(cached) $ac_c" 1>&6
855 else
856   cat > conftestmake <<\EOF
857 all:
858         @echo 'ac_maketemp="${MAKE}"'
859 EOF
860 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
861 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
862 if test -n "$ac_maketemp"; then
863   eval ac_cv_prog_make_${ac_make}_set=yes
864 else
865   eval ac_cv_prog_make_${ac_make}_set=no
866 fi
867 rm -f conftestmake
868 fi
869 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
870   echo "$ac_t""yes" 1>&6
871   SET_MAKE=
872 else
873   echo "$ac_t""no" 1>&6
874   SET_MAKE="MAKE=${MAKE-make}"
875 fi
876
877
878 PACKAGE=OpenLDAP
879
880 VERSION=$OL_VERSION
881
882 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
883   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
884 fi
885
886
887
888 missing_dir=`cd $ac_aux_dir && pwd`
889 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
890 echo "configure:891: checking for working aclocal" >&5
891 # Run test in a subshell; some versions of sh will print an error if
892 # an executable is not found, even if stderr is redirected.
893 # Redirect stdin to placate older versions of autoconf.  Sigh.
894 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
895    ACLOCAL=aclocal
896    echo "$ac_t""found" 1>&6
897 else
898    ACLOCAL="$missing_dir/missing aclocal"
899    echo "$ac_t""missing" 1>&6
900 fi
901
902 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
903 echo "configure:904: checking for working autoconf" >&5
904 # Run test in a subshell; some versions of sh will print an error if
905 # an executable is not found, even if stderr is redirected.
906 # Redirect stdin to placate older versions of autoconf.  Sigh.
907 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
908    AUTOCONF=autoconf
909    echo "$ac_t""found" 1>&6
910 else
911    AUTOCONF="$missing_dir/missing autoconf"
912    echo "$ac_t""missing" 1>&6
913 fi
914
915 echo $ac_n "checking for working automake""... $ac_c" 1>&6
916 echo "configure:917: checking for working automake" >&5
917 # Run test in a subshell; some versions of sh will print an error if
918 # an executable is not found, even if stderr is redirected.
919 # Redirect stdin to placate older versions of autoconf.  Sigh.
920 if (automake --version) < /dev/null > /dev/null 2>&1; then
921    AUTOMAKE=automake
922    echo "$ac_t""found" 1>&6
923 else
924    AUTOMAKE="$missing_dir/missing automake"
925    echo "$ac_t""missing" 1>&6
926 fi
927
928 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
929 echo "configure:930: checking for working autoheader" >&5
930 # Run test in a subshell; some versions of sh will print an error if
931 # an executable is not found, even if stderr is redirected.
932 # Redirect stdin to placate older versions of autoconf.  Sigh.
933 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
934    AUTOHEADER=autoheader
935    echo "$ac_t""found" 1>&6
936 else
937    AUTOHEADER="$missing_dir/missing autoheader"
938    echo "$ac_t""missing" 1>&6
939 fi
940
941 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
942 echo "configure:943: checking for working makeinfo" >&5
943 # Run test in a subshell; some versions of sh will print an error if
944 # an executable is not found, even if stderr is redirected.
945 # Redirect stdin to placate older versions of autoconf.  Sigh.
946 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
947    MAKEINFO=makeinfo
948    echo "$ac_t""found" 1>&6
949 else
950    MAKEINFO="$missing_dir/missing makeinfo"
951    echo "$ac_t""missing" 1>&6
952 fi
953
954
955
956 cat >> confdefs.h <<EOF
957 #define OPENLDAP_PACKAGE "$PACKAGE"
958 EOF
959
960 cat >> confdefs.h <<EOF
961 #define OPENLDAP_VERSION "$VERSION"
962 EOF
963
964
965
966
967 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
968 echo "configure:969: checking configure arguments" >&5
969
970
971 top_builddir=`pwd`
972
973 cat >> confdefs.h <<\EOF
974 #define HAVE_MKVERSION 1
975 EOF
976
977
978 ldap_subdir="openldap"
979
980 # Check whether --with-subdir or --without-subdir was given.
981 if test "${with_subdir+set}" = set; then
982   withval="$with_subdir"
983   
984         if test "$withval" = "no"; then
985                 ldap_subdir=""
986         elif test "$withval" != "yes"; then
987                 ldap_subdir="$withval"
988         fi
989
990 fi
991
992
993 # OpenLDAP --enable-debug
994         # Check whether --enable-debug or --disable-debug was given.
995 if test "${enable_debug+set}" = set; then
996   enableval="$enable_debug"
997   
998         ol_arg=invalid
999         for ol_val in auto yes no ; do
1000                 if test "$enableval" = "$ol_val" ; then
1001                         ol_arg="$ol_val"
1002                 fi
1003         done
1004         if test "$ol_arg" = "invalid" ; then
1005                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1006         fi
1007         ol_enable_debug="$ol_arg"
1008
1009 else
1010         ol_enable_debug="yes"
1011 fi
1012 # end --enable-debug
1013 # OpenLDAP --enable-syslog
1014         # Check whether --enable-syslog or --disable-syslog was given.
1015 if test "${enable_syslog+set}" = set; then
1016   enableval="$enable_syslog"
1017   
1018         ol_arg=invalid
1019         for ol_val in auto yes no ; do
1020                 if test "$enableval" = "$ol_val" ; then
1021                         ol_arg="$ol_val"
1022                 fi
1023         done
1024         if test "$ol_arg" = "invalid" ; then
1025                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1026         fi
1027         ol_enable_syslog="$ol_arg"
1028
1029 else
1030         ol_enable_syslog="auto"
1031 fi
1032 # end --enable-syslog
1033 # OpenLDAP --enable-proctitle
1034         # Check whether --enable-proctitle or --disable-proctitle was given.
1035 if test "${enable_proctitle+set}" = set; then
1036   enableval="$enable_proctitle"
1037   
1038         ol_arg=invalid
1039         for ol_val in auto yes no ; do
1040                 if test "$enableval" = "$ol_val" ; then
1041                         ol_arg="$ol_val"
1042                 fi
1043         done
1044         if test "$ol_arg" = "invalid" ; then
1045                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1046         fi
1047         ol_enable_proctitle="$ol_arg"
1048
1049 else
1050         ol_enable_proctitle="yes"
1051 fi
1052 # end --enable-proctitle
1053 # OpenLDAP --enable-cache
1054         # Check whether --enable-cache or --disable-cache was given.
1055 if test "${enable_cache+set}" = set; then
1056   enableval="$enable_cache"
1057   
1058         ol_arg=invalid
1059         for ol_val in auto yes no ; do
1060                 if test "$enableval" = "$ol_val" ; then
1061                         ol_arg="$ol_val"
1062                 fi
1063         done
1064         if test "$ol_arg" = "invalid" ; then
1065                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1066         fi
1067         ol_enable_cache="$ol_arg"
1068
1069 else
1070         ol_enable_cache="yes"
1071 fi
1072 # end --enable-cache
1073 # OpenLDAP --enable-dns
1074         # Check whether --enable-dns or --disable-dns was given.
1075 if test "${enable_dns+set}" = set; then
1076   enableval="$enable_dns"
1077   
1078         ol_arg=invalid
1079         for ol_val in auto yes no ; do
1080                 if test "$enableval" = "$ol_val" ; then
1081                         ol_arg="$ol_val"
1082                 fi
1083         done
1084         if test "$ol_arg" = "invalid" ; then
1085                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
1086         fi
1087         ol_enable_dns="$ol_arg"
1088
1089 else
1090         ol_enable_dns="no"
1091 fi
1092 # end --enable-dns
1093 # OpenLDAP --enable-referrals
1094         # Check whether --enable-referrals or --disable-referrals was given.
1095 if test "${enable_referrals+set}" = set; then
1096   enableval="$enable_referrals"
1097   
1098         ol_arg=invalid
1099         for ol_val in auto yes no ; do
1100                 if test "$enableval" = "$ol_val" ; then
1101                         ol_arg="$ol_val"
1102                 fi
1103         done
1104         if test "$ol_arg" = "invalid" ; then
1105                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1106         fi
1107         ol_enable_referrals="$ol_arg"
1108
1109 else
1110         ol_enable_referrals="yes"
1111 fi
1112 # end --enable-referrals
1113 # OpenLDAP --enable-cldap
1114         # Check whether --enable-cldap or --disable-cldap was given.
1115 if test "${enable_cldap+set}" = set; then
1116   enableval="$enable_cldap"
1117   
1118         ol_arg=invalid
1119         for ol_val in auto yes no ; do
1120                 if test "$enableval" = "$ol_val" ; then
1121                         ol_arg="$ol_val"
1122                 fi
1123         done
1124         if test "$ol_arg" = "invalid" ; then
1125                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1126         fi
1127         ol_enable_cldap="$ol_arg"
1128
1129 else
1130         ol_enable_cldap="no"
1131 fi
1132 # end --enable-cldap
1133 # OpenLDAP --enable-x_compile
1134         # Check whether --enable-x_compile or --disable-x_compile was given.
1135 if test "${enable_x_compile+set}" = set; then
1136   enableval="$enable_x_compile"
1137   
1138         ol_arg=invalid
1139         for ol_val in yes no ; do
1140                 if test "$enableval" = "$ol_val" ; then
1141                         ol_arg="$ol_val"
1142                 fi
1143         done
1144         if test "$ol_arg" = "invalid" ; then
1145                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1146         fi
1147         ol_enable_x_compile="$ol_arg"
1148
1149 else
1150         ol_enable_x_compile="no"
1151 fi
1152 # end --enable-x_compile
1153
1154 # OpenLDAP --enable-dmalloc
1155         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1156 if test "${enable_dmalloc+set}" = set; then
1157   enableval="$enable_dmalloc"
1158   
1159         ol_arg=invalid
1160         for ol_val in auto yes no ; do
1161                 if test "$enableval" = "$ol_val" ; then
1162                         ol_arg="$ol_val"
1163                 fi
1164         done
1165         if test "$ol_arg" = "invalid" ; then
1166                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1167         fi
1168         ol_enable_dmalloc="$ol_arg"
1169
1170 else
1171         ol_enable_dmalloc="no"
1172 fi
1173 # end --enable-dmalloc
1174
1175 # OpenLDAP --with-kerberos
1176         # Check whether --with-kerberos or --without-kerberos was given.
1177 if test "${with_kerberos+set}" = set; then
1178   withval="$with_kerberos"
1179   
1180         ol_arg=invalid
1181         for ol_val in auto k5 k4 afs yes no ; do
1182                 if test "$withval" = "$ol_val" ; then
1183                         ol_arg="$ol_val"
1184                 fi
1185         done
1186         if test "$ol_arg" = "invalid" ; then
1187                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1188         fi
1189         ol_with_kerberos="$ol_arg"
1190
1191 else
1192         ol_with_kerberos="auto"
1193 fi
1194 # end --with-kerberos
1195
1196 # OpenLDAP --with-readline
1197         # Check whether --with-readline or --without-readline was given.
1198 if test "${with_readline+set}" = set; then
1199   withval="$with_readline"
1200   
1201         ol_arg=invalid
1202         for ol_val in auto yes no  ; do
1203                 if test "$withval" = "$ol_val" ; then
1204                         ol_arg="$ol_val"
1205                 fi
1206         done
1207         if test "$ol_arg" = "invalid" ; then
1208                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1209         fi
1210         ol_with_readline="$ol_arg"
1211
1212 else
1213         ol_with_readline="auto"
1214 fi
1215 # end --with-readline
1216
1217 # OpenLDAP --with-threads
1218         # Check whether --with-threads or --without-threads was given.
1219 if test "${with_threads+set}" = set; then
1220   withval="$with_threads"
1221   
1222         ol_arg=invalid
1223         for ol_val in auto posix mach lwp yes no manual  ; do
1224                 if test "$withval" = "$ol_val" ; then
1225                         ol_arg="$ol_val"
1226                 fi
1227         done
1228         if test "$ol_arg" = "invalid" ; then
1229                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1230         fi
1231         ol_with_threads="$ol_arg"
1232
1233 else
1234         ol_with_threads="auto"
1235 fi
1236 # end --with-threads
1237
1238 # OpenLDAP --with-tls
1239         # Check whether --with-tls or --without-tls was given.
1240 if test "${with_tls+set}" = set; then
1241   withval="$with_tls"
1242   
1243         ol_arg=invalid
1244         for ol_val in auto ssleay openssl yes no  ; do
1245                 if test "$withval" = "$ol_val" ; then
1246                         ol_arg="$ol_val"
1247                 fi
1248         done
1249         if test "$ol_arg" = "invalid" ; then
1250                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1251         fi
1252         ol_with_tls="$ol_arg"
1253
1254 else
1255         ol_with_tls="auto"
1256 fi
1257 # end --with-tls
1258
1259 # OpenLDAP --with-yielding_select
1260         # Check whether --with-yielding_select or --without-yielding_select was given.
1261 if test "${with_yielding_select+set}" = set; then
1262   withval="$with_yielding_select"
1263   
1264         ol_arg=invalid
1265         for ol_val in auto yes no manual  ; do
1266                 if test "$withval" = "$ol_val" ; then
1267                         ol_arg="$ol_val"
1268                 fi
1269         done
1270         if test "$ol_arg" = "invalid" ; then
1271                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1272         fi
1273         ol_with_yielding_select="$ol_arg"
1274
1275 else
1276         ol_with_yielding_select="auto"
1277 fi
1278 # end --with-yielding_select
1279
1280
1281
1282 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1283 if test "${with_xxldapdoptions+set}" = set; then
1284   withval="$with_xxldapdoptions"
1285   :
1286 fi
1287
1288 # OpenLDAP --enable-ldapd
1289         # Check whether --enable-ldapd or --disable-ldapd was given.
1290 if test "${enable_ldapd+set}" = set; then
1291   enableval="$enable_ldapd"
1292   
1293         ol_arg=invalid
1294         for ol_val in auto yes no ; do
1295                 if test "$enableval" = "$ol_val" ; then
1296                         ol_arg="$ol_val"
1297                 fi
1298         done
1299         if test "$ol_arg" = "invalid" ; then
1300                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1301         fi
1302         ol_enable_ldapd="$ol_arg"
1303
1304 else
1305         ol_enable_ldapd="no"
1306 fi
1307 # end --enable-ldapd
1308
1309 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1310 if test "${with_xxslapdoptions+set}" = set; then
1311   withval="$with_xxslapdoptions"
1312   :
1313 fi
1314
1315 # OpenLDAP --enable-slapd
1316         # Check whether --enable-slapd or --disable-slapd was given.
1317 if test "${enable_slapd+set}" = set; then
1318   enableval="$enable_slapd"
1319   
1320         ol_arg=invalid
1321         for ol_val in auto yes no ; do
1322                 if test "$enableval" = "$ol_val" ; then
1323                         ol_arg="$ol_val"
1324                 fi
1325         done
1326         if test "$ol_arg" = "invalid" ; then
1327                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1328         fi
1329         ol_enable_slapd="$ol_arg"
1330
1331 else
1332         ol_enable_slapd="yes"
1333 fi
1334 # end --enable-slapd
1335 # OpenLDAP --enable-cleartext
1336         # Check whether --enable-cleartext or --disable-cleartext was given.
1337 if test "${enable_cleartext+set}" = set; then
1338   enableval="$enable_cleartext"
1339   
1340         ol_arg=invalid
1341         for ol_val in auto yes no ; do
1342                 if test "$enableval" = "$ol_val" ; then
1343                         ol_arg="$ol_val"
1344                 fi
1345         done
1346         if test "$ol_arg" = "invalid" ; then
1347                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1348         fi
1349         ol_enable_cleartext="$ol_arg"
1350
1351 else
1352         ol_enable_cleartext="yes"
1353 fi
1354 # end --enable-cleartext
1355 # OpenLDAP --enable-crypt
1356         # Check whether --enable-crypt or --disable-crypt was given.
1357 if test "${enable_crypt+set}" = set; then
1358   enableval="$enable_crypt"
1359   
1360         ol_arg=invalid
1361         for ol_val in auto yes no ; do
1362                 if test "$enableval" = "$ol_val" ; then
1363                         ol_arg="$ol_val"
1364                 fi
1365         done
1366         if test "$ol_arg" = "invalid" ; then
1367                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1368         fi
1369         ol_enable_crypt="$ol_arg"
1370
1371 else
1372         ol_enable_crypt="auto"
1373 fi
1374 # end --enable-crypt
1375 # OpenLDAP --enable-modules
1376         # Check whether --enable-modules or --disable-modules was given.
1377 if test "${enable_modules+set}" = set; then
1378   enableval="$enable_modules"
1379   
1380         ol_arg=invalid
1381         for ol_val in auto yes no ; do
1382                 if test "$enableval" = "$ol_val" ; then
1383                         ol_arg="$ol_val"
1384                 fi
1385         done
1386         if test "$ol_arg" = "invalid" ; then
1387                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1388         fi
1389         ol_enable_modules="$ol_arg"
1390
1391 else
1392         ol_enable_modules="no"
1393 fi
1394 # end --enable-modules
1395 # OpenLDAP --enable-phonetic
1396         # Check whether --enable-phonetic or --disable-phonetic was given.
1397 if test "${enable_phonetic+set}" = set; then
1398   enableval="$enable_phonetic"
1399   
1400         ol_arg=invalid
1401         for ol_val in auto yes no ; do
1402                 if test "$enableval" = "$ol_val" ; then
1403                         ol_arg="$ol_val"
1404                 fi
1405         done
1406         if test "$ol_arg" = "invalid" ; then
1407                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1408         fi
1409         ol_enable_phonetic="$ol_arg"
1410
1411 else
1412         ol_enable_phonetic="no"
1413 fi
1414 # end --enable-phonetic
1415 # OpenLDAP --enable-rlookups
1416         # Check whether --enable-rlookups or --disable-rlookups was given.
1417 if test "${enable_rlookups+set}" = set; then
1418   enableval="$enable_rlookups"
1419   
1420         ol_arg=invalid
1421         for ol_val in auto yes no ; do
1422                 if test "$enableval" = "$ol_val" ; then
1423                         ol_arg="$ol_val"
1424                 fi
1425         done
1426         if test "$ol_arg" = "invalid" ; then
1427                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1428         fi
1429         ol_enable_rlookups="$ol_arg"
1430
1431 else
1432         ol_enable_rlookups="auto"
1433 fi
1434 # end --enable-rlookups
1435 # OpenLDAP --enable-wrappers
1436         # Check whether --enable-wrappers or --disable-wrappers was given.
1437 if test "${enable_wrappers+set}" = set; then
1438   enableval="$enable_wrappers"
1439   
1440         ol_arg=invalid
1441         for ol_val in auto yes no ; do
1442                 if test "$enableval" = "$ol_val" ; then
1443                         ol_arg="$ol_val"
1444                 fi
1445         done
1446         if test "$ol_arg" = "invalid" ; then
1447                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1448         fi
1449         ol_enable_wrappers="$ol_arg"
1450
1451 else
1452         ol_enable_wrappers="no"
1453 fi
1454 # end --enable-wrappers
1455
1456 # OpenLDAP --enable-bdb2
1457         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1458 if test "${enable_bdb2+set}" = set; then
1459   enableval="$enable_bdb2"
1460   
1461         ol_arg=invalid
1462         for ol_val in auto yes no ; do
1463                 if test "$enableval" = "$ol_val" ; then
1464                         ol_arg="$ol_val"
1465                 fi
1466         done
1467         if test "$ol_arg" = "invalid" ; then
1468                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1469         fi
1470         ol_enable_bdb2="$ol_arg"
1471
1472 else
1473         ol_enable_bdb2="no"
1474 fi
1475 # end --enable-bdb2
1476 # OpenLDAP --with-bdb2_module
1477         # Check whether --with-bdb2_module or --without-bdb2_module was given.
1478 if test "${with_bdb2_module+set}" = set; then
1479   withval="$with_bdb2_module"
1480   
1481         ol_arg=invalid
1482         for ol_val in static dynamic ; do
1483                 if test "$withval" = "$ol_val" ; then
1484                         ol_arg="$ol_val"
1485                 fi
1486         done
1487         if test "$ol_arg" = "invalid" ; then
1488                 { echo "configure: error: bad value $withval for --with-bdb2_module" 1>&2; exit 1; }
1489         fi
1490         ol_with_bdb2_module="$ol_arg"
1491
1492 else
1493         ol_with_bdb2_module="static"
1494 fi
1495 # end --with-bdb2_module
1496
1497 # OpenLDAP --enable-ldap
1498         # Check whether --enable-ldap or --disable-ldap was given.
1499 if test "${enable_ldap+set}" = set; then
1500   enableval="$enable_ldap"
1501   
1502         ol_arg=invalid
1503         for ol_val in auto yes no ; do
1504                 if test "$enableval" = "$ol_val" ; then
1505                         ol_arg="$ol_val"
1506                 fi
1507         done
1508         if test "$ol_arg" = "invalid" ; then
1509                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1510         fi
1511         ol_enable_ldap="$ol_arg"
1512
1513 else
1514         ol_enable_ldap="no"
1515 fi
1516 # end --enable-ldap
1517 # OpenLDAP --with-ldap_module
1518         # Check whether --with-ldap_module or --without-ldap_module was given.
1519 if test "${with_ldap_module+set}" = set; then
1520   withval="$with_ldap_module"
1521   
1522         ol_arg=invalid
1523         for ol_val in static dynamic ; do
1524                 if test "$withval" = "$ol_val" ; then
1525                         ol_arg="$ol_val"
1526                 fi
1527         done
1528         if test "$ol_arg" = "invalid" ; then
1529                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
1530         fi
1531         ol_with_ldap_module="$ol_arg"
1532
1533 else
1534         ol_with_ldap_module="static"
1535 fi
1536 # end --with-ldap_module
1537
1538 # OpenLDAP --enable-ldbm
1539         # Check whether --enable-ldbm or --disable-ldbm was given.
1540 if test "${enable_ldbm+set}" = set; then
1541   enableval="$enable_ldbm"
1542   
1543         ol_arg=invalid
1544         for ol_val in auto yes no ; do
1545                 if test "$enableval" = "$ol_val" ; then
1546                         ol_arg="$ol_val"
1547                 fi
1548         done
1549         if test "$ol_arg" = "invalid" ; then
1550                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1551         fi
1552         ol_enable_ldbm="$ol_arg"
1553
1554 else
1555         ol_enable_ldbm="yes"
1556 fi
1557 # end --enable-ldbm
1558 # OpenLDAP --with-ldbm_module
1559         # Check whether --with-ldbm_module or --without-ldbm_module was given.
1560 if test "${with_ldbm_module+set}" = set; then
1561   withval="$with_ldbm_module"
1562   
1563         ol_arg=invalid
1564         for ol_val in static dynamic ; do
1565                 if test "$withval" = "$ol_val" ; then
1566                         ol_arg="$ol_val"
1567                 fi
1568         done
1569         if test "$ol_arg" = "invalid" ; then
1570                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
1571         fi
1572         ol_with_ldbm_module="$ol_arg"
1573
1574 else
1575         ol_with_ldbm_module="static"
1576 fi
1577 # end --with-ldbm_module
1578
1579 # OpenLDAP --with-ldbm_api
1580         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1581 if test "${with_ldbm_api+set}" = set; then
1582   withval="$with_ldbm_api"
1583   
1584         ol_arg=invalid
1585         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1586                 if test "$withval" = "$ol_val" ; then
1587                         ol_arg="$ol_val"
1588                 fi
1589         done
1590         if test "$ol_arg" = "invalid" ; then
1591                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1592         fi
1593         ol_with_ldbm_api="$ol_arg"
1594
1595 else
1596         ol_with_ldbm_api="auto"
1597 fi
1598 # end --with-ldbm_api
1599
1600 # OpenLDAP --with-ldbm_type
1601         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1602 if test "${with_ldbm_type+set}" = set; then
1603   withval="$with_ldbm_type"
1604   
1605         ol_arg=invalid
1606         for ol_val in auto btree hash ; do
1607                 if test "$withval" = "$ol_val" ; then
1608                         ol_arg="$ol_val"
1609                 fi
1610         done
1611         if test "$ol_arg" = "invalid" ; then
1612                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1613         fi
1614         ol_with_ldbm_type="$ol_arg"
1615
1616 else
1617         ol_with_ldbm_type="auto"
1618 fi
1619 # end --with-ldbm_type
1620
1621
1622 # OpenLDAP --enable-passwd
1623         # Check whether --enable-passwd or --disable-passwd was given.
1624 if test "${enable_passwd+set}" = set; then
1625   enableval="$enable_passwd"
1626   
1627         ol_arg=invalid
1628         for ol_val in auto yes no ; do
1629                 if test "$enableval" = "$ol_val" ; then
1630                         ol_arg="$ol_val"
1631                 fi
1632         done
1633         if test "$ol_arg" = "invalid" ; then
1634                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1635         fi
1636         ol_enable_passwd="$ol_arg"
1637
1638 else
1639         ol_enable_passwd="no"
1640 fi
1641 # end --enable-passwd
1642 # OpenLDAP --with-passwd_module
1643         # Check whether --with-passwd_module or --without-passwd_module was given.
1644 if test "${with_passwd_module+set}" = set; then
1645   withval="$with_passwd_module"
1646   
1647         ol_arg=invalid
1648         for ol_val in static dynamic ; do
1649                 if test "$withval" = "$ol_val" ; then
1650                         ol_arg="$ol_val"
1651                 fi
1652         done
1653         if test "$ol_arg" = "invalid" ; then
1654                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
1655         fi
1656         ol_with_passwd_module="$ol_arg"
1657
1658 else
1659         ol_with_passwd_module="static"
1660 fi
1661 # end --with-passwd_module
1662
1663 # OpenLDAP --enable-perl
1664         # Check whether --enable-perl or --disable-perl was given.
1665 if test "${enable_perl+set}" = set; then
1666   enableval="$enable_perl"
1667   
1668         ol_arg=invalid
1669         for ol_val in auto yes no ; do
1670                 if test "$enableval" = "$ol_val" ; then
1671                         ol_arg="$ol_val"
1672                 fi
1673         done
1674         if test "$ol_arg" = "invalid" ; then
1675                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1676         fi
1677         ol_enable_perl="$ol_arg"
1678
1679 else
1680         ol_enable_perl="no"
1681 fi
1682 # end --enable-perl
1683 # OpenLDAP --with-perl_module
1684         # Check whether --with-perl_module or --without-perl_module was given.
1685 if test "${with_perl_module+set}" = set; then
1686   withval="$with_perl_module"
1687   
1688         ol_arg=invalid
1689         for ol_val in static dynamic ; do
1690                 if test "$withval" = "$ol_val" ; then
1691                         ol_arg="$ol_val"
1692                 fi
1693         done
1694         if test "$ol_arg" = "invalid" ; then
1695                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
1696         fi
1697         ol_with_perl_module="$ol_arg"
1698
1699 else
1700         ol_with_perl_module="static"
1701 fi
1702 # end --with-perl_module
1703
1704 # OpenLDAP --enable-shell
1705         # Check whether --enable-shell or --disable-shell was given.
1706 if test "${enable_shell+set}" = set; then
1707   enableval="$enable_shell"
1708   
1709         ol_arg=invalid
1710         for ol_val in auto yes no ; do
1711                 if test "$enableval" = "$ol_val" ; then
1712                         ol_arg="$ol_val"
1713                 fi
1714         done
1715         if test "$ol_arg" = "invalid" ; then
1716                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1717         fi
1718         ol_enable_shell="$ol_arg"
1719
1720 else
1721         ol_enable_shell="no"
1722 fi
1723 # end --enable-shell
1724 # OpenLDAP --with-shell_module
1725         # Check whether --with-shell_module or --without-shell_module was given.
1726 if test "${with_shell_module+set}" = set; then
1727   withval="$with_shell_module"
1728   
1729         ol_arg=invalid
1730         for ol_val in static dynamic ; do
1731                 if test "$withval" = "$ol_val" ; then
1732                         ol_arg="$ol_val"
1733                 fi
1734         done
1735         if test "$ol_arg" = "invalid" ; then
1736                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
1737         fi
1738         ol_with_shell_module="$ol_arg"
1739
1740 else
1741         ol_with_shell_module="static"
1742 fi
1743 # end --with-shell_module
1744
1745 # OpenLDAP --enable-tcl
1746         # Check whether --enable-tcl or --disable-tcl was given.
1747 if test "${enable_tcl+set}" = set; then
1748   enableval="$enable_tcl"
1749   
1750         ol_arg=invalid
1751         for ol_val in auto yes no ; do
1752                 if test "$enableval" = "$ol_val" ; then
1753                         ol_arg="$ol_val"
1754                 fi
1755         done
1756         if test "$ol_arg" = "invalid" ; then
1757                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1758         fi
1759         ol_enable_tcl="$ol_arg"
1760
1761 else
1762         ol_enable_tcl="no"
1763 fi
1764 # end --enable-tcl
1765 # OpenLDAP --with-tcl_module
1766         # Check whether --with-tcl_module or --without-tcl_module was given.
1767 if test "${with_tcl_module+set}" = set; then
1768   withval="$with_tcl_module"
1769   
1770         ol_arg=invalid
1771         for ol_val in static dynamic ; do
1772                 if test "$withval" = "$ol_val" ; then
1773                         ol_arg="$ol_val"
1774                 fi
1775         done
1776         if test "$ol_arg" = "invalid" ; then
1777                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
1778         fi
1779         ol_with_tcl_module="$ol_arg"
1780
1781 else
1782         ol_with_tcl_module="static"
1783 fi
1784 # end --with-tcl_module
1785
1786
1787 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1788 if test "${with_xxslurpdoptions+set}" = set; then
1789   withval="$with_xxslurpdoptions"
1790   :
1791 fi
1792
1793 # OpenLDAP --enable-slurpd
1794         # Check whether --enable-slurpd or --disable-slurpd was given.
1795 if test "${enable_slurpd+set}" = set; then
1796   enableval="$enable_slurpd"
1797   
1798         ol_arg=invalid
1799         for ol_val in auto yes no ; do
1800                 if test "$enableval" = "$ol_val" ; then
1801                         ol_arg="$ol_val"
1802                 fi
1803         done
1804         if test "$ol_arg" = "invalid" ; then
1805                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1806         fi
1807         ol_enable_slurpd="$ol_arg"
1808
1809 else
1810         ol_enable_slurpd="auto"
1811 fi
1812 # end --enable-slurpd
1813
1814 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1815 if test "${with_xxliboptions+set}" = set; then
1816   withval="$with_xxliboptions"
1817   :
1818 fi
1819
1820 # Check whether --enable-static or --disable-static was given.
1821 if test "${enable_static+set}" = set; then
1822   enableval="$enable_static"
1823   p=${PACKAGE-default}
1824 case "$enableval" in
1825 yes) enable_static=yes ;;
1826 no) enable_static=no ;;
1827 *)
1828   enable_static=no
1829   # Look at the argument we got.  We use all the common list separators.
1830   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1831   for pkg in $enableval; do
1832     if test "X$pkg" = "X$p"; then
1833       enable_static=yes
1834     fi
1835   done
1836   IFS="$ac_save_ifs"
1837   ;;
1838 esac
1839 else
1840   enable_static=yes
1841 fi
1842
1843 # Check whether --enable-shared or --disable-shared was given.
1844 if test "${enable_shared+set}" = set; then
1845   enableval="$enable_shared"
1846   p=${PACKAGE-default}
1847 case "$enableval" in
1848 yes) enable_shared=yes ;;
1849 no) enable_shared=no ;;
1850 *)
1851   enable_shared=no
1852   # Look at the argument we got.  We use all the common list separators.
1853   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1854   for pkg in $enableval; do
1855     if test "X$pkg" = "X$p"; then
1856       enable_shared=yes
1857     fi
1858   done
1859   IFS="$ac_save_ifs"
1860   ;;
1861 esac
1862 else
1863   enable_shared=yes
1864 fi
1865
1866
1867 # validate options
1868 if test $ol_enable_dns = yes ; then
1869         if test $ol_enable_referrals = no ; then
1870                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1871         fi
1872         if test $ol_enable_referrals = auto ; then
1873                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1874                 ol_enable_referrals=yes
1875         fi
1876 fi
1877
1878 if test $ol_enable_slapd = no ; then
1879                 if test $ol_enable_bdb2 = yes ; then
1880                 echo "configure: warning: slapd disabled, ignoring --enable-bdb2 argument" 1>&2
1881         fi
1882         if test $ol_enable_ldap = yes ; then
1883                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
1884         fi
1885         if test $ol_enable_ldbm = yes ; then
1886                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
1887         fi
1888         if test $ol_enable_passwd = yes ; then
1889                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
1890         fi
1891         if test $ol_enable_perl = yes ; then
1892                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
1893         fi
1894         if test $ol_enable_shell = yes ; then
1895                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
1896         fi
1897         if test $ol_enable_tcl = yes ; then
1898                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
1899         fi
1900         if test $ol_enable_modules = yes ; then
1901                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
1902         fi
1903         if test $ol_enable_wrappers = yes ; then
1904                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
1905         fi
1906         if test $ol_enable_phonetic = yes ; then
1907                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
1908         fi
1909         if test $ol_enable_rlookups = yes ; then
1910                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
1911         fi
1912         if test $ol_with_ldbm_api != auto ; then
1913                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
1914         fi
1915         if test $ol_with_ldbm_type != auto ; then
1916                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
1917         fi
1918         if test $ol_with_bdb2_module != static ; then
1919                 echo "configure: warning: slapd disabled, ignoring --with-bdb2-module argument" 1>&2
1920         fi
1921         if test $ol_with_ldap_module != static ; then
1922                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
1923         fi
1924         if test $ol_with_ldbm_module != static ; then
1925                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
1926         fi
1927         if test $ol_with_passwd_module != static ; then
1928                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
1929         fi
1930         if test $ol_with_perl_module != static ; then
1931                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
1932         fi
1933         if test $ol_with_shell_module != static ; then
1934                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
1935         fi
1936         if test $ol_with_tcl_module != static ; then
1937                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
1938         fi
1939         if test $ol_enable_slurpd = yes ; then
1940                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1941         fi
1942
1943         # force settings to no
1944         ol_enable_bdb2=no
1945         ol_enable_ldap=no
1946         ol_enable_ldbm=no
1947         ol_enable_passwd=no
1948         ol_enable_perl=no
1949         ol_enable_shell=no
1950         ol_enable_tcl=no
1951
1952         ol_enable_modules=no
1953         ol_enable_phonetic=no
1954         ol_enable_rlookups=no
1955         ol_enable_wrappers=no
1956
1957         ol_with_ldbm_api=no
1958         ol_with_ldbm_type=no
1959
1960         ol_with_bdb2_module=static
1961         ol_with_ldap_module=static
1962         ol_with_ldbm_module=static
1963         ol_with_passwd_module=static
1964         ol_with_perl_module=static
1965         ol_with_shell_module=static
1966         ol_with_tcl_module=static
1967
1968         ol_enable_slurpd=no
1969
1970 elif test $ol_enable_ldbm = no ; then
1971         
1972         if test $ol_with_ldbm_api != auto ; then
1973                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
1974         fi
1975
1976         if test $ol_with_ldbm_type != auto ; then
1977                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
1978         fi
1979
1980         if test $ol_with_ldbm_module != static ; then
1981                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
1982         fi
1983
1984         if test $ol_enable_bdb2 = yes ; then
1985                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
1986         fi
1987
1988         if test $ol_enable_modules != yes -a \
1989                 $ol_enable_ldap = no -a \
1990                 $ol_enable_passwd = no -a \
1991                 $ol_enable_perl = no -a \
1992                 $ol_enable_shell = no -a \
1993                 $ol_enable_tcl = no ; then
1994                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
1995         fi
1996
1997         ol_with_ldbm_api=no
1998         ol_with_ldbm_type=no
1999         ol_with_ldbm_module=static
2000
2001 elif test $ol_enable_bdb2 = yes ; then
2002         
2003         if test $ol_with_ldbm_api != auto -a \
2004                 $ol_with_ldbm_api != db2 ; then
2005                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
2006         fi
2007
2008         ol_with_ldbm_api=db2
2009
2010 else
2011         
2012         if test $ol_enable_bdb2 != no ; then
2013                 if test $ol_with_ldbm_api != auto -a \
2014                         $ol_with_ldbm_api != db2 ; then
2015                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
2016                         ol_enable_bdb2=no
2017                 fi
2018         fi
2019
2020         if test $ol_with_ldbm_api = gdbm -a \
2021                 $ol_with_ldbm_type = btree ; then
2022                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2023         fi
2024         if test $ol_with_ldbm_api = mdbm -a \
2025                 $ol_with_ldbm_type = btree ; then
2026                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2027         fi
2028         if test $ol_with_ldbm_api = ndbm -a \
2029                 $ol_with_ldbm_type = btree ; then
2030                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2031         fi
2032 fi
2033
2034 if test $ol_enable_slurpd = yes ; then
2035                 if test $ol_with_threads = no ; then
2036                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2037         fi
2038 fi
2039
2040 echo "$ac_t""done" 1>&6
2041
2042 ## Initialize vars
2043 LDAP_LIBS=
2044 LDBM_LIBS=
2045 LTHREAD_LIBS=
2046 LUTIL_LIBS=
2047
2048 LDAPD_LIBS=
2049 SLAPD_LIBS=
2050 SLURPD_LIBS=
2051
2052 BUILD_LDAPD=no
2053 BUILD_SLAPD=no
2054 BUILD_SLURPD=no
2055
2056 BUILD_BDB2=no
2057 BUILD_LDAP=no
2058 BUILD_LDBM=no
2059 BUILD_PASSWD=no
2060 BUILD_PERL=no
2061 BUILD_SHELL=no
2062 BUILD_TCL=no
2063 BUILD_THREAD=no
2064
2065 BUILD_BDB2_DYNAMIC=no
2066 BUILD_LDAP_DYNAMIC=no
2067 BUILD_LDBM_DYNAMIC=no
2068 BUILD_PASSWD_DYNAMIC=no
2069 BUILD_PERL_DYNAMIC=no
2070 BUILD_SHELL_DYNAMIC=no
2071 BUILD_TCL_DYNAMIC=no
2072
2073 SLAPD_MODULES_LDFLAGS=
2074 SLAPD_MODULES_CPPFLAGS=
2075
2076 SLAPD_PERL_LDFLAGS=
2077 SLAPD_PERL_CPPFLAGS=
2078
2079 KRB_LIBS=
2080 READLINE_LIBS=
2081 TERMCAP_LIBS=
2082 TLS_LIBS=
2083
2084
2085
2086
2087 ol_aix_threads=no
2088 case "$target" in
2089 *-*-aix*)       if test -z "$CC" ; then
2090                 case "$ol_with_threads" in
2091                 auto | yes |  posix) ol_aix_threads=yes ;;
2092                 esac
2093         fi
2094 ;;
2095 esac
2096
2097 if test $ol_aix_threads = yes ; then
2098         if test -z "${CC}" ; then
2099                 for ac_prog in cc_r xlc_r cc
2100 do
2101 # Extract the first word of "$ac_prog", so it can be a program name with args.
2102 set dummy $ac_prog; ac_word=$2
2103 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2104 echo "configure:2105: checking for $ac_word" >&5
2105 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2106   echo $ac_n "(cached) $ac_c" 1>&6
2107 else
2108   if test -n "$CC"; then
2109   ac_cv_prog_CC="$CC" # Let the user override the test.
2110 else
2111   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2112   ac_dummy="$PATH"
2113   for ac_dir in $ac_dummy; do
2114     test -z "$ac_dir" && ac_dir=.
2115     if test -f $ac_dir/$ac_word; then
2116       ac_cv_prog_CC="$ac_prog"
2117       break
2118     fi
2119   done
2120   IFS="$ac_save_ifs"
2121 fi
2122 fi
2123 CC="$ac_cv_prog_CC"
2124 if test -n "$CC"; then
2125   echo "$ac_t""$CC" 1>&6
2126 else
2127   echo "$ac_t""no" 1>&6
2128 fi
2129
2130 test -n "$CC" && break
2131 done
2132
2133
2134                 if test "$CC" = cc ; then
2135                                                 if test $ol_with_threads != auto ; then
2136                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2137                         else
2138                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2139                         fi
2140                         ol_with_threads=no
2141                 fi
2142         fi
2143
2144         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2145                 ol_with_threads=posix
2146                 ol_cv_pthread_create=yes
2147         fi
2148 fi
2149
2150 if test -z "${CC}"; then
2151         for ac_prog in cc
2152 do
2153 # Extract the first word of "$ac_prog", so it can be a program name with args.
2154 set dummy $ac_prog; ac_word=$2
2155 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2156 echo "configure:2157: checking for $ac_word" >&5
2157 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2158   echo $ac_n "(cached) $ac_c" 1>&6
2159 else
2160   if test -n "$CC"; then
2161   ac_cv_prog_CC="$CC" # Let the user override the test.
2162 else
2163   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2164   ac_dummy="$PATH"
2165   for ac_dir in $ac_dummy; do
2166     test -z "$ac_dir" && ac_dir=.
2167     if test -f $ac_dir/$ac_word; then
2168       ac_cv_prog_CC="$ac_prog"
2169       break
2170     fi
2171   done
2172   IFS="$ac_save_ifs"
2173 fi
2174 fi
2175 CC="$ac_cv_prog_CC"
2176 if test -n "$CC"; then
2177   echo "$ac_t""$CC" 1>&6
2178 else
2179   echo "$ac_t""no" 1>&6
2180 fi
2181
2182 test -n "$CC" && break
2183 done
2184
2185 fi
2186
2187
2188 # Extract the first word of "ranlib", so it can be a program name with args.
2189 set dummy ranlib; ac_word=$2
2190 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2191 echo "configure:2192: checking for $ac_word" >&5
2192 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2193   echo $ac_n "(cached) $ac_c" 1>&6
2194 else
2195   if test -n "$RANLIB"; then
2196   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2197 else
2198   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2199   ac_dummy="$PATH"
2200   for ac_dir in $ac_dummy; do
2201     test -z "$ac_dir" && ac_dir=.
2202     if test -f $ac_dir/$ac_word; then
2203       ac_cv_prog_RANLIB="ranlib"
2204       break
2205     fi
2206   done
2207   IFS="$ac_save_ifs"
2208   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2209 fi
2210 fi
2211 RANLIB="$ac_cv_prog_RANLIB"
2212 if test -n "$RANLIB"; then
2213   echo "$ac_t""$RANLIB" 1>&6
2214 else
2215   echo "$ac_t""no" 1>&6
2216 fi
2217
2218 # Extract the first word of "gcc", so it can be a program name with args.
2219 set dummy gcc; ac_word=$2
2220 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2221 echo "configure:2222: checking for $ac_word" >&5
2222 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2223   echo $ac_n "(cached) $ac_c" 1>&6
2224 else
2225   if test -n "$CC"; then
2226   ac_cv_prog_CC="$CC" # Let the user override the test.
2227 else
2228   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2229   ac_dummy="$PATH"
2230   for ac_dir in $ac_dummy; do
2231     test -z "$ac_dir" && ac_dir=.
2232     if test -f $ac_dir/$ac_word; then
2233       ac_cv_prog_CC="gcc"
2234       break
2235     fi
2236   done
2237   IFS="$ac_save_ifs"
2238 fi
2239 fi
2240 CC="$ac_cv_prog_CC"
2241 if test -n "$CC"; then
2242   echo "$ac_t""$CC" 1>&6
2243 else
2244   echo "$ac_t""no" 1>&6
2245 fi
2246
2247 if test -z "$CC"; then
2248   # Extract the first word of "cc", so it can be a program name with args.
2249 set dummy cc; ac_word=$2
2250 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2251 echo "configure:2252: checking for $ac_word" >&5
2252 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2253   echo $ac_n "(cached) $ac_c" 1>&6
2254 else
2255   if test -n "$CC"; then
2256   ac_cv_prog_CC="$CC" # Let the user override the test.
2257 else
2258   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2259   ac_prog_rejected=no
2260   ac_dummy="$PATH"
2261   for ac_dir in $ac_dummy; do
2262     test -z "$ac_dir" && ac_dir=.
2263     if test -f $ac_dir/$ac_word; then
2264       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2265         ac_prog_rejected=yes
2266         continue
2267       fi
2268       ac_cv_prog_CC="cc"
2269       break
2270     fi
2271   done
2272   IFS="$ac_save_ifs"
2273 if test $ac_prog_rejected = yes; then
2274   # We found a bogon in the path, so make sure we never use it.
2275   set dummy $ac_cv_prog_CC
2276   shift
2277   if test $# -gt 0; then
2278     # We chose a different compiler from the bogus one.
2279     # However, it has the same basename, so the bogon will be chosen
2280     # first if we set CC to just the basename; use the full file name.
2281     shift
2282     set dummy "$ac_dir/$ac_word" "$@"
2283     shift
2284     ac_cv_prog_CC="$@"
2285   fi
2286 fi
2287 fi
2288 fi
2289 CC="$ac_cv_prog_CC"
2290 if test -n "$CC"; then
2291   echo "$ac_t""$CC" 1>&6
2292 else
2293   echo "$ac_t""no" 1>&6
2294 fi
2295
2296   if test -z "$CC"; then
2297     case "`uname -s`" in
2298     *win32* | *WIN32*)
2299       # Extract the first word of "cl", so it can be a program name with args.
2300 set dummy cl; ac_word=$2
2301 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2302 echo "configure:2303: checking for $ac_word" >&5
2303 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2304   echo $ac_n "(cached) $ac_c" 1>&6
2305 else
2306   if test -n "$CC"; then
2307   ac_cv_prog_CC="$CC" # Let the user override the test.
2308 else
2309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2310   ac_dummy="$PATH"
2311   for ac_dir in $ac_dummy; do
2312     test -z "$ac_dir" && ac_dir=.
2313     if test -f $ac_dir/$ac_word; then
2314       ac_cv_prog_CC="cl"
2315       break
2316     fi
2317   done
2318   IFS="$ac_save_ifs"
2319 fi
2320 fi
2321 CC="$ac_cv_prog_CC"
2322 if test -n "$CC"; then
2323   echo "$ac_t""$CC" 1>&6
2324 else
2325   echo "$ac_t""no" 1>&6
2326 fi
2327  ;;
2328     esac
2329   fi
2330   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2331 fi
2332
2333 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2334 echo "configure:2335: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2335
2336 ac_ext=c
2337 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2338 ac_cpp='$CPP $CPPFLAGS'
2339 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2340 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2341 cross_compiling=$ac_cv_prog_cc_cross
2342
2343 cat > conftest.$ac_ext << EOF
2344
2345 #line 2346 "configure"
2346 #include "confdefs.h"
2347
2348 main(){return(0);}
2349 EOF
2350 if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2351   ac_cv_prog_cc_works=yes
2352   # If we can't run a trivial program, we are probably using a cross compiler.
2353   if (./conftest; exit) 2>/dev/null; then
2354     ac_cv_prog_cc_cross=no
2355   else
2356     ac_cv_prog_cc_cross=yes
2357   fi
2358 else
2359   echo "configure: failed program was:" >&5
2360   cat conftest.$ac_ext >&5
2361   ac_cv_prog_cc_works=no
2362 fi
2363 rm -fr conftest*
2364 ac_ext=c
2365 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2366 ac_cpp='$CPP $CPPFLAGS'
2367 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2368 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2369 cross_compiling=$ac_cv_prog_cc_cross
2370
2371 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2372 if test $ac_cv_prog_cc_works = no; then
2373   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2374 fi
2375 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2376 echo "configure:2377: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2377 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2378 cross_compiling=$ac_cv_prog_cc_cross
2379
2380 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2381 echo "configure:2382: checking whether we are using GNU C" >&5
2382 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2383   echo $ac_n "(cached) $ac_c" 1>&6
2384 else
2385   cat > conftest.c <<EOF
2386 #ifdef __GNUC__
2387   yes;
2388 #endif
2389 EOF
2390 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2391   ac_cv_prog_gcc=yes
2392 else
2393   ac_cv_prog_gcc=no
2394 fi
2395 fi
2396
2397 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2398
2399 if test $ac_cv_prog_gcc = yes; then
2400   GCC=yes
2401 else
2402   GCC=
2403 fi
2404
2405 ac_test_CFLAGS="${CFLAGS+set}"
2406 ac_save_CFLAGS="$CFLAGS"
2407 CFLAGS=
2408 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2409 echo "configure:2410: checking whether ${CC-cc} accepts -g" >&5
2410 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2411   echo $ac_n "(cached) $ac_c" 1>&6
2412 else
2413   echo 'void f(){}' > conftest.c
2414 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2415   ac_cv_prog_cc_g=yes
2416 else
2417   ac_cv_prog_cc_g=no
2418 fi
2419 rm -f conftest*
2420
2421 fi
2422
2423 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2424 if test "$ac_test_CFLAGS" = set; then
2425   CFLAGS="$ac_save_CFLAGS"
2426 elif test $ac_cv_prog_cc_g = yes; then
2427   if test "$GCC" = yes; then
2428     CFLAGS="-g -O2"
2429   else
2430     CFLAGS="-g"
2431   fi
2432 else
2433   if test "$GCC" = yes; then
2434     CFLAGS="-O2"
2435   else
2436     CFLAGS=
2437   fi
2438 fi
2439
2440 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2441 if test "${with_gnu_ld+set}" = set; then
2442   withval="$with_gnu_ld"
2443   test "$withval" = no || with_gnu_ld=yes
2444 else
2445   with_gnu_ld=no
2446 fi
2447
2448
2449 ac_prog=ld
2450 if test "$ac_cv_prog_gcc" = yes; then
2451   # Check if gcc -print-prog-name=ld gives a path.
2452   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2453 echo "configure:2454: checking for ld used by GCC" >&5
2454   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2455   case "$ac_prog" in
2456   # Accept absolute paths.
2457   /* | A-Za-z:\\*)
2458     test -z "$LD" && LD="$ac_prog"
2459     ;;
2460   "")
2461     # If it fails, then pretend we aren't using GCC.
2462     ac_prog=ld
2463     ;;
2464   *)
2465     # If it is relative, then search for the first ld in PATH.
2466     with_gnu_ld=unknown
2467     ;;
2468   esac
2469 elif test "$with_gnu_ld" = yes; then
2470   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2471 echo "configure:2472: checking for GNU ld" >&5
2472 else
2473   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2474 echo "configure:2475: checking for non-GNU ld" >&5
2475 fi
2476 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2477   echo $ac_n "(cached) $ac_c" 1>&6
2478 else
2479   if test -z "$LD"; then
2480   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2481   for ac_dir in $PATH; do
2482     test -z "$ac_dir" && ac_dir=.
2483     if test -f "$ac_dir/$ac_prog"; then
2484       ac_cv_path_LD="$ac_dir/$ac_prog"
2485       # Check to see if the program is GNU ld.  I'd rather use --version,
2486       # but apparently some GNU ld's only accept -v.
2487       # Break only if it was the GNU/non-GNU ld that we prefer.
2488       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2489         test "$with_gnu_ld" != no && break
2490       else
2491         test "$with_gnu_ld" != yes && break
2492       fi
2493     fi
2494   done
2495   IFS="$ac_save_ifs"
2496 else
2497   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2498 fi
2499 fi
2500
2501 LD="$ac_cv_path_LD"
2502 if test -n "$LD"; then
2503   echo "$ac_t""$LD" 1>&6
2504 else
2505   echo "$ac_t""no" 1>&6
2506 fi
2507 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2508
2509 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2510 echo "configure:2511: checking if the linker ($LD) is GNU ld" >&5
2511 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2512   echo $ac_n "(cached) $ac_c" 1>&6
2513 else
2514   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2515 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2516   ac_cv_prog_gnu_ld=yes
2517 else
2518   ac_cv_prog_gnu_ld=no
2519 fi
2520 fi
2521
2522 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2523
2524
2525 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2526 echo "configure:2527: checking for BSD-compatible nm" >&5
2527 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2528   echo $ac_n "(cached) $ac_c" 1>&6
2529 else
2530   case "$NM" in
2531 /* | A-Za-z:\\*)
2532   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2533   ;;
2534 *)
2535   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2536   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2537     test -z "$ac_dir" && ac_dir=.
2538     if test -f $ac_dir/nm; then
2539       # Check to see if the nm accepts a BSD-compat flag.
2540       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2541       #   nm: unknown option "B" ignored
2542       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2543         ac_cv_path_NM="$ac_dir/nm -B"
2544       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2545         ac_cv_path_NM="$ac_dir/nm -p"
2546       else
2547         ac_cv_path_NM="$ac_dir/nm"
2548       fi
2549       break
2550     fi
2551   done
2552   IFS="$ac_save_ifs"
2553   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2554   ;;
2555 esac
2556 fi
2557
2558 NM="$ac_cv_path_NM"
2559 echo "$ac_t""$NM" 1>&6
2560
2561
2562 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2563 echo "configure:2564: checking whether ln -s works" >&5
2564 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2565   echo $ac_n "(cached) $ac_c" 1>&6
2566 else
2567   rm -f conftestdata
2568 if ln -s X conftestdata 2>/dev/null
2569 then
2570   rm -f conftestdata
2571   ac_cv_prog_LN_S="ln -s"
2572 else
2573   ac_cv_prog_LN_S=ln
2574 fi
2575 fi
2576 LN_S="$ac_cv_prog_LN_S"
2577 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2578   echo "$ac_t""yes" 1>&6
2579 else
2580   echo "$ac_t""no" 1>&6
2581 fi
2582
2583 # Always use our own libtool.
2584 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2585
2586 # Check for any special flags to pass to ltconfig.
2587 libtool_flags=
2588 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2589 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2590 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2591 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2592 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2593
2594 # Some flags need to be propagated to the compiler or linker for good
2595 # libtool support.
2596 case "$host" in
2597 *-*-irix6*)
2598   # Find out which ABI we are using.
2599   echo '#line 2600 "configure"' > conftest.$ac_ext
2600   if { (eval echo configure:2601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2601     case "`/usr/bin/file conftest.o`" in
2602     *32-bit*)
2603       LD="${LD-ld} -32"
2604       ;;
2605     *N32*)
2606       LD="${LD-ld} -n32"
2607       ;;
2608     *64-bit*)
2609       LD="${LD-ld} -64"
2610       ;;
2611     esac
2612   fi
2613   rm -rf conftest*
2614   ;;
2615
2616 *-*-sco3.2v5*)
2617   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2618   CFLAGS="$CFLAGS -belf"
2619   ;;
2620 esac
2621
2622 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2623 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2624 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2625 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2626 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2627 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2628
2629
2630 for ac_prog in mawk gawk nawk awk
2631 do
2632 # Extract the first word of "$ac_prog", so it can be a program name with args.
2633 set dummy $ac_prog; ac_word=$2
2634 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2635 echo "configure:2636: checking for $ac_word" >&5
2636 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2637   echo $ac_n "(cached) $ac_c" 1>&6
2638 else
2639   if test -n "$AWK"; then
2640   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2641 else
2642   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2643   ac_dummy="$PATH"
2644   for ac_dir in $ac_dummy; do
2645     test -z "$ac_dir" && ac_dir=.
2646     if test -f $ac_dir/$ac_word; then
2647       ac_cv_prog_AWK="$ac_prog"
2648       break
2649     fi
2650   done
2651   IFS="$ac_save_ifs"
2652 fi
2653 fi
2654 AWK="$ac_cv_prog_AWK"
2655 if test -n "$AWK"; then
2656   echo "$ac_t""$AWK" 1>&6
2657 else
2658   echo "$ac_t""no" 1>&6
2659 fi
2660
2661 test -n "$AWK" && break
2662 done
2663
2664 # test for ln hardlink support
2665 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2666 echo "configure:2667: checking whether ln works" >&5
2667 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2668   echo $ac_n "(cached) $ac_c" 1>&6
2669 else
2670   rm -f conftest.src conftest.dst
2671 echo "conftest" > conftest.src
2672 if ln conftest.src conftest.dst 2>/dev/null
2673 then
2674   ol_cv_prog_LN_H="ln"
2675 else
2676   ol_cv_prog_LN_H="cp"
2677 fi
2678 rm -f conftest.src conftest.dst
2679
2680 fi
2681 LN_H="$ol_cv_prog_LN_H"
2682 if test "$ol_cv_prog_LN_H" = "ln"; then
2683         echo "$ac_t""yes" 1>&6
2684 else
2685         echo "$ac_t""no" 1>&6
2686 fi
2687
2688 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2689 echo "configure:2690: checking whether ln -s works" >&5
2690 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2691   echo $ac_n "(cached) $ac_c" 1>&6
2692 else
2693   rm -f conftestdata
2694 if ln -s X conftestdata 2>/dev/null
2695 then
2696   rm -f conftestdata
2697   ac_cv_prog_LN_S="ln -s"
2698 else
2699   ac_cv_prog_LN_S=ln
2700 fi
2701 fi
2702 LN_S="$ac_cv_prog_LN_S"
2703 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2704   echo "$ac_t""yes" 1>&6
2705 else
2706   echo "$ac_t""no" 1>&6
2707 fi
2708
2709
2710 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2711         LN_S="$LN_H"
2712 fi
2713
2714 # Extract the first word of "sendmail", so it can be a program name with args.
2715 set dummy sendmail; ac_word=$2
2716 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2717 echo "configure:2718: checking for $ac_word" >&5
2718 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2719   echo $ac_n "(cached) $ac_c" 1>&6
2720 else
2721   case "$SENDMAIL" in
2722   /*)
2723   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2724   ;;
2725   ?:/*)                  
2726   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2727   ;;
2728   *)
2729   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2730   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2731   for ac_dir in $ac_dummy; do 
2732     test -z "$ac_dir" && ac_dir=.
2733     if test -f $ac_dir/$ac_word; then
2734       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2735       break
2736     fi
2737   done
2738   IFS="$ac_save_ifs"
2739   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2740   ;;
2741 esac
2742 fi
2743 SENDMAIL="$ac_cv_path_SENDMAIL"
2744 if test -n "$SENDMAIL"; then
2745   echo "$ac_t""$SENDMAIL" 1>&6
2746 else
2747   echo "$ac_t""no" 1>&6
2748 fi
2749
2750 # Extract the first word of "vi", so it can be a program name with args.
2751 set dummy vi; ac_word=$2
2752 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2753 echo "configure:2754: checking for $ac_word" >&5
2754 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2755   echo $ac_n "(cached) $ac_c" 1>&6
2756 else
2757   case "$EDITOR" in
2758   /*)
2759   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2760   ;;
2761   ?:/*)                  
2762   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2763   ;;
2764   *)
2765   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2766   ac_dummy="$PATH:/usr/ucb"
2767   for ac_dir in $ac_dummy; do 
2768     test -z "$ac_dir" && ac_dir=.
2769     if test -f $ac_dir/$ac_word; then
2770       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2771       break
2772     fi
2773   done
2774   IFS="$ac_save_ifs"
2775   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2776   ;;
2777 esac
2778 fi
2779 EDITOR="$ac_cv_path_EDITOR"
2780 if test -n "$EDITOR"; then
2781   echo "$ac_t""$EDITOR" 1>&6
2782 else
2783   echo "$ac_t""no" 1>&6
2784 fi
2785
2786 # Extract the first word of "finger", so it can be a program name with args.
2787 set dummy finger; ac_word=$2
2788 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2789 echo "configure:2790: checking for $ac_word" >&5
2790 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2791   echo $ac_n "(cached) $ac_c" 1>&6
2792 else
2793   case "$FINGER" in
2794   /*)
2795   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2796   ;;
2797   ?:/*)                  
2798   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2799   ;;
2800   *)
2801   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2802   ac_dummy="$PATH:/usr/ucb"
2803   for ac_dir in $ac_dummy; do 
2804     test -z "$ac_dir" && ac_dir=.
2805     if test -f $ac_dir/$ac_word; then
2806       ac_cv_path_FINGER="$ac_dir/$ac_word"
2807       break
2808     fi
2809   done
2810   IFS="$ac_save_ifs"
2811   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2812   ;;
2813 esac
2814 fi
2815 FINGER="$ac_cv_path_FINGER"
2816 if test -n "$FINGER"; then
2817   echo "$ac_t""$FINGER" 1>&6
2818 else
2819   echo "$ac_t""no" 1>&6
2820 fi
2821
2822
2823 ol_link_modules=no
2824 if test $ol_enable_modules != no ; then
2825         # Extract the first word of "glib-config", so it can be a program name with args.
2826 set dummy glib-config; ac_word=$2
2827 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2828 echo "configure:2829: checking for $ac_word" >&5
2829 if eval "test \"`echo '$''{'ac_cv_path_GLIBCONFIG'+set}'`\" = set"; then
2830   echo $ac_n "(cached) $ac_c" 1>&6
2831 else
2832   case "$GLIBCONFIG" in
2833   /*)
2834   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
2835   ;;
2836   ?:/*)                  
2837   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
2838   ;;
2839   *)
2840   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2841   ac_dummy="$PATH"
2842   for ac_dir in $ac_dummy; do 
2843     test -z "$ac_dir" && ac_dir=.
2844     if test -f $ac_dir/$ac_word; then
2845       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
2846       break
2847     fi
2848   done
2849   IFS="$ac_save_ifs"
2850   ;;
2851 esac
2852 fi
2853 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
2854 if test -n "$GLIBCONFIG"; then
2855   echo "$ac_t""$GLIBCONFIG" 1>&6
2856 else
2857   echo "$ac_t""no" 1>&6
2858 fi
2859
2860
2861         if test "no$GLIBCONFIG" = "no" ; then
2862                 if test $ol_enable_modules = yes ; then
2863                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
2864                 fi
2865
2866         else
2867                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
2868                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
2869                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
2870
2871                                 ol_link_modules=yes
2872         fi
2873 else
2874         ol_with_bdb2_module=static
2875         ol_with_ldap_module=static
2876         ol_with_ldbm_module=static
2877         ol_with_passwd_module=static
2878         ol_with_perl_module=static
2879         ol_with_shell_module=static
2880         ol_with_tcl_module=static
2881 fi
2882
2883 ol_link_perl=no
2884 if test $ol_enable_perl != no ; then
2885         # Extract the first word of "perl", so it can be a program name with args.
2886 set dummy perl; ac_word=$2
2887 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2888 echo "configure:2889: checking for $ac_word" >&5
2889 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2890   echo $ac_n "(cached) $ac_c" 1>&6
2891 else
2892   case "$PERLBIN" in
2893   /*)
2894   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2895   ;;
2896   ?:/*)                  
2897   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2898   ;;
2899   *)
2900   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2901   ac_dummy="$PATH"
2902   for ac_dir in $ac_dummy; do 
2903     test -z "$ac_dir" && ac_dir=.
2904     if test -f $ac_dir/$ac_word; then
2905       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2906       break
2907     fi
2908   done
2909   IFS="$ac_save_ifs"
2910   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2911   ;;
2912 esac
2913 fi
2914 PERLBIN="$ac_cv_path_PERLBIN"
2915 if test -n "$PERLBIN"; then
2916   echo "$ac_t""$PERLBIN" 1>&6
2917 else
2918   echo "$ac_t""no" 1>&6
2919 fi
2920
2921
2922         if test "no$PERLBIN" = "no" ; then
2923                 if test $ol_enable_perl = yes ; then
2924                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
2925                 fi
2926
2927         else
2928                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2929                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
2930
2931                                 ol_link_perl=yes
2932         fi
2933 fi
2934
2935 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2936 echo "configure:2937: checking how to run the C preprocessor" >&5
2937 # On Suns, sometimes $CPP names a directory.
2938 if test -n "$CPP" && test -d "$CPP"; then
2939   CPP=
2940 fi
2941 if test -z "$CPP"; then
2942 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2943   echo $ac_n "(cached) $ac_c" 1>&6
2944 else
2945     # This must be in double quotes, not single quotes, because CPP may get
2946   # substituted into the Makefile and "${CC-cc}" will confuse make.
2947   CPP="${CC-cc} -E"
2948   # On the NeXT, cc -E runs the code through the compiler's parser,
2949   # not just through cpp.
2950   cat > conftest.$ac_ext <<EOF
2951 #line 2952 "configure"
2952 #include "confdefs.h"
2953 #include <assert.h>
2954 Syntax Error
2955 EOF
2956 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2957 { (eval echo configure:2958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2958 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2959 if test -z "$ac_err"; then
2960   :
2961 else
2962   echo "$ac_err" >&5
2963   echo "configure: failed program was:" >&5
2964   cat conftest.$ac_ext >&5
2965   rm -rf conftest*
2966   CPP="${CC-cc} -E -traditional-cpp"
2967   cat > conftest.$ac_ext <<EOF
2968 #line 2969 "configure"
2969 #include "confdefs.h"
2970 #include <assert.h>
2971 Syntax Error
2972 EOF
2973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2974 { (eval echo configure:2975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2976 if test -z "$ac_err"; then
2977   :
2978 else
2979   echo "$ac_err" >&5
2980   echo "configure: failed program was:" >&5
2981   cat conftest.$ac_ext >&5
2982   rm -rf conftest*
2983   CPP="${CC-cc} -nologo -E"
2984   cat > conftest.$ac_ext <<EOF
2985 #line 2986 "configure"
2986 #include "confdefs.h"
2987 #include <assert.h>
2988 Syntax Error
2989 EOF
2990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2991 { (eval echo configure:2992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2992 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2993 if test -z "$ac_err"; then
2994   :
2995 else
2996   echo "$ac_err" >&5
2997   echo "configure: failed program was:" >&5
2998   cat conftest.$ac_ext >&5
2999   rm -rf conftest*
3000   CPP=/lib/cpp
3001 fi
3002 rm -f conftest*
3003 fi
3004 rm -f conftest*
3005 fi
3006 rm -f conftest*
3007   ac_cv_prog_CPP="$CPP"
3008 fi
3009   CPP="$ac_cv_prog_CPP"
3010 else
3011   ac_cv_prog_CPP="$CPP"
3012 fi
3013 echo "$ac_t""$CPP" 1>&6
3014
3015
3016 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
3017         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
3018
3019 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
3020         echo "configure: warning: programs compiled here do run here..." 1>&2
3021         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
3022
3023 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
3024         echo "configure: warning: programs compiled here do not run here..." 1>&2
3025         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
3026 fi
3027
3028 echo $ac_n "checking for AIX""... $ac_c" 1>&6
3029 echo "configure:3030: checking for AIX" >&5
3030 cat > conftest.$ac_ext <<EOF
3031 #line 3032 "configure"
3032 #include "confdefs.h"
3033 #ifdef _AIX
3034   yes
3035 #endif
3036
3037 EOF
3038 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3039   egrep "yes" >/dev/null 2>&1; then
3040   rm -rf conftest*
3041   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
3042 #define _ALL_SOURCE 1
3043 EOF
3044
3045 else
3046   rm -rf conftest*
3047   echo "$ac_t""no" 1>&6
3048 fi
3049 rm -f conftest*
3050
3051
3052 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3053 echo "configure:3054: checking for POSIXized ISC" >&5
3054 if test -d /etc/conf/kconfig.d &&
3055   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3056 then
3057   echo "$ac_t""yes" 1>&6
3058   ISC=yes # If later tests want to check for ISC.
3059   cat >> confdefs.h <<\EOF
3060 #define _POSIX_SOURCE 1
3061 EOF
3062
3063   if test "$GCC" = yes; then
3064     CC="$CC -posix"
3065   else
3066     CC="$CC -Xp"
3067   fi
3068 else
3069   echo "$ac_t""no" 1>&6
3070   ISC=
3071 fi
3072
3073 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
3074 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
3075 echo "configure:3076: checking for minix/config.h" >&5
3076 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3077   echo $ac_n "(cached) $ac_c" 1>&6
3078 else
3079   cat > conftest.$ac_ext <<EOF
3080 #line 3081 "configure"
3081 #include "confdefs.h"
3082 #include <minix/config.h>
3083 EOF
3084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3085 { (eval echo configure:3086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3087 if test -z "$ac_err"; then
3088   rm -rf conftest*
3089   eval "ac_cv_header_$ac_safe=yes"
3090 else
3091   echo "$ac_err" >&5
3092   echo "configure: failed program was:" >&5
3093   cat conftest.$ac_ext >&5
3094   rm -rf conftest*
3095   eval "ac_cv_header_$ac_safe=no"
3096 fi
3097 rm -f conftest*
3098 fi
3099 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3100   echo "$ac_t""yes" 1>&6
3101   MINIX=yes
3102 else
3103   echo "$ac_t""no" 1>&6
3104 MINIX=
3105 fi
3106
3107 if test "$MINIX" = yes; then
3108   cat >> confdefs.h <<\EOF
3109 #define _POSIX_SOURCE 1
3110 EOF
3111
3112   cat >> confdefs.h <<\EOF
3113 #define _POSIX_1_SOURCE 2
3114 EOF
3115
3116   cat >> confdefs.h <<\EOF
3117 #define _MINIX 1
3118 EOF
3119
3120 fi
3121
3122
3123 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
3124 echo "configure:3125: checking for be_app in -lbe" >&5
3125 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
3126 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3127   echo $ac_n "(cached) $ac_c" 1>&6
3128 else
3129   ac_save_LIBS="$LIBS"
3130 LIBS="-lbe -lroot -lnet $LIBS"
3131 cat > conftest.$ac_ext <<EOF
3132 #line 3133 "configure"
3133 #include "confdefs.h"
3134 /* Override any gcc2 internal prototype to avoid an error.  */
3135 /* We use char because int might match the return type of a gcc2
3136     builtin and then its argument prototype would still apply.  */
3137 char be_app();
3138
3139 int main() {
3140 be_app()
3141 ; return 0; }
3142 EOF
3143 if { (eval echo configure:3144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3144   rm -rf conftest*
3145   eval "ac_cv_lib_$ac_lib_var=yes"
3146 else
3147   echo "configure: failed program was:" >&5
3148   cat conftest.$ac_ext >&5
3149   rm -rf conftest*
3150   eval "ac_cv_lib_$ac_lib_var=no"
3151 fi
3152 rm -f conftest*
3153 LIBS="$ac_save_LIBS"
3154
3155 fi
3156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3157   echo "$ac_t""yes" 1>&6
3158   LIBS="$LIBS -lbe -lroot -lnet"
3159 else
3160   echo "$ac_t""no" 1>&6
3161 :
3162 fi
3163
3164
3165 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3166 echo "configure:3167: checking for Cygwin environment" >&5
3167 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
3168   echo $ac_n "(cached) $ac_c" 1>&6
3169 else
3170   cat > conftest.$ac_ext <<EOF
3171 #line 3172 "configure"
3172 #include "confdefs.h"
3173
3174 int main() {
3175
3176 #ifndef __CYGWIN__
3177 #define __CYGWIN__ __CYGWIN32__
3178 #endif
3179 return __CYGWIN__;
3180 ; return 0; }
3181 EOF
3182 if { (eval echo configure:3183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3183   rm -rf conftest*
3184   ac_cv_cygwin=yes
3185 else
3186   echo "configure: failed program was:" >&5
3187   cat conftest.$ac_ext >&5
3188   rm -rf conftest*
3189   ac_cv_cygwin=no
3190 fi
3191 rm -f conftest*
3192 rm -f conftest*
3193 fi
3194
3195 echo "$ac_t""$ac_cv_cygwin" 1>&6
3196 CYGWIN=
3197 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3198 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3199 echo "configure:3200: checking for mingw32 environment" >&5
3200 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3201   echo $ac_n "(cached) $ac_c" 1>&6
3202 else
3203   cat > conftest.$ac_ext <<EOF
3204 #line 3205 "configure"
3205 #include "confdefs.h"
3206
3207 int main() {
3208 return __MINGW32__;
3209 ; return 0; }
3210 EOF
3211 if { (eval echo configure:3212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3212   rm -rf conftest*
3213   ac_cv_mingw32=yes
3214 else
3215   echo "configure: failed program was:" >&5
3216   cat conftest.$ac_ext >&5
3217   rm -rf conftest*
3218   ac_cv_mingw32=no
3219 fi
3220 rm -f conftest*
3221 rm -f conftest*
3222 fi
3223
3224 echo "$ac_t""$ac_cv_mingw32" 1>&6
3225 MINGW32=
3226 test "$ac_cv_mingw32" = yes && MINGW32=yes
3227
3228
3229 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3230 echo "configure:3231: checking for executable suffix" >&5
3231 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3232   echo $ac_n "(cached) $ac_c" 1>&6
3233 else
3234   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3235   ac_cv_exeext=.exe
3236 else
3237   rm -f conftest*
3238   echo 'int main () { return 0; }' > conftest.$ac_ext
3239   ac_cv_exeext=
3240   if { (eval echo configure:3241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3241     for file in conftest.*; do
3242       case $file in
3243       *.c | *.o | *.obj) ;;
3244       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3245       esac
3246     done
3247   else
3248     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3249   fi
3250   rm -f conftest*
3251   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3252 fi
3253 fi
3254
3255 EXEEXT=""
3256 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3257 echo "$ac_t""${ac_cv_exeext}" 1>&6
3258 ac_exeext=$EXEEXT
3259
3260 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3261 echo "configure:3262: checking for object suffix" >&5
3262 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
3263   echo $ac_n "(cached) $ac_c" 1>&6
3264 else
3265   rm -f conftest*
3266 echo 'int i = 1;' > conftest.$ac_ext
3267 if { (eval echo configure:3268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3268   for ac_file in conftest.*; do
3269     case $ac_file in
3270     *.c) ;;
3271     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3272     esac
3273   done
3274 else
3275   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3276 fi
3277 rm -f conftest*
3278 fi
3279
3280 echo "$ac_t""$ac_cv_objext" 1>&6
3281 OBJEXT=$ac_cv_objext
3282 ac_objext=$ac_cv_objext
3283
3284
3285 cat >> confdefs.h <<EOF
3286 #define EXEEXT "${EXEEXT}"
3287 EOF
3288
3289
3290
3291
3292
3293 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
3294 echo "configure:3295: checking for ${CC-cc} option to accept ANSI C" >&5
3295 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
3296   echo $ac_n "(cached) $ac_c" 1>&6
3297 else
3298   am_cv_prog_cc_stdc=no
3299 ac_save_CC="$CC"
3300 # Don't try gcc -ansi; that turns off useful extensions and
3301 # breaks some systems' header files.
3302 # AIX                   -qlanglvl=ansi
3303 # Ultrix and OSF/1      -std1
3304 # HP-UX                 -Aa -D_HPUX_SOURCE
3305 # SVR4                  -Xc -D__EXTENSIONS__
3306 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3307 do
3308   CC="$ac_save_CC $ac_arg"
3309   cat > conftest.$ac_ext <<EOF
3310 #line 3311 "configure"
3311 #include "confdefs.h"
3312 #include <stdarg.h>
3313 #include <stdio.h>
3314 #include <sys/types.h>
3315 #include <sys/stat.h>
3316 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3317 struct buf { int x; };
3318 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3319 static char *e (p, i)
3320      char **p;
3321      int i;
3322 {
3323   return p[i];
3324 }
3325 static char *f (char * (*g) (char **, int), char **p, ...)
3326 {
3327   char *s;
3328   va_list v;
3329   va_start (v,p);
3330   s = g (p, va_arg (v,int));
3331   va_end (v);
3332   return s;
3333 }
3334 int test (int i, double x);
3335 struct s1 {int (*f) (int a);};
3336 struct s2 {int (*f) (double a);};
3337 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3338 int argc;
3339 char **argv;
3340
3341 int main() {
3342
3343 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3344
3345 ; return 0; }
3346 EOF
3347 if { (eval echo configure:3348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3348   rm -rf conftest*
3349   am_cv_prog_cc_stdc="$ac_arg"; break
3350 else
3351   echo "configure: failed program was:" >&5
3352   cat conftest.$ac_ext >&5
3353 fi
3354 rm -f conftest*
3355 done
3356 CC="$ac_save_CC"
3357
3358 fi
3359
3360 if test -z "$am_cv_prog_cc_stdc"; then
3361   echo "$ac_t""none needed" 1>&6
3362 else
3363   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3364 fi
3365 case "x$am_cv_prog_cc_stdc" in
3366   x|xno) ;;
3367   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3368 esac
3369
3370 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3371         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
3372 fi
3373
3374
3375 # test for make depend flag
3376 OL_MKDEP=
3377 OL_MKDEP_FLAGS=
3378 if test -z "${MKDEP}"; then
3379         OL_MKDEP="${CC-cc}"
3380         if test -z "${MKDEP_FLAGS}"; then
3381                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
3382 echo "configure:3383: checking for ${OL_MKDEP} depend flag" >&5
3383 if eval "test \"`echo '$''{'ol_cv_mkdep'+set}'`\" = set"; then
3384   echo $ac_n "(cached) $ac_c" 1>&6
3385 else
3386   
3387                         ol_cv_mkdep=no
3388                         for flag in "-M" "-xM"; do
3389                                 cat > conftest.c <<EOF
3390  noCode;
3391 EOF
3392                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:3393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
3393                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
3394                                 then
3395                                         if test ! -f conftest."${ac_object}" ; then
3396                                                 ol_cv_mkdep=$flag
3397                                                 OL_MKDEP_FLAGS="$flag"
3398                                                 break
3399                                         fi
3400                                 fi
3401                         done
3402                         rm -f conftest*
3403                 
3404 fi
3405
3406 echo "$ac_t""$ol_cv_mkdep" 1>&6
3407         else
3408                 cc_cv_mkdep=yes
3409                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3410         fi
3411 else
3412         cc_cv_mkdep=yes
3413         OL_MKDEP="${MKDEP}"
3414         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
3415 fi
3416
3417
3418
3419 if test "${ol_cv_mkdep}" = no ; then
3420         # this will soon become an error
3421         echo "configure: warning: do not know how to generate dependencies" 1>&2
3422 fi
3423
3424
3425
3426 echo $ac_n "checking for socket""... $ac_c" 1>&6
3427 echo "configure:3428: checking for socket" >&5
3428 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
3429   echo $ac_n "(cached) $ac_c" 1>&6
3430 else
3431   cat > conftest.$ac_ext <<EOF
3432 #line 3433 "configure"
3433 #include "confdefs.h"
3434 /* System header to define __stub macros and hopefully few prototypes,
3435     which can conflict with char socket(); below.  */
3436 #include <assert.h>
3437 /* Override any gcc2 internal prototype to avoid an error.  */
3438 /* We use char because int might match the return type of a gcc2
3439     builtin and then its argument prototype would still apply.  */
3440 char socket();
3441
3442 int main() {
3443
3444 /* The GNU C library defines this for functions which it implements
3445     to always fail with ENOSYS.  Some functions are actually named
3446     something starting with __ and the normal name is an alias.  */
3447 #if defined (__stub_socket) || defined (__stub___socket)
3448 choke me
3449 #else
3450 socket();
3451 #endif
3452
3453 ; return 0; }
3454 EOF
3455 if { (eval echo configure:3456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3456   rm -rf conftest*
3457   eval "ac_cv_func_socket=yes"
3458 else
3459   echo "configure: failed program was:" >&5
3460   cat conftest.$ac_ext >&5
3461   rm -rf conftest*
3462   eval "ac_cv_func_socket=no"
3463 fi
3464 rm -f conftest*
3465 fi
3466
3467 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3468   echo "$ac_t""yes" 1>&6
3469   :
3470 else
3471   echo "$ac_t""no" 1>&6
3472         
3473         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3474 echo "configure:3475: checking for main in -lsocket" >&5
3475 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3476 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3477   echo $ac_n "(cached) $ac_c" 1>&6
3478 else
3479   ac_save_LIBS="$LIBS"
3480 LIBS="-lsocket  $LIBS"
3481 cat > conftest.$ac_ext <<EOF
3482 #line 3483 "configure"
3483 #include "confdefs.h"
3484
3485 int main() {
3486 main()
3487 ; return 0; }
3488 EOF
3489 if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3490   rm -rf conftest*
3491   eval "ac_cv_lib_$ac_lib_var=yes"
3492 else
3493   echo "configure: failed program was:" >&5
3494   cat conftest.$ac_ext >&5
3495   rm -rf conftest*
3496   eval "ac_cv_lib_$ac_lib_var=no"
3497 fi
3498 rm -f conftest*
3499 LIBS="$ac_save_LIBS"
3500
3501 fi
3502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3503   echo "$ac_t""yes" 1>&6
3504     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3505     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3506   cat >> confdefs.h <<EOF
3507 #define $ac_tr_lib 1
3508 EOF
3509
3510   LIBS="-lsocket $LIBS"
3511
3512 else
3513   echo "$ac_t""no" 1>&6
3514 fi
3515
3516         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3517 echo "configure:3518: checking for main in -lnet" >&5
3518 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3519 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3520   echo $ac_n "(cached) $ac_c" 1>&6
3521 else
3522   ac_save_LIBS="$LIBS"
3523 LIBS="-lnet  $LIBS"
3524 cat > conftest.$ac_ext <<EOF
3525 #line 3526 "configure"
3526 #include "confdefs.h"
3527
3528 int main() {
3529 main()
3530 ; return 0; }
3531 EOF
3532 if { (eval echo configure:3533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3533   rm -rf conftest*
3534   eval "ac_cv_lib_$ac_lib_var=yes"
3535 else
3536   echo "configure: failed program was:" >&5
3537   cat conftest.$ac_ext >&5
3538   rm -rf conftest*
3539   eval "ac_cv_lib_$ac_lib_var=no"
3540 fi
3541 rm -f conftest*
3542 LIBS="$ac_save_LIBS"
3543
3544 fi
3545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3546   echo "$ac_t""yes" 1>&6
3547     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3548     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3549   cat >> confdefs.h <<EOF
3550 #define $ac_tr_lib 1
3551 EOF
3552
3553   LIBS="-lnet $LIBS"
3554
3555 else
3556   echo "$ac_t""no" 1>&6
3557 fi
3558
3559         echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
3560 echo "configure:3561: checking for socket in -lnet" >&5
3561 ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3562 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3563   echo $ac_n "(cached) $ac_c" 1>&6
3564 else
3565   ac_save_LIBS="$LIBS"
3566 LIBS="-lnet  $LIBS"
3567 cat > conftest.$ac_ext <<EOF
3568 #line 3569 "configure"
3569 #include "confdefs.h"
3570 /* Override any gcc2 internal prototype to avoid an error.  */
3571 /* We use char because int might match the return type of a gcc2
3572     builtin and then its argument prototype would still apply.  */
3573 char socket();
3574
3575 int main() {
3576 socket()
3577 ; return 0; }
3578 EOF
3579 if { (eval echo configure:3580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3580   rm -rf conftest*
3581   eval "ac_cv_lib_$ac_lib_var=yes"
3582 else
3583   echo "configure: failed program was:" >&5
3584   cat conftest.$ac_ext >&5
3585   rm -rf conftest*
3586   eval "ac_cv_lib_$ac_lib_var=no"
3587 fi
3588 rm -f conftest*
3589 LIBS="$ac_save_LIBS"
3590
3591 fi
3592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3593   echo "$ac_t""yes" 1>&6
3594     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3595     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3596   cat >> confdefs.h <<EOF
3597 #define $ac_tr_lib 1
3598 EOF
3599
3600   LIBS="-lnet $LIBS"
3601
3602 else
3603   echo "$ac_t""no" 1>&6
3604 fi
3605
3606         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3607 echo "configure:3608: checking for main in -lnsl_s" >&5
3608 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3609 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3610   echo $ac_n "(cached) $ac_c" 1>&6
3611 else
3612   ac_save_LIBS="$LIBS"
3613 LIBS="-lnsl_s  $LIBS"
3614 cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617
3618 int main() {
3619 main()
3620 ; return 0; }
3621 EOF
3622 if { (eval echo configure:3623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3623   rm -rf conftest*
3624   eval "ac_cv_lib_$ac_lib_var=yes"
3625 else
3626   echo "configure: failed program was:" >&5
3627   cat conftest.$ac_ext >&5
3628   rm -rf conftest*
3629   eval "ac_cv_lib_$ac_lib_var=no"
3630 fi
3631 rm -f conftest*
3632 LIBS="$ac_save_LIBS"
3633
3634 fi
3635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3636   echo "$ac_t""yes" 1>&6
3637     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3638     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3639   cat >> confdefs.h <<EOF
3640 #define $ac_tr_lib 1
3641 EOF
3642
3643   LIBS="-lnsl_s $LIBS"
3644
3645 else
3646   echo "$ac_t""no" 1>&6
3647 fi
3648
3649         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3650 echo "configure:3651: checking for main in -lnsl" >&5
3651 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3652 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3653   echo $ac_n "(cached) $ac_c" 1>&6
3654 else
3655   ac_save_LIBS="$LIBS"
3656 LIBS="-lnsl  $LIBS"
3657 cat > conftest.$ac_ext <<EOF
3658 #line 3659 "configure"
3659 #include "confdefs.h"
3660
3661 int main() {
3662 main()
3663 ; return 0; }
3664 EOF
3665 if { (eval echo configure:3666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3666   rm -rf conftest*
3667   eval "ac_cv_lib_$ac_lib_var=yes"
3668 else
3669   echo "configure: failed program was:" >&5
3670   cat conftest.$ac_ext >&5
3671   rm -rf conftest*
3672   eval "ac_cv_lib_$ac_lib_var=no"
3673 fi
3674 rm -f conftest*
3675 LIBS="$ac_save_LIBS"
3676
3677 fi
3678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3679   echo "$ac_t""yes" 1>&6
3680     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3681     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3682   cat >> confdefs.h <<EOF
3683 #define $ac_tr_lib 1
3684 EOF
3685
3686   LIBS="-lnsl $LIBS"
3687
3688 else
3689   echo "$ac_t""no" 1>&6
3690 fi
3691
3692         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3693 echo "configure:3694: checking for socket in -linet" >&5
3694 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3695 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3696   echo $ac_n "(cached) $ac_c" 1>&6
3697 else
3698   ac_save_LIBS="$LIBS"
3699 LIBS="-linet  $LIBS"
3700 cat > conftest.$ac_ext <<EOF
3701 #line 3702 "configure"
3702 #include "confdefs.h"
3703 /* Override any gcc2 internal prototype to avoid an error.  */
3704 /* We use char because int might match the return type of a gcc2
3705     builtin and then its argument prototype would still apply.  */
3706 char socket();
3707
3708 int main() {
3709 socket()
3710 ; return 0; }
3711 EOF
3712 if { (eval echo configure:3713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3713   rm -rf conftest*
3714   eval "ac_cv_lib_$ac_lib_var=yes"
3715 else
3716   echo "configure: failed program was:" >&5
3717   cat conftest.$ac_ext >&5
3718   rm -rf conftest*
3719   eval "ac_cv_lib_$ac_lib_var=no"
3720 fi
3721 rm -f conftest*
3722 LIBS="$ac_save_LIBS"
3723
3724 fi
3725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3726   echo "$ac_t""yes" 1>&6
3727     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3728     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3729   cat >> confdefs.h <<EOF
3730 #define $ac_tr_lib 1
3731 EOF
3732
3733   LIBS="-linet $LIBS"
3734
3735 else
3736   echo "$ac_t""no" 1>&6
3737 fi
3738
3739         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3740 echo "configure:3741: checking for main in -lgen" >&5
3741 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3742 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3743   echo $ac_n "(cached) $ac_c" 1>&6
3744 else
3745   ac_save_LIBS="$LIBS"
3746 LIBS="-lgen  $LIBS"
3747 cat > conftest.$ac_ext <<EOF
3748 #line 3749 "configure"
3749 #include "confdefs.h"
3750
3751 int main() {
3752 main()
3753 ; return 0; }
3754 EOF
3755 if { (eval echo configure:3756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3756   rm -rf conftest*
3757   eval "ac_cv_lib_$ac_lib_var=yes"
3758 else
3759   echo "configure: failed program was:" >&5
3760   cat conftest.$ac_ext >&5
3761   rm -rf conftest*
3762   eval "ac_cv_lib_$ac_lib_var=no"
3763 fi
3764 rm -f conftest*
3765 LIBS="$ac_save_LIBS"
3766
3767 fi
3768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3769   echo "$ac_t""yes" 1>&6
3770     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3771     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3772   cat >> confdefs.h <<EOF
3773 #define $ac_tr_lib 1
3774 EOF
3775
3776   LIBS="-lgen $LIBS"
3777
3778 else
3779   echo "$ac_t""no" 1>&6
3780 fi
3781
3782
3783 fi
3784
3785
3786 for ac_func in res_search
3787 do
3788 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3789 echo "configure:3790: checking for $ac_func" >&5
3790 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3791   echo $ac_n "(cached) $ac_c" 1>&6
3792 else
3793   cat > conftest.$ac_ext <<EOF
3794 #line 3795 "configure"
3795 #include "confdefs.h"
3796 /* System header to define __stub macros and hopefully few prototypes,
3797     which can conflict with char $ac_func(); below.  */
3798 #include <assert.h>
3799 /* Override any gcc2 internal prototype to avoid an error.  */
3800 /* We use char because int might match the return type of a gcc2
3801     builtin and then its argument prototype would still apply.  */
3802 char $ac_func();
3803
3804 int main() {
3805
3806 /* The GNU C library defines this for functions which it implements
3807     to always fail with ENOSYS.  Some functions are actually named
3808     something starting with __ and the normal name is an alias.  */
3809 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3810 choke me
3811 #else
3812 $ac_func();
3813 #endif
3814
3815 ; return 0; }
3816 EOF
3817 if { (eval echo configure:3818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3818   rm -rf conftest*
3819   eval "ac_cv_func_$ac_func=yes"
3820 else
3821   echo "configure: failed program was:" >&5
3822   cat conftest.$ac_ext >&5
3823   rm -rf conftest*
3824   eval "ac_cv_func_$ac_func=no"
3825 fi
3826 rm -f conftest*
3827 fi
3828
3829 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3830   echo "$ac_t""yes" 1>&6
3831     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3832   cat >> confdefs.h <<EOF
3833 #define $ac_tr_func 1
3834 EOF
3835  
3836 else
3837   echo "$ac_t""no" 1>&6
3838 fi
3839 done
3840
3841 if test $ac_cv_func_res_search = "no" ; then 
3842         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3843 echo "configure:3844: checking for res_search in -lbind" >&5
3844 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3845 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3846   echo $ac_n "(cached) $ac_c" 1>&6
3847 else
3848   ac_save_LIBS="$LIBS"
3849 LIBS="-lbind  $LIBS"
3850 cat > conftest.$ac_ext <<EOF
3851 #line 3852 "configure"
3852 #include "confdefs.h"
3853 /* Override any gcc2 internal prototype to avoid an error.  */
3854 /* We use char because int might match the return type of a gcc2
3855     builtin and then its argument prototype would still apply.  */
3856 char res_search();
3857
3858 int main() {
3859 res_search()
3860 ; return 0; }
3861 EOF
3862 if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3863   rm -rf conftest*
3864   eval "ac_cv_lib_$ac_lib_var=yes"
3865 else
3866   echo "configure: failed program was:" >&5
3867   cat conftest.$ac_ext >&5
3868   rm -rf conftest*
3869   eval "ac_cv_lib_$ac_lib_var=no"
3870 fi
3871 rm -f conftest*
3872 LIBS="$ac_save_LIBS"
3873
3874 fi
3875 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3876   echo "$ac_t""yes" 1>&6
3877     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3878     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3879   cat >> confdefs.h <<EOF
3880 #define $ac_tr_lib 1
3881 EOF
3882
3883   LIBS="-lbind $LIBS"
3884
3885 else
3886   echo "$ac_t""no" 1>&6
3887 fi
3888
3889         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3890                 cat >> confdefs.h <<\EOF
3891 #define HAVE_RES_SEARCH 1
3892 EOF
3893
3894         else
3895                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3896 echo "configure:3897: checking for res_search in -lresolv" >&5
3897 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
3898 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3899   echo $ac_n "(cached) $ac_c" 1>&6
3900 else
3901   ac_save_LIBS="$LIBS"
3902 LIBS="-lresolv  $LIBS"
3903 cat > conftest.$ac_ext <<EOF
3904 #line 3905 "configure"
3905 #include "confdefs.h"
3906 /* Override any gcc2 internal prototype to avoid an error.  */
3907 /* We use char because int might match the return type of a gcc2
3908     builtin and then its argument prototype would still apply.  */
3909 char res_search();
3910
3911 int main() {
3912 res_search()
3913 ; return 0; }
3914 EOF
3915 if { (eval echo configure:3916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3916   rm -rf conftest*
3917   eval "ac_cv_lib_$ac_lib_var=yes"
3918 else
3919   echo "configure: failed program was:" >&5
3920   cat conftest.$ac_ext >&5
3921   rm -rf conftest*
3922   eval "ac_cv_lib_$ac_lib_var=no"
3923 fi
3924 rm -f conftest*
3925 LIBS="$ac_save_LIBS"
3926
3927 fi
3928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3929   echo "$ac_t""yes" 1>&6
3930     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3931     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3932   cat >> confdefs.h <<EOF
3933 #define $ac_tr_lib 1
3934 EOF
3935
3936   LIBS="-lresolv $LIBS"
3937
3938 else
3939   echo "$ac_t""no" 1>&6
3940 fi
3941
3942                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3943                         cat >> confdefs.h <<\EOF
3944 #define HAVE_RES_SEARCH 1
3945 EOF
3946
3947                 fi
3948         fi
3949 fi
3950
3951 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3952 echo "configure:3953: checking for sigset in -lV3" >&5
3953 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3954 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   ac_save_LIBS="$LIBS"
3958 LIBS="-lV3  $LIBS"
3959 cat > conftest.$ac_ext <<EOF
3960 #line 3961 "configure"
3961 #include "confdefs.h"
3962 /* Override any gcc2 internal prototype to avoid an error.  */
3963 /* We use char because int might match the return type of a gcc2
3964     builtin and then its argument prototype would still apply.  */
3965 char sigset();
3966
3967 int main() {
3968 sigset()
3969 ; return 0; }
3970 EOF
3971 if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3972   rm -rf conftest*
3973   eval "ac_cv_lib_$ac_lib_var=yes"
3974 else
3975   echo "configure: failed program was:" >&5
3976   cat conftest.$ac_ext >&5
3977   rm -rf conftest*
3978   eval "ac_cv_lib_$ac_lib_var=no"
3979 fi
3980 rm -f conftest*
3981 LIBS="$ac_save_LIBS"
3982
3983 fi
3984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3985   echo "$ac_t""yes" 1>&6
3986     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3987     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3988   cat >> confdefs.h <<EOF
3989 #define $ac_tr_lib 1
3990 EOF
3991
3992   LIBS="-lV3 $LIBS"
3993
3994 else
3995   echo "$ac_t""no" 1>&6
3996 fi
3997
3998
3999 for ac_hdr in regex.h 
4000 do
4001 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4002 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4003 echo "configure:4004: checking for $ac_hdr" >&5
4004 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4005   echo $ac_n "(cached) $ac_c" 1>&6
4006 else
4007   cat > conftest.$ac_ext <<EOF
4008 #line 4009 "configure"
4009 #include "confdefs.h"
4010 #include <$ac_hdr>
4011 EOF
4012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4013 { (eval echo configure:4014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4015 if test -z "$ac_err"; then
4016   rm -rf conftest*
4017   eval "ac_cv_header_$ac_safe=yes"
4018 else
4019   echo "$ac_err" >&5
4020   echo "configure: failed program was:" >&5
4021   cat conftest.$ac_ext >&5
4022   rm -rf conftest*
4023   eval "ac_cv_header_$ac_safe=no"
4024 fi
4025 rm -f conftest*
4026 fi
4027 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4028   echo "$ac_t""yes" 1>&6
4029     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4030   cat >> confdefs.h <<EOF
4031 #define $ac_tr_hdr 1
4032 EOF
4033  
4034 else
4035   echo "$ac_t""no" 1>&6
4036 fi
4037 done
4038
4039 if test "$ac_cv_header_regex_h" != yes ; then
4040         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
4041 fi
4042 echo $ac_n "checking for regfree""... $ac_c" 1>&6
4043 echo "configure:4044: checking for regfree" >&5
4044 if eval "test \"`echo '$''{'ac_cv_func_regfree'+set}'`\" = set"; then
4045   echo $ac_n "(cached) $ac_c" 1>&6
4046 else
4047   cat > conftest.$ac_ext <<EOF
4048 #line 4049 "configure"
4049 #include "confdefs.h"
4050 /* System header to define __stub macros and hopefully few prototypes,
4051     which can conflict with char regfree(); below.  */
4052 #include <assert.h>
4053 /* Override any gcc2 internal prototype to avoid an error.  */
4054 /* We use char because int might match the return type of a gcc2
4055     builtin and then its argument prototype would still apply.  */
4056 char regfree();
4057
4058 int main() {
4059
4060 /* The GNU C library defines this for functions which it implements
4061     to always fail with ENOSYS.  Some functions are actually named
4062     something starting with __ and the normal name is an alias.  */
4063 #if defined (__stub_regfree) || defined (__stub___regfree)
4064 choke me
4065 #else
4066 regfree();
4067 #endif
4068
4069 ; return 0; }
4070 EOF
4071 if { (eval echo configure:4072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4072   rm -rf conftest*
4073   eval "ac_cv_func_regfree=yes"
4074 else
4075   echo "configure: failed program was:" >&5
4076   cat conftest.$ac_ext >&5
4077   rm -rf conftest*
4078   eval "ac_cv_func_regfree=no"
4079 fi
4080 rm -f conftest*
4081 fi
4082
4083 if eval "test \"`echo '$ac_cv_func_'regfree`\" = yes"; then
4084   echo "$ac_t""yes" 1>&6
4085   :
4086 else
4087   echo "$ac_t""no" 1>&6
4088 { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
4089 fi
4090
4091
4092
4093 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
4094 echo "configure:4095: checking for compatible POSIX regex" >&5
4095 if eval "test \"`echo '$''{'ol_cv_c_posix_regex'+set}'`\" = set"; then
4096   echo $ac_n "(cached) $ac_c" 1>&6
4097 else
4098   
4099         if test "$cross_compiling" = yes; then
4100   ol_cv_c_posix_regex=cross
4101 else
4102   cat > conftest.$ac_ext <<EOF
4103 #line 4104 "configure"
4104 #include "confdefs.h"
4105
4106 #include <sys/types.h>
4107 #include <regex.h>
4108 static char *pattern, *string;
4109 main()
4110 {
4111         int rc;
4112         regex_t re;
4113
4114         pattern = "^A";
4115
4116         if(regcomp(&re, pattern, 0)) {
4117                 return -1;
4118         }
4119         
4120         string = "ALL MATCH";
4121         
4122         rc = regexec(&re, string, 0, (void*)0, 0);
4123
4124         regfree(&re);
4125
4126         return rc;
4127 }
4128 EOF
4129 if { (eval echo configure:4130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4130 then
4131   ol_cv_c_posix_regex=yes
4132 else
4133   echo "configure: failed program was:" >&5
4134   cat conftest.$ac_ext >&5
4135   rm -fr conftest*
4136   ol_cv_c_posix_regex=no
4137 fi
4138 rm -fr conftest*
4139 fi
4140
4141 fi
4142
4143 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
4144
4145 if test "$ol_cv_c_posix_regex" = no ; then
4146         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
4147 fi
4148
4149 echo $ac_n "checking for select""... $ac_c" 1>&6
4150 echo "configure:4151: checking for select" >&5
4151 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
4152   echo $ac_n "(cached) $ac_c" 1>&6
4153 else
4154   cat > conftest.$ac_ext <<EOF
4155 #line 4156 "configure"
4156 #include "confdefs.h"
4157 /* System header to define __stub macros and hopefully few prototypes,
4158     which can conflict with char select(); below.  */
4159 #include <assert.h>
4160 /* Override any gcc2 internal prototype to avoid an error.  */
4161 /* We use char because int might match the return type of a gcc2
4162     builtin and then its argument prototype would still apply.  */
4163 char select();
4164
4165 int main() {
4166
4167 /* The GNU C library defines this for functions which it implements
4168     to always fail with ENOSYS.  Some functions are actually named
4169     something starting with __ and the normal name is an alias.  */
4170 #if defined (__stub_select) || defined (__stub___select)
4171 choke me
4172 #else
4173 select();
4174 #endif
4175
4176 ; return 0; }
4177 EOF
4178 if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4179   rm -rf conftest*
4180   eval "ac_cv_func_select=yes"
4181 else
4182   echo "configure: failed program was:" >&5
4183   cat conftest.$ac_ext >&5
4184   rm -rf conftest*
4185   eval "ac_cv_func_select=no"
4186 fi
4187 rm -f conftest*
4188 fi
4189
4190 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
4191   echo "$ac_t""yes" 1>&6
4192   :
4193 else
4194   echo "$ac_t""no" 1>&6
4195 { echo "configure: error: select() required." 1>&2; exit 1; }
4196 fi
4197
4198
4199 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
4200 echo "configure:4201: checking types of arguments for select()" >&5
4201  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
4202   echo $ac_n "(cached) $ac_c" 1>&6
4203 else
4204    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
4205   echo $ac_n "(cached) $ac_c" 1>&6
4206 else
4207     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
4208   echo $ac_n "(cached) $ac_c" 1>&6
4209 else
4210      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
4211      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
4212       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
4213        cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4216 #ifdef HAVE_SYS_TYPES_H
4217 #include <sys/types.h>
4218 #endif
4219 #ifdef HAVE_SYS_TIME_H
4220 #include <sys/time.h>
4221 #endif
4222 #ifdef HAVE_SYS_SELECT_H
4223 #include <sys/select.h>
4224 #endif
4225 #ifdef HAVE_SYS_SOCKET_H
4226 #include <sys/socket.h>
4227 #endif
4228 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);
4229 int main() {
4230
4231 ; return 0; }
4232 EOF
4233 if { (eval echo configure:4234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4234   rm -rf conftest*
4235           ac_not_found=no ; break 3
4236 else
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   ac_not_found=yes
4241 fi
4242 rm -f conftest*
4243       done
4244      done
4245     done
4246    
4247 fi
4248   
4249 fi
4250  
4251 fi
4252  if test "$ac_not_found" = yes; then
4253   ac_cv_func_select_arg1=int 
4254   ac_cv_func_select_arg234='int *' 
4255   ac_cv_func_select_arg5='struct timeval *'
4256  fi
4257  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
4258  cat >> confdefs.h <<EOF
4259 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
4260 EOF
4261
4262  cat >> confdefs.h <<EOF
4263 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
4264 EOF
4265
4266  cat >> confdefs.h <<EOF
4267 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
4268 EOF
4269
4270
4271
4272 # ISODE tests
4273 ol_link_isode=no
4274 if test $ol_enable_ldapd != no ; then
4275         echo "configure: warning: ldapd is not supported and may suffer from bit rot." 1>&2
4276
4277                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
4278 echo "configure:4279: checking for main in -lxtpp" >&5
4279 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
4280 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4281   echo $ac_n "(cached) $ac_c" 1>&6
4282 else
4283   ac_save_LIBS="$LIBS"
4284 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
4285 cat > conftest.$ac_ext <<EOF
4286 #line 4287 "configure"
4287 #include "confdefs.h"
4288
4289 int main() {
4290 main()
4291 ; return 0; }
4292 EOF
4293 if { (eval echo configure:4294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4294   rm -rf conftest*
4295   eval "ac_cv_lib_$ac_lib_var=yes"
4296 else
4297   echo "configure: failed program was:" >&5
4298   cat conftest.$ac_ext >&5
4299   rm -rf conftest*
4300   eval "ac_cv_lib_$ac_lib_var=no"
4301 fi
4302 rm -f conftest*
4303 LIBS="$ac_save_LIBS"
4304
4305 fi
4306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4307   echo "$ac_t""yes" 1>&6
4308   
4309                 ol_link_isode=yes
4310                 cat >> confdefs.h <<\EOF
4311 #define HAVE_XTPP 1
4312 EOF
4313
4314                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
4315                 
4316 else
4317   echo "$ac_t""no" 1>&6
4318 :
4319 fi
4320
4321         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
4322 echo "configure:4323: checking for main in -ldsap" >&5
4323 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
4324 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4325   echo $ac_n "(cached) $ac_c" 1>&6
4326 else
4327   ac_save_LIBS="$LIBS"
4328 LIBS="-ldsap -lisode $LIBS"
4329 cat > conftest.$ac_ext <<EOF
4330 #line 4331 "configure"
4331 #include "confdefs.h"
4332
4333 int main() {
4334 main()
4335 ; return 0; }
4336 EOF
4337 if { (eval echo configure:4338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4338   rm -rf conftest*
4339   eval "ac_cv_lib_$ac_lib_var=yes"
4340 else
4341   echo "configure: failed program was:" >&5
4342   cat conftest.$ac_ext >&5
4343   rm -rf conftest*
4344   eval "ac_cv_lib_$ac_lib_var=no"
4345 fi
4346 rm -f conftest*
4347 LIBS="$ac_save_LIBS"
4348
4349 fi
4350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4351   echo "$ac_t""yes" 1>&6
4352   
4353                 ol_link_isode=yes
4354                 cat >> confdefs.h <<\EOF
4355 #define HAVE_DSAP 1
4356 EOF
4357
4358                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
4359                 
4360 else
4361   echo "$ac_t""no" 1>&6
4362 :
4363 fi
4364
4365         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
4366 echo "configure:4367: checking for main in -lisode" >&5
4367 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
4368 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4369   echo $ac_n "(cached) $ac_c" 1>&6
4370 else
4371   ac_save_LIBS="$LIBS"
4372 LIBS="-lisode  $LIBS"
4373 cat > conftest.$ac_ext <<EOF
4374 #line 4375 "configure"
4375 #include "confdefs.h"
4376
4377 int main() {
4378 main()
4379 ; return 0; }
4380 EOF
4381 if { (eval echo configure:4382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4382   rm -rf conftest*
4383   eval "ac_cv_lib_$ac_lib_var=yes"
4384 else
4385   echo "configure: failed program was:" >&5
4386   cat conftest.$ac_ext >&5
4387   rm -rf conftest*
4388   eval "ac_cv_lib_$ac_lib_var=no"
4389 fi
4390 rm -f conftest*
4391 LIBS="$ac_save_LIBS"
4392
4393 fi
4394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4395   echo "$ac_t""yes" 1>&6
4396   
4397                 ol_link_isode=yes
4398                 cat >> confdefs.h <<\EOF
4399 #define HAVE_ISODE 1
4400 EOF
4401
4402                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
4403                 
4404 else
4405   echo "$ac_t""no" 1>&6
4406 :
4407 fi
4408
4409 fi
4410
4411 if test $ol_link_isode != no; then
4412         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
4413 echo "configure:4414: checking for main in -lpp" >&5
4414 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
4415 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4416   echo $ac_n "(cached) $ac_c" 1>&6
4417 else
4418   ac_save_LIBS="$LIBS"
4419 LIBS="-lpp  $LIBS"
4420 cat > conftest.$ac_ext <<EOF
4421 #line 4422 "configure"
4422 #include "confdefs.h"
4423
4424 int main() {
4425 main()
4426 ; return 0; }
4427 EOF
4428 if { (eval echo configure:4429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4429   rm -rf conftest*
4430   eval "ac_cv_lib_$ac_lib_var=yes"
4431 else
4432   echo "configure: failed program was:" >&5
4433   cat conftest.$ac_ext >&5
4434   rm -rf conftest*
4435   eval "ac_cv_lib_$ac_lib_var=no"
4436 fi
4437 rm -f conftest*
4438 LIBS="$ac_save_LIBS"
4439
4440 fi
4441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4442   echo "$ac_t""yes" 1>&6
4443   
4444                 cat >> confdefs.h <<\EOF
4445 #define HAVE_PP 1
4446 EOF
4447
4448                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
4449                 
4450 else
4451   echo "$ac_t""no" 1>&6
4452 :
4453 fi
4454
4455
4456         # Extract the first word of "pepsy", so it can be a program name with args.
4457 set dummy pepsy; ac_word=$2
4458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4459 echo "configure:4460: checking for $ac_word" >&5
4460 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
4461   echo $ac_n "(cached) $ac_c" 1>&6
4462 else
4463   case "$PEPSY" in
4464   /*)
4465   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
4466   ;;
4467   ?:/*)                  
4468   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
4469   ;;
4470   *)
4471   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4472   ac_dummy="$PATH"
4473   for ac_dir in $ac_dummy; do 
4474     test -z "$ac_dir" && ac_dir=.
4475     if test -f $ac_dir/$ac_word; then
4476       ac_cv_path_PEPSY="$ac_dir/$ac_word"
4477       break
4478     fi
4479   done
4480   IFS="$ac_save_ifs"
4481   ;;
4482 esac
4483 fi
4484 PEPSY="$ac_cv_path_PEPSY"
4485 if test -n "$PEPSY"; then
4486   echo "$ac_t""$PEPSY" 1>&6
4487 else
4488   echo "$ac_t""no" 1>&6
4489 fi
4490
4491 fi
4492
4493 ol_link_kerberos=no
4494
4495 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
4496         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
4497 do
4498 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4499 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4500 echo "configure:4501: checking for $ac_hdr" >&5
4501 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4502   echo $ac_n "(cached) $ac_c" 1>&6
4503 else
4504   cat > conftest.$ac_ext <<EOF
4505 #line 4506 "configure"
4506 #include "confdefs.h"
4507 #include <$ac_hdr>
4508 EOF
4509 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4510 { (eval echo configure:4511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4511 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4512 if test -z "$ac_err"; then
4513   rm -rf conftest*
4514   eval "ac_cv_header_$ac_safe=yes"
4515 else
4516   echo "$ac_err" >&5
4517   echo "configure: failed program was:" >&5
4518   cat conftest.$ac_ext >&5
4519   rm -rf conftest*
4520   eval "ac_cv_header_$ac_safe=no"
4521 fi
4522 rm -f conftest*
4523 fi
4524 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4525   echo "$ac_t""yes" 1>&6
4526     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4527   cat >> confdefs.h <<EOF
4528 #define $ac_tr_hdr 1
4529 EOF
4530  
4531 else
4532   echo "$ac_t""no" 1>&6
4533 fi
4534 done
4535
4536
4537         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
4538                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
4539 echo "configure:4540: checking for main in -lkrb4" >&5
4540 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
4541 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4542   echo $ac_n "(cached) $ac_c" 1>&6
4543 else
4544   ac_save_LIBS="$LIBS"
4545 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
4546 cat > conftest.$ac_ext <<EOF
4547 #line 4548 "configure"
4548 #include "confdefs.h"
4549
4550 int main() {
4551 main()
4552 ; return 0; }
4553 EOF
4554 if { (eval echo configure:4555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4555   rm -rf conftest*
4556   eval "ac_cv_lib_$ac_lib_var=yes"
4557 else
4558   echo "configure: failed program was:" >&5
4559   cat conftest.$ac_ext >&5
4560   rm -rf conftest*
4561   eval "ac_cv_lib_$ac_lib_var=no"
4562 fi
4563 rm -f conftest*
4564 LIBS="$ac_save_LIBS"
4565
4566 fi
4567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4568   echo "$ac_t""yes" 1>&6
4569   have_k5=yes
4570 else
4571   echo "$ac_t""no" 1>&6
4572 have_k5=no
4573 fi
4574
4575
4576                 if test $have_k5 = yes ; then
4577                         ol_with_kerberos=found
4578                         ol_link_kerberos=yes
4579
4580                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
4581
4582                         LIBS="$KRB_LIBS $LIBS"
4583
4584                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
4585 echo "configure:4586: checking for des_debug in Kerberos libraries" >&5
4586 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
4587   echo $ac_n "(cached) $ac_c" 1>&6
4588 else
4589   
4590                                                                 save_LIBS="$LIBS"
4591                                 LIBS="$KRB_LIBS $LIBS"
4592                                 cat > conftest.$ac_ext <<EOF
4593 #line 4594 "configure"
4594 #include "confdefs.h"
4595
4596 #include <kerberosIV/krb.h>
4597 #include <kerberosIV/des.h>
4598 extern int des_debug;
4599
4600 int main() {
4601
4602 des_debug = 1;
4603
4604 ; return 0; }
4605 EOF
4606 if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4607   rm -rf conftest*
4608   ol_cv_var_des_debug=yes
4609 else
4610   echo "configure: failed program was:" >&5
4611   cat conftest.$ac_ext >&5
4612   rm -rf conftest*
4613   ol_cv_var_des_debug=no
4614 fi
4615 rm -f conftest*
4616                                                                 LIBS="$save_LIBS"
4617                         
4618 fi
4619
4620 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
4621
4622                         if test $ol_cv_var_des_debug = yes ; then
4623                                 cat >> confdefs.h <<\EOF
4624 #define HAVE_DES_DEBUG 1
4625 EOF
4626
4627                         fi
4628
4629                         LIBS="$save_LIBS"
4630                 fi
4631         fi
4632 fi
4633
4634 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
4635         for ac_hdr in krb.h des.h
4636 do
4637 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4638 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4639 echo "configure:4640: checking for $ac_hdr" >&5
4640 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4641   echo $ac_n "(cached) $ac_c" 1>&6
4642 else
4643   cat > conftest.$ac_ext <<EOF
4644 #line 4645 "configure"
4645 #include "confdefs.h"
4646 #include <$ac_hdr>
4647 EOF
4648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4649 { (eval echo configure:4650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4651 if test -z "$ac_err"; then
4652   rm -rf conftest*
4653   eval "ac_cv_header_$ac_safe=yes"
4654 else
4655   echo "$ac_err" >&5
4656   echo "configure: failed program was:" >&5
4657   cat conftest.$ac_ext >&5
4658   rm -rf conftest*
4659   eval "ac_cv_header_$ac_safe=no"
4660 fi
4661 rm -f conftest*
4662 fi
4663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4664   echo "$ac_t""yes" 1>&6
4665     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4666   cat >> confdefs.h <<EOF
4667 #define $ac_tr_hdr 1
4668 EOF
4669  
4670 else
4671   echo "$ac_t""no" 1>&6
4672 fi
4673 done
4674
4675
4676         if test $ac_cv_header_krb_h = yes ; then
4677                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
4678 echo "configure:4679: checking for main in -lkrb" >&5
4679 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
4680 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4681   echo $ac_n "(cached) $ac_c" 1>&6
4682 else
4683   ac_save_LIBS="$LIBS"
4684 LIBS="-lkrb -ldes $LIBS"
4685 cat > conftest.$ac_ext <<EOF
4686 #line 4687 "configure"
4687 #include "confdefs.h"
4688
4689 int main() {
4690 main()
4691 ; return 0; }
4692 EOF
4693 if { (eval echo configure:4694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4694   rm -rf conftest*
4695   eval "ac_cv_lib_$ac_lib_var=yes"
4696 else
4697   echo "configure: failed program was:" >&5
4698   cat conftest.$ac_ext >&5
4699   rm -rf conftest*
4700   eval "ac_cv_lib_$ac_lib_var=no"
4701 fi
4702 rm -f conftest*
4703 LIBS="$ac_save_LIBS"
4704
4705 fi
4706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4707   echo "$ac_t""yes" 1>&6
4708   have_k4=yes
4709 else
4710   echo "$ac_t""no" 1>&6
4711 have_k4=no
4712 fi
4713
4714
4715                 if test $have_k4 = yes ; then
4716                         ol_with_kerberos=found
4717                         ol_link_kerberos=yes
4718
4719                         KRB_LIBS="-lkrb -ldes"
4720                 fi
4721         fi
4722 fi
4723
4724 if test $ol_link_kerberos = yes ; then
4725         cat >> confdefs.h <<\EOF
4726 #define HAVE_KERBEROS 1
4727 EOF
4728
4729 fi
4730
4731 ol_link_tls=no
4732 if test $ol_with_tls != no ; then
4733         
4734         for ac_hdr in ssl.h
4735 do
4736 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4737 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4738 echo "configure:4739: checking for $ac_hdr" >&5
4739 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4740   echo $ac_n "(cached) $ac_c" 1>&6
4741 else
4742   cat > conftest.$ac_ext <<EOF
4743 #line 4744 "configure"
4744 #include "confdefs.h"
4745 #include <$ac_hdr>
4746 EOF
4747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4748 { (eval echo configure:4749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4750 if test -z "$ac_err"; then
4751   rm -rf conftest*
4752   eval "ac_cv_header_$ac_safe=yes"
4753 else
4754   echo "$ac_err" >&5
4755   echo "configure: failed program was:" >&5
4756   cat conftest.$ac_ext >&5
4757   rm -rf conftest*
4758   eval "ac_cv_header_$ac_safe=no"
4759 fi
4760 rm -f conftest*
4761 fi
4762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4763   echo "$ac_t""yes" 1>&6
4764     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4765   cat >> confdefs.h <<EOF
4766 #define $ac_tr_hdr 1
4767 EOF
4768  
4769 else
4770   echo "$ac_t""no" 1>&6
4771 fi
4772 done
4773
4774         
4775         if test $ac_cv_header_ssl_h = yes ; then
4776                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
4777 echo "configure:4778: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
4778 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
4779 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4780   echo $ac_n "(cached) $ac_c" 1>&6
4781 else
4782   ac_save_LIBS="$LIBS"
4783 LIBS="-lssl -lcrypto $LIBS"
4784 cat > conftest.$ac_ext <<EOF
4785 #line 4786 "configure"
4786 #include "confdefs.h"
4787 /* Override any gcc2 internal prototype to avoid an error.  */
4788 /* We use char because int might match the return type of a gcc2
4789     builtin and then its argument prototype would still apply.  */
4790 char SSLeay_add_ssl_algorithms();
4791
4792 int main() {
4793 SSLeay_add_ssl_algorithms()
4794 ; return 0; }
4795 EOF
4796 if { (eval echo configure:4797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4797   rm -rf conftest*
4798   eval "ac_cv_lib_$ac_lib_var=yes"
4799 else
4800   echo "configure: failed program was:" >&5
4801   cat conftest.$ac_ext >&5
4802   rm -rf conftest*
4803   eval "ac_cv_lib_$ac_lib_var=no"
4804 fi
4805 rm -f conftest*
4806 LIBS="$ac_save_LIBS"
4807
4808 fi
4809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4810   echo "$ac_t""yes" 1>&6
4811   have_ssleay=yes
4812                         need_rsaref=no
4813 else
4814   echo "$ac_t""no" 1>&6
4815 have_ssleay=no
4816 fi
4817
4818                         
4819                 if test $have_ssleay = no ; then
4820                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4821 echo "configure:4822: checking for ssl3_accept in -lssl" >&5
4822 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4823 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4824   echo $ac_n "(cached) $ac_c" 1>&6
4825 else
4826   ac_save_LIBS="$LIBS"
4827 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4828 cat > conftest.$ac_ext <<EOF
4829 #line 4830 "configure"
4830 #include "confdefs.h"
4831 /* Override any gcc2 internal prototype to avoid an error.  */
4832 /* We use char because int might match the return type of a gcc2
4833     builtin and then its argument prototype would still apply.  */
4834 char ssl3_accept();
4835
4836 int main() {
4837 ssl3_accept()
4838 ; return 0; }
4839 EOF
4840 if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4841   rm -rf conftest*
4842   eval "ac_cv_lib_$ac_lib_var=yes"
4843 else
4844   echo "configure: failed program was:" >&5
4845   cat conftest.$ac_ext >&5
4846   rm -rf conftest*
4847   eval "ac_cv_lib_$ac_lib_var=no"
4848 fi
4849 rm -f conftest*
4850 LIBS="$ac_save_LIBS"
4851
4852 fi
4853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4854   echo "$ac_t""yes" 1>&6
4855   have_ssleay=yes
4856                                 need_rsaref=yes
4857 else
4858   echo "$ac_t""no" 1>&6
4859 have_ssleay=no
4860 fi
4861
4862                 fi
4863
4864                 if test $have_ssleay = yes ; then
4865                         ol_with_tls=found
4866                         ol_link_tls=yes
4867
4868                         cat >> confdefs.h <<\EOF
4869 #define HAVE_SSLEAY 1
4870 EOF
4871
4872
4873                         if test $need_rsaref = yes; then
4874                                 cat >> confdefs.h <<\EOF
4875 #define HAVE_RSAREF 1
4876 EOF
4877
4878
4879                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4880                         else
4881                                 TLS_LIBS="-lssl -lcrypto"
4882                         fi
4883                 fi
4884         fi
4885 fi
4886
4887 if test $ol_link_tls = yes ; then
4888         cat >> confdefs.h <<\EOF
4889 #define HAVE_TLS 1
4890 EOF
4891
4892 fi      
4893
4894 for ac_func in \
4895         ctime_r                 \
4896         gethostbyname_r gethostbyaddr_r \
4897
4898 do
4899 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4900 echo "configure:4901: checking for $ac_func" >&5
4901 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4902   echo $ac_n "(cached) $ac_c" 1>&6
4903 else
4904   cat > conftest.$ac_ext <<EOF
4905 #line 4906 "configure"
4906 #include "confdefs.h"
4907 /* System header to define __stub macros and hopefully few prototypes,
4908     which can conflict with char $ac_func(); below.  */
4909 #include <assert.h>
4910 /* Override any gcc2 internal prototype to avoid an error.  */
4911 /* We use char because int might match the return type of a gcc2
4912     builtin and then its argument prototype would still apply.  */
4913 char $ac_func();
4914
4915 int main() {
4916
4917 /* The GNU C library defines this for functions which it implements
4918     to always fail with ENOSYS.  Some functions are actually named
4919     something starting with __ and the normal name is an alias.  */
4920 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4921 choke me
4922 #else
4923 $ac_func();
4924 #endif
4925
4926 ; return 0; }
4927 EOF
4928 if { (eval echo configure:4929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4929   rm -rf conftest*
4930   eval "ac_cv_func_$ac_func=yes"
4931 else
4932   echo "configure: failed program was:" >&5
4933   cat conftest.$ac_ext >&5
4934   rm -rf conftest*
4935   eval "ac_cv_func_$ac_func=no"
4936 fi
4937 rm -f conftest*
4938 fi
4939
4940 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4941   echo "$ac_t""yes" 1>&6
4942     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4943   cat >> confdefs.h <<EOF
4944 #define $ac_tr_func 1
4945 EOF
4946  
4947 else
4948   echo "$ac_t""no" 1>&6
4949 fi
4950 done
4951
4952
4953 if test "$ac_cv_func_ctime_r" = no ; then
4954         ol_cv_func_ctime_r_nargs=0
4955 else
4956         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4957 echo "configure:4958: checking number of arguments of ctime_r" >&5
4958 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
4959   echo $ac_n "(cached) $ac_c" 1>&6
4960 else
4961   cat > conftest.$ac_ext <<EOF
4962 #line 4963 "configure"
4963 #include "confdefs.h"
4964 #include <time.h>
4965 int main() {
4966 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4967 ; return 0; }
4968 EOF
4969 if { (eval echo configure:4970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4970   rm -rf conftest*
4971   ol_cv_func_ctime_r_nargs=3
4972 else
4973   echo "configure: failed program was:" >&5
4974   cat conftest.$ac_ext >&5
4975   rm -rf conftest*
4976   cat > conftest.$ac_ext <<EOF
4977 #line 4978 "configure"
4978 #include "confdefs.h"
4979 #include <time.h>
4980 int main() {
4981 time_t ti; char *buffer; ctime_r(&ti,buffer);
4982 ; return 0; }
4983 EOF
4984 if { (eval echo configure:4985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4985   rm -rf conftest*
4986   ol_cv_func_ctime_r_nargs=2
4987 else
4988   echo "configure: failed program was:" >&5
4989   cat conftest.$ac_ext >&5
4990   rm -rf conftest*
4991   ol_cv_func_ctime_r_nargs=0
4992 fi
4993 rm -f conftest*
4994 fi
4995 rm -f conftest*
4996 fi
4997
4998 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
4999   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
5000     cat >> confdefs.h <<EOF
5001 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
5002 EOF
5003
5004   fi
5005
5006 fi
5007
5008 if test "$ac_cv_func_gethostbyname_r" = yes ; then
5009         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
5010 echo "configure:5011: checking number of arguments of gethostbyname_r" >&5
5011 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
5012   echo $ac_n "(cached) $ac_c" 1>&6
5013 else
5014   cat > conftest.$ac_ext <<EOF
5015 #line 5016 "configure"
5016 #include "confdefs.h"
5017 #include <sys/types.h>
5018 #include <sys/socket.h>
5019 #include <netinet/in.h>
5020 #include <netdb.h>
5021 #define BUFSIZE (sizeof(struct hostent)+10)
5022 int main() {
5023 struct hostent hent; char buffer[BUFSIZE];
5024                 int bufsize=BUFSIZE;int h_errno;
5025                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
5026                         buffer, bufsize, &h_errno);
5027 ; return 0; }
5028 EOF
5029 if { (eval echo configure:5030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5030   rm -rf conftest*
5031   ol_cv_func_gethostbyname_r_nargs=5
5032 else
5033   echo "configure: failed program was:" >&5
5034   cat conftest.$ac_ext >&5
5035   rm -rf conftest*
5036   cat > conftest.$ac_ext <<EOF
5037 #line 5038 "configure"
5038 #include "confdefs.h"
5039 #include <sys/types.h>
5040 #include <sys/socket.h>
5041 #include <netinet/in.h>
5042 #include <netdb.h>
5043 #define BUFSIZE (sizeof(struct hostent)+10)
5044 int main() {
5045 struct hostent hent;struct hostent *rhent;
5046                         char buffer[BUFSIZE];
5047                         int bufsize=BUFSIZE;int h_errno;
5048                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
5049                                 &rhent, &h_errno);
5050 ; return 0; }
5051 EOF
5052 if { (eval echo configure:5053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5053   rm -rf conftest*
5054   ol_cv_func_gethostbyname_r_nargs=6
5055 else
5056   echo "configure: failed program was:" >&5
5057   cat conftest.$ac_ext >&5
5058   rm -rf conftest*
5059   ol_cv_func_gethostbyname_r_nargs=0
5060 fi
5061 rm -f conftest*
5062 fi
5063 rm -f conftest*
5064 fi
5065
5066 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
5067   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
5068         cat >> confdefs.h <<EOF
5069 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
5070 EOF
5071
5072   fi
5073
5074 else
5075         ol_cv_func_gethostbyname_r_nargs=0
5076 fi
5077  
5078 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
5079         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
5080 echo "configure:5081: checking number of arguments of gethostbyaddr_r" >&5
5081 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
5082   echo $ac_n "(cached) $ac_c" 1>&6
5083 else
5084   cat > conftest.$ac_ext <<EOF
5085 #line 5086 "configure"
5086 #include "confdefs.h"
5087 #include <sys/types.h>
5088 #include <sys/socket.h>
5089 #include <netinet/in.h>
5090 #include <netdb.h>
5091 #define BUFSIZE (sizeof(struct hostent)+10)
5092 int main() {
5093 struct hostent hent; char buffer[BUFSIZE]; 
5094             struct in_addr add;
5095             size_t alen=sizeof(struct in_addr);
5096             int bufsize=BUFSIZE;int h_errno;
5097                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
5098                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
5099 ; return 0; }
5100 EOF
5101 if { (eval echo configure:5102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5102   rm -rf conftest*
5103   ol_cv_func_gethostbyaddr_r_nargs=7
5104 else
5105   echo "configure: failed program was:" >&5
5106   cat conftest.$ac_ext >&5
5107   rm -rf conftest*
5108   cat > conftest.$ac_ext <<EOF
5109 #line 5110 "configure"
5110 #include "confdefs.h"
5111 #include <sys/types.h>
5112 #include <sys/socket.h>
5113 #include <netinet/in.h>
5114 #include <netdb.h>
5115 #define BUFSIZE (sizeof(struct hostent)+10)
5116 int main() {
5117 struct hostent hent;
5118                         struct hostent *rhent; char buffer[BUFSIZE]; 
5119                         struct in_addr add;
5120                         size_t alen=sizeof(struct in_addr);
5121                         int bufsize=BUFSIZE;int h_errno;
5122                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
5123                                 alen, AF_INET, &hent, buffer, bufsize, 
5124                                 &rhent, &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=8
5130 else
5131   echo "configure: failed program was:" >&5
5132   cat conftest.$ac_ext >&5
5133   rm -rf conftest*
5134   ol_cv_func_gethostbyaddr_r_nargs=0
5135 fi
5136 rm -f conftest*
5137 fi
5138 rm -f conftest*
5139 fi
5140
5141 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
5142   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
5143     cat >> confdefs.h <<EOF
5144 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
5145 EOF
5146
5147   fi
5148
5149 else
5150         ol_cv_func_gethostbyaddr_r_nargs=0
5151 fi
5152
5153 if test "$ac_cv_func_ctime_r" = yes \
5154         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
5155         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
5156         -a "$ac_cv_func_gethostbyname_r" = yes \
5157         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
5158         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
5159         -a "$ac_cv_func_gethostbyaddr_r" = yes \
5160         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
5161         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
5162         ; then
5163  
5164         cat >> confdefs.h <<\EOF
5165 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
5166 EOF
5167
5168 fi
5169
5170 ol_link_threads=no
5171 if test $ol_with_threads = auto -o $ol_with_threads = yes \
5172         -o $ol_with_threads = posix ; then
5173
5174         for ac_hdr in pthread.h sched.h
5175 do
5176 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5177 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5178 echo "configure:5179: checking for $ac_hdr" >&5
5179 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5180   echo $ac_n "(cached) $ac_c" 1>&6
5181 else
5182   cat > conftest.$ac_ext <<EOF
5183 #line 5184 "configure"
5184 #include "confdefs.h"
5185 #include <$ac_hdr>
5186 EOF
5187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5188 { (eval echo configure:5189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5190 if test -z "$ac_err"; then
5191   rm -rf conftest*
5192   eval "ac_cv_header_$ac_safe=yes"
5193 else
5194   echo "$ac_err" >&5
5195   echo "configure: failed program was:" >&5
5196   cat conftest.$ac_ext >&5
5197   rm -rf conftest*
5198   eval "ac_cv_header_$ac_safe=no"
5199 fi
5200 rm -f conftest*
5201 fi
5202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5203   echo "$ac_t""yes" 1>&6
5204     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5205   cat >> confdefs.h <<EOF
5206 #define $ac_tr_hdr 1
5207 EOF
5208  
5209 else
5210   echo "$ac_t""no" 1>&6
5211 fi
5212 done
5213
5214
5215         if test $ac_cv_header_pthread_h = yes ; then
5216                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
5217 echo "configure:5218: checking POSIX thread version" >&5
5218 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
5219   echo $ac_n "(cached) $ac_c" 1>&6
5220 else
5221   
5222         cat > conftest.$ac_ext <<EOF
5223 #line 5224 "configure"
5224 #include "confdefs.h"
5225
5226 #               include <pthread.h>
5227                 /* this check could be improved */
5228 #               ifdef PTHREAD_ONCE_INIT
5229                         pthread_version_final
5230 #               endif
5231         
5232 EOF
5233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5234   egrep "pthread_version_final" >/dev/null 2>&1; then
5235   rm -rf conftest*
5236   ol_pthread_final=yes
5237 else
5238   rm -rf conftest*
5239   ol_pthread_final=no
5240 fi
5241 rm -f conftest*
5242
5243
5244         cat > conftest.$ac_ext <<EOF
5245 #line 5246 "configure"
5246 #include "confdefs.h"
5247
5248 #               include <pthread.h>
5249                 /* this check could be improved */
5250 #               ifdef pthread_once_init
5251                         pthread_version_draft4
5252 #               endif
5253         
5254 EOF
5255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5256   egrep "pthread_version_draft4" >/dev/null 2>&1; then
5257   rm -rf conftest*
5258   ol_pthread_draft4=yes
5259 else
5260   rm -rf conftest*
5261   ol_pthread_draft4=no
5262 fi
5263 rm -f conftest*
5264
5265
5266         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
5267                 ol_cv_pthread_version=final
5268         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
5269                 ol_cv_pthread_version=draft4
5270         else
5271                 ol_cv_pthread_version=unknown
5272         fi
5273
5274 fi
5275
5276 echo "$ac_t""$ol_cv_pthread_version" 1>&6
5277
5278
5279                 if test $ol_cv_pthread_version = final ; then
5280                         cat >> confdefs.h <<\EOF
5281 #define HAVE_PTHREADS_FINAL 1
5282 EOF
5283
5284                 elif test $ol_cv_pthread_version = draft4 ; then
5285                         cat >> confdefs.h <<\EOF
5286 #define HAVE_PTHREADS_D4 1
5287 EOF
5288
5289                 else
5290                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
5291                 fi
5292
5293                 # consider threads found
5294                 ol_with_threads=found
5295
5296                 
5297         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
5298 echo "configure:5299: checking for LinuxThreads pthread.h" >&5
5299 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
5300   echo $ac_n "(cached) $ac_c" 1>&6
5301 else
5302   cat > conftest.$ac_ext <<EOF
5303 #line 5304 "configure"
5304 #include "confdefs.h"
5305 #include <pthread.h>
5306 EOF
5307 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5308   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
5309   rm -rf conftest*
5310   ol_cv_header_linux_threads=yes
5311 else
5312   rm -rf conftest*
5313   ol_cv_header_linux_threads=no
5314 fi
5315 rm -f conftest*
5316
5317                 
5318 fi
5319
5320 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
5321         if test $ol_cv_header_linux_threads = yes; then
5322                 cat >> confdefs.h <<\EOF
5323 #define HAVE_LINUX_THREADS 1
5324 EOF
5325
5326         fi
5327
5328
5329                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
5330                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
5331 echo "configure:5332: checking for pthread_create in default libraries" >&5
5332                 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
5333   echo $ac_n "(cached) $ac_c" 1>&6
5334 else
5335   
5336                 if test "$cross_compiling" = yes; then
5337                         ol_cv_pthread_create=yes
5338 else
5339   cat > conftest.$ac_ext <<EOF
5340 #line 5341 "configure"
5341 #include "confdefs.h"
5342
5343 #include <pthread.h>
5344 #ifndef NULL
5345 #define NULL (void*)0
5346 #endif
5347
5348 static void *task(p)
5349         void *p;
5350 {
5351         return (void *) (p == NULL);
5352 }
5353
5354 int main(argc, argv)
5355         int argc;
5356         char **argv;
5357 {
5358         pthread_t t;
5359         int status;
5360
5361         /* make sure pthread_create() isn't just a stub */
5362 #if HAVE_PTHREADS_D4
5363         status = pthread_create(&t, pthread_attr_default, task, NULL);
5364 #else
5365         status = pthread_create(&t, NULL, task, NULL);
5366 #endif
5367
5368         if( status ) return status;
5369
5370         /* make sure pthread_detach() isn't just a stub */
5371 #if HAVE_PTHREADS_D4
5372         status = pthread_detach( &t );
5373 #else
5374         status = pthread_detach( t );
5375 #endif
5376
5377         if( status ) return status;
5378
5379         return status;
5380 }
5381
5382 EOF
5383 if { (eval echo configure:5384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5384 then
5385   ol_cv_pthread_create=yes
5386 else
5387   echo "configure: failed program was:" >&5
5388   cat conftest.$ac_ext >&5
5389   rm -fr conftest*
5390   ol_cv_pthread_create=no
5391 fi
5392 rm -fr conftest*
5393 fi
5394
5395 fi
5396
5397                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
5398
5399                 if test $ol_cv_pthread_create != no ; then
5400                         ol_link_threads=posix
5401                         ol_link_pthreads=""
5402                 fi
5403                 
5404                 # Pthread try link: -mt (ol_cv_pthread_mt)
5405         if test "$ol_link_threads" = no ; then
5406                 # try -mt
5407                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
5408 echo "configure:5409: checking for pthread link with -mt" >&5
5409 if eval "test \"`echo '$''{'ol_cv_pthread_mt'+set}'`\" = set"; then
5410   echo $ac_n "(cached) $ac_c" 1>&6
5411 else
5412   
5413                         # save the flags
5414                         ol_LIBS="$LIBS"
5415                         LIBS="-mt $LIBS"
5416
5417                         cat > conftest.$ac_ext <<EOF
5418 #line 5419 "configure"
5419 #include "confdefs.h"
5420
5421 #include <pthread.h>
5422 #ifndef NULL
5423 #define NULL (void*)0
5424 #endif
5425
5426 int main() {
5427
5428         pthread_t t;
5429
5430 #if HAVE_PTHREADS_D4
5431         pthread_create(&t, pthread_attr_default, NULL, NULL);
5432         pthread_detach( &t );
5433 #else
5434         pthread_create(&t, NULL, NULL, NULL);
5435         pthread_detach( t );
5436 #endif
5437 #ifdef HAVE_LINUX_THREADS
5438         pthread_kill_other_threads_np();
5439 #endif
5440
5441 ; return 0; }
5442 EOF
5443 if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5444   rm -rf conftest*
5445   ol_cv_pthread_mt=yes
5446 else
5447   echo "configure: failed program was:" >&5
5448   cat conftest.$ac_ext >&5
5449   rm -rf conftest*
5450   ol_cv_pthread_mt=no
5451 fi
5452 rm -f conftest*
5453
5454                 # restore the LIBS
5455                 LIBS="$ol_LIBS"
5456                 
5457 fi
5458
5459 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
5460
5461                 if test $ol_cv_pthread_mt = yes ; then
5462                         ol_link_pthreads="-mt"
5463                         ol_link_threads=posix
5464                 fi
5465         fi
5466
5467                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
5468         if test "$ol_link_threads" = no ; then
5469                 # try -kthread
5470                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
5471 echo "configure:5472: checking for pthread link with -kthread" >&5
5472 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
5473   echo $ac_n "(cached) $ac_c" 1>&6
5474 else
5475   
5476                         # save the flags
5477                         ol_LIBS="$LIBS"
5478                         LIBS="-kthread $LIBS"
5479
5480                         cat > conftest.$ac_ext <<EOF
5481 #line 5482 "configure"
5482 #include "confdefs.h"
5483
5484 #include <pthread.h>
5485 #ifndef NULL
5486 #define NULL (void*)0
5487 #endif
5488
5489 int main() {
5490
5491         pthread_t t;
5492
5493 #if HAVE_PTHREADS_D4
5494         pthread_create(&t, pthread_attr_default, NULL, NULL);
5495         pthread_detach( &t );
5496 #else
5497         pthread_create(&t, NULL, NULL, NULL);
5498         pthread_detach( t );
5499 #endif
5500 #ifdef HAVE_LINUX_THREADS
5501         pthread_kill_other_threads_np();
5502 #endif
5503
5504 ; return 0; }
5505 EOF
5506 if { (eval echo configure:5507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5507   rm -rf conftest*
5508   ol_cv_pthread_kthread=yes
5509 else
5510   echo "configure: failed program was:" >&5
5511   cat conftest.$ac_ext >&5
5512   rm -rf conftest*
5513   ol_cv_pthread_kthread=no
5514 fi
5515 rm -f conftest*
5516
5517                 # restore the LIBS
5518                 LIBS="$ol_LIBS"
5519                 
5520 fi
5521
5522 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
5523
5524                 if test $ol_cv_pthread_kthread = yes ; then
5525                         ol_link_pthreads="-kthread"
5526                         ol_link_threads=posix
5527                 fi
5528         fi
5529
5530                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
5531         if test "$ol_link_threads" = no ; then
5532                 # try -pthread
5533                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
5534 echo "configure:5535: checking for pthread link with -pthread" >&5
5535 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
5536   echo $ac_n "(cached) $ac_c" 1>&6
5537 else
5538   
5539                         # save the flags
5540                         ol_LIBS="$LIBS"
5541                         LIBS="-pthread $LIBS"
5542
5543                         cat > conftest.$ac_ext <<EOF
5544 #line 5545 "configure"
5545 #include "confdefs.h"
5546
5547 #include <pthread.h>
5548 #ifndef NULL
5549 #define NULL (void*)0
5550 #endif
5551
5552 int main() {
5553
5554         pthread_t t;
5555
5556 #if HAVE_PTHREADS_D4
5557         pthread_create(&t, pthread_attr_default, NULL, NULL);
5558         pthread_detach( &t );
5559 #else
5560         pthread_create(&t, NULL, NULL, NULL);
5561         pthread_detach( t );
5562 #endif
5563 #ifdef HAVE_LINUX_THREADS
5564         pthread_kill_other_threads_np();
5565 #endif
5566
5567 ; return 0; }
5568 EOF
5569 if { (eval echo configure:5570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5570   rm -rf conftest*
5571   ol_cv_pthread_pthread=yes
5572 else
5573   echo "configure: failed program was:" >&5
5574   cat conftest.$ac_ext >&5
5575   rm -rf conftest*
5576   ol_cv_pthread_pthread=no
5577 fi
5578 rm -f conftest*
5579
5580                 # restore the LIBS
5581                 LIBS="$ol_LIBS"
5582                 
5583 fi
5584
5585 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
5586
5587                 if test $ol_cv_pthread_pthread = yes ; then
5588                         ol_link_pthreads="-pthread"
5589                         ol_link_threads=posix
5590                 fi
5591         fi
5592
5593                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
5594         if test "$ol_link_threads" = no ; then
5595                 # try -pthreads
5596                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
5597 echo "configure:5598: checking for pthread link with -pthreads" >&5
5598 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
5599   echo $ac_n "(cached) $ac_c" 1>&6
5600 else
5601   
5602                         # save the flags
5603                         ol_LIBS="$LIBS"
5604                         LIBS="-pthreads $LIBS"
5605
5606                         cat > conftest.$ac_ext <<EOF
5607 #line 5608 "configure"
5608 #include "confdefs.h"
5609
5610 #include <pthread.h>
5611 #ifndef NULL
5612 #define NULL (void*)0
5613 #endif
5614
5615 int main() {
5616
5617         pthread_t t;
5618
5619 #if HAVE_PTHREADS_D4
5620         pthread_create(&t, pthread_attr_default, NULL, NULL);
5621         pthread_detach( &t );
5622 #else
5623         pthread_create(&t, NULL, NULL, NULL);
5624         pthread_detach( t );
5625 #endif
5626 #ifdef HAVE_LINUX_THREADS
5627         pthread_kill_other_threads_np();
5628 #endif
5629
5630 ; return 0; }
5631 EOF
5632 if { (eval echo configure:5633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5633   rm -rf conftest*
5634   ol_cv_pthread_pthreads=yes
5635 else
5636   echo "configure: failed program was:" >&5
5637   cat conftest.$ac_ext >&5
5638   rm -rf conftest*
5639   ol_cv_pthread_pthreads=no
5640 fi
5641 rm -f conftest*
5642
5643                 # restore the LIBS
5644                 LIBS="$ol_LIBS"
5645                 
5646 fi
5647
5648 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
5649
5650                 if test $ol_cv_pthread_pthreads = yes ; then
5651                         ol_link_pthreads="-pthreads"
5652                         ol_link_threads=posix
5653                 fi
5654         fi
5655
5656                 # Pthread try link: -thread (ol_cv_pthread_thread)
5657         if test "$ol_link_threads" = no ; then
5658                 # try -thread
5659                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
5660 echo "configure:5661: checking for pthread link with -thread" >&5
5661 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
5662   echo $ac_n "(cached) $ac_c" 1>&6
5663 else
5664   
5665                         # save the flags
5666                         ol_LIBS="$LIBS"
5667                         LIBS="-thread $LIBS"
5668
5669                         cat > conftest.$ac_ext <<EOF
5670 #line 5671 "configure"
5671 #include "confdefs.h"
5672
5673 #include <pthread.h>
5674 #ifndef NULL
5675 #define NULL (void*)0
5676 #endif
5677
5678 int main() {
5679
5680         pthread_t t;
5681
5682 #if HAVE_PTHREADS_D4
5683         pthread_create(&t, pthread_attr_default, NULL, NULL);
5684         pthread_detach( &t );
5685 #else
5686         pthread_create(&t, NULL, NULL, NULL);
5687         pthread_detach( t );
5688 #endif
5689 #ifdef HAVE_LINUX_THREADS
5690         pthread_kill_other_threads_np();
5691 #endif
5692
5693 ; return 0; }
5694 EOF
5695 if { (eval echo configure:5696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5696   rm -rf conftest*
5697   ol_cv_pthread_thread=yes
5698 else
5699   echo "configure: failed program was:" >&5
5700   cat conftest.$ac_ext >&5
5701   rm -rf conftest*
5702   ol_cv_pthread_thread=no
5703 fi
5704 rm -f conftest*
5705
5706                 # restore the LIBS
5707                 LIBS="$ol_LIBS"
5708                 
5709 fi
5710
5711 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
5712
5713                 if test $ol_cv_pthread_thread = yes ; then
5714                         ol_link_pthreads="-thread"
5715                         ol_link_threads=posix
5716                 fi
5717         fi
5718
5719
5720                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
5721         if test "$ol_link_threads" = no ; then
5722                 # try -lpthread -lmach -lexc -lc_r
5723                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
5724 echo "configure:5725: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
5725 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
5726   echo $ac_n "(cached) $ac_c" 1>&6
5727 else
5728   
5729                         # save the flags
5730                         ol_LIBS="$LIBS"
5731                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
5732
5733                         cat > conftest.$ac_ext <<EOF
5734 #line 5735 "configure"
5735 #include "confdefs.h"
5736
5737 #include <pthread.h>
5738 #ifndef NULL
5739 #define NULL (void*)0
5740 #endif
5741
5742 int main() {
5743
5744         pthread_t t;
5745
5746 #if HAVE_PTHREADS_D4
5747         pthread_create(&t, pthread_attr_default, NULL, NULL);
5748         pthread_detach( &t );
5749 #else
5750         pthread_create(&t, NULL, NULL, NULL);
5751         pthread_detach( t );
5752 #endif
5753 #ifdef HAVE_LINUX_THREADS
5754         pthread_kill_other_threads_np();
5755 #endif
5756
5757 ; return 0; }
5758 EOF
5759 if { (eval echo configure:5760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5760   rm -rf conftest*
5761   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
5762 else
5763   echo "configure: failed program was:" >&5
5764   cat conftest.$ac_ext >&5
5765   rm -rf conftest*
5766   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
5767 fi
5768 rm -f conftest*
5769
5770                 # restore the LIBS
5771                 LIBS="$ol_LIBS"
5772                 
5773 fi
5774
5775 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
5776
5777                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
5778                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
5779                         ol_link_threads=posix
5780                 fi
5781         fi
5782
5783                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
5784         if test "$ol_link_threads" = no ; then
5785                 # try -lpthread -lmach -lexc
5786                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
5787 echo "configure:5788: checking for pthread link with -lpthread -lmach -lexc" >&5
5788 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
5789   echo $ac_n "(cached) $ac_c" 1>&6
5790 else
5791   
5792                         # save the flags
5793                         ol_LIBS="$LIBS"
5794                         LIBS="-lpthread -lmach -lexc $LIBS"
5795
5796                         cat > conftest.$ac_ext <<EOF
5797 #line 5798 "configure"
5798 #include "confdefs.h"
5799
5800 #include <pthread.h>
5801 #ifndef NULL
5802 #define NULL (void*)0
5803 #endif
5804
5805 int main() {
5806
5807         pthread_t t;
5808
5809 #if HAVE_PTHREADS_D4
5810         pthread_create(&t, pthread_attr_default, NULL, NULL);
5811         pthread_detach( &t );
5812 #else
5813         pthread_create(&t, NULL, NULL, NULL);
5814         pthread_detach( t );
5815 #endif
5816 #ifdef HAVE_LINUX_THREADS
5817         pthread_kill_other_threads_np();
5818 #endif
5819
5820 ; return 0; }
5821 EOF
5822 if { (eval echo configure:5823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5823   rm -rf conftest*
5824   ol_cv_pthread_lpthread_lmach_lexc=yes
5825 else
5826   echo "configure: failed program was:" >&5
5827   cat conftest.$ac_ext >&5
5828   rm -rf conftest*
5829   ol_cv_pthread_lpthread_lmach_lexc=no
5830 fi
5831 rm -f conftest*
5832
5833                 # restore the LIBS
5834                 LIBS="$ol_LIBS"
5835                 
5836 fi
5837
5838 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
5839
5840                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
5841                         ol_link_pthreads="-lpthread -lmach -lexc"
5842                         ol_link_threads=posix
5843                 fi
5844         fi
5845
5846
5847                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
5848         if test "$ol_link_threads" = no ; then
5849                 # try -lpthread -Wl,-woff,85
5850                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
5851 echo "configure:5852: checking for pthread link with -lpthread -Wl,-woff,85" >&5
5852 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
5853   echo $ac_n "(cached) $ac_c" 1>&6
5854 else
5855   
5856                         # save the flags
5857                         ol_LIBS="$LIBS"
5858                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
5859
5860                         cat > conftest.$ac_ext <<EOF
5861 #line 5862 "configure"
5862 #include "confdefs.h"
5863
5864 #include <pthread.h>
5865 #ifndef NULL
5866 #define NULL (void*)0
5867 #endif
5868
5869 int main() {
5870
5871         pthread_t t;
5872
5873 #if HAVE_PTHREADS_D4
5874         pthread_create(&t, pthread_attr_default, NULL, NULL);
5875         pthread_detach( &t );
5876 #else
5877         pthread_create(&t, NULL, NULL, NULL);
5878         pthread_detach( t );
5879 #endif
5880 #ifdef HAVE_LINUX_THREADS
5881         pthread_kill_other_threads_np();
5882 #endif
5883
5884 ; return 0; }
5885 EOF
5886 if { (eval echo configure:5887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5887   rm -rf conftest*
5888   ol_cv_pthread_lib_lpthread_woff=yes
5889 else
5890   echo "configure: failed program was:" >&5
5891   cat conftest.$ac_ext >&5
5892   rm -rf conftest*
5893   ol_cv_pthread_lib_lpthread_woff=no
5894 fi
5895 rm -f conftest*
5896
5897                 # restore the LIBS
5898                 LIBS="$ol_LIBS"
5899                 
5900 fi
5901
5902 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
5903
5904                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
5905                         ol_link_pthreads="-lpthread -Wl,-woff,85"
5906                         ol_link_threads=posix
5907                 fi
5908         fi
5909
5910
5911                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
5912         if test "$ol_link_threads" = no ; then
5913                 # try -lpthread
5914                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
5915 echo "configure:5916: checking for pthread link with -lpthread" >&5
5916 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
5917   echo $ac_n "(cached) $ac_c" 1>&6
5918 else
5919   
5920                         # save the flags
5921                         ol_LIBS="$LIBS"
5922                         LIBS="-lpthread $LIBS"
5923
5924                         cat > conftest.$ac_ext <<EOF
5925 #line 5926 "configure"
5926 #include "confdefs.h"
5927
5928 #include <pthread.h>
5929 #ifndef NULL
5930 #define NULL (void*)0
5931 #endif
5932
5933 int main() {
5934
5935         pthread_t t;
5936
5937 #if HAVE_PTHREADS_D4
5938         pthread_create(&t, pthread_attr_default, NULL, NULL);
5939         pthread_detach( &t );
5940 #else
5941         pthread_create(&t, NULL, NULL, NULL);
5942         pthread_detach( t );
5943 #endif
5944 #ifdef HAVE_LINUX_THREADS
5945         pthread_kill_other_threads_np();
5946 #endif
5947
5948 ; return 0; }
5949 EOF
5950 if { (eval echo configure:5951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5951   rm -rf conftest*
5952   ol_cv_pthread_lpthread=yes
5953 else
5954   echo "configure: failed program was:" >&5
5955   cat conftest.$ac_ext >&5
5956   rm -rf conftest*
5957   ol_cv_pthread_lpthread=no
5958 fi
5959 rm -f conftest*
5960
5961                 # restore the LIBS
5962                 LIBS="$ol_LIBS"
5963                 
5964 fi
5965
5966 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
5967
5968                 if test $ol_cv_pthread_lpthread = yes ; then
5969                         ol_link_pthreads="-lpthread"
5970                         ol_link_threads=posix
5971                 fi
5972         fi
5973
5974                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
5975         if test "$ol_link_threads" = no ; then
5976                 # try -lc_r
5977                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
5978 echo "configure:5979: checking for pthread link with -lc_r" >&5
5979 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
5980   echo $ac_n "(cached) $ac_c" 1>&6
5981 else
5982   
5983                         # save the flags
5984                         ol_LIBS="$LIBS"
5985                         LIBS="-lc_r $LIBS"
5986
5987                         cat > conftest.$ac_ext <<EOF
5988 #line 5989 "configure"
5989 #include "confdefs.h"
5990
5991 #include <pthread.h>
5992 #ifndef NULL
5993 #define NULL (void*)0
5994 #endif
5995
5996 int main() {
5997
5998         pthread_t t;
5999
6000 #if HAVE_PTHREADS_D4
6001         pthread_create(&t, pthread_attr_default, NULL, NULL);
6002         pthread_detach( &t );
6003 #else
6004         pthread_create(&t, NULL, NULL, NULL);
6005         pthread_detach( t );
6006 #endif
6007 #ifdef HAVE_LINUX_THREADS
6008         pthread_kill_other_threads_np();
6009 #endif
6010
6011 ; return 0; }
6012 EOF
6013 if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6014   rm -rf conftest*
6015   ol_cv_pthread_lc_r=yes
6016 else
6017   echo "configure: failed program was:" >&5
6018   cat conftest.$ac_ext >&5
6019   rm -rf conftest*
6020   ol_cv_pthread_lc_r=no
6021 fi
6022 rm -f conftest*
6023
6024                 # restore the LIBS
6025                 LIBS="$ol_LIBS"
6026                 
6027 fi
6028
6029 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
6030
6031                 if test $ol_cv_pthread_lc_r = yes ; then
6032                         ol_link_pthreads="-lc_r"
6033                         ol_link_threads=posix
6034                 fi
6035         fi
6036
6037
6038                 # Pthread try link: -threads (ol_cv_pthread_threads)
6039         if test "$ol_link_threads" = no ; then
6040                 # try -threads
6041                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
6042 echo "configure:6043: checking for pthread link with -threads" >&5
6043 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
6044   echo $ac_n "(cached) $ac_c" 1>&6
6045 else
6046   
6047                         # save the flags
6048                         ol_LIBS="$LIBS"
6049                         LIBS="-threads $LIBS"
6050
6051                         cat > conftest.$ac_ext <<EOF
6052 #line 6053 "configure"
6053 #include "confdefs.h"
6054
6055 #include <pthread.h>
6056 #ifndef NULL
6057 #define NULL (void*)0
6058 #endif
6059
6060 int main() {
6061
6062         pthread_t t;
6063
6064 #if HAVE_PTHREADS_D4
6065         pthread_create(&t, pthread_attr_default, NULL, NULL);
6066         pthread_detach( &t );
6067 #else
6068         pthread_create(&t, NULL, NULL, NULL);
6069         pthread_detach( t );
6070 #endif
6071 #ifdef HAVE_LINUX_THREADS
6072         pthread_kill_other_threads_np();
6073 #endif
6074
6075 ; return 0; }
6076 EOF
6077 if { (eval echo configure:6078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6078   rm -rf conftest*
6079   ol_cv_pthread_threads=yes
6080 else
6081   echo "configure: failed program was:" >&5
6082   cat conftest.$ac_ext >&5
6083   rm -rf conftest*
6084   ol_cv_pthread_threads=no
6085 fi
6086 rm -f conftest*
6087
6088                 # restore the LIBS
6089                 LIBS="$ol_LIBS"
6090                 
6091 fi
6092
6093 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
6094
6095                 if test $ol_cv_pthread_threads = yes ; then
6096                         ol_link_pthreads="-threads"
6097                         ol_link_threads=posix
6098                 fi
6099         fi
6100
6101
6102                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
6103         if test "$ol_link_threads" = no ; then
6104                 # try -lpthreads -lmach -lexc -lc_r
6105                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
6106 echo "configure:6107: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
6107 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
6108   echo $ac_n "(cached) $ac_c" 1>&6
6109 else
6110   
6111                         # save the flags
6112                         ol_LIBS="$LIBS"
6113                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
6114
6115                         cat > conftest.$ac_ext <<EOF
6116 #line 6117 "configure"
6117 #include "confdefs.h"
6118
6119 #include <pthread.h>
6120 #ifndef NULL
6121 #define NULL (void*)0
6122 #endif
6123
6124 int main() {
6125
6126         pthread_t t;
6127
6128 #if HAVE_PTHREADS_D4
6129         pthread_create(&t, pthread_attr_default, NULL, NULL);
6130         pthread_detach( &t );
6131 #else
6132         pthread_create(&t, NULL, NULL, NULL);
6133         pthread_detach( t );
6134 #endif
6135 #ifdef HAVE_LINUX_THREADS
6136         pthread_kill_other_threads_np();
6137 #endif
6138
6139 ; return 0; }
6140 EOF
6141 if { (eval echo configure:6142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6142   rm -rf conftest*
6143   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
6144 else
6145   echo "configure: failed program was:" >&5
6146   cat conftest.$ac_ext >&5
6147   rm -rf conftest*
6148   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
6149 fi
6150 rm -f conftest*
6151
6152                 # restore the LIBS
6153                 LIBS="$ol_LIBS"
6154                 
6155 fi
6156
6157 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
6158
6159                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
6160                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
6161                         ol_link_threads=posix
6162                 fi
6163         fi
6164
6165                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
6166         if test "$ol_link_threads" = no ; then
6167                 # try -lpthreads -lmach -lexc
6168                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
6169 echo "configure:6170: checking for pthread link with -lpthreads -lmach -lexc" >&5
6170 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
6171   echo $ac_n "(cached) $ac_c" 1>&6
6172 else
6173   
6174                         # save the flags
6175                         ol_LIBS="$LIBS"
6176                         LIBS="-lpthreads -lmach -lexc $LIBS"
6177
6178                         cat > conftest.$ac_ext <<EOF
6179 #line 6180 "configure"
6180 #include "confdefs.h"
6181
6182 #include <pthread.h>
6183 #ifndef NULL
6184 #define NULL (void*)0
6185 #endif
6186
6187 int main() {
6188
6189         pthread_t t;
6190
6191 #if HAVE_PTHREADS_D4
6192         pthread_create(&t, pthread_attr_default, NULL, NULL);
6193         pthread_detach( &t );
6194 #else
6195         pthread_create(&t, NULL, NULL, NULL);
6196         pthread_detach( t );
6197 #endif
6198 #ifdef HAVE_LINUX_THREADS
6199         pthread_kill_other_threads_np();
6200 #endif
6201
6202 ; return 0; }
6203 EOF
6204 if { (eval echo configure:6205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6205   rm -rf conftest*
6206   ol_cv_pthread_lpthreads_lmach_lexc=yes
6207 else
6208   echo "configure: failed program was:" >&5
6209   cat conftest.$ac_ext >&5
6210   rm -rf conftest*
6211   ol_cv_pthread_lpthreads_lmach_lexc=no
6212 fi
6213 rm -f conftest*
6214
6215                 # restore the LIBS
6216                 LIBS="$ol_LIBS"
6217                 
6218 fi
6219
6220 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
6221
6222                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
6223                         ol_link_pthreads="-lpthreads -lmach -lexc"
6224                         ol_link_threads=posix
6225                 fi
6226         fi
6227
6228                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
6229         if test "$ol_link_threads" = no ; then
6230                 # try -lpthreads -lexc
6231                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
6232 echo "configure:6233: checking for pthread link with -lpthreads -lexc" >&5
6233 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
6234   echo $ac_n "(cached) $ac_c" 1>&6
6235 else
6236   
6237                         # save the flags
6238                         ol_LIBS="$LIBS"
6239                         LIBS="-lpthreads -lexc $LIBS"
6240
6241                         cat > conftest.$ac_ext <<EOF
6242 #line 6243 "configure"
6243 #include "confdefs.h"
6244
6245 #include <pthread.h>
6246 #ifndef NULL
6247 #define NULL (void*)0
6248 #endif
6249
6250 int main() {
6251
6252         pthread_t t;
6253
6254 #if HAVE_PTHREADS_D4
6255         pthread_create(&t, pthread_attr_default, NULL, NULL);
6256         pthread_detach( &t );
6257 #else
6258         pthread_create(&t, NULL, NULL, NULL);
6259         pthread_detach( t );
6260 #endif
6261 #ifdef HAVE_LINUX_THREADS
6262         pthread_kill_other_threads_np();
6263 #endif
6264
6265 ; return 0; }
6266 EOF
6267 if { (eval echo configure:6268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6268   rm -rf conftest*
6269   ol_cv_pthread_lpthreads_lexc=yes
6270 else
6271   echo "configure: failed program was:" >&5
6272   cat conftest.$ac_ext >&5
6273   rm -rf conftest*
6274   ol_cv_pthread_lpthreads_lexc=no
6275 fi
6276 rm -f conftest*
6277
6278                 # restore the LIBS
6279                 LIBS="$ol_LIBS"
6280                 
6281 fi
6282
6283 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
6284
6285                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
6286                         ol_link_pthreads="-lpthreads -lexc"
6287                         ol_link_threads=posix
6288                 fi
6289         fi
6290
6291
6292                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
6293         if test "$ol_link_threads" = no ; then
6294                 # try -lpthreads
6295                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
6296 echo "configure:6297: checking for pthread link with -lpthreads" >&5
6297 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
6298   echo $ac_n "(cached) $ac_c" 1>&6
6299 else
6300   
6301                         # save the flags
6302                         ol_LIBS="$LIBS"
6303                         LIBS="-lpthreads $LIBS"
6304
6305                         cat > conftest.$ac_ext <<EOF
6306 #line 6307 "configure"
6307 #include "confdefs.h"
6308
6309 #include <pthread.h>
6310 #ifndef NULL
6311 #define NULL (void*)0
6312 #endif
6313
6314 int main() {
6315
6316         pthread_t t;
6317
6318 #if HAVE_PTHREADS_D4
6319         pthread_create(&t, pthread_attr_default, NULL, NULL);
6320         pthread_detach( &t );
6321 #else
6322         pthread_create(&t, NULL, NULL, NULL);
6323         pthread_detach( t );
6324 #endif
6325 #ifdef HAVE_LINUX_THREADS
6326         pthread_kill_other_threads_np();
6327 #endif
6328
6329 ; return 0; }
6330 EOF
6331 if { (eval echo configure:6332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6332   rm -rf conftest*
6333   ol_cv_pthread_lib_lpthreads=yes
6334 else
6335   echo "configure: failed program was:" >&5
6336   cat conftest.$ac_ext >&5
6337   rm -rf conftest*
6338   ol_cv_pthread_lib_lpthreads=no
6339 fi
6340 rm -f conftest*
6341
6342                 # restore the LIBS
6343                 LIBS="$ol_LIBS"
6344                 
6345 fi
6346
6347 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
6348
6349                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
6350                         ol_link_pthreads="-lpthreads"
6351                         ol_link_threads=posix
6352                 fi
6353         fi
6354
6355
6356                 if test $ol_link_threads != no ; then
6357                         cat >> confdefs.h <<\EOF
6358 #define HAVE_PTHREADS 1
6359 EOF
6360
6361
6362                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
6363
6364                                                 save_CPPFLAGS="$CPPFLAGS"
6365                         save_LIBS="$LIBS"
6366                         LIBS="$LTHREAD_LIBS $LIBS"
6367
6368                                                                                                 for ac_func in sched_yield pthread_yield
6369 do
6370 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6371 echo "configure:6372: checking for $ac_func" >&5
6372 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6373   echo $ac_n "(cached) $ac_c" 1>&6
6374 else
6375   cat > conftest.$ac_ext <<EOF
6376 #line 6377 "configure"
6377 #include "confdefs.h"
6378 /* System header to define __stub macros and hopefully few prototypes,
6379     which can conflict with char $ac_func(); below.  */
6380 #include <assert.h>
6381 /* Override any gcc2 internal prototype to avoid an error.  */
6382 /* We use char because int might match the return type of a gcc2
6383     builtin and then its argument prototype would still apply.  */
6384 char $ac_func();
6385
6386 int main() {
6387
6388 /* The GNU C library defines this for functions which it implements
6389     to always fail with ENOSYS.  Some functions are actually named
6390     something starting with __ and the normal name is an alias.  */
6391 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6392 choke me
6393 #else
6394 $ac_func();
6395 #endif
6396
6397 ; return 0; }
6398 EOF
6399 if { (eval echo configure:6400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6400   rm -rf conftest*
6401   eval "ac_cv_func_$ac_func=yes"
6402 else
6403   echo "configure: failed program was:" >&5
6404   cat conftest.$ac_ext >&5
6405   rm -rf conftest*
6406   eval "ac_cv_func_$ac_func=no"
6407 fi
6408 rm -f conftest*
6409 fi
6410
6411 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6412   echo "$ac_t""yes" 1>&6
6413     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6414   cat >> confdefs.h <<EOF
6415 #define $ac_tr_func 1
6416 EOF
6417  
6418 else
6419   echo "$ac_t""no" 1>&6
6420 fi
6421 done
6422
6423
6424                         if test $ac_cv_func_sched_yield = no -a \
6425                                 $ac_cv_func_pthread_yield = no ; then
6426                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
6427 echo "configure:6428: checking for sched_yield in -lrt" >&5
6428 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
6429 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6430   echo $ac_n "(cached) $ac_c" 1>&6
6431 else
6432   ac_save_LIBS="$LIBS"
6433 LIBS="-lrt  $LIBS"
6434 cat > conftest.$ac_ext <<EOF
6435 #line 6436 "configure"
6436 #include "confdefs.h"
6437 /* Override any gcc2 internal prototype to avoid an error.  */
6438 /* We use char because int might match the return type of a gcc2
6439     builtin and then its argument prototype would still apply.  */
6440 char sched_yield();
6441
6442 int main() {
6443 sched_yield()
6444 ; return 0; }
6445 EOF
6446 if { (eval echo configure:6447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6447   rm -rf conftest*
6448   eval "ac_cv_lib_$ac_lib_var=yes"
6449 else
6450   echo "configure: failed program was:" >&5
6451   cat conftest.$ac_ext >&5
6452   rm -rf conftest*
6453   eval "ac_cv_lib_$ac_lib_var=no"
6454 fi
6455 rm -f conftest*
6456 LIBS="$ac_save_LIBS"
6457
6458 fi
6459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6460   echo "$ac_t""yes" 1>&6
6461   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
6462                                         cat >> confdefs.h <<\EOF
6463 #define HAVE_SCHED_YIELD 1
6464 EOF
6465
6466                                         ac_cv_func_sched_yield=yes
6467 else
6468   echo "$ac_t""no" 1>&6
6469 ac_cv_func_sched_yield=no
6470 fi
6471
6472                         fi
6473                         if test $ac_cv_func_sched_yield = no -a \
6474                                 $ac_cv_func_pthread_yield = no ; then
6475                                                                                                 for ac_func in thr_yield
6476 do
6477 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6478 echo "configure:6479: checking for $ac_func" >&5
6479 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6480   echo $ac_n "(cached) $ac_c" 1>&6
6481 else
6482   cat > conftest.$ac_ext <<EOF
6483 #line 6484 "configure"
6484 #include "confdefs.h"
6485 /* System header to define __stub macros and hopefully few prototypes,
6486     which can conflict with char $ac_func(); below.  */
6487 #include <assert.h>
6488 /* Override any gcc2 internal prototype to avoid an error.  */
6489 /* We use char because int might match the return type of a gcc2
6490     builtin and then its argument prototype would still apply.  */
6491 char $ac_func();
6492
6493 int main() {
6494
6495 /* The GNU C library defines this for functions which it implements
6496     to always fail with ENOSYS.  Some functions are actually named
6497     something starting with __ and the normal name is an alias.  */
6498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6499 choke me
6500 #else
6501 $ac_func();
6502 #endif
6503
6504 ; return 0; }
6505 EOF
6506 if { (eval echo configure:6507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6507   rm -rf conftest*
6508   eval "ac_cv_func_$ac_func=yes"
6509 else
6510   echo "configure: failed program was:" >&5
6511   cat conftest.$ac_ext >&5
6512   rm -rf conftest*
6513   eval "ac_cv_func_$ac_func=no"
6514 fi
6515 rm -f conftest*
6516 fi
6517
6518 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6519   echo "$ac_t""yes" 1>&6
6520     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6521   cat >> confdefs.h <<EOF
6522 #define $ac_tr_func 1
6523 EOF
6524  
6525 else
6526   echo "$ac_t""no" 1>&6
6527 fi
6528 done
6529
6530                         fi
6531                         if test $ac_cv_func_sched_yield = no -a \
6532                                 $ac_cv_func_pthread_yield = no -a \
6533                                 "$ac_cv_func_thr_yield" = no ; then
6534                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
6535                         fi
6536
6537                                                 for ac_func in pthread_kill
6538 do
6539 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6540 echo "configure:6541: checking for $ac_func" >&5
6541 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6542   echo $ac_n "(cached) $ac_c" 1>&6
6543 else
6544   cat > conftest.$ac_ext <<EOF
6545 #line 6546 "configure"
6546 #include "confdefs.h"
6547 /* System header to define __stub macros and hopefully few prototypes,
6548     which can conflict with char $ac_func(); below.  */
6549 #include <assert.h>
6550 /* Override any gcc2 internal prototype to avoid an error.  */
6551 /* We use char because int might match the return type of a gcc2
6552     builtin and then its argument prototype would still apply.  */
6553 char $ac_func();
6554
6555 int main() {
6556
6557 /* The GNU C library defines this for functions which it implements
6558     to always fail with ENOSYS.  Some functions are actually named
6559     something starting with __ and the normal name is an alias.  */
6560 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6561 choke me
6562 #else
6563 $ac_func();
6564 #endif
6565
6566 ; return 0; }
6567 EOF
6568 if { (eval echo configure:6569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6569   rm -rf conftest*
6570   eval "ac_cv_func_$ac_func=yes"
6571 else
6572   echo "configure: failed program was:" >&5
6573   cat conftest.$ac_ext >&5
6574   rm -rf conftest*
6575   eval "ac_cv_func_$ac_func=no"
6576 fi
6577 rm -f conftest*
6578 fi
6579
6580 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6581   echo "$ac_t""yes" 1>&6
6582     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6583   cat >> confdefs.h <<EOF
6584 #define $ac_tr_func 1
6585 EOF
6586  
6587 else
6588   echo "$ac_t""no" 1>&6
6589 fi
6590 done
6591
6592
6593                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
6594 echo "configure:6595: checking for pthread_detach with <pthread.h>" >&5
6595 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
6596   echo $ac_n "(cached) $ac_c" 1>&6
6597 else
6598   
6599                                                                 cat > conftest.$ac_ext <<EOF
6600 #line 6601 "configure"
6601 #include "confdefs.h"
6602
6603 #include <pthread.h>
6604 #ifndef NULL
6605 #define NULL (void*)0
6606 #endif
6607
6608 int main() {
6609 pthread_detach(NULL);
6610 ; return 0; }
6611 EOF
6612 if { (eval echo configure:6613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6613   rm -rf conftest*
6614   ol_cv_func_pthread_detach=yes
6615 else
6616   echo "configure: failed program was:" >&5
6617   cat conftest.$ac_ext >&5
6618   rm -rf conftest*
6619   ol_cv_func_pthread_detach=no
6620 fi
6621 rm -f conftest*
6622                         
6623 fi
6624
6625 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
6626
6627                         if test $ol_cv_func_pthread_detach = no ; then
6628                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
6629                         fi
6630
6631                         cat >> confdefs.h <<\EOF
6632 #define HAVE_PTHREAD_DETACH 1
6633 EOF
6634
6635
6636                                                 for ac_func in \
6637                                 pthread_setconcurrency \
6638                                 pthread_getconcurrency \
6639                                 thr_setconcurrency \
6640                                 thr_getconcurrency \
6641                         
6642 do
6643 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6644 echo "configure:6645: checking for $ac_func" >&5
6645 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6646   echo $ac_n "(cached) $ac_c" 1>&6
6647 else
6648   cat > conftest.$ac_ext <<EOF
6649 #line 6650 "configure"
6650 #include "confdefs.h"
6651 /* System header to define __stub macros and hopefully few prototypes,
6652     which can conflict with char $ac_func(); below.  */
6653 #include <assert.h>
6654 /* Override any gcc2 internal prototype to avoid an error.  */
6655 /* We use char because int might match the return type of a gcc2
6656     builtin and then its argument prototype would still apply.  */
6657 char $ac_func();
6658
6659 int main() {
6660
6661 /* The GNU C library defines this for functions which it implements
6662     to always fail with ENOSYS.  Some functions are actually named
6663     something starting with __ and the normal name is an alias.  */
6664 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6665 choke me
6666 #else
6667 $ac_func();
6668 #endif
6669
6670 ; return 0; }
6671 EOF
6672 if { (eval echo configure:6673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6673   rm -rf conftest*
6674   eval "ac_cv_func_$ac_func=yes"
6675 else
6676   echo "configure: failed program was:" >&5
6677   cat conftest.$ac_ext >&5
6678   rm -rf conftest*
6679   eval "ac_cv_func_$ac_func=no"
6680 fi
6681 rm -f conftest*
6682 fi
6683
6684 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6685   echo "$ac_t""yes" 1>&6
6686     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6687   cat >> confdefs.h <<EOF
6688 #define $ac_tr_func 1
6689 EOF
6690  
6691 else
6692   echo "$ac_t""no" 1>&6
6693 fi
6694 done
6695
6696
6697                         
6698         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
6699 echo "configure:6700: checking for pthread_kill_other_threads_np" >&5
6700 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
6701   echo $ac_n "(cached) $ac_c" 1>&6
6702 else
6703   cat > conftest.$ac_ext <<EOF
6704 #line 6705 "configure"
6705 #include "confdefs.h"
6706 /* System header to define __stub macros and hopefully few prototypes,
6707     which can conflict with char pthread_kill_other_threads_np(); below.  */
6708 #include <assert.h>
6709 /* Override any gcc2 internal prototype to avoid an error.  */
6710 /* We use char because int might match the return type of a gcc2
6711     builtin and then its argument prototype would still apply.  */
6712 char pthread_kill_other_threads_np();
6713
6714 int main() {
6715
6716 /* The GNU C library defines this for functions which it implements
6717     to always fail with ENOSYS.  Some functions are actually named
6718     something starting with __ and the normal name is an alias.  */
6719 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
6720 choke me
6721 #else
6722 pthread_kill_other_threads_np();
6723 #endif
6724
6725 ; return 0; }
6726 EOF
6727 if { (eval echo configure:6728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6728   rm -rf conftest*
6729   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
6730 else
6731   echo "configure: failed program was:" >&5
6732   cat conftest.$ac_ext >&5
6733   rm -rf conftest*
6734   eval "ac_cv_func_pthread_kill_other_threads_np=no"
6735 fi
6736 rm -f conftest*
6737 fi
6738
6739 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
6740   echo "$ac_t""yes" 1>&6
6741   :
6742 else
6743   echo "$ac_t""no" 1>&6
6744 fi
6745
6746         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
6747 echo "configure:6748: checking for LinuxThreads implementation" >&5
6748 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
6749   echo $ac_n "(cached) $ac_c" 1>&6
6750 else
6751   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
6752 fi
6753
6754 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
6755
6756                         
6757         
6758         
6759         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
6760 echo "configure:6761: checking for LinuxThreads consistency" >&5
6761 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6762   echo $ac_n "(cached) $ac_c" 1>&6
6763 else
6764   
6765                 if test $ol_cv_header_linux_threads = yes -a \
6766                         $ol_cv_sys_linux_threads = yes; then
6767                         ol_cv_linux_threads=yes
6768                 elif test $ol_cv_header_linux_threads = no -a \
6769                         $ol_cv_sys_linux_threads = no; then
6770                         ol_cv_linux_threads=no
6771                 else
6772                         ol_cv_linux_threads=error
6773                 fi
6774         
6775 fi
6776
6777 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6778
6779
6780                         if test $ol_cv_linux_threads = error; then
6781                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
6782                         fi
6783
6784                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
6785 echo "configure:6786: checking if pthread_create() works" >&5
6786                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
6787   echo $ac_n "(cached) $ac_c" 1>&6
6788 else
6789   
6790                         if test "$cross_compiling" = yes; then
6791                                 ol_cv_pthread_create_works=yes
6792 else
6793   cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796
6797 #include <pthread.h>
6798 #ifndef NULL
6799 #define NULL (void*)0
6800 #endif
6801
6802 static void *task(p)
6803         void *p;
6804 {
6805         return (void *) (p == NULL);
6806 }
6807
6808 int main(argc, argv)
6809         int argc;
6810         char **argv;
6811 {
6812         pthread_t t;
6813 #if HAVE_PTHREADS_D4
6814         exit(pthread_create(&t, pthread_attr_default, task, NULL));
6815 #else
6816         exit(pthread_create(&t, NULL, task, NULL));
6817 #endif
6818 }
6819
6820 EOF
6821 if { (eval echo configure:6822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6822 then
6823   ol_cv_pthread_create_works=yes
6824 else
6825   echo "configure: failed program was:" >&5
6826   cat conftest.$ac_ext >&5
6827   rm -fr conftest*
6828   ol_cv_pthread_create_works=no
6829 fi
6830 rm -fr conftest*
6831 fi
6832
6833 fi
6834
6835                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
6836
6837                         if test $ol_cv_pthread_create_works = no ; then
6838                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
6839                         fi
6840
6841                                                 if test $ol_with_yielding_select = auto ; then
6842                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
6843 echo "configure:6844: checking if select yields when using pthreads" >&5
6844                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
6845   echo $ac_n "(cached) $ac_c" 1>&6
6846 else
6847   
6848                                 if test "$cross_compiling" = yes; then
6849   
6850                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
6851 else
6852   cat > conftest.$ac_ext <<EOF
6853 #line 6854 "configure"
6854 #include "confdefs.h"
6855
6856 #include <sys/types.h>
6857 #include <sys/time.h>
6858 #include <unistd.h>
6859 #include <pthread.h>
6860 #ifndef NULL
6861 #define NULL (void*) 0
6862 #endif
6863
6864 static int fildes[2];
6865
6866 static void *task(p)
6867         void *p;
6868 {
6869         int i;
6870         struct timeval tv;
6871
6872         fd_set rfds;
6873
6874         tv.tv_sec=10;
6875         tv.tv_usec=0;
6876
6877         FD_ZERO(&rfds);
6878         FD_SET(fildes[0], &rfds);
6879
6880         /* we're not interested in any fds */
6881         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
6882
6883         if(i < 0) {
6884                 perror("select");
6885                 exit(10);
6886         }
6887
6888         exit(0); /* if we exit here, the select blocked the whole process */
6889 }
6890
6891 int main(argc, argv)
6892         int argc;
6893         char **argv;
6894 {
6895         pthread_t t;
6896
6897         /* create a pipe to select */
6898         if(pipe(&fildes[0])) {
6899                 perror("select");
6900                 exit(1);
6901         }
6902
6903 #ifdef HAVE_PTHREAD_SETCONCURRENCY
6904         (void) pthread_setconcurrency(2);
6905 #else
6906 #ifdef HAVE_THR_SETCONCURRENCY
6907         /* Set Solaris LWP concurrency to 2 */
6908         thr_setconcurrency(2);
6909 #endif
6910 #endif
6911
6912 #if HAVE_PTHREADS_D4
6913         pthread_create(&t, pthread_attr_default, task, NULL);
6914 #else
6915         pthread_create(&t, NULL, task, NULL);
6916 #endif
6917
6918 #if HAVE_SCHED_YIELD
6919         sched_yield();  /* make sure task runs first */
6920 #else
6921 #ifdef HAVE_PTHREAD_YIELD
6922         pthread_yield();        /* make sure task runs first */
6923 #endif
6924 #endif
6925
6926         exit(2);
6927 }
6928 EOF
6929 if { (eval echo configure:6930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6930 then
6931   ol_cv_pthread_select_yields=no
6932 else
6933   echo "configure: failed program was:" >&5
6934   cat conftest.$ac_ext >&5
6935   rm -fr conftest*
6936   ol_cv_pthread_select_yields=yes
6937 fi
6938 rm -fr conftest*
6939 fi
6940
6941 fi
6942
6943                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
6944
6945                                 if test $ol_cv_pthread_select_yields = yes ; then
6946                                         ol_with_yielding_select=yes
6947                                 fi
6948                         fi
6949
6950                                                 CPPFLAGS="$save_CPPFLAGS"
6951                         LIBS="$save_LIBS"
6952                 else
6953                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
6954                 fi
6955         fi
6956
6957         if test $ol_with_threads = posix ; then
6958                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
6959         fi
6960 fi
6961
6962 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6963         -o $ol_with_threads = mach ; then
6964
6965                 for ac_hdr in mach/cthreads.h
6966 do
6967 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6968 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6969 echo "configure:6970: checking for $ac_hdr" >&5
6970 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6971   echo $ac_n "(cached) $ac_c" 1>&6
6972 else
6973   cat > conftest.$ac_ext <<EOF
6974 #line 6975 "configure"
6975 #include "confdefs.h"
6976 #include <$ac_hdr>
6977 EOF
6978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6979 { (eval echo configure:6980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6981 if test -z "$ac_err"; then
6982   rm -rf conftest*
6983   eval "ac_cv_header_$ac_safe=yes"
6984 else
6985   echo "$ac_err" >&5
6986   echo "configure: failed program was:" >&5
6987   cat conftest.$ac_ext >&5
6988   rm -rf conftest*
6989   eval "ac_cv_header_$ac_safe=no"
6990 fi
6991 rm -f conftest*
6992 fi
6993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6994   echo "$ac_t""yes" 1>&6
6995     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6996   cat >> confdefs.h <<EOF
6997 #define $ac_tr_hdr 1
6998 EOF
6999  
7000 else
7001   echo "$ac_t""no" 1>&6
7002 fi
7003 done
7004
7005         if test $ac_cv_header_mach_cthreads_h = yes ; then
7006                 ol_with_threads=found
7007
7008                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
7009 echo "configure:7010: checking for cthread_fork" >&5
7010 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
7011   echo $ac_n "(cached) $ac_c" 1>&6
7012 else
7013   cat > conftest.$ac_ext <<EOF
7014 #line 7015 "configure"
7015 #include "confdefs.h"
7016 /* System header to define __stub macros and hopefully few prototypes,
7017     which can conflict with char cthread_fork(); below.  */
7018 #include <assert.h>
7019 /* Override any gcc2 internal prototype to avoid an error.  */
7020 /* We use char because int might match the return type of a gcc2
7021     builtin and then its argument prototype would still apply.  */
7022 char cthread_fork();
7023
7024 int main() {
7025
7026 /* The GNU C library defines this for functions which it implements
7027     to always fail with ENOSYS.  Some functions are actually named
7028     something starting with __ and the normal name is an alias.  */
7029 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
7030 choke me
7031 #else
7032 cthread_fork();
7033 #endif
7034
7035 ; return 0; }
7036 EOF
7037 if { (eval echo configure:7038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7038   rm -rf conftest*
7039   eval "ac_cv_func_cthread_fork=yes"
7040 else
7041   echo "configure: failed program was:" >&5
7042   cat conftest.$ac_ext >&5
7043   rm -rf conftest*
7044   eval "ac_cv_func_cthread_fork=no"
7045 fi
7046 rm -f conftest*
7047 fi
7048
7049 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
7050   echo "$ac_t""yes" 1>&6
7051   ol_link_threads=yes
7052 else
7053   echo "$ac_t""no" 1>&6
7054 fi
7055
7056
7057                 if test $ol_link_threads = no ; then
7058                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
7059 echo "configure:7060: checking for cthread_fork with -all_load" >&5
7060 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
7061   echo $ac_n "(cached) $ac_c" 1>&6
7062 else
7063   
7064                                                                 save_LIBS="$LIBS"
7065                                 LIBS="-all_load $LIBS"
7066                                 cat > conftest.$ac_ext <<EOF
7067 #line 7068 "configure"
7068 #include "confdefs.h"
7069 #include <mach/cthreads.h>
7070 int main() {
7071
7072                                         cthread_fork((void *)0, (void *)0);
7073                                         
7074 ; return 0; }
7075 EOF
7076 if { (eval echo configure:7077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7077   rm -rf conftest*
7078   ol_cv_cthread_all_load=yes
7079 else
7080   echo "configure: failed program was:" >&5
7081   cat conftest.$ac_ext >&5
7082   rm -rf conftest*
7083   ol_cv_cthread_all_load=no
7084 fi
7085 rm -f conftest*
7086                                                                 LIBS="$save_LIBS"
7087                         
7088 fi
7089
7090 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
7091
7092                         if test $ol_cv_cthread_all_load = yes ; then
7093                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
7094                                 ol_link_threads=mach
7095                         fi
7096                 fi
7097
7098                 if test $ol_link_threads != no ; then
7099                         : check for cthread specific functionality here
7100                         cat >> confdefs.h <<\EOF
7101 #define HAVE_MACH_CTHREADS 1
7102 EOF
7103
7104                 else
7105                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
7106                 fi
7107         fi
7108
7109         if test $ol_with_threads = mach ; then
7110                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
7111         fi
7112 fi
7113
7114 if test $ol_with_threads = auto -o $ol_with_threads = yes \
7115         -o $ol_with_threads = lwp ; then
7116
7117                 for ac_hdr in thread.h synch.h
7118 do
7119 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7120 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7121 echo "configure:7122: checking for $ac_hdr" >&5
7122 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7123   echo $ac_n "(cached) $ac_c" 1>&6
7124 else
7125   cat > conftest.$ac_ext <<EOF
7126 #line 7127 "configure"
7127 #include "confdefs.h"
7128 #include <$ac_hdr>
7129 EOF
7130 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7131 { (eval echo configure:7132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7132 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7133 if test -z "$ac_err"; then
7134   rm -rf conftest*
7135   eval "ac_cv_header_$ac_safe=yes"
7136 else
7137   echo "$ac_err" >&5
7138   echo "configure: failed program was:" >&5
7139   cat conftest.$ac_ext >&5
7140   rm -rf conftest*
7141   eval "ac_cv_header_$ac_safe=no"
7142 fi
7143 rm -f conftest*
7144 fi
7145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7146   echo "$ac_t""yes" 1>&6
7147     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7148   cat >> confdefs.h <<EOF
7149 #define $ac_tr_hdr 1
7150 EOF
7151  
7152 else
7153   echo "$ac_t""no" 1>&6
7154 fi
7155 done
7156
7157         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
7158                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
7159 echo "configure:7160: checking for thr_create in -lthread" >&5
7160 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
7161 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7162   echo $ac_n "(cached) $ac_c" 1>&6
7163 else
7164   ac_save_LIBS="$LIBS"
7165 LIBS="-lthread  $LIBS"
7166 cat > conftest.$ac_ext <<EOF
7167 #line 7168 "configure"
7168 #include "confdefs.h"
7169 /* Override any gcc2 internal prototype to avoid an error.  */
7170 /* We use char because int might match the return type of a gcc2
7171     builtin and then its argument prototype would still apply.  */
7172 char thr_create();
7173
7174 int main() {
7175 thr_create()
7176 ; return 0; }
7177 EOF
7178 if { (eval echo configure:7179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7179   rm -rf conftest*
7180   eval "ac_cv_lib_$ac_lib_var=yes"
7181 else
7182   echo "configure: failed program was:" >&5
7183   cat conftest.$ac_ext >&5
7184   rm -rf conftest*
7185   eval "ac_cv_lib_$ac_lib_var=no"
7186 fi
7187 rm -f conftest*
7188 LIBS="$ac_save_LIBS"
7189
7190 fi
7191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7192   echo "$ac_t""yes" 1>&6
7193   have_thr=yes
7194 else
7195   echo "$ac_t""no" 1>&6
7196 have_thr=no
7197 fi
7198
7199
7200                 if test $have_thr = yes ; then
7201                         cat >> confdefs.h <<\EOF
7202 #define HAVE_THR 1
7203 EOF
7204
7205                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
7206                         ol_link_threads=thr
7207
7208                         if test $ol_with_yielding_select = auto ; then
7209                                 ol_with_yielding_select=yes
7210                         fi
7211
7212                                                 for ac_func in \
7213                                 thr_setconcurrency \
7214                                 thr_getconcurrency \
7215                         
7216 do
7217 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7218 echo "configure:7219: checking for $ac_func" >&5
7219 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7220   echo $ac_n "(cached) $ac_c" 1>&6
7221 else
7222   cat > conftest.$ac_ext <<EOF
7223 #line 7224 "configure"
7224 #include "confdefs.h"
7225 /* System header to define __stub macros and hopefully few prototypes,
7226     which can conflict with char $ac_func(); below.  */
7227 #include <assert.h>
7228 /* Override any gcc2 internal prototype to avoid an error.  */
7229 /* We use char because int might match the return type of a gcc2
7230     builtin and then its argument prototype would still apply.  */
7231 char $ac_func();
7232
7233 int main() {
7234
7235 /* The GNU C library defines this for functions which it implements
7236     to always fail with ENOSYS.  Some functions are actually named
7237     something starting with __ and the normal name is an alias.  */
7238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7239 choke me
7240 #else
7241 $ac_func();
7242 #endif
7243
7244 ; return 0; }
7245 EOF
7246 if { (eval echo configure:7247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7247   rm -rf conftest*
7248   eval "ac_cv_func_$ac_func=yes"
7249 else
7250   echo "configure: failed program was:" >&5
7251   cat conftest.$ac_ext >&5
7252   rm -rf conftest*
7253   eval "ac_cv_func_$ac_func=no"
7254 fi
7255 rm -f conftest*
7256 fi
7257
7258 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7259   echo "$ac_t""yes" 1>&6
7260     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7261   cat >> confdefs.h <<EOF
7262 #define $ac_tr_func 1
7263 EOF
7264  
7265 else
7266   echo "$ac_t""no" 1>&6
7267 fi
7268 done
7269
7270                 fi
7271         fi
7272
7273                 for ac_hdr in lwp/lwp.h
7274 do
7275 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7276 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7277 echo "configure:7278: checking for $ac_hdr" >&5
7278 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7279   echo $ac_n "(cached) $ac_c" 1>&6
7280 else
7281   cat > conftest.$ac_ext <<EOF
7282 #line 7283 "configure"
7283 #include "confdefs.h"
7284 #include <$ac_hdr>
7285 EOF
7286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7287 { (eval echo configure:7288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7289 if test -z "$ac_err"; then
7290   rm -rf conftest*
7291   eval "ac_cv_header_$ac_safe=yes"
7292 else
7293   echo "$ac_err" >&5
7294   echo "configure: failed program was:" >&5
7295   cat conftest.$ac_ext >&5
7296   rm -rf conftest*
7297   eval "ac_cv_header_$ac_safe=no"
7298 fi
7299 rm -f conftest*
7300 fi
7301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7302   echo "$ac_t""yes" 1>&6
7303     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7304   cat >> confdefs.h <<EOF
7305 #define $ac_tr_hdr 1
7306 EOF
7307  
7308 else
7309   echo "$ac_t""no" 1>&6
7310 fi
7311 done
7312
7313         if test $ac_cv_header_lwp_lwp_h = yes ; then
7314                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
7315 echo "configure:7316: checking for lwp_create in -llwp" >&5
7316 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
7317 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7318   echo $ac_n "(cached) $ac_c" 1>&6
7319 else
7320   ac_save_LIBS="$LIBS"
7321 LIBS="-llwp  $LIBS"
7322 cat > conftest.$ac_ext <<EOF
7323 #line 7324 "configure"
7324 #include "confdefs.h"
7325 /* Override any gcc2 internal prototype to avoid an error.  */
7326 /* We use char because int might match the return type of a gcc2
7327     builtin and then its argument prototype would still apply.  */
7328 char lwp_create();
7329
7330 int main() {
7331 lwp_create()
7332 ; return 0; }
7333 EOF
7334 if { (eval echo configure:7335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7335   rm -rf conftest*
7336   eval "ac_cv_lib_$ac_lib_var=yes"
7337 else
7338   echo "configure: failed program was:" >&5
7339   cat conftest.$ac_ext >&5
7340   rm -rf conftest*
7341   eval "ac_cv_lib_$ac_lib_var=no"
7342 fi
7343 rm -f conftest*
7344 LIBS="$ac_save_LIBS"
7345
7346 fi
7347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7348   echo "$ac_t""yes" 1>&6
7349   have_lwp=yes
7350 else
7351   echo "$ac_t""no" 1>&6
7352 have_lwp=no
7353 fi
7354
7355
7356                 if test $have_lwp = yes ; then
7357                         cat >> confdefs.h <<\EOF
7358 #define HAVE_LWP 1
7359 EOF
7360
7361                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
7362                         ol_link_threads=lwp
7363
7364                         if test $ol_with_yielding_select = auto ; then
7365                                 ol_with_yielding_select=no
7366                         fi
7367                 fi
7368         fi
7369 fi
7370
7371 if test $ol_with_yielding_select = yes ; then
7372         cat >> confdefs.h <<\EOF
7373 #define HAVE_YIELDING_SELECT 1
7374 EOF
7375
7376 fi
7377
7378 if test $ol_with_threads = manual ; then
7379                 ol_link_threads=yes
7380
7381         echo "configure: warning: thread defines and link options must be set manually" 1>&2
7382
7383         for ac_hdr in pthread.h sched.h
7384 do
7385 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7386 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7387 echo "configure:7388: checking for $ac_hdr" >&5
7388 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7389   echo $ac_n "(cached) $ac_c" 1>&6
7390 else
7391   cat > conftest.$ac_ext <<EOF
7392 #line 7393 "configure"
7393 #include "confdefs.h"
7394 #include <$ac_hdr>
7395 EOF
7396 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397 { (eval echo configure:7398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7398 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7399 if test -z "$ac_err"; then
7400   rm -rf conftest*
7401   eval "ac_cv_header_$ac_safe=yes"
7402 else
7403   echo "$ac_err" >&5
7404   echo "configure: failed program was:" >&5
7405   cat conftest.$ac_ext >&5
7406   rm -rf conftest*
7407   eval "ac_cv_header_$ac_safe=no"
7408 fi
7409 rm -f conftest*
7410 fi
7411 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7412   echo "$ac_t""yes" 1>&6
7413     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7414   cat >> confdefs.h <<EOF
7415 #define $ac_tr_hdr 1
7416 EOF
7417  
7418 else
7419   echo "$ac_t""no" 1>&6
7420 fi
7421 done
7422
7423         for ac_func in sched_yield pthread_yield
7424 do
7425 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7426 echo "configure:7427: checking for $ac_func" >&5
7427 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7428   echo $ac_n "(cached) $ac_c" 1>&6
7429 else
7430   cat > conftest.$ac_ext <<EOF
7431 #line 7432 "configure"
7432 #include "confdefs.h"
7433 /* System header to define __stub macros and hopefully few prototypes,
7434     which can conflict with char $ac_func(); below.  */
7435 #include <assert.h>
7436 /* Override any gcc2 internal prototype to avoid an error.  */
7437 /* We use char because int might match the return type of a gcc2
7438     builtin and then its argument prototype would still apply.  */
7439 char $ac_func();
7440
7441 int main() {
7442
7443 /* The GNU C library defines this for functions which it implements
7444     to always fail with ENOSYS.  Some functions are actually named
7445     something starting with __ and the normal name is an alias.  */
7446 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7447 choke me
7448 #else
7449 $ac_func();
7450 #endif
7451
7452 ; return 0; }
7453 EOF
7454 if { (eval echo configure:7455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7455   rm -rf conftest*
7456   eval "ac_cv_func_$ac_func=yes"
7457 else
7458   echo "configure: failed program was:" >&5
7459   cat conftest.$ac_ext >&5
7460   rm -rf conftest*
7461   eval "ac_cv_func_$ac_func=no"
7462 fi
7463 rm -f conftest*
7464 fi
7465
7466 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7467   echo "$ac_t""yes" 1>&6
7468     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7469   cat >> confdefs.h <<EOF
7470 #define $ac_tr_func 1
7471 EOF
7472  
7473 else
7474   echo "$ac_t""no" 1>&6
7475 fi
7476 done
7477
7478         
7479         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
7480 echo "configure:7481: checking for LinuxThreads pthread.h" >&5
7481 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
7482   echo $ac_n "(cached) $ac_c" 1>&6
7483 else
7484   cat > conftest.$ac_ext <<EOF
7485 #line 7486 "configure"
7486 #include "confdefs.h"
7487 #include <pthread.h>
7488 EOF
7489 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7490   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
7491   rm -rf conftest*
7492   ol_cv_header_linux_threads=yes
7493 else
7494   rm -rf conftest*
7495   ol_cv_header_linux_threads=no
7496 fi
7497 rm -f conftest*
7498
7499                 
7500 fi
7501
7502 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
7503         if test $ol_cv_header_linux_threads = yes; then
7504                 cat >> confdefs.h <<\EOF
7505 #define HAVE_LINUX_THREADS 1
7506 EOF
7507
7508         fi
7509
7510
7511         for ac_hdr in mach/cthreads.h
7512 do
7513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7515 echo "configure:7516: checking for $ac_hdr" >&5
7516 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7517   echo $ac_n "(cached) $ac_c" 1>&6
7518 else
7519   cat > conftest.$ac_ext <<EOF
7520 #line 7521 "configure"
7521 #include "confdefs.h"
7522 #include <$ac_hdr>
7523 EOF
7524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7525 { (eval echo configure:7526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7527 if test -z "$ac_err"; then
7528   rm -rf conftest*
7529   eval "ac_cv_header_$ac_safe=yes"
7530 else
7531   echo "$ac_err" >&5
7532   echo "configure: failed program was:" >&5
7533   cat conftest.$ac_ext >&5
7534   rm -rf conftest*
7535   eval "ac_cv_header_$ac_safe=no"
7536 fi
7537 rm -f conftest*
7538 fi
7539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7540   echo "$ac_t""yes" 1>&6
7541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7542   cat >> confdefs.h <<EOF
7543 #define $ac_tr_hdr 1
7544 EOF
7545  
7546 else
7547   echo "$ac_t""no" 1>&6
7548 fi
7549 done
7550
7551         for ac_hdr in lwp/lwp.h
7552 do
7553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7555 echo "configure:7556: checking for $ac_hdr" >&5
7556 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7557   echo $ac_n "(cached) $ac_c" 1>&6
7558 else
7559   cat > conftest.$ac_ext <<EOF
7560 #line 7561 "configure"
7561 #include "confdefs.h"
7562 #include <$ac_hdr>
7563 EOF
7564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7565 { (eval echo configure:7566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7567 if test -z "$ac_err"; then
7568   rm -rf conftest*
7569   eval "ac_cv_header_$ac_safe=yes"
7570 else
7571   echo "$ac_err" >&5
7572   echo "configure: failed program was:" >&5
7573   cat conftest.$ac_ext >&5
7574   rm -rf conftest*
7575   eval "ac_cv_header_$ac_safe=no"
7576 fi
7577 rm -f conftest*
7578 fi
7579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7580   echo "$ac_t""yes" 1>&6
7581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7582   cat >> confdefs.h <<EOF
7583 #define $ac_tr_hdr 1
7584 EOF
7585  
7586 else
7587   echo "$ac_t""no" 1>&6
7588 fi
7589 done
7590
7591         for ac_hdr in thread.h synch.h
7592 do
7593 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7594 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7595 echo "configure:7596: checking for $ac_hdr" >&5
7596 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7597   echo $ac_n "(cached) $ac_c" 1>&6
7598 else
7599   cat > conftest.$ac_ext <<EOF
7600 #line 7601 "configure"
7601 #include "confdefs.h"
7602 #include <$ac_hdr>
7603 EOF
7604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7605 { (eval echo configure:7606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7607 if test -z "$ac_err"; then
7608   rm -rf conftest*
7609   eval "ac_cv_header_$ac_safe=yes"
7610 else
7611   echo "$ac_err" >&5
7612   echo "configure: failed program was:" >&5
7613   cat conftest.$ac_ext >&5
7614   rm -rf conftest*
7615   eval "ac_cv_header_$ac_safe=no"
7616 fi
7617 rm -f conftest*
7618 fi
7619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7620   echo "$ac_t""yes" 1>&6
7621     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7622   cat >> confdefs.h <<EOF
7623 #define $ac_tr_hdr 1
7624 EOF
7625  
7626 else
7627   echo "$ac_t""no" 1>&6
7628 fi
7629 done
7630
7631 fi
7632
7633 if test $ol_link_threads != no ; then  
7634                         cat >> confdefs.h <<\EOF
7635 #define REENTRANT 1
7636 EOF
7637
7638         cat >> confdefs.h <<\EOF
7639 #define _REENTRANT 1
7640 EOF
7641
7642         cat >> confdefs.h <<\EOF
7643 #define THREAD_SAFE 1
7644 EOF
7645
7646         cat >> confdefs.h <<\EOF
7647 #define _THREAD_SAFE 1
7648 EOF
7649
7650         cat >> confdefs.h <<\EOF
7651 #define THREADSAFE 1
7652 EOF
7653
7654         cat >> confdefs.h <<\EOF
7655 #define _THREADSAFE 1
7656 EOF
7657
7658         cat >> confdefs.h <<\EOF
7659 #define _SGI_MP_SOURCE 1
7660 EOF
7661
7662
7663                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
7664 echo "configure:7665: checking for thread specific errno" >&5
7665 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
7666   echo $ac_n "(cached) $ac_c" 1>&6
7667 else
7668   
7669                 cat > conftest.$ac_ext <<EOF
7670 #line 7671 "configure"
7671 #include "confdefs.h"
7672 #include <errno.h>
7673 int main() {
7674 errno = 0;
7675 ; return 0; }
7676 EOF
7677 if { (eval echo configure:7678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7678   rm -rf conftest*
7679   ol_cv_errno_thread_specific=yes
7680 else
7681   echo "configure: failed program was:" >&5
7682   cat conftest.$ac_ext >&5
7683   rm -rf conftest*
7684   ol_cv_errno_thread_specific=no
7685 fi
7686 rm -f conftest*
7687         
7688 fi
7689
7690 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
7691
7692                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
7693 echo "configure:7694: checking for thread specific h_errno" >&5
7694 if eval "test \"`echo '$''{'ol_cv_h_errno_thread_specific'+set}'`\" = set"; then
7695   echo $ac_n "(cached) $ac_c" 1>&6
7696 else
7697   
7698                 cat > conftest.$ac_ext <<EOF
7699 #line 7700 "configure"
7700 #include "confdefs.h"
7701 #include <netdb.h>
7702 int main() {
7703 h_errno = 0;
7704 ; return 0; }
7705 EOF
7706 if { (eval echo configure:7707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7707   rm -rf conftest*
7708   ol_cv_h_errno_thread_specific=yes
7709 else
7710   echo "configure: failed program was:" >&5
7711   cat conftest.$ac_ext >&5
7712   rm -rf conftest*
7713   ol_cv_h_errno_thread_specific=no
7714 fi
7715 rm -f conftest*
7716         
7717 fi
7718
7719 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
7720
7721         if test $ol_cv_errno_thread_specific != yes \
7722                 -o $ol_cv_h_errno_thread_specific != yes ; then
7723                 LIBS="$LTHREAD_LIBS $LIBS"
7724                 LTHREAD_LIBS=""
7725         fi
7726
7727 fi  
7728
7729 if test $ol_link_threads = no ; then
7730         if test $ol_with_threads = yes ; then
7731                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
7732         fi
7733
7734         if test $ol_with_threads = auto ; then
7735                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
7736                 ol_with_threads=no
7737         fi
7738
7739         cat >> confdefs.h <<\EOF
7740 #define NO_THREADS 1
7741 EOF
7742
7743         LTHREAD_LIBS=""
7744 fi
7745
7746 if test $ol_link_threads != no ; then
7747         cat >> confdefs.h <<\EOF
7748 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
7749 EOF
7750
7751 fi
7752
7753
7754 ol_link_ldbm=no 
7755 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
7756         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
7757 echo "configure:7758: checking for DB2 library" >&5
7758 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
7759   echo $ac_n "(cached) $ac_c" 1>&6
7760 else
7761         ol_LIBS="$LIBS"
7762         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
7763 echo "configure:7764: checking for db_open in -ldb" >&5
7764 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
7765 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7766   echo $ac_n "(cached) $ac_c" 1>&6
7767 else
7768   ac_save_LIBS="$LIBS"
7769 LIBS="-ldb  $LIBS"
7770 cat > conftest.$ac_ext <<EOF
7771 #line 7772 "configure"
7772 #include "confdefs.h"
7773 /* Override any gcc2 internal prototype to avoid an error.  */
7774 /* We use char because int might match the return type of a gcc2
7775     builtin and then its argument prototype would still apply.  */
7776 char db_open();
7777
7778 int main() {
7779 db_open()
7780 ; return 0; }
7781 EOF
7782 if { (eval echo configure:7783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7783   rm -rf conftest*
7784   eval "ac_cv_lib_$ac_lib_var=yes"
7785 else
7786   echo "configure: failed program was:" >&5
7787   cat conftest.$ac_ext >&5
7788   rm -rf conftest*
7789   eval "ac_cv_lib_$ac_lib_var=no"
7790 fi
7791 rm -f conftest*
7792 LIBS="$ac_save_LIBS"
7793
7794 fi
7795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7796   echo "$ac_t""yes" 1>&6
7797   ol_cv_lib_db2=-ldb
7798 else
7799   echo "$ac_t""no" 1>&6
7800 ol_cv_lib_db2=no
7801 fi
7802
7803         LIBS="$ol_LIBS"
7804
7805 fi
7806
7807 echo "$ac_t""$ol_cv_lib_db2" 1>&6
7808
7809 for ac_hdr in db.h
7810 do
7811 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7812 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7813 echo "configure:7814: checking for $ac_hdr" >&5
7814 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7815   echo $ac_n "(cached) $ac_c" 1>&6
7816 else
7817   cat > conftest.$ac_ext <<EOF
7818 #line 7819 "configure"
7819 #include "confdefs.h"
7820 #include <$ac_hdr>
7821 EOF
7822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7823 { (eval echo configure:7824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7824 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7825 if test -z "$ac_err"; then
7826   rm -rf conftest*
7827   eval "ac_cv_header_$ac_safe=yes"
7828 else
7829   echo "$ac_err" >&5
7830   echo "configure: failed program was:" >&5
7831   cat conftest.$ac_ext >&5
7832   rm -rf conftest*
7833   eval "ac_cv_header_$ac_safe=no"
7834 fi
7835 rm -f conftest*
7836 fi
7837 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7838   echo "$ac_t""yes" 1>&6
7839     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7840   cat >> confdefs.h <<EOF
7841 #define $ac_tr_hdr 1
7842 EOF
7843  
7844 else
7845   echo "$ac_t""no" 1>&6
7846 fi
7847 done
7848
7849 if test $ac_cv_header_db_h = yes ; then
7850         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
7851 echo "configure:7852: checking if db.h is DB2" >&5
7852 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
7853   echo $ac_n "(cached) $ac_c" 1>&6
7854 else
7855   
7856                 cat > conftest.$ac_ext <<EOF
7857 #line 7858 "configure"
7858 #include "confdefs.h"
7859
7860 #                       include <db.h>
7861                         /* this check could be improved */
7862 #                       ifdef DB_VERSION_MAJOR
7863 #                               if DB_VERSION_MAJOR == 2
7864                                         __db_version_2
7865 #                               endif
7866 #                       endif
7867                 
7868 EOF
7869 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7870   egrep "__db_version_2" >/dev/null 2>&1; then
7871   rm -rf conftest*
7872   ol_cv_header_db2=yes
7873 else
7874   rm -rf conftest*
7875   ol_cv_header_db2=no
7876 fi
7877 rm -f conftest*
7878
7879 fi
7880
7881 echo "$ac_t""$ol_cv_header_db2" 1>&6
7882 else
7883         ol_cv_header_db2=no
7884 fi
7885
7886
7887  
7888  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
7889 echo "configure:7890: checking for Berkeley DB2" >&5
7890 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
7891   echo $ac_n "(cached) $ac_c" 1>&6
7892 else
7893   
7894         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
7895                 ol_cv_berkeley_db2=no
7896         else
7897                 ol_cv_berkeley_db2=yes
7898         fi
7899
7900 fi
7901
7902 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
7903  if test $ol_cv_berkeley_db2 = yes ; then
7904         cat >> confdefs.h <<\EOF
7905 #define HAVE_BERKELEY_DB2 1
7906 EOF
7907
7908  fi
7909
7910
7911         if test $ol_cv_berkeley_db2 = yes ; then
7912                 ol_link_ldbm=db2
7913                 ol_with_ldbm_api=db2
7914
7915                 if test $ol_with_ldbm_type = hash ; then
7916                         cat >> confdefs.h <<\EOF
7917 #define LDBM_USE_DBHASH 1
7918 EOF
7919
7920                 else
7921                         cat >> confdefs.h <<\EOF
7922 #define LDBM_USE_DBBTREE 1
7923 EOF
7924
7925                 fi
7926
7927                                                 if test $ol_cv_lib_db2 != yes ; then
7928                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
7929                 fi
7930         fi
7931 fi
7932
7933 ol_link_bdb2=no
7934 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
7935         ol_link_bdb2=yes
7936 fi
7937
7938 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
7939         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
7940 echo "configure:7941: checking for Berkeley DB library" >&5
7941 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
7942   echo $ac_n "(cached) $ac_c" 1>&6
7943 else
7944   
7945         for ac_hdr in db1/db.h
7946 do
7947 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7948 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7949 echo "configure:7950: checking for $ac_hdr" >&5
7950 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7951   echo $ac_n "(cached) $ac_c" 1>&6
7952 else
7953   cat > conftest.$ac_ext <<EOF
7954 #line 7955 "configure"
7955 #include "confdefs.h"
7956 #include <$ac_hdr>
7957 EOF
7958 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7959 { (eval echo configure:7960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7960 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7961 if test -z "$ac_err"; then
7962   rm -rf conftest*
7963   eval "ac_cv_header_$ac_safe=yes"
7964 else
7965   echo "$ac_err" >&5
7966   echo "configure: failed program was:" >&5
7967   cat conftest.$ac_ext >&5
7968   rm -rf conftest*
7969   eval "ac_cv_header_$ac_safe=no"
7970 fi
7971 rm -f conftest*
7972 fi
7973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7974   echo "$ac_t""yes" 1>&6
7975     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7976   cat >> confdefs.h <<EOF
7977 #define $ac_tr_hdr 1
7978 EOF
7979  
7980 else
7981   echo "$ac_t""no" 1>&6
7982 fi
7983 done
7984
7985         ol_LIBS="$LIBS"
7986         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
7987 echo "configure:7988: checking for dbopen" >&5
7988 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
7989   echo $ac_n "(cached) $ac_c" 1>&6
7990 else
7991   cat > conftest.$ac_ext <<EOF
7992 #line 7993 "configure"
7993 #include "confdefs.h"
7994 /* System header to define __stub macros and hopefully few prototypes,
7995     which can conflict with char dbopen(); below.  */
7996 #include <assert.h>
7997 /* Override any gcc2 internal prototype to avoid an error.  */
7998 /* We use char because int might match the return type of a gcc2
7999     builtin and then its argument prototype would still apply.  */
8000 char dbopen();
8001
8002 int main() {
8003
8004 /* The GNU C library defines this for functions which it implements
8005     to always fail with ENOSYS.  Some functions are actually named
8006     something starting with __ and the normal name is an alias.  */
8007 #if defined (__stub_dbopen) || defined (__stub___dbopen)
8008 choke me
8009 #else
8010 dbopen();
8011 #endif
8012
8013 ; return 0; }
8014 EOF
8015 if { (eval echo configure:8016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8016   rm -rf conftest*
8017   eval "ac_cv_func_dbopen=yes"
8018 else
8019   echo "configure: failed program was:" >&5
8020   cat conftest.$ac_ext >&5
8021   rm -rf conftest*
8022   eval "ac_cv_func_dbopen=no"
8023 fi
8024 rm -f conftest*
8025 fi
8026
8027 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
8028   echo "$ac_t""yes" 1>&6
8029   ol_cv_lib_db=yes
8030 else
8031   echo "$ac_t""no" 1>&6
8032
8033                 echo $ac_n "checking for dbopen in -ldb1""... $ac_c" 1>&6
8034 echo "configure:8035: checking for dbopen in -ldb1" >&5
8035 ac_lib_var=`echo db1'_'dbopen | sed 'y%./+-%__p_%'`
8036 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8037   echo $ac_n "(cached) $ac_c" 1>&6
8038 else
8039   ac_save_LIBS="$LIBS"
8040 LIBS="-ldb1  $LIBS"
8041 cat > conftest.$ac_ext <<EOF
8042 #line 8043 "configure"
8043 #include "confdefs.h"
8044 /* Override any gcc2 internal prototype to avoid an error.  */
8045 /* We use char because int might match the return type of a gcc2
8046     builtin and then its argument prototype would still apply.  */
8047 char dbopen();
8048
8049 int main() {
8050 dbopen()
8051 ; return 0; }
8052 EOF
8053 if { (eval echo configure:8054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8054   rm -rf conftest*
8055   eval "ac_cv_lib_$ac_lib_var=yes"
8056 else
8057   echo "configure: failed program was:" >&5
8058   cat conftest.$ac_ext >&5
8059   rm -rf conftest*
8060   eval "ac_cv_lib_$ac_lib_var=no"
8061 fi
8062 rm -f conftest*
8063 LIBS="$ac_save_LIBS"
8064
8065 fi
8066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8067   echo "$ac_t""yes" 1>&6
8068   ol_cv_lib_db=-ldb1
8069 else
8070   echo "$ac_t""no" 1>&6
8071
8072                         echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
8073 echo "configure:8074: checking for dbopen in -ldb" >&5
8074 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
8075 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8076   echo $ac_n "(cached) $ac_c" 1>&6
8077 else
8078   ac_save_LIBS="$LIBS"
8079 LIBS="-ldb  $LIBS"
8080 cat > conftest.$ac_ext <<EOF
8081 #line 8082 "configure"
8082 #include "confdefs.h"
8083 /* Override any gcc2 internal prototype to avoid an error.  */
8084 /* We use char because int might match the return type of a gcc2
8085     builtin and then its argument prototype would still apply.  */
8086 char dbopen();
8087
8088 int main() {
8089 dbopen()
8090 ; return 0; }
8091 EOF
8092 if { (eval echo configure:8093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8093   rm -rf conftest*
8094   eval "ac_cv_lib_$ac_lib_var=yes"
8095 else
8096   echo "configure: failed program was:" >&5
8097   cat conftest.$ac_ext >&5
8098   rm -rf conftest*
8099   eval "ac_cv_lib_$ac_lib_var=no"
8100 fi
8101 rm -f conftest*
8102 LIBS="$ac_save_LIBS"
8103
8104 fi
8105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8106   echo "$ac_t""yes" 1>&6
8107   ol_cv_lib_db=-ldb
8108 else
8109   echo "$ac_t""no" 1>&6
8110 ol_cv_lib_db=no
8111 fi
8112
8113                 
8114 fi
8115
8116         
8117 fi
8118
8119         LIBS="$ol_LIBS"
8120
8121 fi
8122
8123 echo "$ac_t""$ol_cv_lib_db" 1>&6
8124
8125
8126 for ac_hdr in db_185.h
8127 do
8128 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8129 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8130 echo "configure:8131: checking for $ac_hdr" >&5
8131 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8132   echo $ac_n "(cached) $ac_c" 1>&6
8133 else
8134   cat > conftest.$ac_ext <<EOF
8135 #line 8136 "configure"
8136 #include "confdefs.h"
8137 #include <$ac_hdr>
8138 EOF
8139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8140 { (eval echo configure:8141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8142 if test -z "$ac_err"; then
8143   rm -rf conftest*
8144   eval "ac_cv_header_$ac_safe=yes"
8145 else
8146   echo "$ac_err" >&5
8147   echo "configure: failed program was:" >&5
8148   cat conftest.$ac_ext >&5
8149   rm -rf conftest*
8150   eval "ac_cv_header_$ac_safe=no"
8151 fi
8152 rm -f conftest*
8153 fi
8154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8155   echo "$ac_t""yes" 1>&6
8156     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8157   cat >> confdefs.h <<EOF
8158 #define $ac_tr_hdr 1
8159 EOF
8160  
8161 else
8162   echo "$ac_t""no" 1>&6
8163 fi
8164 done
8165
8166 if test "$ol_cv_header_db2" = yes ; then
8167         
8168         ol_cv_header_db=$ac_cv_header_db_185_h
8169 else
8170         ol_cv_header_db=$ac_cv_header_db_h
8171 fi
8172
8173
8174  
8175  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
8176 echo "configure:8177: checking for Berkeley DB" >&5
8177 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
8178   echo $ac_n "(cached) $ac_c" 1>&6
8179 else
8180   
8181         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
8182                 ol_cv_berkeley_db=no
8183         else
8184                 ol_cv_berkeley_db=yes
8185         fi
8186
8187 fi
8188
8189 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
8190  if test $ol_cv_berkeley_db = yes ; then
8191         cat >> confdefs.h <<\EOF
8192 #define HAVE_BERKELEY_DB 1
8193 EOF
8194
8195  fi
8196
8197
8198         if test $ol_cv_berkeley_db = yes ; then
8199                 ol_link_ldbm=db
8200                 ol_with_ldbm_api=db
8201
8202                 if test $ol_with_ldbm_type = hash ; then
8203                         cat >> confdefs.h <<\EOF
8204 #define LDBM_USE_DBHASH 1
8205 EOF
8206
8207                 else
8208                         cat >> confdefs.h <<\EOF
8209 #define LDBM_USE_DBBTREE 1
8210 EOF
8211
8212                 fi
8213
8214                                                 if test $ol_cv_lib_db != yes ; then
8215                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
8216                 fi
8217         fi
8218 fi
8219
8220 if test $ol_with_ldbm_api = manual ; then
8221                 ol_link_ldbm=yes
8222
8223         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
8224
8225         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
8226 do
8227 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8228 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8229 echo "configure:8230: checking for $ac_hdr" >&5
8230 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8231   echo $ac_n "(cached) $ac_c" 1>&6
8232 else
8233   cat > conftest.$ac_ext <<EOF
8234 #line 8235 "configure"
8235 #include "confdefs.h"
8236 #include <$ac_hdr>
8237 EOF
8238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8239 { (eval echo configure:8240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8241 if test -z "$ac_err"; then
8242   rm -rf conftest*
8243   eval "ac_cv_header_$ac_safe=yes"
8244 else
8245   echo "$ac_err" >&5
8246   echo "configure: failed program was:" >&5
8247   cat conftest.$ac_ext >&5
8248   rm -rf conftest*
8249   eval "ac_cv_header_$ac_safe=no"
8250 fi
8251 rm -f conftest*
8252 fi
8253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8254   echo "$ac_t""yes" 1>&6
8255     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8256   cat >> confdefs.h <<EOF
8257 #define $ac_tr_hdr 1
8258 EOF
8259  
8260 else
8261   echo "$ac_t""no" 1>&6
8262 fi
8263 done
8264
8265 fi
8266
8267 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
8268         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
8269         ol_with_ldbm_api=none
8270 fi
8271
8272 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
8273         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
8274 echo "configure:8275: checking for MDBM library" >&5
8275 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
8276   echo $ac_n "(cached) $ac_c" 1>&6
8277 else
8278         ol_LIBS="$LIBS"
8279         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
8280 echo "configure:8281: checking for mdbm_set_chain" >&5
8281 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
8282   echo $ac_n "(cached) $ac_c" 1>&6
8283 else
8284   cat > conftest.$ac_ext <<EOF
8285 #line 8286 "configure"
8286 #include "confdefs.h"
8287 /* System header to define __stub macros and hopefully few prototypes,
8288     which can conflict with char mdbm_set_chain(); below.  */
8289 #include <assert.h>
8290 /* Override any gcc2 internal prototype to avoid an error.  */
8291 /* We use char because int might match the return type of a gcc2
8292     builtin and then its argument prototype would still apply.  */
8293 char mdbm_set_chain();
8294
8295 int main() {
8296
8297 /* The GNU C library defines this for functions which it implements
8298     to always fail with ENOSYS.  Some functions are actually named
8299     something starting with __ and the normal name is an alias.  */
8300 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
8301 choke me
8302 #else
8303 mdbm_set_chain();
8304 #endif
8305
8306 ; return 0; }
8307 EOF
8308 if { (eval echo configure:8309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8309   rm -rf conftest*
8310   eval "ac_cv_func_mdbm_set_chain=yes"
8311 else
8312   echo "configure: failed program was:" >&5
8313   cat conftest.$ac_ext >&5
8314   rm -rf conftest*
8315   eval "ac_cv_func_mdbm_set_chain=no"
8316 fi
8317 rm -f conftest*
8318 fi
8319
8320 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
8321   echo "$ac_t""yes" 1>&6
8322   ol_cv_lib_mdbm=yes
8323 else
8324   echo "$ac_t""no" 1>&6
8325
8326                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
8327 echo "configure:8328: checking for mdbm_set_chain in -lmdbm" >&5
8328 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
8329 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8330   echo $ac_n "(cached) $ac_c" 1>&6
8331 else
8332   ac_save_LIBS="$LIBS"
8333 LIBS="-lmdbm  $LIBS"
8334 cat > conftest.$ac_ext <<EOF
8335 #line 8336 "configure"
8336 #include "confdefs.h"
8337 /* Override any gcc2 internal prototype to avoid an error.  */
8338 /* We use char because int might match the return type of a gcc2
8339     builtin and then its argument prototype would still apply.  */
8340 char mdbm_set_chain();
8341
8342 int main() {
8343 mdbm_set_chain()
8344 ; return 0; }
8345 EOF
8346 if { (eval echo configure:8347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8347   rm -rf conftest*
8348   eval "ac_cv_lib_$ac_lib_var=yes"
8349 else
8350   echo "configure: failed program was:" >&5
8351   cat conftest.$ac_ext >&5
8352   rm -rf conftest*
8353   eval "ac_cv_lib_$ac_lib_var=no"
8354 fi
8355 rm -f conftest*
8356 LIBS="$ac_save_LIBS"
8357
8358 fi
8359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8360   echo "$ac_t""yes" 1>&6
8361   ol_cv_lib_mdbm=-lmdbm
8362 else
8363   echo "$ac_t""no" 1>&6
8364 ol_cv_lib_mdbm=no
8365 fi
8366
8367         
8368 fi
8369
8370         LIBS="$ol_LIBS"
8371
8372 fi
8373
8374 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
8375
8376
8377  for ac_hdr in mdbm.h
8378 do
8379 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8380 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8381 echo "configure:8382: checking for $ac_hdr" >&5
8382 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8383   echo $ac_n "(cached) $ac_c" 1>&6
8384 else
8385   cat > conftest.$ac_ext <<EOF
8386 #line 8387 "configure"
8387 #include "confdefs.h"
8388 #include <$ac_hdr>
8389 EOF
8390 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8391 { (eval echo configure:8392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8392 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8393 if test -z "$ac_err"; then
8394   rm -rf conftest*
8395   eval "ac_cv_header_$ac_safe=yes"
8396 else
8397   echo "$ac_err" >&5
8398   echo "configure: failed program was:" >&5
8399   cat conftest.$ac_ext >&5
8400   rm -rf conftest*
8401   eval "ac_cv_header_$ac_safe=no"
8402 fi
8403 rm -f conftest*
8404 fi
8405 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8406   echo "$ac_t""yes" 1>&6
8407     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8408   cat >> confdefs.h <<EOF
8409 #define $ac_tr_hdr 1
8410 EOF
8411  
8412 else
8413   echo "$ac_t""no" 1>&6
8414 fi
8415 done
8416
8417  echo $ac_n "checking for db""... $ac_c" 1>&6
8418 echo "configure:8419: checking for db" >&5
8419 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
8420   echo $ac_n "(cached) $ac_c" 1>&6
8421 else
8422   
8423         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
8424                 ol_cv_mdbm=no
8425         else
8426                 ol_cv_mdbm=yes
8427         fi
8428
8429 fi
8430
8431 echo "$ac_t""$ol_cv_mdbm" 1>&6
8432  if test $ol_cv_mdbm = yes ; then
8433         cat >> confdefs.h <<\EOF
8434 #define HAVE_MDBM 1
8435 EOF
8436
8437  fi
8438
8439
8440         if test $ol_cv_mdbm = yes ; then
8441                 ol_link_ldbm=mdbm
8442                 ol_with_ldbm_api=mdbm
8443                 if test $ol_cv_lib_mdbm != yes ; then
8444                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
8445                 fi
8446         fi
8447 fi
8448
8449 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
8450         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
8451 echo "configure:8452: checking for GDBM library" >&5
8452 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
8453   echo $ac_n "(cached) $ac_c" 1>&6
8454 else
8455         ol_LIBS="$LIBS"
8456         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
8457 echo "configure:8458: checking for gdbm_open" >&5
8458 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
8459   echo $ac_n "(cached) $ac_c" 1>&6
8460 else
8461   cat > conftest.$ac_ext <<EOF
8462 #line 8463 "configure"
8463 #include "confdefs.h"
8464 /* System header to define __stub macros and hopefully few prototypes,
8465     which can conflict with char gdbm_open(); below.  */
8466 #include <assert.h>
8467 /* Override any gcc2 internal prototype to avoid an error.  */
8468 /* We use char because int might match the return type of a gcc2
8469     builtin and then its argument prototype would still apply.  */
8470 char gdbm_open();
8471
8472 int main() {
8473
8474 /* The GNU C library defines this for functions which it implements
8475     to always fail with ENOSYS.  Some functions are actually named
8476     something starting with __ and the normal name is an alias.  */
8477 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
8478 choke me
8479 #else
8480 gdbm_open();
8481 #endif
8482
8483 ; return 0; }
8484 EOF
8485 if { (eval echo configure:8486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8486   rm -rf conftest*
8487   eval "ac_cv_func_gdbm_open=yes"
8488 else
8489   echo "configure: failed program was:" >&5
8490   cat conftest.$ac_ext >&5
8491   rm -rf conftest*
8492   eval "ac_cv_func_gdbm_open=no"
8493 fi
8494 rm -f conftest*
8495 fi
8496
8497 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
8498   echo "$ac_t""yes" 1>&6
8499   ol_cv_lib_gdbm=yes
8500 else
8501   echo "$ac_t""no" 1>&6
8502
8503                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
8504 echo "configure:8505: checking for gdbm_open in -lgdbm" >&5
8505 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
8506 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8507   echo $ac_n "(cached) $ac_c" 1>&6
8508 else
8509   ac_save_LIBS="$LIBS"
8510 LIBS="-lgdbm  $LIBS"
8511 cat > conftest.$ac_ext <<EOF
8512 #line 8513 "configure"
8513 #include "confdefs.h"
8514 /* Override any gcc2 internal prototype to avoid an error.  */
8515 /* We use char because int might match the return type of a gcc2
8516     builtin and then its argument prototype would still apply.  */
8517 char gdbm_open();
8518
8519 int main() {
8520 gdbm_open()
8521 ; return 0; }
8522 EOF
8523 if { (eval echo configure:8524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8524   rm -rf conftest*
8525   eval "ac_cv_lib_$ac_lib_var=yes"
8526 else
8527   echo "configure: failed program was:" >&5
8528   cat conftest.$ac_ext >&5
8529   rm -rf conftest*
8530   eval "ac_cv_lib_$ac_lib_var=no"
8531 fi
8532 rm -f conftest*
8533 LIBS="$ac_save_LIBS"
8534
8535 fi
8536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8537   echo "$ac_t""yes" 1>&6
8538   ol_cv_lib_gdbm=-lgdbm
8539 else
8540   echo "$ac_t""no" 1>&6
8541 ol_cv_lib_gdbm=no
8542 fi
8543
8544         
8545 fi
8546
8547         LIBS="$ol_LIBS"
8548
8549 fi
8550
8551 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
8552
8553
8554  for ac_hdr in gdbm.h
8555 do
8556 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8557 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8558 echo "configure:8559: checking for $ac_hdr" >&5
8559 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8560   echo $ac_n "(cached) $ac_c" 1>&6
8561 else
8562   cat > conftest.$ac_ext <<EOF
8563 #line 8564 "configure"
8564 #include "confdefs.h"
8565 #include <$ac_hdr>
8566 EOF
8567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8568 { (eval echo configure:8569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8570 if test -z "$ac_err"; then
8571   rm -rf conftest*
8572   eval "ac_cv_header_$ac_safe=yes"
8573 else
8574   echo "$ac_err" >&5
8575   echo "configure: failed program was:" >&5
8576   cat conftest.$ac_ext >&5
8577   rm -rf conftest*
8578   eval "ac_cv_header_$ac_safe=no"
8579 fi
8580 rm -f conftest*
8581 fi
8582 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8583   echo "$ac_t""yes" 1>&6
8584     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8585   cat >> confdefs.h <<EOF
8586 #define $ac_tr_hdr 1
8587 EOF
8588  
8589 else
8590   echo "$ac_t""no" 1>&6
8591 fi
8592 done
8593
8594  echo $ac_n "checking for db""... $ac_c" 1>&6
8595 echo "configure:8596: checking for db" >&5
8596 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
8597   echo $ac_n "(cached) $ac_c" 1>&6
8598 else
8599   
8600         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
8601                 ol_cv_gdbm=no
8602         else
8603                 ol_cv_gdbm=yes
8604         fi
8605
8606 fi
8607
8608 echo "$ac_t""$ol_cv_gdbm" 1>&6
8609  if test $ol_cv_gdbm = yes ; then
8610         cat >> confdefs.h <<\EOF
8611 #define HAVE_GDBM 1
8612 EOF
8613
8614  fi
8615
8616
8617         if test $ol_cv_gdbm = yes ; then
8618                 ol_link_ldbm=gdbm
8619                 ol_with_ldbm_api=gdbm
8620
8621                 if test $ol_cv_lib_gdbm != yes ; then
8622                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
8623                 fi
8624         fi
8625 fi
8626
8627 if test $ol_with_ldbm_api = auto ; then
8628         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
8629 elif test $ol_with_ldbm_api = ndbm ; then
8630         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
8631 echo "configure:8632: checking for NDBM library" >&5
8632 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
8633   echo $ac_n "(cached) $ac_c" 1>&6
8634 else
8635         ol_LIBS="$LIBS"
8636         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
8637 echo "configure:8638: checking for dbm_open" >&5
8638 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
8639   echo $ac_n "(cached) $ac_c" 1>&6
8640 else
8641   cat > conftest.$ac_ext <<EOF
8642 #line 8643 "configure"
8643 #include "confdefs.h"
8644 /* System header to define __stub macros and hopefully few prototypes,
8645     which can conflict with char dbm_open(); below.  */
8646 #include <assert.h>
8647 /* Override any gcc2 internal prototype to avoid an error.  */
8648 /* We use char because int might match the return type of a gcc2
8649     builtin and then its argument prototype would still apply.  */
8650 char dbm_open();
8651
8652 int main() {
8653
8654 /* The GNU C library defines this for functions which it implements
8655     to always fail with ENOSYS.  Some functions are actually named
8656     something starting with __ and the normal name is an alias.  */
8657 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
8658 choke me
8659 #else
8660 dbm_open();
8661 #endif
8662
8663 ; return 0; }
8664 EOF
8665 if { (eval echo configure:8666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8666   rm -rf conftest*
8667   eval "ac_cv_func_dbm_open=yes"
8668 else
8669   echo "configure: failed program was:" >&5
8670   cat conftest.$ac_ext >&5
8671   rm -rf conftest*
8672   eval "ac_cv_func_dbm_open=no"
8673 fi
8674 rm -f conftest*
8675 fi
8676
8677 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
8678   echo "$ac_t""yes" 1>&6
8679   ol_cv_lib_ndbm=yes
8680 else
8681   echo "$ac_t""no" 1>&6
8682
8683                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
8684 echo "configure:8685: checking for dbm_open in -lndbm" >&5
8685 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
8686 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8687   echo $ac_n "(cached) $ac_c" 1>&6
8688 else
8689   ac_save_LIBS="$LIBS"
8690 LIBS="-lndbm  $LIBS"
8691 cat > conftest.$ac_ext <<EOF
8692 #line 8693 "configure"
8693 #include "confdefs.h"
8694 /* Override any gcc2 internal prototype to avoid an error.  */
8695 /* We use char because int might match the return type of a gcc2
8696     builtin and then its argument prototype would still apply.  */
8697 char dbm_open();
8698
8699 int main() {
8700 dbm_open()
8701 ; return 0; }
8702 EOF
8703 if { (eval echo configure:8704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8704   rm -rf conftest*
8705   eval "ac_cv_lib_$ac_lib_var=yes"
8706 else
8707   echo "configure: failed program was:" >&5
8708   cat conftest.$ac_ext >&5
8709   rm -rf conftest*
8710   eval "ac_cv_lib_$ac_lib_var=no"
8711 fi
8712 rm -f conftest*
8713 LIBS="$ac_save_LIBS"
8714
8715 fi
8716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8717   echo "$ac_t""yes" 1>&6
8718   ol_cv_lib_ndbm=-lndbm
8719 else
8720   echo "$ac_t""no" 1>&6
8721
8722                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
8723 echo "configure:8724: checking for dbm_open in -ldbm" >&5
8724 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
8725 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8726   echo $ac_n "(cached) $ac_c" 1>&6
8727 else
8728   ac_save_LIBS="$LIBS"
8729 LIBS="-ldbm  $LIBS"
8730 cat > conftest.$ac_ext <<EOF
8731 #line 8732 "configure"
8732 #include "confdefs.h"
8733 /* Override any gcc2 internal prototype to avoid an error.  */
8734 /* We use char because int might match the return type of a gcc2
8735     builtin and then its argument prototype would still apply.  */
8736 char dbm_open();
8737
8738 int main() {
8739 dbm_open()
8740 ; return 0; }
8741 EOF
8742 if { (eval echo configure:8743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8743   rm -rf conftest*
8744   eval "ac_cv_lib_$ac_lib_var=yes"
8745 else
8746   echo "configure: failed program was:" >&5
8747   cat conftest.$ac_ext >&5
8748   rm -rf conftest*
8749   eval "ac_cv_lib_$ac_lib_var=no"
8750 fi
8751 rm -f conftest*
8752 LIBS="$ac_save_LIBS"
8753
8754 fi
8755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8756   echo "$ac_t""yes" 1>&6
8757   ol_cv_lib_ndbm=-ldbm
8758 else
8759   echo "$ac_t""no" 1>&6
8760 ol_cv_lib_ndbm=no
8761 fi
8762                 
8763 fi
8764
8765         
8766 fi
8767
8768         LIBS="$ol_LIBS"
8769
8770 fi
8771
8772 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
8773
8774
8775  for ac_hdr in ndbm.h
8776 do
8777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8779 echo "configure:8780: checking for $ac_hdr" >&5
8780 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8781   echo $ac_n "(cached) $ac_c" 1>&6
8782 else
8783   cat > conftest.$ac_ext <<EOF
8784 #line 8785 "configure"
8785 #include "confdefs.h"
8786 #include <$ac_hdr>
8787 EOF
8788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8789 { (eval echo configure:8790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8791 if test -z "$ac_err"; then
8792   rm -rf conftest*
8793   eval "ac_cv_header_$ac_safe=yes"
8794 else
8795   echo "$ac_err" >&5
8796   echo "configure: failed program was:" >&5
8797   cat conftest.$ac_ext >&5
8798   rm -rf conftest*
8799   eval "ac_cv_header_$ac_safe=no"
8800 fi
8801 rm -f conftest*
8802 fi
8803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8804   echo "$ac_t""yes" 1>&6
8805     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8806   cat >> confdefs.h <<EOF
8807 #define $ac_tr_hdr 1
8808 EOF
8809  
8810 else
8811   echo "$ac_t""no" 1>&6
8812 fi
8813 done
8814
8815  echo $ac_n "checking for db""... $ac_c" 1>&6
8816 echo "configure:8817: checking for db" >&5
8817 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
8818   echo $ac_n "(cached) $ac_c" 1>&6
8819 else
8820   
8821         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
8822                 ol_cv_ndbm=no
8823         else
8824                 ol_cv_ndbm=yes
8825         fi
8826
8827 fi
8828
8829 echo "$ac_t""$ol_cv_ndbm" 1>&6
8830  if test $ol_cv_ndbm = yes ; then
8831         cat >> confdefs.h <<\EOF
8832 #define HAVE_NDBM 1
8833 EOF
8834
8835  fi
8836
8837
8838         if test $ol_cv_ndbm = yes ; then
8839                 ol_link_ldbm=ndbm
8840                 ol_with_ldbm_api=ndbm
8841
8842                 if test $ol_cv_lib_ndbm != yes ; then
8843                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
8844                 fi
8845         fi
8846 fi
8847
8848 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
8849         echo "configure: warning: could not find suitable LDBM backend" 1>&2
8850         if test $ol_enable_ldbm = yes ; then
8851                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
8852         fi
8853
8854         echo "configure: warning: disabling LDBM" 1>&2
8855         ol_enable_ldbm=no
8856 fi
8857
8858 if test $ol_enable_wrappers != no ; then
8859         for ac_hdr in tcpd.h
8860 do
8861 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8862 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8863 echo "configure:8864: checking for $ac_hdr" >&5
8864 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8865   echo $ac_n "(cached) $ac_c" 1>&6
8866 else
8867   cat > conftest.$ac_ext <<EOF
8868 #line 8869 "configure"
8869 #include "confdefs.h"
8870 #include <$ac_hdr>
8871 EOF
8872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8873 { (eval echo configure:8874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8875 if test -z "$ac_err"; then
8876   rm -rf conftest*
8877   eval "ac_cv_header_$ac_safe=yes"
8878 else
8879   echo "$ac_err" >&5
8880   echo "configure: failed program was:" >&5
8881   cat conftest.$ac_ext >&5
8882   rm -rf conftest*
8883   eval "ac_cv_header_$ac_safe=no"
8884 fi
8885 rm -f conftest*
8886 fi
8887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8888   echo "$ac_t""yes" 1>&6
8889     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8890   cat >> confdefs.h <<EOF
8891 #define $ac_tr_hdr 1
8892 EOF
8893  
8894 else
8895   echo "$ac_t""no" 1>&6
8896 fi
8897 done
8898
8899
8900         if test $ac_cv_header_tcpd_h != yes ; then
8901                 have_wrappers=no
8902         else
8903                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
8904 echo "configure:8905: checking for main in -lwrap" >&5
8905 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
8906 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8907   echo $ac_n "(cached) $ac_c" 1>&6
8908 else
8909   ac_save_LIBS="$LIBS"
8910 LIBS="-lwrap  $LIBS"
8911 cat > conftest.$ac_ext <<EOF
8912 #line 8913 "configure"
8913 #include "confdefs.h"
8914
8915 int main() {
8916 main()
8917 ; return 0; }
8918 EOF
8919 if { (eval echo configure:8920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8920   rm -rf conftest*
8921   eval "ac_cv_lib_$ac_lib_var=yes"
8922 else
8923   echo "configure: failed program was:" >&5
8924   cat conftest.$ac_ext >&5
8925   rm -rf conftest*
8926   eval "ac_cv_lib_$ac_lib_var=no"
8927 fi
8928 rm -f conftest*
8929 LIBS="$ac_save_LIBS"
8930
8931 fi
8932 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8933   echo "$ac_t""yes" 1>&6
8934   have_wrappers=yes
8935 else
8936   echo "$ac_t""no" 1>&6
8937 have_wrappers=no
8938 fi
8939
8940         fi
8941
8942         if test $have_wrappers = yes ; then
8943                 cat >> confdefs.h <<\EOF
8944 #define HAVE_TCPD 1
8945 EOF
8946
8947                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
8948
8949                                                 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
8950 echo "configure:8951: checking for main in -lnsl" >&5
8951 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
8952 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8953   echo $ac_n "(cached) $ac_c" 1>&6
8954 else
8955   ac_save_LIBS="$LIBS"
8956 LIBS="-lnsl  $LIBS"
8957 cat > conftest.$ac_ext <<EOF
8958 #line 8959 "configure"
8959 #include "confdefs.h"
8960
8961 int main() {
8962 main()
8963 ; return 0; }
8964 EOF
8965 if { (eval echo configure:8966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8966   rm -rf conftest*
8967   eval "ac_cv_lib_$ac_lib_var=yes"
8968 else
8969   echo "configure: failed program was:" >&5
8970   cat conftest.$ac_ext >&5
8971   rm -rf conftest*
8972   eval "ac_cv_lib_$ac_lib_var=no"
8973 fi
8974 rm -f conftest*
8975 LIBS="$ac_save_LIBS"
8976
8977 fi
8978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8979   echo "$ac_t""yes" 1>&6
8980     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8981     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8982   cat >> confdefs.h <<EOF
8983 #define $ac_tr_lib 1
8984 EOF
8985
8986   LIBS="-lnsl $LIBS"
8987
8988 else
8989   echo "$ac_t""no" 1>&6
8990 fi
8991
8992         else
8993                 echo "configure: warning: could not find -lwrap" 1>&2
8994                 if test $ol_enable_wrappers = yes ; then
8995                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
8996                 fi
8997
8998                 echo "configure: warning: disabling wrappers support" 1>&2
8999                 ol_enable_wrappers=no
9000         fi
9001 fi
9002
9003 if test $ol_enable_syslog != no ; then
9004         echo $ac_n "checking for openlog""... $ac_c" 1>&6
9005 echo "configure:9006: checking for openlog" >&5
9006 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
9007   echo $ac_n "(cached) $ac_c" 1>&6
9008 else
9009   cat > conftest.$ac_ext <<EOF
9010 #line 9011 "configure"
9011 #include "confdefs.h"
9012 /* System header to define __stub macros and hopefully few prototypes,
9013     which can conflict with char openlog(); below.  */
9014 #include <assert.h>
9015 /* Override any gcc2 internal prototype to avoid an error.  */
9016 /* We use char because int might match the return type of a gcc2
9017     builtin and then its argument prototype would still apply.  */
9018 char openlog();
9019
9020 int main() {
9021
9022 /* The GNU C library defines this for functions which it implements
9023     to always fail with ENOSYS.  Some functions are actually named
9024     something starting with __ and the normal name is an alias.  */
9025 #if defined (__stub_openlog) || defined (__stub___openlog)
9026 choke me
9027 #else
9028 openlog();
9029 #endif
9030
9031 ; return 0; }
9032 EOF
9033 if { (eval echo configure:9034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9034   rm -rf conftest*
9035   eval "ac_cv_func_openlog=yes"
9036 else
9037   echo "configure: failed program was:" >&5
9038   cat conftest.$ac_ext >&5
9039   rm -rf conftest*
9040   eval "ac_cv_func_openlog=no"
9041 fi
9042 rm -f conftest*
9043 fi
9044
9045 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
9046   echo "$ac_t""yes" 1>&6
9047   :
9048 else
9049   echo "$ac_t""no" 1>&6
9050 fi
9051
9052         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
9053                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
9054         fi
9055         ol_enable_syslog=$ac_cv_func_openlog
9056 fi
9057
9058 if test $ol_enable_dmalloc != no ; then
9059         for ac_hdr in dmalloc.h
9060 do
9061 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9062 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9063 echo "configure:9064: checking for $ac_hdr" >&5
9064 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9065   echo $ac_n "(cached) $ac_c" 1>&6
9066 else
9067   cat > conftest.$ac_ext <<EOF
9068 #line 9069 "configure"
9069 #include "confdefs.h"
9070 #include <$ac_hdr>
9071 EOF
9072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9073 { (eval echo configure:9074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9075 if test -z "$ac_err"; then
9076   rm -rf conftest*
9077   eval "ac_cv_header_$ac_safe=yes"
9078 else
9079   echo "$ac_err" >&5
9080   echo "configure: failed program was:" >&5
9081   cat conftest.$ac_ext >&5
9082   rm -rf conftest*
9083   eval "ac_cv_header_$ac_safe=no"
9084 fi
9085 rm -f conftest*
9086 fi
9087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9088   echo "$ac_t""yes" 1>&6
9089     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9090   cat >> confdefs.h <<EOF
9091 #define $ac_tr_hdr 1
9092 EOF
9093  
9094 else
9095   echo "$ac_t""no" 1>&6
9096 fi
9097 done
9098
9099         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
9100 echo "configure:9101: checking for dmalloc_shutdown in -ldmalloc" >&5
9101 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
9102 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9103   echo $ac_n "(cached) $ac_c" 1>&6
9104 else
9105   ac_save_LIBS="$LIBS"
9106 LIBS="-ldmalloc  $LIBS"
9107 cat > conftest.$ac_ext <<EOF
9108 #line 9109 "configure"
9109 #include "confdefs.h"
9110 /* Override any gcc2 internal prototype to avoid an error.  */
9111 /* We use char because int might match the return type of a gcc2
9112     builtin and then its argument prototype would still apply.  */
9113 char dmalloc_shutdown();
9114
9115 int main() {
9116 dmalloc_shutdown()
9117 ; return 0; }
9118 EOF
9119 if { (eval echo configure:9120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9120   rm -rf conftest*
9121   eval "ac_cv_lib_$ac_lib_var=yes"
9122 else
9123   echo "configure: failed program was:" >&5
9124   cat conftest.$ac_ext >&5
9125   rm -rf conftest*
9126   eval "ac_cv_lib_$ac_lib_var=no"
9127 fi
9128 rm -f conftest*
9129 LIBS="$ac_save_LIBS"
9130
9131 fi
9132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9133   echo "$ac_t""yes" 1>&6
9134     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9135     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9136   cat >> confdefs.h <<EOF
9137 #define $ac_tr_lib 1
9138 EOF
9139
9140   LIBS="-ldmalloc $LIBS"
9141
9142 else
9143   echo "$ac_t""no" 1>&6
9144 fi
9145
9146 fi
9147
9148 if test $ol_enable_tcl != no ; then
9149         for ac_hdr in tcl.h
9150 do
9151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9153 echo "configure:9154: checking for $ac_hdr" >&5
9154 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9155   echo $ac_n "(cached) $ac_c" 1>&6
9156 else
9157   cat > conftest.$ac_ext <<EOF
9158 #line 9159 "configure"
9159 #include "confdefs.h"
9160 #include <$ac_hdr>
9161 EOF
9162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9163 { (eval echo configure:9164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9165 if test -z "$ac_err"; then
9166   rm -rf conftest*
9167   eval "ac_cv_header_$ac_safe=yes"
9168 else
9169   echo "$ac_err" >&5
9170   echo "configure: failed program was:" >&5
9171   cat conftest.$ac_ext >&5
9172   rm -rf conftest*
9173   eval "ac_cv_header_$ac_safe=no"
9174 fi
9175 rm -f conftest*
9176 fi
9177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9178   echo "$ac_t""yes" 1>&6
9179     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9180   cat >> confdefs.h <<EOF
9181 #define $ac_tr_hdr 1
9182 EOF
9183  
9184 else
9185   echo "$ac_t""no" 1>&6
9186 fi
9187 done
9188
9189
9190         if test $ac_cv_header_tcl_h != yes ; then
9191                 have_tcl=no
9192         else
9193                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
9194 echo "configure:9195: checking for main in -ltcl" >&5
9195 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
9196 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9197   echo $ac_n "(cached) $ac_c" 1>&6
9198 else
9199   ac_save_LIBS="$LIBS"
9200 LIBS="-ltcl  $LIBS"
9201 cat > conftest.$ac_ext <<EOF
9202 #line 9203 "configure"
9203 #include "confdefs.h"
9204
9205 int main() {
9206 main()
9207 ; return 0; }
9208 EOF
9209 if { (eval echo configure:9210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9210   rm -rf conftest*
9211   eval "ac_cv_lib_$ac_lib_var=yes"
9212 else
9213   echo "configure: failed program was:" >&5
9214   cat conftest.$ac_ext >&5
9215   rm -rf conftest*
9216   eval "ac_cv_lib_$ac_lib_var=no"
9217 fi
9218 rm -f conftest*
9219 LIBS="$ac_save_LIBS"
9220
9221 fi
9222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9223   echo "$ac_t""yes" 1>&6
9224   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
9225 else
9226   echo "$ac_t""no" 1>&6
9227 have_tcl=no
9228 fi
9229
9230
9231                 if test $have_tcl != yes; then
9232                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
9233 echo "configure:9234: checking for main in -ltcl7.6" >&5
9234 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
9235 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9236   echo $ac_n "(cached) $ac_c" 1>&6
9237 else
9238   ac_save_LIBS="$LIBS"
9239 LIBS="-ltcl7.6  $LIBS"
9240 cat > conftest.$ac_ext <<EOF
9241 #line 9242 "configure"
9242 #include "confdefs.h"
9243
9244 int main() {
9245 main()
9246 ; return 0; }
9247 EOF
9248 if { (eval echo configure:9249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9249   rm -rf conftest*
9250   eval "ac_cv_lib_$ac_lib_var=yes"
9251 else
9252   echo "configure: failed program was:" >&5
9253   cat conftest.$ac_ext >&5
9254   rm -rf conftest*
9255   eval "ac_cv_lib_$ac_lib_var=no"
9256 fi
9257 rm -f conftest*
9258 LIBS="$ac_save_LIBS"
9259
9260 fi
9261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9262   echo "$ac_t""yes" 1>&6
9263   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
9264 else
9265   echo "$ac_t""no" 1>&6
9266 have_tcl=no
9267 fi
9268
9269                 fi
9270
9271                 if test $have_tcl != yes; then
9272                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
9273 echo "configure:9274: checking for main in -ltcl8.0" >&5
9274 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
9275 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9276   echo $ac_n "(cached) $ac_c" 1>&6
9277 else
9278   ac_save_LIBS="$LIBS"
9279 LIBS="-ltcl8.0  $LIBS"
9280 cat > conftest.$ac_ext <<EOF
9281 #line 9282 "configure"
9282 #include "confdefs.h"
9283
9284 int main() {
9285 main()
9286 ; return 0; }
9287 EOF
9288 if { (eval echo configure:9289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9289   rm -rf conftest*
9290   eval "ac_cv_lib_$ac_lib_var=yes"
9291 else
9292   echo "configure: failed program was:" >&5
9293   cat conftest.$ac_ext >&5
9294   rm -rf conftest*
9295   eval "ac_cv_lib_$ac_lib_var=no"
9296 fi
9297 rm -f conftest*
9298 LIBS="$ac_save_LIBS"
9299
9300 fi
9301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9302   echo "$ac_t""yes" 1>&6
9303   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
9304 else
9305   echo "$ac_t""no" 1>&6
9306 have_tcl=no
9307 fi
9308
9309                 fi
9310         fi
9311
9312         if test $have_tcl != yes ; then
9313                 echo "configure: warning: could not find -ltcl" 1>&2
9314                 if test $ol_enable_tcl = yes ; then
9315                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
9316                 fi
9317
9318                 ol_enable_tcl=no
9319         fi
9320 fi
9321
9322 # ud needs termcap (should insert check here)
9323 ol_link_termcap=no
9324 for ac_hdr in termcap.h ncurses.h
9325 do
9326 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9327 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9328 echo "configure:9329: checking for $ac_hdr" >&5
9329 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9330   echo $ac_n "(cached) $ac_c" 1>&6
9331 else
9332   cat > conftest.$ac_ext <<EOF
9333 #line 9334 "configure"
9334 #include "confdefs.h"
9335 #include <$ac_hdr>
9336 EOF
9337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9338 { (eval echo configure:9339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9340 if test -z "$ac_err"; then
9341   rm -rf conftest*
9342   eval "ac_cv_header_$ac_safe=yes"
9343 else
9344   echo "$ac_err" >&5
9345   echo "configure: failed program was:" >&5
9346   cat conftest.$ac_ext >&5
9347   rm -rf conftest*
9348   eval "ac_cv_header_$ac_safe=no"
9349 fi
9350 rm -f conftest*
9351 fi
9352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9353   echo "$ac_t""yes" 1>&6
9354     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9355   cat >> confdefs.h <<EOF
9356 #define $ac_tr_hdr 1
9357 EOF
9358  
9359 else
9360   echo "$ac_t""no" 1>&6
9361 fi
9362 done
9363
9364
9365 if test $ol_link_termcap = no ; then
9366         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
9367 echo "configure:9368: checking for tputs in -ltermcap" >&5
9368 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
9369 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9370   echo $ac_n "(cached) $ac_c" 1>&6
9371 else
9372   ac_save_LIBS="$LIBS"
9373 LIBS="-ltermcap  $LIBS"
9374 cat > conftest.$ac_ext <<EOF
9375 #line 9376 "configure"
9376 #include "confdefs.h"
9377 /* Override any gcc2 internal prototype to avoid an error.  */
9378 /* We use char because int might match the return type of a gcc2
9379     builtin and then its argument prototype would still apply.  */
9380 char tputs();
9381
9382 int main() {
9383 tputs()
9384 ; return 0; }
9385 EOF
9386 if { (eval echo configure:9387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9387   rm -rf conftest*
9388   eval "ac_cv_lib_$ac_lib_var=yes"
9389 else
9390   echo "configure: failed program was:" >&5
9391   cat conftest.$ac_ext >&5
9392   rm -rf conftest*
9393   eval "ac_cv_lib_$ac_lib_var=no"
9394 fi
9395 rm -f conftest*
9396 LIBS="$ac_save_LIBS"
9397
9398 fi
9399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9400   echo "$ac_t""yes" 1>&6
9401   have_termcap=yes
9402 else
9403   echo "$ac_t""no" 1>&6
9404 have_termcap=no
9405 fi
9406
9407         if test $have_termcap = yes ; then
9408                 cat >> confdefs.h <<\EOF
9409 #define HAVE_TERMCAP 1
9410 EOF
9411
9412                 ol_link_termcap=yes
9413                 TERMCAP_LIBS=-ltermcap
9414         fi
9415 fi
9416
9417 if test $ol_link_termcap = no ; then
9418         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
9419 echo "configure:9420: checking for initscr in -lncurses" >&5
9420 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
9421 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9422   echo $ac_n "(cached) $ac_c" 1>&6
9423 else
9424   ac_save_LIBS="$LIBS"
9425 LIBS="-lncurses  $LIBS"
9426 cat > conftest.$ac_ext <<EOF
9427 #line 9428 "configure"
9428 #include "confdefs.h"
9429 /* Override any gcc2 internal prototype to avoid an error.  */
9430 /* We use char because int might match the return type of a gcc2
9431     builtin and then its argument prototype would still apply.  */
9432 char initscr();
9433
9434 int main() {
9435 initscr()
9436 ; return 0; }
9437 EOF
9438 if { (eval echo configure:9439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9439   rm -rf conftest*
9440   eval "ac_cv_lib_$ac_lib_var=yes"
9441 else
9442   echo "configure: failed program was:" >&5
9443   cat conftest.$ac_ext >&5
9444   rm -rf conftest*
9445   eval "ac_cv_lib_$ac_lib_var=no"
9446 fi
9447 rm -f conftest*
9448 LIBS="$ac_save_LIBS"
9449
9450 fi
9451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9452   echo "$ac_t""yes" 1>&6
9453   have_ncurses=yes
9454 else
9455   echo "$ac_t""no" 1>&6
9456 have_ncurses=no
9457 fi
9458
9459         if test $have_ncurses = yes ; then
9460                 cat >> confdefs.h <<\EOF
9461 #define HAVE_NCURSES 1
9462 EOF
9463
9464                 ol_link_termcap=yes
9465                 TERMCAP_LIBS=-lncurses
9466         fi
9467 fi
9468
9469 if test $ol_link_termcap = no ; then
9470         cat >> confdefs.h <<\EOF
9471 #define NO_TERMCAP 1
9472 EOF
9473
9474         TERMCAP_LIBS=
9475 fi
9476
9477 ol_link_readline=no
9478 if test $ol_with_readline != no ; then
9479         for ac_hdr in readline/readline.h readline/history.h
9480 do
9481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9483 echo "configure:9484: checking for $ac_hdr" >&5
9484 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9485   echo $ac_n "(cached) $ac_c" 1>&6
9486 else
9487   cat > conftest.$ac_ext <<EOF
9488 #line 9489 "configure"
9489 #include "confdefs.h"
9490 #include <$ac_hdr>
9491 EOF
9492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9493 { (eval echo configure:9494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9495 if test -z "$ac_err"; then
9496   rm -rf conftest*
9497   eval "ac_cv_header_$ac_safe=yes"
9498 else
9499   echo "$ac_err" >&5
9500   echo "configure: failed program was:" >&5
9501   cat conftest.$ac_ext >&5
9502   rm -rf conftest*
9503   eval "ac_cv_header_$ac_safe=no"
9504 fi
9505 rm -f conftest*
9506 fi
9507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9508   echo "$ac_t""yes" 1>&6
9509     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9510   cat >> confdefs.h <<EOF
9511 #define $ac_tr_hdr 1
9512 EOF
9513  
9514 else
9515   echo "$ac_t""no" 1>&6
9516 fi
9517 done
9518
9519
9520         if test $ac_cv_header_readline_readline_h = yes ; then
9521                 save_LIBS="$LIBS"
9522                 LIBS="$TERMCAP_LIBS $LIBS"
9523                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
9524 echo "configure:9525: checking for readline in -lreadline" >&5
9525 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
9526 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9527   echo $ac_n "(cached) $ac_c" 1>&6
9528 else
9529   ac_save_LIBS="$LIBS"
9530 LIBS="-lreadline  $LIBS"
9531 cat > conftest.$ac_ext <<EOF
9532 #line 9533 "configure"
9533 #include "confdefs.h"
9534 /* Override any gcc2 internal prototype to avoid an error.  */
9535 /* We use char because int might match the return type of a gcc2
9536     builtin and then its argument prototype would still apply.  */
9537 char readline();
9538
9539 int main() {
9540 readline()
9541 ; return 0; }
9542 EOF
9543 if { (eval echo configure:9544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9544   rm -rf conftest*
9545   eval "ac_cv_lib_$ac_lib_var=yes"
9546 else
9547   echo "configure: failed program was:" >&5
9548   cat conftest.$ac_ext >&5
9549   rm -rf conftest*
9550   eval "ac_cv_lib_$ac_lib_var=no"
9551 fi
9552 rm -f conftest*
9553 LIBS="$ac_save_LIBS"
9554
9555 fi
9556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9557   echo "$ac_t""yes" 1>&6
9558   have_readline=yes
9559 else
9560   echo "$ac_t""no" 1>&6
9561 have_readline=no
9562 fi
9563
9564                 LIBS="$save_LIBS"
9565                         
9566                 if test $have_readline = yes ; then
9567                         ol_with_readline=found
9568                         ol_link_readline=yes
9569
9570                         READLINE_LIBS="-lreadline"
9571                 fi
9572         fi
9573 fi
9574
9575 if test $ol_link_readline = yes ; then
9576         cat >> confdefs.h <<\EOF
9577 #define HAVE_READLINE 1
9578 EOF
9579
9580 fi
9581
9582
9583 # FreeBSD (and others) have crypt(3) in -lcrypt
9584 if test $ol_enable_crypt != no ; then
9585         echo $ac_n "checking for crypt""... $ac_c" 1>&6
9586 echo "configure:9587: checking for crypt" >&5
9587 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
9588   echo $ac_n "(cached) $ac_c" 1>&6
9589 else
9590   cat > conftest.$ac_ext <<EOF
9591 #line 9592 "configure"
9592 #include "confdefs.h"
9593 /* System header to define __stub macros and hopefully few prototypes,
9594     which can conflict with char crypt(); below.  */
9595 #include <assert.h>
9596 /* Override any gcc2 internal prototype to avoid an error.  */
9597 /* We use char because int might match the return type of a gcc2
9598     builtin and then its argument prototype would still apply.  */
9599 char crypt();
9600
9601 int main() {
9602
9603 /* The GNU C library defines this for functions which it implements
9604     to always fail with ENOSYS.  Some functions are actually named
9605     something starting with __ and the normal name is an alias.  */
9606 #if defined (__stub_crypt) || defined (__stub___crypt)
9607 choke me
9608 #else
9609 crypt();
9610 #endif
9611
9612 ; return 0; }
9613 EOF
9614 if { (eval echo configure:9615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9615   rm -rf conftest*
9616   eval "ac_cv_func_crypt=yes"
9617 else
9618   echo "configure: failed program was:" >&5
9619   cat conftest.$ac_ext >&5
9620   rm -rf conftest*
9621   eval "ac_cv_func_crypt=no"
9622 fi
9623 rm -f conftest*
9624 fi
9625
9626 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
9627   echo "$ac_t""yes" 1>&6
9628   have_crypt=yes
9629 else
9630   echo "$ac_t""no" 1>&6
9631
9632                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9633 echo "configure:9634: checking for crypt in -lcrypt" >&5
9634 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9635 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9636   echo $ac_n "(cached) $ac_c" 1>&6
9637 else
9638   ac_save_LIBS="$LIBS"
9639 LIBS="-lcrypt  $LIBS"
9640 cat > conftest.$ac_ext <<EOF
9641 #line 9642 "configure"
9642 #include "confdefs.h"
9643 /* Override any gcc2 internal prototype to avoid an error.  */
9644 /* We use char because int might match the return type of a gcc2
9645     builtin and then its argument prototype would still apply.  */
9646 char crypt();
9647
9648 int main() {
9649 crypt()
9650 ; return 0; }
9651 EOF
9652 if { (eval echo configure:9653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9653   rm -rf conftest*
9654   eval "ac_cv_lib_$ac_lib_var=yes"
9655 else
9656   echo "configure: failed program was:" >&5
9657   cat conftest.$ac_ext >&5
9658   rm -rf conftest*
9659   eval "ac_cv_lib_$ac_lib_var=no"
9660 fi
9661 rm -f conftest*
9662 LIBS="$ac_save_LIBS"
9663
9664 fi
9665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9666   echo "$ac_t""yes" 1>&6
9667   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
9668                         have_crypt=yes
9669 else
9670   echo "$ac_t""no" 1>&6
9671 have_crypt=no
9672 fi
9673
9674 fi
9675
9676
9677         if test $have_crypt = yes ; then
9678                 cat >> confdefs.h <<\EOF
9679 #define HAVE_CRYPT 1
9680 EOF
9681
9682         else
9683                 echo "configure: warning: could not find crypt" 1>&2
9684                 if test $ol_enable_crypt = yes ; then
9685                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
9686                 fi
9687
9688                 echo "configure: warning: disabling crypt support" 1>&2
9689                 ol_enable_crypt=no
9690         fi
9691 fi
9692
9693 # FreeBSD (and others) have setproctitle(3) in -lutil
9694 if test $ol_enable_proctitle != no ; then
9695         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
9696 echo "configure:9697: checking for setproctitle" >&5
9697 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
9698   echo $ac_n "(cached) $ac_c" 1>&6
9699 else
9700   cat > conftest.$ac_ext <<EOF
9701 #line 9702 "configure"
9702 #include "confdefs.h"
9703 /* System header to define __stub macros and hopefully few prototypes,
9704     which can conflict with char setproctitle(); below.  */
9705 #include <assert.h>
9706 /* Override any gcc2 internal prototype to avoid an error.  */
9707 /* We use char because int might match the return type of a gcc2
9708     builtin and then its argument prototype would still apply.  */
9709 char setproctitle();
9710
9711 int main() {
9712
9713 /* The GNU C library defines this for functions which it implements
9714     to always fail with ENOSYS.  Some functions are actually named
9715     something starting with __ and the normal name is an alias.  */
9716 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
9717 choke me
9718 #else
9719 setproctitle();
9720 #endif
9721
9722 ; return 0; }
9723 EOF
9724 if { (eval echo configure:9725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9725   rm -rf conftest*
9726   eval "ac_cv_func_setproctitle=yes"
9727 else
9728   echo "configure: failed program was:" >&5
9729   cat conftest.$ac_ext >&5
9730   rm -rf conftest*
9731   eval "ac_cv_func_setproctitle=no"
9732 fi
9733 rm -f conftest*
9734 fi
9735
9736 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
9737   echo "$ac_t""yes" 1>&6
9738   have_setproctitle=yes
9739 else
9740   echo "$ac_t""no" 1>&6
9741
9742                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
9743 echo "configure:9744: checking for setproctitle in -lutil" >&5
9744 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
9745 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9746   echo $ac_n "(cached) $ac_c" 1>&6
9747 else
9748   ac_save_LIBS="$LIBS"
9749 LIBS="-lutil  $LIBS"
9750 cat > conftest.$ac_ext <<EOF
9751 #line 9752 "configure"
9752 #include "confdefs.h"
9753 /* Override any gcc2 internal prototype to avoid an error.  */
9754 /* We use char because int might match the return type of a gcc2
9755     builtin and then its argument prototype would still apply.  */
9756 char setproctitle();
9757
9758 int main() {
9759 setproctitle()
9760 ; return 0; }
9761 EOF
9762 if { (eval echo configure:9763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9763   rm -rf conftest*
9764   eval "ac_cv_lib_$ac_lib_var=yes"
9765 else
9766   echo "configure: failed program was:" >&5
9767   cat conftest.$ac_ext >&5
9768   rm -rf conftest*
9769   eval "ac_cv_lib_$ac_lib_var=no"
9770 fi
9771 rm -f conftest*
9772 LIBS="$ac_save_LIBS"
9773
9774 fi
9775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9776   echo "$ac_t""yes" 1>&6
9777   have_setproctitle=yes
9778                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
9779 else
9780   echo "$ac_t""no" 1>&6
9781 have_setproctitle=no
9782                         LIBOBJS="$LIBOBJS setproctitle.o"
9783 fi
9784
9785 fi
9786
9787
9788         if test $have_setproctitle = yes ; then
9789                 cat >> confdefs.h <<\EOF
9790 #define HAVE_SETPROCTITLE 1
9791 EOF
9792
9793         fi
9794 fi
9795
9796 # test for EBCDIC
9797 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
9798 echo "configure:9799: checking for EBCDIC" >&5
9799 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
9800   echo $ac_n "(cached) $ac_c" 1>&6
9801 else
9802   
9803         cat > conftest.$ac_ext <<EOF
9804 #line 9805 "configure"
9805 #include "confdefs.h"
9806
9807 #if !('M' == 0xd4)
9808 #include <__ASCII__/generate_error.h>
9809 #endif
9810
9811 EOF
9812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9813 { (eval echo configure:9814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9815 if test -z "$ac_err"; then
9816   rm -rf conftest*
9817   ol_cv_cpp_ebcdic=yes
9818 else
9819   echo "$ac_err" >&5
9820   echo "configure: failed program was:" >&5
9821   cat conftest.$ac_ext >&5
9822   rm -rf conftest*
9823   ol_cv_cpp_ebcdic=no
9824 fi
9825 rm -f conftest*
9826 fi
9827
9828 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
9829 if test $ol_cv_cpp_ebcdic = yes ; then
9830         cat >> confdefs.h <<\EOF
9831 #define HAVE_EBCDIC 1
9832 EOF
9833
9834 fi
9835
9836 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9837 echo "configure:9838: checking for ANSI C header files" >&5
9838 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
9839   echo $ac_n "(cached) $ac_c" 1>&6
9840 else
9841   cat > conftest.$ac_ext <<EOF
9842 #line 9843 "configure"
9843 #include "confdefs.h"
9844 #include <stdlib.h>
9845 #include <stdarg.h>
9846 #include <string.h>
9847 #include <float.h>
9848 EOF
9849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9850 { (eval echo configure:9851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9852 if test -z "$ac_err"; then
9853   rm -rf conftest*
9854   ol_cv_header_stdc=yes
9855 else
9856   echo "$ac_err" >&5
9857   echo "configure: failed program was:" >&5
9858   cat conftest.$ac_ext >&5
9859   rm -rf conftest*
9860   ol_cv_header_stdc=no
9861 fi
9862 rm -f conftest*
9863
9864 if test $ol_cv_header_stdc = yes; then
9865   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9866 cat > conftest.$ac_ext <<EOF
9867 #line 9868 "configure"
9868 #include "confdefs.h"
9869 #include <string.h>
9870 EOF
9871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9872   egrep "memchr" >/dev/null 2>&1; then
9873   :
9874 else
9875   rm -rf conftest*
9876   ol_cv_header_stdc=no
9877 fi
9878 rm -f conftest*
9879
9880 fi
9881
9882 if test $ol_cv_header_stdc = yes; then
9883   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9884 cat > conftest.$ac_ext <<EOF
9885 #line 9886 "configure"
9886 #include "confdefs.h"
9887 #include <stdlib.h>
9888 EOF
9889 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9890   egrep "free" >/dev/null 2>&1; then
9891   :
9892 else
9893   rm -rf conftest*
9894   ol_cv_header_stdc=no
9895 fi
9896 rm -f conftest*
9897
9898 fi
9899
9900 if test $ol_cv_header_stdc = yes; then
9901   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9902 if test "$cross_compiling" = yes; then
9903   :
9904 else
9905   cat > conftest.$ac_ext <<EOF
9906 #line 9907 "configure"
9907 #include "confdefs.h"
9908 #include <ctype.h>
9909 #ifndef HAVE_EBCDIC
9910 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9911 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9912 #else
9913 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9914                 || ('j' <= (c) && (c) <= 'r') \
9915                 || ('s' <= (c) && (c) <= 'z'))
9916 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
9917 #endif
9918 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9919 int main () { int i; for (i = 0; i < 256; i++)
9920 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9921 exit (0); }
9922
9923 EOF
9924 if { (eval echo configure:9925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9925 then
9926   :
9927 else
9928   echo "configure: failed program was:" >&5
9929   cat conftest.$ac_ext >&5
9930   rm -fr conftest*
9931   ol_cv_header_stdc=no
9932 fi
9933 rm -fr conftest*
9934 fi
9935
9936 fi
9937 fi
9938
9939 echo "$ac_t""$ol_cv_header_stdc" 1>&6
9940 if test $ol_cv_header_stdc = yes; then
9941   cat >> confdefs.h <<\EOF
9942 #define STDC_HEADERS 1
9943 EOF
9944
9945 fi
9946 ac_cv_header_stdc=disable
9947
9948
9949 if test $ol_cv_header_stdc != yes; then
9950         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
9951 fi
9952
9953 ac_header_dirent=no
9954 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
9955 do
9956 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9957 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
9958 echo "configure:9959: checking for $ac_hdr that defines DIR" >&5
9959 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
9960   echo $ac_n "(cached) $ac_c" 1>&6
9961 else
9962   cat > conftest.$ac_ext <<EOF
9963 #line 9964 "configure"
9964 #include "confdefs.h"
9965 #include <sys/types.h>
9966 #include <$ac_hdr>
9967 int main() {
9968 DIR *dirp = 0;
9969 ; return 0; }
9970 EOF
9971 if { (eval echo configure:9972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9972   rm -rf conftest*
9973   eval "ac_cv_header_dirent_$ac_safe=yes"
9974 else
9975   echo "configure: failed program was:" >&5
9976   cat conftest.$ac_ext >&5
9977   rm -rf conftest*
9978   eval "ac_cv_header_dirent_$ac_safe=no"
9979 fi
9980 rm -f conftest*
9981 fi
9982 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
9983   echo "$ac_t""yes" 1>&6
9984     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9985   cat >> confdefs.h <<EOF
9986 #define $ac_tr_hdr 1
9987 EOF
9988  ac_header_dirent=$ac_hdr; break
9989 else
9990   echo "$ac_t""no" 1>&6
9991 fi
9992 done
9993 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9994 if test $ac_header_dirent = dirent.h; then
9995 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
9996 echo "configure:9997: checking for opendir in -ldir" >&5
9997 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
9998 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9999   echo $ac_n "(cached) $ac_c" 1>&6
10000 else
10001   ac_save_LIBS="$LIBS"
10002 LIBS="-ldir  $LIBS"
10003 cat > conftest.$ac_ext <<EOF
10004 #line 10005 "configure"
10005 #include "confdefs.h"
10006 /* Override any gcc2 internal prototype to avoid an error.  */
10007 /* We use char because int might match the return type of a gcc2
10008     builtin and then its argument prototype would still apply.  */
10009 char opendir();
10010
10011 int main() {
10012 opendir()
10013 ; return 0; }
10014 EOF
10015 if { (eval echo configure:10016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10016   rm -rf conftest*
10017   eval "ac_cv_lib_$ac_lib_var=yes"
10018 else
10019   echo "configure: failed program was:" >&5
10020   cat conftest.$ac_ext >&5
10021   rm -rf conftest*
10022   eval "ac_cv_lib_$ac_lib_var=no"
10023 fi
10024 rm -f conftest*
10025 LIBS="$ac_save_LIBS"
10026
10027 fi
10028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10029   echo "$ac_t""yes" 1>&6
10030   LIBS="$LIBS -ldir"
10031 else
10032   echo "$ac_t""no" 1>&6
10033 fi
10034
10035 else
10036 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
10037 echo "configure:10038: checking for opendir in -lx" >&5
10038 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
10039 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10040   echo $ac_n "(cached) $ac_c" 1>&6
10041 else
10042   ac_save_LIBS="$LIBS"
10043 LIBS="-lx  $LIBS"
10044 cat > conftest.$ac_ext <<EOF
10045 #line 10046 "configure"
10046 #include "confdefs.h"
10047 /* Override any gcc2 internal prototype to avoid an error.  */
10048 /* We use char because int might match the return type of a gcc2
10049     builtin and then its argument prototype would still apply.  */
10050 char opendir();
10051
10052 int main() {
10053 opendir()
10054 ; return 0; }
10055 EOF
10056 if { (eval echo configure:10057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10057   rm -rf conftest*
10058   eval "ac_cv_lib_$ac_lib_var=yes"
10059 else
10060   echo "configure: failed program was:" >&5
10061   cat conftest.$ac_ext >&5
10062   rm -rf conftest*
10063   eval "ac_cv_lib_$ac_lib_var=no"
10064 fi
10065 rm -f conftest*
10066 LIBS="$ac_save_LIBS"
10067
10068 fi
10069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10070   echo "$ac_t""yes" 1>&6
10071   LIBS="$LIBS -lx"
10072 else
10073   echo "$ac_t""no" 1>&6
10074 fi
10075
10076 fi
10077
10078 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
10079 echo "configure:10080: checking for sys/wait.h that is POSIX.1 compatible" >&5
10080 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
10081   echo $ac_n "(cached) $ac_c" 1>&6
10082 else
10083   cat > conftest.$ac_ext <<EOF
10084 #line 10085 "configure"
10085 #include "confdefs.h"
10086 #include <sys/types.h>
10087 #include <sys/wait.h>
10088 #ifndef WEXITSTATUS
10089 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
10090 #endif
10091 #ifndef WIFEXITED
10092 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
10093 #endif
10094 int main() {
10095 int s;
10096 wait (&s);
10097 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
10098 ; return 0; }
10099 EOF
10100 if { (eval echo configure:10101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10101   rm -rf conftest*
10102   ac_cv_header_sys_wait_h=yes
10103 else
10104   echo "configure: failed program was:" >&5
10105   cat conftest.$ac_ext >&5
10106   rm -rf conftest*
10107   ac_cv_header_sys_wait_h=no
10108 fi
10109 rm -f conftest*
10110 fi
10111
10112 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
10113 if test $ac_cv_header_sys_wait_h = yes; then
10114   cat >> confdefs.h <<\EOF
10115 #define HAVE_SYS_WAIT_H 1
10116 EOF
10117
10118 fi
10119
10120 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
10121 echo "configure:10122: checking POSIX termios" >&5
10122 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
10123   echo $ac_n "(cached) $ac_c" 1>&6
10124 else
10125   cat > conftest.$ac_ext <<EOF
10126 #line 10127 "configure"
10127 #include "confdefs.h"
10128 #include <sys/types.h>
10129 #include <unistd.h>
10130 #include <termios.h>
10131 int main() {
10132 /* SunOS 4.0.3 has termios.h but not the library calls.  */
10133    tcgetattr(0, 0);
10134 ; return 0; }
10135 EOF
10136 if { (eval echo configure:10137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10137   rm -rf conftest*
10138   am_cv_sys_posix_termios=yes
10139 else
10140   echo "configure: failed program was:" >&5
10141   cat conftest.$ac_ext >&5
10142   rm -rf conftest*
10143   am_cv_sys_posix_termios=no
10144 fi
10145 rm -f conftest*
10146 fi
10147
10148 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
10149
10150
10151  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
10152 echo "configure:10153: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
10153 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
10154   echo $ac_n "(cached) $ac_c" 1>&6
10155 else
10156   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
10157
10158   gwinsz_in_termios_h=no
10159   if test $am_cv_sys_posix_termios = yes; then
10160     cat > conftest.$ac_ext <<EOF
10161 #line 10162 "configure"
10162 #include "confdefs.h"
10163 #include <sys/types.h>
10164 #     include <termios.h>
10165 #     ifdef TIOCGWINSZ
10166         yes
10167 #     endif
10168     
10169 EOF
10170 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10171   egrep "yes" >/dev/null 2>&1; then
10172   rm -rf conftest*
10173   gwinsz_in_termios_h=yes
10174 fi
10175 rm -f conftest*
10176
10177   fi
10178
10179   if test $gwinsz_in_termios_h = no; then
10180     cat > conftest.$ac_ext <<EOF
10181 #line 10182 "configure"
10182 #include "confdefs.h"
10183 #include <sys/types.h>
10184 #     include <sys/ioctl.h>
10185 #     ifdef TIOCGWINSZ
10186         yes
10187 #     endif
10188     
10189 EOF
10190 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10191   egrep "yes" >/dev/null 2>&1; then
10192   rm -rf conftest*
10193   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
10194 fi
10195 rm -f conftest*
10196
10197   fi
10198   
10199 fi
10200
10201 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
10202   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
10203     cat >> confdefs.h <<\EOF
10204 #define GWINSZ_IN_SYS_IOCTL 1
10205 EOF
10206
10207   fi
10208
10209 if test $am_cv_sys_posix_termios = yes ; then
10210         cat >> confdefs.h <<\EOF
10211 #define HAVE_POSIX_TERMIOS 1
10212 EOF
10213
10214 fi
10215
10216 for ac_hdr in \
10217         arpa/inet.h             \
10218         arpa/nameser.h  \
10219         assert.h                \
10220         crypt.h                 \
10221         errno.h                 \
10222         fcntl.h                 \
10223         filio.h                 \
10224         getopt.h                \
10225         grp.h                   \
10226         libutil.h               \
10227         limits.h                \
10228         locale.h                \
10229         malloc.h                \
10230         memory.h                \
10231         psap.h                  \
10232         pwd.h                   \
10233         resolv.h                \
10234         sgtty.h                 \
10235         shadow.h                \
10236         stdarg.h                \
10237         stddef.h                \
10238         string.h                \
10239         strings.h               \
10240         sysexits.h              \
10241         sys/file.h              \
10242         sys/filio.h             \
10243         sys/errno.h             \
10244         sys/ioctl.h             \
10245         sys/param.h             \
10246         sys/resource.h  \
10247         sys/select.h    \
10248         sys/socket.h    \
10249         sys/syslog.h    \
10250         sys/time.h              \
10251         sys/types.h             \
10252         syslog.h                \
10253         termios.h               \
10254         unistd.h                \
10255
10256 do
10257 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10258 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10259 echo "configure:10260: checking for $ac_hdr" >&5
10260 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10261   echo $ac_n "(cached) $ac_c" 1>&6
10262 else
10263   cat > conftest.$ac_ext <<EOF
10264 #line 10265 "configure"
10265 #include "confdefs.h"
10266 #include <$ac_hdr>
10267 EOF
10268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10269 { (eval echo configure:10270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10271 if test -z "$ac_err"; then
10272   rm -rf conftest*
10273   eval "ac_cv_header_$ac_safe=yes"
10274 else
10275   echo "$ac_err" >&5
10276   echo "configure: failed program was:" >&5
10277   cat conftest.$ac_ext >&5
10278   rm -rf conftest*
10279   eval "ac_cv_header_$ac_safe=no"
10280 fi
10281 rm -f conftest*
10282 fi
10283 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10284   echo "$ac_t""yes" 1>&6
10285     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10286   cat >> confdefs.h <<EOF
10287 #define $ac_tr_hdr 1
10288 EOF
10289  
10290 else
10291   echo "$ac_t""no" 1>&6
10292 fi
10293 done
10294
10295
10296 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10297 echo "configure:10298: checking for uid_t in sys/types.h" >&5
10298 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
10299   echo $ac_n "(cached) $ac_c" 1>&6
10300 else
10301   cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304 #include <sys/types.h>
10305 EOF
10306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10307   egrep "uid_t" >/dev/null 2>&1; then
10308   rm -rf conftest*
10309   ac_cv_type_uid_t=yes
10310 else
10311   rm -rf conftest*
10312   ac_cv_type_uid_t=no
10313 fi
10314 rm -f conftest*
10315
10316 fi
10317
10318 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10319 if test $ac_cv_type_uid_t = no; then
10320   cat >> confdefs.h <<\EOF
10321 #define uid_t int
10322 EOF
10323
10324   cat >> confdefs.h <<\EOF
10325 #define gid_t int
10326 EOF
10327
10328 fi
10329
10330 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
10331 echo "configure:10332: checking type of array argument to getgroups" >&5
10332 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
10333   echo $ac_n "(cached) $ac_c" 1>&6
10334 else
10335   if test "$cross_compiling" = yes; then
10336   ac_cv_type_getgroups=cross
10337 else
10338   cat > conftest.$ac_ext <<EOF
10339 #line 10340 "configure"
10340 #include "confdefs.h"
10341
10342 /* Thanks to Mike Rendell for this test.  */
10343 #include <sys/types.h>
10344 #define NGID 256
10345 #undef MAX
10346 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10347 main()
10348 {
10349   gid_t gidset[NGID];
10350   int i, n;
10351   union { gid_t gval; long lval; }  val;
10352
10353   val.lval = -1;
10354   for (i = 0; i < NGID; i++)
10355     gidset[i] = val.gval;
10356   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10357                  gidset);
10358   /* Exit non-zero if getgroups seems to require an array of ints.  This
10359      happens when gid_t is short but getgroups modifies an array of ints.  */
10360   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
10361 }
10362
10363 EOF
10364 if { (eval echo configure:10365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10365 then
10366     ac_cv_type_getgroups=gid_t
10367 else
10368   echo "configure: failed program was:" >&5
10369   cat conftest.$ac_ext >&5
10370   rm -fr conftest*
10371   ac_cv_type_getgroups=int
10372 fi
10373 rm -fr conftest*
10374 fi
10375
10376 if test $ac_cv_type_getgroups = cross; then
10377         cat > conftest.$ac_ext <<EOF
10378 #line 10379 "configure"
10379 #include "confdefs.h"
10380 #include <unistd.h>
10381 EOF
10382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10383   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
10384   rm -rf conftest*
10385   ac_cv_type_getgroups=gid_t
10386 else
10387   rm -rf conftest*
10388   ac_cv_type_getgroups=int
10389 fi
10390 rm -f conftest*
10391
10392 fi
10393 fi
10394
10395 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
10396 cat >> confdefs.h <<EOF
10397 #define GETGROUPS_T $ac_cv_type_getgroups
10398 EOF
10399
10400  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10401 echo "configure:10402: checking for ANSI C header files" >&5
10402 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
10403   echo $ac_n "(cached) $ac_c" 1>&6
10404 else
10405   cat > conftest.$ac_ext <<EOF
10406 #line 10407 "configure"
10407 #include "confdefs.h"
10408 #include <stdlib.h>
10409 #include <stdarg.h>
10410 #include <string.h>
10411 #include <float.h>
10412 EOF
10413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10414 { (eval echo configure:10415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10416 if test -z "$ac_err"; then
10417   rm -rf conftest*
10418   ac_cv_header_stdc=yes
10419 else
10420   echo "$ac_err" >&5
10421   echo "configure: failed program was:" >&5
10422   cat conftest.$ac_ext >&5
10423   rm -rf conftest*
10424   ac_cv_header_stdc=no
10425 fi
10426 rm -f conftest*
10427
10428 if test $ac_cv_header_stdc = yes; then
10429   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10430 cat > conftest.$ac_ext <<EOF
10431 #line 10432 "configure"
10432 #include "confdefs.h"
10433 #include <string.h>
10434 EOF
10435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10436   egrep "memchr" >/dev/null 2>&1; then
10437   :
10438 else
10439   rm -rf conftest*
10440   ac_cv_header_stdc=no
10441 fi
10442 rm -f conftest*
10443
10444 fi
10445
10446 if test $ac_cv_header_stdc = yes; then
10447   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10448 cat > conftest.$ac_ext <<EOF
10449 #line 10450 "configure"
10450 #include "confdefs.h"
10451 #include <stdlib.h>
10452 EOF
10453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10454   egrep "free" >/dev/null 2>&1; then
10455   :
10456 else
10457   rm -rf conftest*
10458   ac_cv_header_stdc=no
10459 fi
10460 rm -f conftest*
10461
10462 fi
10463
10464 if test $ac_cv_header_stdc = yes; then
10465   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10466 if test "$cross_compiling" = yes; then
10467   :
10468 else
10469   cat > conftest.$ac_ext <<EOF
10470 #line 10471 "configure"
10471 #include "confdefs.h"
10472 #include <ctype.h>
10473 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10474 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10475 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10476 int main () { int i; for (i = 0; i < 256; i++)
10477 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10478 exit (0); }
10479
10480 EOF
10481 if { (eval echo configure:10482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10482 then
10483   :
10484 else
10485   echo "configure: failed program was:" >&5
10486   cat conftest.$ac_ext >&5
10487   rm -fr conftest*
10488   ac_cv_header_stdc=no
10489 fi
10490 rm -fr conftest*
10491 fi
10492
10493 fi
10494 fi
10495
10496 echo "$ac_t""$ac_cv_header_stdc" 1>&6
10497 if test $ac_cv_header_stdc = yes; then
10498   cat >> confdefs.h <<\EOF
10499 #define STDC_HEADERS 1
10500 EOF
10501
10502 fi
10503
10504 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
10505 echo "configure:10506: checking for mode_t" >&5
10506 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
10507   echo $ac_n "(cached) $ac_c" 1>&6
10508 else
10509   cat > conftest.$ac_ext <<EOF
10510 #line 10511 "configure"
10511 #include "confdefs.h"
10512 #include <sys/types.h>
10513 #if STDC_HEADERS
10514 #include <stdlib.h>
10515 #include <stddef.h>
10516 #endif
10517 EOF
10518 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10519   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10520   rm -rf conftest*
10521   ac_cv_type_mode_t=yes
10522 else
10523   rm -rf conftest*
10524   ac_cv_type_mode_t=no
10525 fi
10526 rm -f conftest*
10527
10528 fi
10529 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
10530 if test $ac_cv_type_mode_t = no; then
10531   cat >> confdefs.h <<\EOF
10532 #define mode_t int
10533 EOF
10534
10535 fi
10536
10537 echo $ac_n "checking for off_t""... $ac_c" 1>&6
10538 echo "configure:10539: checking for off_t" >&5
10539 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
10540   echo $ac_n "(cached) $ac_c" 1>&6
10541 else
10542   cat > conftest.$ac_ext <<EOF
10543 #line 10544 "configure"
10544 #include "confdefs.h"
10545 #include <sys/types.h>
10546 #if STDC_HEADERS
10547 #include <stdlib.h>
10548 #include <stddef.h>
10549 #endif
10550 EOF
10551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10552   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10553   rm -rf conftest*
10554   ac_cv_type_off_t=yes
10555 else
10556   rm -rf conftest*
10557   ac_cv_type_off_t=no
10558 fi
10559 rm -f conftest*
10560
10561 fi
10562 echo "$ac_t""$ac_cv_type_off_t" 1>&6
10563 if test $ac_cv_type_off_t = no; then
10564   cat >> confdefs.h <<\EOF
10565 #define off_t long
10566 EOF
10567
10568 fi
10569
10570 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
10571 echo "configure:10572: checking for pid_t" >&5
10572 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
10573   echo $ac_n "(cached) $ac_c" 1>&6
10574 else
10575   cat > conftest.$ac_ext <<EOF
10576 #line 10577 "configure"
10577 #include "confdefs.h"
10578 #include <sys/types.h>
10579 #if STDC_HEADERS
10580 #include <stdlib.h>
10581 #include <stddef.h>
10582 #endif
10583 EOF
10584 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10585   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10586   rm -rf conftest*
10587   ac_cv_type_pid_t=yes
10588 else
10589   rm -rf conftest*
10590   ac_cv_type_pid_t=no
10591 fi
10592 rm -f conftest*
10593
10594 fi
10595 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
10596 if test $ac_cv_type_pid_t = no; then
10597   cat >> confdefs.h <<\EOF
10598 #define pid_t int
10599 EOF
10600
10601 fi
10602
10603 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
10604 echo "configure:10605: checking for ptrdiff_t" >&5
10605 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
10606   echo $ac_n "(cached) $ac_c" 1>&6
10607 else
10608   cat > conftest.$ac_ext <<EOF
10609 #line 10610 "configure"
10610 #include "confdefs.h"
10611 #include <stddef.h>
10612 int main() {
10613 ptrdiff_t p
10614 ; return 0; }
10615 EOF
10616 if { (eval echo configure:10617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10617   rm -rf conftest*
10618   am_cv_type_ptrdiff_t=yes
10619 else
10620   echo "configure: failed program was:" >&5
10621   cat conftest.$ac_ext >&5
10622   rm -rf conftest*
10623   am_cv_type_ptrdiff_t=no
10624 fi
10625 rm -f conftest*
10626 fi
10627
10628 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
10629    if test $am_cv_type_ptrdiff_t = yes; then
10630      cat >> confdefs.h <<\EOF
10631 #define HAVE_PTRDIFF_T 1
10632 EOF
10633
10634    fi
10635
10636 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
10637 echo "configure:10638: checking return type of signal handlers" >&5
10638 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
10639   echo $ac_n "(cached) $ac_c" 1>&6
10640 else
10641   cat > conftest.$ac_ext <<EOF
10642 #line 10643 "configure"
10643 #include "confdefs.h"
10644 #include <sys/types.h>
10645 #include <signal.h>
10646 #ifdef signal
10647 #undef signal
10648 #endif
10649 #ifdef __cplusplus
10650 extern "C" void (*signal (int, void (*)(int)))(int);
10651 #else
10652 void (*signal ()) ();
10653 #endif
10654
10655 int main() {
10656 int i;
10657 ; return 0; }
10658 EOF
10659 if { (eval echo configure:10660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10660   rm -rf conftest*
10661   ac_cv_type_signal=void
10662 else
10663   echo "configure: failed program was:" >&5
10664   cat conftest.$ac_ext >&5
10665   rm -rf conftest*
10666   ac_cv_type_signal=int
10667 fi
10668 rm -f conftest*
10669 fi
10670
10671 echo "$ac_t""$ac_cv_type_signal" 1>&6
10672 cat >> confdefs.h <<EOF
10673 #define RETSIGTYPE $ac_cv_type_signal
10674 EOF
10675
10676
10677 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
10678 echo "configure:10679: checking for sig_atomic_t" >&5
10679 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
10680   echo $ac_n "(cached) $ac_c" 1>&6
10681 else
10682   cat > conftest.$ac_ext <<EOF
10683 #line 10684 "configure"
10684 #include "confdefs.h"
10685 #include <signal.h>
10686 int main() {
10687 sig_atomic_t atomic;
10688 ; return 0; }
10689 EOF
10690 if { (eval echo configure:10691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10691   rm -rf conftest*
10692   ol_cv_type_sig_atomic_t=yes
10693 else
10694   echo "configure: failed program was:" >&5
10695   cat conftest.$ac_ext >&5
10696   rm -rf conftest*
10697   ol_cv_type_sig_atomic_t=no
10698 fi
10699 rm -f conftest*
10700 fi
10701
10702 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
10703   if test $ol_cv_type_sig_atomic_t = no; then
10704     cat >> confdefs.h <<\EOF
10705 #define sig_atomic_t int
10706 EOF
10707
10708   fi
10709  
10710 echo $ac_n "checking for size_t""... $ac_c" 1>&6
10711 echo "configure:10712: checking for size_t" >&5
10712 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
10713   echo $ac_n "(cached) $ac_c" 1>&6
10714 else
10715   cat > conftest.$ac_ext <<EOF
10716 #line 10717 "configure"
10717 #include "confdefs.h"
10718 #include <sys/types.h>
10719 #if STDC_HEADERS
10720 #include <stdlib.h>
10721 #include <stddef.h>
10722 #endif
10723 EOF
10724 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10725   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10726   rm -rf conftest*
10727   ac_cv_type_size_t=yes
10728 else
10729   rm -rf conftest*
10730   ac_cv_type_size_t=no
10731 fi
10732 rm -f conftest*
10733
10734 fi
10735 echo "$ac_t""$ac_cv_type_size_t" 1>&6
10736 if test $ac_cv_type_size_t = no; then
10737   cat >> confdefs.h <<\EOF
10738 #define size_t unsigned
10739 EOF
10740
10741 fi
10742
10743 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
10744 echo "configure:10745: checking for st_blksize in struct stat" >&5
10745 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
10746   echo $ac_n "(cached) $ac_c" 1>&6
10747 else
10748   cat > conftest.$ac_ext <<EOF
10749 #line 10750 "configure"
10750 #include "confdefs.h"
10751 #include <sys/types.h>
10752 #include <sys/stat.h>
10753 int main() {
10754 struct stat s; s.st_blksize;
10755 ; return 0; }
10756 EOF
10757 if { (eval echo configure:10758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10758   rm -rf conftest*
10759   ac_cv_struct_st_blksize=yes
10760 else
10761   echo "configure: failed program was:" >&5
10762   cat conftest.$ac_ext >&5
10763   rm -rf conftest*
10764   ac_cv_struct_st_blksize=no
10765 fi
10766 rm -f conftest*
10767 fi
10768
10769 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
10770 if test $ac_cv_struct_st_blksize = yes; then
10771   cat >> confdefs.h <<\EOF
10772 #define HAVE_ST_BLKSIZE 1
10773 EOF
10774
10775 fi
10776
10777 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
10778 echo "configure:10779: checking whether time.h and sys/time.h may both be included" >&5
10779 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
10780   echo $ac_n "(cached) $ac_c" 1>&6
10781 else
10782   cat > conftest.$ac_ext <<EOF
10783 #line 10784 "configure"
10784 #include "confdefs.h"
10785 #include <sys/types.h>
10786 #include <sys/time.h>
10787 #include <time.h>
10788 int main() {
10789 struct tm *tp;
10790 ; return 0; }
10791 EOF
10792 if { (eval echo configure:10793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10793   rm -rf conftest*
10794   ac_cv_header_time=yes
10795 else
10796   echo "configure: failed program was:" >&5
10797   cat conftest.$ac_ext >&5
10798   rm -rf conftest*
10799   ac_cv_header_time=no
10800 fi
10801 rm -f conftest*
10802 fi
10803
10804 echo "$ac_t""$ac_cv_header_time" 1>&6
10805 if test $ac_cv_header_time = yes; then
10806   cat >> confdefs.h <<\EOF
10807 #define TIME_WITH_SYS_TIME 1
10808 EOF
10809
10810 fi
10811
10812 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
10813 echo "configure:10814: checking whether struct tm is in sys/time.h or time.h" >&5
10814 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
10815   echo $ac_n "(cached) $ac_c" 1>&6
10816 else
10817   cat > conftest.$ac_ext <<EOF
10818 #line 10819 "configure"
10819 #include "confdefs.h"
10820 #include <sys/types.h>
10821 #include <time.h>
10822 int main() {
10823 struct tm *tp; tp->tm_sec;
10824 ; return 0; }
10825 EOF
10826 if { (eval echo configure:10827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10827   rm -rf conftest*
10828   ac_cv_struct_tm=time.h
10829 else
10830   echo "configure: failed program was:" >&5
10831   cat conftest.$ac_ext >&5
10832   rm -rf conftest*
10833   ac_cv_struct_tm=sys/time.h
10834 fi
10835 rm -f conftest*
10836 fi
10837
10838 echo "$ac_t""$ac_cv_struct_tm" 1>&6
10839 if test $ac_cv_struct_tm = sys/time.h; then
10840   cat >> confdefs.h <<\EOF
10841 #define TM_IN_SYS_TIME 1
10842 EOF
10843
10844 fi
10845
10846 # test for pw_gecos in struct passwd
10847 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
10848 echo "configure:10849: checking struct passwd for pw_gecos" >&5
10849 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
10850   echo $ac_n "(cached) $ac_c" 1>&6
10851 else
10852   
10853         cat > conftest.$ac_ext <<EOF
10854 #line 10855 "configure"
10855 #include "confdefs.h"
10856 #include <pwd.h>
10857 int main() {
10858
10859         struct passwd pwd;
10860         pwd.pw_gecos = pwd.pw_name;
10861
10862 ; return 0; }
10863 EOF
10864 if { (eval echo configure:10865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10865   rm -rf conftest*
10866   ol_cv_struct_passwd_pw_gecos=yes
10867 else
10868   echo "configure: failed program was:" >&5
10869   cat conftest.$ac_ext >&5
10870   rm -rf conftest*
10871   ol_cv_struct_passwd_pw_gecos=no
10872 fi
10873 rm -f conftest*
10874 fi
10875
10876 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
10877 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
10878         cat >> confdefs.h <<\EOF
10879 #define HAVE_PW_GECOS 1
10880 EOF
10881
10882 fi
10883
10884 # test for pw_passwd in struct passwd
10885 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
10886 echo "configure:10887: checking struct passwd for pw_passwd" >&5
10887 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_passwd'+set}'`\" = set"; then
10888   echo $ac_n "(cached) $ac_c" 1>&6
10889 else
10890   
10891         cat > conftest.$ac_ext <<EOF
10892 #line 10893 "configure"
10893 #include "confdefs.h"
10894 #include <pwd.h>
10895 int main() {
10896
10897         struct passwd pwd;
10898         pwd.pw_passwd = pwd.pw_name;
10899
10900 ; return 0; }
10901 EOF
10902 if { (eval echo configure:10903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10903   rm -rf conftest*
10904   ol_cv_struct_passwd_pw_passwd=yes
10905 else
10906   echo "configure: failed program was:" >&5
10907   cat conftest.$ac_ext >&5
10908   rm -rf conftest*
10909   ol_cv_struct_passwd_pw_passwd=no
10910 fi
10911 rm -f conftest*
10912 fi
10913
10914 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
10915 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
10916         cat >> confdefs.h <<\EOF
10917 #define HAVE_PW_PASSWD 1
10918 EOF
10919
10920 fi
10921
10922
10923
10924 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
10925 echo "configure:10926: checking if toupper() requires islower()" >&5
10926 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
10927   echo $ac_n "(cached) $ac_c" 1>&6
10928 else
10929   
10930         if test "$cross_compiling" = yes; then
10931   ol_cv_c_upper_lower=safe
10932 else
10933   cat > conftest.$ac_ext <<EOF
10934 #line 10935 "configure"
10935 #include "confdefs.h"
10936
10937 #include <ctype.h>
10938 main()
10939 {
10940         if ('C' == toupper('C'))
10941                 exit(0);
10942         else
10943                 exit(1);
10944 }
10945 EOF
10946 if { (eval echo configure:10947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10947 then
10948   ol_cv_c_upper_lower=no
10949 else
10950   echo "configure: failed program was:" >&5
10951   cat conftest.$ac_ext >&5
10952   rm -fr conftest*
10953   ol_cv_c_upper_lower=yes
10954 fi
10955 rm -fr conftest*
10956 fi
10957
10958 fi
10959
10960 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
10961 if test $ol_cv_c_upper_lower != no ; then
10962         cat >> confdefs.h <<\EOF
10963 #define C_UPPER_LOWER 1
10964 EOF
10965
10966 fi
10967
10968 echo $ac_n "checking for working const""... $ac_c" 1>&6
10969 echo "configure:10970: checking for working const" >&5
10970 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
10971   echo $ac_n "(cached) $ac_c" 1>&6
10972 else
10973   cat > conftest.$ac_ext <<EOF
10974 #line 10975 "configure"
10975 #include "confdefs.h"
10976
10977 int main() {
10978
10979 /* Ultrix mips cc rejects this.  */
10980 typedef int charset[2]; const charset x;
10981 /* SunOS 4.1.1 cc rejects this.  */
10982 char const *const *ccp;
10983 char **p;
10984 /* NEC SVR4.0.2 mips cc rejects this.  */
10985 struct point {int x, y;};
10986 static struct point const zero = {0,0};
10987 /* AIX XL C 1.02.0.0 rejects this.
10988    It does not let you subtract one const X* pointer from another in an arm
10989    of an if-expression whose if-part is not a constant expression */
10990 const char *g = "string";
10991 ccp = &g + (g ? g-g : 0);
10992 /* HPUX 7.0 cc rejects these. */
10993 ++ccp;
10994 p = (char**) ccp;
10995 ccp = (char const *const *) p;
10996 { /* SCO 3.2v4 cc rejects this.  */
10997   char *t;
10998   char const *s = 0 ? (char *) 0 : (char const *) 0;
10999
11000   *t++ = 0;
11001 }
11002 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11003   int x[] = {25, 17};
11004   const int *foo = &x[0];
11005   ++foo;
11006 }
11007 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11008   typedef const int *iptr;
11009   iptr p = 0;
11010   ++p;
11011 }
11012 { /* AIX XL C 1.02.0.0 rejects this saying
11013      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11014   struct s { int j; const int *ap[3]; };
11015   struct s *b; b->j = 5;
11016 }
11017 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11018   const int foo = 10;
11019 }
11020
11021 ; return 0; }
11022 EOF
11023 if { (eval echo configure:11024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11024   rm -rf conftest*
11025   ac_cv_c_const=yes
11026 else
11027   echo "configure: failed program was:" >&5
11028   cat conftest.$ac_ext >&5
11029   rm -rf conftest*
11030   ac_cv_c_const=no
11031 fi
11032 rm -f conftest*
11033 fi
11034
11035 echo "$ac_t""$ac_cv_c_const" 1>&6
11036 if test $ac_cv_c_const = no; then
11037   cat >> confdefs.h <<\EOF
11038 #define const 
11039 EOF
11040
11041 fi
11042
11043 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
11044 echo "configure:11045: checking if compiler understands volatile" >&5
11045 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
11046   echo $ac_n "(cached) $ac_c" 1>&6
11047 else
11048   cat > conftest.$ac_ext <<EOF
11049 #line 11050 "configure"
11050 #include "confdefs.h"
11051 int x, y, z;
11052 int main() {
11053 volatile int a; int * volatile b = x ? &y : &z;
11054       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
11055       *b = 0;
11056 ; return 0; }
11057 EOF
11058 if { (eval echo configure:11059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11059   rm -rf conftest*
11060   ol_cv_c_volatile=yes
11061 else
11062   echo "configure: failed program was:" >&5
11063   cat conftest.$ac_ext >&5
11064   rm -rf conftest*
11065   ol_cv_c_volatile=no
11066 fi
11067 rm -f conftest*
11068 fi
11069
11070 echo "$ac_t""$ol_cv_c_volatile" 1>&6
11071   if test $ol_cv_c_volatile = yes; then
11072     : 
11073   else
11074     cat >> confdefs.h <<\EOF
11075 #define volatile 
11076 EOF
11077
11078   fi
11079  
11080
11081 if test $cross_compiling = yes ; then
11082         cat >> confdefs.h <<\EOF
11083 #define CROSS_COMPILING 1
11084 EOF
11085
11086
11087         cat >> confdefs.h <<\EOF
11088 #define LBER_INT_T long
11089 EOF
11090
11091         cat >> confdefs.h <<\EOF
11092 #define LBER_TAG_T long
11093 EOF
11094
11095         cat >> confdefs.h <<\EOF
11096 #define LBER_SOCKET_T int
11097 EOF
11098
11099
11100 else
11101         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
11102 echo "configure:11103: checking whether byte ordering is bigendian" >&5
11103 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
11104   echo $ac_n "(cached) $ac_c" 1>&6
11105 else
11106   ac_cv_c_bigendian=unknown
11107 # See if sys/param.h defines the BYTE_ORDER macro.
11108 cat > conftest.$ac_ext <<EOF
11109 #line 11110 "configure"
11110 #include "confdefs.h"
11111 #include <sys/types.h>
11112 #include <sys/param.h>
11113 int main() {
11114
11115 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11116  bogus endian macros
11117 #endif
11118 ; return 0; }
11119 EOF
11120 if { (eval echo configure:11121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11121   rm -rf conftest*
11122   # It does; now see whether it defined to BIG_ENDIAN or not.
11123 cat > conftest.$ac_ext <<EOF
11124 #line 11125 "configure"
11125 #include "confdefs.h"
11126 #include <sys/types.h>
11127 #include <sys/param.h>
11128 int main() {
11129
11130 #if BYTE_ORDER != BIG_ENDIAN
11131  not big endian
11132 #endif
11133 ; return 0; }
11134 EOF
11135 if { (eval echo configure:11136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11136   rm -rf conftest*
11137   ac_cv_c_bigendian=yes
11138 else
11139   echo "configure: failed program was:" >&5
11140   cat conftest.$ac_ext >&5
11141   rm -rf conftest*
11142   ac_cv_c_bigendian=no
11143 fi
11144 rm -f conftest*
11145 else
11146   echo "configure: failed program was:" >&5
11147   cat conftest.$ac_ext >&5
11148 fi
11149 rm -f conftest*
11150 if test $ac_cv_c_bigendian = unknown; then
11151 if test "$cross_compiling" = yes; then
11152     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11153 else
11154   cat > conftest.$ac_ext <<EOF
11155 #line 11156 "configure"
11156 #include "confdefs.h"
11157 main () {
11158   /* Are we little or big endian?  From Harbison&Steele.  */
11159   union
11160   {
11161     long l;
11162     char c[sizeof (long)];
11163   } u;
11164   u.l = 1;
11165   exit (u.c[sizeof (long) - 1] == 1);
11166 }
11167 EOF
11168 if { (eval echo configure:11169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11169 then
11170   ac_cv_c_bigendian=no
11171 else
11172   echo "configure: failed program was:" >&5
11173   cat conftest.$ac_ext >&5
11174   rm -fr conftest*
11175   ac_cv_c_bigendian=yes
11176 fi
11177 rm -fr conftest*
11178 fi
11179
11180 fi
11181 fi
11182
11183 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
11184 if test $ac_cv_c_bigendian = yes; then
11185   cat >> confdefs.h <<\EOF
11186 #define WORDS_BIGENDIAN 1
11187 EOF
11188
11189 fi
11190
11191         echo $ac_n "checking size of short""... $ac_c" 1>&6
11192 echo "configure:11193: checking size of short" >&5
11193 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
11194   echo $ac_n "(cached) $ac_c" 1>&6
11195 else
11196   if test "$cross_compiling" = yes; then
11197     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11198 else
11199   cat > conftest.$ac_ext <<EOF
11200 #line 11201 "configure"
11201 #include "confdefs.h"
11202 #include <stdio.h>
11203 main()
11204 {
11205   FILE *f=fopen("conftestval", "w");
11206   if (!f) exit(1);
11207   fprintf(f, "%d\n", sizeof(short));
11208   exit(0);
11209 }
11210 EOF
11211 if { (eval echo configure:11212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11212 then
11213   ac_cv_sizeof_short=`cat conftestval`
11214 else
11215   echo "configure: failed program was:" >&5
11216   cat conftest.$ac_ext >&5
11217   rm -fr conftest*
11218   ac_cv_sizeof_short=0
11219 fi
11220 rm -fr conftest*
11221 fi
11222
11223 fi
11224 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
11225 cat >> confdefs.h <<EOF
11226 #define SIZEOF_SHORT $ac_cv_sizeof_short
11227 EOF
11228
11229  
11230         echo $ac_n "checking size of int""... $ac_c" 1>&6
11231 echo "configure:11232: checking size of int" >&5
11232 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
11233   echo $ac_n "(cached) $ac_c" 1>&6
11234 else
11235   if test "$cross_compiling" = yes; then
11236     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11237 else
11238   cat > conftest.$ac_ext <<EOF
11239 #line 11240 "configure"
11240 #include "confdefs.h"
11241 #include <stdio.h>
11242 main()
11243 {
11244   FILE *f=fopen("conftestval", "w");
11245   if (!f) exit(1);
11246   fprintf(f, "%d\n", sizeof(int));
11247   exit(0);
11248 }
11249 EOF
11250 if { (eval echo configure:11251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11251 then
11252   ac_cv_sizeof_int=`cat conftestval`
11253 else
11254   echo "configure: failed program was:" >&5
11255   cat conftest.$ac_ext >&5
11256   rm -fr conftest*
11257   ac_cv_sizeof_int=0
11258 fi
11259 rm -fr conftest*
11260 fi
11261
11262 fi
11263 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
11264 cat >> confdefs.h <<EOF
11265 #define SIZEOF_INT $ac_cv_sizeof_int
11266 EOF
11267
11268  
11269         echo $ac_n "checking size of long""... $ac_c" 1>&6
11270 echo "configure:11271: checking size of long" >&5
11271 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
11272   echo $ac_n "(cached) $ac_c" 1>&6
11273 else
11274   if test "$cross_compiling" = yes; then
11275     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
11276 else
11277   cat > conftest.$ac_ext <<EOF
11278 #line 11279 "configure"
11279 #include "confdefs.h"
11280 #include <stdio.h>
11281 main()
11282 {
11283   FILE *f=fopen("conftestval", "w");
11284   if (!f) exit(1);
11285   fprintf(f, "%d\n", sizeof(long));
11286   exit(0);
11287 }
11288 EOF
11289 if { (eval echo configure:11290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11290 then
11291   ac_cv_sizeof_long=`cat conftestval`
11292 else
11293   echo "configure: failed program was:" >&5
11294   cat conftest.$ac_ext >&5
11295   rm -fr conftest*
11296   ac_cv_sizeof_long=0
11297 fi
11298 rm -fr conftest*
11299 fi
11300
11301 fi
11302 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
11303 cat >> confdefs.h <<EOF
11304 #define SIZEOF_LONG $ac_cv_sizeof_long
11305 EOF
11306
11307
11308
11309         if test "$ac_cv_sizeof_int" -lt 4 ; then
11310                 echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
11311
11312                 cat >> confdefs.h <<\EOF
11313 #define LBER_INT_T long
11314 EOF
11315
11316                 cat >> confdefs.h <<\EOF
11317 #define LBER_TAG_T long
11318 EOF
11319
11320                 cat >> confdefs.h <<\EOF
11321 #define LBER_SOCKET_T int
11322 EOF
11323
11324         else
11325                 cat >> confdefs.h <<\EOF
11326 #define LBER_INT_T int
11327 EOF
11328
11329                 cat >> confdefs.h <<\EOF
11330 #define LBER_TAG_T long
11331 EOF
11332
11333                 cat >> confdefs.h <<\EOF
11334 #define LBER_SOCKET_T int
11335 EOF
11336
11337         fi
11338 fi
11339
11340 cat >> confdefs.h <<\EOF
11341 #define LBER_LEN_T long
11342 EOF
11343
11344
11345 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
11346 echo "configure:11347: checking for 8-bit clean memcmp" >&5
11347 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
11348   echo $ac_n "(cached) $ac_c" 1>&6
11349 else
11350   if test "$cross_compiling" = yes; then
11351   ac_cv_func_memcmp_clean=no
11352 else
11353   cat > conftest.$ac_ext <<EOF
11354 #line 11355 "configure"
11355 #include "confdefs.h"
11356
11357 main()
11358 {
11359   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11360   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
11361 }
11362
11363 EOF
11364 if { (eval echo configure:11365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11365 then
11366   ac_cv_func_memcmp_clean=yes
11367 else
11368   echo "configure: failed program was:" >&5
11369   cat conftest.$ac_ext >&5
11370   rm -fr conftest*
11371   ac_cv_func_memcmp_clean=no
11372 fi
11373 rm -fr conftest*
11374 fi
11375
11376 fi
11377
11378 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
11379 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
11380
11381 echo $ac_n "checking for strftime""... $ac_c" 1>&6
11382 echo "configure:11383: checking for strftime" >&5
11383 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
11384   echo $ac_n "(cached) $ac_c" 1>&6
11385 else
11386   cat > conftest.$ac_ext <<EOF
11387 #line 11388 "configure"
11388 #include "confdefs.h"
11389 /* System header to define __stub macros and hopefully few prototypes,
11390     which can conflict with char strftime(); below.  */
11391 #include <assert.h>
11392 /* Override any gcc2 internal prototype to avoid an error.  */
11393 /* We use char because int might match the return type of a gcc2
11394     builtin and then its argument prototype would still apply.  */
11395 char strftime();
11396
11397 int main() {
11398
11399 /* The GNU C library defines this for functions which it implements
11400     to always fail with ENOSYS.  Some functions are actually named
11401     something starting with __ and the normal name is an alias.  */
11402 #if defined (__stub_strftime) || defined (__stub___strftime)
11403 choke me
11404 #else
11405 strftime();
11406 #endif
11407
11408 ; return 0; }
11409 EOF
11410 if { (eval echo configure:11411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11411   rm -rf conftest*
11412   eval "ac_cv_func_strftime=yes"
11413 else
11414   echo "configure: failed program was:" >&5
11415   cat conftest.$ac_ext >&5
11416   rm -rf conftest*
11417   eval "ac_cv_func_strftime=no"
11418 fi
11419 rm -f conftest*
11420 fi
11421
11422 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
11423   echo "$ac_t""yes" 1>&6
11424   cat >> confdefs.h <<\EOF
11425 #define HAVE_STRFTIME 1
11426 EOF
11427
11428 else
11429   echo "$ac_t""no" 1>&6
11430 # strftime is in -lintl on SCO UNIX.
11431 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
11432 echo "configure:11433: checking for strftime in -lintl" >&5
11433 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
11434 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11435   echo $ac_n "(cached) $ac_c" 1>&6
11436 else
11437   ac_save_LIBS="$LIBS"
11438 LIBS="-lintl  $LIBS"
11439 cat > conftest.$ac_ext <<EOF
11440 #line 11441 "configure"
11441 #include "confdefs.h"
11442 /* Override any gcc2 internal prototype to avoid an error.  */
11443 /* We use char because int might match the return type of a gcc2
11444     builtin and then its argument prototype would still apply.  */
11445 char strftime();
11446
11447 int main() {
11448 strftime()
11449 ; return 0; }
11450 EOF
11451 if { (eval echo configure:11452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11452   rm -rf conftest*
11453   eval "ac_cv_lib_$ac_lib_var=yes"
11454 else
11455   echo "configure: failed program was:" >&5
11456   cat conftest.$ac_ext >&5
11457   rm -rf conftest*
11458   eval "ac_cv_lib_$ac_lib_var=no"
11459 fi
11460 rm -f conftest*
11461 LIBS="$ac_save_LIBS"
11462
11463 fi
11464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11465   echo "$ac_t""yes" 1>&6
11466   cat >> confdefs.h <<\EOF
11467 #define HAVE_STRFTIME 1
11468 EOF
11469
11470 LIBS="-lintl $LIBS"
11471 else
11472   echo "$ac_t""no" 1>&6
11473 fi
11474
11475 fi
11476
11477
11478 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
11479 echo "configure:11480: checking for vprintf" >&5
11480 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
11481   echo $ac_n "(cached) $ac_c" 1>&6
11482 else
11483   cat > conftest.$ac_ext <<EOF
11484 #line 11485 "configure"
11485 #include "confdefs.h"
11486 /* System header to define __stub macros and hopefully few prototypes,
11487     which can conflict with char vprintf(); below.  */
11488 #include <assert.h>
11489 /* Override any gcc2 internal prototype to avoid an error.  */
11490 /* We use char because int might match the return type of a gcc2
11491     builtin and then its argument prototype would still apply.  */
11492 char vprintf();
11493
11494 int main() {
11495
11496 /* The GNU C library defines this for functions which it implements
11497     to always fail with ENOSYS.  Some functions are actually named
11498     something starting with __ and the normal name is an alias.  */
11499 #if defined (__stub_vprintf) || defined (__stub___vprintf)
11500 choke me
11501 #else
11502 vprintf();
11503 #endif
11504
11505 ; return 0; }
11506 EOF
11507 if { (eval echo configure:11508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11508   rm -rf conftest*
11509   eval "ac_cv_func_vprintf=yes"
11510 else
11511   echo "configure: failed program was:" >&5
11512   cat conftest.$ac_ext >&5
11513   rm -rf conftest*
11514   eval "ac_cv_func_vprintf=no"
11515 fi
11516 rm -f conftest*
11517 fi
11518
11519 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
11520   echo "$ac_t""yes" 1>&6
11521   cat >> confdefs.h <<\EOF
11522 #define HAVE_VPRINTF 1
11523 EOF
11524
11525 else
11526   echo "$ac_t""no" 1>&6
11527 fi
11528
11529 if test "$ac_cv_func_vprintf" != yes; then
11530 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
11531 echo "configure:11532: checking for _doprnt" >&5
11532 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
11533   echo $ac_n "(cached) $ac_c" 1>&6
11534 else
11535   cat > conftest.$ac_ext <<EOF
11536 #line 11537 "configure"
11537 #include "confdefs.h"
11538 /* System header to define __stub macros and hopefully few prototypes,
11539     which can conflict with char _doprnt(); below.  */
11540 #include <assert.h>
11541 /* Override any gcc2 internal prototype to avoid an error.  */
11542 /* We use char because int might match the return type of a gcc2
11543     builtin and then its argument prototype would still apply.  */
11544 char _doprnt();
11545
11546 int main() {
11547
11548 /* The GNU C library defines this for functions which it implements
11549     to always fail with ENOSYS.  Some functions are actually named
11550     something starting with __ and the normal name is an alias.  */
11551 #if defined (__stub__doprnt) || defined (__stub____doprnt)
11552 choke me
11553 #else
11554 _doprnt();
11555 #endif
11556
11557 ; return 0; }
11558 EOF
11559 if { (eval echo configure:11560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11560   rm -rf conftest*
11561   eval "ac_cv_func__doprnt=yes"
11562 else
11563   echo "configure: failed program was:" >&5
11564   cat conftest.$ac_ext >&5
11565   rm -rf conftest*
11566   eval "ac_cv_func__doprnt=no"
11567 fi
11568 rm -f conftest*
11569 fi
11570
11571 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
11572   echo "$ac_t""yes" 1>&6
11573   cat >> confdefs.h <<\EOF
11574 #define HAVE_DOPRNT 1
11575 EOF
11576
11577 else
11578   echo "$ac_t""no" 1>&6
11579 fi
11580
11581 fi
11582
11583
11584 if test $ac_cv_func_vprintf = yes ; then
11585                 for ac_func in vsnprintf vsprintf
11586 do
11587 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11588 echo "configure:11589: checking for $ac_func" >&5
11589 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11590   echo $ac_n "(cached) $ac_c" 1>&6
11591 else
11592   cat > conftest.$ac_ext <<EOF
11593 #line 11594 "configure"
11594 #include "confdefs.h"
11595 /* System header to define __stub macros and hopefully few prototypes,
11596     which can conflict with char $ac_func(); below.  */
11597 #include <assert.h>
11598 /* Override any gcc2 internal prototype to avoid an error.  */
11599 /* We use char because int might match the return type of a gcc2
11600     builtin and then its argument prototype would still apply.  */
11601 char $ac_func();
11602
11603 int main() {
11604
11605 /* The GNU C library defines this for functions which it implements
11606     to always fail with ENOSYS.  Some functions are actually named
11607     something starting with __ and the normal name is an alias.  */
11608 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11609 choke me
11610 #else
11611 $ac_func();
11612 #endif
11613
11614 ; return 0; }
11615 EOF
11616 if { (eval echo configure:11617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11617   rm -rf conftest*
11618   eval "ac_cv_func_$ac_func=yes"
11619 else
11620   echo "configure: failed program was:" >&5
11621   cat conftest.$ac_ext >&5
11622   rm -rf conftest*
11623   eval "ac_cv_func_$ac_func=no"
11624 fi
11625 rm -f conftest*
11626 fi
11627
11628 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11629   echo "$ac_t""yes" 1>&6
11630     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11631   cat >> confdefs.h <<EOF
11632 #define $ac_tr_func 1
11633 EOF
11634  
11635 else
11636   echo "$ac_t""no" 1>&6
11637 fi
11638 done
11639
11640 fi
11641
11642 for ac_func in \
11643         bcopy                   \
11644         closesocket             \
11645         endgrent                \
11646         endpwent                \
11647         flock                   \
11648         getdtablesize   \
11649         getgrgid                \
11650         gethostname             \
11651         getpass                 \
11652         getpwuid                \
11653         getpwnam                \
11654         getspnam                \
11655         gettimeofday    \
11656         initgroups              \
11657         lockf                   \
11658         memcpy                  \
11659         memmove                 \
11660         mkstemp                 \
11661         read                    \
11662         recv                    \
11663         recvfrom                \
11664         setpwfile               \
11665         setgid                  \
11666         setegid                 \
11667         setsid                  \
11668         setuid                  \
11669         seteuid                 \
11670         signal                  \
11671         sigset                  \
11672         snprintf                \
11673         strdup                  \
11674         strerror                \
11675         strpbrk                 \
11676         strrchr                 \
11677         strsep                  \
11678         strstr                  \
11679         strtol                  \
11680         strtoul                 \
11681         strspn                  \
11682         sysconf                 \
11683         waitpid                 \
11684         wait4                   \
11685         write                   \
11686         send                    \
11687         sendto                  \
11688
11689 do
11690 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11691 echo "configure:11692: checking for $ac_func" >&5
11692 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11693   echo $ac_n "(cached) $ac_c" 1>&6
11694 else
11695   cat > conftest.$ac_ext <<EOF
11696 #line 11697 "configure"
11697 #include "confdefs.h"
11698 /* System header to define __stub macros and hopefully few prototypes,
11699     which can conflict with char $ac_func(); below.  */
11700 #include <assert.h>
11701 /* Override any gcc2 internal prototype to avoid an error.  */
11702 /* We use char because int might match the return type of a gcc2
11703     builtin and then its argument prototype would still apply.  */
11704 char $ac_func();
11705
11706 int main() {
11707
11708 /* The GNU C library defines this for functions which it implements
11709     to always fail with ENOSYS.  Some functions are actually named
11710     something starting with __ and the normal name is an alias.  */
11711 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11712 choke me
11713 #else
11714 $ac_func();
11715 #endif
11716
11717 ; return 0; }
11718 EOF
11719 if { (eval echo configure:11720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11720   rm -rf conftest*
11721   eval "ac_cv_func_$ac_func=yes"
11722 else
11723   echo "configure: failed program was:" >&5
11724   cat conftest.$ac_ext >&5
11725   rm -rf conftest*
11726   eval "ac_cv_func_$ac_func=no"
11727 fi
11728 rm -f conftest*
11729 fi
11730
11731 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11732   echo "$ac_t""yes" 1>&6
11733     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11734   cat >> confdefs.h <<EOF
11735 #define $ac_tr_func 1
11736 EOF
11737  
11738 else
11739   echo "$ac_t""no" 1>&6
11740 fi
11741 done
11742
11743
11744 for ac_func in getopt tempnam
11745 do
11746 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11747 echo "configure:11748: checking for $ac_func" >&5
11748 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11749   echo $ac_n "(cached) $ac_c" 1>&6
11750 else
11751   cat > conftest.$ac_ext <<EOF
11752 #line 11753 "configure"
11753 #include "confdefs.h"
11754 /* System header to define __stub macros and hopefully few prototypes,
11755     which can conflict with char $ac_func(); below.  */
11756 #include <assert.h>
11757 /* Override any gcc2 internal prototype to avoid an error.  */
11758 /* We use char because int might match the return type of a gcc2
11759     builtin and then its argument prototype would still apply.  */
11760 char $ac_func();
11761
11762 int main() {
11763
11764 /* The GNU C library defines this for functions which it implements
11765     to always fail with ENOSYS.  Some functions are actually named
11766     something starting with __ and the normal name is an alias.  */
11767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11768 choke me
11769 #else
11770 $ac_func();
11771 #endif
11772
11773 ; return 0; }
11774 EOF
11775 if { (eval echo configure:11776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11776   rm -rf conftest*
11777   eval "ac_cv_func_$ac_func=yes"
11778 else
11779   echo "configure: failed program was:" >&5
11780   cat conftest.$ac_ext >&5
11781   rm -rf conftest*
11782   eval "ac_cv_func_$ac_func=no"
11783 fi
11784 rm -f conftest*
11785 fi
11786
11787 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11788   echo "$ac_t""yes" 1>&6
11789     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11790   cat >> confdefs.h <<EOF
11791 #define $ac_tr_func 1
11792 EOF
11793  
11794 else
11795   echo "$ac_t""no" 1>&6
11796 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
11797 fi
11798 done
11799
11800
11801
11802 # Check Configuration
11803
11804 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
11805 echo "configure:11806: checking declaration of sys_errlist" >&5
11806 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
11807   echo $ac_n "(cached) $ac_c" 1>&6
11808 else
11809   
11810         cat > conftest.$ac_ext <<EOF
11811 #line 11812 "configure"
11812 #include "confdefs.h"
11813
11814 #include <stdio.h>
11815 #include <sys/types.h>
11816 #include <errno.h> 
11817 int main() {
11818 char *c = (char *) *sys_errlist
11819 ; return 0; }
11820 EOF
11821 if { (eval echo configure:11822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11822   rm -rf conftest*
11823   ol_cv_dcl_sys_errlist=yes
11824 else
11825   echo "configure: failed program was:" >&5
11826   cat conftest.$ac_ext >&5
11827   rm -rf conftest*
11828   ol_cv_dcl_sys_errlist=no
11829 fi
11830 rm -f conftest*
11831 fi
11832
11833 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
11834 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
11835 if test $ol_cv_dcl_sys_errlist = no ; then
11836         cat >> confdefs.h <<\EOF
11837 #define DECL_SYS_ERRLIST 1
11838 EOF
11839
11840         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
11841 echo "configure:11842: checking existence of sys_errlist" >&5
11842         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
11843   echo $ac_n "(cached) $ac_c" 1>&6
11844 else
11845   
11846                 cat > conftest.$ac_ext <<EOF
11847 #line 11848 "configure"
11848 #include "confdefs.h"
11849 #include <errno.h>
11850 int main() {
11851 char *c = (char *) *sys_errlist
11852 ; return 0; }
11853 EOF
11854 if { (eval echo configure:11855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11855   rm -rf conftest*
11856   ol_cv_have_sys_errlist=yes
11857 else
11858   echo "configure: failed program was:" >&5
11859   cat conftest.$ac_ext >&5
11860   rm -rf conftest*
11861   ol_cv_have_sys_errlist=no
11862 fi
11863 rm -f conftest*
11864 fi
11865
11866         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
11867         if test $ol_cv_have_sys_errlist = yes ; then
11868                 cat >> confdefs.h <<\EOF
11869 #define HAVE_SYS_ERRLIST 1
11870 EOF
11871
11872         fi
11873 fi
11874
11875
11876
11877 if test "$ol_enable_debug" != no ; then
11878         cat >> confdefs.h <<\EOF
11879 #define LDAP_DEBUG 1
11880 EOF
11881
11882 fi
11883 if test "$ol_enable_syslog" = yes ; then
11884         cat >> confdefs.h <<\EOF
11885 #define LDAP_SYSLOG 1
11886 EOF
11887
11888 fi
11889 if test "$ol_enable_libui" = yes ; then
11890         cat >> confdefs.h <<\EOF
11891 #define LDAP_LIBUI 1
11892 EOF
11893
11894 fi
11895 if test "$ol_enable_cache" = no ; then
11896         cat >> confdefs.h <<\EOF
11897 #define LDAP_NOCACHE 1
11898 EOF
11899
11900 fi
11901 if test "$ol_enable_dns" != no ; then
11902         cat >> confdefs.h <<\EOF
11903 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
11904 EOF
11905
11906 fi
11907 if test "$ol_enable_proctitle" != no ; then
11908         cat >> confdefs.h <<\EOF
11909 #define LDAP_PROCTITLE 1
11910 EOF
11911
11912 fi
11913 if test "$ol_enable_referrals" != no ; then
11914         cat >> confdefs.h <<\EOF
11915 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
11916 EOF
11917
11918 fi
11919 if test "$ol_enable_cldap" != no ; then
11920         cat >> confdefs.h <<\EOF
11921 #define LDAP_CONNECTIONLESS 1
11922 EOF
11923
11924 fi
11925
11926 if test "$ol_enable_crypt" != no ; then
11927         cat >> confdefs.h <<\EOF
11928 #define SLAPD_CRYPT 1
11929 EOF
11930
11931 fi
11932 if test "$ol_enable_cleartext" != no ; then
11933         cat >> confdefs.h <<\EOF
11934 #define SLAPD_CLEARTEXT 1
11935 EOF
11936
11937 fi
11938 if test "$ol_enable_phonetic" != no ; then
11939         cat >> confdefs.h <<\EOF
11940 #define SLAPD_PHONETIC 1
11941 EOF
11942
11943 fi
11944 if test "$ol_enable_rlookups" != no ; then
11945         cat >> confdefs.h <<\EOF
11946 #define SLAPD_RLOOKUPS 1
11947 EOF
11948
11949 fi
11950
11951 if test "$ol_link_modules" != no ; then
11952         cat >> confdefs.h <<\EOF
11953 #define SLAPD_MODULES 1
11954 EOF
11955
11956         BUILD_SLAPD=yes
11957 fi
11958
11959 if test "$ol_link_bdb2" != no ; then
11960         cat >> confdefs.h <<\EOF
11961 #define SLAPD_BDB2 1
11962 EOF
11963
11964         BUILD_SLAPD=yes
11965         BUILD_BDB2=yes
11966         if test "$ol_with_bdb2_module" != static ; then
11967                 cat >> confdefs.h <<\EOF
11968 #define SLAPD_BDB2_DYNAMIC 1
11969 EOF
11970
11971                 BUILD_BDB2_DYNAMIC=yes
11972         fi
11973 fi
11974
11975 if test "$ol_enable_ldap" != no ; then
11976         cat >> confdefs.h <<\EOF
11977 #define SLAPD_LDAP 1
11978 EOF
11979
11980         BUILD_SLAPD=yes
11981         BUILD_LDAP=yes
11982         if test "$ol_with_ldap_module" != static ; then
11983                 cat >> confdefs.h <<\EOF
11984 #define SLAPD_LDAP_DYNAMIC 1
11985 EOF
11986
11987                 BUILD_LDAP_DYNAMIC=yes
11988         fi
11989 fi
11990
11991 if test "$ol_link_ldbm" != no ; then
11992         cat >> confdefs.h <<\EOF
11993 #define SLAPD_LDBM 1
11994 EOF
11995
11996         BUILD_SLAPD=yes
11997         BUILD_LDBM=yes
11998         if test "$ol_with_ldbm_module" != static ; then
11999                 cat >> confdefs.h <<\EOF
12000 #define SLAPD_LDBM_DYNAMIC 1
12001 EOF
12002
12003                 BUILD_LDBM_DYNAMIC=yes
12004         fi
12005 fi
12006
12007 if test "$ol_enable_passwd" != no ; then
12008         cat >> confdefs.h <<\EOF
12009 #define SLAPD_PASSWD 1
12010 EOF
12011
12012         BUILD_SLAPD=yes
12013         BUILD_PASSWD=yes
12014         if test "$ol_with_passwd_module" != static ; then
12015                 cat >> confdefs.h <<\EOF
12016 #define SLAPD_PASSWD_DYNAMIC 1
12017 EOF
12018
12019                 BUILD_PASSWD_DYNAMIC=yes
12020         fi
12021 fi
12022
12023 if test "$ol_link_perl" != no ; then
12024         cat >> confdefs.h <<\EOF
12025 #define SLAPD_PERL 1
12026 EOF
12027
12028         BUILD_SLAPD=yes
12029         BUILD_PERL=yes
12030         if test "$ol_with_perl_module" != static ; then
12031                 cat >> confdefs.h <<\EOF
12032 #define SLAPD_PERL_DYNAMIC 1
12033 EOF
12034
12035                 BUILD_PERL_DYNAMIC=yes
12036         fi
12037 fi
12038
12039 if test "$ol_enable_shell" != no ; then
12040         cat >> confdefs.h <<\EOF
12041 #define SLAPD_SHELL 1
12042 EOF
12043
12044         BUILD_SLAPD=yes
12045         BUILD_SHELL=yes
12046         if test "$ol_with_shell_module" != static ; then
12047                 cat >> confdefs.h <<\EOF
12048 #define SLAPD_SHELL_DYNAMIC 1
12049 EOF
12050
12051                 BUILD_SHELL_DYNAMIC=yes
12052         fi
12053 fi
12054
12055 if test "$ol_enable_tcl" != no ; then
12056         cat >> confdefs.h <<\EOF
12057 #define SLAPD_TCL 1
12058 EOF
12059
12060         BUILD_SLAPD=yes
12061         BUILD_TCL=yes
12062         if test "$ol_with_tcl_module" != static; then
12063                 cat >> confdefs.h <<\EOF
12064 #define SLAPD_TCL_DYNAMIC 1
12065 EOF
12066
12067                 BUILD_TCL_DYNAMIC=yes
12068         fi
12069 fi
12070
12071 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
12072         $BUILD_SLAPD = yes ; then
12073         BUILD_SLURPD=yes
12074 fi
12075
12076 if test "$ol_link_isode" != no ; then
12077         BUILD_LDAPD=yes
12078 fi
12079
12080
12081
12082
12083   
12084   
12085   
12086   
12087   
12088   
12089   
12090   
12091   
12092   
12093   
12094   
12095   
12096   
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119 trap '' 1 2 15
12120
12121 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12122
12123 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12124 # Let make expand exec_prefix.
12125 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12126
12127 # Any assignment to VPATH causes Sun make to only execute
12128 # the first set of double-colon rules, so remove it if not needed.
12129 # If there is a colon in the path, we need to keep it.
12130 if test "x$srcdir" = x.; then
12131   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12132 fi
12133
12134 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12135
12136 DEFS=-DHAVE_CONFIG_H
12137
12138 # Without the "./", some shells look in PATH for config.status.
12139 : ${CONFIG_STATUS=./config.status}
12140
12141 echo creating $CONFIG_STATUS
12142 rm -f $CONFIG_STATUS
12143 cat > $CONFIG_STATUS <<EOF
12144 #! /bin/sh
12145 # Generated automatically by configure.
12146 # Run this file to recreate the current configuration.
12147 # This directory was configured as follows,
12148 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12149 #
12150 # $0 $ac_configure_args
12151 #
12152 # Compiler output produced by configure, useful for debugging
12153 # configure, is in ./config.log if it exists.
12154
12155 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12156 for ac_option
12157 do
12158   case "\$ac_option" in
12159   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12160     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12161     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12162   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12163     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12164     exit 0 ;;
12165   -help | --help | --hel | --he | --h)
12166     echo "\$ac_cs_usage"; exit 0 ;;
12167   *) echo "\$ac_cs_usage"; exit 1 ;;
12168   esac
12169 done
12170
12171 ac_given_srcdir=$srcdir
12172 ac_given_INSTALL="$INSTALL"
12173
12174 trap 'rm -fr `echo "\
12175 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12176 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12177 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12178 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12179 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12180 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12181 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12182 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12183 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12184 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12185 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12186 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12187 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12188 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12189 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12190 include/Makefile:build/top.mk:include/Makefile.in \
12191 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12192 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12193 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12194 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12195 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12196 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12197 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12198 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12199 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12200 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12201 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12202 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12203 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12204 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12205 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12206 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12207 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12208 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12209 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12210 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12211 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12212 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12213 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12214 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12215 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12216 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12217  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12218 EOF
12219 cat >> $CONFIG_STATUS <<EOF
12220
12221 # Protect against being on the right side of a sed subst in config.status.
12222 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12223  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12224 $ac_vpsub
12225 $extrasub
12226 s%@SHELL@%$SHELL%g
12227 s%@CFLAGS@%$CFLAGS%g
12228 s%@CPPFLAGS@%$CPPFLAGS%g
12229 s%@CXXFLAGS@%$CXXFLAGS%g
12230 s%@FFLAGS@%$FFLAGS%g
12231 s%@DEFS@%$DEFS%g
12232 s%@LDFLAGS@%$LDFLAGS%g
12233 s%@LIBS@%$LIBS%g
12234 s%@exec_prefix@%$exec_prefix%g
12235 s%@prefix@%$prefix%g
12236 s%@program_transform_name@%$program_transform_name%g
12237 s%@bindir@%$bindir%g
12238 s%@sbindir@%$sbindir%g
12239 s%@libexecdir@%$libexecdir%g
12240 s%@datadir@%$datadir%g
12241 s%@sysconfdir@%$sysconfdir%g
12242 s%@sharedstatedir@%$sharedstatedir%g
12243 s%@localstatedir@%$localstatedir%g
12244 s%@libdir@%$libdir%g
12245 s%@includedir@%$includedir%g
12246 s%@oldincludedir@%$oldincludedir%g
12247 s%@infodir@%$infodir%g
12248 s%@mandir@%$mandir%g
12249 s%@host@%$host%g
12250 s%@host_alias@%$host_alias%g
12251 s%@host_cpu@%$host_cpu%g
12252 s%@host_vendor@%$host_vendor%g
12253 s%@host_os@%$host_os%g
12254 s%@target@%$target%g
12255 s%@target_alias@%$target_alias%g
12256 s%@target_cpu@%$target_cpu%g
12257 s%@target_vendor@%$target_vendor%g
12258 s%@target_os@%$target_os%g
12259 s%@build@%$build%g
12260 s%@build_alias@%$build_alias%g
12261 s%@build_cpu@%$build_cpu%g
12262 s%@build_vendor@%$build_vendor%g
12263 s%@build_os@%$build_os%g
12264 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12265 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12266 s%@INSTALL_DATA@%$INSTALL_DATA%g
12267 s%@PACKAGE@%$PACKAGE%g
12268 s%@VERSION@%$VERSION%g
12269 s%@ACLOCAL@%$ACLOCAL%g
12270 s%@AUTOCONF@%$AUTOCONF%g
12271 s%@AUTOMAKE@%$AUTOMAKE%g
12272 s%@AUTOHEADER@%$AUTOHEADER%g
12273 s%@MAKEINFO@%$MAKEINFO%g
12274 s%@SET_MAKE@%$SET_MAKE%g
12275 s%@top_builddir@%$top_builddir%g
12276 s%@ldap_subdir@%$ldap_subdir%g
12277 s%@CC@%$CC%g
12278 s%@RANLIB@%$RANLIB%g
12279 s%@LD@%$LD%g
12280 s%@NM@%$NM%g
12281 s%@LN_S@%$LN_S%g
12282 s%@LIBTOOL@%$LIBTOOL%g
12283 s%@AWK@%$AWK%g
12284 s%@LN_H@%$LN_H%g
12285 s%@SENDMAIL@%$SENDMAIL%g
12286 s%@EDITOR@%$EDITOR%g
12287 s%@FINGER@%$FINGER%g
12288 s%@GLIBCONFIG@%$GLIBCONFIG%g
12289 s%@PERLBIN@%$PERLBIN%g
12290 s%@CPP@%$CPP%g
12291 s%@EXEEXT@%$EXEEXT%g
12292 s%@OBJEXT@%$OBJEXT%g
12293 s%@OL_MKDEP@%$OL_MKDEP%g
12294 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
12295 s%@PEPSY@%$PEPSY%g
12296 s%@LIBOBJS@%$LIBOBJS%g
12297 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
12298 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
12299 s%@BUILD_BDB2@%$BUILD_BDB2%g
12300 s%@BUILD_LDAP@%$BUILD_LDAP%g
12301 s%@BUILD_LDBM@%$BUILD_LDBM%g
12302 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
12303 s%@BUILD_PERL@%$BUILD_PERL%g
12304 s%@BUILD_SHELL@%$BUILD_SHELL%g
12305 s%@BUILD_TCL@%$BUILD_TCL%g
12306 s%@BUILD_BDB2_DYNAMIC@%$BUILD_BDB2_DYNAMIC%g
12307 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
12308 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
12309 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
12310 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
12311 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
12312 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
12313 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
12314 s%@LDAP_LIBS@%$LDAP_LIBS%g
12315 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
12316 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
12317 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
12318 s%@LDBM_LIBS@%$LDBM_LIBS%g
12319 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
12320 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
12321 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
12322 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
12323 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
12324 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
12325 s%@KRB_LIBS@%$KRB_LIBS%g
12326 s%@READLINE_LIBS@%$READLINE_LIBS%g
12327 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
12328 s%@TLS_LIBS@%$TLS_LIBS%g
12329
12330 CEOF
12331 EOF
12332
12333 cat >> $CONFIG_STATUS <<\EOF
12334
12335 # Split the substitutions into bite-sized pieces for seds with
12336 # small command number limits, like on Digital OSF/1 and HP-UX.
12337 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12338 ac_file=1 # Number of current file.
12339 ac_beg=1 # First line for current file.
12340 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12341 ac_more_lines=:
12342 ac_sed_cmds=""
12343 while $ac_more_lines; do
12344   if test $ac_beg -gt 1; then
12345     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12346   else
12347     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12348   fi
12349   if test ! -s conftest.s$ac_file; then
12350     ac_more_lines=false
12351     rm -f conftest.s$ac_file
12352   else
12353     if test -z "$ac_sed_cmds"; then
12354       ac_sed_cmds="sed -f conftest.s$ac_file"
12355     else
12356       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12357     fi
12358     ac_file=`expr $ac_file + 1`
12359     ac_beg=$ac_end
12360     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12361   fi
12362 done
12363 if test -z "$ac_sed_cmds"; then
12364   ac_sed_cmds=cat
12365 fi
12366 EOF
12367
12368 cat >> $CONFIG_STATUS <<EOF
12369
12370 CONFIG_FILES=\${CONFIG_FILES-"\
12371 Makefile:build/top.mk:Makefile.in:build/dir.mk \
12372 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
12373 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
12374 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
12375 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
12376 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
12377 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
12378 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
12379 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
12380 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
12381 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
12382 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
12383 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
12384 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
12385 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
12386 include/Makefile:build/top.mk:include/Makefile.in \
12387 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
12388 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
12389 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12390 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
12391 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
12392 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
12393 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
12394 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
12395 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
12396 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
12397 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
12398 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
12399 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
12400 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
12401 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
12402 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
12403 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
12404 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
12405 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
12406 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
12407 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
12408 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
12409 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
12410 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
12411 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
12412 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
12413 "}
12414 EOF
12415 cat >> $CONFIG_STATUS <<\EOF
12416 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12417   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12418   case "$ac_file" in
12419   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12420        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12421   *) ac_file_in="${ac_file}.in" ;;
12422   esac
12423
12424   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12425
12426   # Remove last slash and all that follows it.  Not all systems have dirname.
12427   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12428   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12429     # The file is in a subdirectory.
12430     test ! -d "$ac_dir" && mkdir "$ac_dir"
12431     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12432     # A "../" for each directory in $ac_dir_suffix.
12433     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12434   else
12435     ac_dir_suffix= ac_dots=
12436   fi
12437
12438   case "$ac_given_srcdir" in
12439   .)  srcdir=.
12440       if test -z "$ac_dots"; then top_srcdir=.
12441       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12442   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12443   *) # Relative path.
12444     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12445     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12446   esac
12447
12448   case "$ac_given_INSTALL" in
12449   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12450   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12451   esac
12452
12453   echo creating "$ac_file"
12454   rm -f "$ac_file"
12455   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12456   case "$ac_file" in
12457   *Makefile*) ac_comsub="1i\\
12458 # $configure_input" ;;
12459   *) ac_comsub= ;;
12460   esac
12461
12462   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12463   sed -e "$ac_comsub
12464 s%@configure_input@%$configure_input%g
12465 s%@srcdir@%$srcdir%g
12466 s%@top_srcdir@%$top_srcdir%g
12467 s%@INSTALL@%$INSTALL%g
12468 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12469 fi; done
12470 rm -f conftest.s*
12471
12472 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12473 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12474 #
12475 # ac_d sets the value in "#define NAME VALUE" lines.
12476 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12477 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12478 ac_dC='\3'
12479 ac_dD='%g'
12480 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12481 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12482 ac_uB='\([      ]\)%\1#\2define\3'
12483 ac_uC=' '
12484 ac_uD='\4%g'
12485 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12486 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12487 ac_eB='$%\1#\2define\3'
12488 ac_eC=' '
12489 ac_eD='%g'
12490
12491 if test "${CONFIG_HEADERS+set}" != set; then
12492 EOF
12493 cat >> $CONFIG_STATUS <<EOF
12494   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
12495 EOF
12496 cat >> $CONFIG_STATUS <<\EOF
12497 fi
12498 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12499   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12500   case "$ac_file" in
12501   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12502        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12503   *) ac_file_in="${ac_file}.in" ;;
12504   esac
12505
12506   echo creating $ac_file
12507
12508   rm -f conftest.frag conftest.in conftest.out
12509   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12510   cat $ac_file_inputs > conftest.in
12511
12512 EOF
12513
12514 # Transform confdefs.h into a sed script conftest.vals that substitutes
12515 # the proper values into config.h.in to produce config.h.  And first:
12516 # Protect against being on the right side of a sed subst in config.status.
12517 # Protect against being in an unquoted here document in config.status.
12518 rm -f conftest.vals
12519 cat > conftest.hdr <<\EOF
12520 s/[\\&%]/\\&/g
12521 s%[\\$`]%\\&%g
12522 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12523 s%ac_d%ac_u%gp
12524 s%ac_u%ac_e%gp
12525 EOF
12526 sed -n -f conftest.hdr confdefs.h > conftest.vals
12527 rm -f conftest.hdr
12528
12529 # This sed command replaces #undef with comments.  This is necessary, for
12530 # example, in the case of _POSIX_SOURCE, which is predefined and required
12531 # on some systems where configure will not decide to define it.
12532 cat >> conftest.vals <<\EOF
12533 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12534 EOF
12535
12536 # Break up conftest.vals because some shells have a limit on
12537 # the size of here documents, and old seds have small limits too.
12538
12539 rm -f conftest.tail
12540 while :
12541 do
12542   ac_lines=`grep -c . conftest.vals`
12543   # grep -c gives empty output for an empty file on some AIX systems.
12544   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12545   # Write a limited-size here document to conftest.frag.
12546   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12547   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12548   echo 'CEOF
12549   sed -f conftest.frag conftest.in > conftest.out
12550   rm -f conftest.in
12551   mv conftest.out conftest.in
12552 ' >> $CONFIG_STATUS
12553   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12554   rm -f conftest.vals
12555   mv conftest.tail conftest.vals
12556 done
12557 rm -f conftest.vals
12558
12559 cat >> $CONFIG_STATUS <<\EOF
12560   rm -f conftest.frag conftest.h
12561   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12562   cat conftest.in >> conftest.h
12563   rm -f conftest.in
12564   if cmp -s $ac_file conftest.h 2>/dev/null; then
12565     echo "$ac_file is unchanged"
12566     rm -f conftest.h
12567   else
12568     # Remove last slash and all that follows it.  Not all systems have dirname.
12569       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12570       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12571       # The file is in a subdirectory.
12572       test ! -d "$ac_dir" && mkdir "$ac_dir"
12573     fi
12574     rm -f $ac_file
12575     mv conftest.h $ac_file
12576   fi
12577 fi; done
12578
12579 EOF
12580 cat >> $CONFIG_STATUS <<EOF
12581
12582 EOF
12583 cat >> $CONFIG_STATUS <<\EOF
12584
12585 date > stamp-h
12586 echo Please \"make depend\" to build dependencies
12587
12588 exit 0
12589 EOF
12590 chmod +x $CONFIG_STATUS
12591 rm -fr confdefs* $ac_clean_files
12592 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
12593