]> git.sur5r.net Git - openldap/blob - configure
Add basic gmodule detection for SLAPD_MODULES.
[openldap] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15 ac_help="$ac_help
16   --with-subdir=DIR change default subdirectory used for installs"
17 ac_help="$ac_help
18   --enable-debug        enable debugging (yes)"
19 ac_help="$ac_help
20   --enable-syslog       enable syslog support (auto)"
21 ac_help="$ac_help
22   --enable-proctitle    enable proctitle support (yes)"
23 ac_help="$ac_help
24   --enable-cache        enable caching (yes)"
25 ac_help="$ac_help
26   --enable-dns          enable V2 DNS  extension (no)"
27 ac_help="$ac_help
28   --enable-referrals    enable V2 Referrals extension (yes)"
29 ac_help="$ac_help
30   --enable-cldap        enable connectionless ldap (no)"
31 ac_help="$ac_help
32   --enable-x-compile    enable cross compiling (no)"
33 ac_help="$ac_help
34   --enable-dmalloc      enable debug malloc support (no)"
35 ac_help="$ac_help
36   --with-kerberos       with Kerberos support (auto)"
37 ac_help="$ac_help
38   --with-readline  with readline support (auto)"
39 ac_help="$ac_help
40   --with-threads        use threads (auto)"
41 ac_help="$ac_help
42   --with-tls  with TLS/SSL support (auto)"
43 ac_help="$ac_help
44   --with-yielding-select        with implicitly yielding select (auto)"
45 ac_help="$ac_help
46 LDAPD Options:"
47 ac_help="$ac_help
48   --enable-ldapd        enable building ldapd (no)"
49 ac_help="$ac_help
50 SLAPD Options:"
51 ac_help="$ac_help
52   --enable-slapd        enable building slapd (yes)"
53 ac_help="$ac_help
54     --enable-aclgroups  enable ACL group support (auto)"
55 ac_help="$ac_help
56     --enable-cleartext  enable cleartext passwords (yes)"
57 ac_help="$ac_help
58     --enable-crypt      enable crypt(3) passwords (auto)"
59 ac_help="$ac_help
60     --enable-modules    enable dynamic module support (no)"
61 ac_help="$ac_help
62     --enable-phonetic   enable phonetic/soundex (no)"
63 ac_help="$ac_help
64     --enable-rlookups   enable reverse lookups (auto)"
65 ac_help="$ac_help
66     --enable-wrappers   enable tcp wrapper support (no)"
67 ac_help="$ac_help
68     --enable-bdb2       enable bdb2 backend (no)"
69 ac_help="$ac_help
70     --enable-ldbm       enable ldbm backend (yes)"
71 ac_help="$ac_help
72       --with-ldbm-api   use LDBM API (auto)"
73 ac_help="$ac_help
74       --with-ldbm-type  use LDBM type (auto)"
75 ac_help="$ac_help
76     --enable-passwd     enable passwd backend (no)"
77 ac_help="$ac_help
78     --enable-perl       enable perl backend (no)"
79 ac_help="$ac_help
80     --enable-shell      enable shell backend (no)"
81 ac_help="$ac_help
82     --enable-tcl        enable tcl backend (no)"
83 ac_help="$ac_help
84 SLURPD Options:"
85 ac_help="$ac_help
86   --enable-slurpd       enable building slurpd (auto)"
87 ac_help="$ac_help
88 Library Generation & Linking Options"
89 ac_help="$ac_help
90   --enable-static         build static libraries [default=yes]
91   --enable-static=PKGS    only build shared libraries if the current package
92                           appears as an element in the PKGS list"
93 ac_help="$ac_help
94   --enable-shared         build shared libraries [default=yes]
95   --enable-shared=PKGS    only build shared libraries if the current package
96                           appears as an element in the PKGS list"
97 ac_help="$ac_help
98   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
99
100 # Initialize some variables set by options.
101 # The variables have the same names as the options, with
102 # dashes changed to underlines.
103 build=NONE
104 cache_file=./config.cache
105 exec_prefix=NONE
106 host=NONE
107 no_create=
108 nonopt=NONE
109 no_recursion=
110 prefix=NONE
111 program_prefix=NONE
112 program_suffix=NONE
113 program_transform_name=s,x,x,
114 silent=
115 site=
116 srcdir=
117 target=NONE
118 verbose=
119 x_includes=NONE
120 x_libraries=NONE
121 bindir='${exec_prefix}/bin'
122 sbindir='${exec_prefix}/sbin'
123 libexecdir='${exec_prefix}/libexec'
124 datadir='${prefix}/share'
125 sysconfdir='${prefix}/etc'
126 sharedstatedir='${prefix}/com'
127 localstatedir='${prefix}/var'
128 libdir='${exec_prefix}/lib'
129 includedir='${prefix}/include'
130 oldincludedir='/usr/include'
131 infodir='${prefix}/info'
132 mandir='${prefix}/man'
133
134 # Initialize some other variables.
135 subdirs=
136 MFLAGS= MAKEFLAGS=
137 SHELL=${CONFIG_SHELL-/bin/sh}
138 # Maximum number of lines to put in a shell here document.
139 ac_max_here_lines=12
140
141 ac_prev=
142 for ac_option
143 do
144
145   # If the previous option needs an argument, assign it.
146   if test -n "$ac_prev"; then
147     eval "$ac_prev=\$ac_option"
148     ac_prev=
149     continue
150   fi
151
152   case "$ac_option" in
153   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
154   *) ac_optarg= ;;
155   esac
156
157   # Accept the important Cygnus configure options, so we can diagnose typos.
158
159   case "$ac_option" in
160
161   -bindir | --bindir | --bindi | --bind | --bin | --bi)
162     ac_prev=bindir ;;
163   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
164     bindir="$ac_optarg" ;;
165
166   -build | --build | --buil | --bui | --bu)
167     ac_prev=build ;;
168   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
169     build="$ac_optarg" ;;
170
171   -cache-file | --cache-file | --cache-fil | --cache-fi \
172   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
173     ac_prev=cache_file ;;
174   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
175   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
176     cache_file="$ac_optarg" ;;
177
178   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
179     ac_prev=datadir ;;
180   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
181   | --da=*)
182     datadir="$ac_optarg" ;;
183
184   -disable-* | --disable-*)
185     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
186     # Reject names that are not valid shell variable names.
187     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
188       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
189     fi
190     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
191     eval "enable_${ac_feature}=no" ;;
192
193   -enable-* | --enable-*)
194     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
195     # Reject names that are not valid shell variable names.
196     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
197       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
198     fi
199     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
200     case "$ac_option" in
201       *=*) ;;
202       *) ac_optarg=yes ;;
203     esac
204     eval "enable_${ac_feature}='$ac_optarg'" ;;
205
206   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
207   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
208   | --exec | --exe | --ex)
209     ac_prev=exec_prefix ;;
210   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
211   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
212   | --exec=* | --exe=* | --ex=*)
213     exec_prefix="$ac_optarg" ;;
214
215   -gas | --gas | --ga | --g)
216     # Obsolete; use --with-gas.
217     with_gas=yes ;;
218
219   -help | --help | --hel | --he)
220     # Omit some internal or obsolete options to make the list less imposing.
221     # This message is too long to be a string in the A/UX 3.1 sh.
222     cat << EOF
223 Usage: configure [options] [host]
224 Options: [defaults in brackets after descriptions]
225 Configuration:
226   --cache-file=FILE       cache test results in FILE
227   --help                  print this message
228   --no-create             do not create output files
229   --quiet, --silent       do not print \`checking...' messages
230   --version               print the version of autoconf that created configure
231 Directory and file names:
232   --prefix=PREFIX         install architecture-independent files in PREFIX
233                           [$ac_default_prefix]
234   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
235                           [same as prefix]
236   --bindir=DIR            user executables in DIR [EPREFIX/bin]
237   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
238   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
239   --datadir=DIR           read-only architecture-independent data in DIR
240                           [PREFIX/share]
241   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
242   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
243                           [PREFIX/com]
244   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
245   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
246   --includedir=DIR        C header files in DIR [PREFIX/include]
247   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
248   --infodir=DIR           info documentation in DIR [PREFIX/info]
249   --mandir=DIR            man documentation in DIR [PREFIX/man]
250   --srcdir=DIR            find the sources in DIR [configure dir or ..]
251   --program-prefix=PREFIX prepend PREFIX to installed program names
252   --program-suffix=SUFFIX append SUFFIX to installed program names
253   --program-transform-name=PROGRAM
254                           run sed PROGRAM on installed program names
255 EOF
256     cat << EOF
257 Host type:
258   --build=BUILD           configure for building on BUILD [BUILD=HOST]
259   --host=HOST             configure for HOST [guessed]
260   --target=TARGET         configure for TARGET [TARGET=HOST]
261 Features and packages:
262   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
263   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
264   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
265   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
266   --x-includes=DIR        X include files are in DIR
267   --x-libraries=DIR       X library files are in DIR
268 EOF
269     if test -n "$ac_help"; then
270       echo "--enable and --with options recognized:$ac_help"
271     fi
272     exit 0 ;;
273
274   -host | --host | --hos | --ho)
275     ac_prev=host ;;
276   -host=* | --host=* | --hos=* | --ho=*)
277     host="$ac_optarg" ;;
278
279   -includedir | --includedir | --includedi | --included | --include \
280   | --includ | --inclu | --incl | --inc)
281     ac_prev=includedir ;;
282   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
283   | --includ=* | --inclu=* | --incl=* | --inc=*)
284     includedir="$ac_optarg" ;;
285
286   -infodir | --infodir | --infodi | --infod | --info | --inf)
287     ac_prev=infodir ;;
288   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
289     infodir="$ac_optarg" ;;
290
291   -libdir | --libdir | --libdi | --libd)
292     ac_prev=libdir ;;
293   -libdir=* | --libdir=* | --libdi=* | --libd=*)
294     libdir="$ac_optarg" ;;
295
296   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
297   | --libexe | --libex | --libe)
298     ac_prev=libexecdir ;;
299   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
300   | --libexe=* | --libex=* | --libe=*)
301     libexecdir="$ac_optarg" ;;
302
303   -localstatedir | --localstatedir | --localstatedi | --localstated \
304   | --localstate | --localstat | --localsta | --localst \
305   | --locals | --local | --loca | --loc | --lo)
306     ac_prev=localstatedir ;;
307   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
308   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
309   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
310     localstatedir="$ac_optarg" ;;
311
312   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
313     ac_prev=mandir ;;
314   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
315     mandir="$ac_optarg" ;;
316
317   -nfp | --nfp | --nf)
318     # Obsolete; use --without-fp.
319     with_fp=no ;;
320
321   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322   | --no-cr | --no-c)
323     no_create=yes ;;
324
325   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
326   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
327     no_recursion=yes ;;
328
329   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
330   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
331   | --oldin | --oldi | --old | --ol | --o)
332     ac_prev=oldincludedir ;;
333   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
334   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
335   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
336     oldincludedir="$ac_optarg" ;;
337
338   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
339     ac_prev=prefix ;;
340   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
341     prefix="$ac_optarg" ;;
342
343   -program-prefix | --program-prefix | --program-prefi | --program-pref \
344   | --program-pre | --program-pr | --program-p)
345     ac_prev=program_prefix ;;
346   -program-prefix=* | --program-prefix=* | --program-prefi=* \
347   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
348     program_prefix="$ac_optarg" ;;
349
350   -program-suffix | --program-suffix | --program-suffi | --program-suff \
351   | --program-suf | --program-su | --program-s)
352     ac_prev=program_suffix ;;
353   -program-suffix=* | --program-suffix=* | --program-suffi=* \
354   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
355     program_suffix="$ac_optarg" ;;
356
357   -program-transform-name | --program-transform-name \
358   | --program-transform-nam | --program-transform-na \
359   | --program-transform-n | --program-transform- \
360   | --program-transform | --program-transfor \
361   | --program-transfo | --program-transf \
362   | --program-trans | --program-tran \
363   | --progr-tra | --program-tr | --program-t)
364     ac_prev=program_transform_name ;;
365   -program-transform-name=* | --program-transform-name=* \
366   | --program-transform-nam=* | --program-transform-na=* \
367   | --program-transform-n=* | --program-transform-=* \
368   | --program-transform=* | --program-transfor=* \
369   | --program-transfo=* | --program-transf=* \
370   | --program-trans=* | --program-tran=* \
371   | --progr-tra=* | --program-tr=* | --program-t=*)
372     program_transform_name="$ac_optarg" ;;
373
374   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
375   | -silent | --silent | --silen | --sile | --sil)
376     silent=yes ;;
377
378   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
379     ac_prev=sbindir ;;
380   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
381   | --sbi=* | --sb=*)
382     sbindir="$ac_optarg" ;;
383
384   -sharedstatedir | --sharedstatedir | --sharedstatedi \
385   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
386   | --sharedst | --shareds | --shared | --share | --shar \
387   | --sha | --sh)
388     ac_prev=sharedstatedir ;;
389   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
390   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
391   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
392   | --sha=* | --sh=*)
393     sharedstatedir="$ac_optarg" ;;
394
395   -site | --site | --sit)
396     ac_prev=site ;;
397   -site=* | --site=* | --sit=*)
398     site="$ac_optarg" ;;
399
400   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
401     ac_prev=srcdir ;;
402   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
403     srcdir="$ac_optarg" ;;
404
405   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
406   | --syscon | --sysco | --sysc | --sys | --sy)
407     ac_prev=sysconfdir ;;
408   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
409   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
410     sysconfdir="$ac_optarg" ;;
411
412   -target | --target | --targe | --targ | --tar | --ta | --t)
413     ac_prev=target ;;
414   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
415     target="$ac_optarg" ;;
416
417   -v | -verbose | --verbose | --verbos | --verbo | --verb)
418     verbose=yes ;;
419
420   -version | --version | --versio | --versi | --vers)
421     echo "configure generated by autoconf version 2.13"
422     exit 0 ;;
423
424   -with-* | --with-*)
425     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
426     # Reject names that are not valid shell variable names.
427     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
428       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
429     fi
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case "$ac_option" in
432       *=*) ;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_${ac_package}='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
439     # Reject names that are not valid shell variable names.
440     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
441       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
442     fi
443     ac_package=`echo $ac_package| sed 's/-/_/g'`
444     eval "with_${ac_package}=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes="$ac_optarg" ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries="$ac_optarg" ;;
463
464   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
465     ;;
466
467   *)
468     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
469       echo "configure: warning: $ac_option: invalid host type" 1>&2
470     fi
471     if test "x$nonopt" != xNONE; then
472       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
473     fi
474     nonopt="$ac_option"
475     ;;
476
477   esac
478 done
479
480 if test -n "$ac_prev"; then
481   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
482 fi
483
484 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
485
486 # File descriptor usage:
487 # 0 standard input
488 # 1 file creation
489 # 2 errors and warnings
490 # 3 some systems may open it to /dev/tty
491 # 4 used on the Kubota Titan
492 # 6 checking for... messages and results
493 # 5 compiler messages saved in config.log
494 if test "$silent" = yes; then
495   exec 6>/dev/null
496 else
497   exec 6>&1
498 fi
499 exec 5>./config.log
500
501 echo "\
502 This file contains any messages produced by compilers while
503 running configure, to aid debugging if configure makes a mistake.
504 " 1>&5
505
506 # Strip out --no-create and --no-recursion so they do not pile up.
507 # Also quote any args containing shell metacharacters.
508 ac_configure_args=
509 for ac_arg
510 do
511   case "$ac_arg" in
512   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
513   | --no-cr | --no-c) ;;
514   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
515   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
516   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
517   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
518   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
519   esac
520 done
521
522 # NLS nuisances.
523 # Only set these to C if already set.  These must not be set unconditionally
524 # because not all systems understand e.g. LANG=C (notably SCO).
525 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
526 # Non-C LC_CTYPE values break the ctype check.
527 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
528 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
529 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
530 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
531
532 # confdefs.h avoids OS command line length limits that DEFS can exceed.
533 rm -rf conftest* confdefs.h
534 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
535 echo > confdefs.h
536
537 # A filename unique to this package, relative to the directory that
538 # configure is in, which we can look for to find out if srcdir is correct.
539 ac_unique_file=include/ldap.h
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
558   else
559     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
560   fi
561 fi
562 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
563
564 # Prefer explicitly selected file to automatically selected ones.
565 if test -z "$CONFIG_SITE"; then
566   if test "x$prefix" != xNONE; then
567     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
568   else
569     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
570   fi
571 fi
572 for ac_site_file in $CONFIG_SITE; do
573   if test -r "$ac_site_file"; then
574     echo "loading site script $ac_site_file"
575     . "$ac_site_file"
576   fi
577 done
578
579 if test -r "$cache_file"; then
580   echo "loading cache $cache_file"
581   . $cache_file
582 else
583   echo "creating cache $cache_file"
584   > $cache_file
585 fi
586
587 ac_ext=c
588 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
589 ac_cpp='$CPP $CPPFLAGS'
590 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
591 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
592 cross_compiling=$ac_cv_prog_cc_cross
593
594 ac_exeext=
595 ac_objext=o
596 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
597   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
598   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
599     ac_n= ac_c='
600 ' ac_t='        '
601   else
602     ac_n=-n ac_c= ac_t=
603   fi
604 else
605   ac_n= ac_c='\c' ac_t=
606 fi
607
608 ac_aux_dir=
609 for ac_dir in build $srcdir/build; do
610   if test -f $ac_dir/install-sh; then
611     ac_aux_dir=$ac_dir
612     ac_install_sh="$ac_aux_dir/install-sh -c"
613     break
614   elif test -f $ac_dir/install.sh; then
615     ac_aux_dir=$ac_dir
616     ac_install_sh="$ac_aux_dir/install.sh -c"
617     break
618   fi
619 done
620 if test -z "$ac_aux_dir"; then
621   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
622 fi
623 ac_config_guess=$ac_aux_dir/config.guess
624 ac_config_sub=$ac_aux_dir/config.sub
625 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
626 # Find a good install program.  We prefer a C program (faster),
627 # so one script is as good as another.  But avoid the broken or
628 # incompatible versions:
629 # SysV /etc/install, /usr/sbin/install
630 # SunOS /usr/etc/install
631 # IRIX /sbin/install
632 # AIX /bin/install
633 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
634 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
635 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
636 # ./install, which can be erroneously created by make from ./install.sh.
637 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
638 echo "configure:639: checking for a BSD compatible install" >&5
639 if test -z "$INSTALL"; then
640 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
641   echo $ac_n "(cached) $ac_c" 1>&6
642 else
643     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
644   for ac_dir in $PATH; do
645     # Account for people who put trailing slashes in PATH elements.
646     case "$ac_dir/" in
647     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
648     *)
649       # OSF1 and SCO ODT 3.0 have their own names for install.
650       # Don't use installbsd from OSF since it installs stuff as root
651       # by default.
652       for ac_prog in ginstall scoinst install; do
653         if test -f $ac_dir/$ac_prog; then
654           if test $ac_prog = install &&
655             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
656             # AIX install.  It has an incompatible calling convention.
657             :
658           else
659             ac_cv_path_install="$ac_dir/$ac_prog -c"
660             break 2
661           fi
662         fi
663       done
664       ;;
665     esac
666   done
667   IFS="$ac_save_IFS"
668
669 fi
670   if test "${ac_cv_path_install+set}" = set; then
671     INSTALL="$ac_cv_path_install"
672   else
673     # As a last resort, use the slow shell script.  We don't cache a
674     # path for INSTALL within a source directory, because that will
675     # break other packages using the cache if that directory is
676     # removed, or if the path is relative.
677     INSTALL="$ac_install_sh"
678   fi
679 fi
680 echo "$ac_t""$INSTALL" 1>&6
681
682 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
683 # It thinks the first close brace ends the variable substitution.
684 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
685
686 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
687
688 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
689
690 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
691 echo "configure:692: checking whether build environment is sane" >&5
692 # Just in case
693 sleep 1
694 echo timestamp > conftestfile
695 # Do `set' in a subshell so we don't clobber the current shell's
696 # arguments.  Must try -L first in case configure is actually a
697 # symlink; some systems play weird games with the mod time of symlinks
698 # (eg FreeBSD returns the mod time of the symlink's containing
699 # directory).
700 if (
701    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
702    if test "$*" = "X"; then
703       # -L didn't work.
704       set X `ls -t $srcdir/configure conftestfile`
705    fi
706    if test "$*" != "X $srcdir/configure conftestfile" \
707       && test "$*" != "X conftestfile $srcdir/configure"; then
708
709       # If neither matched, then we have a broken ls.  This can happen
710       # if, for instance, CONFIG_SHELL is bash and it inherits a
711       # broken ls alias from the environment.  This has actually
712       # happened.  Such a system could not be considered "sane".
713       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
714 alias in your environment" 1>&2; exit 1; }
715    fi
716
717    test "$2" = conftestfile
718    )
719 then
720    # Ok.
721    :
722 else
723    { echo "configure: error: newly created file is older than distributed files!
724 Check your system clock" 1>&2; exit 1; }
725 fi
726 rm -f conftest*
727 echo "$ac_t""yes" 1>&6
728 if test "$program_transform_name" = s,x,x,; then
729   program_transform_name=
730 else
731   # Double any \ or $.  echo might interpret backslashes.
732   cat <<\EOF_SED > conftestsed
733 s,\\,\\\\,g; s,\$,$$,g
734 EOF_SED
735   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
736   rm -f conftestsed
737 fi
738 test "$program_prefix" != NONE &&
739   program_transform_name="s,^,${program_prefix},; $program_transform_name"
740 # Use a double $ so make ignores it.
741 test "$program_suffix" != NONE &&
742   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
743
744 # sed with no file args requires a program.
745 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
746
747 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
748 echo "configure:749: checking whether ${MAKE-make} sets \${MAKE}" >&5
749 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
750 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
751   echo $ac_n "(cached) $ac_c" 1>&6
752 else
753   cat > conftestmake <<\EOF
754 all:
755         @echo 'ac_maketemp="${MAKE}"'
756 EOF
757 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
758 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
759 if test -n "$ac_maketemp"; then
760   eval ac_cv_prog_make_${ac_make}_set=yes
761 else
762   eval ac_cv_prog_make_${ac_make}_set=no
763 fi
764 rm -f conftestmake
765 fi
766 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
767   echo "$ac_t""yes" 1>&6
768   SET_MAKE=
769 else
770   echo "$ac_t""no" 1>&6
771   SET_MAKE="MAKE=${MAKE-make}"
772 fi
773
774
775 PACKAGE=OpenLDAP
776
777 VERSION=2.0-devel
778
779 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
780   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
781 fi
782
783
784
785 missing_dir=`cd $ac_aux_dir && pwd`
786 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
787 echo "configure:788: checking for working aclocal" >&5
788 # Run test in a subshell; some versions of sh will print an error if
789 # an executable is not found, even if stderr is redirected.
790 # Redirect stdin to placate older versions of autoconf.  Sigh.
791 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
792    ACLOCAL=aclocal
793    echo "$ac_t""found" 1>&6
794 else
795    ACLOCAL="$missing_dir/missing aclocal"
796    echo "$ac_t""missing" 1>&6
797 fi
798
799 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
800 echo "configure:801: checking for working autoconf" >&5
801 # Run test in a subshell; some versions of sh will print an error if
802 # an executable is not found, even if stderr is redirected.
803 # Redirect stdin to placate older versions of autoconf.  Sigh.
804 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
805    AUTOCONF=autoconf
806    echo "$ac_t""found" 1>&6
807 else
808    AUTOCONF="$missing_dir/missing autoconf"
809    echo "$ac_t""missing" 1>&6
810 fi
811
812 echo $ac_n "checking for working automake""... $ac_c" 1>&6
813 echo "configure:814: checking for working automake" >&5
814 # Run test in a subshell; some versions of sh will print an error if
815 # an executable is not found, even if stderr is redirected.
816 # Redirect stdin to placate older versions of autoconf.  Sigh.
817 if (automake --version) < /dev/null > /dev/null 2>&1; then
818    AUTOMAKE=automake
819    echo "$ac_t""found" 1>&6
820 else
821    AUTOMAKE="$missing_dir/missing automake"
822    echo "$ac_t""missing" 1>&6
823 fi
824
825 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
826 echo "configure:827: checking for working autoheader" >&5
827 # Run test in a subshell; some versions of sh will print an error if
828 # an executable is not found, even if stderr is redirected.
829 # Redirect stdin to placate older versions of autoconf.  Sigh.
830 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
831    AUTOHEADER=autoheader
832    echo "$ac_t""found" 1>&6
833 else
834    AUTOHEADER="$missing_dir/missing autoheader"
835    echo "$ac_t""missing" 1>&6
836 fi
837
838 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
839 echo "configure:840: checking for working makeinfo" >&5
840 # Run test in a subshell; some versions of sh will print an error if
841 # an executable is not found, even if stderr is redirected.
842 # Redirect stdin to placate older versions of autoconf.  Sigh.
843 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
844    MAKEINFO=makeinfo
845    echo "$ac_t""found" 1>&6
846 else
847    MAKEINFO="$missing_dir/missing makeinfo"
848    echo "$ac_t""missing" 1>&6
849 fi
850
851
852
853
854 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
855 echo "configure:856: checking configure arguments" >&5
856
857
858 top_builddir=`pwd`
859
860 ldap_subdir="openldap"
861
862 # Check whether --with-subdir or --without-subdir was given.
863 if test "${with_subdir+set}" = set; then
864   withval="$with_subdir"
865   
866         if test "$withval" = "no"; then
867                 ldap_subdir=""
868         elif test "$withval" != "yes"; then
869                 ldap_subdir="$withval"
870         fi
871
872 fi
873
874
875 # OpenLDAP --enable-debug
876         # Check whether --enable-debug or --disable-debug was given.
877 if test "${enable_debug+set}" = set; then
878   enableval="$enable_debug"
879   
880         ol_arg=invalid
881         for ol_val in auto yes no ; do
882                 if test "$enableval" = "$ol_val" ; then
883                         ol_arg="$ol_val"
884                 fi
885         done
886         if test "$ol_arg" = "invalid" ; then
887                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
888         fi
889         ol_enable_debug="$ol_arg"
890
891 else
892         ol_enable_debug="yes"
893 fi
894 # end --enable-debug
895 # OpenLDAP --enable-syslog
896         # Check whether --enable-syslog or --disable-syslog was given.
897 if test "${enable_syslog+set}" = set; then
898   enableval="$enable_syslog"
899   
900         ol_arg=invalid
901         for ol_val in auto yes no ; do
902                 if test "$enableval" = "$ol_val" ; then
903                         ol_arg="$ol_val"
904                 fi
905         done
906         if test "$ol_arg" = "invalid" ; then
907                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
908         fi
909         ol_enable_syslog="$ol_arg"
910
911 else
912         ol_enable_syslog="auto"
913 fi
914 # end --enable-syslog
915 # OpenLDAP --enable-proctitle
916         # Check whether --enable-proctitle or --disable-proctitle was given.
917 if test "${enable_proctitle+set}" = set; then
918   enableval="$enable_proctitle"
919   
920         ol_arg=invalid
921         for ol_val in auto yes no ; do
922                 if test "$enableval" = "$ol_val" ; then
923                         ol_arg="$ol_val"
924                 fi
925         done
926         if test "$ol_arg" = "invalid" ; then
927                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
928         fi
929         ol_enable_proctitle="$ol_arg"
930
931 else
932         ol_enable_proctitle="yes"
933 fi
934 # end --enable-proctitle
935 # OpenLDAP --enable-cache
936         # Check whether --enable-cache or --disable-cache was given.
937 if test "${enable_cache+set}" = set; then
938   enableval="$enable_cache"
939   
940         ol_arg=invalid
941         for ol_val in auto yes no ; do
942                 if test "$enableval" = "$ol_val" ; then
943                         ol_arg="$ol_val"
944                 fi
945         done
946         if test "$ol_arg" = "invalid" ; then
947                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
948         fi
949         ol_enable_cache="$ol_arg"
950
951 else
952         ol_enable_cache="yes"
953 fi
954 # end --enable-cache
955 # OpenLDAP --enable-dns
956         # Check whether --enable-dns or --disable-dns was given.
957 if test "${enable_dns+set}" = set; then
958   enableval="$enable_dns"
959   
960         ol_arg=invalid
961         for ol_val in auto yes no ; do
962                 if test "$enableval" = "$ol_val" ; then
963                         ol_arg="$ol_val"
964                 fi
965         done
966         if test "$ol_arg" = "invalid" ; then
967                 { echo "configure: error: bad value $enableval for --enable-dns" 1>&2; exit 1; }
968         fi
969         ol_enable_dns="$ol_arg"
970
971 else
972         ol_enable_dns="no"
973 fi
974 # end --enable-dns
975 # OpenLDAP --enable-referrals
976         # Check whether --enable-referrals or --disable-referrals was given.
977 if test "${enable_referrals+set}" = set; then
978   enableval="$enable_referrals"
979   
980         ol_arg=invalid
981         for ol_val in auto yes no ; do
982                 if test "$enableval" = "$ol_val" ; then
983                         ol_arg="$ol_val"
984                 fi
985         done
986         if test "$ol_arg" = "invalid" ; then
987                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
988         fi
989         ol_enable_referrals="$ol_arg"
990
991 else
992         ol_enable_referrals="yes"
993 fi
994 # end --enable-referrals
995 # OpenLDAP --enable-cldap
996         # Check whether --enable-cldap or --disable-cldap was given.
997 if test "${enable_cldap+set}" = set; then
998   enableval="$enable_cldap"
999   
1000         ol_arg=invalid
1001         for ol_val in auto yes no ; do
1002                 if test "$enableval" = "$ol_val" ; then
1003                         ol_arg="$ol_val"
1004                 fi
1005         done
1006         if test "$ol_arg" = "invalid" ; then
1007                 { echo "configure: error: bad value $enableval for --enable-cldap" 1>&2; exit 1; }
1008         fi
1009         ol_enable_cldap="$ol_arg"
1010
1011 else
1012         ol_enable_cldap="no"
1013 fi
1014 # end --enable-cldap
1015 # OpenLDAP --enable-x_compile
1016         # Check whether --enable-x_compile or --disable-x_compile was given.
1017 if test "${enable_x_compile+set}" = set; then
1018   enableval="$enable_x_compile"
1019   
1020         ol_arg=invalid
1021         for ol_val in yes no ; do
1022                 if test "$enableval" = "$ol_val" ; then
1023                         ol_arg="$ol_val"
1024                 fi
1025         done
1026         if test "$ol_arg" = "invalid" ; then
1027                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1028         fi
1029         ol_enable_x_compile="$ol_arg"
1030
1031 else
1032         ol_enable_x_compile="no"
1033 fi
1034 # end --enable-x_compile
1035
1036 # OpenLDAP --enable-dmalloc
1037         # Check whether --enable-dmalloc or --disable-dmalloc was given.
1038 if test "${enable_dmalloc+set}" = set; then
1039   enableval="$enable_dmalloc"
1040   
1041         ol_arg=invalid
1042         for ol_val in auto yes no ; do
1043                 if test "$enableval" = "$ol_val" ; then
1044                         ol_arg="$ol_val"
1045                 fi
1046         done
1047         if test "$ol_arg" = "invalid" ; then
1048                 { echo "configure: error: bad value $enableval for --enable-dmalloc" 1>&2; exit 1; }
1049         fi
1050         ol_enable_dmalloc="$ol_arg"
1051
1052 else
1053         ol_enable_dmalloc="no"
1054 fi
1055 # end --enable-dmalloc
1056
1057 # OpenLDAP --with-kerberos
1058         # Check whether --with-kerberos or --without-kerberos was given.
1059 if test "${with_kerberos+set}" = set; then
1060   withval="$with_kerberos"
1061   
1062         ol_arg=invalid
1063         for ol_val in auto k5 k4 afs yes no ; do
1064                 if test "$withval" = "$ol_val" ; then
1065                         ol_arg="$ol_val"
1066                 fi
1067         done
1068         if test "$ol_arg" = "invalid" ; then
1069                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1070         fi
1071         ol_with_kerberos="$ol_arg"
1072
1073 else
1074         ol_with_kerberos="auto"
1075 fi
1076 # end --with-kerberos
1077
1078 # OpenLDAP --with-readline
1079         # Check whether --with-readline or --without-readline was given.
1080 if test "${with_readline+set}" = set; then
1081   withval="$with_readline"
1082   
1083         ol_arg=invalid
1084         for ol_val in auto yes no  ; do
1085                 if test "$withval" = "$ol_val" ; then
1086                         ol_arg="$ol_val"
1087                 fi
1088         done
1089         if test "$ol_arg" = "invalid" ; then
1090                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1091         fi
1092         ol_with_readline="$ol_arg"
1093
1094 else
1095         ol_with_readline="auto"
1096 fi
1097 # end --with-readline
1098
1099 # OpenLDAP --with-threads
1100         # Check whether --with-threads or --without-threads was given.
1101 if test "${with_threads+set}" = set; then
1102   withval="$with_threads"
1103   
1104         ol_arg=invalid
1105         for ol_val in auto posix mach lwp yes no manual  ; do
1106                 if test "$withval" = "$ol_val" ; then
1107                         ol_arg="$ol_val"
1108                 fi
1109         done
1110         if test "$ol_arg" = "invalid" ; then
1111                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1112         fi
1113         ol_with_threads="$ol_arg"
1114
1115 else
1116         ol_with_threads="auto"
1117 fi
1118 # end --with-threads
1119
1120 # OpenLDAP --with-tls
1121         # Check whether --with-tls or --without-tls was given.
1122 if test "${with_tls+set}" = set; then
1123   withval="$with_tls"
1124   
1125         ol_arg=invalid
1126         for ol_val in auto ssleay openssl yes no  ; do
1127                 if test "$withval" = "$ol_val" ; then
1128                         ol_arg="$ol_val"
1129                 fi
1130         done
1131         if test "$ol_arg" = "invalid" ; then
1132                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1133         fi
1134         ol_with_tls="$ol_arg"
1135
1136 else
1137         ol_with_tls="auto"
1138 fi
1139 # end --with-tls
1140
1141 # OpenLDAP --with-yielding_select
1142         # Check whether --with-yielding_select or --without-yielding_select was given.
1143 if test "${with_yielding_select+set}" = set; then
1144   withval="$with_yielding_select"
1145   
1146         ol_arg=invalid
1147         for ol_val in auto yes no manual  ; do
1148                 if test "$withval" = "$ol_val" ; then
1149                         ol_arg="$ol_val"
1150                 fi
1151         done
1152         if test "$ol_arg" = "invalid" ; then
1153                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1154         fi
1155         ol_with_yielding_select="$ol_arg"
1156
1157 else
1158         ol_with_yielding_select="auto"
1159 fi
1160 # end --with-yielding_select
1161
1162
1163
1164 # Check whether --with-xxldapdoptions or --without-xxldapdoptions was given.
1165 if test "${with_xxldapdoptions+set}" = set; then
1166   withval="$with_xxldapdoptions"
1167   :
1168 fi
1169
1170 # OpenLDAP --enable-ldapd
1171         # Check whether --enable-ldapd or --disable-ldapd was given.
1172 if test "${enable_ldapd+set}" = set; then
1173   enableval="$enable_ldapd"
1174   
1175         ol_arg=invalid
1176         for ol_val in auto yes no ; do
1177                 if test "$enableval" = "$ol_val" ; then
1178                         ol_arg="$ol_val"
1179                 fi
1180         done
1181         if test "$ol_arg" = "invalid" ; then
1182                 { echo "configure: error: bad value $enableval for --enable-ldapd" 1>&2; exit 1; }
1183         fi
1184         ol_enable_ldapd="$ol_arg"
1185
1186 else
1187         ol_enable_ldapd="no"
1188 fi
1189 # end --enable-ldapd
1190
1191 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1192 if test "${with_xxslapdoptions+set}" = set; then
1193   withval="$with_xxslapdoptions"
1194   :
1195 fi
1196
1197 # OpenLDAP --enable-slapd
1198         # Check whether --enable-slapd or --disable-slapd was given.
1199 if test "${enable_slapd+set}" = set; then
1200   enableval="$enable_slapd"
1201   
1202         ol_arg=invalid
1203         for ol_val in auto yes no ; do
1204                 if test "$enableval" = "$ol_val" ; then
1205                         ol_arg="$ol_val"
1206                 fi
1207         done
1208         if test "$ol_arg" = "invalid" ; then
1209                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1210         fi
1211         ol_enable_slapd="$ol_arg"
1212
1213 else
1214         ol_enable_slapd="yes"
1215 fi
1216 # end --enable-slapd
1217 # OpenLDAP --enable-aclgroups
1218         # Check whether --enable-aclgroups or --disable-aclgroups was given.
1219 if test "${enable_aclgroups+set}" = set; then
1220   enableval="$enable_aclgroups"
1221   
1222         ol_arg=invalid
1223         for ol_val in auto yes no ; do
1224                 if test "$enableval" = "$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 $enableval for --enable-aclgroups" 1>&2; exit 1; }
1230         fi
1231         ol_enable_aclgroups="$ol_arg"
1232
1233 else
1234         ol_enable_aclgroups="auto"
1235 fi
1236 # end --enable-aclgroups
1237 # OpenLDAP --enable-cleartext
1238         # Check whether --enable-cleartext or --disable-cleartext was given.
1239 if test "${enable_cleartext+set}" = set; then
1240   enableval="$enable_cleartext"
1241   
1242         ol_arg=invalid
1243         for ol_val in auto yes no ; do
1244                 if test "$enableval" = "$ol_val" ; then
1245                         ol_arg="$ol_val"
1246                 fi
1247         done
1248         if test "$ol_arg" = "invalid" ; then
1249                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1250         fi
1251         ol_enable_cleartext="$ol_arg"
1252
1253 else
1254         ol_enable_cleartext="yes"
1255 fi
1256 # end --enable-cleartext
1257 # OpenLDAP --enable-crypt
1258         # Check whether --enable-crypt or --disable-crypt was given.
1259 if test "${enable_crypt+set}" = set; then
1260   enableval="$enable_crypt"
1261   
1262         ol_arg=invalid
1263         for ol_val in auto yes no ; do
1264                 if test "$enableval" = "$ol_val" ; then
1265                         ol_arg="$ol_val"
1266                 fi
1267         done
1268         if test "$ol_arg" = "invalid" ; then
1269                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1270         fi
1271         ol_enable_crypt="$ol_arg"
1272
1273 else
1274         ol_enable_crypt="auto"
1275 fi
1276 # end --enable-crypt
1277 # OpenLDAP --enable-modules
1278         # Check whether --enable-modules or --disable-modules was given.
1279 if test "${enable_modules+set}" = set; then
1280   enableval="$enable_modules"
1281   
1282         ol_arg=invalid
1283         for ol_val in auto yes no ; do
1284                 if test "$enableval" = "$ol_val" ; then
1285                         ol_arg="$ol_val"
1286                 fi
1287         done
1288         if test "$ol_arg" = "invalid" ; then
1289                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1290         fi
1291         ol_enable_modules="$ol_arg"
1292
1293 else
1294         ol_enable_modules="no"
1295 fi
1296 # end --enable-modules
1297 # OpenLDAP --enable-phonetic
1298         # Check whether --enable-phonetic or --disable-phonetic was given.
1299 if test "${enable_phonetic+set}" = set; then
1300   enableval="$enable_phonetic"
1301   
1302         ol_arg=invalid
1303         for ol_val in auto yes no ; do
1304                 if test "$enableval" = "$ol_val" ; then
1305                         ol_arg="$ol_val"
1306                 fi
1307         done
1308         if test "$ol_arg" = "invalid" ; then
1309                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1310         fi
1311         ol_enable_phonetic="$ol_arg"
1312
1313 else
1314         ol_enable_phonetic="no"
1315 fi
1316 # end --enable-phonetic
1317 # OpenLDAP --enable-rlookups
1318         # Check whether --enable-rlookups or --disable-rlookups was given.
1319 if test "${enable_rlookups+set}" = set; then
1320   enableval="$enable_rlookups"
1321   
1322         ol_arg=invalid
1323         for ol_val in auto yes no ; do
1324                 if test "$enableval" = "$ol_val" ; then
1325                         ol_arg="$ol_val"
1326                 fi
1327         done
1328         if test "$ol_arg" = "invalid" ; then
1329                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1330         fi
1331         ol_enable_rlookups="$ol_arg"
1332
1333 else
1334         ol_enable_rlookups="auto"
1335 fi
1336 # end --enable-rlookups
1337 # OpenLDAP --enable-wrappers
1338         # Check whether --enable-wrappers or --disable-wrappers was given.
1339 if test "${enable_wrappers+set}" = set; then
1340   enableval="$enable_wrappers"
1341   
1342         ol_arg=invalid
1343         for ol_val in auto yes no ; do
1344                 if test "$enableval" = "$ol_val" ; then
1345                         ol_arg="$ol_val"
1346                 fi
1347         done
1348         if test "$ol_arg" = "invalid" ; then
1349                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1350         fi
1351         ol_enable_wrappers="$ol_arg"
1352
1353 else
1354         ol_enable_wrappers="no"
1355 fi
1356 # end --enable-wrappers
1357
1358 # OpenLDAP --enable-bdb2
1359         # Check whether --enable-bdb2 or --disable-bdb2 was given.
1360 if test "${enable_bdb2+set}" = set; then
1361   enableval="$enable_bdb2"
1362   
1363         ol_arg=invalid
1364         for ol_val in auto yes no ; do
1365                 if test "$enableval" = "$ol_val" ; then
1366                         ol_arg="$ol_val"
1367                 fi
1368         done
1369         if test "$ol_arg" = "invalid" ; then
1370                 { echo "configure: error: bad value $enableval for --enable-bdb2" 1>&2; exit 1; }
1371         fi
1372         ol_enable_bdb2="$ol_arg"
1373
1374 else
1375         ol_enable_bdb2="no"
1376 fi
1377 # end --enable-bdb2
1378 # OpenLDAP --enable-ldbm
1379         # Check whether --enable-ldbm or --disable-ldbm was given.
1380 if test "${enable_ldbm+set}" = set; then
1381   enableval="$enable_ldbm"
1382   
1383         ol_arg=invalid
1384         for ol_val in auto yes no ; do
1385                 if test "$enableval" = "$ol_val" ; then
1386                         ol_arg="$ol_val"
1387                 fi
1388         done
1389         if test "$ol_arg" = "invalid" ; then
1390                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1391         fi
1392         ol_enable_ldbm="$ol_arg"
1393
1394 else
1395         ol_enable_ldbm="yes"
1396 fi
1397 # end --enable-ldbm
1398 # OpenLDAP --with-ldbm_api
1399         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1400 if test "${with_ldbm_api+set}" = set; then
1401   withval="$with_ldbm_api"
1402   
1403         ol_arg=invalid
1404         for ol_val in auto db2 db mdbm gdbm ndbm manual ; do
1405                 if test "$withval" = "$ol_val" ; then
1406                         ol_arg="$ol_val"
1407                 fi
1408         done
1409         if test "$ol_arg" = "invalid" ; then
1410                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1411         fi
1412         ol_with_ldbm_api="$ol_arg"
1413
1414 else
1415         ol_with_ldbm_api="auto"
1416 fi
1417 # end --with-ldbm_api
1418
1419 # OpenLDAP --with-ldbm_type
1420         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1421 if test "${with_ldbm_type+set}" = set; then
1422   withval="$with_ldbm_type"
1423   
1424         ol_arg=invalid
1425         for ol_val in auto btree hash ; do
1426                 if test "$withval" = "$ol_val" ; then
1427                         ol_arg="$ol_val"
1428                 fi
1429         done
1430         if test "$ol_arg" = "invalid" ; then
1431                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
1432         fi
1433         ol_with_ldbm_type="$ol_arg"
1434
1435 else
1436         ol_with_ldbm_type="auto"
1437 fi
1438 # end --with-ldbm_type
1439
1440
1441 # OpenLDAP --enable-passwd
1442         # Check whether --enable-passwd or --disable-passwd was given.
1443 if test "${enable_passwd+set}" = set; then
1444   enableval="$enable_passwd"
1445   
1446         ol_arg=invalid
1447         for ol_val in auto yes no ; do
1448                 if test "$enableval" = "$ol_val" ; then
1449                         ol_arg="$ol_val"
1450                 fi
1451         done
1452         if test "$ol_arg" = "invalid" ; then
1453                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
1454         fi
1455         ol_enable_passwd="$ol_arg"
1456
1457 else
1458         ol_enable_passwd="no"
1459 fi
1460 # end --enable-passwd
1461 # OpenLDAP --enable-perl
1462         # Check whether --enable-perl or --disable-perl was given.
1463 if test "${enable_perl+set}" = set; then
1464   enableval="$enable_perl"
1465   
1466         ol_arg=invalid
1467         for ol_val in auto yes no ; do
1468                 if test "$enableval" = "$ol_val" ; then
1469                         ol_arg="$ol_val"
1470                 fi
1471         done
1472         if test "$ol_arg" = "invalid" ; then
1473                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
1474         fi
1475         ol_enable_perl="$ol_arg"
1476
1477 else
1478         ol_enable_perl="no"
1479 fi
1480 # end --enable-perl
1481 # OpenLDAP --enable-shell
1482         # Check whether --enable-shell or --disable-shell was given.
1483 if test "${enable_shell+set}" = set; then
1484   enableval="$enable_shell"
1485   
1486         ol_arg=invalid
1487         for ol_val in auto yes no ; do
1488                 if test "$enableval" = "$ol_val" ; then
1489                         ol_arg="$ol_val"
1490                 fi
1491         done
1492         if test "$ol_arg" = "invalid" ; then
1493                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
1494         fi
1495         ol_enable_shell="$ol_arg"
1496
1497 else
1498         ol_enable_shell="no"
1499 fi
1500 # end --enable-shell
1501 # OpenLDAP --enable-tcl
1502         # Check whether --enable-tcl or --disable-tcl was given.
1503 if test "${enable_tcl+set}" = set; then
1504   enableval="$enable_tcl"
1505   
1506         ol_arg=invalid
1507         for ol_val in auto yes no ; do
1508                 if test "$enableval" = "$ol_val" ; then
1509                         ol_arg="$ol_val"
1510                 fi
1511         done
1512         if test "$ol_arg" = "invalid" ; then
1513                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
1514         fi
1515         ol_enable_tcl="$ol_arg"
1516
1517 else
1518         ol_enable_tcl="no"
1519 fi
1520 # end --enable-tcl
1521
1522 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
1523 if test "${with_xxslurpdoptions+set}" = set; then
1524   withval="$with_xxslurpdoptions"
1525   :
1526 fi
1527
1528 # OpenLDAP --enable-slurpd
1529         # Check whether --enable-slurpd or --disable-slurpd was given.
1530 if test "${enable_slurpd+set}" = set; then
1531   enableval="$enable_slurpd"
1532   
1533         ol_arg=invalid
1534         for ol_val in auto yes no ; do
1535                 if test "$enableval" = "$ol_val" ; then
1536                         ol_arg="$ol_val"
1537                 fi
1538         done
1539         if test "$ol_arg" = "invalid" ; then
1540                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
1541         fi
1542         ol_enable_slurpd="$ol_arg"
1543
1544 else
1545         ol_enable_slurpd="auto"
1546 fi
1547 # end --enable-slurpd
1548
1549 # Check whether --with-xxliboptions or --without-xxliboptions was given.
1550 if test "${with_xxliboptions+set}" = set; then
1551   withval="$with_xxliboptions"
1552   :
1553 fi
1554
1555 # Check whether --enable-static or --disable-static was given.
1556 if test "${enable_static+set}" = set; then
1557   enableval="$enable_static"
1558   p=${PACKAGE-default}
1559 case "$enableval" in
1560 yes) enable_static=yes ;;
1561 no) enable_static=no ;;
1562 *)
1563   enable_static=no
1564   # Look at the argument we got.  We use all the common list separators.
1565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1566   for pkg in $enableval; do
1567     if test "X$pkg" = "X$p"; then
1568       enable_static=yes
1569     fi
1570   done
1571   IFS="$ac_save_ifs"
1572   ;;
1573 esac
1574 else
1575   enable_static=yes
1576 fi
1577
1578 # Check whether --enable-shared or --disable-shared was given.
1579 if test "${enable_shared+set}" = set; then
1580   enableval="$enable_shared"
1581   p=${PACKAGE-default}
1582 case "$enableval" in
1583 yes) enable_shared=yes ;;
1584 no) enable_shared=no ;;
1585 *)
1586   enable_shared=no
1587   # Look at the argument we got.  We use all the common list separators.
1588   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1589   for pkg in $enableval; do
1590     if test "X$pkg" = "X$p"; then
1591       enable_shared=yes
1592     fi
1593   done
1594   IFS="$ac_save_ifs"
1595   ;;
1596 esac
1597 else
1598   enable_shared=yes
1599 fi
1600
1601
1602 # validate options
1603 if test $ol_enable_dns = yes ; then
1604         if test $ol_enable_referrals = no ; then
1605                 { echo "configure: error: DNS requires --enable-referrals" 1>&2; exit 1; }
1606         fi
1607         if test $ol_enable_referrals = auto ; then
1608                 echo "configure: warning: DNS requires referrals, adding --enable-referrals" 1>&2
1609                 ol_enable_referrals=yes
1610         fi
1611 fi
1612
1613 if test $ol_enable_slapd = no ; then
1614                 if test $ol_enable_bdb2 = yes ; then
1615                 echo "configure: warning: slapd disabled, ignoring --enable_bdb2 argument" 1>&2
1616         fi
1617         if test $ol_enable_ldbm = yes ; then
1618                 echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2
1619         fi
1620         if test $ol_enable_passwd = yes ; then
1621                 echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2
1622         fi
1623         if test $ol_enable_perl = yes ; then
1624                 echo "configure: warning: slapd disabled, ignoring --enable_perl argument" 1>&2
1625         fi
1626         if test $ol_enable_shell = yes ; then
1627                 echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2
1628         fi
1629         if test $ol_enable_tcl = yes ; then
1630                 echo "configure: warning: slapd disabled, ignoring --enable_tcl argument" 1>&2
1631         fi
1632         if test $ol_enable_aclgroups = yes ; then
1633                 echo "configure: warning: slapd disabled, ignoring --enable_aclgroups argument" 1>&2
1634         fi
1635         if test $ol_enable_modules = yes ; then
1636                 echo "configure: warning: slapd disabled, ignoring --enable_modules argument" 1>&2
1637         fi
1638         if test $ol_enable_wrappers = yes ; then
1639                 echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2
1640         fi
1641         if test $ol_enable_phonetic = yes ; then
1642                 echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2
1643         fi
1644         if test $ol_enable_rlookups = yes ; then
1645                 echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2
1646         fi
1647         if test $ol_with_ldbm_api != auto ; then
1648                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2
1649         fi
1650         if test $ol_with_ldbm_type != auto ; then
1651                 echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2
1652         fi
1653         if test $ol_enable_slurpd = yes ; then
1654                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
1655         fi
1656
1657         # force settings to no
1658         ol_enable_bdb2=no
1659         ol_enable_ldbm=no
1660         ol_enable_passwd=no
1661         ol_enable_perl=no
1662         ol_enable_shell=no
1663         ol_enable_tcl=no
1664
1665         ol_enable_aclgroups=no
1666         ol_enable_modules=no
1667         ol_enable_phonetic=no
1668         ol_enable_rlookups=no
1669         ol_enable_wrappers=no
1670
1671         ol_with_ldbm_api=no
1672         ol_with_ldbm_type=no
1673
1674         ol_enable_slurpd=no
1675
1676 elif test $ol_enable_ldbm = no ; then
1677         
1678         if test $ol_with_ldbm_api != auto ; then
1679                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2
1680         fi
1681
1682         if test $ol_with_ldbm_type != auto ; then
1683                 echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2
1684         fi
1685
1686         if test $ol_enable_bdb2 = yes ; then
1687                 { echo "configure: error: BDB2 requires --enable-ldbm" 1>&2; exit 1; }
1688         fi
1689
1690         if test $ol_enable_modules != yes -a \
1691                 $ol_enable_passwd = no -a \
1692                 $ol_enable_perl = no -a \
1693                 $ol_enable_shell = no -a \
1694                 $ol_enable_tcl = no ; then
1695                 { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
1696         fi
1697
1698         ol_with_ldbm_api=no
1699         ol_with_ldbm_type=no
1700
1701 elif test $ol_enable_bdb2 = yes ; then
1702         
1703         if test $ol_with_ldbm_api != auto -a \
1704                 $ol_with_ldbm_api != db2 ; then
1705                 { echo "configure: error: BDB2 requires LDBM API DB2" 1>&2; exit 1; }
1706         fi
1707
1708         ol_with_ldbm_api=db2
1709
1710 else
1711         
1712         if test $ol_enable_bdb2 != no ; then
1713                 if test $ol_with_ldbm_api != auto -a \
1714                         $ol_with_ldbm_api != db2 ; then
1715                         echo "configure: warning: BDB2 requires LDBM api db2 or auto" 1>&2
1716                         ol_enable_bdb2=no
1717                 fi
1718         fi
1719
1720         if test $ol_with_ldbm_api = gdbm -a \
1721                 $ol_with_ldbm_type = btree ; then
1722                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
1723         fi
1724         if test $ol_with_ldbm_api = mdbm -a \
1725                 $ol_with_ldbm_type = btree ; then
1726                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
1727         fi
1728         if test $ol_with_ldbm_api = ndbm -a \
1729                 $ol_with_ldbm_type = btree ; then
1730                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
1731         fi
1732 fi
1733
1734 if test $ol_enable_slurpd = yes ; then
1735                 if test $ol_with_threads = no ; then
1736                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
1737         fi
1738 fi
1739
1740 echo "$ac_t""done" 1>&6
1741
1742 ## Initialize vars
1743 LDAP_LIBS=
1744 LDBM_LIBS=
1745 LTHREAD_LIBS=
1746 LUTIL_LIBS=
1747
1748 LDAPD_LIBS=
1749 SLAPD_LIBS=
1750 SLURPD_LIBS=
1751
1752 BUILD_LDAPD=no
1753 BUILD_SLAPD=no
1754 BUILD_SLURPD=no
1755
1756 BUILD_BDB2=no
1757 BUILD_LDBM=no
1758 BUILD_PASSWD=no
1759 BUILD_PERL=no
1760 BUILD_SHELL=no
1761 BUILD_TCL=no
1762 BUILD_THREAD=no
1763
1764 SLAPD_MODULES_LDFLAGS=
1765 SLAPD_MODULES_CPPFLAGS=
1766
1767 SLAPD_PERL_LDFLAGS=
1768 SLAPD_PERL_CPPFLAGS=
1769
1770 KRB_LIBS=
1771 READLINE_LIBS=
1772 TERMCAP_LIBS=
1773 TLS_LIBS=
1774
1775
1776 # Find a good install program.  We prefer a C program (faster),
1777 # so one script is as good as another.  But avoid the broken or
1778 # incompatible versions:
1779 # SysV /etc/install, /usr/sbin/install
1780 # SunOS /usr/etc/install
1781 # IRIX /sbin/install
1782 # AIX /bin/install
1783 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1784 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1785 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1786 # ./install, which can be erroneously created by make from ./install.sh.
1787 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1788 echo "configure:1789: checking for a BSD compatible install" >&5
1789 if test -z "$INSTALL"; then
1790 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1791   echo $ac_n "(cached) $ac_c" 1>&6
1792 else
1793     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1794   for ac_dir in $PATH; do
1795     # Account for people who put trailing slashes in PATH elements.
1796     case "$ac_dir/" in
1797     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1798     *)
1799       # OSF1 and SCO ODT 3.0 have their own names for install.
1800       # Don't use installbsd from OSF since it installs stuff as root
1801       # by default.
1802       for ac_prog in ginstall scoinst install; do
1803         if test -f $ac_dir/$ac_prog; then
1804           if test $ac_prog = install &&
1805             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1806             # AIX install.  It has an incompatible calling convention.
1807             :
1808           else
1809             ac_cv_path_install="$ac_dir/$ac_prog -c"
1810             break 2
1811           fi
1812         fi
1813       done
1814       ;;
1815     esac
1816   done
1817   IFS="$ac_save_IFS"
1818
1819 fi
1820   if test "${ac_cv_path_install+set}" = set; then
1821     INSTALL="$ac_cv_path_install"
1822   else
1823     # As a last resort, use the slow shell script.  We don't cache a
1824     # path for INSTALL within a source directory, because that will
1825     # break other packages using the cache if that directory is
1826     # removed, or if the path is relative.
1827     INSTALL="$ac_install_sh"
1828   fi
1829 fi
1830 echo "$ac_t""$INSTALL" 1>&6
1831
1832 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1833 # It thinks the first close brace ends the variable substitution.
1834 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1835
1836 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1837
1838 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1839
1840
1841 CC=${CC-"cc"}
1842
1843
1844 # Make sure we can run config.sub.
1845 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1846 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1847 fi
1848
1849 echo $ac_n "checking host system type""... $ac_c" 1>&6
1850 echo "configure:1851: checking host system type" >&5
1851
1852 host_alias=$host
1853 case "$host_alias" in
1854 NONE)
1855   case $nonopt in
1856   NONE)
1857     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1858     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1859     fi ;;
1860   *) host_alias=$nonopt ;;
1861   esac ;;
1862 esac
1863
1864 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1865 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1866 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1867 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1868 echo "$ac_t""$host" 1>&6
1869
1870 # Extract the first word of "ranlib", so it can be a program name with args.
1871 set dummy ranlib; ac_word=$2
1872 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1873 echo "configure:1874: checking for $ac_word" >&5
1874 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1875   echo $ac_n "(cached) $ac_c" 1>&6
1876 else
1877   if test -n "$RANLIB"; then
1878   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1879 else
1880   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1881   ac_dummy="$PATH"
1882   for ac_dir in $ac_dummy; do
1883     test -z "$ac_dir" && ac_dir=.
1884     if test -f $ac_dir/$ac_word; then
1885       ac_cv_prog_RANLIB="ranlib"
1886       break
1887     fi
1888   done
1889   IFS="$ac_save_ifs"
1890   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1891 fi
1892 fi
1893 RANLIB="$ac_cv_prog_RANLIB"
1894 if test -n "$RANLIB"; then
1895   echo "$ac_t""$RANLIB" 1>&6
1896 else
1897   echo "$ac_t""no" 1>&6
1898 fi
1899
1900 # Extract the first word of "gcc", so it can be a program name with args.
1901 set dummy gcc; ac_word=$2
1902 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1903 echo "configure:1904: checking for $ac_word" >&5
1904 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1905   echo $ac_n "(cached) $ac_c" 1>&6
1906 else
1907   if test -n "$CC"; then
1908   ac_cv_prog_CC="$CC" # Let the user override the test.
1909 else
1910   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1911   ac_dummy="$PATH"
1912   for ac_dir in $ac_dummy; do
1913     test -z "$ac_dir" && ac_dir=.
1914     if test -f $ac_dir/$ac_word; then
1915       ac_cv_prog_CC="gcc"
1916       break
1917     fi
1918   done
1919   IFS="$ac_save_ifs"
1920 fi
1921 fi
1922 CC="$ac_cv_prog_CC"
1923 if test -n "$CC"; then
1924   echo "$ac_t""$CC" 1>&6
1925 else
1926   echo "$ac_t""no" 1>&6
1927 fi
1928
1929 if test -z "$CC"; then
1930   # Extract the first word of "cc", so it can be a program name with args.
1931 set dummy cc; ac_word=$2
1932 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1933 echo "configure:1934: checking for $ac_word" >&5
1934 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1935   echo $ac_n "(cached) $ac_c" 1>&6
1936 else
1937   if test -n "$CC"; then
1938   ac_cv_prog_CC="$CC" # Let the user override the test.
1939 else
1940   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1941   ac_prog_rejected=no
1942   ac_dummy="$PATH"
1943   for ac_dir in $ac_dummy; do
1944     test -z "$ac_dir" && ac_dir=.
1945     if test -f $ac_dir/$ac_word; then
1946       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1947         ac_prog_rejected=yes
1948         continue
1949       fi
1950       ac_cv_prog_CC="cc"
1951       break
1952     fi
1953   done
1954   IFS="$ac_save_ifs"
1955 if test $ac_prog_rejected = yes; then
1956   # We found a bogon in the path, so make sure we never use it.
1957   set dummy $ac_cv_prog_CC
1958   shift
1959   if test $# -gt 0; then
1960     # We chose a different compiler from the bogus one.
1961     # However, it has the same basename, so the bogon will be chosen
1962     # first if we set CC to just the basename; use the full file name.
1963     shift
1964     set dummy "$ac_dir/$ac_word" "$@"
1965     shift
1966     ac_cv_prog_CC="$@"
1967   fi
1968 fi
1969 fi
1970 fi
1971 CC="$ac_cv_prog_CC"
1972 if test -n "$CC"; then
1973   echo "$ac_t""$CC" 1>&6
1974 else
1975   echo "$ac_t""no" 1>&6
1976 fi
1977
1978   if test -z "$CC"; then
1979     case "`uname -s`" in
1980     *win32* | *WIN32*)
1981       # Extract the first word of "cl", so it can be a program name with args.
1982 set dummy cl; ac_word=$2
1983 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1984 echo "configure:1985: checking for $ac_word" >&5
1985 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1986   echo $ac_n "(cached) $ac_c" 1>&6
1987 else
1988   if test -n "$CC"; then
1989   ac_cv_prog_CC="$CC" # Let the user override the test.
1990 else
1991   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1992   ac_dummy="$PATH"
1993   for ac_dir in $ac_dummy; do
1994     test -z "$ac_dir" && ac_dir=.
1995     if test -f $ac_dir/$ac_word; then
1996       ac_cv_prog_CC="cl"
1997       break
1998     fi
1999   done
2000   IFS="$ac_save_ifs"
2001 fi
2002 fi
2003 CC="$ac_cv_prog_CC"
2004 if test -n "$CC"; then
2005   echo "$ac_t""$CC" 1>&6
2006 else
2007   echo "$ac_t""no" 1>&6
2008 fi
2009  ;;
2010     esac
2011   fi
2012   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2013 fi
2014
2015 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2016 echo "configure:2017: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2017
2018 ac_ext=c
2019 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2020 ac_cpp='$CPP $CPPFLAGS'
2021 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2022 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2023 cross_compiling=$ac_cv_prog_cc_cross
2024
2025 cat > conftest.$ac_ext << EOF
2026
2027 #line 2028 "configure"
2028 #include "confdefs.h"
2029
2030 main(){return(0);}
2031 EOF
2032 if { (eval echo configure:2033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2033   ac_cv_prog_cc_works=yes
2034   # If we can't run a trivial program, we are probably using a cross compiler.
2035   if (./conftest; exit) 2>/dev/null; then
2036     ac_cv_prog_cc_cross=no
2037   else
2038     ac_cv_prog_cc_cross=yes
2039   fi
2040 else
2041   echo "configure: failed program was:" >&5
2042   cat conftest.$ac_ext >&5
2043   ac_cv_prog_cc_works=no
2044 fi
2045 rm -fr conftest*
2046 ac_ext=c
2047 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2048 ac_cpp='$CPP $CPPFLAGS'
2049 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2050 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2051 cross_compiling=$ac_cv_prog_cc_cross
2052
2053 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2054 if test $ac_cv_prog_cc_works = no; then
2055   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2056 fi
2057 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2058 echo "configure:2059: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2059 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2060 cross_compiling=$ac_cv_prog_cc_cross
2061
2062 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2063 echo "configure:2064: checking whether we are using GNU C" >&5
2064 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2065   echo $ac_n "(cached) $ac_c" 1>&6
2066 else
2067   cat > conftest.c <<EOF
2068 #ifdef __GNUC__
2069   yes;
2070 #endif
2071 EOF
2072 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2073   ac_cv_prog_gcc=yes
2074 else
2075   ac_cv_prog_gcc=no
2076 fi
2077 fi
2078
2079 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2080
2081 if test $ac_cv_prog_gcc = yes; then
2082   GCC=yes
2083 else
2084   GCC=
2085 fi
2086
2087 ac_test_CFLAGS="${CFLAGS+set}"
2088 ac_save_CFLAGS="$CFLAGS"
2089 CFLAGS=
2090 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2091 echo "configure:2092: checking whether ${CC-cc} accepts -g" >&5
2092 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2093   echo $ac_n "(cached) $ac_c" 1>&6
2094 else
2095   echo 'void f(){}' > conftest.c
2096 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2097   ac_cv_prog_cc_g=yes
2098 else
2099   ac_cv_prog_cc_g=no
2100 fi
2101 rm -f conftest*
2102
2103 fi
2104
2105 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2106 if test "$ac_test_CFLAGS" = set; then
2107   CFLAGS="$ac_save_CFLAGS"
2108 elif test $ac_cv_prog_cc_g = yes; then
2109   if test "$GCC" = yes; then
2110     CFLAGS="-g -O2"
2111   else
2112     CFLAGS="-g"
2113   fi
2114 else
2115   if test "$GCC" = yes; then
2116     CFLAGS="-O2"
2117   else
2118     CFLAGS=
2119   fi
2120 fi
2121
2122 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2123 if test "${with_gnu_ld+set}" = set; then
2124   withval="$with_gnu_ld"
2125   test "$withval" = no || with_gnu_ld=yes
2126 else
2127   with_gnu_ld=no
2128 fi
2129
2130
2131 ac_prog=ld
2132 if test "$ac_cv_prog_gcc" = yes; then
2133   # Check if gcc -print-prog-name=ld gives a path.
2134   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2135 echo "configure:2136: checking for ld used by GCC" >&5
2136   ac_prog=`($CC -print-prog-name=ld) 2>&5`
2137   case "$ac_prog" in
2138   # Accept absolute paths.
2139   /* | A-Za-z:\\*)
2140     test -z "$LD" && LD="$ac_prog"
2141     ;;
2142   "")
2143     # If it fails, then pretend we aren't using GCC.
2144     ac_prog=ld
2145     ;;
2146   *)
2147     # If it is relative, then search for the first ld in PATH.
2148     with_gnu_ld=unknown
2149     ;;
2150   esac
2151 elif test "$with_gnu_ld" = yes; then
2152   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2153 echo "configure:2154: checking for GNU ld" >&5
2154 else
2155   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2156 echo "configure:2157: checking for non-GNU ld" >&5
2157 fi
2158 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2159   echo $ac_n "(cached) $ac_c" 1>&6
2160 else
2161   if test -z "$LD"; then
2162   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2163   for ac_dir in $PATH; do
2164     test -z "$ac_dir" && ac_dir=.
2165     if test -f "$ac_dir/$ac_prog"; then
2166       ac_cv_path_LD="$ac_dir/$ac_prog"
2167       # Check to see if the program is GNU ld.  I'd rather use --version,
2168       # but apparently some GNU ld's only accept -v.
2169       # Break only if it was the GNU/non-GNU ld that we prefer.
2170       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2171         test "$with_gnu_ld" != no && break
2172       else
2173         test "$with_gnu_ld" != yes && break
2174       fi
2175     fi
2176   done
2177   IFS="$ac_save_ifs"
2178 else
2179   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2180 fi
2181 fi
2182
2183 LD="$ac_cv_path_LD"
2184 if test -n "$LD"; then
2185   echo "$ac_t""$LD" 1>&6
2186 else
2187   echo "$ac_t""no" 1>&6
2188 fi
2189 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2190
2191 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2192 echo "configure:2193: checking if the linker ($LD) is GNU ld" >&5
2193 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2194   echo $ac_n "(cached) $ac_c" 1>&6
2195 else
2196   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2197 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2198   ac_cv_prog_gnu_ld=yes
2199 else
2200   ac_cv_prog_gnu_ld=no
2201 fi
2202 fi
2203
2204 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2205
2206
2207 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
2208 echo "configure:2209: checking for BSD-compatible nm" >&5
2209 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
2210   echo $ac_n "(cached) $ac_c" 1>&6
2211 else
2212   case "$NM" in
2213 /* | A-Za-z:\\*)
2214   ac_cv_path_NM="$NM" # Let the user override the test with a path.
2215   ;;
2216 *)
2217   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2218   for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
2219     test -z "$ac_dir" && ac_dir=.
2220     if test -f $ac_dir/nm; then
2221       # Check to see if the nm accepts a BSD-compat flag.
2222       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2223       #   nm: unknown option "B" ignored
2224       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2225         ac_cv_path_NM="$ac_dir/nm -B"
2226       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2227         ac_cv_path_NM="$ac_dir/nm -p"
2228       else
2229         ac_cv_path_NM="$ac_dir/nm"
2230       fi
2231       break
2232     fi
2233   done
2234   IFS="$ac_save_ifs"
2235   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
2236   ;;
2237 esac
2238 fi
2239
2240 NM="$ac_cv_path_NM"
2241 echo "$ac_t""$NM" 1>&6
2242
2243
2244 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2245 echo "configure:2246: checking whether ln -s works" >&5
2246 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2247   echo $ac_n "(cached) $ac_c" 1>&6
2248 else
2249   rm -f conftestdata
2250 if ln -s X conftestdata 2>/dev/null
2251 then
2252   rm -f conftestdata
2253   ac_cv_prog_LN_S="ln -s"
2254 else
2255   ac_cv_prog_LN_S=ln
2256 fi
2257 fi
2258 LN_S="$ac_cv_prog_LN_S"
2259 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2260   echo "$ac_t""yes" 1>&6
2261 else
2262   echo "$ac_t""no" 1>&6
2263 fi
2264
2265 # Always use our own libtool.
2266 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2267
2268 # Check for any special flags to pass to ltconfig.
2269 libtool_flags=
2270 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2271 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2272 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
2273 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
2274 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2275
2276 # Some flags need to be propagated to the compiler or linker for good
2277 # libtool support.
2278 case "$host" in
2279 *-*-irix6*)
2280   # Find out which ABI we are using.
2281   echo '#line 2282 "configure"' > conftest.$ac_ext
2282   if { (eval echo configure:2283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2283     case "`/usr/bin/file conftest.o`" in
2284     *32-bit*)
2285       LD="${LD-ld} -32"
2286       ;;
2287     *N32*)
2288       LD="${LD-ld} -n32"
2289       ;;
2290     *64-bit*)
2291       LD="${LD-ld} -64"
2292       ;;
2293     esac
2294   fi
2295   rm -rf conftest*
2296   ;;
2297
2298 *-*-sco3.2v5*)
2299   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2300   CFLAGS="$CFLAGS -belf"
2301   ;;
2302 esac
2303
2304 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
2305 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2306 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
2307 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
2308 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
2309 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2310
2311
2312 for ac_prog in mawk gawk nawk awk
2313 do
2314 # Extract the first word of "$ac_prog", so it can be a program name with args.
2315 set dummy $ac_prog; ac_word=$2
2316 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2317 echo "configure:2318: checking for $ac_word" >&5
2318 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2319   echo $ac_n "(cached) $ac_c" 1>&6
2320 else
2321   if test -n "$AWK"; then
2322   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2323 else
2324   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2325   ac_dummy="$PATH"
2326   for ac_dir in $ac_dummy; do
2327     test -z "$ac_dir" && ac_dir=.
2328     if test -f $ac_dir/$ac_word; then
2329       ac_cv_prog_AWK="$ac_prog"
2330       break
2331     fi
2332   done
2333   IFS="$ac_save_ifs"
2334 fi
2335 fi
2336 AWK="$ac_cv_prog_AWK"
2337 if test -n "$AWK"; then
2338   echo "$ac_t""$AWK" 1>&6
2339 else
2340   echo "$ac_t""no" 1>&6
2341 fi
2342
2343 test -n "$AWK" && break
2344 done
2345
2346 # test for ln hardlink support
2347 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
2348 echo "configure:2349: checking whether ln works" >&5
2349 if eval "test \"`echo '$''{'ol_cv_prog_LN_H'+set}'`\" = set"; then
2350   echo $ac_n "(cached) $ac_c" 1>&6
2351 else
2352   rm -f conftest.src conftest.dst
2353 echo "conftest" > conftest.src
2354 if ln conftest.src conftest.dst 2>/dev/null
2355 then
2356   ol_cv_prog_LN_H="ln"
2357 else
2358   ol_cv_prog_LN_H="cp"
2359 fi
2360 rm -f conftest.src conftest.dst
2361
2362 fi
2363 LN_H="$ol_cv_prog_LN_H"
2364 if test "$ol_cv_prog_LN_H" = "ln"; then
2365         echo "$ac_t""yes" 1>&6
2366 else
2367         echo "$ac_t""no" 1>&6
2368 fi
2369
2370 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2371 echo "configure:2372: checking whether ln -s works" >&5
2372 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2373   echo $ac_n "(cached) $ac_c" 1>&6
2374 else
2375   rm -f conftestdata
2376 if ln -s X conftestdata 2>/dev/null
2377 then
2378   rm -f conftestdata
2379   ac_cv_prog_LN_S="ln -s"
2380 else
2381   ac_cv_prog_LN_S=ln
2382 fi
2383 fi
2384 LN_S="$ac_cv_prog_LN_S"
2385 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2386   echo "$ac_t""yes" 1>&6
2387 else
2388   echo "$ac_t""no" 1>&6
2389 fi
2390
2391
2392 if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
2393         LN_S="$LN_H"
2394 fi
2395
2396 # Extract the first word of "sendmail", so it can be a program name with args.
2397 set dummy sendmail; ac_word=$2
2398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2399 echo "configure:2400: checking for $ac_word" >&5
2400 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2401   echo $ac_n "(cached) $ac_c" 1>&6
2402 else
2403   case "$SENDMAIL" in
2404   /*)
2405   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2406   ;;
2407   ?:/*)                  
2408   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
2409   ;;
2410   *)
2411   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2412   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
2413   for ac_dir in $ac_dummy; do 
2414     test -z "$ac_dir" && ac_dir=.
2415     if test -f $ac_dir/$ac_word; then
2416       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2417       break
2418     fi
2419   done
2420   IFS="$ac_save_ifs"
2421   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
2422   ;;
2423 esac
2424 fi
2425 SENDMAIL="$ac_cv_path_SENDMAIL"
2426 if test -n "$SENDMAIL"; then
2427   echo "$ac_t""$SENDMAIL" 1>&6
2428 else
2429   echo "$ac_t""no" 1>&6
2430 fi
2431
2432 # Extract the first word of "vi", so it can be a program name with args.
2433 set dummy vi; ac_word=$2
2434 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2435 echo "configure:2436: checking for $ac_word" >&5
2436 if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then
2437   echo $ac_n "(cached) $ac_c" 1>&6
2438 else
2439   case "$EDITOR" in
2440   /*)
2441   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
2442   ;;
2443   ?:/*)                  
2444   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
2445   ;;
2446   *)
2447   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2448   ac_dummy="$PATH:/usr/ucb"
2449   for ac_dir in $ac_dummy; do 
2450     test -z "$ac_dir" && ac_dir=.
2451     if test -f $ac_dir/$ac_word; then
2452       ac_cv_path_EDITOR="$ac_dir/$ac_word"
2453       break
2454     fi
2455   done
2456   IFS="$ac_save_ifs"
2457   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
2458   ;;
2459 esac
2460 fi
2461 EDITOR="$ac_cv_path_EDITOR"
2462 if test -n "$EDITOR"; then
2463   echo "$ac_t""$EDITOR" 1>&6
2464 else
2465   echo "$ac_t""no" 1>&6
2466 fi
2467
2468 # Extract the first word of "finger", so it can be a program name with args.
2469 set dummy finger; ac_word=$2
2470 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2471 echo "configure:2472: checking for $ac_word" >&5
2472 if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then
2473   echo $ac_n "(cached) $ac_c" 1>&6
2474 else
2475   case "$FINGER" in
2476   /*)
2477   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
2478   ;;
2479   ?:/*)                  
2480   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
2481   ;;
2482   *)
2483   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2484   ac_dummy="$PATH:/usr/ucb"
2485   for ac_dir in $ac_dummy; do 
2486     test -z "$ac_dir" && ac_dir=.
2487     if test -f $ac_dir/$ac_word; then
2488       ac_cv_path_FINGER="$ac_dir/$ac_word"
2489       break
2490     fi
2491   done
2492   IFS="$ac_save_ifs"
2493   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
2494   ;;
2495 esac
2496 fi
2497 FINGER="$ac_cv_path_FINGER"
2498 if test -n "$FINGER"; then
2499   echo "$ac_t""$FINGER" 1>&6
2500 else
2501   echo "$ac_t""no" 1>&6
2502 fi
2503
2504
2505 ol_link_modules=no
2506 if test $ol_enable_modules != no ; then
2507         # Extract the first word of "glib-config", so it can be a program name with args.
2508 set dummy glib-config; ac_word=$2
2509 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2510 echo "configure:2511: checking for $ac_word" >&5
2511 if eval "test \"`echo '$''{'ac_cv_path_GLIBCONFIG'+set}'`\" = set"; then
2512   echo $ac_n "(cached) $ac_c" 1>&6
2513 else
2514   case "$GLIBCONFIG" in
2515   /*)
2516   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a path.
2517   ;;
2518   ?:/*)                  
2519   ac_cv_path_GLIBCONFIG="$GLIBCONFIG" # Let the user override the test with a dos path.
2520   ;;
2521   *)
2522   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2523   ac_dummy="$PATH"
2524   for ac_dir in $ac_dummy; do 
2525     test -z "$ac_dir" && ac_dir=.
2526     if test -f $ac_dir/$ac_word; then
2527       ac_cv_path_GLIBCONFIG="$ac_dir/$ac_word"
2528       break
2529     fi
2530   done
2531   IFS="$ac_save_ifs"
2532   ;;
2533 esac
2534 fi
2535 GLIBCONFIG="$ac_cv_path_GLIBCONFIG"
2536 if test -n "$GLIBCONFIG"; then
2537   echo "$ac_t""$GLIBCONFIG" 1>&6
2538 else
2539   echo "$ac_t""no" 1>&6
2540 fi
2541
2542
2543         if test "no$GLIBCONFIG" = "no" ; then
2544                 if test $ol_enable_modules = yes ; then
2545                         { echo "configure: error: could not locate glib-config" 1>&2; exit 1; }
2546                 fi
2547
2548         else
2549                 SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
2550                 SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
2551                 SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
2552
2553                                 ol_link_modules=yes
2554         fi
2555 fi
2556
2557 ol_link_perl=no
2558 if test $ol_enable_perl != no ; then
2559         # Extract the first word of "perl", so it can be a program name with args.
2560 set dummy perl; ac_word=$2
2561 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2562 echo "configure:2563: checking for $ac_word" >&5
2563 if eval "test \"`echo '$''{'ac_cv_path_PERLBIN'+set}'`\" = set"; then
2564   echo $ac_n "(cached) $ac_c" 1>&6
2565 else
2566   case "$PERLBIN" in
2567   /*)
2568   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
2569   ;;
2570   ?:/*)                  
2571   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
2572   ;;
2573   *)
2574   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2575   ac_dummy="$PATH"
2576   for ac_dir in $ac_dummy; do 
2577     test -z "$ac_dir" && ac_dir=.
2578     if test -f $ac_dir/$ac_word; then
2579       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
2580       break
2581     fi
2582   done
2583   IFS="$ac_save_ifs"
2584   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
2585   ;;
2586 esac
2587 fi
2588 PERLBIN="$ac_cv_path_PERLBIN"
2589 if test -n "$PERLBIN"; then
2590   echo "$ac_t""$PERLBIN" 1>&6
2591 else
2592   echo "$ac_t""no" 1>&6
2593 fi
2594
2595
2596         if test "no$PERLBIN" = "no" ; then
2597                 if test $ol_enable_perl = yes ; then
2598                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
2599                 fi
2600
2601         else
2602                 SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
2603                 SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
2604
2605                                 ol_link_perl=yes
2606         fi
2607 fi
2608
2609 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2610 echo "configure:2611: checking how to run the C preprocessor" >&5
2611 # On Suns, sometimes $CPP names a directory.
2612 if test -n "$CPP" && test -d "$CPP"; then
2613   CPP=
2614 fi
2615 if test -z "$CPP"; then
2616 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2617   echo $ac_n "(cached) $ac_c" 1>&6
2618 else
2619     # This must be in double quotes, not single quotes, because CPP may get
2620   # substituted into the Makefile and "${CC-cc}" will confuse make.
2621   CPP="${CC-cc} -E"
2622   # On the NeXT, cc -E runs the code through the compiler's parser,
2623   # not just through cpp.
2624   cat > conftest.$ac_ext <<EOF
2625 #line 2626 "configure"
2626 #include "confdefs.h"
2627 #include <assert.h>
2628 Syntax Error
2629 EOF
2630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2631 { (eval echo configure:2632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2633 if test -z "$ac_err"; then
2634   :
2635 else
2636   echo "$ac_err" >&5
2637   echo "configure: failed program was:" >&5
2638   cat conftest.$ac_ext >&5
2639   rm -rf conftest*
2640   CPP="${CC-cc} -E -traditional-cpp"
2641   cat > conftest.$ac_ext <<EOF
2642 #line 2643 "configure"
2643 #include "confdefs.h"
2644 #include <assert.h>
2645 Syntax Error
2646 EOF
2647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2648 { (eval echo configure:2649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2650 if test -z "$ac_err"; then
2651   :
2652 else
2653   echo "$ac_err" >&5
2654   echo "configure: failed program was:" >&5
2655   cat conftest.$ac_ext >&5
2656   rm -rf conftest*
2657   CPP="${CC-cc} -nologo -E"
2658   cat > conftest.$ac_ext <<EOF
2659 #line 2660 "configure"
2660 #include "confdefs.h"
2661 #include <assert.h>
2662 Syntax Error
2663 EOF
2664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2665 { (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2667 if test -z "$ac_err"; then
2668   :
2669 else
2670   echo "$ac_err" >&5
2671   echo "configure: failed program was:" >&5
2672   cat conftest.$ac_ext >&5
2673   rm -rf conftest*
2674   CPP=/lib/cpp
2675 fi
2676 rm -f conftest*
2677 fi
2678 rm -f conftest*
2679 fi
2680 rm -f conftest*
2681   ac_cv_prog_CPP="$CPP"
2682 fi
2683   CPP="$ac_cv_prog_CPP"
2684 else
2685   ac_cv_prog_CPP="$CPP"
2686 fi
2687 echo "$ac_t""$CPP" 1>&6
2688
2689
2690 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
2691         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
2692
2693 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
2694         echo "configure: warning: programs compiled here do run here..." 1>&2
2695         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
2696
2697 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
2698         echo "configure: warning: programs compiled here do not run here..." 1>&2
2699         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
2700 fi
2701
2702 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2703 echo "configure:2704: checking for AIX" >&5
2704 cat > conftest.$ac_ext <<EOF
2705 #line 2706 "configure"
2706 #include "confdefs.h"
2707 #ifdef _AIX
2708   yes
2709 #endif
2710
2711 EOF
2712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2713   egrep "yes" >/dev/null 2>&1; then
2714   rm -rf conftest*
2715   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2716 #define _ALL_SOURCE 1
2717 EOF
2718
2719 else
2720   rm -rf conftest*
2721   echo "$ac_t""no" 1>&6
2722 fi
2723 rm -f conftest*
2724
2725
2726 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2727 echo "configure:2728: checking for POSIXized ISC" >&5
2728 if test -d /etc/conf/kconfig.d &&
2729   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2730 then
2731   echo "$ac_t""yes" 1>&6
2732   ISC=yes # If later tests want to check for ISC.
2733   cat >> confdefs.h <<\EOF
2734 #define _POSIX_SOURCE 1
2735 EOF
2736
2737   if test "$GCC" = yes; then
2738     CC="$CC -posix"
2739   else
2740     CC="$CC -Xp"
2741   fi
2742 else
2743   echo "$ac_t""no" 1>&6
2744   ISC=
2745 fi
2746
2747 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
2748 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
2749 echo "configure:2750: checking for minix/config.h" >&5
2750 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2751   echo $ac_n "(cached) $ac_c" 1>&6
2752 else
2753   cat > conftest.$ac_ext <<EOF
2754 #line 2755 "configure"
2755 #include "confdefs.h"
2756 #include <minix/config.h>
2757 EOF
2758 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2759 { (eval echo configure:2760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2760 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2761 if test -z "$ac_err"; then
2762   rm -rf conftest*
2763   eval "ac_cv_header_$ac_safe=yes"
2764 else
2765   echo "$ac_err" >&5
2766   echo "configure: failed program was:" >&5
2767   cat conftest.$ac_ext >&5
2768   rm -rf conftest*
2769   eval "ac_cv_header_$ac_safe=no"
2770 fi
2771 rm -f conftest*
2772 fi
2773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2774   echo "$ac_t""yes" 1>&6
2775   MINIX=yes
2776 else
2777   echo "$ac_t""no" 1>&6
2778 MINIX=
2779 fi
2780
2781 if test "$MINIX" = yes; then
2782   cat >> confdefs.h <<\EOF
2783 #define _POSIX_SOURCE 1
2784 EOF
2785
2786   cat >> confdefs.h <<\EOF
2787 #define _POSIX_1_SOURCE 2
2788 EOF
2789
2790   cat >> confdefs.h <<\EOF
2791 #define _MINIX 1
2792 EOF
2793
2794 fi
2795
2796
2797 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
2798 echo "configure:2799: checking for be_app in -lbe" >&5
2799 ac_lib_var=`echo be'_'be_app | sed 'y%./+-%__p_%'`
2800 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2801   echo $ac_n "(cached) $ac_c" 1>&6
2802 else
2803   ac_save_LIBS="$LIBS"
2804 LIBS="-lbe -lroot $LIBS"
2805 cat > conftest.$ac_ext <<EOF
2806 #line 2807 "configure"
2807 #include "confdefs.h"
2808 /* Override any gcc2 internal prototype to avoid an error.  */
2809 /* We use char because int might match the return type of a gcc2
2810     builtin and then its argument prototype would still apply.  */
2811 char be_app();
2812
2813 int main() {
2814 be_app()
2815 ; return 0; }
2816 EOF
2817 if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2818   rm -rf conftest*
2819   eval "ac_cv_lib_$ac_lib_var=yes"
2820 else
2821   echo "configure: failed program was:" >&5
2822   cat conftest.$ac_ext >&5
2823   rm -rf conftest*
2824   eval "ac_cv_lib_$ac_lib_var=no"
2825 fi
2826 rm -f conftest*
2827 LIBS="$ac_save_LIBS"
2828
2829 fi
2830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2831   echo "$ac_t""yes" 1>&6
2832   LIBS="$LIBS -lbe -lroot"
2833 else
2834   echo "$ac_t""no" 1>&6
2835 :
2836 fi
2837
2838
2839 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2840 echo "configure:2841: checking for Cygwin environment" >&5
2841 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2842   echo $ac_n "(cached) $ac_c" 1>&6
2843 else
2844   cat > conftest.$ac_ext <<EOF
2845 #line 2846 "configure"
2846 #include "confdefs.h"
2847
2848 int main() {
2849
2850 #ifndef __CYGWIN__
2851 #define __CYGWIN__ __CYGWIN32__
2852 #endif
2853 return __CYGWIN__;
2854 ; return 0; }
2855 EOF
2856 if { (eval echo configure:2857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2857   rm -rf conftest*
2858   ac_cv_cygwin=yes
2859 else
2860   echo "configure: failed program was:" >&5
2861   cat conftest.$ac_ext >&5
2862   rm -rf conftest*
2863   ac_cv_cygwin=no
2864 fi
2865 rm -f conftest*
2866 rm -f conftest*
2867 fi
2868
2869 echo "$ac_t""$ac_cv_cygwin" 1>&6
2870 CYGWIN=
2871 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2872 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2873 echo "configure:2874: checking for mingw32 environment" >&5
2874 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
2875   echo $ac_n "(cached) $ac_c" 1>&6
2876 else
2877   cat > conftest.$ac_ext <<EOF
2878 #line 2879 "configure"
2879 #include "confdefs.h"
2880
2881 int main() {
2882 return __MINGW32__;
2883 ; return 0; }
2884 EOF
2885 if { (eval echo configure:2886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2886   rm -rf conftest*
2887   ac_cv_mingw32=yes
2888 else
2889   echo "configure: failed program was:" >&5
2890   cat conftest.$ac_ext >&5
2891   rm -rf conftest*
2892   ac_cv_mingw32=no
2893 fi
2894 rm -f conftest*
2895 rm -f conftest*
2896 fi
2897
2898 echo "$ac_t""$ac_cv_mingw32" 1>&6
2899 MINGW32=
2900 test "$ac_cv_mingw32" = yes && MINGW32=yes
2901
2902
2903 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2904 echo "configure:2905: checking for executable suffix" >&5
2905 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2906   echo $ac_n "(cached) $ac_c" 1>&6
2907 else
2908   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2909   ac_cv_exeext=.exe
2910 else
2911   rm -f conftest*
2912   echo 'int main () { return 0; }' > conftest.$ac_ext
2913   ac_cv_exeext=
2914   if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2915     for file in conftest.*; do
2916       case $file in
2917       *.c | *.o | *.obj) ;;
2918       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2919       esac
2920     done
2921   else
2922     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2923   fi
2924   rm -f conftest*
2925   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2926 fi
2927 fi
2928
2929 EXEEXT=""
2930 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2931 echo "$ac_t""${ac_cv_exeext}" 1>&6
2932 ac_exeext=$EXEEXT
2933
2934 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2935 echo "configure:2936: checking for object suffix" >&5
2936 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2937   echo $ac_n "(cached) $ac_c" 1>&6
2938 else
2939   rm -f conftest*
2940 echo 'int i = 1;' > conftest.$ac_ext
2941 if { (eval echo configure:2942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2942   for ac_file in conftest.*; do
2943     case $ac_file in
2944     *.c) ;;
2945     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2946     esac
2947   done
2948 else
2949   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2950 fi
2951 rm -f conftest*
2952 fi
2953
2954 echo "$ac_t""$ac_cv_objext" 1>&6
2955 OBJEXT=$ac_cv_objext
2956 ac_objext=$ac_cv_objext
2957
2958
2959
2960
2961
2962 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2963 echo "configure:2964: checking for ${CC-cc} option to accept ANSI C" >&5
2964 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
2965   echo $ac_n "(cached) $ac_c" 1>&6
2966 else
2967   am_cv_prog_cc_stdc=no
2968 ac_save_CC="$CC"
2969 # Don't try gcc -ansi; that turns off useful extensions and
2970 # breaks some systems' header files.
2971 # AIX                   -qlanglvl=ansi
2972 # Ultrix and OSF/1      -std1
2973 # HP-UX                 -Aa -D_HPUX_SOURCE
2974 # SVR4                  -Xc -D__EXTENSIONS__
2975 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2976 do
2977   CC="$ac_save_CC $ac_arg"
2978   cat > conftest.$ac_ext <<EOF
2979 #line 2980 "configure"
2980 #include "confdefs.h"
2981 #include <stdarg.h>
2982 #include <stdio.h>
2983 #include <sys/types.h>
2984 #include <sys/stat.h>
2985 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2986 struct buf { int x; };
2987 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2988 static char *e (p, i)
2989      char **p;
2990      int i;
2991 {
2992   return p[i];
2993 }
2994 static char *f (char * (*g) (char **, int), char **p, ...)
2995 {
2996   char *s;
2997   va_list v;
2998   va_start (v,p);
2999   s = g (p, va_arg (v,int));
3000   va_end (v);
3001   return s;
3002 }
3003 int test (int i, double x);
3004 struct s1 {int (*f) (int a);};
3005 struct s2 {int (*f) (double a);};
3006 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3007 int argc;
3008 char **argv;
3009
3010 int main() {
3011
3012 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3013
3014 ; return 0; }
3015 EOF
3016 if { (eval echo configure:3017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3017   rm -rf conftest*
3018   am_cv_prog_cc_stdc="$ac_arg"; break
3019 else
3020   echo "configure: failed program was:" >&5
3021   cat conftest.$ac_ext >&5
3022 fi
3023 rm -f conftest*
3024 done
3025 CC="$ac_save_CC"
3026
3027 fi
3028
3029 if test -z "$am_cv_prog_cc_stdc"; then
3030   echo "$ac_t""none needed" 1>&6
3031 else
3032   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
3033 fi
3034 case "x$am_cv_prog_cc_stdc" in
3035   x|xno) ;;
3036   *) CC="$CC $am_cv_prog_cc_stdc" ;;
3037 esac
3038
3039 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
3040         { echo "configure: error: OpenLDAP requires compiler to support STDC prototypes." 1>&2; exit 1; }
3041 fi
3042
3043
3044
3045
3046 echo $ac_n "checking for socket""... $ac_c" 1>&6
3047 echo "configure:3048: checking for socket" >&5
3048 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
3049   echo $ac_n "(cached) $ac_c" 1>&6
3050 else
3051   cat > conftest.$ac_ext <<EOF
3052 #line 3053 "configure"
3053 #include "confdefs.h"
3054 /* System header to define __stub macros and hopefully few prototypes,
3055     which can conflict with char socket(); below.  */
3056 #include <assert.h>
3057 /* Override any gcc2 internal prototype to avoid an error.  */
3058 /* We use char because int might match the return type of a gcc2
3059     builtin and then its argument prototype would still apply.  */
3060 char socket();
3061
3062 int main() {
3063
3064 /* The GNU C library defines this for functions which it implements
3065     to always fail with ENOSYS.  Some functions are actually named
3066     something starting with __ and the normal name is an alias.  */
3067 #if defined (__stub_socket) || defined (__stub___socket)
3068 choke me
3069 #else
3070 socket();
3071 #endif
3072
3073 ; return 0; }
3074 EOF
3075 if { (eval echo configure:3076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3076   rm -rf conftest*
3077   eval "ac_cv_func_socket=yes"
3078 else
3079   echo "configure: failed program was:" >&5
3080   cat conftest.$ac_ext >&5
3081   rm -rf conftest*
3082   eval "ac_cv_func_socket=no"
3083 fi
3084 rm -f conftest*
3085 fi
3086
3087 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3088   echo "$ac_t""yes" 1>&6
3089   :
3090 else
3091   echo "$ac_t""no" 1>&6
3092         
3093         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3094 echo "configure:3095: checking for main in -lsocket" >&5
3095 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3096 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3097   echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099   ac_save_LIBS="$LIBS"
3100 LIBS="-lsocket  $LIBS"
3101 cat > conftest.$ac_ext <<EOF
3102 #line 3103 "configure"
3103 #include "confdefs.h"
3104
3105 int main() {
3106 main()
3107 ; return 0; }
3108 EOF
3109 if { (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3110   rm -rf conftest*
3111   eval "ac_cv_lib_$ac_lib_var=yes"
3112 else
3113   echo "configure: failed program was:" >&5
3114   cat conftest.$ac_ext >&5
3115   rm -rf conftest*
3116   eval "ac_cv_lib_$ac_lib_var=no"
3117 fi
3118 rm -f conftest*
3119 LIBS="$ac_save_LIBS"
3120
3121 fi
3122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3123   echo "$ac_t""yes" 1>&6
3124     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3125     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3126   cat >> confdefs.h <<EOF
3127 #define $ac_tr_lib 1
3128 EOF
3129
3130   LIBS="-lsocket $LIBS"
3131
3132 else
3133   echo "$ac_t""no" 1>&6
3134 fi
3135
3136         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
3137 echo "configure:3138: checking for main in -lnet" >&5
3138 ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'`
3139 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3140   echo $ac_n "(cached) $ac_c" 1>&6
3141 else
3142   ac_save_LIBS="$LIBS"
3143 LIBS="-lnet  $LIBS"
3144 cat > conftest.$ac_ext <<EOF
3145 #line 3146 "configure"
3146 #include "confdefs.h"
3147
3148 int main() {
3149 main()
3150 ; return 0; }
3151 EOF
3152 if { (eval echo configure:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3153   rm -rf conftest*
3154   eval "ac_cv_lib_$ac_lib_var=yes"
3155 else
3156   echo "configure: failed program was:" >&5
3157   cat conftest.$ac_ext >&5
3158   rm -rf conftest*
3159   eval "ac_cv_lib_$ac_lib_var=no"
3160 fi
3161 rm -f conftest*
3162 LIBS="$ac_save_LIBS"
3163
3164 fi
3165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3166   echo "$ac_t""yes" 1>&6
3167     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3168     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3169   cat >> confdefs.h <<EOF
3170 #define $ac_tr_lib 1
3171 EOF
3172
3173   LIBS="-lnet $LIBS"
3174
3175 else
3176   echo "$ac_t""no" 1>&6
3177 fi
3178
3179         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
3180 echo "configure:3181: checking for main in -lnsl_s" >&5
3181 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'`
3182 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3183   echo $ac_n "(cached) $ac_c" 1>&6
3184 else
3185   ac_save_LIBS="$LIBS"
3186 LIBS="-lnsl_s  $LIBS"
3187 cat > conftest.$ac_ext <<EOF
3188 #line 3189 "configure"
3189 #include "confdefs.h"
3190
3191 int main() {
3192 main()
3193 ; return 0; }
3194 EOF
3195 if { (eval echo configure:3196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3196   rm -rf conftest*
3197   eval "ac_cv_lib_$ac_lib_var=yes"
3198 else
3199   echo "configure: failed program was:" >&5
3200   cat conftest.$ac_ext >&5
3201   rm -rf conftest*
3202   eval "ac_cv_lib_$ac_lib_var=no"
3203 fi
3204 rm -f conftest*
3205 LIBS="$ac_save_LIBS"
3206
3207 fi
3208 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3209   echo "$ac_t""yes" 1>&6
3210     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3211     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3212   cat >> confdefs.h <<EOF
3213 #define $ac_tr_lib 1
3214 EOF
3215
3216   LIBS="-lnsl_s $LIBS"
3217
3218 else
3219   echo "$ac_t""no" 1>&6
3220 fi
3221
3222         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3223 echo "configure:3224: checking for main in -lnsl" >&5
3224 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3225 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3226   echo $ac_n "(cached) $ac_c" 1>&6
3227 else
3228   ac_save_LIBS="$LIBS"
3229 LIBS="-lnsl  $LIBS"
3230 cat > conftest.$ac_ext <<EOF
3231 #line 3232 "configure"
3232 #include "confdefs.h"
3233
3234 int main() {
3235 main()
3236 ; return 0; }
3237 EOF
3238 if { (eval echo configure:3239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3239   rm -rf conftest*
3240   eval "ac_cv_lib_$ac_lib_var=yes"
3241 else
3242   echo "configure: failed program was:" >&5
3243   cat conftest.$ac_ext >&5
3244   rm -rf conftest*
3245   eval "ac_cv_lib_$ac_lib_var=no"
3246 fi
3247 rm -f conftest*
3248 LIBS="$ac_save_LIBS"
3249
3250 fi
3251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3252   echo "$ac_t""yes" 1>&6
3253     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3254     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3255   cat >> confdefs.h <<EOF
3256 #define $ac_tr_lib 1
3257 EOF
3258
3259   LIBS="-lnsl $LIBS"
3260
3261 else
3262   echo "$ac_t""no" 1>&6
3263 fi
3264
3265         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
3266 echo "configure:3267: checking for socket in -linet" >&5
3267 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
3268 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3269   echo $ac_n "(cached) $ac_c" 1>&6
3270 else
3271   ac_save_LIBS="$LIBS"
3272 LIBS="-linet  $LIBS"
3273 cat > conftest.$ac_ext <<EOF
3274 #line 3275 "configure"
3275 #include "confdefs.h"
3276 /* Override any gcc2 internal prototype to avoid an error.  */
3277 /* We use char because int might match the return type of a gcc2
3278     builtin and then its argument prototype would still apply.  */
3279 char socket();
3280
3281 int main() {
3282 socket()
3283 ; return 0; }
3284 EOF
3285 if { (eval echo configure:3286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3286   rm -rf conftest*
3287   eval "ac_cv_lib_$ac_lib_var=yes"
3288 else
3289   echo "configure: failed program was:" >&5
3290   cat conftest.$ac_ext >&5
3291   rm -rf conftest*
3292   eval "ac_cv_lib_$ac_lib_var=no"
3293 fi
3294 rm -f conftest*
3295 LIBS="$ac_save_LIBS"
3296
3297 fi
3298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3299   echo "$ac_t""yes" 1>&6
3300     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3301     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3302   cat >> confdefs.h <<EOF
3303 #define $ac_tr_lib 1
3304 EOF
3305
3306   LIBS="-linet $LIBS"
3307
3308 else
3309   echo "$ac_t""no" 1>&6
3310 fi
3311
3312         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3313 echo "configure:3314: checking for main in -lgen" >&5
3314 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3315 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3316   echo $ac_n "(cached) $ac_c" 1>&6
3317 else
3318   ac_save_LIBS="$LIBS"
3319 LIBS="-lgen  $LIBS"
3320 cat > conftest.$ac_ext <<EOF
3321 #line 3322 "configure"
3322 #include "confdefs.h"
3323
3324 int main() {
3325 main()
3326 ; return 0; }
3327 EOF
3328 if { (eval echo configure:3329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3329   rm -rf conftest*
3330   eval "ac_cv_lib_$ac_lib_var=yes"
3331 else
3332   echo "configure: failed program was:" >&5
3333   cat conftest.$ac_ext >&5
3334   rm -rf conftest*
3335   eval "ac_cv_lib_$ac_lib_var=no"
3336 fi
3337 rm -f conftest*
3338 LIBS="$ac_save_LIBS"
3339
3340 fi
3341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3342   echo "$ac_t""yes" 1>&6
3343     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3344     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3345   cat >> confdefs.h <<EOF
3346 #define $ac_tr_lib 1
3347 EOF
3348
3349   LIBS="-lgen $LIBS"
3350
3351 else
3352   echo "$ac_t""no" 1>&6
3353 fi
3354
3355
3356 fi
3357
3358
3359 for ac_func in res_search
3360 do
3361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3362 echo "configure:3363: checking for $ac_func" >&5
3363 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3364   echo $ac_n "(cached) $ac_c" 1>&6
3365 else
3366   cat > conftest.$ac_ext <<EOF
3367 #line 3368 "configure"
3368 #include "confdefs.h"
3369 /* System header to define __stub macros and hopefully few prototypes,
3370     which can conflict with char $ac_func(); below.  */
3371 #include <assert.h>
3372 /* Override any gcc2 internal prototype to avoid an error.  */
3373 /* We use char because int might match the return type of a gcc2
3374     builtin and then its argument prototype would still apply.  */
3375 char $ac_func();
3376
3377 int main() {
3378
3379 /* The GNU C library defines this for functions which it implements
3380     to always fail with ENOSYS.  Some functions are actually named
3381     something starting with __ and the normal name is an alias.  */
3382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3383 choke me
3384 #else
3385 $ac_func();
3386 #endif
3387
3388 ; return 0; }
3389 EOF
3390 if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3391   rm -rf conftest*
3392   eval "ac_cv_func_$ac_func=yes"
3393 else
3394   echo "configure: failed program was:" >&5
3395   cat conftest.$ac_ext >&5
3396   rm -rf conftest*
3397   eval "ac_cv_func_$ac_func=no"
3398 fi
3399 rm -f conftest*
3400 fi
3401
3402 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3403   echo "$ac_t""yes" 1>&6
3404     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3405   cat >> confdefs.h <<EOF
3406 #define $ac_tr_func 1
3407 EOF
3408  
3409 else
3410   echo "$ac_t""no" 1>&6
3411 fi
3412 done
3413
3414 if test $ac_cv_func_res_search = "no" ; then 
3415         echo $ac_n "checking for res_search in -lbind""... $ac_c" 1>&6
3416 echo "configure:3417: checking for res_search in -lbind" >&5
3417 ac_lib_var=`echo bind'_'res_search | sed 'y%./+-%__p_%'`
3418 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3419   echo $ac_n "(cached) $ac_c" 1>&6
3420 else
3421   ac_save_LIBS="$LIBS"
3422 LIBS="-lbind  $LIBS"
3423 cat > conftest.$ac_ext <<EOF
3424 #line 3425 "configure"
3425 #include "confdefs.h"
3426 /* Override any gcc2 internal prototype to avoid an error.  */
3427 /* We use char because int might match the return type of a gcc2
3428     builtin and then its argument prototype would still apply.  */
3429 char res_search();
3430
3431 int main() {
3432 res_search()
3433 ; return 0; }
3434 EOF
3435 if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3436   rm -rf conftest*
3437   eval "ac_cv_lib_$ac_lib_var=yes"
3438 else
3439   echo "configure: failed program was:" >&5
3440   cat conftest.$ac_ext >&5
3441   rm -rf conftest*
3442   eval "ac_cv_lib_$ac_lib_var=no"
3443 fi
3444 rm -f conftest*
3445 LIBS="$ac_save_LIBS"
3446
3447 fi
3448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3449   echo "$ac_t""yes" 1>&6
3450     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3451     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3452   cat >> confdefs.h <<EOF
3453 #define $ac_tr_lib 1
3454 EOF
3455
3456   LIBS="-lbind $LIBS"
3457
3458 else
3459   echo "$ac_t""no" 1>&6
3460 fi
3461
3462         if test "$ac_cv_lib_bind_res_search" = "yes" ; then
3463                 cat >> confdefs.h <<\EOF
3464 #define HAVE_RES_SEARCH 1
3465 EOF
3466
3467         else
3468                 echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
3469 echo "configure:3470: checking for res_search in -lresolv" >&5
3470 ac_lib_var=`echo resolv'_'res_search | sed 'y%./+-%__p_%'`
3471 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3472   echo $ac_n "(cached) $ac_c" 1>&6
3473 else
3474   ac_save_LIBS="$LIBS"
3475 LIBS="-lresolv  $LIBS"
3476 cat > conftest.$ac_ext <<EOF
3477 #line 3478 "configure"
3478 #include "confdefs.h"
3479 /* Override any gcc2 internal prototype to avoid an error.  */
3480 /* We use char because int might match the return type of a gcc2
3481     builtin and then its argument prototype would still apply.  */
3482 char res_search();
3483
3484 int main() {
3485 res_search()
3486 ; return 0; }
3487 EOF
3488 if { (eval echo configure:3489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3489   rm -rf conftest*
3490   eval "ac_cv_lib_$ac_lib_var=yes"
3491 else
3492   echo "configure: failed program was:" >&5
3493   cat conftest.$ac_ext >&5
3494   rm -rf conftest*
3495   eval "ac_cv_lib_$ac_lib_var=no"
3496 fi
3497 rm -f conftest*
3498 LIBS="$ac_save_LIBS"
3499
3500 fi
3501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3502   echo "$ac_t""yes" 1>&6
3503     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3504     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3505   cat >> confdefs.h <<EOF
3506 #define $ac_tr_lib 1
3507 EOF
3508
3509   LIBS="-lresolv $LIBS"
3510
3511 else
3512   echo "$ac_t""no" 1>&6
3513 fi
3514
3515                 if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
3516                         cat >> confdefs.h <<\EOF
3517 #define HAVE_RES_SEARCH 1
3518 EOF
3519
3520                 fi
3521         fi
3522 fi
3523
3524 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
3525 echo "configure:3526: checking for sigset in -lV3" >&5
3526 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'`
3527 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3528   echo $ac_n "(cached) $ac_c" 1>&6
3529 else
3530   ac_save_LIBS="$LIBS"
3531 LIBS="-lV3  $LIBS"
3532 cat > conftest.$ac_ext <<EOF
3533 #line 3534 "configure"
3534 #include "confdefs.h"
3535 /* Override any gcc2 internal prototype to avoid an error.  */
3536 /* We use char because int might match the return type of a gcc2
3537     builtin and then its argument prototype would still apply.  */
3538 char sigset();
3539
3540 int main() {
3541 sigset()
3542 ; return 0; }
3543 EOF
3544 if { (eval echo configure:3545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3545   rm -rf conftest*
3546   eval "ac_cv_lib_$ac_lib_var=yes"
3547 else
3548   echo "configure: failed program was:" >&5
3549   cat conftest.$ac_ext >&5
3550   rm -rf conftest*
3551   eval "ac_cv_lib_$ac_lib_var=no"
3552 fi
3553 rm -f conftest*
3554 LIBS="$ac_save_LIBS"
3555
3556 fi
3557 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3558   echo "$ac_t""yes" 1>&6
3559     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3560     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3561   cat >> confdefs.h <<EOF
3562 #define $ac_tr_lib 1
3563 EOF
3564
3565   LIBS="-lV3 $LIBS"
3566
3567 else
3568   echo "$ac_t""no" 1>&6
3569 fi
3570
3571
3572 echo $ac_n "checking for select""... $ac_c" 1>&6
3573 echo "configure:3574: checking for select" >&5
3574 if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
3575   echo $ac_n "(cached) $ac_c" 1>&6
3576 else
3577   cat > conftest.$ac_ext <<EOF
3578 #line 3579 "configure"
3579 #include "confdefs.h"
3580 /* System header to define __stub macros and hopefully few prototypes,
3581     which can conflict with char select(); below.  */
3582 #include <assert.h>
3583 /* Override any gcc2 internal prototype to avoid an error.  */
3584 /* We use char because int might match the return type of a gcc2
3585     builtin and then its argument prototype would still apply.  */
3586 char select();
3587
3588 int main() {
3589
3590 /* The GNU C library defines this for functions which it implements
3591     to always fail with ENOSYS.  Some functions are actually named
3592     something starting with __ and the normal name is an alias.  */
3593 #if defined (__stub_select) || defined (__stub___select)
3594 choke me
3595 #else
3596 select();
3597 #endif
3598
3599 ; return 0; }
3600 EOF
3601 if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3602   rm -rf conftest*
3603   eval "ac_cv_func_select=yes"
3604 else
3605   echo "configure: failed program was:" >&5
3606   cat conftest.$ac_ext >&5
3607   rm -rf conftest*
3608   eval "ac_cv_func_select=no"
3609 fi
3610 rm -f conftest*
3611 fi
3612
3613 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
3614   echo "$ac_t""yes" 1>&6
3615   :
3616 else
3617   echo "$ac_t""no" 1>&6
3618 { echo "configure: error: select() required." 1>&2; exit 1; }
3619 fi
3620
3621
3622 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
3623 echo "configure:3624: checking types of arguments for select()" >&5
3624  if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
3625   echo $ac_n "(cached) $ac_c" 1>&6
3626 else
3627    if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then
3628   echo $ac_n "(cached) $ac_c" 1>&6
3629 else
3630     if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then
3631   echo $ac_n "(cached) $ac_c" 1>&6
3632 else
3633      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
3634      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
3635       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
3636        cat > conftest.$ac_ext <<EOF
3637 #line 3638 "configure"
3638 #include "confdefs.h"
3639 #ifdef HAVE_SYS_TYPES_H
3640 #include <sys/types.h>
3641 #endif
3642 #ifdef HAVE_SYS_TIME_H
3643 #include <sys/time.h>
3644 #endif
3645 #ifdef HAVE_SYS_SELECT_H
3646 #include <sys/select.h>
3647 #endif
3648 #ifdef HAVE_SYS_SOCKET_H
3649 #include <sys/socket.h>
3650 #endif
3651 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);
3652 int main() {
3653
3654 ; return 0; }
3655 EOF
3656 if { (eval echo configure:3657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3657   rm -rf conftest*
3658           ac_not_found=no ; break 3
3659 else
3660   echo "configure: failed program was:" >&5
3661   cat conftest.$ac_ext >&5
3662   rm -rf conftest*
3663   ac_not_found=yes
3664 fi
3665 rm -f conftest*
3666       done
3667      done
3668     done
3669    
3670 fi
3671   
3672 fi
3673  
3674 fi
3675  if test "$ac_not_found" = yes; then
3676   ac_cv_func_select_arg1=int 
3677   ac_cv_func_select_arg234='int *' 
3678   ac_cv_func_select_arg5='struct timeval *'
3679  fi
3680  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
3681  cat >> confdefs.h <<EOF
3682 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
3683 EOF
3684
3685  cat >> confdefs.h <<EOF
3686 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
3687 EOF
3688
3689  cat >> confdefs.h <<EOF
3690 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
3691 EOF
3692
3693
3694
3695 # ISODE tests
3696 ol_link_isode=no
3697 if test $ol_enable_ldapd != no ; then
3698                 echo $ac_n "checking for main in -lxtpp""... $ac_c" 1>&6
3699 echo "configure:3700: checking for main in -lxtpp" >&5
3700 ac_lib_var=`echo xtpp'_'main | sed 'y%./+-%__p_%'`
3701 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3702   echo $ac_n "(cached) $ac_c" 1>&6
3703 else
3704   ac_save_LIBS="$LIBS"
3705 LIBS="-lxtpp -lxtdsap -lxtisode -losi $LIBS"
3706 cat > conftest.$ac_ext <<EOF
3707 #line 3708 "configure"
3708 #include "confdefs.h"
3709
3710 int main() {
3711 main()
3712 ; return 0; }
3713 EOF
3714 if { (eval echo configure:3715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3715   rm -rf conftest*
3716   eval "ac_cv_lib_$ac_lib_var=yes"
3717 else
3718   echo "configure: failed program was:" >&5
3719   cat conftest.$ac_ext >&5
3720   rm -rf conftest*
3721   eval "ac_cv_lib_$ac_lib_var=no"
3722 fi
3723 rm -f conftest*
3724 LIBS="$ac_save_LIBS"
3725
3726 fi
3727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3728   echo "$ac_t""yes" 1>&6
3729   
3730                 ol_link_isode=yes
3731                 cat >> confdefs.h <<\EOF
3732 #define HAVE_XTPP 1
3733 EOF
3734
3735                 LDAPD_LIBS="$LDAPD_LIBS -lxtpp -lxtdsap -lxtisode -losi"
3736                 
3737 else
3738   echo "$ac_t""no" 1>&6
3739 :
3740 fi
3741
3742         echo $ac_n "checking for main in -ldsap""... $ac_c" 1>&6
3743 echo "configure:3744: checking for main in -ldsap" >&5
3744 ac_lib_var=`echo dsap'_'main | sed 'y%./+-%__p_%'`
3745 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3746   echo $ac_n "(cached) $ac_c" 1>&6
3747 else
3748   ac_save_LIBS="$LIBS"
3749 LIBS="-ldsap -lisode $LIBS"
3750 cat > conftest.$ac_ext <<EOF
3751 #line 3752 "configure"
3752 #include "confdefs.h"
3753
3754 int main() {
3755 main()
3756 ; return 0; }
3757 EOF
3758 if { (eval echo configure:3759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3759   rm -rf conftest*
3760   eval "ac_cv_lib_$ac_lib_var=yes"
3761 else
3762   echo "configure: failed program was:" >&5
3763   cat conftest.$ac_ext >&5
3764   rm -rf conftest*
3765   eval "ac_cv_lib_$ac_lib_var=no"
3766 fi
3767 rm -f conftest*
3768 LIBS="$ac_save_LIBS"
3769
3770 fi
3771 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3772   echo "$ac_t""yes" 1>&6
3773   
3774                 ol_link_isode=yes
3775                 cat >> confdefs.h <<\EOF
3776 #define HAVE_DSAP 1
3777 EOF
3778
3779                 LDAPD_LIBS="$LDAPD_LIBS -ldsap"
3780                 
3781 else
3782   echo "$ac_t""no" 1>&6
3783 :
3784 fi
3785
3786         echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
3787 echo "configure:3788: checking for main in -lisode" >&5
3788 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
3789 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3790   echo $ac_n "(cached) $ac_c" 1>&6
3791 else
3792   ac_save_LIBS="$LIBS"
3793 LIBS="-lisode  $LIBS"
3794 cat > conftest.$ac_ext <<EOF
3795 #line 3796 "configure"
3796 #include "confdefs.h"
3797
3798 int main() {
3799 main()
3800 ; return 0; }
3801 EOF
3802 if { (eval echo configure:3803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3803   rm -rf conftest*
3804   eval "ac_cv_lib_$ac_lib_var=yes"
3805 else
3806   echo "configure: failed program was:" >&5
3807   cat conftest.$ac_ext >&5
3808   rm -rf conftest*
3809   eval "ac_cv_lib_$ac_lib_var=no"
3810 fi
3811 rm -f conftest*
3812 LIBS="$ac_save_LIBS"
3813
3814 fi
3815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3816   echo "$ac_t""yes" 1>&6
3817   
3818                 ol_link_isode=yes
3819                 cat >> confdefs.h <<\EOF
3820 #define HAVE_ISODE 1
3821 EOF
3822
3823                 LDAPD_LIBS="$LDAPD_LIBS -lisode"
3824                 
3825 else
3826   echo "$ac_t""no" 1>&6
3827 :
3828 fi
3829
3830 fi
3831
3832 if test $ol_link_isode != no; then
3833         echo $ac_n "checking for main in -lpp""... $ac_c" 1>&6
3834 echo "configure:3835: checking for main in -lpp" >&5
3835 ac_lib_var=`echo pp'_'main | sed 'y%./+-%__p_%'`
3836 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3837   echo $ac_n "(cached) $ac_c" 1>&6
3838 else
3839   ac_save_LIBS="$LIBS"
3840 LIBS="-lpp  $LIBS"
3841 cat > conftest.$ac_ext <<EOF
3842 #line 3843 "configure"
3843 #include "confdefs.h"
3844
3845 int main() {
3846 main()
3847 ; return 0; }
3848 EOF
3849 if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3850   rm -rf conftest*
3851   eval "ac_cv_lib_$ac_lib_var=yes"
3852 else
3853   echo "configure: failed program was:" >&5
3854   cat conftest.$ac_ext >&5
3855   rm -rf conftest*
3856   eval "ac_cv_lib_$ac_lib_var=no"
3857 fi
3858 rm -f conftest*
3859 LIBS="$ac_save_LIBS"
3860
3861 fi
3862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3863   echo "$ac_t""yes" 1>&6
3864   
3865                 cat >> confdefs.h <<\EOF
3866 #define HAVE_PP 1
3867 EOF
3868
3869                 LDAPD_LIBS="-lpp $LDAPD_LIBS"
3870                 
3871 else
3872   echo "$ac_t""no" 1>&6
3873 :
3874 fi
3875
3876
3877         # Extract the first word of "pepsy", so it can be a program name with args.
3878 set dummy pepsy; ac_word=$2
3879 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3880 echo "configure:3881: checking for $ac_word" >&5
3881 if eval "test \"`echo '$''{'ac_cv_path_PEPSY'+set}'`\" = set"; then
3882   echo $ac_n "(cached) $ac_c" 1>&6
3883 else
3884   case "$PEPSY" in
3885   /*)
3886   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a path.
3887   ;;
3888   ?:/*)                  
3889   ac_cv_path_PEPSY="$PEPSY" # Let the user override the test with a dos path.
3890   ;;
3891   *)
3892   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3893   ac_dummy="$PATH"
3894   for ac_dir in $ac_dummy; do 
3895     test -z "$ac_dir" && ac_dir=.
3896     if test -f $ac_dir/$ac_word; then
3897       ac_cv_path_PEPSY="$ac_dir/$ac_word"
3898       break
3899     fi
3900   done
3901   IFS="$ac_save_ifs"
3902   ;;
3903 esac
3904 fi
3905 PEPSY="$ac_cv_path_PEPSY"
3906 if test -n "$PEPSY"; then
3907   echo "$ac_t""$PEPSY" 1>&6
3908 else
3909   echo "$ac_t""no" 1>&6
3910 fi
3911
3912 fi
3913
3914 ol_link_kerberos=no
3915
3916 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
3917         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
3918 do
3919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3921 echo "configure:3922: checking for $ac_hdr" >&5
3922 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3923   echo $ac_n "(cached) $ac_c" 1>&6
3924 else
3925   cat > conftest.$ac_ext <<EOF
3926 #line 3927 "configure"
3927 #include "confdefs.h"
3928 #include <$ac_hdr>
3929 EOF
3930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3931 { (eval echo configure:3932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3933 if test -z "$ac_err"; then
3934   rm -rf conftest*
3935   eval "ac_cv_header_$ac_safe=yes"
3936 else
3937   echo "$ac_err" >&5
3938   echo "configure: failed program was:" >&5
3939   cat conftest.$ac_ext >&5
3940   rm -rf conftest*
3941   eval "ac_cv_header_$ac_safe=no"
3942 fi
3943 rm -f conftest*
3944 fi
3945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3946   echo "$ac_t""yes" 1>&6
3947     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3948   cat >> confdefs.h <<EOF
3949 #define $ac_tr_hdr 1
3950 EOF
3951  
3952 else
3953   echo "$ac_t""no" 1>&6
3954 fi
3955 done
3956
3957
3958         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
3959                 echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
3960 echo "configure:3961: checking for main in -lkrb4" >&5
3961 ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'`
3962 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3963   echo $ac_n "(cached) $ac_c" 1>&6
3964 else
3965   ac_save_LIBS="$LIBS"
3966 LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS"
3967 cat > conftest.$ac_ext <<EOF
3968 #line 3969 "configure"
3969 #include "confdefs.h"
3970
3971 int main() {
3972 main()
3973 ; return 0; }
3974 EOF
3975 if { (eval echo configure:3976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3976   rm -rf conftest*
3977   eval "ac_cv_lib_$ac_lib_var=yes"
3978 else
3979   echo "configure: failed program was:" >&5
3980   cat conftest.$ac_ext >&5
3981   rm -rf conftest*
3982   eval "ac_cv_lib_$ac_lib_var=no"
3983 fi
3984 rm -f conftest*
3985 LIBS="$ac_save_LIBS"
3986
3987 fi
3988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3989   echo "$ac_t""yes" 1>&6
3990   have_k5=yes
3991 else
3992   echo "$ac_t""no" 1>&6
3993 have_k5=no
3994 fi
3995
3996
3997                 if test $have_k5 = yes ; then
3998                         ol_with_kerberos=found
3999                         ol_link_kerberos=yes
4000
4001                         KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
4002
4003                         LIBS="$KRB_LIBS $LIBS"
4004
4005                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
4006 echo "configure:4007: checking for des_debug in Kerberos libraries" >&5
4007 if eval "test \"`echo '$''{'ol_cv_var_des_debug'+set}'`\" = set"; then
4008   echo $ac_n "(cached) $ac_c" 1>&6
4009 else
4010   
4011                                                                 save_LIBS="$LIBS"
4012                                 LIBS="$KRB_LIBS $LIBS"
4013                                 cat > conftest.$ac_ext <<EOF
4014 #line 4015 "configure"
4015 #include "confdefs.h"
4016
4017 #include <kerberosIV/krb.h>
4018 #include <kerberosIV/des.h>
4019 extern int des_debug;
4020
4021 int main() {
4022
4023 des_debug = 1;
4024
4025 ; return 0; }
4026 EOF
4027 if { (eval echo configure:4028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4028   rm -rf conftest*
4029   ol_cv_var_des_debug=yes
4030 else
4031   echo "configure: failed program was:" >&5
4032   cat conftest.$ac_ext >&5
4033   rm -rf conftest*
4034   ol_cv_var_des_debug=no
4035 fi
4036 rm -f conftest*
4037                                                                 LIBS="$save_LIBS"
4038                         
4039 fi
4040
4041 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
4042
4043                         if test $ol_cv_var_des_debug = yes ; then
4044                                 cat >> confdefs.h <<\EOF
4045 #define HAVE_DES_DEBUG 1
4046 EOF
4047
4048                         fi
4049
4050                         LIBS="$save_LIBS"
4051                 fi
4052         fi
4053 fi
4054
4055 if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
4056         for ac_hdr in krb.h des.h
4057 do
4058 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4059 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4060 echo "configure:4061: checking for $ac_hdr" >&5
4061 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4062   echo $ac_n "(cached) $ac_c" 1>&6
4063 else
4064   cat > conftest.$ac_ext <<EOF
4065 #line 4066 "configure"
4066 #include "confdefs.h"
4067 #include <$ac_hdr>
4068 EOF
4069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4070 { (eval echo configure:4071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4072 if test -z "$ac_err"; then
4073   rm -rf conftest*
4074   eval "ac_cv_header_$ac_safe=yes"
4075 else
4076   echo "$ac_err" >&5
4077   echo "configure: failed program was:" >&5
4078   cat conftest.$ac_ext >&5
4079   rm -rf conftest*
4080   eval "ac_cv_header_$ac_safe=no"
4081 fi
4082 rm -f conftest*
4083 fi
4084 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4085   echo "$ac_t""yes" 1>&6
4086     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4087   cat >> confdefs.h <<EOF
4088 #define $ac_tr_hdr 1
4089 EOF
4090  
4091 else
4092   echo "$ac_t""no" 1>&6
4093 fi
4094 done
4095
4096
4097         if test $ac_cv_header_krb_h = yes ; then
4098                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
4099 echo "configure:4100: checking for main in -lkrb" >&5
4100 ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'`
4101 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4102   echo $ac_n "(cached) $ac_c" 1>&6
4103 else
4104   ac_save_LIBS="$LIBS"
4105 LIBS="-lkrb -ldes $LIBS"
4106 cat > conftest.$ac_ext <<EOF
4107 #line 4108 "configure"
4108 #include "confdefs.h"
4109
4110 int main() {
4111 main()
4112 ; return 0; }
4113 EOF
4114 if { (eval echo configure:4115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4115   rm -rf conftest*
4116   eval "ac_cv_lib_$ac_lib_var=yes"
4117 else
4118   echo "configure: failed program was:" >&5
4119   cat conftest.$ac_ext >&5
4120   rm -rf conftest*
4121   eval "ac_cv_lib_$ac_lib_var=no"
4122 fi
4123 rm -f conftest*
4124 LIBS="$ac_save_LIBS"
4125
4126 fi
4127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4128   echo "$ac_t""yes" 1>&6
4129   have_k4=yes
4130 else
4131   echo "$ac_t""no" 1>&6
4132 have_k4=no
4133 fi
4134
4135
4136                 if test $have_k4 = yes ; then
4137                         ol_with_kerberos=found
4138                         ol_link_kerberos=yes
4139
4140                         KRB_LIBS="-lkrb -ldes"
4141                 fi
4142         fi
4143 fi
4144
4145 if test $ol_link_kerberos = yes ; then
4146         cat >> confdefs.h <<\EOF
4147 #define HAVE_KERBEROS 1
4148 EOF
4149
4150 fi
4151
4152 ol_link_tls=no
4153 if test $ol_with_tls != no ; then
4154         
4155         for ac_hdr in ssl.h
4156 do
4157 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4158 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4159 echo "configure:4160: checking for $ac_hdr" >&5
4160 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4161   echo $ac_n "(cached) $ac_c" 1>&6
4162 else
4163   cat > conftest.$ac_ext <<EOF
4164 #line 4165 "configure"
4165 #include "confdefs.h"
4166 #include <$ac_hdr>
4167 EOF
4168 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4169 { (eval echo configure:4170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4170 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4171 if test -z "$ac_err"; then
4172   rm -rf conftest*
4173   eval "ac_cv_header_$ac_safe=yes"
4174 else
4175   echo "$ac_err" >&5
4176   echo "configure: failed program was:" >&5
4177   cat conftest.$ac_ext >&5
4178   rm -rf conftest*
4179   eval "ac_cv_header_$ac_safe=no"
4180 fi
4181 rm -f conftest*
4182 fi
4183 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4184   echo "$ac_t""yes" 1>&6
4185     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4186   cat >> confdefs.h <<EOF
4187 #define $ac_tr_hdr 1
4188 EOF
4189  
4190 else
4191   echo "$ac_t""no" 1>&6
4192 fi
4193 done
4194
4195         
4196         if test $ac_cv_header_ssl_h = yes ; then
4197                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
4198 echo "configure:4199: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
4199 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-%__p_%'`
4200 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4201   echo $ac_n "(cached) $ac_c" 1>&6
4202 else
4203   ac_save_LIBS="$LIBS"
4204 LIBS="-lssl -lcrypto $LIBS"
4205 cat > conftest.$ac_ext <<EOF
4206 #line 4207 "configure"
4207 #include "confdefs.h"
4208 /* Override any gcc2 internal prototype to avoid an error.  */
4209 /* We use char because int might match the return type of a gcc2
4210     builtin and then its argument prototype would still apply.  */
4211 char SSLeay_add_ssl_algorithms();
4212
4213 int main() {
4214 SSLeay_add_ssl_algorithms()
4215 ; return 0; }
4216 EOF
4217 if { (eval echo configure:4218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4218   rm -rf conftest*
4219   eval "ac_cv_lib_$ac_lib_var=yes"
4220 else
4221   echo "configure: failed program was:" >&5
4222   cat conftest.$ac_ext >&5
4223   rm -rf conftest*
4224   eval "ac_cv_lib_$ac_lib_var=no"
4225 fi
4226 rm -f conftest*
4227 LIBS="$ac_save_LIBS"
4228
4229 fi
4230 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4231   echo "$ac_t""yes" 1>&6
4232   have_ssleay=yes
4233                         need_rsaref=no
4234 else
4235   echo "$ac_t""no" 1>&6
4236 have_ssleay=no
4237 fi
4238
4239                         
4240                 if test $have_ssleay = no ; then
4241                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
4242 echo "configure:4243: checking for ssl3_accept in -lssl" >&5
4243 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-%__p_%'`
4244 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4245   echo $ac_n "(cached) $ac_c" 1>&6
4246 else
4247   ac_save_LIBS="$LIBS"
4248 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
4249 cat > conftest.$ac_ext <<EOF
4250 #line 4251 "configure"
4251 #include "confdefs.h"
4252 /* Override any gcc2 internal prototype to avoid an error.  */
4253 /* We use char because int might match the return type of a gcc2
4254     builtin and then its argument prototype would still apply.  */
4255 char ssl3_accept();
4256
4257 int main() {
4258 ssl3_accept()
4259 ; return 0; }
4260 EOF
4261 if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4262   rm -rf conftest*
4263   eval "ac_cv_lib_$ac_lib_var=yes"
4264 else
4265   echo "configure: failed program was:" >&5
4266   cat conftest.$ac_ext >&5
4267   rm -rf conftest*
4268   eval "ac_cv_lib_$ac_lib_var=no"
4269 fi
4270 rm -f conftest*
4271 LIBS="$ac_save_LIBS"
4272
4273 fi
4274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4275   echo "$ac_t""yes" 1>&6
4276   have_ssleay=yes
4277                                 need_rsaref=yes
4278 else
4279   echo "$ac_t""no" 1>&6
4280 have_ssleay=no
4281 fi
4282
4283                 fi
4284
4285                 if test $have_ssleay = yes ; then
4286                         ol_with_tls=found
4287                         ol_link_tls=yes
4288
4289                         cat >> confdefs.h <<\EOF
4290 #define HAVE_SSLEAY 1
4291 EOF
4292
4293
4294                         if test $need_rsaref = yes; then
4295                                 cat >> confdefs.h <<\EOF
4296 #define HAVE_RSAREF 1
4297 EOF
4298
4299
4300                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
4301                         else
4302                                 TLS_LIBS="-lssl -lcrypto"
4303                         fi
4304                 fi
4305         fi
4306 fi
4307
4308 if test $ol_link_tls = yes ; then
4309         cat >> confdefs.h <<\EOF
4310 #define HAVE_TLS 1
4311 EOF
4312
4313 fi      
4314
4315 for ac_func in \
4316         ctime_r                 \
4317         gethostbyname_r gethostbyaddr_r \
4318
4319 do
4320 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4321 echo "configure:4322: checking for $ac_func" >&5
4322 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4323   echo $ac_n "(cached) $ac_c" 1>&6
4324 else
4325   cat > conftest.$ac_ext <<EOF
4326 #line 4327 "configure"
4327 #include "confdefs.h"
4328 /* System header to define __stub macros and hopefully few prototypes,
4329     which can conflict with char $ac_func(); below.  */
4330 #include <assert.h>
4331 /* Override any gcc2 internal prototype to avoid an error.  */
4332 /* We use char because int might match the return type of a gcc2
4333     builtin and then its argument prototype would still apply.  */
4334 char $ac_func();
4335
4336 int main() {
4337
4338 /* The GNU C library defines this for functions which it implements
4339     to always fail with ENOSYS.  Some functions are actually named
4340     something starting with __ and the normal name is an alias.  */
4341 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4342 choke me
4343 #else
4344 $ac_func();
4345 #endif
4346
4347 ; return 0; }
4348 EOF
4349 if { (eval echo configure:4350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4350   rm -rf conftest*
4351   eval "ac_cv_func_$ac_func=yes"
4352 else
4353   echo "configure: failed program was:" >&5
4354   cat conftest.$ac_ext >&5
4355   rm -rf conftest*
4356   eval "ac_cv_func_$ac_func=no"
4357 fi
4358 rm -f conftest*
4359 fi
4360
4361 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4362   echo "$ac_t""yes" 1>&6
4363     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4364   cat >> confdefs.h <<EOF
4365 #define $ac_tr_func 1
4366 EOF
4367  
4368 else
4369   echo "$ac_t""no" 1>&6
4370 fi
4371 done
4372
4373
4374 if test "$ac_cv_func_ctime_r" = no ; then
4375         ol_cv_func_ctime_r_nargs=0
4376 else
4377         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
4378 echo "configure:4379: checking number of arguments of ctime_r" >&5
4379 if eval "test \"`echo '$''{'ol_cv_func_ctime_r_nargs'+set}'`\" = set"; then
4380   echo $ac_n "(cached) $ac_c" 1>&6
4381 else
4382   cat > conftest.$ac_ext <<EOF
4383 #line 4384 "configure"
4384 #include "confdefs.h"
4385 #include <time.h>
4386 int main() {
4387 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
4388 ; return 0; }
4389 EOF
4390 if { (eval echo configure:4391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4391   rm -rf conftest*
4392   ol_cv_func_ctime_r_nargs=3
4393 else
4394   echo "configure: failed program was:" >&5
4395   cat conftest.$ac_ext >&5
4396   rm -rf conftest*
4397   cat > conftest.$ac_ext <<EOF
4398 #line 4399 "configure"
4399 #include "confdefs.h"
4400 #include <time.h>
4401 int main() {
4402 time_t ti; char *buffer; ctime_r(&ti,buffer);
4403 ; return 0; }
4404 EOF
4405 if { (eval echo configure:4406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4406   rm -rf conftest*
4407   ol_cv_func_ctime_r_nargs=2
4408 else
4409   echo "configure: failed program was:" >&5
4410   cat conftest.$ac_ext >&5
4411   rm -rf conftest*
4412   ol_cv_func_ctime_r_nargs=0
4413 fi
4414 rm -f conftest*
4415 fi
4416 rm -f conftest*
4417 fi
4418
4419 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
4420   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
4421     cat >> confdefs.h <<EOF
4422 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
4423 EOF
4424
4425   fi
4426
4427 fi
4428
4429 if test "$ac_cv_func_gethostbyname_r" = yes ; then
4430         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
4431 echo "configure:4432: checking number of arguments of gethostbyname_r" >&5
4432 if eval "test \"`echo '$''{'ol_cv_func_gethostbyname_r_nargs'+set}'`\" = set"; then
4433   echo $ac_n "(cached) $ac_c" 1>&6
4434 else
4435   cat > conftest.$ac_ext <<EOF
4436 #line 4437 "configure"
4437 #include "confdefs.h"
4438 #include <sys/types.h>
4439 #include <sys/socket.h>
4440 #include <netinet/in.h>
4441 #include <netdb.h>
4442 #define BUFSIZE (sizeof(struct hostent)+10)
4443 int main() {
4444 struct hostent hent; char buffer[BUFSIZE];
4445                 int bufsize=BUFSIZE;int h_errno;
4446                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
4447                         buffer, bufsize, &h_errno);
4448 ; return 0; }
4449 EOF
4450 if { (eval echo configure:4451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4451   rm -rf conftest*
4452   ol_cv_func_gethostbyname_r_nargs=5
4453 else
4454   echo "configure: failed program was:" >&5
4455   cat conftest.$ac_ext >&5
4456   rm -rf conftest*
4457   cat > conftest.$ac_ext <<EOF
4458 #line 4459 "configure"
4459 #include "confdefs.h"
4460 #include <sys/types.h>
4461 #include <sys/socket.h>
4462 #include <netinet/in.h>
4463 #include <netdb.h>
4464 #define BUFSIZE (sizeof(struct hostent)+10)
4465 int main() {
4466 struct hostent hent;struct hostent *rhent;
4467                         char buffer[BUFSIZE];
4468                         int bufsize=BUFSIZE;int h_errno;
4469                         (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
4470                                 &rhent, &h_errno);
4471 ; return 0; }
4472 EOF
4473 if { (eval echo configure:4474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4474   rm -rf conftest*
4475   ol_cv_func_gethostbyname_r_nargs=6
4476 else
4477   echo "configure: failed program was:" >&5
4478   cat conftest.$ac_ext >&5
4479   rm -rf conftest*
4480   ol_cv_func_gethostbyname_r_nargs=0
4481 fi
4482 rm -f conftest*
4483 fi
4484 rm -f conftest*
4485 fi
4486
4487 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
4488   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
4489         cat >> confdefs.h <<EOF
4490 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
4491 EOF
4492
4493   fi
4494
4495 else
4496         ol_cv_func_gethostbyname_r_nargs=0
4497 fi
4498  
4499 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
4500         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
4501 echo "configure:4502: checking number of arguments of gethostbyaddr_r" >&5
4502 if eval "test \"`echo '$''{'ol_cv_func_gethostbyaddr_r_nargs'+set}'`\" = set"; then
4503   echo $ac_n "(cached) $ac_c" 1>&6
4504 else
4505   cat > conftest.$ac_ext <<EOF
4506 #line 4507 "configure"
4507 #include "confdefs.h"
4508 #include <sys/types.h>
4509 #include <sys/socket.h>
4510 #include <netinet/in.h>
4511 #include <netdb.h>
4512 #define BUFSIZE (sizeof(struct hostent)+10)
4513 int main() {
4514 struct hostent hent; char buffer[BUFSIZE]; 
4515             struct in_addr add;
4516             size_t alen=sizeof(struct in_addr);
4517             int bufsize=BUFSIZE;int h_errno;
4518                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
4519                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
4520 ; return 0; }
4521 EOF
4522 if { (eval echo configure:4523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4523   rm -rf conftest*
4524   ol_cv_func_gethostbyaddr_r_nargs=7
4525 else
4526   echo "configure: failed program was:" >&5
4527   cat conftest.$ac_ext >&5
4528   rm -rf conftest*
4529   cat > conftest.$ac_ext <<EOF
4530 #line 4531 "configure"
4531 #include "confdefs.h"
4532 #include <sys/types.h>
4533 #include <sys/socket.h>
4534 #include <netinet/in.h>
4535 #include <netdb.h>
4536 #define BUFSIZE (sizeof(struct hostent)+10)
4537 int main() {
4538 struct hostent hent;
4539                         struct hostent *rhent; char buffer[BUFSIZE]; 
4540                         struct in_addr add;
4541                         size_t alen=sizeof(struct in_addr);
4542                         int bufsize=BUFSIZE;int h_errno;
4543                         (void)gethostbyaddr_r( (void *)&(add.s_addr),
4544                                 alen, AF_INET, &hent, buffer, bufsize, 
4545                                 &rhent, &h_errno);
4546 ; return 0; }
4547 EOF
4548 if { (eval echo configure:4549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4549   rm -rf conftest*
4550   ol_cv_func_gethostbyaddr_r_nargs=8
4551 else
4552   echo "configure: failed program was:" >&5
4553   cat conftest.$ac_ext >&5
4554   rm -rf conftest*
4555   ol_cv_func_gethostbyaddr_r_nargs=0
4556 fi
4557 rm -f conftest*
4558 fi
4559 rm -f conftest*
4560 fi
4561
4562 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
4563   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
4564     cat >> confdefs.h <<EOF
4565 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
4566 EOF
4567
4568   fi
4569
4570 else
4571         ol_cv_func_gethostbyaddr_r_nargs=0
4572 fi
4573
4574 if test "$ac_cv_func_ctime_r" = yes \
4575         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
4576         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
4577         -a "$ac_cv_func_gethostbyname_r" = yes \
4578         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
4579         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
4580         -a "$ac_cv_func_gethostbyaddr_r" = yes \
4581         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
4582         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
4583         ; then
4584  
4585         cat >> confdefs.h <<\EOF
4586 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
4587 EOF
4588
4589 fi
4590
4591 ol_link_threads=no
4592 if test $ol_with_threads = auto -o $ol_with_threads = yes \
4593         -o $ol_with_threads = posix ; then
4594
4595         for ac_hdr in pthread.h sched.h
4596 do
4597 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4598 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4599 echo "configure:4600: checking for $ac_hdr" >&5
4600 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4601   echo $ac_n "(cached) $ac_c" 1>&6
4602 else
4603   cat > conftest.$ac_ext <<EOF
4604 #line 4605 "configure"
4605 #include "confdefs.h"
4606 #include <$ac_hdr>
4607 EOF
4608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4609 { (eval echo configure:4610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4611 if test -z "$ac_err"; then
4612   rm -rf conftest*
4613   eval "ac_cv_header_$ac_safe=yes"
4614 else
4615   echo "$ac_err" >&5
4616   echo "configure: failed program was:" >&5
4617   cat conftest.$ac_ext >&5
4618   rm -rf conftest*
4619   eval "ac_cv_header_$ac_safe=no"
4620 fi
4621 rm -f conftest*
4622 fi
4623 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4624   echo "$ac_t""yes" 1>&6
4625     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4626   cat >> confdefs.h <<EOF
4627 #define $ac_tr_hdr 1
4628 EOF
4629  
4630 else
4631   echo "$ac_t""no" 1>&6
4632 fi
4633 done
4634
4635
4636         if test $ac_cv_header_pthread_h = yes ; then
4637                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
4638 echo "configure:4639: checking POSIX thread version" >&5
4639 if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then
4640   echo $ac_n "(cached) $ac_c" 1>&6
4641 else
4642   
4643         cat > conftest.$ac_ext <<EOF
4644 #line 4645 "configure"
4645 #include "confdefs.h"
4646
4647 #               include <pthread.h>
4648                 /* this check could be improved */
4649 #               ifdef PTHREAD_ONCE_INIT
4650                         pthread_version_final
4651 #               endif
4652         
4653 EOF
4654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4655   egrep "pthread_version_final" >/dev/null 2>&1; then
4656   rm -rf conftest*
4657   ol_pthread_final=yes
4658 else
4659   rm -rf conftest*
4660   ol_pthread_final=no
4661 fi
4662 rm -f conftest*
4663
4664
4665         cat > conftest.$ac_ext <<EOF
4666 #line 4667 "configure"
4667 #include "confdefs.h"
4668
4669 #               include <pthread.h>
4670                 /* this check could be improved */
4671 #               ifdef pthread_once_init
4672                         pthread_version_draft4
4673 #               endif
4674         
4675 EOF
4676 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4677   egrep "pthread_version_draft4" >/dev/null 2>&1; then
4678   rm -rf conftest*
4679   ol_pthread_draft4=yes
4680 else
4681   rm -rf conftest*
4682   ol_pthread_draft4=no
4683 fi
4684 rm -f conftest*
4685
4686
4687         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
4688                 ol_cv_pthread_version=final
4689         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
4690                 ol_cv_pthread_version=draft4
4691         else
4692                 ol_cv_pthread_version=unknown
4693         fi
4694
4695 fi
4696
4697 echo "$ac_t""$ol_cv_pthread_version" 1>&6
4698
4699
4700                 if test $ol_cv_pthread_version = final ; then
4701                         cat >> confdefs.h <<\EOF
4702 #define HAVE_PTHREADS_FINAL 1
4703 EOF
4704
4705                 elif test $ol_cv_pthread_version = draft4 ; then
4706                         cat >> confdefs.h <<\EOF
4707 #define HAVE_PTHREADS_D4 1
4708 EOF
4709
4710                 else
4711                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
4712                 fi
4713
4714                 # consider threads found
4715                 ol_with_threads=found
4716
4717                 
4718         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
4719 echo "configure:4720: checking for LinuxThreads pthread.h" >&5
4720 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
4721   echo $ac_n "(cached) $ac_c" 1>&6
4722 else
4723   cat > conftest.$ac_ext <<EOF
4724 #line 4725 "configure"
4725 #include "confdefs.h"
4726 #include <pthread.h>
4727 EOF
4728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4729   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
4730   rm -rf conftest*
4731   ol_cv_header_linux_threads=yes
4732 else
4733   rm -rf conftest*
4734   ol_cv_header_linux_threads=no
4735 fi
4736 rm -f conftest*
4737
4738                 
4739 fi
4740
4741 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
4742         if test $ol_cv_header_linux_threads = yes; then
4743                 cat >> confdefs.h <<\EOF
4744 #define HAVE_LINUX_THREADS 1
4745 EOF
4746
4747         fi
4748
4749
4750                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
4751                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
4752 echo "configure:4753: checking for pthread_create in default libraries" >&5
4753                 if eval "test \"`echo '$''{'ol_cv_pthread_create'+set}'`\" = set"; then
4754   echo $ac_n "(cached) $ac_c" 1>&6
4755 else
4756   
4757                 if test "$cross_compiling" = yes; then
4758                         ol_cv_pthread_create=yes
4759 else
4760   cat > conftest.$ac_ext <<EOF
4761 #line 4762 "configure"
4762 #include "confdefs.h"
4763
4764 #include <pthread.h>
4765 #ifndef NULL
4766 #define NULL (void*)0
4767 #endif
4768
4769 static void *task(p)
4770         void *p;
4771 {
4772         return (void *) (p == NULL);
4773 }
4774
4775 int main(argc, argv)
4776         int argc;
4777         char **argv;
4778 {
4779         pthread_t t;
4780         int status;
4781
4782         /* make sure pthread_create() isn't just a stub */
4783 #if HAVE_PTHREADS_D4
4784         status = pthread_create(&t, pthread_attr_default, task, NULL);
4785 #else
4786         status = pthread_create(&t, NULL, task, NULL);
4787 #endif
4788
4789         if( status ) return status;
4790
4791         /* make sure pthread_detach() isn't just a stub */
4792 #if HAVE_PTHREADS_D4
4793         status = pthread_detach( &t );
4794 #else
4795         status = pthread_detach( t );
4796 #endif
4797
4798         if( status ) return status;
4799
4800         return status;
4801 }
4802
4803 EOF
4804 if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4805 then
4806   ol_cv_pthread_create=yes
4807 else
4808   echo "configure: failed program was:" >&5
4809   cat conftest.$ac_ext >&5
4810   rm -fr conftest*
4811   ol_cv_pthread_create=no
4812 fi
4813 rm -fr conftest*
4814 fi
4815
4816 fi
4817
4818                 echo "$ac_t""$ol_cv_pthread_create" 1>&6
4819
4820                 if test $ol_cv_pthread_create != no ; then
4821                         ol_link_threads=posix
4822                         ol_link_pthreads=""
4823                 fi
4824                 
4825                 # Pthread try link: -mt (ol_cv_pthread_mt)
4826         if test "$ol_link_threads" = no ; then
4827                 # try -mt
4828                 echo $ac_n "checking for pthread link with -mt""... $ac_c" 1>&6
4829 echo "configure:4830: checking for pthread link with -mt" >&5
4830 if eval "test \"`echo '$''{'ol_cv_pthread_mt'+set}'`\" = set"; then
4831   echo $ac_n "(cached) $ac_c" 1>&6
4832 else
4833   
4834                         # save the flags
4835                         ol_LIBS="$LIBS"
4836                         LIBS="-mt $LIBS"
4837
4838                         cat > conftest.$ac_ext <<EOF
4839 #line 4840 "configure"
4840 #include "confdefs.h"
4841
4842 #include <pthread.h>
4843 #ifndef NULL
4844 #define NULL (void*)0
4845 #endif
4846
4847 int main() {
4848
4849         pthread_t t;
4850
4851 #if HAVE_PTHREADS_D4
4852         pthread_create(&t, pthread_attr_default, NULL, NULL);
4853         pthread_detach( &t );
4854 #else
4855         pthread_create(&t, NULL, NULL, NULL);
4856         pthread_detach( t );
4857 #endif
4858 #ifdef HAVE_LINUX_THREADS
4859         pthread_kill_other_threads_np();
4860 #endif
4861
4862 ; return 0; }
4863 EOF
4864 if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4865   rm -rf conftest*
4866   ol_cv_pthread_mt=yes
4867 else
4868   echo "configure: failed program was:" >&5
4869   cat conftest.$ac_ext >&5
4870   rm -rf conftest*
4871   ol_cv_pthread_mt=no
4872 fi
4873 rm -f conftest*
4874
4875                 # restore the LIBS
4876                 LIBS="$ol_LIBS"
4877                 
4878 fi
4879
4880 echo "$ac_t""$ol_cv_pthread_mt" 1>&6
4881
4882                 if test $ol_cv_pthread_mt = yes ; then
4883                         ol_link_pthreads="-mt"
4884                         ol_link_threads=posix
4885                 fi
4886         fi
4887
4888                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
4889         if test "$ol_link_threads" = no ; then
4890                 # try -kthread
4891                 echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
4892 echo "configure:4893: checking for pthread link with -kthread" >&5
4893 if eval "test \"`echo '$''{'ol_cv_pthread_kthread'+set}'`\" = set"; then
4894   echo $ac_n "(cached) $ac_c" 1>&6
4895 else
4896   
4897                         # save the flags
4898                         ol_LIBS="$LIBS"
4899                         LIBS="-kthread $LIBS"
4900
4901                         cat > conftest.$ac_ext <<EOF
4902 #line 4903 "configure"
4903 #include "confdefs.h"
4904
4905 #include <pthread.h>
4906 #ifndef NULL
4907 #define NULL (void*)0
4908 #endif
4909
4910 int main() {
4911
4912         pthread_t t;
4913
4914 #if HAVE_PTHREADS_D4
4915         pthread_create(&t, pthread_attr_default, NULL, NULL);
4916         pthread_detach( &t );
4917 #else
4918         pthread_create(&t, NULL, NULL, NULL);
4919         pthread_detach( t );
4920 #endif
4921 #ifdef HAVE_LINUX_THREADS
4922         pthread_kill_other_threads_np();
4923 #endif
4924
4925 ; return 0; }
4926 EOF
4927 if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4928   rm -rf conftest*
4929   ol_cv_pthread_kthread=yes
4930 else
4931   echo "configure: failed program was:" >&5
4932   cat conftest.$ac_ext >&5
4933   rm -rf conftest*
4934   ol_cv_pthread_kthread=no
4935 fi
4936 rm -f conftest*
4937
4938                 # restore the LIBS
4939                 LIBS="$ol_LIBS"
4940                 
4941 fi
4942
4943 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
4944
4945                 if test $ol_cv_pthread_kthread = yes ; then
4946                         ol_link_pthreads="-kthread"
4947                         ol_link_threads=posix
4948                 fi
4949         fi
4950
4951                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
4952         if test "$ol_link_threads" = no ; then
4953                 # try -pthread
4954                 echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
4955 echo "configure:4956: checking for pthread link with -pthread" >&5
4956 if eval "test \"`echo '$''{'ol_cv_pthread_pthread'+set}'`\" = set"; then
4957   echo $ac_n "(cached) $ac_c" 1>&6
4958 else
4959   
4960                         # save the flags
4961                         ol_LIBS="$LIBS"
4962                         LIBS="-pthread $LIBS"
4963
4964                         cat > conftest.$ac_ext <<EOF
4965 #line 4966 "configure"
4966 #include "confdefs.h"
4967
4968 #include <pthread.h>
4969 #ifndef NULL
4970 #define NULL (void*)0
4971 #endif
4972
4973 int main() {
4974
4975         pthread_t t;
4976
4977 #if HAVE_PTHREADS_D4
4978         pthread_create(&t, pthread_attr_default, NULL, NULL);
4979         pthread_detach( &t );
4980 #else
4981         pthread_create(&t, NULL, NULL, NULL);
4982         pthread_detach( t );
4983 #endif
4984 #ifdef HAVE_LINUX_THREADS
4985         pthread_kill_other_threads_np();
4986 #endif
4987
4988 ; return 0; }
4989 EOF
4990 if { (eval echo configure:4991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4991   rm -rf conftest*
4992   ol_cv_pthread_pthread=yes
4993 else
4994   echo "configure: failed program was:" >&5
4995   cat conftest.$ac_ext >&5
4996   rm -rf conftest*
4997   ol_cv_pthread_pthread=no
4998 fi
4999 rm -f conftest*
5000
5001                 # restore the LIBS
5002                 LIBS="$ol_LIBS"
5003                 
5004 fi
5005
5006 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
5007
5008                 if test $ol_cv_pthread_pthread = yes ; then
5009                         ol_link_pthreads="-pthread"
5010                         ol_link_threads=posix
5011                 fi
5012         fi
5013
5014                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
5015         if test "$ol_link_threads" = no ; then
5016                 # try -pthreads
5017                 echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
5018 echo "configure:5019: checking for pthread link with -pthreads" >&5
5019 if eval "test \"`echo '$''{'ol_cv_pthread_pthreads'+set}'`\" = set"; then
5020   echo $ac_n "(cached) $ac_c" 1>&6
5021 else
5022   
5023                         # save the flags
5024                         ol_LIBS="$LIBS"
5025                         LIBS="-pthreads $LIBS"
5026
5027                         cat > conftest.$ac_ext <<EOF
5028 #line 5029 "configure"
5029 #include "confdefs.h"
5030
5031 #include <pthread.h>
5032 #ifndef NULL
5033 #define NULL (void*)0
5034 #endif
5035
5036 int main() {
5037
5038         pthread_t t;
5039
5040 #if HAVE_PTHREADS_D4
5041         pthread_create(&t, pthread_attr_default, NULL, NULL);
5042         pthread_detach( &t );
5043 #else
5044         pthread_create(&t, NULL, NULL, NULL);
5045         pthread_detach( t );
5046 #endif
5047 #ifdef HAVE_LINUX_THREADS
5048         pthread_kill_other_threads_np();
5049 #endif
5050
5051 ; return 0; }
5052 EOF
5053 if { (eval echo configure:5054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5054   rm -rf conftest*
5055   ol_cv_pthread_pthreads=yes
5056 else
5057   echo "configure: failed program was:" >&5
5058   cat conftest.$ac_ext >&5
5059   rm -rf conftest*
5060   ol_cv_pthread_pthreads=no
5061 fi
5062 rm -f conftest*
5063
5064                 # restore the LIBS
5065                 LIBS="$ol_LIBS"
5066                 
5067 fi
5068
5069 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
5070
5071                 if test $ol_cv_pthread_pthreads = yes ; then
5072                         ol_link_pthreads="-pthreads"
5073                         ol_link_threads=posix
5074                 fi
5075         fi
5076
5077                 # Pthread try link: -thread (ol_cv_pthread_thread)
5078         if test "$ol_link_threads" = no ; then
5079                 # try -thread
5080                 echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
5081 echo "configure:5082: checking for pthread link with -thread" >&5
5082 if eval "test \"`echo '$''{'ol_cv_pthread_thread'+set}'`\" = set"; then
5083   echo $ac_n "(cached) $ac_c" 1>&6
5084 else
5085   
5086                         # save the flags
5087                         ol_LIBS="$LIBS"
5088                         LIBS="-thread $LIBS"
5089
5090                         cat > conftest.$ac_ext <<EOF
5091 #line 5092 "configure"
5092 #include "confdefs.h"
5093
5094 #include <pthread.h>
5095 #ifndef NULL
5096 #define NULL (void*)0
5097 #endif
5098
5099 int main() {
5100
5101         pthread_t t;
5102
5103 #if HAVE_PTHREADS_D4
5104         pthread_create(&t, pthread_attr_default, NULL, NULL);
5105         pthread_detach( &t );
5106 #else
5107         pthread_create(&t, NULL, NULL, NULL);
5108         pthread_detach( t );
5109 #endif
5110 #ifdef HAVE_LINUX_THREADS
5111         pthread_kill_other_threads_np();
5112 #endif
5113
5114 ; return 0; }
5115 EOF
5116 if { (eval echo configure:5117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5117   rm -rf conftest*
5118   ol_cv_pthread_thread=yes
5119 else
5120   echo "configure: failed program was:" >&5
5121   cat conftest.$ac_ext >&5
5122   rm -rf conftest*
5123   ol_cv_pthread_thread=no
5124 fi
5125 rm -f conftest*
5126
5127                 # restore the LIBS
5128                 LIBS="$ol_LIBS"
5129                 
5130 fi
5131
5132 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
5133
5134                 if test $ol_cv_pthread_thread = yes ; then
5135                         ol_link_pthreads="-thread"
5136                         ol_link_threads=posix
5137                 fi
5138         fi
5139
5140
5141                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
5142         if test "$ol_link_threads" = no ; then
5143                 # try -lpthread -lmach -lexc -lc_r
5144                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
5145 echo "configure:5146: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
5146 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc_lc_r'+set}'`\" = set"; then
5147   echo $ac_n "(cached) $ac_c" 1>&6
5148 else
5149   
5150                         # save the flags
5151                         ol_LIBS="$LIBS"
5152                         LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
5153
5154                         cat > conftest.$ac_ext <<EOF
5155 #line 5156 "configure"
5156 #include "confdefs.h"
5157
5158 #include <pthread.h>
5159 #ifndef NULL
5160 #define NULL (void*)0
5161 #endif
5162
5163 int main() {
5164
5165         pthread_t t;
5166
5167 #if HAVE_PTHREADS_D4
5168         pthread_create(&t, pthread_attr_default, NULL, NULL);
5169         pthread_detach( &t );
5170 #else
5171         pthread_create(&t, NULL, NULL, NULL);
5172         pthread_detach( t );
5173 #endif
5174 #ifdef HAVE_LINUX_THREADS
5175         pthread_kill_other_threads_np();
5176 #endif
5177
5178 ; return 0; }
5179 EOF
5180 if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5181   rm -rf conftest*
5182   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
5183 else
5184   echo "configure: failed program was:" >&5
5185   cat conftest.$ac_ext >&5
5186   rm -rf conftest*
5187   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
5188 fi
5189 rm -f conftest*
5190
5191                 # restore the LIBS
5192                 LIBS="$ol_LIBS"
5193                 
5194 fi
5195
5196 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
5197
5198                 if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
5199                         ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
5200                         ol_link_threads=posix
5201                 fi
5202         fi
5203
5204                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
5205         if test "$ol_link_threads" = no ; then
5206                 # try -lpthread -lmach -lexc
5207                 echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
5208 echo "configure:5209: checking for pthread link with -lpthread -lmach -lexc" >&5
5209 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread_lmach_lexc'+set}'`\" = set"; then
5210   echo $ac_n "(cached) $ac_c" 1>&6
5211 else
5212   
5213                         # save the flags
5214                         ol_LIBS="$LIBS"
5215                         LIBS="-lpthread -lmach -lexc $LIBS"
5216
5217                         cat > conftest.$ac_ext <<EOF
5218 #line 5219 "configure"
5219 #include "confdefs.h"
5220
5221 #include <pthread.h>
5222 #ifndef NULL
5223 #define NULL (void*)0
5224 #endif
5225
5226 int main() {
5227
5228         pthread_t t;
5229
5230 #if HAVE_PTHREADS_D4
5231         pthread_create(&t, pthread_attr_default, NULL, NULL);
5232         pthread_detach( &t );
5233 #else
5234         pthread_create(&t, NULL, NULL, NULL);
5235         pthread_detach( t );
5236 #endif
5237 #ifdef HAVE_LINUX_THREADS
5238         pthread_kill_other_threads_np();
5239 #endif
5240
5241 ; return 0; }
5242 EOF
5243 if { (eval echo configure:5244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5244   rm -rf conftest*
5245   ol_cv_pthread_lpthread_lmach_lexc=yes
5246 else
5247   echo "configure: failed program was:" >&5
5248   cat conftest.$ac_ext >&5
5249   rm -rf conftest*
5250   ol_cv_pthread_lpthread_lmach_lexc=no
5251 fi
5252 rm -f conftest*
5253
5254                 # restore the LIBS
5255                 LIBS="$ol_LIBS"
5256                 
5257 fi
5258
5259 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
5260
5261                 if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
5262                         ol_link_pthreads="-lpthread -lmach -lexc"
5263                         ol_link_threads=posix
5264                 fi
5265         fi
5266
5267
5268                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
5269         if test "$ol_link_threads" = no ; then
5270                 # try -lpthread -Wl,-woff,85
5271                 echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
5272 echo "configure:5273: checking for pthread link with -lpthread -Wl,-woff,85" >&5
5273 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthread_woff'+set}'`\" = set"; then
5274   echo $ac_n "(cached) $ac_c" 1>&6
5275 else
5276   
5277                         # save the flags
5278                         ol_LIBS="$LIBS"
5279                         LIBS="-lpthread -Wl,-woff,85 $LIBS"
5280
5281                         cat > conftest.$ac_ext <<EOF
5282 #line 5283 "configure"
5283 #include "confdefs.h"
5284
5285 #include <pthread.h>
5286 #ifndef NULL
5287 #define NULL (void*)0
5288 #endif
5289
5290 int main() {
5291
5292         pthread_t t;
5293
5294 #if HAVE_PTHREADS_D4
5295         pthread_create(&t, pthread_attr_default, NULL, NULL);
5296         pthread_detach( &t );
5297 #else
5298         pthread_create(&t, NULL, NULL, NULL);
5299         pthread_detach( t );
5300 #endif
5301 #ifdef HAVE_LINUX_THREADS
5302         pthread_kill_other_threads_np();
5303 #endif
5304
5305 ; return 0; }
5306 EOF
5307 if { (eval echo configure:5308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5308   rm -rf conftest*
5309   ol_cv_pthread_lib_lpthread_woff=yes
5310 else
5311   echo "configure: failed program was:" >&5
5312   cat conftest.$ac_ext >&5
5313   rm -rf conftest*
5314   ol_cv_pthread_lib_lpthread_woff=no
5315 fi
5316 rm -f conftest*
5317
5318                 # restore the LIBS
5319                 LIBS="$ol_LIBS"
5320                 
5321 fi
5322
5323 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
5324
5325                 if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
5326                         ol_link_pthreads="-lpthread -Wl,-woff,85"
5327                         ol_link_threads=posix
5328                 fi
5329         fi
5330
5331
5332                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
5333         if test "$ol_link_threads" = no ; then
5334                 # try -lpthread
5335                 echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
5336 echo "configure:5337: checking for pthread link with -lpthread" >&5
5337 if eval "test \"`echo '$''{'ol_cv_pthread_lpthread'+set}'`\" = set"; then
5338   echo $ac_n "(cached) $ac_c" 1>&6
5339 else
5340   
5341                         # save the flags
5342                         ol_LIBS="$LIBS"
5343                         LIBS="-lpthread $LIBS"
5344
5345                         cat > conftest.$ac_ext <<EOF
5346 #line 5347 "configure"
5347 #include "confdefs.h"
5348
5349 #include <pthread.h>
5350 #ifndef NULL
5351 #define NULL (void*)0
5352 #endif
5353
5354 int main() {
5355
5356         pthread_t t;
5357
5358 #if HAVE_PTHREADS_D4
5359         pthread_create(&t, pthread_attr_default, NULL, NULL);
5360         pthread_detach( &t );
5361 #else
5362         pthread_create(&t, NULL, NULL, NULL);
5363         pthread_detach( t );
5364 #endif
5365 #ifdef HAVE_LINUX_THREADS
5366         pthread_kill_other_threads_np();
5367 #endif
5368
5369 ; return 0; }
5370 EOF
5371 if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5372   rm -rf conftest*
5373   ol_cv_pthread_lpthread=yes
5374 else
5375   echo "configure: failed program was:" >&5
5376   cat conftest.$ac_ext >&5
5377   rm -rf conftest*
5378   ol_cv_pthread_lpthread=no
5379 fi
5380 rm -f conftest*
5381
5382                 # restore the LIBS
5383                 LIBS="$ol_LIBS"
5384                 
5385 fi
5386
5387 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
5388
5389                 if test $ol_cv_pthread_lpthread = yes ; then
5390                         ol_link_pthreads="-lpthread"
5391                         ol_link_threads=posix
5392                 fi
5393         fi
5394
5395                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
5396         if test "$ol_link_threads" = no ; then
5397                 # try -lc_r
5398                 echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
5399 echo "configure:5400: checking for pthread link with -lc_r" >&5
5400 if eval "test \"`echo '$''{'ol_cv_pthread_lc_r'+set}'`\" = set"; then
5401   echo $ac_n "(cached) $ac_c" 1>&6
5402 else
5403   
5404                         # save the flags
5405                         ol_LIBS="$LIBS"
5406                         LIBS="-lc_r $LIBS"
5407
5408                         cat > conftest.$ac_ext <<EOF
5409 #line 5410 "configure"
5410 #include "confdefs.h"
5411
5412 #include <pthread.h>
5413 #ifndef NULL
5414 #define NULL (void*)0
5415 #endif
5416
5417 int main() {
5418
5419         pthread_t t;
5420
5421 #if HAVE_PTHREADS_D4
5422         pthread_create(&t, pthread_attr_default, NULL, NULL);
5423         pthread_detach( &t );
5424 #else
5425         pthread_create(&t, NULL, NULL, NULL);
5426         pthread_detach( t );
5427 #endif
5428 #ifdef HAVE_LINUX_THREADS
5429         pthread_kill_other_threads_np();
5430 #endif
5431
5432 ; return 0; }
5433 EOF
5434 if { (eval echo configure:5435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5435   rm -rf conftest*
5436   ol_cv_pthread_lc_r=yes
5437 else
5438   echo "configure: failed program was:" >&5
5439   cat conftest.$ac_ext >&5
5440   rm -rf conftest*
5441   ol_cv_pthread_lc_r=no
5442 fi
5443 rm -f conftest*
5444
5445                 # restore the LIBS
5446                 LIBS="$ol_LIBS"
5447                 
5448 fi
5449
5450 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
5451
5452                 if test $ol_cv_pthread_lc_r = yes ; then
5453                         ol_link_pthreads="-lc_r"
5454                         ol_link_threads=posix
5455                 fi
5456         fi
5457
5458
5459                 # Pthread try link: -threads (ol_cv_pthread_threads)
5460         if test "$ol_link_threads" = no ; then
5461                 # try -threads
5462                 echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
5463 echo "configure:5464: checking for pthread link with -threads" >&5
5464 if eval "test \"`echo '$''{'ol_cv_pthread_threads'+set}'`\" = set"; then
5465   echo $ac_n "(cached) $ac_c" 1>&6
5466 else
5467   
5468                         # save the flags
5469                         ol_LIBS="$LIBS"
5470                         LIBS="-threads $LIBS"
5471
5472                         cat > conftest.$ac_ext <<EOF
5473 #line 5474 "configure"
5474 #include "confdefs.h"
5475
5476 #include <pthread.h>
5477 #ifndef NULL
5478 #define NULL (void*)0
5479 #endif
5480
5481 int main() {
5482
5483         pthread_t t;
5484
5485 #if HAVE_PTHREADS_D4
5486         pthread_create(&t, pthread_attr_default, NULL, NULL);
5487         pthread_detach( &t );
5488 #else
5489         pthread_create(&t, NULL, NULL, NULL);
5490         pthread_detach( t );
5491 #endif
5492 #ifdef HAVE_LINUX_THREADS
5493         pthread_kill_other_threads_np();
5494 #endif
5495
5496 ; return 0; }
5497 EOF
5498 if { (eval echo configure:5499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5499   rm -rf conftest*
5500   ol_cv_pthread_threads=yes
5501 else
5502   echo "configure: failed program was:" >&5
5503   cat conftest.$ac_ext >&5
5504   rm -rf conftest*
5505   ol_cv_pthread_threads=no
5506 fi
5507 rm -f conftest*
5508
5509                 # restore the LIBS
5510                 LIBS="$ol_LIBS"
5511                 
5512 fi
5513
5514 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
5515
5516                 if test $ol_cv_pthread_threads = yes ; then
5517                         ol_link_pthreads="-threads"
5518                         ol_link_threads=posix
5519                 fi
5520         fi
5521
5522
5523                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
5524         if test "$ol_link_threads" = no ; then
5525                 # try -lpthreads -lmach -lexc -lc_r
5526                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
5527 echo "configure:5528: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
5528 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc_lc_r'+set}'`\" = set"; then
5529   echo $ac_n "(cached) $ac_c" 1>&6
5530 else
5531   
5532                         # save the flags
5533                         ol_LIBS="$LIBS"
5534                         LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
5535
5536                         cat > conftest.$ac_ext <<EOF
5537 #line 5538 "configure"
5538 #include "confdefs.h"
5539
5540 #include <pthread.h>
5541 #ifndef NULL
5542 #define NULL (void*)0
5543 #endif
5544
5545 int main() {
5546
5547         pthread_t t;
5548
5549 #if HAVE_PTHREADS_D4
5550         pthread_create(&t, pthread_attr_default, NULL, NULL);
5551         pthread_detach( &t );
5552 #else
5553         pthread_create(&t, NULL, NULL, NULL);
5554         pthread_detach( t );
5555 #endif
5556 #ifdef HAVE_LINUX_THREADS
5557         pthread_kill_other_threads_np();
5558 #endif
5559
5560 ; return 0; }
5561 EOF
5562 if { (eval echo configure:5563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5563   rm -rf conftest*
5564   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
5565 else
5566   echo "configure: failed program was:" >&5
5567   cat conftest.$ac_ext >&5
5568   rm -rf conftest*
5569   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
5570 fi
5571 rm -f conftest*
5572
5573                 # restore the LIBS
5574                 LIBS="$ol_LIBS"
5575                 
5576 fi
5577
5578 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
5579
5580                 if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
5581                         ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
5582                         ol_link_threads=posix
5583                 fi
5584         fi
5585
5586                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
5587         if test "$ol_link_threads" = no ; then
5588                 # try -lpthreads -lmach -lexc
5589                 echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
5590 echo "configure:5591: checking for pthread link with -lpthreads -lmach -lexc" >&5
5591 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lmach_lexc'+set}'`\" = set"; then
5592   echo $ac_n "(cached) $ac_c" 1>&6
5593 else
5594   
5595                         # save the flags
5596                         ol_LIBS="$LIBS"
5597                         LIBS="-lpthreads -lmach -lexc $LIBS"
5598
5599                         cat > conftest.$ac_ext <<EOF
5600 #line 5601 "configure"
5601 #include "confdefs.h"
5602
5603 #include <pthread.h>
5604 #ifndef NULL
5605 #define NULL (void*)0
5606 #endif
5607
5608 int main() {
5609
5610         pthread_t t;
5611
5612 #if HAVE_PTHREADS_D4
5613         pthread_create(&t, pthread_attr_default, NULL, NULL);
5614         pthread_detach( &t );
5615 #else
5616         pthread_create(&t, NULL, NULL, NULL);
5617         pthread_detach( t );
5618 #endif
5619 #ifdef HAVE_LINUX_THREADS
5620         pthread_kill_other_threads_np();
5621 #endif
5622
5623 ; return 0; }
5624 EOF
5625 if { (eval echo configure:5626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5626   rm -rf conftest*
5627   ol_cv_pthread_lpthreads_lmach_lexc=yes
5628 else
5629   echo "configure: failed program was:" >&5
5630   cat conftest.$ac_ext >&5
5631   rm -rf conftest*
5632   ol_cv_pthread_lpthreads_lmach_lexc=no
5633 fi
5634 rm -f conftest*
5635
5636                 # restore the LIBS
5637                 LIBS="$ol_LIBS"
5638                 
5639 fi
5640
5641 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
5642
5643                 if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
5644                         ol_link_pthreads="-lpthreads -lmach -lexc"
5645                         ol_link_threads=posix
5646                 fi
5647         fi
5648
5649                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
5650         if test "$ol_link_threads" = no ; then
5651                 # try -lpthreads -lexc
5652                 echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
5653 echo "configure:5654: checking for pthread link with -lpthreads -lexc" >&5
5654 if eval "test \"`echo '$''{'ol_cv_pthread_lpthreads_lexc'+set}'`\" = set"; then
5655   echo $ac_n "(cached) $ac_c" 1>&6
5656 else
5657   
5658                         # save the flags
5659                         ol_LIBS="$LIBS"
5660                         LIBS="-lpthreads -lexc $LIBS"
5661
5662                         cat > conftest.$ac_ext <<EOF
5663 #line 5664 "configure"
5664 #include "confdefs.h"
5665
5666 #include <pthread.h>
5667 #ifndef NULL
5668 #define NULL (void*)0
5669 #endif
5670
5671 int main() {
5672
5673         pthread_t t;
5674
5675 #if HAVE_PTHREADS_D4
5676         pthread_create(&t, pthread_attr_default, NULL, NULL);
5677         pthread_detach( &t );
5678 #else
5679         pthread_create(&t, NULL, NULL, NULL);
5680         pthread_detach( t );
5681 #endif
5682 #ifdef HAVE_LINUX_THREADS
5683         pthread_kill_other_threads_np();
5684 #endif
5685
5686 ; return 0; }
5687 EOF
5688 if { (eval echo configure:5689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5689   rm -rf conftest*
5690   ol_cv_pthread_lpthreads_lexc=yes
5691 else
5692   echo "configure: failed program was:" >&5
5693   cat conftest.$ac_ext >&5
5694   rm -rf conftest*
5695   ol_cv_pthread_lpthreads_lexc=no
5696 fi
5697 rm -f conftest*
5698
5699                 # restore the LIBS
5700                 LIBS="$ol_LIBS"
5701                 
5702 fi
5703
5704 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
5705
5706                 if test $ol_cv_pthread_lpthreads_lexc = yes ; then
5707                         ol_link_pthreads="-lpthreads -lexc"
5708                         ol_link_threads=posix
5709                 fi
5710         fi
5711
5712
5713                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
5714         if test "$ol_link_threads" = no ; then
5715                 # try -lpthreads
5716                 echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
5717 echo "configure:5718: checking for pthread link with -lpthreads" >&5
5718 if eval "test \"`echo '$''{'ol_cv_pthread_lib_lpthreads'+set}'`\" = set"; then
5719   echo $ac_n "(cached) $ac_c" 1>&6
5720 else
5721   
5722                         # save the flags
5723                         ol_LIBS="$LIBS"
5724                         LIBS="-lpthreads $LIBS"
5725
5726                         cat > conftest.$ac_ext <<EOF
5727 #line 5728 "configure"
5728 #include "confdefs.h"
5729
5730 #include <pthread.h>
5731 #ifndef NULL
5732 #define NULL (void*)0
5733 #endif
5734
5735 int main() {
5736
5737         pthread_t t;
5738
5739 #if HAVE_PTHREADS_D4
5740         pthread_create(&t, pthread_attr_default, NULL, NULL);
5741         pthread_detach( &t );
5742 #else
5743         pthread_create(&t, NULL, NULL, NULL);
5744         pthread_detach( t );
5745 #endif
5746 #ifdef HAVE_LINUX_THREADS
5747         pthread_kill_other_threads_np();
5748 #endif
5749
5750 ; return 0; }
5751 EOF
5752 if { (eval echo configure:5753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5753   rm -rf conftest*
5754   ol_cv_pthread_lib_lpthreads=yes
5755 else
5756   echo "configure: failed program was:" >&5
5757   cat conftest.$ac_ext >&5
5758   rm -rf conftest*
5759   ol_cv_pthread_lib_lpthreads=no
5760 fi
5761 rm -f conftest*
5762
5763                 # restore the LIBS
5764                 LIBS="$ol_LIBS"
5765                 
5766 fi
5767
5768 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
5769
5770                 if test $ol_cv_pthread_lib_lpthreads = yes ; then
5771                         ol_link_pthreads="-lpthreads"
5772                         ol_link_threads=posix
5773                 fi
5774         fi
5775
5776
5777                 if test $ol_link_threads != no ; then
5778                         cat >> confdefs.h <<\EOF
5779 #define HAVE_PTHREADS 1
5780 EOF
5781
5782
5783                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
5784
5785                                                 save_CPPFLAGS="$CPPFLAGS"
5786                         save_LIBS="$LIBS"
5787                         LIBS="$LTHREAD_LIBS $LIBS"
5788
5789                                                                                                 for ac_func in sched_yield pthread_yield
5790 do
5791 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5792 echo "configure:5793: checking for $ac_func" >&5
5793 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5794   echo $ac_n "(cached) $ac_c" 1>&6
5795 else
5796   cat > conftest.$ac_ext <<EOF
5797 #line 5798 "configure"
5798 #include "confdefs.h"
5799 /* System header to define __stub macros and hopefully few prototypes,
5800     which can conflict with char $ac_func(); below.  */
5801 #include <assert.h>
5802 /* Override any gcc2 internal prototype to avoid an error.  */
5803 /* We use char because int might match the return type of a gcc2
5804     builtin and then its argument prototype would still apply.  */
5805 char $ac_func();
5806
5807 int main() {
5808
5809 /* The GNU C library defines this for functions which it implements
5810     to always fail with ENOSYS.  Some functions are actually named
5811     something starting with __ and the normal name is an alias.  */
5812 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5813 choke me
5814 #else
5815 $ac_func();
5816 #endif
5817
5818 ; return 0; }
5819 EOF
5820 if { (eval echo configure:5821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5821   rm -rf conftest*
5822   eval "ac_cv_func_$ac_func=yes"
5823 else
5824   echo "configure: failed program was:" >&5
5825   cat conftest.$ac_ext >&5
5826   rm -rf conftest*
5827   eval "ac_cv_func_$ac_func=no"
5828 fi
5829 rm -f conftest*
5830 fi
5831
5832 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5833   echo "$ac_t""yes" 1>&6
5834     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5835   cat >> confdefs.h <<EOF
5836 #define $ac_tr_func 1
5837 EOF
5838  
5839 else
5840   echo "$ac_t""no" 1>&6
5841 fi
5842 done
5843
5844
5845                         if test $ac_cv_func_sched_yield = no -a \
5846                                 $ac_cv_func_pthread_yield = no ; then
5847                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5848 echo "configure:5849: checking for sched_yield in -lrt" >&5
5849 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5850 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5851   echo $ac_n "(cached) $ac_c" 1>&6
5852 else
5853   ac_save_LIBS="$LIBS"
5854 LIBS="-lrt  $LIBS"
5855 cat > conftest.$ac_ext <<EOF
5856 #line 5857 "configure"
5857 #include "confdefs.h"
5858 /* Override any gcc2 internal prototype to avoid an error.  */
5859 /* We use char because int might match the return type of a gcc2
5860     builtin and then its argument prototype would still apply.  */
5861 char sched_yield();
5862
5863 int main() {
5864 sched_yield()
5865 ; return 0; }
5866 EOF
5867 if { (eval echo configure:5868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5868   rm -rf conftest*
5869   eval "ac_cv_lib_$ac_lib_var=yes"
5870 else
5871   echo "configure: failed program was:" >&5
5872   cat conftest.$ac_ext >&5
5873   rm -rf conftest*
5874   eval "ac_cv_lib_$ac_lib_var=no"
5875 fi
5876 rm -f conftest*
5877 LIBS="$ac_save_LIBS"
5878
5879 fi
5880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5881   echo "$ac_t""yes" 1>&6
5882   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
5883                                         cat >> confdefs.h <<\EOF
5884 #define HAVE_SCHED_YIELD 1
5885 EOF
5886
5887                                         ac_cv_func_sched_yield=yes
5888 else
5889   echo "$ac_t""no" 1>&6
5890 ac_cv_func_sched_yield=no
5891 fi
5892
5893                         fi
5894                         if test $ac_cv_func_sched_yield = no -a \
5895                                 $ac_cv_func_pthread_yield = no ; then
5896                                                                                                 for ac_func in thr_yield
5897 do
5898 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5899 echo "configure:5900: checking for $ac_func" >&5
5900 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5901   echo $ac_n "(cached) $ac_c" 1>&6
5902 else
5903   cat > conftest.$ac_ext <<EOF
5904 #line 5905 "configure"
5905 #include "confdefs.h"
5906 /* System header to define __stub macros and hopefully few prototypes,
5907     which can conflict with char $ac_func(); below.  */
5908 #include <assert.h>
5909 /* Override any gcc2 internal prototype to avoid an error.  */
5910 /* We use char because int might match the return type of a gcc2
5911     builtin and then its argument prototype would still apply.  */
5912 char $ac_func();
5913
5914 int main() {
5915
5916 /* The GNU C library defines this for functions which it implements
5917     to always fail with ENOSYS.  Some functions are actually named
5918     something starting with __ and the normal name is an alias.  */
5919 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5920 choke me
5921 #else
5922 $ac_func();
5923 #endif
5924
5925 ; return 0; }
5926 EOF
5927 if { (eval echo configure:5928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5928   rm -rf conftest*
5929   eval "ac_cv_func_$ac_func=yes"
5930 else
5931   echo "configure: failed program was:" >&5
5932   cat conftest.$ac_ext >&5
5933   rm -rf conftest*
5934   eval "ac_cv_func_$ac_func=no"
5935 fi
5936 rm -f conftest*
5937 fi
5938
5939 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5940   echo "$ac_t""yes" 1>&6
5941     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5942   cat >> confdefs.h <<EOF
5943 #define $ac_tr_func 1
5944 EOF
5945  
5946 else
5947   echo "$ac_t""no" 1>&6
5948 fi
5949 done
5950
5951                         fi
5952                         if test $ac_cv_func_sched_yield = no -a \
5953                                 $ac_cv_func_pthread_yield = no -a \
5954                                 "$ac_cv_func_thr_yield" = no ; then
5955                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
5956                         fi
5957
5958                                                 for ac_func in pthread_kill
5959 do
5960 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5961 echo "configure:5962: checking for $ac_func" >&5
5962 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5963   echo $ac_n "(cached) $ac_c" 1>&6
5964 else
5965   cat > conftest.$ac_ext <<EOF
5966 #line 5967 "configure"
5967 #include "confdefs.h"
5968 /* System header to define __stub macros and hopefully few prototypes,
5969     which can conflict with char $ac_func(); below.  */
5970 #include <assert.h>
5971 /* Override any gcc2 internal prototype to avoid an error.  */
5972 /* We use char because int might match the return type of a gcc2
5973     builtin and then its argument prototype would still apply.  */
5974 char $ac_func();
5975
5976 int main() {
5977
5978 /* The GNU C library defines this for functions which it implements
5979     to always fail with ENOSYS.  Some functions are actually named
5980     something starting with __ and the normal name is an alias.  */
5981 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5982 choke me
5983 #else
5984 $ac_func();
5985 #endif
5986
5987 ; return 0; }
5988 EOF
5989 if { (eval echo configure:5990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5990   rm -rf conftest*
5991   eval "ac_cv_func_$ac_func=yes"
5992 else
5993   echo "configure: failed program was:" >&5
5994   cat conftest.$ac_ext >&5
5995   rm -rf conftest*
5996   eval "ac_cv_func_$ac_func=no"
5997 fi
5998 rm -f conftest*
5999 fi
6000
6001 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6002   echo "$ac_t""yes" 1>&6
6003     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6004   cat >> confdefs.h <<EOF
6005 #define $ac_tr_func 1
6006 EOF
6007  
6008 else
6009   echo "$ac_t""no" 1>&6
6010 fi
6011 done
6012
6013
6014                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
6015 echo "configure:6016: checking for pthread_detach with <pthread.h>" >&5
6016 if eval "test \"`echo '$''{'ol_cv_func_pthread_detach'+set}'`\" = set"; then
6017   echo $ac_n "(cached) $ac_c" 1>&6
6018 else
6019   
6020                                                                 cat > conftest.$ac_ext <<EOF
6021 #line 6022 "configure"
6022 #include "confdefs.h"
6023
6024 #include <pthread.h>
6025 #ifndef NULL
6026 #define NULL (void*)0
6027 #endif
6028
6029 int main() {
6030 pthread_detach(NULL);
6031 ; return 0; }
6032 EOF
6033 if { (eval echo configure:6034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6034   rm -rf conftest*
6035   ol_cv_func_pthread_detach=yes
6036 else
6037   echo "configure: failed program was:" >&5
6038   cat conftest.$ac_ext >&5
6039   rm -rf conftest*
6040   ol_cv_func_pthread_detach=no
6041 fi
6042 rm -f conftest*
6043                         
6044 fi
6045
6046 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
6047
6048                         if test $ol_cv_func_pthread_detach = no ; then
6049                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
6050                         fi
6051
6052                         cat >> confdefs.h <<\EOF
6053 #define HAVE_PTHREAD_DETACH 1
6054 EOF
6055
6056
6057                                                 for ac_func in \
6058                                 pthread_setconcurrency \
6059                                 pthread_getconcurrency \
6060                                 thr_setconcurrency \
6061                                 thr_getconcurrency \
6062                         
6063 do
6064 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6065 echo "configure:6066: checking for $ac_func" >&5
6066 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6067   echo $ac_n "(cached) $ac_c" 1>&6
6068 else
6069   cat > conftest.$ac_ext <<EOF
6070 #line 6071 "configure"
6071 #include "confdefs.h"
6072 /* System header to define __stub macros and hopefully few prototypes,
6073     which can conflict with char $ac_func(); below.  */
6074 #include <assert.h>
6075 /* Override any gcc2 internal prototype to avoid an error.  */
6076 /* We use char because int might match the return type of a gcc2
6077     builtin and then its argument prototype would still apply.  */
6078 char $ac_func();
6079
6080 int main() {
6081
6082 /* The GNU C library defines this for functions which it implements
6083     to always fail with ENOSYS.  Some functions are actually named
6084     something starting with __ and the normal name is an alias.  */
6085 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6086 choke me
6087 #else
6088 $ac_func();
6089 #endif
6090
6091 ; return 0; }
6092 EOF
6093 if { (eval echo configure:6094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6094   rm -rf conftest*
6095   eval "ac_cv_func_$ac_func=yes"
6096 else
6097   echo "configure: failed program was:" >&5
6098   cat conftest.$ac_ext >&5
6099   rm -rf conftest*
6100   eval "ac_cv_func_$ac_func=no"
6101 fi
6102 rm -f conftest*
6103 fi
6104
6105 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6106   echo "$ac_t""yes" 1>&6
6107     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6108   cat >> confdefs.h <<EOF
6109 #define $ac_tr_func 1
6110 EOF
6111  
6112 else
6113   echo "$ac_t""no" 1>&6
6114 fi
6115 done
6116
6117
6118                         
6119         echo $ac_n "checking for pthread_kill_other_threads_np""... $ac_c" 1>&6
6120 echo "configure:6121: checking for pthread_kill_other_threads_np" >&5
6121 if eval "test \"`echo '$''{'ac_cv_func_pthread_kill_other_threads_np'+set}'`\" = set"; then
6122   echo $ac_n "(cached) $ac_c" 1>&6
6123 else
6124   cat > conftest.$ac_ext <<EOF
6125 #line 6126 "configure"
6126 #include "confdefs.h"
6127 /* System header to define __stub macros and hopefully few prototypes,
6128     which can conflict with char pthread_kill_other_threads_np(); below.  */
6129 #include <assert.h>
6130 /* Override any gcc2 internal prototype to avoid an error.  */
6131 /* We use char because int might match the return type of a gcc2
6132     builtin and then its argument prototype would still apply.  */
6133 char pthread_kill_other_threads_np();
6134
6135 int main() {
6136
6137 /* The GNU C library defines this for functions which it implements
6138     to always fail with ENOSYS.  Some functions are actually named
6139     something starting with __ and the normal name is an alias.  */
6140 #if defined (__stub_pthread_kill_other_threads_np) || defined (__stub___pthread_kill_other_threads_np)
6141 choke me
6142 #else
6143 pthread_kill_other_threads_np();
6144 #endif
6145
6146 ; return 0; }
6147 EOF
6148 if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6149   rm -rf conftest*
6150   eval "ac_cv_func_pthread_kill_other_threads_np=yes"
6151 else
6152   echo "configure: failed program was:" >&5
6153   cat conftest.$ac_ext >&5
6154   rm -rf conftest*
6155   eval "ac_cv_func_pthread_kill_other_threads_np=no"
6156 fi
6157 rm -f conftest*
6158 fi
6159
6160 if eval "test \"`echo '$ac_cv_func_'pthread_kill_other_threads_np`\" = yes"; then
6161   echo "$ac_t""yes" 1>&6
6162   :
6163 else
6164   echo "$ac_t""no" 1>&6
6165 fi
6166
6167         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
6168 echo "configure:6169: checking for LinuxThreads implementation" >&5
6169 if eval "test \"`echo '$''{'ol_cv_sys_linux_threads'+set}'`\" = set"; then
6170   echo $ac_n "(cached) $ac_c" 1>&6
6171 else
6172   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
6173 fi
6174
6175 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
6176
6177                         
6178         
6179         
6180         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
6181 echo "configure:6182: checking for LinuxThreads consistency" >&5
6182 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then
6183   echo $ac_n "(cached) $ac_c" 1>&6
6184 else
6185   
6186                 if test $ol_cv_header_linux_threads = yes -a \
6187                         $ol_cv_sys_linux_threads = yes; then
6188                         ol_cv_linux_threads=yes
6189                 elif test $ol_cv_header_linux_threads = no -a \
6190                         $ol_cv_sys_linux_threads = no; then
6191                         ol_cv_linux_threads=no
6192                 else
6193                         ol_cv_linux_threads=error
6194                 fi
6195         
6196 fi
6197
6198 echo "$ac_t""$ol_cv_linux_threads" 1>&6
6199
6200
6201                         if test $ol_cv_linux_threads = error; then
6202                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
6203                         fi
6204
6205                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
6206 echo "configure:6207: checking if pthread_create() works" >&5
6207                         if eval "test \"`echo '$''{'ol_cv_pthread_create_works'+set}'`\" = set"; then
6208   echo $ac_n "(cached) $ac_c" 1>&6
6209 else
6210   
6211                         if test "$cross_compiling" = yes; then
6212                                 ol_cv_pthread_create_works=yes
6213 else
6214   cat > conftest.$ac_ext <<EOF
6215 #line 6216 "configure"
6216 #include "confdefs.h"
6217
6218 #include <pthread.h>
6219 #ifndef NULL
6220 #define NULL (void*)0
6221 #endif
6222
6223 static void *task(p)
6224         void *p;
6225 {
6226         return (void *) (p == NULL);
6227 }
6228
6229 int main(argc, argv)
6230         int argc;
6231         char **argv;
6232 {
6233         pthread_t t;
6234 #if HAVE_PTHREADS_D4
6235         exit(pthread_create(&t, pthread_attr_default, task, NULL));
6236 #else
6237         exit(pthread_create(&t, NULL, task, NULL));
6238 #endif
6239 }
6240
6241 EOF
6242 if { (eval echo configure:6243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6243 then
6244   ol_cv_pthread_create_works=yes
6245 else
6246   echo "configure: failed program was:" >&5
6247   cat conftest.$ac_ext >&5
6248   rm -fr conftest*
6249   ol_cv_pthread_create_works=no
6250 fi
6251 rm -fr conftest*
6252 fi
6253
6254 fi
6255
6256                         echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
6257
6258                         if test $ol_cv_pthread_create_works = no ; then
6259                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
6260                         fi
6261
6262                                                 if test $ol_with_yielding_select = auto ; then
6263                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
6264 echo "configure:6265: checking if select yields when using pthreads" >&5
6265                                 if eval "test \"`echo '$''{'ol_cv_pthread_select_yields'+set}'`\" = set"; then
6266   echo $ac_n "(cached) $ac_c" 1>&6
6267 else
6268   
6269                                 if test "$cross_compiling" = yes; then
6270   
6271                                 { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
6272 else
6273   cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276
6277 #include <sys/types.h>
6278 #include <sys/time.h>
6279 #include <unistd.h>
6280 #include <pthread.h>
6281 #ifndef NULL
6282 #define NULL (void*) 0
6283 #endif
6284
6285 static int fildes[2];
6286
6287 static void *task(p)
6288         void *p;
6289 {
6290         int i;
6291         struct timeval tv;
6292
6293         fd_set rfds;
6294
6295         tv.tv_sec=10;
6296         tv.tv_usec=0;
6297
6298         FD_ZERO(&rfds);
6299         FD_SET(fildes[0], &rfds);
6300
6301         /* we're not interested in any fds */
6302         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
6303
6304         if(i < 0) {
6305                 perror("select");
6306                 exit(10);
6307         }
6308
6309         exit(0); /* if we exit here, the select blocked the whole process */
6310 }
6311
6312 int main(argc, argv)
6313         int argc;
6314         char **argv;
6315 {
6316         pthread_t t;
6317
6318         /* create a pipe to select */
6319         if(pipe(&fildes[0])) {
6320                 perror("select");
6321                 exit(1);
6322         }
6323
6324 #ifdef HAVE_PTHREAD_SETCONCURRENCY
6325         (void) pthread_setconcurrency(2);
6326 #else
6327 #ifdef HAVE_THR_SETCONCURRENCY
6328         /* Set Solaris LWP concurrency to 2 */
6329         thr_setconcurrency(2);
6330 #endif
6331 #endif
6332
6333 #if HAVE_PTHREADS_D4
6334         pthread_create(&t, pthread_attr_default, task, NULL);
6335 #else
6336         pthread_create(&t, NULL, task, NULL);
6337 #endif
6338
6339 #if HAVE_SCHED_YIELD
6340         sched_yield();  /* make sure task runs first */
6341 #else
6342 #ifdef HAVE_PTHREAD_YIELD
6343         pthread_yield();        /* make sure task runs first */
6344 #endif
6345 #endif
6346
6347         exit(2);
6348 }
6349 EOF
6350 if { (eval echo configure:6351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6351 then
6352   ol_cv_pthread_select_yields=no
6353 else
6354   echo "configure: failed program was:" >&5
6355   cat conftest.$ac_ext >&5
6356   rm -fr conftest*
6357   ol_cv_pthread_select_yields=yes
6358 fi
6359 rm -fr conftest*
6360 fi
6361
6362 fi
6363
6364                                 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
6365
6366                                 if test $ol_cv_pthread_select_yields = yes ; then
6367                                         ol_with_yielding_select=yes
6368                                 fi
6369                         fi
6370
6371                                                 CPPFLAGS="$save_CPPFLAGS"
6372                         LIBS="$save_LIBS"
6373                 else
6374                         { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; }
6375                 fi
6376         fi
6377
6378         if test $ol_with_threads = posix ; then
6379                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
6380         fi
6381 fi
6382
6383 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6384         -o $ol_with_threads = mach ; then
6385
6386                 for ac_hdr in mach/cthreads.h
6387 do
6388 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6389 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6390 echo "configure:6391: checking for $ac_hdr" >&5
6391 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6392   echo $ac_n "(cached) $ac_c" 1>&6
6393 else
6394   cat > conftest.$ac_ext <<EOF
6395 #line 6396 "configure"
6396 #include "confdefs.h"
6397 #include <$ac_hdr>
6398 EOF
6399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6400 { (eval echo configure:6401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6402 if test -z "$ac_err"; then
6403   rm -rf conftest*
6404   eval "ac_cv_header_$ac_safe=yes"
6405 else
6406   echo "$ac_err" >&5
6407   echo "configure: failed program was:" >&5
6408   cat conftest.$ac_ext >&5
6409   rm -rf conftest*
6410   eval "ac_cv_header_$ac_safe=no"
6411 fi
6412 rm -f conftest*
6413 fi
6414 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6415   echo "$ac_t""yes" 1>&6
6416     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6417   cat >> confdefs.h <<EOF
6418 #define $ac_tr_hdr 1
6419 EOF
6420  
6421 else
6422   echo "$ac_t""no" 1>&6
6423 fi
6424 done
6425
6426         if test $ac_cv_header_mach_cthreads_h = yes ; then
6427                 ol_with_threads=found
6428
6429                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
6430 echo "configure:6431: checking for cthread_fork" >&5
6431 if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then
6432   echo $ac_n "(cached) $ac_c" 1>&6
6433 else
6434   cat > conftest.$ac_ext <<EOF
6435 #line 6436 "configure"
6436 #include "confdefs.h"
6437 /* System header to define __stub macros and hopefully few prototypes,
6438     which can conflict with char cthread_fork(); below.  */
6439 #include <assert.h>
6440 /* Override any gcc2 internal prototype to avoid an error.  */
6441 /* We use char because int might match the return type of a gcc2
6442     builtin and then its argument prototype would still apply.  */
6443 char cthread_fork();
6444
6445 int main() {
6446
6447 /* The GNU C library defines this for functions which it implements
6448     to always fail with ENOSYS.  Some functions are actually named
6449     something starting with __ and the normal name is an alias.  */
6450 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
6451 choke me
6452 #else
6453 cthread_fork();
6454 #endif
6455
6456 ; return 0; }
6457 EOF
6458 if { (eval echo configure:6459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6459   rm -rf conftest*
6460   eval "ac_cv_func_cthread_fork=yes"
6461 else
6462   echo "configure: failed program was:" >&5
6463   cat conftest.$ac_ext >&5
6464   rm -rf conftest*
6465   eval "ac_cv_func_cthread_fork=no"
6466 fi
6467 rm -f conftest*
6468 fi
6469
6470 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
6471   echo "$ac_t""yes" 1>&6
6472   ol_link_threads=yes
6473 else
6474   echo "$ac_t""no" 1>&6
6475 fi
6476
6477
6478                 if test $ol_link_threads = no ; then
6479                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
6480 echo "configure:6481: checking for cthread_fork with -all_load" >&5
6481 if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then
6482   echo $ac_n "(cached) $ac_c" 1>&6
6483 else
6484   
6485                                                                 save_LIBS="$LIBS"
6486                                 LIBS="-all_load $LIBS"
6487                                 cat > conftest.$ac_ext <<EOF
6488 #line 6489 "configure"
6489 #include "confdefs.h"
6490 #include <mach/cthreads.h>
6491 int main() {
6492
6493                                         cthread_fork((void *)0, (void *)0);
6494                                         
6495 ; return 0; }
6496 EOF
6497 if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6498   rm -rf conftest*
6499   ol_cv_cthread_all_load=yes
6500 else
6501   echo "configure: failed program was:" >&5
6502   cat conftest.$ac_ext >&5
6503   rm -rf conftest*
6504   ol_cv_cthread_all_load=no
6505 fi
6506 rm -f conftest*
6507                                                                 LIBS="$save_LIBS"
6508                         
6509 fi
6510
6511 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
6512
6513                         if test $ol_cv_cthread_all_load = yes ; then
6514                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
6515                                 ol_link_threads=mach
6516                         fi
6517                 fi
6518
6519                 if test $ol_link_threads != no ; then
6520                         : check for cthread specific functionality here
6521                         cat >> confdefs.h <<\EOF
6522 #define HAVE_MACH_CTHREADS 1
6523 EOF
6524
6525                 else
6526                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
6527                 fi
6528         fi
6529
6530         if test $ol_with_threads = mach ; then
6531                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
6532         fi
6533 fi
6534
6535 if test $ol_with_threads = auto -o $ol_with_threads = yes \
6536         -o $ol_with_threads = lwp ; then
6537
6538                 for ac_hdr in thread.h synch.h
6539 do
6540 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6541 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6542 echo "configure:6543: checking for $ac_hdr" >&5
6543 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6544   echo $ac_n "(cached) $ac_c" 1>&6
6545 else
6546   cat > conftest.$ac_ext <<EOF
6547 #line 6548 "configure"
6548 #include "confdefs.h"
6549 #include <$ac_hdr>
6550 EOF
6551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6552 { (eval echo configure:6553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6554 if test -z "$ac_err"; then
6555   rm -rf conftest*
6556   eval "ac_cv_header_$ac_safe=yes"
6557 else
6558   echo "$ac_err" >&5
6559   echo "configure: failed program was:" >&5
6560   cat conftest.$ac_ext >&5
6561   rm -rf conftest*
6562   eval "ac_cv_header_$ac_safe=no"
6563 fi
6564 rm -f conftest*
6565 fi
6566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6567   echo "$ac_t""yes" 1>&6
6568     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6569   cat >> confdefs.h <<EOF
6570 #define $ac_tr_hdr 1
6571 EOF
6572  
6573 else
6574   echo "$ac_t""no" 1>&6
6575 fi
6576 done
6577
6578         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
6579                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
6580 echo "configure:6581: checking for thr_create in -lthread" >&5
6581 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
6582 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6583   echo $ac_n "(cached) $ac_c" 1>&6
6584 else
6585   ac_save_LIBS="$LIBS"
6586 LIBS="-lthread  $LIBS"
6587 cat > conftest.$ac_ext <<EOF
6588 #line 6589 "configure"
6589 #include "confdefs.h"
6590 /* Override any gcc2 internal prototype to avoid an error.  */
6591 /* We use char because int might match the return type of a gcc2
6592     builtin and then its argument prototype would still apply.  */
6593 char thr_create();
6594
6595 int main() {
6596 thr_create()
6597 ; return 0; }
6598 EOF
6599 if { (eval echo configure:6600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6600   rm -rf conftest*
6601   eval "ac_cv_lib_$ac_lib_var=yes"
6602 else
6603   echo "configure: failed program was:" >&5
6604   cat conftest.$ac_ext >&5
6605   rm -rf conftest*
6606   eval "ac_cv_lib_$ac_lib_var=no"
6607 fi
6608 rm -f conftest*
6609 LIBS="$ac_save_LIBS"
6610
6611 fi
6612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6613   echo "$ac_t""yes" 1>&6
6614   have_thr=yes
6615 else
6616   echo "$ac_t""no" 1>&6
6617 have_thr=no
6618 fi
6619
6620
6621                 if test $have_thr = yes ; then
6622                         cat >> confdefs.h <<\EOF
6623 #define HAVE_THR 1
6624 EOF
6625
6626                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
6627                         ol_link_threads=thr
6628
6629                         if test $ol_with_yielding_select = auto ; then
6630                                 ol_with_yielding_select=yes
6631                         fi
6632
6633                                                 for ac_func in \
6634                                 thr_setconcurrency \
6635                                 thr_getconcurrency \
6636                         
6637 do
6638 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6639 echo "configure:6640: checking for $ac_func" >&5
6640 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6641   echo $ac_n "(cached) $ac_c" 1>&6
6642 else
6643   cat > conftest.$ac_ext <<EOF
6644 #line 6645 "configure"
6645 #include "confdefs.h"
6646 /* System header to define __stub macros and hopefully few prototypes,
6647     which can conflict with char $ac_func(); below.  */
6648 #include <assert.h>
6649 /* Override any gcc2 internal prototype to avoid an error.  */
6650 /* We use char because int might match the return type of a gcc2
6651     builtin and then its argument prototype would still apply.  */
6652 char $ac_func();
6653
6654 int main() {
6655
6656 /* The GNU C library defines this for functions which it implements
6657     to always fail with ENOSYS.  Some functions are actually named
6658     something starting with __ and the normal name is an alias.  */
6659 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6660 choke me
6661 #else
6662 $ac_func();
6663 #endif
6664
6665 ; return 0; }
6666 EOF
6667 if { (eval echo configure:6668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6668   rm -rf conftest*
6669   eval "ac_cv_func_$ac_func=yes"
6670 else
6671   echo "configure: failed program was:" >&5
6672   cat conftest.$ac_ext >&5
6673   rm -rf conftest*
6674   eval "ac_cv_func_$ac_func=no"
6675 fi
6676 rm -f conftest*
6677 fi
6678
6679 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6680   echo "$ac_t""yes" 1>&6
6681     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6682   cat >> confdefs.h <<EOF
6683 #define $ac_tr_func 1
6684 EOF
6685  
6686 else
6687   echo "$ac_t""no" 1>&6
6688 fi
6689 done
6690
6691                 fi
6692         fi
6693
6694                 for ac_hdr in lwp/lwp.h
6695 do
6696 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6697 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6698 echo "configure:6699: checking for $ac_hdr" >&5
6699 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6700   echo $ac_n "(cached) $ac_c" 1>&6
6701 else
6702   cat > conftest.$ac_ext <<EOF
6703 #line 6704 "configure"
6704 #include "confdefs.h"
6705 #include <$ac_hdr>
6706 EOF
6707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6708 { (eval echo configure:6709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6710 if test -z "$ac_err"; then
6711   rm -rf conftest*
6712   eval "ac_cv_header_$ac_safe=yes"
6713 else
6714   echo "$ac_err" >&5
6715   echo "configure: failed program was:" >&5
6716   cat conftest.$ac_ext >&5
6717   rm -rf conftest*
6718   eval "ac_cv_header_$ac_safe=no"
6719 fi
6720 rm -f conftest*
6721 fi
6722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6723   echo "$ac_t""yes" 1>&6
6724     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6725   cat >> confdefs.h <<EOF
6726 #define $ac_tr_hdr 1
6727 EOF
6728  
6729 else
6730   echo "$ac_t""no" 1>&6
6731 fi
6732 done
6733
6734         if test $ac_cv_header_lwp_lwp_h = yes ; then
6735                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
6736 echo "configure:6737: checking for lwp_create in -llwp" >&5
6737 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'`
6738 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6739   echo $ac_n "(cached) $ac_c" 1>&6
6740 else
6741   ac_save_LIBS="$LIBS"
6742 LIBS="-llwp  $LIBS"
6743 cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746 /* Override any gcc2 internal prototype to avoid an error.  */
6747 /* We use char because int might match the return type of a gcc2
6748     builtin and then its argument prototype would still apply.  */
6749 char lwp_create();
6750
6751 int main() {
6752 lwp_create()
6753 ; return 0; }
6754 EOF
6755 if { (eval echo configure:6756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6756   rm -rf conftest*
6757   eval "ac_cv_lib_$ac_lib_var=yes"
6758 else
6759   echo "configure: failed program was:" >&5
6760   cat conftest.$ac_ext >&5
6761   rm -rf conftest*
6762   eval "ac_cv_lib_$ac_lib_var=no"
6763 fi
6764 rm -f conftest*
6765 LIBS="$ac_save_LIBS"
6766
6767 fi
6768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6769   echo "$ac_t""yes" 1>&6
6770   have_lwp=yes
6771 else
6772   echo "$ac_t""no" 1>&6
6773 have_lwp=no
6774 fi
6775
6776
6777                 if test $have_lwp = yes ; then
6778                         cat >> confdefs.h <<\EOF
6779 #define HAVE_LWP 1
6780 EOF
6781
6782                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
6783                         ol_link_threads=lwp
6784
6785                         if test $ol_with_yielding_select = auto ; then
6786                                 ol_with_yielding_select=no
6787                         fi
6788                 fi
6789         fi
6790 fi
6791
6792 if test $ol_with_yielding_select = yes ; then
6793         cat >> confdefs.h <<\EOF
6794 #define HAVE_YIELDING_SELECT 1
6795 EOF
6796
6797 fi
6798
6799 if test $ol_with_threads = manual ; then
6800                 ol_link_threads=yes
6801
6802         echo "configure: warning: thread defines and link options must be set manually" 1>&2
6803
6804         for ac_hdr in pthread.h sched.h
6805 do
6806 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6807 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6808 echo "configure:6809: checking for $ac_hdr" >&5
6809 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6810   echo $ac_n "(cached) $ac_c" 1>&6
6811 else
6812   cat > conftest.$ac_ext <<EOF
6813 #line 6814 "configure"
6814 #include "confdefs.h"
6815 #include <$ac_hdr>
6816 EOF
6817 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6818 { (eval echo configure:6819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6819 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6820 if test -z "$ac_err"; then
6821   rm -rf conftest*
6822   eval "ac_cv_header_$ac_safe=yes"
6823 else
6824   echo "$ac_err" >&5
6825   echo "configure: failed program was:" >&5
6826   cat conftest.$ac_ext >&5
6827   rm -rf conftest*
6828   eval "ac_cv_header_$ac_safe=no"
6829 fi
6830 rm -f conftest*
6831 fi
6832 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6833   echo "$ac_t""yes" 1>&6
6834     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6835   cat >> confdefs.h <<EOF
6836 #define $ac_tr_hdr 1
6837 EOF
6838  
6839 else
6840   echo "$ac_t""no" 1>&6
6841 fi
6842 done
6843
6844         for ac_func in sched_yield pthread_yield
6845 do
6846 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6847 echo "configure:6848: checking for $ac_func" >&5
6848 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6849   echo $ac_n "(cached) $ac_c" 1>&6
6850 else
6851   cat > conftest.$ac_ext <<EOF
6852 #line 6853 "configure"
6853 #include "confdefs.h"
6854 /* System header to define __stub macros and hopefully few prototypes,
6855     which can conflict with char $ac_func(); below.  */
6856 #include <assert.h>
6857 /* Override any gcc2 internal prototype to avoid an error.  */
6858 /* We use char because int might match the return type of a gcc2
6859     builtin and then its argument prototype would still apply.  */
6860 char $ac_func();
6861
6862 int main() {
6863
6864 /* The GNU C library defines this for functions which it implements
6865     to always fail with ENOSYS.  Some functions are actually named
6866     something starting with __ and the normal name is an alias.  */
6867 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6868 choke me
6869 #else
6870 $ac_func();
6871 #endif
6872
6873 ; return 0; }
6874 EOF
6875 if { (eval echo configure:6876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6876   rm -rf conftest*
6877   eval "ac_cv_func_$ac_func=yes"
6878 else
6879   echo "configure: failed program was:" >&5
6880   cat conftest.$ac_ext >&5
6881   rm -rf conftest*
6882   eval "ac_cv_func_$ac_func=no"
6883 fi
6884 rm -f conftest*
6885 fi
6886
6887 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6888   echo "$ac_t""yes" 1>&6
6889     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6890   cat >> confdefs.h <<EOF
6891 #define $ac_tr_func 1
6892 EOF
6893  
6894 else
6895   echo "$ac_t""no" 1>&6
6896 fi
6897 done
6898
6899         
6900         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
6901 echo "configure:6902: checking for LinuxThreads pthread.h" >&5
6902 if eval "test \"`echo '$''{'ol_cv_header_linux_threads'+set}'`\" = set"; then
6903   echo $ac_n "(cached) $ac_c" 1>&6
6904 else
6905   cat > conftest.$ac_ext <<EOF
6906 #line 6907 "configure"
6907 #include "confdefs.h"
6908 #include <pthread.h>
6909 EOF
6910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6911   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
6912   rm -rf conftest*
6913   ol_cv_header_linux_threads=yes
6914 else
6915   rm -rf conftest*
6916   ol_cv_header_linux_threads=no
6917 fi
6918 rm -f conftest*
6919
6920                 
6921 fi
6922
6923 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
6924         if test $ol_cv_header_linux_threads = yes; then
6925                 cat >> confdefs.h <<\EOF
6926 #define HAVE_LINUX_THREADS 1
6927 EOF
6928
6929         fi
6930
6931
6932         for ac_hdr in mach/cthreads.h
6933 do
6934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6936 echo "configure:6937: checking for $ac_hdr" >&5
6937 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6938   echo $ac_n "(cached) $ac_c" 1>&6
6939 else
6940   cat > conftest.$ac_ext <<EOF
6941 #line 6942 "configure"
6942 #include "confdefs.h"
6943 #include <$ac_hdr>
6944 EOF
6945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6946 { (eval echo configure:6947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6948 if test -z "$ac_err"; then
6949   rm -rf conftest*
6950   eval "ac_cv_header_$ac_safe=yes"
6951 else
6952   echo "$ac_err" >&5
6953   echo "configure: failed program was:" >&5
6954   cat conftest.$ac_ext >&5
6955   rm -rf conftest*
6956   eval "ac_cv_header_$ac_safe=no"
6957 fi
6958 rm -f conftest*
6959 fi
6960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6961   echo "$ac_t""yes" 1>&6
6962     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6963   cat >> confdefs.h <<EOF
6964 #define $ac_tr_hdr 1
6965 EOF
6966  
6967 else
6968   echo "$ac_t""no" 1>&6
6969 fi
6970 done
6971
6972         for ac_hdr in lwp/lwp.h
6973 do
6974 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6975 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6976 echo "configure:6977: checking for $ac_hdr" >&5
6977 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6978   echo $ac_n "(cached) $ac_c" 1>&6
6979 else
6980   cat > conftest.$ac_ext <<EOF
6981 #line 6982 "configure"
6982 #include "confdefs.h"
6983 #include <$ac_hdr>
6984 EOF
6985 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6986 { (eval echo configure:6987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6987 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6988 if test -z "$ac_err"; then
6989   rm -rf conftest*
6990   eval "ac_cv_header_$ac_safe=yes"
6991 else
6992   echo "$ac_err" >&5
6993   echo "configure: failed program was:" >&5
6994   cat conftest.$ac_ext >&5
6995   rm -rf conftest*
6996   eval "ac_cv_header_$ac_safe=no"
6997 fi
6998 rm -f conftest*
6999 fi
7000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7001   echo "$ac_t""yes" 1>&6
7002     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7003   cat >> confdefs.h <<EOF
7004 #define $ac_tr_hdr 1
7005 EOF
7006  
7007 else
7008   echo "$ac_t""no" 1>&6
7009 fi
7010 done
7011
7012         for ac_hdr in thread.h synch.h
7013 do
7014 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7015 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7016 echo "configure:7017: checking for $ac_hdr" >&5
7017 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7018   echo $ac_n "(cached) $ac_c" 1>&6
7019 else
7020   cat > conftest.$ac_ext <<EOF
7021 #line 7022 "configure"
7022 #include "confdefs.h"
7023 #include <$ac_hdr>
7024 EOF
7025 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7026 { (eval echo configure:7027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7027 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7028 if test -z "$ac_err"; then
7029   rm -rf conftest*
7030   eval "ac_cv_header_$ac_safe=yes"
7031 else
7032   echo "$ac_err" >&5
7033   echo "configure: failed program was:" >&5
7034   cat conftest.$ac_ext >&5
7035   rm -rf conftest*
7036   eval "ac_cv_header_$ac_safe=no"
7037 fi
7038 rm -f conftest*
7039 fi
7040 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7041   echo "$ac_t""yes" 1>&6
7042     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7043   cat >> confdefs.h <<EOF
7044 #define $ac_tr_hdr 1
7045 EOF
7046  
7047 else
7048   echo "$ac_t""no" 1>&6
7049 fi
7050 done
7051
7052 fi
7053
7054 if test $ol_link_threads != no ; then  
7055                         cat >> confdefs.h <<\EOF
7056 #define REENTRANT 1
7057 EOF
7058
7059         cat >> confdefs.h <<\EOF
7060 #define _REENTRANT 1
7061 EOF
7062
7063         cat >> confdefs.h <<\EOF
7064 #define THREAD_SAFE 1
7065 EOF
7066
7067         cat >> confdefs.h <<\EOF
7068 #define _THREAD_SAFE 1
7069 EOF
7070
7071         cat >> confdefs.h <<\EOF
7072 #define THREADSAFE 1
7073 EOF
7074
7075         cat >> confdefs.h <<\EOF
7076 #define _THREADSAFE 1
7077 EOF
7078
7079
7080                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
7081 echo "configure:7082: checking for thread specific errno" >&5
7082 if eval "test \"`echo '$''{'ol_cv_errno_thread_specific'+set}'`\" = set"; then
7083   echo $ac_n "(cached) $ac_c" 1>&6
7084 else
7085   
7086                 cat > conftest.$ac_ext <<EOF
7087 #line 7088 "configure"
7088 #include "confdefs.h"
7089 #include <errno.h>
7090 int main() {
7091 errno = 0;
7092 ; return 0; }
7093 EOF
7094 if { (eval echo configure:7095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7095   rm -rf conftest*
7096   ol_cv_errno_thread_specific=yes
7097 else
7098   echo "configure: failed program was:" >&5
7099   cat conftest.$ac_ext >&5
7100   rm -rf conftest*
7101   ol_cv_errno_thread_specific=no
7102 fi
7103 rm -f conftest*
7104         
7105 fi
7106
7107 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
7108
7109         if test $ol_cv_errno_thread_specific != yes ; then
7110                 LIBS="$LTHREAD_LIBS $LIBS"
7111                 LTHREAD_LIBS=""
7112         fi
7113
7114 fi  
7115
7116 if test $ol_link_threads = no ; then
7117         if test $ol_with_threads = yes ; then
7118                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
7119         fi
7120
7121         if test $ol_with_threads = auto ; then
7122                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
7123                 ol_with_threads=no
7124         fi
7125
7126         cat >> confdefs.h <<\EOF
7127 #define NO_THREADS 1
7128 EOF
7129
7130         LTHREAD_LIBS=""
7131 fi
7132
7133 if test $ol_link_threads != no ; then
7134         cat >> confdefs.h <<\EOF
7135 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
7136 EOF
7137
7138 fi
7139
7140
7141 ol_link_ldbm=no 
7142 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
7143         echo $ac_n "checking for DB2 library""... $ac_c" 1>&6
7144 echo "configure:7145: checking for DB2 library" >&5
7145 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then
7146   echo $ac_n "(cached) $ac_c" 1>&6
7147 else
7148         ol_LIBS="$LIBS"
7149         echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6
7150 echo "configure:7151: checking for db_open in -ldb" >&5
7151 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'`
7152 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7153   echo $ac_n "(cached) $ac_c" 1>&6
7154 else
7155   ac_save_LIBS="$LIBS"
7156 LIBS="-ldb  $LIBS"
7157 cat > conftest.$ac_ext <<EOF
7158 #line 7159 "configure"
7159 #include "confdefs.h"
7160 /* Override any gcc2 internal prototype to avoid an error.  */
7161 /* We use char because int might match the return type of a gcc2
7162     builtin and then its argument prototype would still apply.  */
7163 char db_open();
7164
7165 int main() {
7166 db_open()
7167 ; return 0; }
7168 EOF
7169 if { (eval echo configure:7170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7170   rm -rf conftest*
7171   eval "ac_cv_lib_$ac_lib_var=yes"
7172 else
7173   echo "configure: failed program was:" >&5
7174   cat conftest.$ac_ext >&5
7175   rm -rf conftest*
7176   eval "ac_cv_lib_$ac_lib_var=no"
7177 fi
7178 rm -f conftest*
7179 LIBS="$ac_save_LIBS"
7180
7181 fi
7182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7183   echo "$ac_t""yes" 1>&6
7184   ol_cv_lib_db2=-ldb
7185 else
7186   echo "$ac_t""no" 1>&6
7187 ol_cv_lib_db2=no
7188 fi
7189
7190         LIBS="$ol_LIBS"
7191
7192 fi
7193
7194 echo "$ac_t""$ol_cv_lib_db2" 1>&6
7195
7196 for ac_hdr in db.h
7197 do
7198 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7199 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7200 echo "configure:7201: checking for $ac_hdr" >&5
7201 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7202   echo $ac_n "(cached) $ac_c" 1>&6
7203 else
7204   cat > conftest.$ac_ext <<EOF
7205 #line 7206 "configure"
7206 #include "confdefs.h"
7207 #include <$ac_hdr>
7208 EOF
7209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7210 { (eval echo configure:7211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7212 if test -z "$ac_err"; then
7213   rm -rf conftest*
7214   eval "ac_cv_header_$ac_safe=yes"
7215 else
7216   echo "$ac_err" >&5
7217   echo "configure: failed program was:" >&5
7218   cat conftest.$ac_ext >&5
7219   rm -rf conftest*
7220   eval "ac_cv_header_$ac_safe=no"
7221 fi
7222 rm -f conftest*
7223 fi
7224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7225   echo "$ac_t""yes" 1>&6
7226     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7227   cat >> confdefs.h <<EOF
7228 #define $ac_tr_hdr 1
7229 EOF
7230  
7231 else
7232   echo "$ac_t""no" 1>&6
7233 fi
7234 done
7235
7236 if test $ac_cv_header_db_h = yes ; then
7237         echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6
7238 echo "configure:7239: checking if db.h is DB2" >&5
7239 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then
7240   echo $ac_n "(cached) $ac_c" 1>&6
7241 else
7242   
7243                 cat > conftest.$ac_ext <<EOF
7244 #line 7245 "configure"
7245 #include "confdefs.h"
7246
7247 #                       include <db.h>
7248                         /* this check could be improved */
7249 #                       ifdef DB_VERSION_MAJOR
7250 #                               if DB_VERSION_MAJOR == 2
7251                                         __db_version_2
7252 #                               endif
7253 #                       endif
7254                 
7255 EOF
7256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7257   egrep "__db_version_2" >/dev/null 2>&1; then
7258   rm -rf conftest*
7259   ol_cv_header_db2=yes
7260 else
7261   rm -rf conftest*
7262   ol_cv_header_db2=no
7263 fi
7264 rm -f conftest*
7265
7266 fi
7267
7268 echo "$ac_t""$ol_cv_header_db2" 1>&6
7269 else
7270         ol_cv_header_db2=no
7271 fi
7272
7273
7274  
7275  echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6
7276 echo "configure:7277: checking for Berkeley DB2" >&5
7277 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then
7278   echo $ac_n "(cached) $ac_c" 1>&6
7279 else
7280   
7281         if test "$ol_cv_lib_db2" = no -o "$ol_cv_header_db2" = no ; then
7282                 ol_cv_berkeley_db2=no
7283         else
7284                 ol_cv_berkeley_db2=yes
7285         fi
7286
7287 fi
7288
7289 echo "$ac_t""$ol_cv_berkeley_db2" 1>&6
7290  if test $ol_cv_berkeley_db2 = yes ; then
7291         cat >> confdefs.h <<\EOF
7292 #define HAVE_BERKELEY_DB2 1
7293 EOF
7294
7295  fi
7296
7297
7298         if test $ol_cv_berkeley_db2 = yes ; then
7299                 ol_link_ldbm=db2
7300                 ol_with_ldbm_api=db2
7301
7302                 if test $ol_with_ldbm_type = hash ; then
7303                         cat >> confdefs.h <<\EOF
7304 #define LDBM_USE_DBHASH 1
7305 EOF
7306
7307                 else
7308                         cat >> confdefs.h <<\EOF
7309 #define LDBM_USE_DBBTREE 1
7310 EOF
7311
7312                 fi
7313
7314                                                 if test $ol_cv_lib_db2 != yes ; then
7315                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db2"
7316                 fi
7317         fi
7318 fi
7319
7320 ol_link_bdb2=no
7321 if test $ol_link_ldbm = db2 -a $ol_enable_bdb2 != no ; then
7322         ol_link_bdb2=yes
7323 fi
7324
7325 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
7326         echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6
7327 echo "configure:7328: checking for Berkeley DB library" >&5
7328 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then
7329   echo $ac_n "(cached) $ac_c" 1>&6
7330 else
7331         ol_LIBS="$LIBS"
7332         echo $ac_n "checking for dbopen""... $ac_c" 1>&6
7333 echo "configure:7334: checking for dbopen" >&5
7334 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
7335   echo $ac_n "(cached) $ac_c" 1>&6
7336 else
7337   cat > conftest.$ac_ext <<EOF
7338 #line 7339 "configure"
7339 #include "confdefs.h"
7340 /* System header to define __stub macros and hopefully few prototypes,
7341     which can conflict with char dbopen(); below.  */
7342 #include <assert.h>
7343 /* Override any gcc2 internal prototype to avoid an error.  */
7344 /* We use char because int might match the return type of a gcc2
7345     builtin and then its argument prototype would still apply.  */
7346 char dbopen();
7347
7348 int main() {
7349
7350 /* The GNU C library defines this for functions which it implements
7351     to always fail with ENOSYS.  Some functions are actually named
7352     something starting with __ and the normal name is an alias.  */
7353 #if defined (__stub_dbopen) || defined (__stub___dbopen)
7354 choke me
7355 #else
7356 dbopen();
7357 #endif
7358
7359 ; return 0; }
7360 EOF
7361 if { (eval echo configure:7362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7362   rm -rf conftest*
7363   eval "ac_cv_func_dbopen=yes"
7364 else
7365   echo "configure: failed program was:" >&5
7366   cat conftest.$ac_ext >&5
7367   rm -rf conftest*
7368   eval "ac_cv_func_dbopen=no"
7369 fi
7370 rm -f conftest*
7371 fi
7372
7373 if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
7374   echo "$ac_t""yes" 1>&6
7375   ol_cv_lib_db=yes
7376 else
7377   echo "$ac_t""no" 1>&6
7378
7379                 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
7380 echo "configure:7381: checking for dbopen in -ldb" >&5
7381 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
7382 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7383   echo $ac_n "(cached) $ac_c" 1>&6
7384 else
7385   ac_save_LIBS="$LIBS"
7386 LIBS="-ldb  $LIBS"
7387 cat > conftest.$ac_ext <<EOF
7388 #line 7389 "configure"
7389 #include "confdefs.h"
7390 /* Override any gcc2 internal prototype to avoid an error.  */
7391 /* We use char because int might match the return type of a gcc2
7392     builtin and then its argument prototype would still apply.  */
7393 char dbopen();
7394
7395 int main() {
7396 dbopen()
7397 ; return 0; }
7398 EOF
7399 if { (eval echo configure:7400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7400   rm -rf conftest*
7401   eval "ac_cv_lib_$ac_lib_var=yes"
7402 else
7403   echo "configure: failed program was:" >&5
7404   cat conftest.$ac_ext >&5
7405   rm -rf conftest*
7406   eval "ac_cv_lib_$ac_lib_var=no"
7407 fi
7408 rm -f conftest*
7409 LIBS="$ac_save_LIBS"
7410
7411 fi
7412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7413   echo "$ac_t""yes" 1>&6
7414   ol_cv_lib_db=-ldb
7415 else
7416   echo "$ac_t""no" 1>&6
7417 ol_cv_lib_db=no
7418 fi
7419
7420         
7421 fi
7422
7423         LIBS="$ol_LIBS"
7424
7425 fi
7426
7427 echo "$ac_t""$ol_cv_lib_db" 1>&6
7428
7429
7430 for ac_hdr in db_185.h
7431 do
7432 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7433 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7434 echo "configure:7435: checking for $ac_hdr" >&5
7435 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7436   echo $ac_n "(cached) $ac_c" 1>&6
7437 else
7438   cat > conftest.$ac_ext <<EOF
7439 #line 7440 "configure"
7440 #include "confdefs.h"
7441 #include <$ac_hdr>
7442 EOF
7443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7444 { (eval echo configure:7445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7446 if test -z "$ac_err"; then
7447   rm -rf conftest*
7448   eval "ac_cv_header_$ac_safe=yes"
7449 else
7450   echo "$ac_err" >&5
7451   echo "configure: failed program was:" >&5
7452   cat conftest.$ac_ext >&5
7453   rm -rf conftest*
7454   eval "ac_cv_header_$ac_safe=no"
7455 fi
7456 rm -f conftest*
7457 fi
7458 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7459   echo "$ac_t""yes" 1>&6
7460     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7461   cat >> confdefs.h <<EOF
7462 #define $ac_tr_hdr 1
7463 EOF
7464  
7465 else
7466   echo "$ac_t""no" 1>&6
7467 fi
7468 done
7469
7470 if test "$ol_cv_header_db2" = yes ; then
7471         
7472         ol_cv_header_db=$ac_cv_header_db_185_h
7473 else
7474         ol_cv_header_db=$ac_cv_header_db_h
7475 fi
7476
7477
7478  
7479  echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6
7480 echo "configure:7481: checking for Berkeley DB" >&5
7481 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then
7482   echo $ac_n "(cached) $ac_c" 1>&6
7483 else
7484   
7485         if test "$ol_cv_lib_db" = no -o "$ol_cv_header_db" = no ; then
7486                 ol_cv_berkeley_db=no
7487         else
7488                 ol_cv_berkeley_db=yes
7489         fi
7490
7491 fi
7492
7493 echo "$ac_t""$ol_cv_berkeley_db" 1>&6
7494  if test $ol_cv_berkeley_db = yes ; then
7495         cat >> confdefs.h <<\EOF
7496 #define HAVE_BERKELEY_DB 1
7497 EOF
7498
7499  fi
7500
7501
7502         if test $ol_cv_berkeley_db = yes ; then
7503                 ol_link_ldbm=db
7504                 ol_with_ldbm_api=db
7505
7506                 if test $ol_with_ldbm_type = hash ; then
7507                         cat >> confdefs.h <<\EOF
7508 #define LDBM_USE_DBHASH 1
7509 EOF
7510
7511                 else
7512                         cat >> confdefs.h <<\EOF
7513 #define LDBM_USE_DBBTREE 1
7514 EOF
7515
7516                 fi
7517
7518                                                 if test $ol_cv_lib_db != yes ; then
7519                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
7520                 fi
7521         fi
7522 fi
7523
7524 if test $ol_with_ldbm_api = manual ; then
7525                 ol_link_ldbm=yes
7526
7527         echo "configure: warning: LDBM defines and link options must be set manually" 1>&2
7528
7529         for ac_hdr in db.h db_185.h gdbm.h ndbm.h
7530 do
7531 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7532 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7533 echo "configure:7534: checking for $ac_hdr" >&5
7534 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7535   echo $ac_n "(cached) $ac_c" 1>&6
7536 else
7537   cat > conftest.$ac_ext <<EOF
7538 #line 7539 "configure"
7539 #include "confdefs.h"
7540 #include <$ac_hdr>
7541 EOF
7542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7543 { (eval echo configure:7544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7545 if test -z "$ac_err"; then
7546   rm -rf conftest*
7547   eval "ac_cv_header_$ac_safe=yes"
7548 else
7549   echo "$ac_err" >&5
7550   echo "configure: failed program was:" >&5
7551   cat conftest.$ac_ext >&5
7552   rm -rf conftest*
7553   eval "ac_cv_header_$ac_safe=no"
7554 fi
7555 rm -f conftest*
7556 fi
7557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7558   echo "$ac_t""yes" 1>&6
7559     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7560   cat >> confdefs.h <<EOF
7561 #define $ac_tr_hdr 1
7562 EOF
7563  
7564 else
7565   echo "$ac_t""no" 1>&6
7566 fi
7567 done
7568
7569 fi
7570
7571 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
7572         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
7573         ol_with_ldbm_api=none
7574 fi
7575
7576 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
7577         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
7578 echo "configure:7579: checking for MDBM library" >&5
7579 if eval "test \"`echo '$''{'ol_cv_lib_mdbm'+set}'`\" = set"; then
7580   echo $ac_n "(cached) $ac_c" 1>&6
7581 else
7582         ol_LIBS="$LIBS"
7583         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
7584 echo "configure:7585: checking for mdbm_set_chain" >&5
7585 if eval "test \"`echo '$''{'ac_cv_func_mdbm_set_chain'+set}'`\" = set"; then
7586   echo $ac_n "(cached) $ac_c" 1>&6
7587 else
7588   cat > conftest.$ac_ext <<EOF
7589 #line 7590 "configure"
7590 #include "confdefs.h"
7591 /* System header to define __stub macros and hopefully few prototypes,
7592     which can conflict with char mdbm_set_chain(); below.  */
7593 #include <assert.h>
7594 /* Override any gcc2 internal prototype to avoid an error.  */
7595 /* We use char because int might match the return type of a gcc2
7596     builtin and then its argument prototype would still apply.  */
7597 char mdbm_set_chain();
7598
7599 int main() {
7600
7601 /* The GNU C library defines this for functions which it implements
7602     to always fail with ENOSYS.  Some functions are actually named
7603     something starting with __ and the normal name is an alias.  */
7604 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
7605 choke me
7606 #else
7607 mdbm_set_chain();
7608 #endif
7609
7610 ; return 0; }
7611 EOF
7612 if { (eval echo configure:7613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7613   rm -rf conftest*
7614   eval "ac_cv_func_mdbm_set_chain=yes"
7615 else
7616   echo "configure: failed program was:" >&5
7617   cat conftest.$ac_ext >&5
7618   rm -rf conftest*
7619   eval "ac_cv_func_mdbm_set_chain=no"
7620 fi
7621 rm -f conftest*
7622 fi
7623
7624 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
7625   echo "$ac_t""yes" 1>&6
7626   ol_cv_lib_mdbm=yes
7627 else
7628   echo "$ac_t""no" 1>&6
7629
7630                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
7631 echo "configure:7632: checking for mdbm_set_chain in -lmdbm" >&5
7632 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-%__p_%'`
7633 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7634   echo $ac_n "(cached) $ac_c" 1>&6
7635 else
7636   ac_save_LIBS="$LIBS"
7637 LIBS="-lmdbm  $LIBS"
7638 cat > conftest.$ac_ext <<EOF
7639 #line 7640 "configure"
7640 #include "confdefs.h"
7641 /* Override any gcc2 internal prototype to avoid an error.  */
7642 /* We use char because int might match the return type of a gcc2
7643     builtin and then its argument prototype would still apply.  */
7644 char mdbm_set_chain();
7645
7646 int main() {
7647 mdbm_set_chain()
7648 ; return 0; }
7649 EOF
7650 if { (eval echo configure:7651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7651   rm -rf conftest*
7652   eval "ac_cv_lib_$ac_lib_var=yes"
7653 else
7654   echo "configure: failed program was:" >&5
7655   cat conftest.$ac_ext >&5
7656   rm -rf conftest*
7657   eval "ac_cv_lib_$ac_lib_var=no"
7658 fi
7659 rm -f conftest*
7660 LIBS="$ac_save_LIBS"
7661
7662 fi
7663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7664   echo "$ac_t""yes" 1>&6
7665   ol_cv_lib_mdbm=-lmdbm
7666 else
7667   echo "$ac_t""no" 1>&6
7668 ol_cv_lib_mdbm=no
7669 fi
7670
7671         
7672 fi
7673
7674         LIBS="$ol_LIBS"
7675
7676 fi
7677
7678 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
7679
7680
7681  for ac_hdr in mdbm.h
7682 do
7683 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7684 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7685 echo "configure:7686: checking for $ac_hdr" >&5
7686 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7687   echo $ac_n "(cached) $ac_c" 1>&6
7688 else
7689   cat > conftest.$ac_ext <<EOF
7690 #line 7691 "configure"
7691 #include "confdefs.h"
7692 #include <$ac_hdr>
7693 EOF
7694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7695 { (eval echo configure:7696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7697 if test -z "$ac_err"; then
7698   rm -rf conftest*
7699   eval "ac_cv_header_$ac_safe=yes"
7700 else
7701   echo "$ac_err" >&5
7702   echo "configure: failed program was:" >&5
7703   cat conftest.$ac_ext >&5
7704   rm -rf conftest*
7705   eval "ac_cv_header_$ac_safe=no"
7706 fi
7707 rm -f conftest*
7708 fi
7709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7710   echo "$ac_t""yes" 1>&6
7711     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7712   cat >> confdefs.h <<EOF
7713 #define $ac_tr_hdr 1
7714 EOF
7715  
7716 else
7717   echo "$ac_t""no" 1>&6
7718 fi
7719 done
7720
7721  echo $ac_n "checking for db""... $ac_c" 1>&6
7722 echo "configure:7723: checking for db" >&5
7723 if eval "test \"`echo '$''{'ol_cv_mdbm'+set}'`\" = set"; then
7724   echo $ac_n "(cached) $ac_c" 1>&6
7725 else
7726   
7727         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
7728                 ol_cv_mdbm=no
7729         else
7730                 ol_cv_mdbm=yes
7731         fi
7732
7733 fi
7734
7735 echo "$ac_t""$ol_cv_mdbm" 1>&6
7736  if test $ol_cv_mdbm = yes ; then
7737         cat >> confdefs.h <<\EOF
7738 #define HAVE_MDBM 1
7739 EOF
7740
7741  fi
7742
7743
7744         if test $ol_cv_mdbm = yes ; then
7745                 ol_link_ldbm=mdbm
7746                 ol_with_ldbm_api=mdbm
7747                 if test $ol_cv_lib_mdbm != yes ; then
7748                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
7749                 fi
7750         fi
7751 fi
7752
7753 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
7754         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
7755 echo "configure:7756: checking for GDBM library" >&5
7756 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then
7757   echo $ac_n "(cached) $ac_c" 1>&6
7758 else
7759         ol_LIBS="$LIBS"
7760         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
7761 echo "configure:7762: checking for gdbm_open" >&5
7762 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then
7763   echo $ac_n "(cached) $ac_c" 1>&6
7764 else
7765   cat > conftest.$ac_ext <<EOF
7766 #line 7767 "configure"
7767 #include "confdefs.h"
7768 /* System header to define __stub macros and hopefully few prototypes,
7769     which can conflict with char gdbm_open(); below.  */
7770 #include <assert.h>
7771 /* Override any gcc2 internal prototype to avoid an error.  */
7772 /* We use char because int might match the return type of a gcc2
7773     builtin and then its argument prototype would still apply.  */
7774 char gdbm_open();
7775
7776 int main() {
7777
7778 /* The GNU C library defines this for functions which it implements
7779     to always fail with ENOSYS.  Some functions are actually named
7780     something starting with __ and the normal name is an alias.  */
7781 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
7782 choke me
7783 #else
7784 gdbm_open();
7785 #endif
7786
7787 ; return 0; }
7788 EOF
7789 if { (eval echo configure:7790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7790   rm -rf conftest*
7791   eval "ac_cv_func_gdbm_open=yes"
7792 else
7793   echo "configure: failed program was:" >&5
7794   cat conftest.$ac_ext >&5
7795   rm -rf conftest*
7796   eval "ac_cv_func_gdbm_open=no"
7797 fi
7798 rm -f conftest*
7799 fi
7800
7801 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
7802   echo "$ac_t""yes" 1>&6
7803   ol_cv_lib_gdbm=yes
7804 else
7805   echo "$ac_t""no" 1>&6
7806
7807                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
7808 echo "configure:7809: checking for gdbm_open in -lgdbm" >&5
7809 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
7810 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7811   echo $ac_n "(cached) $ac_c" 1>&6
7812 else
7813   ac_save_LIBS="$LIBS"
7814 LIBS="-lgdbm  $LIBS"
7815 cat > conftest.$ac_ext <<EOF
7816 #line 7817 "configure"
7817 #include "confdefs.h"
7818 /* Override any gcc2 internal prototype to avoid an error.  */
7819 /* We use char because int might match the return type of a gcc2
7820     builtin and then its argument prototype would still apply.  */
7821 char gdbm_open();
7822
7823 int main() {
7824 gdbm_open()
7825 ; return 0; }
7826 EOF
7827 if { (eval echo configure:7828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7828   rm -rf conftest*
7829   eval "ac_cv_lib_$ac_lib_var=yes"
7830 else
7831   echo "configure: failed program was:" >&5
7832   cat conftest.$ac_ext >&5
7833   rm -rf conftest*
7834   eval "ac_cv_lib_$ac_lib_var=no"
7835 fi
7836 rm -f conftest*
7837 LIBS="$ac_save_LIBS"
7838
7839 fi
7840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7841   echo "$ac_t""yes" 1>&6
7842   ol_cv_lib_gdbm=-lgdbm
7843 else
7844   echo "$ac_t""no" 1>&6
7845 ol_cv_lib_gdbm=no
7846 fi
7847
7848         
7849 fi
7850
7851         LIBS="$ol_LIBS"
7852
7853 fi
7854
7855 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
7856
7857
7858  for ac_hdr in gdbm.h
7859 do
7860 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7861 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7862 echo "configure:7863: checking for $ac_hdr" >&5
7863 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7864   echo $ac_n "(cached) $ac_c" 1>&6
7865 else
7866   cat > conftest.$ac_ext <<EOF
7867 #line 7868 "configure"
7868 #include "confdefs.h"
7869 #include <$ac_hdr>
7870 EOF
7871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7872 { (eval echo configure:7873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7874 if test -z "$ac_err"; then
7875   rm -rf conftest*
7876   eval "ac_cv_header_$ac_safe=yes"
7877 else
7878   echo "$ac_err" >&5
7879   echo "configure: failed program was:" >&5
7880   cat conftest.$ac_ext >&5
7881   rm -rf conftest*
7882   eval "ac_cv_header_$ac_safe=no"
7883 fi
7884 rm -f conftest*
7885 fi
7886 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7887   echo "$ac_t""yes" 1>&6
7888     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7889   cat >> confdefs.h <<EOF
7890 #define $ac_tr_hdr 1
7891 EOF
7892  
7893 else
7894   echo "$ac_t""no" 1>&6
7895 fi
7896 done
7897
7898  echo $ac_n "checking for db""... $ac_c" 1>&6
7899 echo "configure:7900: checking for db" >&5
7900 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then
7901   echo $ac_n "(cached) $ac_c" 1>&6
7902 else
7903   
7904         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
7905                 ol_cv_gdbm=no
7906         else
7907                 ol_cv_gdbm=yes
7908         fi
7909
7910 fi
7911
7912 echo "$ac_t""$ol_cv_gdbm" 1>&6
7913  if test $ol_cv_gdbm = yes ; then
7914         cat >> confdefs.h <<\EOF
7915 #define HAVE_GDBM 1
7916 EOF
7917
7918  fi
7919
7920
7921         if test $ol_cv_gdbm = yes ; then
7922                 ol_link_ldbm=gdbm
7923                 ol_with_ldbm_api=gdbm
7924
7925                 if test $ol_cv_lib_gdbm != yes ; then
7926                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
7927                 fi
7928         fi
7929 fi
7930
7931 if test $ol_with_ldbm_api = auto ; then
7932         echo "configure: warning: skipping automatic checking for NDBM, must be manually enabled." 1>&2
7933 elif test $ol_with_ldbm_api = ndbm ; then
7934         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
7935 echo "configure:7936: checking for NDBM library" >&5
7936 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then
7937   echo $ac_n "(cached) $ac_c" 1>&6
7938 else
7939         ol_LIBS="$LIBS"
7940         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
7941 echo "configure:7942: checking for dbm_open" >&5
7942 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
7943   echo $ac_n "(cached) $ac_c" 1>&6
7944 else
7945   cat > conftest.$ac_ext <<EOF
7946 #line 7947 "configure"
7947 #include "confdefs.h"
7948 /* System header to define __stub macros and hopefully few prototypes,
7949     which can conflict with char dbm_open(); below.  */
7950 #include <assert.h>
7951 /* Override any gcc2 internal prototype to avoid an error.  */
7952 /* We use char because int might match the return type of a gcc2
7953     builtin and then its argument prototype would still apply.  */
7954 char dbm_open();
7955
7956 int main() {
7957
7958 /* The GNU C library defines this for functions which it implements
7959     to always fail with ENOSYS.  Some functions are actually named
7960     something starting with __ and the normal name is an alias.  */
7961 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
7962 choke me
7963 #else
7964 dbm_open();
7965 #endif
7966
7967 ; return 0; }
7968 EOF
7969 if { (eval echo configure:7970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7970   rm -rf conftest*
7971   eval "ac_cv_func_dbm_open=yes"
7972 else
7973   echo "configure: failed program was:" >&5
7974   cat conftest.$ac_ext >&5
7975   rm -rf conftest*
7976   eval "ac_cv_func_dbm_open=no"
7977 fi
7978 rm -f conftest*
7979 fi
7980
7981 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
7982   echo "$ac_t""yes" 1>&6
7983   ol_cv_lib_ndbm=yes
7984 else
7985   echo "$ac_t""no" 1>&6
7986
7987                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
7988 echo "configure:7989: checking for dbm_open in -lndbm" >&5
7989 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
7990 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7991   echo $ac_n "(cached) $ac_c" 1>&6
7992 else
7993   ac_save_LIBS="$LIBS"
7994 LIBS="-lndbm  $LIBS"
7995 cat > conftest.$ac_ext <<EOF
7996 #line 7997 "configure"
7997 #include "confdefs.h"
7998 /* Override any gcc2 internal prototype to avoid an error.  */
7999 /* We use char because int might match the return type of a gcc2
8000     builtin and then its argument prototype would still apply.  */
8001 char dbm_open();
8002
8003 int main() {
8004 dbm_open()
8005 ; return 0; }
8006 EOF
8007 if { (eval echo configure:8008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8008   rm -rf conftest*
8009   eval "ac_cv_lib_$ac_lib_var=yes"
8010 else
8011   echo "configure: failed program was:" >&5
8012   cat conftest.$ac_ext >&5
8013   rm -rf conftest*
8014   eval "ac_cv_lib_$ac_lib_var=no"
8015 fi
8016 rm -f conftest*
8017 LIBS="$ac_save_LIBS"
8018
8019 fi
8020 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8021   echo "$ac_t""yes" 1>&6
8022   ol_cv_lib_ndbm=-lndbm
8023 else
8024   echo "$ac_t""no" 1>&6
8025
8026                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
8027 echo "configure:8028: checking for dbm_open in -ldbm" >&5
8028 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
8029 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8030   echo $ac_n "(cached) $ac_c" 1>&6
8031 else
8032   ac_save_LIBS="$LIBS"
8033 LIBS="-ldbm  $LIBS"
8034 cat > conftest.$ac_ext <<EOF
8035 #line 8036 "configure"
8036 #include "confdefs.h"
8037 /* Override any gcc2 internal prototype to avoid an error.  */
8038 /* We use char because int might match the return type of a gcc2
8039     builtin and then its argument prototype would still apply.  */
8040 char dbm_open();
8041
8042 int main() {
8043 dbm_open()
8044 ; return 0; }
8045 EOF
8046 if { (eval echo configure:8047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8047   rm -rf conftest*
8048   eval "ac_cv_lib_$ac_lib_var=yes"
8049 else
8050   echo "configure: failed program was:" >&5
8051   cat conftest.$ac_ext >&5
8052   rm -rf conftest*
8053   eval "ac_cv_lib_$ac_lib_var=no"
8054 fi
8055 rm -f conftest*
8056 LIBS="$ac_save_LIBS"
8057
8058 fi
8059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8060   echo "$ac_t""yes" 1>&6
8061   ol_cv_lib_ndbm=-ldbm
8062 else
8063   echo "$ac_t""no" 1>&6
8064 ol_cv_lib_ndbm=no
8065 fi
8066                 
8067 fi
8068
8069         
8070 fi
8071
8072         LIBS="$ol_LIBS"
8073
8074 fi
8075
8076 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
8077
8078
8079  for ac_hdr in ndbm.h
8080 do
8081 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8082 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8083 echo "configure:8084: checking for $ac_hdr" >&5
8084 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8085   echo $ac_n "(cached) $ac_c" 1>&6
8086 else
8087   cat > conftest.$ac_ext <<EOF
8088 #line 8089 "configure"
8089 #include "confdefs.h"
8090 #include <$ac_hdr>
8091 EOF
8092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8093 { (eval echo configure:8094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8095 if test -z "$ac_err"; then
8096   rm -rf conftest*
8097   eval "ac_cv_header_$ac_safe=yes"
8098 else
8099   echo "$ac_err" >&5
8100   echo "configure: failed program was:" >&5
8101   cat conftest.$ac_ext >&5
8102   rm -rf conftest*
8103   eval "ac_cv_header_$ac_safe=no"
8104 fi
8105 rm -f conftest*
8106 fi
8107 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8108   echo "$ac_t""yes" 1>&6
8109     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8110   cat >> confdefs.h <<EOF
8111 #define $ac_tr_hdr 1
8112 EOF
8113  
8114 else
8115   echo "$ac_t""no" 1>&6
8116 fi
8117 done
8118
8119  echo $ac_n "checking for db""... $ac_c" 1>&6
8120 echo "configure:8121: checking for db" >&5
8121 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then
8122   echo $ac_n "(cached) $ac_c" 1>&6
8123 else
8124   
8125         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
8126                 ol_cv_ndbm=no
8127         else
8128                 ol_cv_ndbm=yes
8129         fi
8130
8131 fi
8132
8133 echo "$ac_t""$ol_cv_ndbm" 1>&6
8134  if test $ol_cv_ndbm = yes ; then
8135         cat >> confdefs.h <<\EOF
8136 #define HAVE_NDBM 1
8137 EOF
8138
8139  fi
8140
8141
8142         if test $ol_cv_ndbm = yes ; then
8143                 ol_link_ldbm=ndbm
8144                 ol_with_ldbm_api=ndbm
8145
8146                 if test $ol_cv_lib_ndbm != yes ; then
8147                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
8148                 fi
8149         fi
8150 fi
8151
8152 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
8153         echo "configure: warning: could not find suitable LDBM backend" 1>&2
8154         if test $ol_enable_ldbm = yes ; then
8155                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
8156         fi
8157
8158         echo "configure: warning: disabling LDBM" 1>&2
8159         ol_enable_ldbm=no
8160 fi
8161
8162 if test $ol_enable_wrappers != no ; then
8163         for ac_hdr in tcpd.h
8164 do
8165 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8166 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8167 echo "configure:8168: checking for $ac_hdr" >&5
8168 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8169   echo $ac_n "(cached) $ac_c" 1>&6
8170 else
8171   cat > conftest.$ac_ext <<EOF
8172 #line 8173 "configure"
8173 #include "confdefs.h"
8174 #include <$ac_hdr>
8175 EOF
8176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8177 { (eval echo configure:8178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8179 if test -z "$ac_err"; then
8180   rm -rf conftest*
8181   eval "ac_cv_header_$ac_safe=yes"
8182 else
8183   echo "$ac_err" >&5
8184   echo "configure: failed program was:" >&5
8185   cat conftest.$ac_ext >&5
8186   rm -rf conftest*
8187   eval "ac_cv_header_$ac_safe=no"
8188 fi
8189 rm -f conftest*
8190 fi
8191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8192   echo "$ac_t""yes" 1>&6
8193     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8194   cat >> confdefs.h <<EOF
8195 #define $ac_tr_hdr 1
8196 EOF
8197  
8198 else
8199   echo "$ac_t""no" 1>&6
8200 fi
8201 done
8202
8203
8204         if test $ac_cv_header_tcpd_h != yes ; then
8205                 have_wrappers=no
8206         else
8207                 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
8208 echo "configure:8209: checking for main in -lwrap" >&5
8209 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
8210 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8211   echo $ac_n "(cached) $ac_c" 1>&6
8212 else
8213   ac_save_LIBS="$LIBS"
8214 LIBS="-lwrap  $LIBS"
8215 cat > conftest.$ac_ext <<EOF
8216 #line 8217 "configure"
8217 #include "confdefs.h"
8218
8219 int main() {
8220 main()
8221 ; return 0; }
8222 EOF
8223 if { (eval echo configure:8224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8224   rm -rf conftest*
8225   eval "ac_cv_lib_$ac_lib_var=yes"
8226 else
8227   echo "configure: failed program was:" >&5
8228   cat conftest.$ac_ext >&5
8229   rm -rf conftest*
8230   eval "ac_cv_lib_$ac_lib_var=no"
8231 fi
8232 rm -f conftest*
8233 LIBS="$ac_save_LIBS"
8234
8235 fi
8236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8237   echo "$ac_t""yes" 1>&6
8238   have_wrappers=yes
8239 else
8240   echo "$ac_t""no" 1>&6
8241 have_wrappers=no
8242 fi
8243
8244         fi
8245
8246         if test $have_wrappers = yes ; then
8247                 cat >> confdefs.h <<\EOF
8248 #define HAVE_TCPD 1
8249 EOF
8250
8251                 SLAPD_LIBS="$SLAPD_LIBS -lwrap"
8252         else
8253                 echo "configure: warning: could not find -lwrap" 1>&2
8254                 if test $ol_enable_wrappers = yes ; then
8255                         { echo "configure: error: could not find wrappers" 1>&2; exit 1; }
8256                 fi
8257
8258                 echo "configure: warning: disabling wrappers support" 1>&2
8259                 ol_enable_wrappers=no
8260         fi
8261 fi
8262
8263 if test $ol_enable_syslog != no ; then
8264         echo $ac_n "checking for openlog""... $ac_c" 1>&6
8265 echo "configure:8266: checking for openlog" >&5
8266 if eval "test \"`echo '$''{'ac_cv_func_openlog'+set}'`\" = set"; then
8267   echo $ac_n "(cached) $ac_c" 1>&6
8268 else
8269   cat > conftest.$ac_ext <<EOF
8270 #line 8271 "configure"
8271 #include "confdefs.h"
8272 /* System header to define __stub macros and hopefully few prototypes,
8273     which can conflict with char openlog(); below.  */
8274 #include <assert.h>
8275 /* Override any gcc2 internal prototype to avoid an error.  */
8276 /* We use char because int might match the return type of a gcc2
8277     builtin and then its argument prototype would still apply.  */
8278 char openlog();
8279
8280 int main() {
8281
8282 /* The GNU C library defines this for functions which it implements
8283     to always fail with ENOSYS.  Some functions are actually named
8284     something starting with __ and the normal name is an alias.  */
8285 #if defined (__stub_openlog) || defined (__stub___openlog)
8286 choke me
8287 #else
8288 openlog();
8289 #endif
8290
8291 ; return 0; }
8292 EOF
8293 if { (eval echo configure:8294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8294   rm -rf conftest*
8295   eval "ac_cv_func_openlog=yes"
8296 else
8297   echo "configure: failed program was:" >&5
8298   cat conftest.$ac_ext >&5
8299   rm -rf conftest*
8300   eval "ac_cv_func_openlog=no"
8301 fi
8302 rm -f conftest*
8303 fi
8304
8305 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
8306   echo "$ac_t""yes" 1>&6
8307   :
8308 else
8309   echo "$ac_t""no" 1>&6
8310 fi
8311
8312         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
8313                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
8314         fi
8315         ol_enable_syslog=$ac_cv_func_openlog
8316 fi
8317
8318 if test $ol_enable_dmalloc != no ; then
8319         for ac_hdr in dmalloc.h
8320 do
8321 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8322 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8323 echo "configure:8324: checking for $ac_hdr" >&5
8324 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8325   echo $ac_n "(cached) $ac_c" 1>&6
8326 else
8327   cat > conftest.$ac_ext <<EOF
8328 #line 8329 "configure"
8329 #include "confdefs.h"
8330 #include <$ac_hdr>
8331 EOF
8332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8333 { (eval echo configure:8334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8335 if test -z "$ac_err"; then
8336   rm -rf conftest*
8337   eval "ac_cv_header_$ac_safe=yes"
8338 else
8339   echo "$ac_err" >&5
8340   echo "configure: failed program was:" >&5
8341   cat conftest.$ac_ext >&5
8342   rm -rf conftest*
8343   eval "ac_cv_header_$ac_safe=no"
8344 fi
8345 rm -f conftest*
8346 fi
8347 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8348   echo "$ac_t""yes" 1>&6
8349     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8350   cat >> confdefs.h <<EOF
8351 #define $ac_tr_hdr 1
8352 EOF
8353  
8354 else
8355   echo "$ac_t""no" 1>&6
8356 fi
8357 done
8358
8359         echo $ac_n "checking for dmalloc_shutdown in -ldmalloc""... $ac_c" 1>&6
8360 echo "configure:8361: checking for dmalloc_shutdown in -ldmalloc" >&5
8361 ac_lib_var=`echo dmalloc'_'dmalloc_shutdown | sed 'y%./+-%__p_%'`
8362 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8363   echo $ac_n "(cached) $ac_c" 1>&6
8364 else
8365   ac_save_LIBS="$LIBS"
8366 LIBS="-ldmalloc  $LIBS"
8367 cat > conftest.$ac_ext <<EOF
8368 #line 8369 "configure"
8369 #include "confdefs.h"
8370 /* Override any gcc2 internal prototype to avoid an error.  */
8371 /* We use char because int might match the return type of a gcc2
8372     builtin and then its argument prototype would still apply.  */
8373 char dmalloc_shutdown();
8374
8375 int main() {
8376 dmalloc_shutdown()
8377 ; return 0; }
8378 EOF
8379 if { (eval echo configure:8380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8380   rm -rf conftest*
8381   eval "ac_cv_lib_$ac_lib_var=yes"
8382 else
8383   echo "configure: failed program was:" >&5
8384   cat conftest.$ac_ext >&5
8385   rm -rf conftest*
8386   eval "ac_cv_lib_$ac_lib_var=no"
8387 fi
8388 rm -f conftest*
8389 LIBS="$ac_save_LIBS"
8390
8391 fi
8392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8393   echo "$ac_t""yes" 1>&6
8394     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8395     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8396   cat >> confdefs.h <<EOF
8397 #define $ac_tr_lib 1
8398 EOF
8399
8400   LIBS="-ldmalloc $LIBS"
8401
8402 else
8403   echo "$ac_t""no" 1>&6
8404 fi
8405
8406 fi
8407
8408 if test $ol_enable_tcl != no ; then
8409         for ac_hdr in tcl.h
8410 do
8411 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8412 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8413 echo "configure:8414: checking for $ac_hdr" >&5
8414 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8415   echo $ac_n "(cached) $ac_c" 1>&6
8416 else
8417   cat > conftest.$ac_ext <<EOF
8418 #line 8419 "configure"
8419 #include "confdefs.h"
8420 #include <$ac_hdr>
8421 EOF
8422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8423 { (eval echo configure:8424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8425 if test -z "$ac_err"; then
8426   rm -rf conftest*
8427   eval "ac_cv_header_$ac_safe=yes"
8428 else
8429   echo "$ac_err" >&5
8430   echo "configure: failed program was:" >&5
8431   cat conftest.$ac_ext >&5
8432   rm -rf conftest*
8433   eval "ac_cv_header_$ac_safe=no"
8434 fi
8435 rm -f conftest*
8436 fi
8437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8438   echo "$ac_t""yes" 1>&6
8439     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8440   cat >> confdefs.h <<EOF
8441 #define $ac_tr_hdr 1
8442 EOF
8443  
8444 else
8445   echo "$ac_t""no" 1>&6
8446 fi
8447 done
8448
8449
8450         if test $ac_cv_header_tcl_h != yes ; then
8451                 have_tcl=no
8452         else
8453                 echo $ac_n "checking for main in -ltcl""... $ac_c" 1>&6
8454 echo "configure:8455: checking for main in -ltcl" >&5
8455 ac_lib_var=`echo tcl'_'main | sed 'y%./+-%__p_%'`
8456 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8457   echo $ac_n "(cached) $ac_c" 1>&6
8458 else
8459   ac_save_LIBS="$LIBS"
8460 LIBS="-ltcl  $LIBS"
8461 cat > conftest.$ac_ext <<EOF
8462 #line 8463 "configure"
8463 #include "confdefs.h"
8464
8465 int main() {
8466 main()
8467 ; return 0; }
8468 EOF
8469 if { (eval echo configure:8470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8470   rm -rf conftest*
8471   eval "ac_cv_lib_$ac_lib_var=yes"
8472 else
8473   echo "configure: failed program was:" >&5
8474   cat conftest.$ac_ext >&5
8475   rm -rf conftest*
8476   eval "ac_cv_lib_$ac_lib_var=no"
8477 fi
8478 rm -f conftest*
8479 LIBS="$ac_save_LIBS"
8480
8481 fi
8482 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8483   echo "$ac_t""yes" 1>&6
8484   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"
8485 else
8486   echo "$ac_t""no" 1>&6
8487 have_tcl=no
8488 fi
8489
8490
8491                 if test $have_tcl != yes; then
8492                         echo $ac_n "checking for main in -ltcl7.6""... $ac_c" 1>&6
8493 echo "configure:8494: checking for main in -ltcl7.6" >&5
8494 ac_lib_var=`echo tcl7.6'_'main | sed 'y%./+-%__p_%'`
8495 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8496   echo $ac_n "(cached) $ac_c" 1>&6
8497 else
8498   ac_save_LIBS="$LIBS"
8499 LIBS="-ltcl7.6  $LIBS"
8500 cat > conftest.$ac_ext <<EOF
8501 #line 8502 "configure"
8502 #include "confdefs.h"
8503
8504 int main() {
8505 main()
8506 ; return 0; }
8507 EOF
8508 if { (eval echo configure:8509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8509   rm -rf conftest*
8510   eval "ac_cv_lib_$ac_lib_var=yes"
8511 else
8512   echo "configure: failed program was:" >&5
8513   cat conftest.$ac_ext >&5
8514   rm -rf conftest*
8515   eval "ac_cv_lib_$ac_lib_var=no"
8516 fi
8517 rm -f conftest*
8518 LIBS="$ac_save_LIBS"
8519
8520 fi
8521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8522   echo "$ac_t""yes" 1>&6
8523   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"
8524 else
8525   echo "$ac_t""no" 1>&6
8526 have_tcl=no
8527 fi
8528
8529                 fi
8530
8531                 if test $have_tcl != yes; then
8532                         echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
8533 echo "configure:8534: checking for main in -ltcl8.0" >&5
8534 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
8535 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8536   echo $ac_n "(cached) $ac_c" 1>&6
8537 else
8538   ac_save_LIBS="$LIBS"
8539 LIBS="-ltcl8.0  $LIBS"
8540 cat > conftest.$ac_ext <<EOF
8541 #line 8542 "configure"
8542 #include "confdefs.h"
8543
8544 int main() {
8545 main()
8546 ; return 0; }
8547 EOF
8548 if { (eval echo configure:8549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8549   rm -rf conftest*
8550   eval "ac_cv_lib_$ac_lib_var=yes"
8551 else
8552   echo "configure: failed program was:" >&5
8553   cat conftest.$ac_ext >&5
8554   rm -rf conftest*
8555   eval "ac_cv_lib_$ac_lib_var=no"
8556 fi
8557 rm -f conftest*
8558 LIBS="$ac_save_LIBS"
8559
8560 fi
8561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8562   echo "$ac_t""yes" 1>&6
8563   have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"
8564 else
8565   echo "$ac_t""no" 1>&6
8566 have_tcl=no
8567 fi
8568
8569                 fi
8570         fi
8571
8572         if test $have_tcl != yes ; then
8573                 echo "configure: warning: could not find -ltcl" 1>&2
8574                 if test $ol_enable_tcl = yes ; then
8575                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
8576                 fi
8577
8578                 ol_enable_tcl=no
8579         fi
8580 fi
8581
8582 # ud needs termcap (should insert check here)
8583 ol_link_termcap=no
8584 for ac_hdr in termcap.h ncurses.h
8585 do
8586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8587 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8588 echo "configure:8589: checking for $ac_hdr" >&5
8589 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8590   echo $ac_n "(cached) $ac_c" 1>&6
8591 else
8592   cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 #include <$ac_hdr>
8596 EOF
8597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8598 { (eval echo configure:8599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8600 if test -z "$ac_err"; then
8601   rm -rf conftest*
8602   eval "ac_cv_header_$ac_safe=yes"
8603 else
8604   echo "$ac_err" >&5
8605   echo "configure: failed program was:" >&5
8606   cat conftest.$ac_ext >&5
8607   rm -rf conftest*
8608   eval "ac_cv_header_$ac_safe=no"
8609 fi
8610 rm -f conftest*
8611 fi
8612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8613   echo "$ac_t""yes" 1>&6
8614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8615   cat >> confdefs.h <<EOF
8616 #define $ac_tr_hdr 1
8617 EOF
8618  
8619 else
8620   echo "$ac_t""no" 1>&6
8621 fi
8622 done
8623
8624
8625 if test $ol_link_termcap = no ; then
8626         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
8627 echo "configure:8628: checking for tputs in -ltermcap" >&5
8628 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
8629 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8630   echo $ac_n "(cached) $ac_c" 1>&6
8631 else
8632   ac_save_LIBS="$LIBS"
8633 LIBS="-ltermcap  $LIBS"
8634 cat > conftest.$ac_ext <<EOF
8635 #line 8636 "configure"
8636 #include "confdefs.h"
8637 /* Override any gcc2 internal prototype to avoid an error.  */
8638 /* We use char because int might match the return type of a gcc2
8639     builtin and then its argument prototype would still apply.  */
8640 char tputs();
8641
8642 int main() {
8643 tputs()
8644 ; return 0; }
8645 EOF
8646 if { (eval echo configure:8647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8647   rm -rf conftest*
8648   eval "ac_cv_lib_$ac_lib_var=yes"
8649 else
8650   echo "configure: failed program was:" >&5
8651   cat conftest.$ac_ext >&5
8652   rm -rf conftest*
8653   eval "ac_cv_lib_$ac_lib_var=no"
8654 fi
8655 rm -f conftest*
8656 LIBS="$ac_save_LIBS"
8657
8658 fi
8659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8660   echo "$ac_t""yes" 1>&6
8661   have_termcap=yes
8662 else
8663   echo "$ac_t""no" 1>&6
8664 have_termcap=no
8665 fi
8666
8667         if test $have_termcap = yes ; then
8668                 cat >> confdefs.h <<\EOF
8669 #define HAVE_TERMCAP 1
8670 EOF
8671
8672                 ol_link_termcap=yes
8673                 TERMCAP_LIBS=-ltermcap
8674         fi
8675 fi
8676
8677 if test $ol_link_termcap = no ; then
8678         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
8679 echo "configure:8680: checking for initscr in -lncurses" >&5
8680 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
8681 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8682   echo $ac_n "(cached) $ac_c" 1>&6
8683 else
8684   ac_save_LIBS="$LIBS"
8685 LIBS="-lncurses  $LIBS"
8686 cat > conftest.$ac_ext <<EOF
8687 #line 8688 "configure"
8688 #include "confdefs.h"
8689 /* Override any gcc2 internal prototype to avoid an error.  */
8690 /* We use char because int might match the return type of a gcc2
8691     builtin and then its argument prototype would still apply.  */
8692 char initscr();
8693
8694 int main() {
8695 initscr()
8696 ; return 0; }
8697 EOF
8698 if { (eval echo configure:8699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8699   rm -rf conftest*
8700   eval "ac_cv_lib_$ac_lib_var=yes"
8701 else
8702   echo "configure: failed program was:" >&5
8703   cat conftest.$ac_ext >&5
8704   rm -rf conftest*
8705   eval "ac_cv_lib_$ac_lib_var=no"
8706 fi
8707 rm -f conftest*
8708 LIBS="$ac_save_LIBS"
8709
8710 fi
8711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8712   echo "$ac_t""yes" 1>&6
8713   have_ncurses=yes
8714 else
8715   echo "$ac_t""no" 1>&6
8716 have_ncurses=no
8717 fi
8718
8719         if test $have_ncurses = yes ; then
8720                 cat >> confdefs.h <<\EOF
8721 #define HAVE_NCURSES 1
8722 EOF
8723
8724                 ol_link_termcap=yes
8725                 TERMCAP_LIBS=-lncurses
8726         fi
8727 fi
8728
8729 if test $ol_link_termcap = no ; then
8730         cat >> confdefs.h <<\EOF
8731 #define NO_TERMCAP 1
8732 EOF
8733
8734         TERMCAP_LIBS=
8735 fi
8736
8737 ol_link_readline=no
8738 if test $ol_with_readline != no ; then
8739         for ac_hdr in readline/readline.h readline/history.h
8740 do
8741 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8742 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8743 echo "configure:8744: checking for $ac_hdr" >&5
8744 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8745   echo $ac_n "(cached) $ac_c" 1>&6
8746 else
8747   cat > conftest.$ac_ext <<EOF
8748 #line 8749 "configure"
8749 #include "confdefs.h"
8750 #include <$ac_hdr>
8751 EOF
8752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8753 { (eval echo configure:8754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8755 if test -z "$ac_err"; then
8756   rm -rf conftest*
8757   eval "ac_cv_header_$ac_safe=yes"
8758 else
8759   echo "$ac_err" >&5
8760   echo "configure: failed program was:" >&5
8761   cat conftest.$ac_ext >&5
8762   rm -rf conftest*
8763   eval "ac_cv_header_$ac_safe=no"
8764 fi
8765 rm -f conftest*
8766 fi
8767 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8768   echo "$ac_t""yes" 1>&6
8769     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8770   cat >> confdefs.h <<EOF
8771 #define $ac_tr_hdr 1
8772 EOF
8773  
8774 else
8775   echo "$ac_t""no" 1>&6
8776 fi
8777 done
8778
8779
8780         if test $ac_cv_header_readline_readline_h = yes ; then
8781                 save_LIBS="$LIBS"
8782                 LIBS="$TERMCAP_LIBS $LIBS"
8783                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
8784 echo "configure:8785: checking for readline in -lreadline" >&5
8785 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
8786 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8787   echo $ac_n "(cached) $ac_c" 1>&6
8788 else
8789   ac_save_LIBS="$LIBS"
8790 LIBS="-lreadline  $LIBS"
8791 cat > conftest.$ac_ext <<EOF
8792 #line 8793 "configure"
8793 #include "confdefs.h"
8794 /* Override any gcc2 internal prototype to avoid an error.  */
8795 /* We use char because int might match the return type of a gcc2
8796     builtin and then its argument prototype would still apply.  */
8797 char readline();
8798
8799 int main() {
8800 readline()
8801 ; return 0; }
8802 EOF
8803 if { (eval echo configure:8804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8804   rm -rf conftest*
8805   eval "ac_cv_lib_$ac_lib_var=yes"
8806 else
8807   echo "configure: failed program was:" >&5
8808   cat conftest.$ac_ext >&5
8809   rm -rf conftest*
8810   eval "ac_cv_lib_$ac_lib_var=no"
8811 fi
8812 rm -f conftest*
8813 LIBS="$ac_save_LIBS"
8814
8815 fi
8816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8817   echo "$ac_t""yes" 1>&6
8818   have_readline=yes
8819 else
8820   echo "$ac_t""no" 1>&6
8821 have_readline=no
8822 fi
8823
8824                 LIBS="$save_LIBS"
8825                         
8826                 if test $have_readline = yes ; then
8827                         ol_with_readline=found
8828                         ol_link_readline=yes
8829
8830                         READLINE_LIBS="-lreadline"
8831                 fi
8832         fi
8833 fi
8834
8835 if test $ol_link_readline = yes ; then
8836         cat >> confdefs.h <<\EOF
8837 #define HAVE_READLINE 1
8838 EOF
8839
8840 fi
8841
8842
8843 # FreeBSD (and others) have crypt(3) in -lcrypt
8844 if test $ol_enable_crypt != no ; then
8845         echo $ac_n "checking for crypt""... $ac_c" 1>&6
8846 echo "configure:8847: checking for crypt" >&5
8847 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
8848   echo $ac_n "(cached) $ac_c" 1>&6
8849 else
8850   cat > conftest.$ac_ext <<EOF
8851 #line 8852 "configure"
8852 #include "confdefs.h"
8853 /* System header to define __stub macros and hopefully few prototypes,
8854     which can conflict with char crypt(); below.  */
8855 #include <assert.h>
8856 /* Override any gcc2 internal prototype to avoid an error.  */
8857 /* We use char because int might match the return type of a gcc2
8858     builtin and then its argument prototype would still apply.  */
8859 char crypt();
8860
8861 int main() {
8862
8863 /* The GNU C library defines this for functions which it implements
8864     to always fail with ENOSYS.  Some functions are actually named
8865     something starting with __ and the normal name is an alias.  */
8866 #if defined (__stub_crypt) || defined (__stub___crypt)
8867 choke me
8868 #else
8869 crypt();
8870 #endif
8871
8872 ; return 0; }
8873 EOF
8874 if { (eval echo configure:8875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8875   rm -rf conftest*
8876   eval "ac_cv_func_crypt=yes"
8877 else
8878   echo "configure: failed program was:" >&5
8879   cat conftest.$ac_ext >&5
8880   rm -rf conftest*
8881   eval "ac_cv_func_crypt=no"
8882 fi
8883 rm -f conftest*
8884 fi
8885
8886 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
8887   echo "$ac_t""yes" 1>&6
8888   have_crypt=yes
8889 else
8890   echo "$ac_t""no" 1>&6
8891
8892                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8893 echo "configure:8894: checking for crypt in -lcrypt" >&5
8894 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8895 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8896   echo $ac_n "(cached) $ac_c" 1>&6
8897 else
8898   ac_save_LIBS="$LIBS"
8899 LIBS="-lcrypt  $LIBS"
8900 cat > conftest.$ac_ext <<EOF
8901 #line 8902 "configure"
8902 #include "confdefs.h"
8903 /* Override any gcc2 internal prototype to avoid an error.  */
8904 /* We use char because int might match the return type of a gcc2
8905     builtin and then its argument prototype would still apply.  */
8906 char crypt();
8907
8908 int main() {
8909 crypt()
8910 ; return 0; }
8911 EOF
8912 if { (eval echo configure:8913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8913   rm -rf conftest*
8914   eval "ac_cv_lib_$ac_lib_var=yes"
8915 else
8916   echo "configure: failed program was:" >&5
8917   cat conftest.$ac_ext >&5
8918   rm -rf conftest*
8919   eval "ac_cv_lib_$ac_lib_var=no"
8920 fi
8921 rm -f conftest*
8922 LIBS="$ac_save_LIBS"
8923
8924 fi
8925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8926   echo "$ac_t""yes" 1>&6
8927   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
8928                         have_crypt=yes
8929 else
8930   echo "$ac_t""no" 1>&6
8931 have_crypt=no
8932 fi
8933
8934 fi
8935
8936
8937         if test $have_crypt = yes ; then
8938                 cat >> confdefs.h <<\EOF
8939 #define HAVE_CRYPT 1
8940 EOF
8941
8942         else
8943                 echo "configure: warning: could not find crypt" 1>&2
8944                 if test $ol_enable_crypt = yes ; then
8945                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
8946                 fi
8947
8948                 echo "configure: warning: disabling crypt support" 1>&2
8949                 ol_enable_crypt=no
8950         fi
8951 fi
8952
8953 # FreeBSD (and others) have setproctitle(3) in -lutil
8954 if test $ol_enable_proctitle != no ; then
8955         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
8956 echo "configure:8957: checking for setproctitle" >&5
8957 if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then
8958   echo $ac_n "(cached) $ac_c" 1>&6
8959 else
8960   cat > conftest.$ac_ext <<EOF
8961 #line 8962 "configure"
8962 #include "confdefs.h"
8963 /* System header to define __stub macros and hopefully few prototypes,
8964     which can conflict with char setproctitle(); below.  */
8965 #include <assert.h>
8966 /* Override any gcc2 internal prototype to avoid an error.  */
8967 /* We use char because int might match the return type of a gcc2
8968     builtin and then its argument prototype would still apply.  */
8969 char setproctitle();
8970
8971 int main() {
8972
8973 /* The GNU C library defines this for functions which it implements
8974     to always fail with ENOSYS.  Some functions are actually named
8975     something starting with __ and the normal name is an alias.  */
8976 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
8977 choke me
8978 #else
8979 setproctitle();
8980 #endif
8981
8982 ; return 0; }
8983 EOF
8984 if { (eval echo configure:8985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8985   rm -rf conftest*
8986   eval "ac_cv_func_setproctitle=yes"
8987 else
8988   echo "configure: failed program was:" >&5
8989   cat conftest.$ac_ext >&5
8990   rm -rf conftest*
8991   eval "ac_cv_func_setproctitle=no"
8992 fi
8993 rm -f conftest*
8994 fi
8995
8996 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
8997   echo "$ac_t""yes" 1>&6
8998   have_setproctitle=yes
8999 else
9000   echo "$ac_t""no" 1>&6
9001
9002                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
9003 echo "configure:9004: checking for setproctitle in -lutil" >&5
9004 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
9005 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9006   echo $ac_n "(cached) $ac_c" 1>&6
9007 else
9008   ac_save_LIBS="$LIBS"
9009 LIBS="-lutil  $LIBS"
9010 cat > conftest.$ac_ext <<EOF
9011 #line 9012 "configure"
9012 #include "confdefs.h"
9013 /* Override any gcc2 internal prototype to avoid an error.  */
9014 /* We use char because int might match the return type of a gcc2
9015     builtin and then its argument prototype would still apply.  */
9016 char setproctitle();
9017
9018 int main() {
9019 setproctitle()
9020 ; return 0; }
9021 EOF
9022 if { (eval echo configure:9023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9023   rm -rf conftest*
9024   eval "ac_cv_lib_$ac_lib_var=yes"
9025 else
9026   echo "configure: failed program was:" >&5
9027   cat conftest.$ac_ext >&5
9028   rm -rf conftest*
9029   eval "ac_cv_lib_$ac_lib_var=no"
9030 fi
9031 rm -f conftest*
9032 LIBS="$ac_save_LIBS"
9033
9034 fi
9035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9036   echo "$ac_t""yes" 1>&6
9037   have_setproctitle=yes
9038                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
9039 else
9040   echo "$ac_t""no" 1>&6
9041 have_setproctitle=no
9042                         LIBOBJS="$LIBOBJS setproctitle.o"
9043 fi
9044
9045 fi
9046
9047
9048         if test $have_setproctitle = yes ; then
9049                 cat >> confdefs.h <<\EOF
9050 #define HAVE_SETPROCTITLE 1
9051 EOF
9052
9053         fi
9054 fi
9055
9056 # test for EBCDIC
9057 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
9058 echo "configure:9059: checking for EBCDIC" >&5
9059 if eval "test \"`echo '$''{'ol_cv_cpp_ebcdic'+set}'`\" = set"; then
9060   echo $ac_n "(cached) $ac_c" 1>&6
9061 else
9062   
9063         cat > conftest.$ac_ext <<EOF
9064 #line 9065 "configure"
9065 #include "confdefs.h"
9066
9067 #if !('M' == 0xd4)
9068 #include <__ASCII__/generate_error.h>
9069 #endif
9070
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   ol_cv_cpp_ebcdic=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   ol_cv_cpp_ebcdic=no
9084 fi
9085 rm -f conftest*
9086 fi
9087
9088 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
9089 if test $ol_cv_cpp_ebcdic = yes ; then
9090         cat >> confdefs.h <<\EOF
9091 #define HAVE_EBCDIC 1
9092 EOF
9093
9094 fi
9095
9096 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9097 echo "configure:9098: checking for ANSI C header files" >&5
9098 if eval "test \"`echo '$''{'ol_cv_header_stdc'+set}'`\" = set"; then
9099   echo $ac_n "(cached) $ac_c" 1>&6
9100 else
9101   cat > conftest.$ac_ext <<EOF
9102 #line 9103 "configure"
9103 #include "confdefs.h"
9104 #include <stdlib.h>
9105 #include <stdarg.h>
9106 #include <string.h>
9107 #include <float.h>
9108 EOF
9109 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9110 { (eval echo configure:9111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9111 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9112 if test -z "$ac_err"; then
9113   rm -rf conftest*
9114   ol_cv_header_stdc=yes
9115 else
9116   echo "$ac_err" >&5
9117   echo "configure: failed program was:" >&5
9118   cat conftest.$ac_ext >&5
9119   rm -rf conftest*
9120   ol_cv_header_stdc=no
9121 fi
9122 rm -f conftest*
9123
9124 if test $ol_cv_header_stdc = yes; then
9125   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9126 cat > conftest.$ac_ext <<EOF
9127 #line 9128 "configure"
9128 #include "confdefs.h"
9129 #include <string.h>
9130 EOF
9131 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9132   egrep "memchr" >/dev/null 2>&1; then
9133   :
9134 else
9135   rm -rf conftest*
9136   ol_cv_header_stdc=no
9137 fi
9138 rm -f conftest*
9139
9140 fi
9141
9142 if test $ol_cv_header_stdc = yes; then
9143   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9144 cat > conftest.$ac_ext <<EOF
9145 #line 9146 "configure"
9146 #include "confdefs.h"
9147 #include <stdlib.h>
9148 EOF
9149 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9150   egrep "free" >/dev/null 2>&1; then
9151   :
9152 else
9153   rm -rf conftest*
9154   ol_cv_header_stdc=no
9155 fi
9156 rm -f conftest*
9157
9158 fi
9159
9160 if test $ol_cv_header_stdc = yes; then
9161   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9162 if test "$cross_compiling" = yes; then
9163   :
9164 else
9165   cat > conftest.$ac_ext <<EOF
9166 #line 9167 "configure"
9167 #include "confdefs.h"
9168 #include <ctype.h>
9169 #ifndef HAVE_EBCDIC
9170 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9171 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9172 #else
9173 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9174                 || ('j' <= (c) && (c) <= 'r') \
9175                 || ('s' <= (c) && (c) <= 'z'))
9176 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
9177 #endif
9178 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9179 int main () { int i; for (i = 0; i < 256; i++)
9180 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9181 exit (0); }
9182
9183 EOF
9184 if { (eval echo configure:9185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9185 then
9186   :
9187 else
9188   echo "configure: failed program was:" >&5
9189   cat conftest.$ac_ext >&5
9190   rm -fr conftest*
9191   ol_cv_header_stdc=no
9192 fi
9193 rm -fr conftest*
9194 fi
9195
9196 fi
9197 fi
9198
9199 echo "$ac_t""$ol_cv_header_stdc" 1>&6
9200 if test $ol_cv_header_stdc = yes; then
9201   cat >> confdefs.h <<\EOF
9202 #define STDC_HEADERS 1
9203 EOF
9204
9205 fi
9206 ac_cv_header_stdc=disable
9207
9208
9209 if test $ol_cv_header_stdc != yes; then
9210         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
9211 fi
9212
9213 ac_header_dirent=no
9214 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
9215 do
9216 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9217 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
9218 echo "configure:9219: checking for $ac_hdr that defines DIR" >&5
9219 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
9220   echo $ac_n "(cached) $ac_c" 1>&6
9221 else
9222   cat > conftest.$ac_ext <<EOF
9223 #line 9224 "configure"
9224 #include "confdefs.h"
9225 #include <sys/types.h>
9226 #include <$ac_hdr>
9227 int main() {
9228 DIR *dirp = 0;
9229 ; return 0; }
9230 EOF
9231 if { (eval echo configure:9232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9232   rm -rf conftest*
9233   eval "ac_cv_header_dirent_$ac_safe=yes"
9234 else
9235   echo "configure: failed program was:" >&5
9236   cat conftest.$ac_ext >&5
9237   rm -rf conftest*
9238   eval "ac_cv_header_dirent_$ac_safe=no"
9239 fi
9240 rm -f conftest*
9241 fi
9242 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
9243   echo "$ac_t""yes" 1>&6
9244     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9245   cat >> confdefs.h <<EOF
9246 #define $ac_tr_hdr 1
9247 EOF
9248  ac_header_dirent=$ac_hdr; break
9249 else
9250   echo "$ac_t""no" 1>&6
9251 fi
9252 done
9253 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9254 if test $ac_header_dirent = dirent.h; then
9255 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
9256 echo "configure:9257: checking for opendir in -ldir" >&5
9257 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
9258 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9259   echo $ac_n "(cached) $ac_c" 1>&6
9260 else
9261   ac_save_LIBS="$LIBS"
9262 LIBS="-ldir  $LIBS"
9263 cat > conftest.$ac_ext <<EOF
9264 #line 9265 "configure"
9265 #include "confdefs.h"
9266 /* Override any gcc2 internal prototype to avoid an error.  */
9267 /* We use char because int might match the return type of a gcc2
9268     builtin and then its argument prototype would still apply.  */
9269 char opendir();
9270
9271 int main() {
9272 opendir()
9273 ; return 0; }
9274 EOF
9275 if { (eval echo configure:9276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9276   rm -rf conftest*
9277   eval "ac_cv_lib_$ac_lib_var=yes"
9278 else
9279   echo "configure: failed program was:" >&5
9280   cat conftest.$ac_ext >&5
9281   rm -rf conftest*
9282   eval "ac_cv_lib_$ac_lib_var=no"
9283 fi
9284 rm -f conftest*
9285 LIBS="$ac_save_LIBS"
9286
9287 fi
9288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9289   echo "$ac_t""yes" 1>&6
9290   LIBS="$LIBS -ldir"
9291 else
9292   echo "$ac_t""no" 1>&6
9293 fi
9294
9295 else
9296 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
9297 echo "configure:9298: checking for opendir in -lx" >&5
9298 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
9299 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9300   echo $ac_n "(cached) $ac_c" 1>&6
9301 else
9302   ac_save_LIBS="$LIBS"
9303 LIBS="-lx  $LIBS"
9304 cat > conftest.$ac_ext <<EOF
9305 #line 9306 "configure"
9306 #include "confdefs.h"
9307 /* Override any gcc2 internal prototype to avoid an error.  */
9308 /* We use char because int might match the return type of a gcc2
9309     builtin and then its argument prototype would still apply.  */
9310 char opendir();
9311
9312 int main() {
9313 opendir()
9314 ; return 0; }
9315 EOF
9316 if { (eval echo configure:9317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9317   rm -rf conftest*
9318   eval "ac_cv_lib_$ac_lib_var=yes"
9319 else
9320   echo "configure: failed program was:" >&5
9321   cat conftest.$ac_ext >&5
9322   rm -rf conftest*
9323   eval "ac_cv_lib_$ac_lib_var=no"
9324 fi
9325 rm -f conftest*
9326 LIBS="$ac_save_LIBS"
9327
9328 fi
9329 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9330   echo "$ac_t""yes" 1>&6
9331   LIBS="$LIBS -lx"
9332 else
9333   echo "$ac_t""no" 1>&6
9334 fi
9335
9336 fi
9337
9338 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
9339 echo "configure:9340: checking for sys/wait.h that is POSIX.1 compatible" >&5
9340 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
9341   echo $ac_n "(cached) $ac_c" 1>&6
9342 else
9343   cat > conftest.$ac_ext <<EOF
9344 #line 9345 "configure"
9345 #include "confdefs.h"
9346 #include <sys/types.h>
9347 #include <sys/wait.h>
9348 #ifndef WEXITSTATUS
9349 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
9350 #endif
9351 #ifndef WIFEXITED
9352 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9353 #endif
9354 int main() {
9355 int s;
9356 wait (&s);
9357 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9358 ; return 0; }
9359 EOF
9360 if { (eval echo configure:9361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9361   rm -rf conftest*
9362   ac_cv_header_sys_wait_h=yes
9363 else
9364   echo "configure: failed program was:" >&5
9365   cat conftest.$ac_ext >&5
9366   rm -rf conftest*
9367   ac_cv_header_sys_wait_h=no
9368 fi
9369 rm -f conftest*
9370 fi
9371
9372 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
9373 if test $ac_cv_header_sys_wait_h = yes; then
9374   cat >> confdefs.h <<\EOF
9375 #define HAVE_SYS_WAIT_H 1
9376 EOF
9377
9378 fi
9379
9380 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
9381 echo "configure:9382: checking POSIX termios" >&5
9382 if eval "test \"`echo '$''{'am_cv_sys_posix_termios'+set}'`\" = set"; then
9383   echo $ac_n "(cached) $ac_c" 1>&6
9384 else
9385   cat > conftest.$ac_ext <<EOF
9386 #line 9387 "configure"
9387 #include "confdefs.h"
9388 #include <sys/types.h>
9389 #include <unistd.h>
9390 #include <termios.h>
9391 int main() {
9392 /* SunOS 4.0.3 has termios.h but not the library calls.  */
9393    tcgetattr(0, 0);
9394 ; return 0; }
9395 EOF
9396 if { (eval echo configure:9397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9397   rm -rf conftest*
9398   am_cv_sys_posix_termios=yes
9399 else
9400   echo "configure: failed program was:" >&5
9401   cat conftest.$ac_ext >&5
9402   rm -rf conftest*
9403   am_cv_sys_posix_termios=no
9404 fi
9405 rm -f conftest*
9406 fi
9407
9408 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
9409
9410
9411  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
9412 echo "configure:9413: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
9413 if eval "test \"`echo '$''{'am_cv_sys_tiocgwinsz_needs_sys_ioctl_h'+set}'`\" = set"; then
9414   echo $ac_n "(cached) $ac_c" 1>&6
9415 else
9416   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
9417
9418   gwinsz_in_termios_h=no
9419   if test $am_cv_sys_posix_termios = yes; then
9420     cat > conftest.$ac_ext <<EOF
9421 #line 9422 "configure"
9422 #include "confdefs.h"
9423 #include <sys/types.h>
9424 #     include <termios.h>
9425 #     ifdef TIOCGWINSZ
9426         yes
9427 #     endif
9428     
9429 EOF
9430 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9431   egrep "yes" >/dev/null 2>&1; then
9432   rm -rf conftest*
9433   gwinsz_in_termios_h=yes
9434 fi
9435 rm -f conftest*
9436
9437   fi
9438
9439   if test $gwinsz_in_termios_h = no; then
9440     cat > conftest.$ac_ext <<EOF
9441 #line 9442 "configure"
9442 #include "confdefs.h"
9443 #include <sys/types.h>
9444 #     include <sys/ioctl.h>
9445 #     ifdef TIOCGWINSZ
9446         yes
9447 #     endif
9448     
9449 EOF
9450 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9451   egrep "yes" >/dev/null 2>&1; then
9452   rm -rf conftest*
9453   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
9454 fi
9455 rm -f conftest*
9456
9457   fi
9458   
9459 fi
9460
9461 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
9462   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
9463     cat >> confdefs.h <<\EOF
9464 #define GWINSZ_IN_SYS_IOCTL 1
9465 EOF
9466
9467   fi
9468
9469 if test $am_cv_sys_posix_termios = yes ; then
9470         cat >> confdefs.h <<\EOF
9471 #define HAVE_POSIX_TERMIOS 1
9472 EOF
9473
9474 fi
9475
9476 for ac_hdr in \
9477         arpa/inet.h             \
9478         arpa/nameser.h  \
9479         assert.h                \
9480         crypt.h                 \
9481         errno.h                 \
9482         fcntl.h                 \
9483         filio.h                 \
9484         getopt.h                \
9485         grp.h                   \
9486         libutil.h               \
9487         limits.h                \
9488         locale.h                \
9489         malloc.h                \
9490         memory.h                \
9491         regex.h                 \
9492         psap.h                  \
9493         pwd.h                   \
9494         resolv.h                \
9495         sgtty.h                 \
9496         stdarg.h                \
9497         stddef.h                \
9498         string.h                \
9499         strings.h               \
9500         sysexits.h              \
9501         sys/file.h              \
9502         sys/filio.h             \
9503         sys/errno.h             \
9504         sys/ioctl.h             \
9505         sys/param.h             \
9506         sys/resource.h  \
9507         sys/socket.h    \
9508         sys/syslog.h    \
9509         sys/time.h              \
9510         sys/types.h             \
9511         syslog.h                \
9512         termios.h               \
9513         unistd.h                \
9514
9515 do
9516 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9517 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9518 echo "configure:9519: checking for $ac_hdr" >&5
9519 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9520   echo $ac_n "(cached) $ac_c" 1>&6
9521 else
9522   cat > conftest.$ac_ext <<EOF
9523 #line 9524 "configure"
9524 #include "confdefs.h"
9525 #include <$ac_hdr>
9526 EOF
9527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9528 { (eval echo configure:9529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9530 if test -z "$ac_err"; then
9531   rm -rf conftest*
9532   eval "ac_cv_header_$ac_safe=yes"
9533 else
9534   echo "$ac_err" >&5
9535   echo "configure: failed program was:" >&5
9536   cat conftest.$ac_ext >&5
9537   rm -rf conftest*
9538   eval "ac_cv_header_$ac_safe=no"
9539 fi
9540 rm -f conftest*
9541 fi
9542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9543   echo "$ac_t""yes" 1>&6
9544     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9545   cat >> confdefs.h <<EOF
9546 #define $ac_tr_hdr 1
9547 EOF
9548  
9549 else
9550   echo "$ac_t""no" 1>&6
9551 fi
9552 done
9553
9554
9555 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
9556 echo "configure:9557: checking for uid_t in sys/types.h" >&5
9557 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
9558   echo $ac_n "(cached) $ac_c" 1>&6
9559 else
9560   cat > conftest.$ac_ext <<EOF
9561 #line 9562 "configure"
9562 #include "confdefs.h"
9563 #include <sys/types.h>
9564 EOF
9565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9566   egrep "uid_t" >/dev/null 2>&1; then
9567   rm -rf conftest*
9568   ac_cv_type_uid_t=yes
9569 else
9570   rm -rf conftest*
9571   ac_cv_type_uid_t=no
9572 fi
9573 rm -f conftest*
9574
9575 fi
9576
9577 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
9578 if test $ac_cv_type_uid_t = no; then
9579   cat >> confdefs.h <<\EOF
9580 #define uid_t int
9581 EOF
9582
9583   cat >> confdefs.h <<\EOF
9584 #define gid_t int
9585 EOF
9586
9587 fi
9588
9589 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
9590 echo "configure:9591: checking type of array argument to getgroups" >&5
9591 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
9592   echo $ac_n "(cached) $ac_c" 1>&6
9593 else
9594   if test "$cross_compiling" = yes; then
9595   ac_cv_type_getgroups=cross
9596 else
9597   cat > conftest.$ac_ext <<EOF
9598 #line 9599 "configure"
9599 #include "confdefs.h"
9600
9601 /* Thanks to Mike Rendell for this test.  */
9602 #include <sys/types.h>
9603 #define NGID 256
9604 #undef MAX
9605 #define MAX(x, y) ((x) > (y) ? (x) : (y))
9606 main()
9607 {
9608   gid_t gidset[NGID];
9609   int i, n;
9610   union { gid_t gval; long lval; }  val;
9611
9612   val.lval = -1;
9613   for (i = 0; i < NGID; i++)
9614     gidset[i] = val.gval;
9615   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9616                  gidset);
9617   /* Exit non-zero if getgroups seems to require an array of ints.  This
9618      happens when gid_t is short but getgroups modifies an array of ints.  */
9619   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
9620 }
9621
9622 EOF
9623 if { (eval echo configure:9624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9624 then
9625     ac_cv_type_getgroups=gid_t
9626 else
9627   echo "configure: failed program was:" >&5
9628   cat conftest.$ac_ext >&5
9629   rm -fr conftest*
9630   ac_cv_type_getgroups=int
9631 fi
9632 rm -fr conftest*
9633 fi
9634
9635 if test $ac_cv_type_getgroups = cross; then
9636         cat > conftest.$ac_ext <<EOF
9637 #line 9638 "configure"
9638 #include "confdefs.h"
9639 #include <unistd.h>
9640 EOF
9641 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9642   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
9643   rm -rf conftest*
9644   ac_cv_type_getgroups=gid_t
9645 else
9646   rm -rf conftest*
9647   ac_cv_type_getgroups=int
9648 fi
9649 rm -f conftest*
9650
9651 fi
9652 fi
9653
9654 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
9655 cat >> confdefs.h <<EOF
9656 #define GETGROUPS_T $ac_cv_type_getgroups
9657 EOF
9658
9659  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9660 echo "configure:9661: checking for ANSI C header files" >&5
9661 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
9662   echo $ac_n "(cached) $ac_c" 1>&6
9663 else
9664   cat > conftest.$ac_ext <<EOF
9665 #line 9666 "configure"
9666 #include "confdefs.h"
9667 #include <stdlib.h>
9668 #include <stdarg.h>
9669 #include <string.h>
9670 #include <float.h>
9671 EOF
9672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9673 { (eval echo configure:9674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9675 if test -z "$ac_err"; then
9676   rm -rf conftest*
9677   ac_cv_header_stdc=yes
9678 else
9679   echo "$ac_err" >&5
9680   echo "configure: failed program was:" >&5
9681   cat conftest.$ac_ext >&5
9682   rm -rf conftest*
9683   ac_cv_header_stdc=no
9684 fi
9685 rm -f conftest*
9686
9687 if test $ac_cv_header_stdc = yes; then
9688   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9689 cat > conftest.$ac_ext <<EOF
9690 #line 9691 "configure"
9691 #include "confdefs.h"
9692 #include <string.h>
9693 EOF
9694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9695   egrep "memchr" >/dev/null 2>&1; then
9696   :
9697 else
9698   rm -rf conftest*
9699   ac_cv_header_stdc=no
9700 fi
9701 rm -f conftest*
9702
9703 fi
9704
9705 if test $ac_cv_header_stdc = yes; then
9706   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9707 cat > conftest.$ac_ext <<EOF
9708 #line 9709 "configure"
9709 #include "confdefs.h"
9710 #include <stdlib.h>
9711 EOF
9712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9713   egrep "free" >/dev/null 2>&1; then
9714   :
9715 else
9716   rm -rf conftest*
9717   ac_cv_header_stdc=no
9718 fi
9719 rm -f conftest*
9720
9721 fi
9722
9723 if test $ac_cv_header_stdc = yes; then
9724   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9725 if test "$cross_compiling" = yes; then
9726   :
9727 else
9728   cat > conftest.$ac_ext <<EOF
9729 #line 9730 "configure"
9730 #include "confdefs.h"
9731 #include <ctype.h>
9732 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9733 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9734 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9735 int main () { int i; for (i = 0; i < 256; i++)
9736 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
9737 exit (0); }
9738
9739 EOF
9740 if { (eval echo configure:9741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9741 then
9742   :
9743 else
9744   echo "configure: failed program was:" >&5
9745   cat conftest.$ac_ext >&5
9746   rm -fr conftest*
9747   ac_cv_header_stdc=no
9748 fi
9749 rm -fr conftest*
9750 fi
9751
9752 fi
9753 fi
9754
9755 echo "$ac_t""$ac_cv_header_stdc" 1>&6
9756 if test $ac_cv_header_stdc = yes; then
9757   cat >> confdefs.h <<\EOF
9758 #define STDC_HEADERS 1
9759 EOF
9760
9761 fi
9762
9763 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
9764 echo "configure:9765: checking for mode_t" >&5
9765 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
9766   echo $ac_n "(cached) $ac_c" 1>&6
9767 else
9768   cat > conftest.$ac_ext <<EOF
9769 #line 9770 "configure"
9770 #include "confdefs.h"
9771 #include <sys/types.h>
9772 #if STDC_HEADERS
9773 #include <stdlib.h>
9774 #include <stddef.h>
9775 #endif
9776 EOF
9777 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9778   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9779   rm -rf conftest*
9780   ac_cv_type_mode_t=yes
9781 else
9782   rm -rf conftest*
9783   ac_cv_type_mode_t=no
9784 fi
9785 rm -f conftest*
9786
9787 fi
9788 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
9789 if test $ac_cv_type_mode_t = no; then
9790   cat >> confdefs.h <<\EOF
9791 #define mode_t int
9792 EOF
9793
9794 fi
9795
9796 echo $ac_n "checking for off_t""... $ac_c" 1>&6
9797 echo "configure:9798: checking for off_t" >&5
9798 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
9799   echo $ac_n "(cached) $ac_c" 1>&6
9800 else
9801   cat > conftest.$ac_ext <<EOF
9802 #line 9803 "configure"
9803 #include "confdefs.h"
9804 #include <sys/types.h>
9805 #if STDC_HEADERS
9806 #include <stdlib.h>
9807 #include <stddef.h>
9808 #endif
9809 EOF
9810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9811   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9812   rm -rf conftest*
9813   ac_cv_type_off_t=yes
9814 else
9815   rm -rf conftest*
9816   ac_cv_type_off_t=no
9817 fi
9818 rm -f conftest*
9819
9820 fi
9821 echo "$ac_t""$ac_cv_type_off_t" 1>&6
9822 if test $ac_cv_type_off_t = no; then
9823   cat >> confdefs.h <<\EOF
9824 #define off_t long
9825 EOF
9826
9827 fi
9828
9829 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9830 echo "configure:9831: checking for pid_t" >&5
9831 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
9832   echo $ac_n "(cached) $ac_c" 1>&6
9833 else
9834   cat > conftest.$ac_ext <<EOF
9835 #line 9836 "configure"
9836 #include "confdefs.h"
9837 #include <sys/types.h>
9838 #if STDC_HEADERS
9839 #include <stdlib.h>
9840 #include <stddef.h>
9841 #endif
9842 EOF
9843 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9844   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9845   rm -rf conftest*
9846   ac_cv_type_pid_t=yes
9847 else
9848   rm -rf conftest*
9849   ac_cv_type_pid_t=no
9850 fi
9851 rm -f conftest*
9852
9853 fi
9854 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
9855 if test $ac_cv_type_pid_t = no; then
9856   cat >> confdefs.h <<\EOF
9857 #define pid_t int
9858 EOF
9859
9860 fi
9861
9862 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
9863 echo "configure:9864: checking for ptrdiff_t" >&5
9864 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then
9865   echo $ac_n "(cached) $ac_c" 1>&6
9866 else
9867   cat > conftest.$ac_ext <<EOF
9868 #line 9869 "configure"
9869 #include "confdefs.h"
9870 #include <stddef.h>
9871 int main() {
9872 ptrdiff_t p
9873 ; return 0; }
9874 EOF
9875 if { (eval echo configure:9876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9876   rm -rf conftest*
9877   am_cv_type_ptrdiff_t=yes
9878 else
9879   echo "configure: failed program was:" >&5
9880   cat conftest.$ac_ext >&5
9881   rm -rf conftest*
9882   am_cv_type_ptrdiff_t=no
9883 fi
9884 rm -f conftest*
9885 fi
9886
9887 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
9888    if test $am_cv_type_ptrdiff_t = yes; then
9889      cat >> confdefs.h <<\EOF
9890 #define HAVE_PTRDIFF_T 1
9891 EOF
9892
9893    fi
9894
9895 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
9896 echo "configure:9897: checking return type of signal handlers" >&5
9897 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
9898   echo $ac_n "(cached) $ac_c" 1>&6
9899 else
9900   cat > conftest.$ac_ext <<EOF
9901 #line 9902 "configure"
9902 #include "confdefs.h"
9903 #include <sys/types.h>
9904 #include <signal.h>
9905 #ifdef signal
9906 #undef signal
9907 #endif
9908 #ifdef __cplusplus
9909 extern "C" void (*signal (int, void (*)(int)))(int);
9910 #else
9911 void (*signal ()) ();
9912 #endif
9913
9914 int main() {
9915 int i;
9916 ; return 0; }
9917 EOF
9918 if { (eval echo configure:9919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9919   rm -rf conftest*
9920   ac_cv_type_signal=void
9921 else
9922   echo "configure: failed program was:" >&5
9923   cat conftest.$ac_ext >&5
9924   rm -rf conftest*
9925   ac_cv_type_signal=int
9926 fi
9927 rm -f conftest*
9928 fi
9929
9930 echo "$ac_t""$ac_cv_type_signal" 1>&6
9931 cat >> confdefs.h <<EOF
9932 #define RETSIGTYPE $ac_cv_type_signal
9933 EOF
9934
9935
9936 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
9937 echo "configure:9938: checking for sig_atomic_t" >&5
9938 if eval "test \"`echo '$''{'ol_cv_type_sig_atomic_t'+set}'`\" = set"; then
9939   echo $ac_n "(cached) $ac_c" 1>&6
9940 else
9941   cat > conftest.$ac_ext <<EOF
9942 #line 9943 "configure"
9943 #include "confdefs.h"
9944 #include <signal.h>
9945 int main() {
9946 sig_atomic_t atomic;
9947 ; return 0; }
9948 EOF
9949 if { (eval echo configure:9950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9950   rm -rf conftest*
9951   ol_cv_type_sig_atomic_t=yes
9952 else
9953   echo "configure: failed program was:" >&5
9954   cat conftest.$ac_ext >&5
9955   rm -rf conftest*
9956   ol_cv_type_sig_atomic_t=no
9957 fi
9958 rm -f conftest*
9959 fi
9960
9961 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
9962   if test $ol_cv_type_sig_atomic_t = no; then
9963     cat >> confdefs.h <<\EOF
9964 #define sig_atomic_t int
9965 EOF
9966
9967   fi
9968  
9969 echo $ac_n "checking for size_t""... $ac_c" 1>&6
9970 echo "configure:9971: checking for size_t" >&5
9971 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
9972   echo $ac_n "(cached) $ac_c" 1>&6
9973 else
9974   cat > conftest.$ac_ext <<EOF
9975 #line 9976 "configure"
9976 #include "confdefs.h"
9977 #include <sys/types.h>
9978 #if STDC_HEADERS
9979 #include <stdlib.h>
9980 #include <stddef.h>
9981 #endif
9982 EOF
9983 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9984   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9985   rm -rf conftest*
9986   ac_cv_type_size_t=yes
9987 else
9988   rm -rf conftest*
9989   ac_cv_type_size_t=no
9990 fi
9991 rm -f conftest*
9992
9993 fi
9994 echo "$ac_t""$ac_cv_type_size_t" 1>&6
9995 if test $ac_cv_type_size_t = no; then
9996   cat >> confdefs.h <<\EOF
9997 #define size_t unsigned
9998 EOF
9999
10000 fi
10001
10002 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
10003 echo "configure:10004: checking for st_blksize in struct stat" >&5
10004 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
10005   echo $ac_n "(cached) $ac_c" 1>&6
10006 else
10007   cat > conftest.$ac_ext <<EOF
10008 #line 10009 "configure"
10009 #include "confdefs.h"
10010 #include <sys/types.h>
10011 #include <sys/stat.h>
10012 int main() {
10013 struct stat s; s.st_blksize;
10014 ; return 0; }
10015 EOF
10016 if { (eval echo configure:10017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10017   rm -rf conftest*
10018   ac_cv_struct_st_blksize=yes
10019 else
10020   echo "configure: failed program was:" >&5
10021   cat conftest.$ac_ext >&5
10022   rm -rf conftest*
10023   ac_cv_struct_st_blksize=no
10024 fi
10025 rm -f conftest*
10026 fi
10027
10028 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
10029 if test $ac_cv_struct_st_blksize = yes; then
10030   cat >> confdefs.h <<\EOF
10031 #define HAVE_ST_BLKSIZE 1
10032 EOF
10033
10034 fi
10035
10036 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
10037 echo "configure:10038: checking whether time.h and sys/time.h may both be included" >&5
10038 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
10039   echo $ac_n "(cached) $ac_c" 1>&6
10040 else
10041   cat > conftest.$ac_ext <<EOF
10042 #line 10043 "configure"
10043 #include "confdefs.h"
10044 #include <sys/types.h>
10045 #include <sys/time.h>
10046 #include <time.h>
10047 int main() {
10048 struct tm *tp;
10049 ; return 0; }
10050 EOF
10051 if { (eval echo configure:10052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10052   rm -rf conftest*
10053   ac_cv_header_time=yes
10054 else
10055   echo "configure: failed program was:" >&5
10056   cat conftest.$ac_ext >&5
10057   rm -rf conftest*
10058   ac_cv_header_time=no
10059 fi
10060 rm -f conftest*
10061 fi
10062
10063 echo "$ac_t""$ac_cv_header_time" 1>&6
10064 if test $ac_cv_header_time = yes; then
10065   cat >> confdefs.h <<\EOF
10066 #define TIME_WITH_SYS_TIME 1
10067 EOF
10068
10069 fi
10070
10071 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
10072 echo "configure:10073: checking whether struct tm is in sys/time.h or time.h" >&5
10073 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
10074   echo $ac_n "(cached) $ac_c" 1>&6
10075 else
10076   cat > conftest.$ac_ext <<EOF
10077 #line 10078 "configure"
10078 #include "confdefs.h"
10079 #include <sys/types.h>
10080 #include <time.h>
10081 int main() {
10082 struct tm *tp; tp->tm_sec;
10083 ; return 0; }
10084 EOF
10085 if { (eval echo configure:10086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10086   rm -rf conftest*
10087   ac_cv_struct_tm=time.h
10088 else
10089   echo "configure: failed program was:" >&5
10090   cat conftest.$ac_ext >&5
10091   rm -rf conftest*
10092   ac_cv_struct_tm=sys/time.h
10093 fi
10094 rm -f conftest*
10095 fi
10096
10097 echo "$ac_t""$ac_cv_struct_tm" 1>&6
10098 if test $ac_cv_struct_tm = sys/time.h; then
10099   cat >> confdefs.h <<\EOF
10100 #define TM_IN_SYS_TIME 1
10101 EOF
10102
10103 fi
10104
10105 # test for pw_gecos in struct passwd
10106 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
10107 echo "configure:10108: checking struct passwd for pw_gecos" >&5
10108 if eval "test \"`echo '$''{'ol_cv_struct_passwd_pw_gecos'+set}'`\" = set"; then
10109   echo $ac_n "(cached) $ac_c" 1>&6
10110 else
10111   
10112         cat > conftest.$ac_ext <<EOF
10113 #line 10114 "configure"
10114 #include "confdefs.h"
10115 #include <pwd.h>
10116 int main() {
10117
10118         struct passwd pwd;
10119         pwd.pw_gecos = pwd.pw_name;
10120
10121 ; return 0; }
10122 EOF
10123 if { (eval echo configure:10124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10124   rm -rf conftest*
10125   ol_cv_struct_passwd_pw_gecos=yes
10126 else
10127   echo "configure: failed program was:" >&5
10128   cat conftest.$ac_ext >&5
10129   rm -rf conftest*
10130   ol_cv_struct_passwd_pw_gecos=no
10131 fi
10132 rm -f conftest*
10133 fi
10134
10135 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
10136 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
10137         cat >> confdefs.h <<\EOF
10138 #define HAVE_PW_GECOS 1
10139 EOF
10140
10141 fi
10142
10143
10144
10145 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
10146 echo "configure:10147: checking if toupper() requires islower()" >&5
10147 if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then
10148   echo $ac_n "(cached) $ac_c" 1>&6
10149 else
10150   
10151         if test "$cross_compiling" = yes; then
10152   ol_cv_c_upper_lower=safe
10153 else
10154   cat > conftest.$ac_ext <<EOF
10155 #line 10156 "configure"
10156 #include "confdefs.h"
10157
10158 #include <ctype.h>
10159 main()
10160 {
10161         if ('C' == toupper('C'))
10162                 exit(0);
10163         else
10164                 exit(1);
10165 }
10166 EOF
10167 if { (eval echo configure:10168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10168 then
10169   ol_cv_c_upper_lower=no
10170 else
10171   echo "configure: failed program was:" >&5
10172   cat conftest.$ac_ext >&5
10173   rm -fr conftest*
10174   ol_cv_c_upper_lower=yes
10175 fi
10176 rm -fr conftest*
10177 fi
10178
10179 fi
10180
10181 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
10182 if test $ol_cv_c_upper_lower != no ; then
10183         cat >> confdefs.h <<\EOF
10184 #define C_UPPER_LOWER 1
10185 EOF
10186
10187 fi
10188
10189 echo $ac_n "checking for working const""... $ac_c" 1>&6
10190 echo "configure:10191: checking for working const" >&5
10191 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
10192   echo $ac_n "(cached) $ac_c" 1>&6
10193 else
10194   cat > conftest.$ac_ext <<EOF
10195 #line 10196 "configure"
10196 #include "confdefs.h"
10197
10198 int main() {
10199
10200 /* Ultrix mips cc rejects this.  */
10201 typedef int charset[2]; const charset x;
10202 /* SunOS 4.1.1 cc rejects this.  */
10203 char const *const *ccp;
10204 char **p;
10205 /* NEC SVR4.0.2 mips cc rejects this.  */
10206 struct point {int x, y;};
10207 static struct point const zero = {0,0};
10208 /* AIX XL C 1.02.0.0 rejects this.
10209    It does not let you subtract one const X* pointer from another in an arm
10210    of an if-expression whose if-part is not a constant expression */
10211 const char *g = "string";
10212 ccp = &g + (g ? g-g : 0);
10213 /* HPUX 7.0 cc rejects these. */
10214 ++ccp;
10215 p = (char**) ccp;
10216 ccp = (char const *const *) p;
10217 { /* SCO 3.2v4 cc rejects this.  */
10218   char *t;
10219   char const *s = 0 ? (char *) 0 : (char const *) 0;
10220
10221   *t++ = 0;
10222 }
10223 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10224   int x[] = {25, 17};
10225   const int *foo = &x[0];
10226   ++foo;
10227 }
10228 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10229   typedef const int *iptr;
10230   iptr p = 0;
10231   ++p;
10232 }
10233 { /* AIX XL C 1.02.0.0 rejects this saying
10234      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10235   struct s { int j; const int *ap[3]; };
10236   struct s *b; b->j = 5;
10237 }
10238 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10239   const int foo = 10;
10240 }
10241
10242 ; return 0; }
10243 EOF
10244 if { (eval echo configure:10245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10245   rm -rf conftest*
10246   ac_cv_c_const=yes
10247 else
10248   echo "configure: failed program was:" >&5
10249   cat conftest.$ac_ext >&5
10250   rm -rf conftest*
10251   ac_cv_c_const=no
10252 fi
10253 rm -f conftest*
10254 fi
10255
10256 echo "$ac_t""$ac_cv_c_const" 1>&6
10257 if test $ac_cv_c_const = no; then
10258   cat >> confdefs.h <<\EOF
10259 #define const 
10260 EOF
10261
10262 fi
10263
10264 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
10265 echo "configure:10266: checking if compiler understands volatile" >&5
10266 if eval "test \"`echo '$''{'ol_cv_c_volatile'+set}'`\" = set"; then
10267   echo $ac_n "(cached) $ac_c" 1>&6
10268 else
10269   cat > conftest.$ac_ext <<EOF
10270 #line 10271 "configure"
10271 #include "confdefs.h"
10272 int x, y, z;
10273 int main() {
10274 volatile int a; int * volatile b = x ? &y : &z;
10275       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
10276       *b = 0;
10277 ; return 0; }
10278 EOF
10279 if { (eval echo configure:10280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10280   rm -rf conftest*
10281   ol_cv_c_volatile=yes
10282 else
10283   echo "configure: failed program was:" >&5
10284   cat conftest.$ac_ext >&5
10285   rm -rf conftest*
10286   ol_cv_c_volatile=no
10287 fi
10288 rm -f conftest*
10289 fi
10290
10291 echo "$ac_t""$ol_cv_c_volatile" 1>&6
10292   if test $ol_cv_c_volatile = yes; then
10293     : 
10294   else
10295     cat >> confdefs.h <<\EOF
10296 #define volatile 
10297 EOF
10298
10299   fi
10300  
10301
10302 if test $cross_compiling = yes ; then
10303         cat >> confdefs.h <<\EOF
10304 #define CROSS_COMPILING 1
10305 EOF
10306
10307 else
10308         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
10309 echo "configure:10310: checking whether byte ordering is bigendian" >&5
10310 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
10311   echo $ac_n "(cached) $ac_c" 1>&6
10312 else
10313   ac_cv_c_bigendian=unknown
10314 # See if sys/param.h defines the BYTE_ORDER macro.
10315 cat > conftest.$ac_ext <<EOF
10316 #line 10317 "configure"
10317 #include "confdefs.h"
10318 #include <sys/types.h>
10319 #include <sys/param.h>
10320 int main() {
10321
10322 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
10323  bogus endian macros
10324 #endif
10325 ; return 0; }
10326 EOF
10327 if { (eval echo configure:10328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10328   rm -rf conftest*
10329   # It does; now see whether it defined to BIG_ENDIAN or not.
10330 cat > conftest.$ac_ext <<EOF
10331 #line 10332 "configure"
10332 #include "confdefs.h"
10333 #include <sys/types.h>
10334 #include <sys/param.h>
10335 int main() {
10336
10337 #if BYTE_ORDER != BIG_ENDIAN
10338  not big endian
10339 #endif
10340 ; return 0; }
10341 EOF
10342 if { (eval echo configure:10343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10343   rm -rf conftest*
10344   ac_cv_c_bigendian=yes
10345 else
10346   echo "configure: failed program was:" >&5
10347   cat conftest.$ac_ext >&5
10348   rm -rf conftest*
10349   ac_cv_c_bigendian=no
10350 fi
10351 rm -f conftest*
10352 else
10353   echo "configure: failed program was:" >&5
10354   cat conftest.$ac_ext >&5
10355 fi
10356 rm -f conftest*
10357 if test $ac_cv_c_bigendian = unknown; then
10358 if test "$cross_compiling" = yes; then
10359     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10360 else
10361   cat > conftest.$ac_ext <<EOF
10362 #line 10363 "configure"
10363 #include "confdefs.h"
10364 main () {
10365   /* Are we little or big endian?  From Harbison&Steele.  */
10366   union
10367   {
10368     long l;
10369     char c[sizeof (long)];
10370   } u;
10371   u.l = 1;
10372   exit (u.c[sizeof (long) - 1] == 1);
10373 }
10374 EOF
10375 if { (eval echo configure:10376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10376 then
10377   ac_cv_c_bigendian=no
10378 else
10379   echo "configure: failed program was:" >&5
10380   cat conftest.$ac_ext >&5
10381   rm -fr conftest*
10382   ac_cv_c_bigendian=yes
10383 fi
10384 rm -fr conftest*
10385 fi
10386
10387 fi
10388 fi
10389
10390 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
10391 if test $ac_cv_c_bigendian = yes; then
10392   cat >> confdefs.h <<\EOF
10393 #define WORDS_BIGENDIAN 1
10394 EOF
10395
10396 fi
10397
10398         echo $ac_n "checking size of short""... $ac_c" 1>&6
10399 echo "configure:10400: checking size of short" >&5
10400 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
10401   echo $ac_n "(cached) $ac_c" 1>&6
10402 else
10403   if test "$cross_compiling" = yes; then
10404     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10405 else
10406   cat > conftest.$ac_ext <<EOF
10407 #line 10408 "configure"
10408 #include "confdefs.h"
10409 #include <stdio.h>
10410 main()
10411 {
10412   FILE *f=fopen("conftestval", "w");
10413   if (!f) exit(1);
10414   fprintf(f, "%d\n", sizeof(short));
10415   exit(0);
10416 }
10417 EOF
10418 if { (eval echo configure:10419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10419 then
10420   ac_cv_sizeof_short=`cat conftestval`
10421 else
10422   echo "configure: failed program was:" >&5
10423   cat conftest.$ac_ext >&5
10424   rm -fr conftest*
10425   ac_cv_sizeof_short=0
10426 fi
10427 rm -fr conftest*
10428 fi
10429
10430 fi
10431 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
10432 cat >> confdefs.h <<EOF
10433 #define SIZEOF_SHORT $ac_cv_sizeof_short
10434 EOF
10435
10436  
10437         echo $ac_n "checking size of int""... $ac_c" 1>&6
10438 echo "configure:10439: checking size of int" >&5
10439 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
10440   echo $ac_n "(cached) $ac_c" 1>&6
10441 else
10442   if test "$cross_compiling" = yes; then
10443     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10444 else
10445   cat > conftest.$ac_ext <<EOF
10446 #line 10447 "configure"
10447 #include "confdefs.h"
10448 #include <stdio.h>
10449 main()
10450 {
10451   FILE *f=fopen("conftestval", "w");
10452   if (!f) exit(1);
10453   fprintf(f, "%d\n", sizeof(int));
10454   exit(0);
10455 }
10456 EOF
10457 if { (eval echo configure:10458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10458 then
10459   ac_cv_sizeof_int=`cat conftestval`
10460 else
10461   echo "configure: failed program was:" >&5
10462   cat conftest.$ac_ext >&5
10463   rm -fr conftest*
10464   ac_cv_sizeof_int=0
10465 fi
10466 rm -fr conftest*
10467 fi
10468
10469 fi
10470 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
10471 cat >> confdefs.h <<EOF
10472 #define SIZEOF_INT $ac_cv_sizeof_int
10473 EOF
10474
10475  
10476         echo $ac_n "checking size of long""... $ac_c" 1>&6
10477 echo "configure:10478: checking size of long" >&5
10478 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
10479   echo $ac_n "(cached) $ac_c" 1>&6
10480 else
10481   if test "$cross_compiling" = yes; then
10482     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
10483 else
10484   cat > conftest.$ac_ext <<EOF
10485 #line 10486 "configure"
10486 #include "confdefs.h"
10487 #include <stdio.h>
10488 main()
10489 {
10490   FILE *f=fopen("conftestval", "w");
10491   if (!f) exit(1);
10492   fprintf(f, "%d\n", sizeof(long));
10493   exit(0);
10494 }
10495 EOF
10496 if { (eval echo configure:10497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10497 then
10498   ac_cv_sizeof_long=`cat conftestval`
10499 else
10500   echo "configure: failed program was:" >&5
10501   cat conftest.$ac_ext >&5
10502   rm -fr conftest*
10503   ac_cv_sizeof_long=0
10504 fi
10505 rm -fr conftest*
10506 fi
10507
10508 fi
10509 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
10510 cat >> confdefs.h <<EOF
10511 #define SIZEOF_LONG $ac_cv_sizeof_long
10512 EOF
10513
10514
10515 fi
10516
10517 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
10518 echo "configure:10519: checking for 8-bit clean memcmp" >&5
10519 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
10520   echo $ac_n "(cached) $ac_c" 1>&6
10521 else
10522   if test "$cross_compiling" = yes; then
10523   ac_cv_func_memcmp_clean=no
10524 else
10525   cat > conftest.$ac_ext <<EOF
10526 #line 10527 "configure"
10527 #include "confdefs.h"
10528
10529 main()
10530 {
10531   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
10532   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
10533 }
10534
10535 EOF
10536 if { (eval echo configure:10537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10537 then
10538   ac_cv_func_memcmp_clean=yes
10539 else
10540   echo "configure: failed program was:" >&5
10541   cat conftest.$ac_ext >&5
10542   rm -fr conftest*
10543   ac_cv_func_memcmp_clean=no
10544 fi
10545 rm -fr conftest*
10546 fi
10547
10548 fi
10549
10550 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
10551 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
10552
10553 echo $ac_n "checking for strftime""... $ac_c" 1>&6
10554 echo "configure:10555: checking for strftime" >&5
10555 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
10556   echo $ac_n "(cached) $ac_c" 1>&6
10557 else
10558   cat > conftest.$ac_ext <<EOF
10559 #line 10560 "configure"
10560 #include "confdefs.h"
10561 /* System header to define __stub macros and hopefully few prototypes,
10562     which can conflict with char strftime(); below.  */
10563 #include <assert.h>
10564 /* Override any gcc2 internal prototype to avoid an error.  */
10565 /* We use char because int might match the return type of a gcc2
10566     builtin and then its argument prototype would still apply.  */
10567 char strftime();
10568
10569 int main() {
10570
10571 /* The GNU C library defines this for functions which it implements
10572     to always fail with ENOSYS.  Some functions are actually named
10573     something starting with __ and the normal name is an alias.  */
10574 #if defined (__stub_strftime) || defined (__stub___strftime)
10575 choke me
10576 #else
10577 strftime();
10578 #endif
10579
10580 ; return 0; }
10581 EOF
10582 if { (eval echo configure:10583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10583   rm -rf conftest*
10584   eval "ac_cv_func_strftime=yes"
10585 else
10586   echo "configure: failed program was:" >&5
10587   cat conftest.$ac_ext >&5
10588   rm -rf conftest*
10589   eval "ac_cv_func_strftime=no"
10590 fi
10591 rm -f conftest*
10592 fi
10593
10594 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
10595   echo "$ac_t""yes" 1>&6
10596   cat >> confdefs.h <<\EOF
10597 #define HAVE_STRFTIME 1
10598 EOF
10599
10600 else
10601   echo "$ac_t""no" 1>&6
10602 # strftime is in -lintl on SCO UNIX.
10603 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
10604 echo "configure:10605: checking for strftime in -lintl" >&5
10605 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
10606 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10607   echo $ac_n "(cached) $ac_c" 1>&6
10608 else
10609   ac_save_LIBS="$LIBS"
10610 LIBS="-lintl  $LIBS"
10611 cat > conftest.$ac_ext <<EOF
10612 #line 10613 "configure"
10613 #include "confdefs.h"
10614 /* Override any gcc2 internal prototype to avoid an error.  */
10615 /* We use char because int might match the return type of a gcc2
10616     builtin and then its argument prototype would still apply.  */
10617 char strftime();
10618
10619 int main() {
10620 strftime()
10621 ; return 0; }
10622 EOF
10623 if { (eval echo configure:10624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10624   rm -rf conftest*
10625   eval "ac_cv_lib_$ac_lib_var=yes"
10626 else
10627   echo "configure: failed program was:" >&5
10628   cat conftest.$ac_ext >&5
10629   rm -rf conftest*
10630   eval "ac_cv_lib_$ac_lib_var=no"
10631 fi
10632 rm -f conftest*
10633 LIBS="$ac_save_LIBS"
10634
10635 fi
10636 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10637   echo "$ac_t""yes" 1>&6
10638   cat >> confdefs.h <<\EOF
10639 #define HAVE_STRFTIME 1
10640 EOF
10641
10642 LIBS="-lintl $LIBS"
10643 else
10644   echo "$ac_t""no" 1>&6
10645 fi
10646
10647 fi
10648
10649 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
10650 echo "configure:10651: checking for vprintf" >&5
10651 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
10652   echo $ac_n "(cached) $ac_c" 1>&6
10653 else
10654   cat > conftest.$ac_ext <<EOF
10655 #line 10656 "configure"
10656 #include "confdefs.h"
10657 /* System header to define __stub macros and hopefully few prototypes,
10658     which can conflict with char vprintf(); below.  */
10659 #include <assert.h>
10660 /* Override any gcc2 internal prototype to avoid an error.  */
10661 /* We use char because int might match the return type of a gcc2
10662     builtin and then its argument prototype would still apply.  */
10663 char vprintf();
10664
10665 int main() {
10666
10667 /* The GNU C library defines this for functions which it implements
10668     to always fail with ENOSYS.  Some functions are actually named
10669     something starting with __ and the normal name is an alias.  */
10670 #if defined (__stub_vprintf) || defined (__stub___vprintf)
10671 choke me
10672 #else
10673 vprintf();
10674 #endif
10675
10676 ; return 0; }
10677 EOF
10678 if { (eval echo configure:10679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10679   rm -rf conftest*
10680   eval "ac_cv_func_vprintf=yes"
10681 else
10682   echo "configure: failed program was:" >&5
10683   cat conftest.$ac_ext >&5
10684   rm -rf conftest*
10685   eval "ac_cv_func_vprintf=no"
10686 fi
10687 rm -f conftest*
10688 fi
10689
10690 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
10691   echo "$ac_t""yes" 1>&6
10692   cat >> confdefs.h <<\EOF
10693 #define HAVE_VPRINTF 1
10694 EOF
10695
10696 else
10697   echo "$ac_t""no" 1>&6
10698 fi
10699
10700 if test "$ac_cv_func_vprintf" != yes; then
10701 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
10702 echo "configure:10703: checking for _doprnt" >&5
10703 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
10704   echo $ac_n "(cached) $ac_c" 1>&6
10705 else
10706   cat > conftest.$ac_ext <<EOF
10707 #line 10708 "configure"
10708 #include "confdefs.h"
10709 /* System header to define __stub macros and hopefully few prototypes,
10710     which can conflict with char _doprnt(); below.  */
10711 #include <assert.h>
10712 /* Override any gcc2 internal prototype to avoid an error.  */
10713 /* We use char because int might match the return type of a gcc2
10714     builtin and then its argument prototype would still apply.  */
10715 char _doprnt();
10716
10717 int main() {
10718
10719 /* The GNU C library defines this for functions which it implements
10720     to always fail with ENOSYS.  Some functions are actually named
10721     something starting with __ and the normal name is an alias.  */
10722 #if defined (__stub__doprnt) || defined (__stub____doprnt)
10723 choke me
10724 #else
10725 _doprnt();
10726 #endif
10727
10728 ; return 0; }
10729 EOF
10730 if { (eval echo configure:10731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10731   rm -rf conftest*
10732   eval "ac_cv_func__doprnt=yes"
10733 else
10734   echo "configure: failed program was:" >&5
10735   cat conftest.$ac_ext >&5
10736   rm -rf conftest*
10737   eval "ac_cv_func__doprnt=no"
10738 fi
10739 rm -f conftest*
10740 fi
10741
10742 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
10743   echo "$ac_t""yes" 1>&6
10744   cat >> confdefs.h <<\EOF
10745 #define HAVE_DOPRNT 1
10746 EOF
10747
10748 else
10749   echo "$ac_t""no" 1>&6
10750 fi
10751
10752 fi
10753
10754
10755 if test $ac_cv_func_vprintf = yes ; then
10756                 for ac_func in vsnprintf vsprintf
10757 do
10758 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10759 echo "configure:10760: checking for $ac_func" >&5
10760 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10761   echo $ac_n "(cached) $ac_c" 1>&6
10762 else
10763   cat > conftest.$ac_ext <<EOF
10764 #line 10765 "configure"
10765 #include "confdefs.h"
10766 /* System header to define __stub macros and hopefully few prototypes,
10767     which can conflict with char $ac_func(); below.  */
10768 #include <assert.h>
10769 /* Override any gcc2 internal prototype to avoid an error.  */
10770 /* We use char because int might match the return type of a gcc2
10771     builtin and then its argument prototype would still apply.  */
10772 char $ac_func();
10773
10774 int main() {
10775
10776 /* The GNU C library defines this for functions which it implements
10777     to always fail with ENOSYS.  Some functions are actually named
10778     something starting with __ and the normal name is an alias.  */
10779 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10780 choke me
10781 #else
10782 $ac_func();
10783 #endif
10784
10785 ; return 0; }
10786 EOF
10787 if { (eval echo configure:10788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10788   rm -rf conftest*
10789   eval "ac_cv_func_$ac_func=yes"
10790 else
10791   echo "configure: failed program was:" >&5
10792   cat conftest.$ac_ext >&5
10793   rm -rf conftest*
10794   eval "ac_cv_func_$ac_func=no"
10795 fi
10796 rm -f conftest*
10797 fi
10798
10799 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10800   echo "$ac_t""yes" 1>&6
10801     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10802   cat >> confdefs.h <<EOF
10803 #define $ac_tr_func 1
10804 EOF
10805  
10806 else
10807   echo "$ac_t""no" 1>&6
10808 fi
10809 done
10810
10811 fi
10812
10813 for ac_func in \
10814         bcopy                   \
10815         endgrent                \
10816         endpwent                \
10817         flock                   \
10818         getdtablesize           \
10819         getgrgid                \
10820         gethostname             \
10821         getpass                 \
10822         getpwuid                \
10823         gettimeofday            \
10824         lockf                   \
10825         memcpy                  \
10826         memmove                 \
10827         mkstemp                 \
10828         recv                    \
10829         recvfrom                \
10830         setpwfile               \
10831         setsid                  \
10832         signal                  \
10833         sigset                  \
10834         snprintf                \
10835         strdup                  \
10836         strerror                \
10837         strpbrk                 \
10838         strrchr                 \
10839         strsep                  \
10840         strstr                  \
10841         strtol                  \
10842         strtoul                 \
10843         strspn                  \
10844         sysconf                 \
10845         waitpid                 \
10846         wait4                   \
10847
10848 do
10849 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10850 echo "configure:10851: checking for $ac_func" >&5
10851 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10852   echo $ac_n "(cached) $ac_c" 1>&6
10853 else
10854   cat > conftest.$ac_ext <<EOF
10855 #line 10856 "configure"
10856 #include "confdefs.h"
10857 /* System header to define __stub macros and hopefully few prototypes,
10858     which can conflict with char $ac_func(); below.  */
10859 #include <assert.h>
10860 /* Override any gcc2 internal prototype to avoid an error.  */
10861 /* We use char because int might match the return type of a gcc2
10862     builtin and then its argument prototype would still apply.  */
10863 char $ac_func();
10864
10865 int main() {
10866
10867 /* The GNU C library defines this for functions which it implements
10868     to always fail with ENOSYS.  Some functions are actually named
10869     something starting with __ and the normal name is an alias.  */
10870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10871 choke me
10872 #else
10873 $ac_func();
10874 #endif
10875
10876 ; return 0; }
10877 EOF
10878 if { (eval echo configure:10879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10879   rm -rf conftest*
10880   eval "ac_cv_func_$ac_func=yes"
10881 else
10882   echo "configure: failed program was:" >&5
10883   cat conftest.$ac_ext >&5
10884   rm -rf conftest*
10885   eval "ac_cv_func_$ac_func=no"
10886 fi
10887 rm -f conftest*
10888 fi
10889
10890 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10891   echo "$ac_t""yes" 1>&6
10892     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10893   cat >> confdefs.h <<EOF
10894 #define $ac_tr_func 1
10895 EOF
10896  
10897 else
10898   echo "$ac_t""no" 1>&6
10899 fi
10900 done
10901
10902
10903 for ac_func in getopt tempnam
10904 do
10905 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10906 echo "configure:10907: checking for $ac_func" >&5
10907 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
10908   echo $ac_n "(cached) $ac_c" 1>&6
10909 else
10910   cat > conftest.$ac_ext <<EOF
10911 #line 10912 "configure"
10912 #include "confdefs.h"
10913 /* System header to define __stub macros and hopefully few prototypes,
10914     which can conflict with char $ac_func(); below.  */
10915 #include <assert.h>
10916 /* Override any gcc2 internal prototype to avoid an error.  */
10917 /* We use char because int might match the return type of a gcc2
10918     builtin and then its argument prototype would still apply.  */
10919 char $ac_func();
10920
10921 int main() {
10922
10923 /* The GNU C library defines this for functions which it implements
10924     to always fail with ENOSYS.  Some functions are actually named
10925     something starting with __ and the normal name is an alias.  */
10926 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10927 choke me
10928 #else
10929 $ac_func();
10930 #endif
10931
10932 ; return 0; }
10933 EOF
10934 if { (eval echo configure:10935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10935   rm -rf conftest*
10936   eval "ac_cv_func_$ac_func=yes"
10937 else
10938   echo "configure: failed program was:" >&5
10939   cat conftest.$ac_ext >&5
10940   rm -rf conftest*
10941   eval "ac_cv_func_$ac_func=no"
10942 fi
10943 rm -f conftest*
10944 fi
10945
10946 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10947   echo "$ac_t""yes" 1>&6
10948     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10949   cat >> confdefs.h <<EOF
10950 #define $ac_tr_func 1
10951 EOF
10952  
10953 else
10954   echo "$ac_t""no" 1>&6
10955 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
10956 fi
10957 done
10958
10959
10960
10961 # Check Configuration
10962
10963 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
10964 echo "configure:10965: checking declaration of sys_errlist" >&5
10965 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
10966   echo $ac_n "(cached) $ac_c" 1>&6
10967 else
10968   
10969         cat > conftest.$ac_ext <<EOF
10970 #line 10971 "configure"
10971 #include "confdefs.h"
10972
10973 #include <stdio.h>
10974 #include <sys/types.h>
10975 #include <errno.h> 
10976 int main() {
10977 char *c = (char *) *sys_errlist
10978 ; return 0; }
10979 EOF
10980 if { (eval echo configure:10981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10981   rm -rf conftest*
10982   ol_cv_dcl_sys_errlist=yes
10983 else
10984   echo "configure: failed program was:" >&5
10985   cat conftest.$ac_ext >&5
10986   rm -rf conftest*
10987   ol_cv_dcl_sys_errlist=no
10988 fi
10989 rm -f conftest*
10990 fi
10991
10992 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
10993 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
10994 if test $ol_cv_dcl_sys_errlist = no ; then
10995         cat >> confdefs.h <<\EOF
10996 #define DECL_SYS_ERRLIST 1
10997 EOF
10998
10999         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
11000 echo "configure:11001: checking existence of sys_errlist" >&5
11001         if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
11002   echo $ac_n "(cached) $ac_c" 1>&6
11003 else
11004   
11005                 cat > conftest.$ac_ext <<EOF
11006 #line 11007 "configure"
11007 #include "confdefs.h"
11008 #include <errno.h>
11009 int main() {
11010 char *c = (char *) *sys_errlist
11011 ; return 0; }
11012 EOF
11013 if { (eval echo configure:11014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11014   rm -rf conftest*
11015   ol_cv_have_sys_errlist=yes
11016 else
11017   echo "configure: failed program was:" >&5
11018   cat conftest.$ac_ext >&5
11019   rm -rf conftest*
11020   ol_cv_have_sys_errlist=no
11021 fi
11022 rm -f conftest*
11023 fi
11024
11025         echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
11026         if test $ol_cv_have_sys_errlist = yes ; then
11027                 cat >> confdefs.h <<\EOF
11028 #define HAVE_SYS_ERRLIST 1
11029 EOF
11030
11031         fi
11032 fi
11033
11034
11035
11036 echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
11037 echo "configure:11038: checking strdup declaration" >&5
11038 if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
11039   echo $ac_n "(cached) $ac_c" 1>&6
11040 else
11041   
11042         cat > conftest.$ac_ext <<EOF
11043 #line 11044 "configure"
11044 #include "confdefs.h"
11045
11046 #include <string.h> 
11047 int main() {
11048 extern char *strdup();
11049 ; return 0; }
11050 EOF
11051 if { (eval echo configure:11052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11052   rm -rf conftest*
11053   ol_cv_dcl_strdup=yes
11054 else
11055   echo "configure: failed program was:" >&5
11056   cat conftest.$ac_ext >&5
11057   rm -rf conftest*
11058   ol_cv_dcl_strdup=no
11059 fi
11060 rm -f conftest*
11061 fi
11062
11063 echo "$ac_t""$ol_cv_dcl_strdup" 1>&6
11064 if test $ol_cv_dcl_strdup = yes ; then
11065         cat >> confdefs.h <<\EOF
11066 #define DECL_STRDUP 1
11067 EOF
11068
11069 fi
11070
11071
11072
11073 if test "$ol_enable_debug" != no ; then
11074         cat >> confdefs.h <<\EOF
11075 #define LDAP_DEBUG 1
11076 EOF
11077
11078 fi
11079 if test "$ol_enable_syslog" = yes ; then
11080         cat >> confdefs.h <<\EOF
11081 #define LDAP_SYSLOG 1
11082 EOF
11083
11084 fi
11085 if test "$ol_enable_libui" = yes ; then
11086         cat >> confdefs.h <<\EOF
11087 #define LDAP_LIBUI 1
11088 EOF
11089
11090 fi
11091 if test "$ol_enable_cache" = no ; then
11092         cat >> confdefs.h <<\EOF
11093 #define LDAP_NOCACHE 1
11094 EOF
11095
11096 fi
11097 if test "$ol_enable_dns" != no ; then
11098         cat >> confdefs.h <<\EOF
11099 #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
11100 EOF
11101
11102 fi
11103 if test "$ol_enable_proctitle" != no ; then
11104         cat >> confdefs.h <<\EOF
11105 #define LDAP_PROCTITLE 1
11106 EOF
11107
11108 fi
11109 if test "$ol_enable_referrals" != no ; then
11110         cat >> confdefs.h <<\EOF
11111 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
11112 EOF
11113
11114 fi
11115 if test "$ol_enable_cldap" != no ; then
11116         cat >> confdefs.h <<\EOF
11117 #define LDAP_CONNECTIONLESS 1
11118 EOF
11119
11120 fi
11121
11122 if test "$ol_enable_aclgroups" != no ; then
11123         cat >> confdefs.h <<\EOF
11124 #define SLAPD_ACLGROUPS 1
11125 EOF
11126
11127 fi
11128 if test "$ol_enable_crypt" != no ; then
11129         cat >> confdefs.h <<\EOF
11130 #define SLAPD_CRYPT 1
11131 EOF
11132
11133 fi
11134 if test "$ol_enable_cleartext" != no ; then
11135         cat >> confdefs.h <<\EOF
11136 #define SLAPD_CLEARTEXT 1
11137 EOF
11138
11139 fi
11140 if test "$ol_enable_phonetic" != no ; then
11141         cat >> confdefs.h <<\EOF
11142 #define SLAPD_PHONETIC 1
11143 EOF
11144
11145 fi
11146 if test "$ol_enable_rlookups" != no ; then
11147         cat >> confdefs.h <<\EOF
11148 #define SLAPD_RLOOKUPS 1
11149 EOF
11150
11151 fi
11152
11153 if test "$ol_link_modules" != no ; then
11154         cat >> confdefs.h <<\EOF
11155 #define SLAPD_MODULES 1
11156 EOF
11157
11158         BUILD_SLAPD=yes
11159 fi
11160
11161 if test "$ol_link_bdb2" != no ; then
11162         cat >> confdefs.h <<\EOF
11163 #define SLAPD_BDB2 1
11164 EOF
11165
11166         BUILD_SLAPD=yes
11167         BUILD_BDB2=yes
11168 fi
11169
11170 if test "$ol_link_ldbm" != no ; then
11171         cat >> confdefs.h <<\EOF
11172 #define SLAPD_LDBM 1
11173 EOF
11174
11175         BUILD_SLAPD=yes
11176         BUILD_LDBM=yes
11177 fi
11178
11179 if test "$ol_enable_passwd" != no ; then
11180         cat >> confdefs.h <<\EOF
11181 #define SLAPD_PASSWD 1
11182 EOF
11183
11184         BUILD_SLAPD=yes
11185         BUILD_PASSWD=yes
11186 fi
11187
11188 if test "$ol_link_perl" != no ; then
11189         cat >> confdefs.h <<\EOF
11190 #define SLAPD_PERL 1
11191 EOF
11192
11193         BUILD_SLAPD=yes
11194         BUILD_PERL=yes
11195 fi
11196
11197 if test "$ol_enable_shell" != no ; then
11198         cat >> confdefs.h <<\EOF
11199 #define SLAPD_SHELL 1
11200 EOF
11201
11202         BUILD_SLAPD=yes
11203         BUILD_SHELL=yes
11204 fi
11205
11206 if test "$ol_enable_tcl" != no ; then
11207         cat >> confdefs.h <<\EOF
11208 #define SLAPD_TCL 1
11209 EOF
11210
11211         BUILD_SLAPD=yes
11212         BUILD_TCL=yes
11213 fi
11214
11215 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
11216         $BUILD_SLAPD = yes ; then
11217         BUILD_SLURPD=yes
11218 fi
11219
11220 if test "$ol_link_isode" != no ; then
11221         BUILD_LDAPD=yes
11222 fi
11223
11224
11225
11226
11227   
11228   
11229   
11230   
11231   
11232   
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255 trap '' 1 2 15
11256 cat > confcache <<\EOF
11257 # This file is a shell script that caches the results of configure
11258 # tests run on this system so they can be shared between configure
11259 # scripts and configure runs.  It is not useful on other systems.
11260 # If it contains results you don't want to keep, you may remove or edit it.
11261 #
11262 # By default, configure uses ./config.cache as the cache file,
11263 # creating it if it does not exist already.  You can give configure
11264 # the --cache-file=FILE option to use a different cache file; that is
11265 # what configure does when it calls configure scripts in
11266 # subdirectories, so they share the cache.
11267 # Giving --cache-file=/dev/null disables caching, for debugging configure.
11268 # config.status only pays attention to the cache file if you give it the
11269 # --recheck option to rerun configure.
11270 #
11271 EOF
11272 # The following way of writing the cache mishandles newlines in values,
11273 # but we know of no workaround that is simple, portable, and efficient.
11274 # So, don't put newlines in cache variables' values.
11275 # Ultrix sh set writes to stderr and can't be redirected directly,
11276 # and sets the high bit in the cache file unless we assign to the vars.
11277 (set) 2>&1 |
11278   case `(ac_space=' '; set | grep ac_space) 2>&1` in
11279   *ac_space=\ *)
11280     # `set' does not quote correctly, so add quotes (double-quote substitution
11281     # turns \\\\ into \\, and sed turns \\ into \).
11282     sed -n \
11283       -e "s/'/'\\\\''/g" \
11284       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
11285     ;;
11286   *)
11287     # `set' quotes correctly as required by POSIX, so do not add quotes.
11288     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
11289     ;;
11290   esac >> confcache
11291 if cmp -s $cache_file confcache; then
11292   :
11293 else
11294   if test -w $cache_file; then
11295     echo "updating cache $cache_file"
11296     cat confcache > $cache_file
11297   else
11298     echo "not updating unwritable cache $cache_file"
11299   fi
11300 fi
11301 rm -f confcache
11302
11303 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11304
11305 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11306 # Let make expand exec_prefix.
11307 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11308
11309 # Any assignment to VPATH causes Sun make to only execute
11310 # the first set of double-colon rules, so remove it if not needed.
11311 # If there is a colon in the path, we need to keep it.
11312 if test "x$srcdir" = x.; then
11313   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
11314 fi
11315
11316 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11317
11318 DEFS=-DHAVE_CONFIG_H
11319
11320 # Without the "./", some shells look in PATH for config.status.
11321 : ${CONFIG_STATUS=./config.status}
11322
11323 echo creating $CONFIG_STATUS
11324 rm -f $CONFIG_STATUS
11325 cat > $CONFIG_STATUS <<EOF
11326 #! /bin/sh
11327 # Generated automatically by configure.
11328 # Run this file to recreate the current configuration.
11329 # This directory was configured as follows,
11330 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11331 #
11332 # $0 $ac_configure_args
11333 #
11334 # Compiler output produced by configure, useful for debugging
11335 # configure, is in ./config.log if it exists.
11336
11337 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11338 for ac_option
11339 do
11340   case "\$ac_option" in
11341   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11342     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11343     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11344   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11345     echo "$CONFIG_STATUS generated by autoconf version 2.13"
11346     exit 0 ;;
11347   -help | --help | --hel | --he | --h)
11348     echo "\$ac_cs_usage"; exit 0 ;;
11349   *) echo "\$ac_cs_usage"; exit 1 ;;
11350   esac
11351 done
11352
11353 ac_given_srcdir=$srcdir
11354 ac_given_INSTALL="$INSTALL"
11355
11356 trap 'rm -fr `echo "\
11357 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11358 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11359 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11360 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11361 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11362 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11363 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11364 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11365 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11366 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11367 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11368 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11369 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11370 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11371 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11372 include/Makefile:build/top.mk:include/Makefile.in \
11373 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11374 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11375 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11376 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11377 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11378 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11379 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11380 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11381 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11382 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11383 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11384 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11385 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11386 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11387 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11388 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11389 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11390 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11391 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11392 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11393 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11394 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11395 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11396 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11397 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11398  include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
11399 EOF
11400 cat >> $CONFIG_STATUS <<EOF
11401
11402 # Protect against being on the right side of a sed subst in config.status.
11403 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11404  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11405 $ac_vpsub
11406 $extrasub
11407 s%@SHELL@%$SHELL%g
11408 s%@CFLAGS@%$CFLAGS%g
11409 s%@CPPFLAGS@%$CPPFLAGS%g
11410 s%@CXXFLAGS@%$CXXFLAGS%g
11411 s%@FFLAGS@%$FFLAGS%g
11412 s%@DEFS@%$DEFS%g
11413 s%@LDFLAGS@%$LDFLAGS%g
11414 s%@LIBS@%$LIBS%g
11415 s%@exec_prefix@%$exec_prefix%g
11416 s%@prefix@%$prefix%g
11417 s%@program_transform_name@%$program_transform_name%g
11418 s%@bindir@%$bindir%g
11419 s%@sbindir@%$sbindir%g
11420 s%@libexecdir@%$libexecdir%g
11421 s%@datadir@%$datadir%g
11422 s%@sysconfdir@%$sysconfdir%g
11423 s%@sharedstatedir@%$sharedstatedir%g
11424 s%@localstatedir@%$localstatedir%g
11425 s%@libdir@%$libdir%g
11426 s%@includedir@%$includedir%g
11427 s%@oldincludedir@%$oldincludedir%g
11428 s%@infodir@%$infodir%g
11429 s%@mandir@%$mandir%g
11430 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11431 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11432 s%@INSTALL_DATA@%$INSTALL_DATA%g
11433 s%@PACKAGE@%$PACKAGE%g
11434 s%@VERSION@%$VERSION%g
11435 s%@ACLOCAL@%$ACLOCAL%g
11436 s%@AUTOCONF@%$AUTOCONF%g
11437 s%@AUTOMAKE@%$AUTOMAKE%g
11438 s%@AUTOHEADER@%$AUTOHEADER%g
11439 s%@MAKEINFO@%$MAKEINFO%g
11440 s%@SET_MAKE@%$SET_MAKE%g
11441 s%@top_builddir@%$top_builddir%g
11442 s%@ldap_subdir@%$ldap_subdir%g
11443 s%@host@%$host%g
11444 s%@host_alias@%$host_alias%g
11445 s%@host_cpu@%$host_cpu%g
11446 s%@host_vendor@%$host_vendor%g
11447 s%@host_os@%$host_os%g
11448 s%@RANLIB@%$RANLIB%g
11449 s%@CC@%$CC%g
11450 s%@LD@%$LD%g
11451 s%@NM@%$NM%g
11452 s%@LN_S@%$LN_S%g
11453 s%@LIBTOOL@%$LIBTOOL%g
11454 s%@AWK@%$AWK%g
11455 s%@LN_H@%$LN_H%g
11456 s%@SENDMAIL@%$SENDMAIL%g
11457 s%@EDITOR@%$EDITOR%g
11458 s%@FINGER@%$FINGER%g
11459 s%@GLIBCONFIG@%$GLIBCONFIG%g
11460 s%@PERLBIN@%$PERLBIN%g
11461 s%@CPP@%$CPP%g
11462 s%@EXEEXT@%$EXEEXT%g
11463 s%@OBJEXT@%$OBJEXT%g
11464 s%@PEPSY@%$PEPSY%g
11465 s%@LIBOBJS@%$LIBOBJS%g
11466 s%@BUILD_LDAPD@%$BUILD_LDAPD%g
11467 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
11468 s%@BUILD_BDB2@%$BUILD_BDB2%g
11469 s%@BUILD_LDBM@%$BUILD_LDBM%g
11470 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
11471 s%@BUILD_PERL@%$BUILD_PERL%g
11472 s%@BUILD_SHELL@%$BUILD_SHELL%g
11473 s%@BUILD_TCL@%$BUILD_TCL%g
11474 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
11475 s%@LDAP_LIBS@%$LDAP_LIBS%g
11476 s%@LDAPD_LIBS@%$LDAPD_LIBS%g
11477 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
11478 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
11479 s%@LDBM_LIBS@%$LDBM_LIBS%g
11480 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
11481 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
11482 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
11483 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
11484 s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
11485 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
11486 s%@KRB_LIBS@%$KRB_LIBS%g
11487 s%@READLINE_LIBS@%$READLINE_LIBS%g
11488 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
11489 s%@TLS_LIBS@%$TLS_LIBS%g
11490
11491 CEOF
11492 EOF
11493
11494 cat >> $CONFIG_STATUS <<\EOF
11495
11496 # Split the substitutions into bite-sized pieces for seds with
11497 # small command number limits, like on Digital OSF/1 and HP-UX.
11498 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11499 ac_file=1 # Number of current file.
11500 ac_beg=1 # First line for current file.
11501 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11502 ac_more_lines=:
11503 ac_sed_cmds=""
11504 while $ac_more_lines; do
11505   if test $ac_beg -gt 1; then
11506     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11507   else
11508     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11509   fi
11510   if test ! -s conftest.s$ac_file; then
11511     ac_more_lines=false
11512     rm -f conftest.s$ac_file
11513   else
11514     if test -z "$ac_sed_cmds"; then
11515       ac_sed_cmds="sed -f conftest.s$ac_file"
11516     else
11517       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11518     fi
11519     ac_file=`expr $ac_file + 1`
11520     ac_beg=$ac_end
11521     ac_end=`expr $ac_end + $ac_max_sed_cmds`
11522   fi
11523 done
11524 if test -z "$ac_sed_cmds"; then
11525   ac_sed_cmds=cat
11526 fi
11527 EOF
11528
11529 cat >> $CONFIG_STATUS <<EOF
11530
11531 CONFIG_FILES=\${CONFIG_FILES-"\
11532 Makefile:build/top.mk:Makefile.in:build/dir.mk \
11533 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
11534 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
11535 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
11536 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
11537 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
11538 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
11539 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
11540 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
11541 clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
11542 clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
11543 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
11544 clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
11545 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
11546 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
11547 include/Makefile:build/top.mk:include/Makefile.in \
11548 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
11549 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
11550 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11551 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
11552 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
11553 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
11554 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
11555 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
11556 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
11557 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
11558 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
11559 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
11560 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
11561 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
11562 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
11563 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
11564 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
11565 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
11566 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
11567 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
11568 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
11569 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
11570 contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
11571 contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
11572 contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
11573 "}
11574 EOF
11575 cat >> $CONFIG_STATUS <<\EOF
11576 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11577   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11578   case "$ac_file" in
11579   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11580        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11581   *) ac_file_in="${ac_file}.in" ;;
11582   esac
11583
11584   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11585
11586   # Remove last slash and all that follows it.  Not all systems have dirname.
11587   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11588   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11589     # The file is in a subdirectory.
11590     test ! -d "$ac_dir" && mkdir "$ac_dir"
11591     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11592     # A "../" for each directory in $ac_dir_suffix.
11593     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11594   else
11595     ac_dir_suffix= ac_dots=
11596   fi
11597
11598   case "$ac_given_srcdir" in
11599   .)  srcdir=.
11600       if test -z "$ac_dots"; then top_srcdir=.
11601       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11602   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11603   *) # Relative path.
11604     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11605     top_srcdir="$ac_dots$ac_given_srcdir" ;;
11606   esac
11607
11608   case "$ac_given_INSTALL" in
11609   [/$]*) INSTALL="$ac_given_INSTALL" ;;
11610   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11611   esac
11612
11613   echo creating "$ac_file"
11614   rm -f "$ac_file"
11615   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11616   case "$ac_file" in
11617   *Makefile*) ac_comsub="1i\\
11618 # $configure_input" ;;
11619   *) ac_comsub= ;;
11620   esac
11621
11622   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11623   sed -e "$ac_comsub
11624 s%@configure_input@%$configure_input%g
11625 s%@srcdir@%$srcdir%g
11626 s%@top_srcdir@%$top_srcdir%g
11627 s%@INSTALL@%$INSTALL%g
11628 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11629 fi; done
11630 rm -f conftest.s*
11631
11632 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11633 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11634 #
11635 # ac_d sets the value in "#define NAME VALUE" lines.
11636 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11637 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
11638 ac_dC='\3'
11639 ac_dD='%g'
11640 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11641 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11642 ac_uB='\([      ]\)%\1#\2define\3'
11643 ac_uC=' '
11644 ac_uD='\4%g'
11645 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11646 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11647 ac_eB='$%\1#\2define\3'
11648 ac_eC=' '
11649 ac_eD='%g'
11650
11651 if test "${CONFIG_HEADERS+set}" != set; then
11652 EOF
11653 cat >> $CONFIG_STATUS <<EOF
11654   CONFIG_HEADERS="include/portable.h include/ldap_features.h"
11655 EOF
11656 cat >> $CONFIG_STATUS <<\EOF
11657 fi
11658 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11659   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11660   case "$ac_file" in
11661   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11662        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11663   *) ac_file_in="${ac_file}.in" ;;
11664   esac
11665
11666   echo creating $ac_file
11667
11668   rm -f conftest.frag conftest.in conftest.out
11669   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11670   cat $ac_file_inputs > conftest.in
11671
11672 EOF
11673
11674 # Transform confdefs.h into a sed script conftest.vals that substitutes
11675 # the proper values into config.h.in to produce config.h.  And first:
11676 # Protect against being on the right side of a sed subst in config.status.
11677 # Protect against being in an unquoted here document in config.status.
11678 rm -f conftest.vals
11679 cat > conftest.hdr <<\EOF
11680 s/[\\&%]/\\&/g
11681 s%[\\$`]%\\&%g
11682 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11683 s%ac_d%ac_u%gp
11684 s%ac_u%ac_e%gp
11685 EOF
11686 sed -n -f conftest.hdr confdefs.h > conftest.vals
11687 rm -f conftest.hdr
11688
11689 # This sed command replaces #undef with comments.  This is necessary, for
11690 # example, in the case of _POSIX_SOURCE, which is predefined and required
11691 # on some systems where configure will not decide to define it.
11692 cat >> conftest.vals <<\EOF
11693 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11694 EOF
11695
11696 # Break up conftest.vals because some shells have a limit on
11697 # the size of here documents, and old seds have small limits too.
11698
11699 rm -f conftest.tail
11700 while :
11701 do
11702   ac_lines=`grep -c . conftest.vals`
11703   # grep -c gives empty output for an empty file on some AIX systems.
11704   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11705   # Write a limited-size here document to conftest.frag.
11706   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11707   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11708   echo 'CEOF
11709   sed -f conftest.frag conftest.in > conftest.out
11710   rm -f conftest.in
11711   mv conftest.out conftest.in
11712 ' >> $CONFIG_STATUS
11713   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11714   rm -f conftest.vals
11715   mv conftest.tail conftest.vals
11716 done
11717 rm -f conftest.vals
11718
11719 cat >> $CONFIG_STATUS <<\EOF
11720   rm -f conftest.frag conftest.h
11721   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11722   cat conftest.in >> conftest.h
11723   rm -f conftest.in
11724   if cmp -s $ac_file conftest.h 2>/dev/null; then
11725     echo "$ac_file is unchanged"
11726     rm -f conftest.h
11727   else
11728     # Remove last slash and all that follows it.  Not all systems have dirname.
11729       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11730       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11731       # The file is in a subdirectory.
11732       test ! -d "$ac_dir" && mkdir "$ac_dir"
11733     fi
11734     rm -f $ac_file
11735     mv conftest.h $ac_file
11736   fi
11737 fi; done
11738
11739 EOF
11740 cat >> $CONFIG_STATUS <<EOF
11741
11742 EOF
11743 cat >> $CONFIG_STATUS <<\EOF
11744
11745 date > stamp-h
11746 echo Please \"make depend\" to build dependencies
11747
11748 exit 0
11749 EOF
11750 chmod +x $CONFIG_STATUS
11751 rm -fr confdefs* $ac_clean_files
11752 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11753