started basic support for solaris 2.5 in smbwrapper.
[samba.git] / source / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-maintainer-mode enable some make rules for maintainers"
16 ac_help="$ac_help
17   --with-afs     Include AFS support
18   --without-afs  Don't include AFS support (default)"
19 ac_help="$ac_help
20   --with-dfs     Include DFS support
21   --without-dfs  Don't include DFS support (default)"
22 ac_help="$ac_help
23   --with-krb4=base-dir     Include Kerberos IV support
24   --whithout-krb4          Don't include Kerbers IV support (default)"
25 ac_help="$ac_help
26   --with-automount     Include AUTOMOUNT support
27   --without-automount  Don't include AUTOMOUNT support (default)"
28 ac_help="$ac_help
29   --with-smbmount     Include SMBMOUNT (Linux only) support
30   --without-smbmount  Don't include SMBMOUNT support (default)"
31 ac_help="$ac_help
32   --with-ldap     Include LDAP support
33   --without-ldap  Don't include LDAP support (default)"
34 ac_help="$ac_help
35   --with-nisplus     Include NISPLUS password database support
36   --without-nisplus  Don't include NISPLUS password database support (default)"
37 ac_help="$ac_help
38   --with-nisplus-home     Include NISPLUS_HOME support
39   --without-nisplus-home  Don't include NISPLUS_HOME support (default)"
40 ac_help="$ac_help
41   --with-ssl     Include SSL support
42   --without-ssl  Don't include SSL support (default)"
43 ac_help="$ac_help
44   --with-mmap     Include experimental MMAP support
45   --without-mmap  Don't include MMAP support (default)"
46 ac_help="$ac_help
47   --with-syslog     Include experimental SYSLOG support
48   --without-syslog  Don't include SYSLOG support (default)"
49 ac_help="$ac_help
50   --with-netatalk     Include experimental Netatalk support
51   --without-netatalk  Don't include experimental Netatalk support (default)"
52
53 # Initialize some variables set by options.
54 # The variables have the same names as the options, with
55 # dashes changed to underlines.
56 build=NONE
57 cache_file=./config.cache
58 exec_prefix=NONE
59 host=NONE
60 no_create=
61 nonopt=NONE
62 no_recursion=
63 prefix=NONE
64 program_prefix=NONE
65 program_suffix=NONE
66 program_transform_name=s,x,x,
67 silent=
68 site=
69 srcdir=
70 target=NONE
71 verbose=
72 x_includes=NONE
73 x_libraries=NONE
74 bindir='${exec_prefix}/bin'
75 sbindir='${exec_prefix}/sbin'
76 libexecdir='${exec_prefix}/libexec'
77 datadir='${prefix}/share'
78 sysconfdir='${prefix}/etc'
79 sharedstatedir='${prefix}/com'
80 localstatedir='${prefix}/var'
81 libdir='${exec_prefix}/lib'
82 includedir='${prefix}/include'
83 oldincludedir='/usr/include'
84 infodir='${prefix}/info'
85 mandir='${prefix}/man'
86
87 # Initialize some other variables.
88 subdirs=
89 MFLAGS= MAKEFLAGS=
90 # Maximum number of lines to put in a shell here document.
91 ac_max_here_lines=12
92
93 ac_prev=
94 for ac_option
95 do
96
97   # If the previous option needs an argument, assign it.
98   if test -n "$ac_prev"; then
99     eval "$ac_prev=\$ac_option"
100     ac_prev=
101     continue
102   fi
103
104   case "$ac_option" in
105   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
106   *) ac_optarg= ;;
107   esac
108
109   # Accept the important Cygnus configure options, so we can diagnose typos.
110
111   case "$ac_option" in
112
113   -bindir | --bindir | --bindi | --bind | --bin | --bi)
114     ac_prev=bindir ;;
115   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
116     bindir="$ac_optarg" ;;
117
118   -build | --build | --buil | --bui | --bu)
119     ac_prev=build ;;
120   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
121     build="$ac_optarg" ;;
122
123   -cache-file | --cache-file | --cache-fil | --cache-fi \
124   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
125     ac_prev=cache_file ;;
126   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
127   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
128     cache_file="$ac_optarg" ;;
129
130   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
131     ac_prev=datadir ;;
132   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
133   | --da=*)
134     datadir="$ac_optarg" ;;
135
136   -disable-* | --disable-*)
137     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
138     # Reject names that are not valid shell variable names.
139     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
140       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
141     fi
142     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
143     eval "enable_${ac_feature}=no" ;;
144
145   -enable-* | --enable-*)
146     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
147     # Reject names that are not valid shell variable names.
148     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
149       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
150     fi
151     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
152     case "$ac_option" in
153       *=*) ;;
154       *) ac_optarg=yes ;;
155     esac
156     eval "enable_${ac_feature}='$ac_optarg'" ;;
157
158   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
159   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
160   | --exec | --exe | --ex)
161     ac_prev=exec_prefix ;;
162   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
163   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
164   | --exec=* | --exe=* | --ex=*)
165     exec_prefix="$ac_optarg" ;;
166
167   -gas | --gas | --ga | --g)
168     # Obsolete; use --with-gas.
169     with_gas=yes ;;
170
171   -help | --help | --hel | --he)
172     # Omit some internal or obsolete options to make the list less imposing.
173     # This message is too long to be a string in the A/UX 3.1 sh.
174     cat << EOF
175 Usage: configure [options] [host]
176 Options: [defaults in brackets after descriptions]
177 Configuration:
178   --cache-file=FILE       cache test results in FILE
179   --help                  print this message
180   --no-create             do not create output files
181   --quiet, --silent       do not print \`checking...' messages
182   --version               print the version of autoconf that created configure
183 Directory and file names:
184   --prefix=PREFIX         install architecture-independent files in PREFIX
185                           [$ac_default_prefix]
186   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
187                           [same as prefix]
188   --bindir=DIR            user executables in DIR [EPREFIX/bin]
189   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
190   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
191   --datadir=DIR           read-only architecture-independent data in DIR
192                           [PREFIX/share]
193   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
194   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
195                           [PREFIX/com]
196   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
197   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
198   --includedir=DIR        C header files in DIR [PREFIX/include]
199   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
200   --infodir=DIR           info documentation in DIR [PREFIX/info]
201   --mandir=DIR            man documentation in DIR [PREFIX/man]
202   --srcdir=DIR            find the sources in DIR [configure dir or ..]
203   --program-prefix=PREFIX prepend PREFIX to installed program names
204   --program-suffix=SUFFIX append SUFFIX to installed program names
205   --program-transform-name=PROGRAM
206                           run sed PROGRAM on installed program names
207 EOF
208     cat << EOF
209 Host type:
210   --build=BUILD           configure for building on BUILD [BUILD=HOST]
211   --host=HOST             configure for HOST [guessed]
212   --target=TARGET         configure for TARGET [TARGET=HOST]
213 Features and packages:
214   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
215   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
216   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
217   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
218   --x-includes=DIR        X include files are in DIR
219   --x-libraries=DIR       X library files are in DIR
220 EOF
221     if test -n "$ac_help"; then
222       echo "--enable and --with options recognized:$ac_help"
223     fi
224     exit 0 ;;
225
226   -host | --host | --hos | --ho)
227     ac_prev=host ;;
228   -host=* | --host=* | --hos=* | --ho=*)
229     host="$ac_optarg" ;;
230
231   -includedir | --includedir | --includedi | --included | --include \
232   | --includ | --inclu | --incl | --inc)
233     ac_prev=includedir ;;
234   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
235   | --includ=* | --inclu=* | --incl=* | --inc=*)
236     includedir="$ac_optarg" ;;
237
238   -infodir | --infodir | --infodi | --infod | --info | --inf)
239     ac_prev=infodir ;;
240   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
241     infodir="$ac_optarg" ;;
242
243   -libdir | --libdir | --libdi | --libd)
244     ac_prev=libdir ;;
245   -libdir=* | --libdir=* | --libdi=* | --libd=*)
246     libdir="$ac_optarg" ;;
247
248   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
249   | --libexe | --libex | --libe)
250     ac_prev=libexecdir ;;
251   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
252   | --libexe=* | --libex=* | --libe=*)
253     libexecdir="$ac_optarg" ;;
254
255   -localstatedir | --localstatedir | --localstatedi | --localstated \
256   | --localstate | --localstat | --localsta | --localst \
257   | --locals | --local | --loca | --loc | --lo)
258     ac_prev=localstatedir ;;
259   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
260   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
261   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
262     localstatedir="$ac_optarg" ;;
263
264   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
265     ac_prev=mandir ;;
266   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
267     mandir="$ac_optarg" ;;
268
269   -nfp | --nfp | --nf)
270     # Obsolete; use --without-fp.
271     with_fp=no ;;
272
273   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
274   | --no-cr | --no-c)
275     no_create=yes ;;
276
277   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
278   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
279     no_recursion=yes ;;
280
281   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
282   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
283   | --oldin | --oldi | --old | --ol | --o)
284     ac_prev=oldincludedir ;;
285   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
286   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
287   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
288     oldincludedir="$ac_optarg" ;;
289
290   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
291     ac_prev=prefix ;;
292   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
293     prefix="$ac_optarg" ;;
294
295   -program-prefix | --program-prefix | --program-prefi | --program-pref \
296   | --program-pre | --program-pr | --program-p)
297     ac_prev=program_prefix ;;
298   -program-prefix=* | --program-prefix=* | --program-prefi=* \
299   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
300     program_prefix="$ac_optarg" ;;
301
302   -program-suffix | --program-suffix | --program-suffi | --program-suff \
303   | --program-suf | --program-su | --program-s)
304     ac_prev=program_suffix ;;
305   -program-suffix=* | --program-suffix=* | --program-suffi=* \
306   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
307     program_suffix="$ac_optarg" ;;
308
309   -program-transform-name | --program-transform-name \
310   | --program-transform-nam | --program-transform-na \
311   | --program-transform-n | --program-transform- \
312   | --program-transform | --program-transfor \
313   | --program-transfo | --program-transf \
314   | --program-trans | --program-tran \
315   | --progr-tra | --program-tr | --program-t)
316     ac_prev=program_transform_name ;;
317   -program-transform-name=* | --program-transform-name=* \
318   | --program-transform-nam=* | --program-transform-na=* \
319   | --program-transform-n=* | --program-transform-=* \
320   | --program-transform=* | --program-transfor=* \
321   | --program-transfo=* | --program-transf=* \
322   | --program-trans=* | --program-tran=* \
323   | --progr-tra=* | --program-tr=* | --program-t=*)
324     program_transform_name="$ac_optarg" ;;
325
326   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
327   | -silent | --silent | --silen | --sile | --sil)
328     silent=yes ;;
329
330   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
331     ac_prev=sbindir ;;
332   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
333   | --sbi=* | --sb=*)
334     sbindir="$ac_optarg" ;;
335
336   -sharedstatedir | --sharedstatedir | --sharedstatedi \
337   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
338   | --sharedst | --shareds | --shared | --share | --shar \
339   | --sha | --sh)
340     ac_prev=sharedstatedir ;;
341   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
342   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
343   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
344   | --sha=* | --sh=*)
345     sharedstatedir="$ac_optarg" ;;
346
347   -site | --site | --sit)
348     ac_prev=site ;;
349   -site=* | --site=* | --sit=*)
350     site="$ac_optarg" ;;
351
352   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
353     ac_prev=srcdir ;;
354   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
355     srcdir="$ac_optarg" ;;
356
357   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
358   | --syscon | --sysco | --sysc | --sys | --sy)
359     ac_prev=sysconfdir ;;
360   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
361   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
362     sysconfdir="$ac_optarg" ;;
363
364   -target | --target | --targe | --targ | --tar | --ta | --t)
365     ac_prev=target ;;
366   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
367     target="$ac_optarg" ;;
368
369   -v | -verbose | --verbose | --verbos | --verbo | --verb)
370     verbose=yes ;;
371
372   -version | --version | --versio | --versi | --vers)
373     echo "configure generated by autoconf version 2.12"
374     exit 0 ;;
375
376   -with-* | --with-*)
377     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
378     # Reject names that are not valid shell variable names.
379     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
380       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
381     fi
382     ac_package=`echo $ac_package| sed 's/-/_/g'`
383     case "$ac_option" in
384       *=*) ;;
385       *) ac_optarg=yes ;;
386     esac
387     eval "with_${ac_package}='$ac_optarg'" ;;
388
389   -without-* | --without-*)
390     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
391     # Reject names that are not valid shell variable names.
392     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
393       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
394     fi
395     ac_package=`echo $ac_package| sed 's/-/_/g'`
396     eval "with_${ac_package}=no" ;;
397
398   --x)
399     # Obsolete; use --with-x.
400     with_x=yes ;;
401
402   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
403   | --x-incl | --x-inc | --x-in | --x-i)
404     ac_prev=x_includes ;;
405   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
406   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
407     x_includes="$ac_optarg" ;;
408
409   -x-libraries | --x-libraries | --x-librarie | --x-librari \
410   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
411     ac_prev=x_libraries ;;
412   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
413   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
414     x_libraries="$ac_optarg" ;;
415
416   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
417     ;;
418
419   *)
420     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
421       echo "configure: warning: $ac_option: invalid host type" 1>&2
422     fi
423     if test "x$nonopt" != xNONE; then
424       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
425     fi
426     nonopt="$ac_option"
427     ;;
428
429   esac
430 done
431
432 if test -n "$ac_prev"; then
433   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
434 fi
435
436 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
437
438 # File descriptor usage:
439 # 0 standard input
440 # 1 file creation
441 # 2 errors and warnings
442 # 3 some systems may open it to /dev/tty
443 # 4 used on the Kubota Titan
444 # 6 checking for... messages and results
445 # 5 compiler messages saved in config.log
446 if test "$silent" = yes; then
447   exec 6>/dev/null
448 else
449   exec 6>&1
450 fi
451 exec 5>./config.log
452
453 echo "\
454 This file contains any messages produced by compilers while
455 running configure, to aid debugging if configure makes a mistake.
456 " 1>&5
457
458 # Strip out --no-create and --no-recursion so they do not pile up.
459 # Also quote any args containing shell metacharacters.
460 ac_configure_args=
461 for ac_arg
462 do
463   case "$ac_arg" in
464   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
465   | --no-cr | --no-c) ;;
466   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
467   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
468   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
469   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
470   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
471   esac
472 done
473
474 # NLS nuisances.
475 # Only set these to C if already set.  These must not be set unconditionally
476 # because not all systems understand e.g. LANG=C (notably SCO).
477 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
478 # Non-C LC_CTYPE values break the ctype check.
479 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
480 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
481 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
482 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
483
484 # confdefs.h avoids OS command line length limits that DEFS can exceed.
485 rm -rf conftest* confdefs.h
486 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
487 echo > confdefs.h
488
489 # A filename unique to this package, relative to the directory that
490 # configure is in, which we can look for to find out if srcdir is correct.
491 ac_unique_file=include/includes.h
492
493 # Find the source files, if location was not specified.
494 if test -z "$srcdir"; then
495   ac_srcdir_defaulted=yes
496   # Try the directory containing this script, then its parent.
497   ac_prog=$0
498   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
499   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
500   srcdir=$ac_confdir
501   if test ! -r $srcdir/$ac_unique_file; then
502     srcdir=..
503   fi
504 else
505   ac_srcdir_defaulted=no
506 fi
507 if test ! -r $srcdir/$ac_unique_file; then
508   if test "$ac_srcdir_defaulted" = yes; then
509     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
510   else
511     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
512   fi
513 fi
514 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
515
516 # Prefer explicitly selected file to automatically selected ones.
517 if test -z "$CONFIG_SITE"; then
518   if test "x$prefix" != xNONE; then
519     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
520   else
521     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
522   fi
523 fi
524 for ac_site_file in $CONFIG_SITE; do
525   if test -r "$ac_site_file"; then
526     echo "loading site script $ac_site_file"
527     . "$ac_site_file"
528   fi
529 done
530
531 if test -r "$cache_file"; then
532   echo "loading cache $cache_file"
533   . $cache_file
534 else
535   echo "creating cache $cache_file"
536   > $cache_file
537 fi
538
539 ac_ext=c
540 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
541 ac_cpp='$CPP $CPPFLAGS'
542 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
543 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
544 cross_compiling=$ac_cv_prog_cc_cross
545
546 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
547   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
548   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
549     ac_n= ac_c='
550 ' ac_t='        '
551   else
552     ac_n=-n ac_c= ac_t=
553   fi
554 else
555   ac_n= ac_c='\c' ac_t=
556 fi
557
558
559
560
561 # Extract the first word of "gcc", so it can be a program name with args.
562 set dummy gcc; ac_word=$2
563 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
564 echo "configure:565: checking for $ac_word" >&5
565 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
566   echo $ac_n "(cached) $ac_c" 1>&6
567 else
568   if test -n "$CC"; then
569   ac_cv_prog_CC="$CC" # Let the user override the test.
570 else
571   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
572   for ac_dir in $PATH; do
573     test -z "$ac_dir" && ac_dir=.
574     if test -f $ac_dir/$ac_word; then
575       ac_cv_prog_CC="gcc"
576       break
577     fi
578   done
579   IFS="$ac_save_ifs"
580 fi
581 fi
582 CC="$ac_cv_prog_CC"
583 if test -n "$CC"; then
584   echo "$ac_t""$CC" 1>&6
585 else
586   echo "$ac_t""no" 1>&6
587 fi
588
589 if test -z "$CC"; then
590   # Extract the first word of "cc", so it can be a program name with args.
591 set dummy cc; ac_word=$2
592 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
593 echo "configure:594: checking for $ac_word" >&5
594 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
595   echo $ac_n "(cached) $ac_c" 1>&6
596 else
597   if test -n "$CC"; then
598   ac_cv_prog_CC="$CC" # Let the user override the test.
599 else
600   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
601   ac_prog_rejected=no
602   for ac_dir in $PATH; do
603     test -z "$ac_dir" && ac_dir=.
604     if test -f $ac_dir/$ac_word; then
605       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
606         ac_prog_rejected=yes
607         continue
608       fi
609       ac_cv_prog_CC="cc"
610       break
611     fi
612   done
613   IFS="$ac_save_ifs"
614 if test $ac_prog_rejected = yes; then
615   # We found a bogon in the path, so make sure we never use it.
616   set dummy $ac_cv_prog_CC
617   shift
618   if test $# -gt 0; then
619     # We chose a different compiler from the bogus one.
620     # However, it has the same basename, so the bogon will be chosen
621     # first if we set CC to just the basename; use the full file name.
622     shift
623     set dummy "$ac_dir/$ac_word" "$@"
624     shift
625     ac_cv_prog_CC="$@"
626   fi
627 fi
628 fi
629 fi
630 CC="$ac_cv_prog_CC"
631 if test -n "$CC"; then
632   echo "$ac_t""$CC" 1>&6
633 else
634   echo "$ac_t""no" 1>&6
635 fi
636
637   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
638 fi
639
640 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
641 echo "configure:642: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
642
643 ac_ext=c
644 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
645 ac_cpp='$CPP $CPPFLAGS'
646 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
647 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
648 cross_compiling=$ac_cv_prog_cc_cross
649
650 cat > conftest.$ac_ext <<EOF
651 #line 652 "configure"
652 #include "confdefs.h"
653 main(){return(0);}
654 EOF
655 if { (eval echo configure:656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
656   ac_cv_prog_cc_works=yes
657   # If we can't run a trivial program, we are probably using a cross compiler.
658   if (./conftest; exit) 2>/dev/null; then
659     ac_cv_prog_cc_cross=no
660   else
661     ac_cv_prog_cc_cross=yes
662   fi
663 else
664   echo "configure: failed program was:" >&5
665   cat conftest.$ac_ext >&5
666   ac_cv_prog_cc_works=no
667 fi
668 rm -fr conftest*
669
670 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
671 if test $ac_cv_prog_cc_works = no; then
672   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
673 fi
674 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
675 echo "configure:676: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
676 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
677 cross_compiling=$ac_cv_prog_cc_cross
678
679 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
680 echo "configure:681: checking whether we are using GNU C" >&5
681 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
682   echo $ac_n "(cached) $ac_c" 1>&6
683 else
684   cat > conftest.c <<EOF
685 #ifdef __GNUC__
686   yes;
687 #endif
688 EOF
689 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
690   ac_cv_prog_gcc=yes
691 else
692   ac_cv_prog_gcc=no
693 fi
694 fi
695
696 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
697
698 if test $ac_cv_prog_gcc = yes; then
699   GCC=yes
700   ac_test_CFLAGS="${CFLAGS+set}"
701   ac_save_CFLAGS="$CFLAGS"
702   CFLAGS=
703   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
704 echo "configure:705: checking whether ${CC-cc} accepts -g" >&5
705 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
706   echo $ac_n "(cached) $ac_c" 1>&6
707 else
708   echo 'void f(){}' > conftest.c
709 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
710   ac_cv_prog_cc_g=yes
711 else
712   ac_cv_prog_cc_g=no
713 fi
714 rm -f conftest*
715
716 fi
717
718 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
719   if test "$ac_test_CFLAGS" = set; then
720     CFLAGS="$ac_save_CFLAGS"
721   elif test $ac_cv_prog_cc_g = yes; then
722     CFLAGS="-g -O2"
723   else
724     CFLAGS="-O2"
725   fi
726 else
727   GCC=
728   test "${CFLAGS+set}" = set || CFLAGS="-g"
729 fi
730
731 ac_aux_dir=
732 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
733   if test -f $ac_dir/install-sh; then
734     ac_aux_dir=$ac_dir
735     ac_install_sh="$ac_aux_dir/install-sh -c"
736     break
737   elif test -f $ac_dir/install.sh; then
738     ac_aux_dir=$ac_dir
739     ac_install_sh="$ac_aux_dir/install.sh -c"
740     break
741   fi
742 done
743 if test -z "$ac_aux_dir"; then
744   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
745 fi
746 ac_config_guess=$ac_aux_dir/config.guess
747 ac_config_sub=$ac_aux_dir/config.sub
748 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
749
750 # Find a good install program.  We prefer a C program (faster),
751 # so one script is as good as another.  But avoid the broken or
752 # incompatible versions:
753 # SysV /etc/install, /usr/sbin/install
754 # SunOS /usr/etc/install
755 # IRIX /sbin/install
756 # AIX /bin/install
757 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
758 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
759 # ./install, which can be erroneously created by make from ./install.sh.
760 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
761 echo "configure:762: checking for a BSD compatible install" >&5
762 if test -z "$INSTALL"; then
763 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
764   echo $ac_n "(cached) $ac_c" 1>&6
765 else
766     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
767   for ac_dir in $PATH; do
768     # Account for people who put trailing slashes in PATH elements.
769     case "$ac_dir/" in
770     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
771     *)
772       # OSF1 and SCO ODT 3.0 have their own names for install.
773       for ac_prog in ginstall installbsd scoinst install; do
774         if test -f $ac_dir/$ac_prog; then
775           if test $ac_prog = install &&
776             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
777             # AIX install.  It has an incompatible calling convention.
778             # OSF/1 installbsd also uses dspmsg, but is usable.
779             :
780           else
781             ac_cv_path_install="$ac_dir/$ac_prog -c"
782             break 2
783           fi
784         fi
785       done
786       ;;
787     esac
788   done
789   IFS="$ac_save_IFS"
790
791 fi
792   if test "${ac_cv_path_install+set}" = set; then
793     INSTALL="$ac_cv_path_install"
794   else
795     # As a last resort, use the slow shell script.  We don't cache a
796     # path for INSTALL within a source directory, because that will
797     # break other packages using the cache if that directory is
798     # removed, or if the path is relative.
799     INSTALL="$ac_install_sh"
800   fi
801 fi
802 echo "$ac_t""$INSTALL" 1>&6
803
804 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
805 # It thinks the first close brace ends the variable substitution.
806 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
807
808 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
809
810
811
812 for ac_prog in mawk gawk nawk awk
813 do
814 # Extract the first word of "$ac_prog", so it can be a program name with args.
815 set dummy $ac_prog; ac_word=$2
816 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
817 echo "configure:818: checking for $ac_word" >&5
818 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
819   echo $ac_n "(cached) $ac_c" 1>&6
820 else
821   if test -n "$AWK"; then
822   ac_cv_prog_AWK="$AWK" # Let the user override the test.
823 else
824   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
825   for ac_dir in $PATH; do
826     test -z "$ac_dir" && ac_dir=.
827     if test -f $ac_dir/$ac_word; then
828       ac_cv_prog_AWK="$ac_prog"
829       break
830     fi
831   done
832   IFS="$ac_save_ifs"
833 fi
834 fi
835 AWK="$ac_cv_prog_AWK"
836 if test -n "$AWK"; then
837   echo "$ac_t""$AWK" 1>&6
838 else
839   echo "$ac_t""no" 1>&6
840 fi
841
842 test -n "$AWK" && break
843 done
844
845
846
847 # Do some error checking and defaulting for the host and target type.
848 # The inputs are:
849 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
850 #
851 # The rules are:
852 # 1. You are not allowed to specify --host, --target, and nonopt at the
853 #    same time.
854 # 2. Host defaults to nonopt.
855 # 3. If nonopt is not specified, then host defaults to the current host,
856 #    as determined by config.guess.
857 # 4. Target and build default to nonopt.
858 # 5. If nonopt is not specified, then target and build default to host.
859
860 # The aliases save the names the user supplied, while $host etc.
861 # will get canonicalized.
862 case $host---$target---$nonopt in
863 NONE---*---* | *---NONE---* | *---*---NONE) ;;
864 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
865 esac
866
867
868 # Make sure we can run config.sub.
869 if $ac_config_sub sun4 >/dev/null 2>&1; then :
870 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
871 fi
872
873 echo $ac_n "checking host system type""... $ac_c" 1>&6
874 echo "configure:875: checking host system type" >&5
875
876 host_alias=$host
877 case "$host_alias" in
878 NONE)
879   case $nonopt in
880   NONE)
881     if host_alias=`$ac_config_guess`; then :
882     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
883     fi ;;
884   *) host_alias=$nonopt ;;
885   esac ;;
886 esac
887
888 host=`$ac_config_sub $host_alias`
889 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
890 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
891 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
892 echo "$ac_t""$host" 1>&6
893
894 echo $ac_n "checking target system type""... $ac_c" 1>&6
895 echo "configure:896: checking target system type" >&5
896
897 target_alias=$target
898 case "$target_alias" in
899 NONE)
900   case $nonopt in
901   NONE) target_alias=$host_alias ;;
902   *) target_alias=$nonopt ;;
903   esac ;;
904 esac
905
906 target=`$ac_config_sub $target_alias`
907 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
908 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
909 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
910 echo "$ac_t""$target" 1>&6
911
912 echo $ac_n "checking build system type""... $ac_c" 1>&6
913 echo "configure:914: checking build system type" >&5
914
915 build_alias=$build
916 case "$build_alias" in
917 NONE)
918   case $nonopt in
919   NONE) build_alias=$host_alias ;;
920   *) build_alias=$nonopt ;;
921   esac ;;
922 esac
923
924 build=`$ac_config_sub $build_alias`
925 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
926 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
927 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
928 echo "$ac_t""$build" 1>&6
929
930 test "$host_alias" != "$target_alias" &&
931   test "$program_prefix$program_suffix$program_transform_name" = \
932     NONENONEs,x,x, &&
933   program_prefix=${target_alias}-
934
935 case "$host_os" in
936         *linux*)   cat >> confdefs.h <<\EOF
937 #define LINUX 1
938 EOF
939 ;;
940         *solaris*) cat >> confdefs.h <<\EOF
941 #define SUNOS5 1
942 EOF
943 ;;
944         *sunos*) cat >> confdefs.h <<\EOF
945 #define SUNOS4 1
946 EOF
947 ;;
948         *irix*) cat >> confdefs.h <<\EOF
949 #define IRIX 1
950 EOF
951 ;;
952         *aix*) cat >> confdefs.h <<\EOF
953 #define AIX 1
954 EOF
955 ;;
956         *hpux*) cat >> confdefs.h <<\EOF
957 #define HPUX 1
958 EOF
959 ;;
960         *qnx*) cat >> confdefs.h <<\EOF
961 #define QNX 1
962 EOF
963 ;;
964         *osf1*) cat >> confdefs.h <<\EOF
965 #define OSF1 1
966 EOF
967 ;;
968         *sco*) cat >> confdefs.h <<\EOF
969 #define SCO 1
970 EOF
971 ;;
972         *next2*) cat >> confdefs.h <<\EOF
973 #define NEXT2 1
974 EOF
975 ;;
976 esac
977
978
979     
980     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
981 echo "configure:982: checking config.cache system type" >&5
982     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
983          test x"$ac_cv_host_system_type" != x"$host"; } ||
984        { test x"${ac_cv_build_system_type+set}" = x"set" &&
985          test x"$ac_cv_build_system_type" != x"$build"; } ||
986        { test x"${ac_cv_target_system_type+set}" = x"set" &&
987          test x"$ac_cv_target_system_type" != x"$target"; }; then
988         echo "$ac_t""different" 1>&6
989         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
990     else
991         echo "$ac_t""same" 1>&6
992     fi
993     ac_cv_host_system_type="$host"
994     ac_cv_build_system_type="$build"
995     ac_cv_target_system_type="$target"
996
997
998   # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
999 if test "${enable_maintainer_mode+set}" = set; then
1000   enableval="$enable_maintainer_mode"
1001   maint_mode=$enableval
1002 else
1003   maint_mode=no
1004 fi
1005
1006   if test x"$maint_mode" = x"yes"; then MAINT=; else MAINT='#'; fi
1007   
1008   # Extract the first word of "autoconf", so it can be a program name with args.
1009 set dummy autoconf; ac_word=$2
1010 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1011 echo "configure:1012: checking for $ac_word" >&5
1012 if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then
1013   echo $ac_n "(cached) $ac_c" 1>&6
1014 else
1015   case "$AUTOCONF" in
1016   /*)
1017   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
1018   ;;
1019   *)
1020   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1021   for ac_dir in $PATH; do
1022     test -z "$ac_dir" && ac_dir=.
1023     if test -f $ac_dir/$ac_word; then
1024       ac_cv_path_AUTOCONF="$ac_dir/$ac_word"
1025       break
1026     fi
1027   done
1028   IFS="$ac_save_ifs"
1029   test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF="autoconf"
1030   ;;
1031 esac
1032 fi
1033 AUTOCONF="$ac_cv_path_AUTOCONF"
1034 if test -n "$AUTOCONF"; then
1035   echo "$ac_t""$AUTOCONF" 1>&6
1036 else
1037   echo "$ac_t""no" 1>&6
1038 fi
1039
1040   
1041   # Extract the first word of "autoheader", so it can be a program name with args.
1042 set dummy autoheader; ac_word=$2
1043 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1044 echo "configure:1045: checking for $ac_word" >&5
1045 if eval "test \"`echo '$''{'ac_cv_path_AUTOHEADER'+set}'`\" = set"; then
1046   echo $ac_n "(cached) $ac_c" 1>&6
1047 else
1048   case "$AUTOHEADER" in
1049   /*)
1050   ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a path.
1051   ;;
1052   *)
1053   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1054   for ac_dir in $PATH; do
1055     test -z "$ac_dir" && ac_dir=.
1056     if test -f $ac_dir/$ac_word; then
1057       ac_cv_path_AUTOHEADER="$ac_dir/$ac_word"
1058       break
1059     fi
1060   done
1061   IFS="$ac_save_ifs"
1062   test -z "$ac_cv_path_AUTOHEADER" && ac_cv_path_AUTOHEADER="autoheader"
1063   ;;
1064 esac
1065 fi
1066 AUTOHEADER="$ac_cv_path_AUTOHEADER"
1067 if test -n "$AUTOHEADER"; then
1068   echo "$ac_t""$AUTOHEADER" 1>&6
1069 else
1070   echo "$ac_t""no" 1>&6
1071 fi
1072
1073   
1074
1075
1076 echo $ac_n "checking for inline""... $ac_c" 1>&6
1077 echo "configure:1078: checking for inline" >&5
1078 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1079   echo $ac_n "(cached) $ac_c" 1>&6
1080 else
1081   ac_cv_c_inline=no
1082 for ac_kw in inline __inline__ __inline; do
1083   cat > conftest.$ac_ext <<EOF
1084 #line 1085 "configure"
1085 #include "confdefs.h"
1086
1087 int main() {
1088 } $ac_kw foo() {
1089 ; return 0; }
1090 EOF
1091 if { (eval echo configure:1092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1092   rm -rf conftest*
1093   ac_cv_c_inline=$ac_kw; break
1094 else
1095   echo "configure: failed program was:" >&5
1096   cat conftest.$ac_ext >&5
1097 fi
1098 rm -f conftest*
1099 done
1100
1101 fi
1102
1103 echo "$ac_t""$ac_cv_c_inline" 1>&6
1104 case "$ac_cv_c_inline" in
1105   inline | yes) ;;
1106   no) cat >> confdefs.h <<\EOF
1107 #define inline 
1108 EOF
1109  ;;
1110   *)  cat >> confdefs.h <<EOF
1111 #define inline $ac_cv_c_inline
1112 EOF
1113  ;;
1114 esac
1115
1116 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1117 echo "configure:1118: checking how to run the C preprocessor" >&5
1118 # On Suns, sometimes $CPP names a directory.
1119 if test -n "$CPP" && test -d "$CPP"; then
1120   CPP=
1121 fi
1122 if test -z "$CPP"; then
1123 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1124   echo $ac_n "(cached) $ac_c" 1>&6
1125 else
1126     # This must be in double quotes, not single quotes, because CPP may get
1127   # substituted into the Makefile and "${CC-cc}" will confuse make.
1128   CPP="${CC-cc} -E"
1129   # On the NeXT, cc -E runs the code through the compiler's parser,
1130   # not just through cpp.
1131   cat > conftest.$ac_ext <<EOF
1132 #line 1133 "configure"
1133 #include "confdefs.h"
1134 #include <assert.h>
1135 Syntax Error
1136 EOF
1137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1138 { (eval echo configure:1139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1139 ac_err=`grep -v '^ *+' conftest.out`
1140 if test -z "$ac_err"; then
1141   :
1142 else
1143   echo "$ac_err" >&5
1144   echo "configure: failed program was:" >&5
1145   cat conftest.$ac_ext >&5
1146   rm -rf conftest*
1147   CPP="${CC-cc} -E -traditional-cpp"
1148   cat > conftest.$ac_ext <<EOF
1149 #line 1150 "configure"
1150 #include "confdefs.h"
1151 #include <assert.h>
1152 Syntax Error
1153 EOF
1154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1155 { (eval echo configure:1156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1156 ac_err=`grep -v '^ *+' conftest.out`
1157 if test -z "$ac_err"; then
1158   :
1159 else
1160   echo "$ac_err" >&5
1161   echo "configure: failed program was:" >&5
1162   cat conftest.$ac_ext >&5
1163   rm -rf conftest*
1164   CPP=/lib/cpp
1165 fi
1166 rm -f conftest*
1167 fi
1168 rm -f conftest*
1169   ac_cv_prog_CPP="$CPP"
1170 fi
1171   CPP="$ac_cv_prog_CPP"
1172 else
1173   ac_cv_prog_CPP="$CPP"
1174 fi
1175 echo "$ac_t""$CPP" 1>&6
1176
1177 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1178 echo "configure:1179: checking for ANSI C header files" >&5
1179 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1180   echo $ac_n "(cached) $ac_c" 1>&6
1181 else
1182   cat > conftest.$ac_ext <<EOF
1183 #line 1184 "configure"
1184 #include "confdefs.h"
1185 #include <stdlib.h>
1186 #include <stdarg.h>
1187 #include <string.h>
1188 #include <float.h>
1189 EOF
1190 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1191 { (eval echo configure:1192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1192 ac_err=`grep -v '^ *+' conftest.out`
1193 if test -z "$ac_err"; then
1194   rm -rf conftest*
1195   ac_cv_header_stdc=yes
1196 else
1197   echo "$ac_err" >&5
1198   echo "configure: failed program was:" >&5
1199   cat conftest.$ac_ext >&5
1200   rm -rf conftest*
1201   ac_cv_header_stdc=no
1202 fi
1203 rm -f conftest*
1204
1205 if test $ac_cv_header_stdc = yes; then
1206   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1207 cat > conftest.$ac_ext <<EOF
1208 #line 1209 "configure"
1209 #include "confdefs.h"
1210 #include <string.h>
1211 EOF
1212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1213   egrep "memchr" >/dev/null 2>&1; then
1214   :
1215 else
1216   rm -rf conftest*
1217   ac_cv_header_stdc=no
1218 fi
1219 rm -f conftest*
1220
1221 fi
1222
1223 if test $ac_cv_header_stdc = yes; then
1224   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1225 cat > conftest.$ac_ext <<EOF
1226 #line 1227 "configure"
1227 #include "confdefs.h"
1228 #include <stdlib.h>
1229 EOF
1230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1231   egrep "free" >/dev/null 2>&1; then
1232   :
1233 else
1234   rm -rf conftest*
1235   ac_cv_header_stdc=no
1236 fi
1237 rm -f conftest*
1238
1239 fi
1240
1241 if test $ac_cv_header_stdc = yes; then
1242   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1243 if test "$cross_compiling" = yes; then
1244   :
1245 else
1246   cat > conftest.$ac_ext <<EOF
1247 #line 1248 "configure"
1248 #include "confdefs.h"
1249 #include <ctype.h>
1250 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1251 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1252 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1253 int main () { int i; for (i = 0; i < 256; i++)
1254 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1255 exit (0); }
1256
1257 EOF
1258 if { (eval echo configure:1259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1259 then
1260   :
1261 else
1262   echo "configure: failed program was:" >&5
1263   cat conftest.$ac_ext >&5
1264   rm -fr conftest*
1265   ac_cv_header_stdc=no
1266 fi
1267 rm -fr conftest*
1268 fi
1269
1270 fi
1271 fi
1272
1273 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1274 if test $ac_cv_header_stdc = yes; then
1275   cat >> confdefs.h <<\EOF
1276 #define STDC_HEADERS 1
1277 EOF
1278
1279 fi
1280
1281 ac_header_dirent=no
1282 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1283 do
1284 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1285 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1286 echo "configure:1287: checking for $ac_hdr that defines DIR" >&5
1287 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1288   echo $ac_n "(cached) $ac_c" 1>&6
1289 else
1290   cat > conftest.$ac_ext <<EOF
1291 #line 1292 "configure"
1292 #include "confdefs.h"
1293 #include <sys/types.h>
1294 #include <$ac_hdr>
1295 int main() {
1296 DIR *dirp = 0;
1297 ; return 0; }
1298 EOF
1299 if { (eval echo configure:1300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1300   rm -rf conftest*
1301   eval "ac_cv_header_dirent_$ac_safe=yes"
1302 else
1303   echo "configure: failed program was:" >&5
1304   cat conftest.$ac_ext >&5
1305   rm -rf conftest*
1306   eval "ac_cv_header_dirent_$ac_safe=no"
1307 fi
1308 rm -f conftest*
1309 fi
1310 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1311   echo "$ac_t""yes" 1>&6
1312     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1313   cat >> confdefs.h <<EOF
1314 #define $ac_tr_hdr 1
1315 EOF
1316  ac_header_dirent=$ac_hdr; break
1317 else
1318   echo "$ac_t""no" 1>&6
1319 fi
1320 done
1321 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1322 if test $ac_header_dirent = dirent.h; then
1323 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1324 echo "configure:1325: checking for opendir in -ldir" >&5
1325 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1326 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1327   echo $ac_n "(cached) $ac_c" 1>&6
1328 else
1329   ac_save_LIBS="$LIBS"
1330 LIBS="-ldir  $LIBS"
1331 cat > conftest.$ac_ext <<EOF
1332 #line 1333 "configure"
1333 #include "confdefs.h"
1334 /* Override any gcc2 internal prototype to avoid an error.  */
1335 /* We use char because int might match the return type of a gcc2
1336     builtin and then its argument prototype would still apply.  */
1337 char opendir();
1338
1339 int main() {
1340 opendir()
1341 ; return 0; }
1342 EOF
1343 if { (eval echo configure:1344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1344   rm -rf conftest*
1345   eval "ac_cv_lib_$ac_lib_var=yes"
1346 else
1347   echo "configure: failed program was:" >&5
1348   cat conftest.$ac_ext >&5
1349   rm -rf conftest*
1350   eval "ac_cv_lib_$ac_lib_var=no"
1351 fi
1352 rm -f conftest*
1353 LIBS="$ac_save_LIBS"
1354
1355 fi
1356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1357   echo "$ac_t""yes" 1>&6
1358   LIBS="$LIBS -ldir"
1359 else
1360   echo "$ac_t""no" 1>&6
1361 fi
1362
1363 else
1364 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1365 echo "configure:1366: checking for opendir in -lx" >&5
1366 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1367 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1368   echo $ac_n "(cached) $ac_c" 1>&6
1369 else
1370   ac_save_LIBS="$LIBS"
1371 LIBS="-lx  $LIBS"
1372 cat > conftest.$ac_ext <<EOF
1373 #line 1374 "configure"
1374 #include "confdefs.h"
1375 /* Override any gcc2 internal prototype to avoid an error.  */
1376 /* We use char because int might match the return type of a gcc2
1377     builtin and then its argument prototype would still apply.  */
1378 char opendir();
1379
1380 int main() {
1381 opendir()
1382 ; return 0; }
1383 EOF
1384 if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1385   rm -rf conftest*
1386   eval "ac_cv_lib_$ac_lib_var=yes"
1387 else
1388   echo "configure: failed program was:" >&5
1389   cat conftest.$ac_ext >&5
1390   rm -rf conftest*
1391   eval "ac_cv_lib_$ac_lib_var=no"
1392 fi
1393 rm -f conftest*
1394 LIBS="$ac_save_LIBS"
1395
1396 fi
1397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1398   echo "$ac_t""yes" 1>&6
1399   LIBS="$LIBS -lx"
1400 else
1401   echo "$ac_t""no" 1>&6
1402 fi
1403
1404 fi
1405
1406 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1407 echo "configure:1408: checking whether time.h and sys/time.h may both be included" >&5
1408 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1409   echo $ac_n "(cached) $ac_c" 1>&6
1410 else
1411   cat > conftest.$ac_ext <<EOF
1412 #line 1413 "configure"
1413 #include "confdefs.h"
1414 #include <sys/types.h>
1415 #include <sys/time.h>
1416 #include <time.h>
1417 int main() {
1418 struct tm *tp;
1419 ; return 0; }
1420 EOF
1421 if { (eval echo configure:1422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1422   rm -rf conftest*
1423   ac_cv_header_time=yes
1424 else
1425   echo "configure: failed program was:" >&5
1426   cat conftest.$ac_ext >&5
1427   rm -rf conftest*
1428   ac_cv_header_time=no
1429 fi
1430 rm -f conftest*
1431 fi
1432
1433 echo "$ac_t""$ac_cv_header_time" 1>&6
1434 if test $ac_cv_header_time = yes; then
1435   cat >> confdefs.h <<\EOF
1436 #define TIME_WITH_SYS_TIME 1
1437 EOF
1438
1439 fi
1440
1441 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1442 echo "configure:1443: checking for sys/wait.h that is POSIX.1 compatible" >&5
1443 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1444   echo $ac_n "(cached) $ac_c" 1>&6
1445 else
1446   cat > conftest.$ac_ext <<EOF
1447 #line 1448 "configure"
1448 #include "confdefs.h"
1449 #include <sys/types.h>
1450 #include <sys/wait.h>
1451 #ifndef WEXITSTATUS
1452 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1453 #endif
1454 #ifndef WIFEXITED
1455 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1456 #endif
1457 int main() {
1458 int s;
1459 wait (&s);
1460 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1461 ; return 0; }
1462 EOF
1463 if { (eval echo configure:1464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1464   rm -rf conftest*
1465   ac_cv_header_sys_wait_h=yes
1466 else
1467   echo "configure: failed program was:" >&5
1468   cat conftest.$ac_ext >&5
1469   rm -rf conftest*
1470   ac_cv_header_sys_wait_h=no
1471 fi
1472 rm -f conftest*
1473 fi
1474
1475 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1476 if test $ac_cv_header_sys_wait_h = yes; then
1477   cat >> confdefs.h <<\EOF
1478 #define HAVE_SYS_WAIT_H 1
1479 EOF
1480
1481 fi
1482
1483 for ac_hdr in sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1484 do
1485 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1486 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1487 echo "configure:1488: checking for $ac_hdr" >&5
1488 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1489   echo $ac_n "(cached) $ac_c" 1>&6
1490 else
1491   cat > conftest.$ac_ext <<EOF
1492 #line 1493 "configure"
1493 #include "confdefs.h"
1494 #include <$ac_hdr>
1495 EOF
1496 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1497 { (eval echo configure:1498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1498 ac_err=`grep -v '^ *+' conftest.out`
1499 if test -z "$ac_err"; then
1500   rm -rf conftest*
1501   eval "ac_cv_header_$ac_safe=yes"
1502 else
1503   echo "$ac_err" >&5
1504   echo "configure: failed program was:" >&5
1505   cat conftest.$ac_ext >&5
1506   rm -rf conftest*
1507   eval "ac_cv_header_$ac_safe=no"
1508 fi
1509 rm -f conftest*
1510 fi
1511 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1512   echo "$ac_t""yes" 1>&6
1513     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1514   cat >> confdefs.h <<EOF
1515 #define $ac_tr_hdr 1
1516 EOF
1517  
1518 else
1519   echo "$ac_t""no" 1>&6
1520 fi
1521 done
1522
1523 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1524 do
1525 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1526 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1527 echo "configure:1528: checking for $ac_hdr" >&5
1528 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1529   echo $ac_n "(cached) $ac_c" 1>&6
1530 else
1531   cat > conftest.$ac_ext <<EOF
1532 #line 1533 "configure"
1533 #include "confdefs.h"
1534 #include <$ac_hdr>
1535 EOF
1536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1537 { (eval echo configure:1538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1538 ac_err=`grep -v '^ *+' conftest.out`
1539 if test -z "$ac_err"; then
1540   rm -rf conftest*
1541   eval "ac_cv_header_$ac_safe=yes"
1542 else
1543   echo "$ac_err" >&5
1544   echo "configure: failed program was:" >&5
1545   cat conftest.$ac_ext >&5
1546   rm -rf conftest*
1547   eval "ac_cv_header_$ac_safe=no"
1548 fi
1549 rm -f conftest*
1550 fi
1551 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1552   echo "$ac_t""yes" 1>&6
1553     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1554   cat >> confdefs.h <<EOF
1555 #define $ac_tr_hdr 1
1556 EOF
1557  
1558 else
1559   echo "$ac_t""no" 1>&6
1560 fi
1561 done
1562
1563 for ac_hdr in compat.h rpc/types.h rpc/xdr.h rpc/auth.h rpc/clnt.h
1564 do
1565 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1566 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1567 echo "configure:1568: checking for $ac_hdr" >&5
1568 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1569   echo $ac_n "(cached) $ac_c" 1>&6
1570 else
1571   cat > conftest.$ac_ext <<EOF
1572 #line 1573 "configure"
1573 #include "confdefs.h"
1574 #include <$ac_hdr>
1575 EOF
1576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1577 { (eval echo configure:1578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1578 ac_err=`grep -v '^ *+' conftest.out`
1579 if test -z "$ac_err"; then
1580   rm -rf conftest*
1581   eval "ac_cv_header_$ac_safe=yes"
1582 else
1583   echo "$ac_err" >&5
1584   echo "configure: failed program was:" >&5
1585   cat conftest.$ac_ext >&5
1586   rm -rf conftest*
1587   eval "ac_cv_header_$ac_safe=no"
1588 fi
1589 rm -f conftest*
1590 fi
1591 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1592   echo "$ac_t""yes" 1>&6
1593     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1594   cat >> confdefs.h <<EOF
1595 #define $ac_tr_hdr 1
1596 EOF
1597  
1598 else
1599   echo "$ac_t""no" 1>&6
1600 fi
1601 done
1602
1603 for ac_hdr in rpcsvc/yp_prot.h rpcsvc/ypclnt.h sys/param.h ctype.h 
1604 do
1605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1606 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1607 echo "configure:1608: checking for $ac_hdr" >&5
1608 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1609   echo $ac_n "(cached) $ac_c" 1>&6
1610 else
1611   cat > conftest.$ac_ext <<EOF
1612 #line 1613 "configure"
1613 #include "confdefs.h"
1614 #include <$ac_hdr>
1615 EOF
1616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1617 { (eval echo configure:1618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1618 ac_err=`grep -v '^ *+' conftest.out`
1619 if test -z "$ac_err"; then
1620   rm -rf conftest*
1621   eval "ac_cv_header_$ac_safe=yes"
1622 else
1623   echo "$ac_err" >&5
1624   echo "configure: failed program was:" >&5
1625   cat conftest.$ac_ext >&5
1626   rm -rf conftest*
1627   eval "ac_cv_header_$ac_safe=no"
1628 fi
1629 rm -f conftest*
1630 fi
1631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1632   echo "$ac_t""yes" 1>&6
1633     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1634   cat >> confdefs.h <<EOF
1635 #define $ac_tr_hdr 1
1636 EOF
1637  
1638 else
1639   echo "$ac_t""no" 1>&6
1640 fi
1641 done
1642
1643 for ac_hdr in sys/wait.h sys/resource.h sys/ioctl.h sys/mode.h
1644 do
1645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1647 echo "configure:1648: checking for $ac_hdr" >&5
1648 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1649   echo $ac_n "(cached) $ac_c" 1>&6
1650 else
1651   cat > conftest.$ac_ext <<EOF
1652 #line 1653 "configure"
1653 #include "confdefs.h"
1654 #include <$ac_hdr>
1655 EOF
1656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1657 { (eval echo configure:1658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1658 ac_err=`grep -v '^ *+' conftest.out`
1659 if test -z "$ac_err"; then
1660   rm -rf conftest*
1661   eval "ac_cv_header_$ac_safe=yes"
1662 else
1663   echo "$ac_err" >&5
1664   echo "configure: failed program was:" >&5
1665   cat conftest.$ac_ext >&5
1666   rm -rf conftest*
1667   eval "ac_cv_header_$ac_safe=no"
1668 fi
1669 rm -f conftest*
1670 fi
1671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1672   echo "$ac_t""yes" 1>&6
1673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1674   cat >> confdefs.h <<EOF
1675 #define $ac_tr_hdr 1
1676 EOF
1677  
1678 else
1679   echo "$ac_t""no" 1>&6
1680 fi
1681 done
1682
1683 for ac_hdr in sys/filio.h string.h strings.h stdlib.h sys/socket.h
1684 do
1685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1686 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1687 echo "configure:1688: checking for $ac_hdr" >&5
1688 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1689   echo $ac_n "(cached) $ac_c" 1>&6
1690 else
1691   cat > conftest.$ac_ext <<EOF
1692 #line 1693 "configure"
1693 #include "confdefs.h"
1694 #include <$ac_hdr>
1695 EOF
1696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1697 { (eval echo configure:1698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1698 ac_err=`grep -v '^ *+' conftest.out`
1699 if test -z "$ac_err"; then
1700   rm -rf conftest*
1701   eval "ac_cv_header_$ac_safe=yes"
1702 else
1703   echo "$ac_err" >&5
1704   echo "configure: failed program was:" >&5
1705   cat conftest.$ac_ext >&5
1706   rm -rf conftest*
1707   eval "ac_cv_header_$ac_safe=no"
1708 fi
1709 rm -f conftest*
1710 fi
1711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1712   echo "$ac_t""yes" 1>&6
1713     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1714   cat >> confdefs.h <<EOF
1715 #define $ac_tr_hdr 1
1716 EOF
1717  
1718 else
1719   echo "$ac_t""no" 1>&6
1720 fi
1721 done
1722
1723 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h
1724 do
1725 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1726 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1727 echo "configure:1728: checking for $ac_hdr" >&5
1728 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1729   echo $ac_n "(cached) $ac_c" 1>&6
1730 else
1731   cat > conftest.$ac_ext <<EOF
1732 #line 1733 "configure"
1733 #include "confdefs.h"
1734 #include <$ac_hdr>
1735 EOF
1736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1737 { (eval echo configure:1738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1738 ac_err=`grep -v '^ *+' conftest.out`
1739 if test -z "$ac_err"; then
1740   rm -rf conftest*
1741   eval "ac_cv_header_$ac_safe=yes"
1742 else
1743   echo "$ac_err" >&5
1744   echo "configure: failed program was:" >&5
1745   cat conftest.$ac_ext >&5
1746   rm -rf conftest*
1747   eval "ac_cv_header_$ac_safe=no"
1748 fi
1749 rm -f conftest*
1750 fi
1751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1752   echo "$ac_t""yes" 1>&6
1753     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1754   cat >> confdefs.h <<EOF
1755 #define $ac_tr_hdr 1
1756 EOF
1757  
1758 else
1759   echo "$ac_t""no" 1>&6
1760 fi
1761 done
1762
1763 for ac_hdr in sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
1764 do
1765 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1766 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1767 echo "configure:1768: checking for $ac_hdr" >&5
1768 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1769   echo $ac_n "(cached) $ac_c" 1>&6
1770 else
1771   cat > conftest.$ac_ext <<EOF
1772 #line 1773 "configure"
1773 #include "confdefs.h"
1774 #include <$ac_hdr>
1775 EOF
1776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1777 { (eval echo configure:1778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1778 ac_err=`grep -v '^ *+' conftest.out`
1779 if test -z "$ac_err"; then
1780   rm -rf conftest*
1781   eval "ac_cv_header_$ac_safe=yes"
1782 else
1783   echo "$ac_err" >&5
1784   echo "configure: failed program was:" >&5
1785   cat conftest.$ac_ext >&5
1786   rm -rf conftest*
1787   eval "ac_cv_header_$ac_safe=no"
1788 fi
1789 rm -f conftest*
1790 fi
1791 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1792   echo "$ac_t""yes" 1>&6
1793     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1794   cat >> confdefs.h <<EOF
1795 #define $ac_tr_hdr 1
1796 EOF
1797  
1798 else
1799   echo "$ac_t""no" 1>&6
1800 fi
1801 done
1802
1803 for ac_hdr in shadow.h netinet/tcp.h sys/security.h security/pam_appl.h
1804 do
1805 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1806 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1807 echo "configure:1808: checking for $ac_hdr" >&5
1808 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1809   echo $ac_n "(cached) $ac_c" 1>&6
1810 else
1811   cat > conftest.$ac_ext <<EOF
1812 #line 1813 "configure"
1813 #include "confdefs.h"
1814 #include <$ac_hdr>
1815 EOF
1816 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1817 { (eval echo configure:1818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1818 ac_err=`grep -v '^ *+' conftest.out`
1819 if test -z "$ac_err"; then
1820   rm -rf conftest*
1821   eval "ac_cv_header_$ac_safe=yes"
1822 else
1823   echo "$ac_err" >&5
1824   echo "configure: failed program was:" >&5
1825   cat conftest.$ac_ext >&5
1826   rm -rf conftest*
1827   eval "ac_cv_header_$ac_safe=no"
1828 fi
1829 rm -f conftest*
1830 fi
1831 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1832   echo "$ac_t""yes" 1>&6
1833     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1834   cat >> confdefs.h <<EOF
1835 #define $ac_tr_hdr 1
1836 EOF
1837  
1838 else
1839   echo "$ac_t""no" 1>&6
1840 fi
1841 done
1842
1843 for ac_hdr in stropts.h poll.h readline.h history.h readline/readline.h
1844 do
1845 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1846 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1847 echo "configure:1848: checking for $ac_hdr" >&5
1848 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1849   echo $ac_n "(cached) $ac_c" 1>&6
1850 else
1851   cat > conftest.$ac_ext <<EOF
1852 #line 1853 "configure"
1853 #include "confdefs.h"
1854 #include <$ac_hdr>
1855 EOF
1856 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1857 { (eval echo configure:1858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1858 ac_err=`grep -v '^ *+' conftest.out`
1859 if test -z "$ac_err"; then
1860   rm -rf conftest*
1861   eval "ac_cv_header_$ac_safe=yes"
1862 else
1863   echo "$ac_err" >&5
1864   echo "configure: failed program was:" >&5
1865   cat conftest.$ac_ext >&5
1866   rm -rf conftest*
1867   eval "ac_cv_header_$ac_safe=no"
1868 fi
1869 rm -f conftest*
1870 fi
1871 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1872   echo "$ac_t""yes" 1>&6
1873     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1874   cat >> confdefs.h <<EOF
1875 #define $ac_tr_hdr 1
1876 EOF
1877  
1878 else
1879   echo "$ac_t""no" 1>&6
1880 fi
1881 done
1882
1883 for ac_hdr in readline/history.h sys/capability.h sysacll.h sys/syscall.h
1884 do
1885 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1886 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1887 echo "configure:1888: checking for $ac_hdr" >&5
1888 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1889   echo $ac_n "(cached) $ac_c" 1>&6
1890 else
1891   cat > conftest.$ac_ext <<EOF
1892 #line 1893 "configure"
1893 #include "confdefs.h"
1894 #include <$ac_hdr>
1895 EOF
1896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1897 { (eval echo configure:1898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1898 ac_err=`grep -v '^ *+' conftest.out`
1899 if test -z "$ac_err"; then
1900   rm -rf conftest*
1901   eval "ac_cv_header_$ac_safe=yes"
1902 else
1903   echo "$ac_err" >&5
1904   echo "configure: failed program was:" >&5
1905   cat conftest.$ac_ext >&5
1906   rm -rf conftest*
1907   eval "ac_cv_header_$ac_safe=no"
1908 fi
1909 rm -f conftest*
1910 fi
1911 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1912   echo "$ac_t""yes" 1>&6
1913     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1914   cat >> confdefs.h <<EOF
1915 #define $ac_tr_hdr 1
1916 EOF
1917  
1918 else
1919   echo "$ac_t""no" 1>&6
1920 fi
1921 done
1922
1923
1924 echo $ac_n "checking size of int""... $ac_c" 1>&6
1925 echo "configure:1926: checking size of int" >&5
1926 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1927   echo $ac_n "(cached) $ac_c" 1>&6
1928 else
1929   if test "$cross_compiling" = yes; then
1930   ac_cv_sizeof_int=cross
1931 else
1932   cat > conftest.$ac_ext <<EOF
1933 #line 1934 "configure"
1934 #include "confdefs.h"
1935 #include <stdio.h>
1936 main()
1937 {
1938   FILE *f=fopen("conftestval", "w");
1939   if (!f) exit(1);
1940   fprintf(f, "%d\n", sizeof(int));
1941   exit(0);
1942 }
1943 EOF
1944 if { (eval echo configure:1945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1945 then
1946   ac_cv_sizeof_int=`cat conftestval`
1947 else
1948   echo "configure: failed program was:" >&5
1949   cat conftest.$ac_ext >&5
1950   rm -fr conftest*
1951   ac_cv_sizeof_int=0
1952 fi
1953 rm -fr conftest*
1954 fi
1955
1956 fi
1957 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1958 cat >> confdefs.h <<EOF
1959 #define SIZEOF_INT $ac_cv_sizeof_int
1960 EOF
1961
1962
1963 echo $ac_n "checking size of long""... $ac_c" 1>&6
1964 echo "configure:1965: checking size of long" >&5
1965 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1966   echo $ac_n "(cached) $ac_c" 1>&6
1967 else
1968   if test "$cross_compiling" = yes; then
1969   ac_cv_sizeof_long=cross
1970 else
1971   cat > conftest.$ac_ext <<EOF
1972 #line 1973 "configure"
1973 #include "confdefs.h"
1974 #include <stdio.h>
1975 main()
1976 {
1977   FILE *f=fopen("conftestval", "w");
1978   if (!f) exit(1);
1979   fprintf(f, "%d\n", sizeof(long));
1980   exit(0);
1981 }
1982 EOF
1983 if { (eval echo configure:1984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1984 then
1985   ac_cv_sizeof_long=`cat conftestval`
1986 else
1987   echo "configure: failed program was:" >&5
1988   cat conftest.$ac_ext >&5
1989   rm -fr conftest*
1990   ac_cv_sizeof_long=0
1991 fi
1992 rm -fr conftest*
1993 fi
1994
1995 fi
1996 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1997 cat >> confdefs.h <<EOF
1998 #define SIZEOF_LONG $ac_cv_sizeof_long
1999 EOF
2000
2001
2002 echo $ac_n "checking size of short""... $ac_c" 1>&6
2003 echo "configure:2004: checking size of short" >&5
2004 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2005   echo $ac_n "(cached) $ac_c" 1>&6
2006 else
2007   if test "$cross_compiling" = yes; then
2008   ac_cv_sizeof_short=cross
2009 else
2010   cat > conftest.$ac_ext <<EOF
2011 #line 2012 "configure"
2012 #include "confdefs.h"
2013 #include <stdio.h>
2014 main()
2015 {
2016   FILE *f=fopen("conftestval", "w");
2017   if (!f) exit(1);
2018   fprintf(f, "%d\n", sizeof(short));
2019   exit(0);
2020 }
2021 EOF
2022 if { (eval echo configure:2023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2023 then
2024   ac_cv_sizeof_short=`cat conftestval`
2025 else
2026   echo "configure: failed program was:" >&5
2027   cat conftest.$ac_ext >&5
2028   rm -fr conftest*
2029   ac_cv_sizeof_short=0
2030 fi
2031 rm -fr conftest*
2032 fi
2033
2034 fi
2035 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2036 cat >> confdefs.h <<EOF
2037 #define SIZEOF_SHORT $ac_cv_sizeof_short
2038 EOF
2039
2040
2041
2042 echo $ac_n "checking for working const""... $ac_c" 1>&6
2043 echo "configure:2044: checking for working const" >&5
2044 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2045   echo $ac_n "(cached) $ac_c" 1>&6
2046 else
2047   cat > conftest.$ac_ext <<EOF
2048 #line 2049 "configure"
2049 #include "confdefs.h"
2050
2051 int main() {
2052
2053 /* Ultrix mips cc rejects this.  */
2054 typedef int charset[2]; const charset x;
2055 /* SunOS 4.1.1 cc rejects this.  */
2056 char const *const *ccp;
2057 char **p;
2058 /* NEC SVR4.0.2 mips cc rejects this.  */
2059 struct point {int x, y;};
2060 static struct point const zero = {0,0};
2061 /* AIX XL C 1.02.0.0 rejects this.
2062    It does not let you subtract one const X* pointer from another in an arm
2063    of an if-expression whose if-part is not a constant expression */
2064 const char *g = "string";
2065 ccp = &g + (g ? g-g : 0);
2066 /* HPUX 7.0 cc rejects these. */
2067 ++ccp;
2068 p = (char**) ccp;
2069 ccp = (char const *const *) p;
2070 { /* SCO 3.2v4 cc rejects this.  */
2071   char *t;
2072   char const *s = 0 ? (char *) 0 : (char const *) 0;
2073
2074   *t++ = 0;
2075 }
2076 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2077   int x[] = {25, 17};
2078   const int *foo = &x[0];
2079   ++foo;
2080 }
2081 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2082   typedef const int *iptr;
2083   iptr p = 0;
2084   ++p;
2085 }
2086 { /* AIX XL C 1.02.0.0 rejects this saying
2087      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2088   struct s { int j; const int *ap[3]; };
2089   struct s *b; b->j = 5;
2090 }
2091 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2092   const int foo = 10;
2093 }
2094
2095 ; return 0; }
2096 EOF
2097 if { (eval echo configure:2098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2098   rm -rf conftest*
2099   ac_cv_c_const=yes
2100 else
2101   echo "configure: failed program was:" >&5
2102   cat conftest.$ac_ext >&5
2103   rm -rf conftest*
2104   ac_cv_c_const=no
2105 fi
2106 rm -f conftest*
2107 fi
2108
2109 echo "$ac_t""$ac_cv_c_const" 1>&6
2110 if test $ac_cv_c_const = no; then
2111   cat >> confdefs.h <<\EOF
2112 #define const 
2113 EOF
2114
2115 fi
2116
2117 echo $ac_n "checking for inline""... $ac_c" 1>&6
2118 echo "configure:2119: checking for inline" >&5
2119 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2120   echo $ac_n "(cached) $ac_c" 1>&6
2121 else
2122   ac_cv_c_inline=no
2123 for ac_kw in inline __inline__ __inline; do
2124   cat > conftest.$ac_ext <<EOF
2125 #line 2126 "configure"
2126 #include "confdefs.h"
2127
2128 int main() {
2129 } $ac_kw foo() {
2130 ; return 0; }
2131 EOF
2132 if { (eval echo configure:2133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2133   rm -rf conftest*
2134   ac_cv_c_inline=$ac_kw; break
2135 else
2136   echo "configure: failed program was:" >&5
2137   cat conftest.$ac_ext >&5
2138 fi
2139 rm -f conftest*
2140 done
2141
2142 fi
2143
2144 echo "$ac_t""$ac_cv_c_inline" 1>&6
2145 case "$ac_cv_c_inline" in
2146   inline | yes) ;;
2147   no) cat >> confdefs.h <<\EOF
2148 #define inline 
2149 EOF
2150  ;;
2151   *)  cat >> confdefs.h <<EOF
2152 #define inline $ac_cv_c_inline
2153 EOF
2154  ;;
2155 esac
2156
2157 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2158 echo "configure:2159: checking whether byte ordering is bigendian" >&5
2159 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2160   echo $ac_n "(cached) $ac_c" 1>&6
2161 else
2162   ac_cv_c_bigendian=unknown
2163 # See if sys/param.h defines the BYTE_ORDER macro.
2164 cat > conftest.$ac_ext <<EOF
2165 #line 2166 "configure"
2166 #include "confdefs.h"
2167 #include <sys/types.h>
2168 #include <sys/param.h>
2169 int main() {
2170
2171 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2172  bogus endian macros
2173 #endif
2174 ; return 0; }
2175 EOF
2176 if { (eval echo configure:2177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2177   rm -rf conftest*
2178   # It does; now see whether it defined to BIG_ENDIAN or not.
2179 cat > conftest.$ac_ext <<EOF
2180 #line 2181 "configure"
2181 #include "confdefs.h"
2182 #include <sys/types.h>
2183 #include <sys/param.h>
2184 int main() {
2185
2186 #if BYTE_ORDER != BIG_ENDIAN
2187  not big endian
2188 #endif
2189 ; return 0; }
2190 EOF
2191 if { (eval echo configure:2192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2192   rm -rf conftest*
2193   ac_cv_c_bigendian=yes
2194 else
2195   echo "configure: failed program was:" >&5
2196   cat conftest.$ac_ext >&5
2197   rm -rf conftest*
2198   ac_cv_c_bigendian=no
2199 fi
2200 rm -f conftest*
2201 else
2202   echo "configure: failed program was:" >&5
2203   cat conftest.$ac_ext >&5
2204 fi
2205 rm -f conftest*
2206 if test $ac_cv_c_bigendian = unknown; then
2207 if test "$cross_compiling" = yes; then
2208     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2209 else
2210   cat > conftest.$ac_ext <<EOF
2211 #line 2212 "configure"
2212 #include "confdefs.h"
2213 main () {
2214   /* Are we little or big endian?  From Harbison&Steele.  */
2215   union
2216   {
2217     long l;
2218     char c[sizeof (long)];
2219   } u;
2220   u.l = 1;
2221   exit (u.c[sizeof (long) - 1] == 1);
2222 }
2223 EOF
2224 if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2225 then
2226   ac_cv_c_bigendian=no
2227 else
2228   echo "configure: failed program was:" >&5
2229   cat conftest.$ac_ext >&5
2230   rm -fr conftest*
2231   ac_cv_c_bigendian=yes
2232 fi
2233 rm -fr conftest*
2234 fi
2235
2236 fi
2237 fi
2238
2239 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2240 if test $ac_cv_c_bigendian = yes; then
2241   cat >> confdefs.h <<\EOF
2242 #define WORDS_BIGENDIAN 1
2243 EOF
2244
2245 fi
2246
2247 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2248 echo "configure:2249: checking whether char is unsigned" >&5
2249 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2250   echo $ac_n "(cached) $ac_c" 1>&6
2251 else
2252   if test "$GCC" = yes; then
2253   # GCC predefines this symbol on systems where it applies.
2254 cat > conftest.$ac_ext <<EOF
2255 #line 2256 "configure"
2256 #include "confdefs.h"
2257 #ifdef __CHAR_UNSIGNED__
2258   yes
2259 #endif
2260
2261 EOF
2262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2263   egrep "yes" >/dev/null 2>&1; then
2264   rm -rf conftest*
2265   ac_cv_c_char_unsigned=yes
2266 else
2267   rm -rf conftest*
2268   ac_cv_c_char_unsigned=no
2269 fi
2270 rm -f conftest*
2271
2272 else
2273 if test "$cross_compiling" = yes; then
2274     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2275 else
2276   cat > conftest.$ac_ext <<EOF
2277 #line 2278 "configure"
2278 #include "confdefs.h"
2279 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2280 #if !defined(__STDC__) || __STDC__ != 1
2281 #define volatile
2282 #endif
2283 main() {
2284   volatile char c = 255; exit(c < 0);
2285 }
2286 EOF
2287 if { (eval echo configure:2288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2288 then
2289   ac_cv_c_char_unsigned=yes
2290 else
2291   echo "configure: failed program was:" >&5
2292   cat conftest.$ac_ext >&5
2293   rm -fr conftest*
2294   ac_cv_c_char_unsigned=no
2295 fi
2296 rm -fr conftest*
2297 fi
2298
2299 fi
2300 fi
2301
2302 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2303 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2304   cat >> confdefs.h <<\EOF
2305 #define __CHAR_UNSIGNED__ 1
2306 EOF
2307
2308 fi
2309
2310
2311 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2312 echo "configure:2313: checking return type of signal handlers" >&5
2313 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2314   echo $ac_n "(cached) $ac_c" 1>&6
2315 else
2316   cat > conftest.$ac_ext <<EOF
2317 #line 2318 "configure"
2318 #include "confdefs.h"
2319 #include <sys/types.h>
2320 #include <signal.h>
2321 #ifdef signal
2322 #undef signal
2323 #endif
2324 #ifdef __cplusplus
2325 extern "C" void (*signal (int, void (*)(int)))(int);
2326 #else
2327 void (*signal ()) ();
2328 #endif
2329
2330 int main() {
2331 int i;
2332 ; return 0; }
2333 EOF
2334 if { (eval echo configure:2335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2335   rm -rf conftest*
2336   ac_cv_type_signal=void
2337 else
2338   echo "configure: failed program was:" >&5
2339   cat conftest.$ac_ext >&5
2340   rm -rf conftest*
2341   ac_cv_type_signal=int
2342 fi
2343 rm -f conftest*
2344 fi
2345
2346 echo "$ac_t""$ac_cv_type_signal" 1>&6
2347 cat >> confdefs.h <<EOF
2348 #define RETSIGTYPE $ac_cv_type_signal
2349 EOF
2350
2351
2352 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2353 echo "configure:2354: checking for uid_t in sys/types.h" >&5
2354 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2355   echo $ac_n "(cached) $ac_c" 1>&6
2356 else
2357   cat > conftest.$ac_ext <<EOF
2358 #line 2359 "configure"
2359 #include "confdefs.h"
2360 #include <sys/types.h>
2361 EOF
2362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2363   egrep "uid_t" >/dev/null 2>&1; then
2364   rm -rf conftest*
2365   ac_cv_type_uid_t=yes
2366 else
2367   rm -rf conftest*
2368   ac_cv_type_uid_t=no
2369 fi
2370 rm -f conftest*
2371
2372 fi
2373
2374 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2375 if test $ac_cv_type_uid_t = no; then
2376   cat >> confdefs.h <<\EOF
2377 #define uid_t int
2378 EOF
2379
2380   cat >> confdefs.h <<\EOF
2381 #define gid_t int
2382 EOF
2383
2384 fi
2385
2386 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2387 echo "configure:2388: checking for mode_t" >&5
2388 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2389   echo $ac_n "(cached) $ac_c" 1>&6
2390 else
2391   cat > conftest.$ac_ext <<EOF
2392 #line 2393 "configure"
2393 #include "confdefs.h"
2394 #include <sys/types.h>
2395 #if STDC_HEADERS
2396 #include <stdlib.h>
2397 #include <stddef.h>
2398 #endif
2399 EOF
2400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2401   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2402   rm -rf conftest*
2403   ac_cv_type_mode_t=yes
2404 else
2405   rm -rf conftest*
2406   ac_cv_type_mode_t=no
2407 fi
2408 rm -f conftest*
2409
2410 fi
2411 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2412 if test $ac_cv_type_mode_t = no; then
2413   cat >> confdefs.h <<\EOF
2414 #define mode_t int
2415 EOF
2416
2417 fi
2418
2419 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2420 echo "configure:2421: checking for off_t" >&5
2421 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2422   echo $ac_n "(cached) $ac_c" 1>&6
2423 else
2424   cat > conftest.$ac_ext <<EOF
2425 #line 2426 "configure"
2426 #include "confdefs.h"
2427 #include <sys/types.h>
2428 #if STDC_HEADERS
2429 #include <stdlib.h>
2430 #include <stddef.h>
2431 #endif
2432 EOF
2433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2434   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2435   rm -rf conftest*
2436   ac_cv_type_off_t=yes
2437 else
2438   rm -rf conftest*
2439   ac_cv_type_off_t=no
2440 fi
2441 rm -f conftest*
2442
2443 fi
2444 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2445 if test $ac_cv_type_off_t = no; then
2446   cat >> confdefs.h <<\EOF
2447 #define off_t long
2448 EOF
2449
2450 fi
2451
2452 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2453 echo "configure:2454: checking for size_t" >&5
2454 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2455   echo $ac_n "(cached) $ac_c" 1>&6
2456 else
2457   cat > conftest.$ac_ext <<EOF
2458 #line 2459 "configure"
2459 #include "confdefs.h"
2460 #include <sys/types.h>
2461 #if STDC_HEADERS
2462 #include <stdlib.h>
2463 #include <stddef.h>
2464 #endif
2465 EOF
2466 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2467   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2468   rm -rf conftest*
2469   ac_cv_type_size_t=yes
2470 else
2471   rm -rf conftest*
2472   ac_cv_type_size_t=no
2473 fi
2474 rm -f conftest*
2475
2476 fi
2477 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2478 if test $ac_cv_type_size_t = no; then
2479   cat >> confdefs.h <<\EOF
2480 #define size_t unsigned
2481 EOF
2482
2483 fi
2484
2485 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2486 echo "configure:2487: checking for pid_t" >&5
2487 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2488   echo $ac_n "(cached) $ac_c" 1>&6
2489 else
2490   cat > conftest.$ac_ext <<EOF
2491 #line 2492 "configure"
2492 #include "confdefs.h"
2493 #include <sys/types.h>
2494 #if STDC_HEADERS
2495 #include <stdlib.h>
2496 #include <stddef.h>
2497 #endif
2498 EOF
2499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2500   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2501   rm -rf conftest*
2502   ac_cv_type_pid_t=yes
2503 else
2504   rm -rf conftest*
2505   ac_cv_type_pid_t=no
2506 fi
2507 rm -f conftest*
2508
2509 fi
2510 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2511 if test $ac_cv_type_pid_t = no; then
2512   cat >> confdefs.h <<\EOF
2513 #define pid_t int
2514 EOF
2515
2516 fi
2517
2518 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
2519 echo "configure:2520: checking for st_rdev in struct stat" >&5
2520 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
2521   echo $ac_n "(cached) $ac_c" 1>&6
2522 else
2523   cat > conftest.$ac_ext <<EOF
2524 #line 2525 "configure"
2525 #include "confdefs.h"
2526 #include <sys/types.h>
2527 #include <sys/stat.h>
2528 int main() {
2529 struct stat s; s.st_rdev;
2530 ; return 0; }
2531 EOF
2532 if { (eval echo configure:2533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2533   rm -rf conftest*
2534   ac_cv_struct_st_rdev=yes
2535 else
2536   echo "configure: failed program was:" >&5
2537   cat conftest.$ac_ext >&5
2538   rm -rf conftest*
2539   ac_cv_struct_st_rdev=no
2540 fi
2541 rm -f conftest*
2542 fi
2543
2544 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
2545 if test $ac_cv_struct_st_rdev = yes; then
2546   cat >> confdefs.h <<\EOF
2547 #define HAVE_ST_RDEV 1
2548 EOF
2549
2550 fi
2551
2552 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
2553 echo "configure:2554: checking for ino_t" >&5
2554 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
2555   echo $ac_n "(cached) $ac_c" 1>&6
2556 else
2557   cat > conftest.$ac_ext <<EOF
2558 #line 2559 "configure"
2559 #include "confdefs.h"
2560 #include <sys/types.h>
2561 #if STDC_HEADERS
2562 #include <stdlib.h>
2563 #include <stddef.h>
2564 #endif
2565 EOF
2566 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2567   egrep "ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2568   rm -rf conftest*
2569   ac_cv_type_ino_t=yes
2570 else
2571   rm -rf conftest*
2572   ac_cv_type_ino_t=no
2573 fi
2574 rm -f conftest*
2575
2576 fi
2577 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
2578 if test $ac_cv_type_ino_t = no; then
2579   cat >> confdefs.h <<\EOF
2580 #define ino_t unsigned
2581 EOF
2582
2583 fi
2584
2585 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
2586 echo "configure:2587: checking for ssize_t" >&5
2587 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
2588   echo $ac_n "(cached) $ac_c" 1>&6
2589 else
2590   cat > conftest.$ac_ext <<EOF
2591 #line 2592 "configure"
2592 #include "confdefs.h"
2593 #include <sys/types.h>
2594 #if STDC_HEADERS
2595 #include <stdlib.h>
2596 #include <stddef.h>
2597 #endif
2598 EOF
2599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2600   egrep "ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2601   rm -rf conftest*
2602   ac_cv_type_ssize_t=yes
2603 else
2604   rm -rf conftest*
2605   ac_cv_type_ssize_t=no
2606 fi
2607 rm -f conftest*
2608
2609 fi
2610 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
2611 if test $ac_cv_type_ssize_t = no; then
2612   cat >> confdefs.h <<\EOF
2613 #define ssize_t int
2614 EOF
2615
2616 fi
2617
2618
2619 echo $ac_n "checking for errno in errno.h""... $ac_c" 1>&6
2620 echo "configure:2621: checking for errno in errno.h" >&5
2621 if eval "test \"`echo '$''{'samba_cv_errno'+set}'`\" = set"; then
2622   echo $ac_n "(cached) $ac_c" 1>&6
2623 else
2624   
2625     cat > conftest.$ac_ext <<EOF
2626 #line 2627 "configure"
2627 #include "confdefs.h"
2628 #include <errno.h>
2629 int main() {
2630 int i = errno
2631 ; return 0; }
2632 EOF
2633 if { (eval echo configure:2634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2634   rm -rf conftest*
2635   samba_cv_errno=yes
2636 else
2637   echo "configure: failed program was:" >&5
2638   cat conftest.$ac_ext >&5
2639   rm -rf conftest*
2640   samba_cv_have_errno_decl=no
2641 fi
2642 rm -f conftest*
2643 fi
2644
2645 echo "$ac_t""$samba_cv_errno" 1>&6
2646 if test x"$samba_cv_errno" = x"yes"; then
2647    cat >> confdefs.h <<\EOF
2648 #define HAVE_ERRNO_DECL 1
2649 EOF
2650
2651 fi
2652
2653 # stupid glibc has the functions but no declaration. grrrr.
2654 echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
2655 echo "configure:2656: checking for setresuid declaration" >&5
2656 if eval "test \"`echo '$''{'samba_cv_have_setresuid_decl'+set}'`\" = set"; then
2657   echo $ac_n "(cached) $ac_c" 1>&6
2658 else
2659   
2660     cat > conftest.$ac_ext <<EOF
2661 #line 2662 "configure"
2662 #include "confdefs.h"
2663 #include <unistd.h>
2664 int main() {
2665 int i = setresuid
2666 ; return 0; }
2667 EOF
2668 if { (eval echo configure:2669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2669   rm -rf conftest*
2670   samba_cv_have_setresuid_decl=yes
2671 else
2672   echo "configure: failed program was:" >&5
2673   cat conftest.$ac_ext >&5
2674   rm -rf conftest*
2675   samba_cv_have_setresuid_decl=no
2676 fi
2677 rm -f conftest*
2678 fi
2679
2680 echo "$ac_t""$samba_cv_have_setresuid_decl" 1>&6
2681 if test x"$samba_cv_have_setresuid_decl" = x"yes"; then
2682     cat >> confdefs.h <<\EOF
2683 #define HAVE_SETRESUID_DECL 1
2684 EOF
2685
2686 fi
2687
2688 # and glibc has setresuid under linux but the function does
2689 # nothing until kernel 2.1.44! very dumb.
2690 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
2691 echo "configure:2692: checking for real setresuid" >&5
2692 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
2693   echo $ac_n "(cached) $ac_c" 1>&6
2694 else
2695   
2696     if test "$cross_compiling" = yes; then
2697   samba_cv_have_setresuid=cross
2698 else
2699   cat > conftest.$ac_ext <<EOF
2700 #line 2701 "configure"
2701 #include "confdefs.h"
2702 #include <errno.h>
2703 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
2704 EOF
2705 if { (eval echo configure:2706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2706 then
2707   samba_cv_have_setresuid=yes
2708 else
2709   echo "configure: failed program was:" >&5
2710   cat conftest.$ac_ext >&5
2711   rm -fr conftest*
2712   samba_cv_have_setresuid=no
2713 fi
2714 rm -fr conftest*
2715 fi
2716
2717 fi
2718
2719 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
2720 if test x"$samba_cv_have_setresuid" = x"yes"; then
2721     cat >> confdefs.h <<\EOF
2722 #define HAVE_SETRESUID 1
2723 EOF
2724
2725 fi
2726
2727 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
2728 echo "configure:2729: checking for 8-bit clean memcmp" >&5
2729 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
2730   echo $ac_n "(cached) $ac_c" 1>&6
2731 else
2732   if test "$cross_compiling" = yes; then
2733   ac_cv_func_memcmp_clean=no
2734 else
2735   cat > conftest.$ac_ext <<EOF
2736 #line 2737 "configure"
2737 #include "confdefs.h"
2738
2739 main()
2740 {
2741   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
2742   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
2743 }
2744
2745 EOF
2746 if { (eval echo configure:2747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2747 then
2748   ac_cv_func_memcmp_clean=yes
2749 else
2750   echo "configure: failed program was:" >&5
2751   cat conftest.$ac_ext >&5
2752   rm -fr conftest*
2753   ac_cv_func_memcmp_clean=no
2754 fi
2755 rm -fr conftest*
2756 fi
2757
2758 fi
2759
2760 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
2761 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
2762
2763
2764 ###############################################
2765 # test for where we get crypt() from
2766 for ac_func in crypt
2767 do
2768 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2769 echo "configure:2770: checking for $ac_func" >&5
2770 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2771   echo $ac_n "(cached) $ac_c" 1>&6
2772 else
2773   cat > conftest.$ac_ext <<EOF
2774 #line 2775 "configure"
2775 #include "confdefs.h"
2776 /* System header to define __stub macros and hopefully few prototypes,
2777     which can conflict with char $ac_func(); below.  */
2778 #include <assert.h>
2779 /* Override any gcc2 internal prototype to avoid an error.  */
2780 /* We use char because int might match the return type of a gcc2
2781     builtin and then its argument prototype would still apply.  */
2782 char $ac_func();
2783
2784 int main() {
2785
2786 /* The GNU C library defines this for functions which it implements
2787     to always fail with ENOSYS.  Some functions are actually named
2788     something starting with __ and the normal name is an alias.  */
2789 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2790 choke me
2791 #else
2792 $ac_func();
2793 #endif
2794
2795 ; return 0; }
2796 EOF
2797 if { (eval echo configure:2798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2798   rm -rf conftest*
2799   eval "ac_cv_func_$ac_func=yes"
2800 else
2801   echo "configure: failed program was:" >&5
2802   cat conftest.$ac_ext >&5
2803   rm -rf conftest*
2804   eval "ac_cv_func_$ac_func=no"
2805 fi
2806 rm -f conftest*
2807 fi
2808
2809 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2810   echo "$ac_t""yes" 1>&6
2811     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2812   cat >> confdefs.h <<EOF
2813 #define $ac_tr_func 1
2814 EOF
2815  
2816 else
2817   echo "$ac_t""no" 1>&6
2818 fi
2819 done
2820
2821 if test x"$ac_cv_func_crypt" = x"no"; then
2822     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
2823 echo "configure:2824: checking for crypt in -lcrypt" >&5
2824 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
2825 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2826   echo $ac_n "(cached) $ac_c" 1>&6
2827 else
2828   ac_save_LIBS="$LIBS"
2829 LIBS="-lcrypt  $LIBS"
2830 cat > conftest.$ac_ext <<EOF
2831 #line 2832 "configure"
2832 #include "confdefs.h"
2833 /* Override any gcc2 internal prototype to avoid an error.  */
2834 /* We use char because int might match the return type of a gcc2
2835     builtin and then its argument prototype would still apply.  */
2836 char crypt();
2837
2838 int main() {
2839 crypt()
2840 ; return 0; }
2841 EOF
2842 if { (eval echo configure:2843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2843   rm -rf conftest*
2844   eval "ac_cv_lib_$ac_lib_var=yes"
2845 else
2846   echo "configure: failed program was:" >&5
2847   cat conftest.$ac_ext >&5
2848   rm -rf conftest*
2849   eval "ac_cv_lib_$ac_lib_var=no"
2850 fi
2851 rm -f conftest*
2852 LIBS="$ac_save_LIBS"
2853
2854 fi
2855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2856   echo "$ac_t""yes" 1>&6
2857   LIBS="$LIBS -lcrypt";
2858         cat >> confdefs.h <<\EOF
2859 #define HAVE_CRYPT 1
2860 EOF
2861
2862 else
2863   echo "$ac_t""no" 1>&6
2864 fi
2865
2866 fi
2867
2868
2869 ###############################################
2870 # test for where we get pam_authenticate() from
2871 # might need libdl for this to work
2872 if test "$ac_cv_header_security_pam_appl_h" = "yes"; then
2873   echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
2874 echo "configure:2875: checking for main in -ldl" >&5
2875 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
2876 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2877   echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879   ac_save_LIBS="$LIBS"
2880 LIBS="-ldl  $LIBS"
2881 cat > conftest.$ac_ext <<EOF
2882 #line 2883 "configure"
2883 #include "confdefs.h"
2884
2885 int main() {
2886 main()
2887 ; return 0; }
2888 EOF
2889 if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2890   rm -rf conftest*
2891   eval "ac_cv_lib_$ac_lib_var=yes"
2892 else
2893   echo "configure: failed program was:" >&5
2894   cat conftest.$ac_ext >&5
2895   rm -rf conftest*
2896   eval "ac_cv_lib_$ac_lib_var=no"
2897 fi
2898 rm -f conftest*
2899 LIBS="$ac_save_LIBS"
2900
2901 fi
2902 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2903   echo "$ac_t""yes" 1>&6
2904     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2905     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2906   cat >> confdefs.h <<EOF
2907 #define $ac_tr_lib 1
2908 EOF
2909
2910   LIBS="-ldl $LIBS"
2911
2912 else
2913   echo "$ac_t""no" 1>&6
2914 fi
2915
2916 fi
2917 for ac_func in pam_authenticate
2918 do
2919 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2920 echo "configure:2921: checking for $ac_func" >&5
2921 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2922   echo $ac_n "(cached) $ac_c" 1>&6
2923 else
2924   cat > conftest.$ac_ext <<EOF
2925 #line 2926 "configure"
2926 #include "confdefs.h"
2927 /* System header to define __stub macros and hopefully few prototypes,
2928     which can conflict with char $ac_func(); below.  */
2929 #include <assert.h>
2930 /* Override any gcc2 internal prototype to avoid an error.  */
2931 /* We use char because int might match the return type of a gcc2
2932     builtin and then its argument prototype would still apply.  */
2933 char $ac_func();
2934
2935 int main() {
2936
2937 /* The GNU C library defines this for functions which it implements
2938     to always fail with ENOSYS.  Some functions are actually named
2939     something starting with __ and the normal name is an alias.  */
2940 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2941 choke me
2942 #else
2943 $ac_func();
2944 #endif
2945
2946 ; return 0; }
2947 EOF
2948 if { (eval echo configure:2949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2949   rm -rf conftest*
2950   eval "ac_cv_func_$ac_func=yes"
2951 else
2952   echo "configure: failed program was:" >&5
2953   cat conftest.$ac_ext >&5
2954   rm -rf conftest*
2955   eval "ac_cv_func_$ac_func=no"
2956 fi
2957 rm -f conftest*
2958 fi
2959
2960 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2961   echo "$ac_t""yes" 1>&6
2962     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2963   cat >> confdefs.h <<EOF
2964 #define $ac_tr_func 1
2965 EOF
2966  
2967 else
2968   echo "$ac_t""no" 1>&6
2969 fi
2970 done
2971
2972 if test x"$ac_cv_func_pam_authenticate" = x"no"; then
2973     echo $ac_n "checking for pam_authenticate in -lpam""... $ac_c" 1>&6
2974 echo "configure:2975: checking for pam_authenticate in -lpam" >&5
2975 ac_lib_var=`echo pam'_'pam_authenticate | sed 'y%./+-%__p_%'`
2976 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2977   echo $ac_n "(cached) $ac_c" 1>&6
2978 else
2979   ac_save_LIBS="$LIBS"
2980 LIBS="-lpam  $LIBS"
2981 cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2984 /* Override any gcc2 internal prototype to avoid an error.  */
2985 /* We use char because int might match the return type of a gcc2
2986     builtin and then its argument prototype would still apply.  */
2987 char pam_authenticate();
2988
2989 int main() {
2990 pam_authenticate()
2991 ; return 0; }
2992 EOF
2993 if { (eval echo configure:2994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2994   rm -rf conftest*
2995   eval "ac_cv_lib_$ac_lib_var=yes"
2996 else
2997   echo "configure: failed program was:" >&5
2998   cat conftest.$ac_ext >&5
2999   rm -rf conftest*
3000   eval "ac_cv_lib_$ac_lib_var=no"
3001 fi
3002 rm -f conftest*
3003 LIBS="$ac_save_LIBS"
3004
3005 fi
3006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3007   echo "$ac_t""yes" 1>&6
3008   LIBS="$LIBS -lpam"
3009         cat >> confdefs.h <<\EOF
3010 #define HAVE_PAM_AUTHENTICATE 1
3011 EOF
3012
3013 else
3014   echo "$ac_t""no" 1>&6
3015 fi
3016
3017 fi
3018
3019
3020 ###############################################
3021 # test for where we get readline() from
3022 if test "$ac_cv_header_readline_h" = "yes" ||
3023    test "$ac_cv_header_readline_readline_h" = "yes"; then
3024   echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
3025 echo "configure:3026: checking for readline in -lreadline" >&5
3026 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
3027 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3028   echo $ac_n "(cached) $ac_c" 1>&6
3029 else
3030   ac_save_LIBS="$LIBS"
3031 LIBS="-lreadline  $LIBS"
3032 cat > conftest.$ac_ext <<EOF
3033 #line 3034 "configure"
3034 #include "confdefs.h"
3035 /* Override any gcc2 internal prototype to avoid an error.  */
3036 /* We use char because int might match the return type of a gcc2
3037     builtin and then its argument prototype would still apply.  */
3038 char readline();
3039
3040 int main() {
3041 readline()
3042 ; return 0; }
3043 EOF
3044 if { (eval echo configure:3045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3045   rm -rf conftest*
3046   eval "ac_cv_lib_$ac_lib_var=yes"
3047 else
3048   echo "configure: failed program was:" >&5
3049   cat conftest.$ac_ext >&5
3050   rm -rf conftest*
3051   eval "ac_cv_lib_$ac_lib_var=no"
3052 fi
3053 rm -f conftest*
3054 LIBS="$ac_save_LIBS"
3055
3056 fi
3057 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3058   echo "$ac_t""yes" 1>&6
3059     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3060     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3061   cat >> confdefs.h <<EOF
3062 #define $ac_tr_lib 1
3063 EOF
3064
3065   LIBS="-lreadline $LIBS"
3066
3067 else
3068   echo "$ac_t""no" 1>&6
3069 fi
3070
3071 fi
3072
3073
3074 # The following test taken from the cvs sources
3075 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
3076 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
3077 # libsocket.so which has a bad implementation of gethostbyname (it
3078 # only looks in /etc/hosts), so we only look for -lsocket if we need
3079 # it.
3080 for ac_func in connect
3081 do
3082 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3083 echo "configure:3084: checking for $ac_func" >&5
3084 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3085   echo $ac_n "(cached) $ac_c" 1>&6
3086 else
3087   cat > conftest.$ac_ext <<EOF
3088 #line 3089 "configure"
3089 #include "confdefs.h"
3090 /* System header to define __stub macros and hopefully few prototypes,
3091     which can conflict with char $ac_func(); below.  */
3092 #include <assert.h>
3093 /* Override any gcc2 internal prototype to avoid an error.  */
3094 /* We use char because int might match the return type of a gcc2
3095     builtin and then its argument prototype would still apply.  */
3096 char $ac_func();
3097
3098 int main() {
3099
3100 /* The GNU C library defines this for functions which it implements
3101     to always fail with ENOSYS.  Some functions are actually named
3102     something starting with __ and the normal name is an alias.  */
3103 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3104 choke me
3105 #else
3106 $ac_func();
3107 #endif
3108
3109 ; return 0; }
3110 EOF
3111 if { (eval echo configure:3112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3112   rm -rf conftest*
3113   eval "ac_cv_func_$ac_func=yes"
3114 else
3115   echo "configure: failed program was:" >&5
3116   cat conftest.$ac_ext >&5
3117   rm -rf conftest*
3118   eval "ac_cv_func_$ac_func=no"
3119 fi
3120 rm -f conftest*
3121 fi
3122
3123 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3124   echo "$ac_t""yes" 1>&6
3125     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3126   cat >> confdefs.h <<EOF
3127 #define $ac_tr_func 1
3128 EOF
3129  
3130 else
3131   echo "$ac_t""no" 1>&6
3132 fi
3133 done
3134
3135 if test x"$ac_cv_func_connect" = x"no"; then
3136     case "$LIBS" in
3137     *-lnsl*) ;;
3138     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
3139 echo "configure:3140: checking for printf in -lnsl_s" >&5
3140 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
3141 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3142   echo $ac_n "(cached) $ac_c" 1>&6
3143 else
3144   ac_save_LIBS="$LIBS"
3145 LIBS="-lnsl_s  $LIBS"
3146 cat > conftest.$ac_ext <<EOF
3147 #line 3148 "configure"
3148 #include "confdefs.h"
3149 /* Override any gcc2 internal prototype to avoid an error.  */
3150 /* We use char because int might match the return type of a gcc2
3151     builtin and then its argument prototype would still apply.  */
3152 char printf();
3153
3154 int main() {
3155 printf()
3156 ; return 0; }
3157 EOF
3158 if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3159   rm -rf conftest*
3160   eval "ac_cv_lib_$ac_lib_var=yes"
3161 else
3162   echo "configure: failed program was:" >&5
3163   cat conftest.$ac_ext >&5
3164   rm -rf conftest*
3165   eval "ac_cv_lib_$ac_lib_var=no"
3166 fi
3167 rm -f conftest*
3168 LIBS="$ac_save_LIBS"
3169
3170 fi
3171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3172   echo "$ac_t""yes" 1>&6
3173     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3174     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3175   cat >> confdefs.h <<EOF
3176 #define $ac_tr_lib 1
3177 EOF
3178
3179   LIBS="-lnsl_s $LIBS"
3180
3181 else
3182   echo "$ac_t""no" 1>&6
3183 fi
3184  ;;
3185     esac
3186     case "$LIBS" in
3187     *-lnsl*) ;;
3188     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
3189 echo "configure:3190: checking for printf in -lnsl" >&5
3190 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
3191 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3192   echo $ac_n "(cached) $ac_c" 1>&6
3193 else
3194   ac_save_LIBS="$LIBS"
3195 LIBS="-lnsl  $LIBS"
3196 cat > conftest.$ac_ext <<EOF
3197 #line 3198 "configure"
3198 #include "confdefs.h"
3199 /* Override any gcc2 internal prototype to avoid an error.  */
3200 /* We use char because int might match the return type of a gcc2
3201     builtin and then its argument prototype would still apply.  */
3202 char printf();
3203
3204 int main() {
3205 printf()
3206 ; return 0; }
3207 EOF
3208 if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3209   rm -rf conftest*
3210   eval "ac_cv_lib_$ac_lib_var=yes"
3211 else
3212   echo "configure: failed program was:" >&5
3213   cat conftest.$ac_ext >&5
3214   rm -rf conftest*
3215   eval "ac_cv_lib_$ac_lib_var=no"
3216 fi
3217 rm -f conftest*
3218 LIBS="$ac_save_LIBS"
3219
3220 fi
3221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3222   echo "$ac_t""yes" 1>&6
3223     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3224     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3225   cat >> confdefs.h <<EOF
3226 #define $ac_tr_lib 1
3227 EOF
3228
3229   LIBS="-lnsl $LIBS"
3230
3231 else
3232   echo "$ac_t""no" 1>&6
3233 fi
3234  ;;
3235     esac
3236     case "$LIBS" in
3237     *-lsocket*) ;;
3238     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3239 echo "configure:3240: checking for connect in -lsocket" >&5
3240 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3241 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3242   echo $ac_n "(cached) $ac_c" 1>&6
3243 else
3244   ac_save_LIBS="$LIBS"
3245 LIBS="-lsocket  $LIBS"
3246 cat > conftest.$ac_ext <<EOF
3247 #line 3248 "configure"
3248 #include "confdefs.h"
3249 /* Override any gcc2 internal prototype to avoid an error.  */
3250 /* We use char because int might match the return type of a gcc2
3251     builtin and then its argument prototype would still apply.  */
3252 char connect();
3253
3254 int main() {
3255 connect()
3256 ; return 0; }
3257 EOF
3258 if { (eval echo configure:3259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3259   rm -rf conftest*
3260   eval "ac_cv_lib_$ac_lib_var=yes"
3261 else
3262   echo "configure: failed program was:" >&5
3263   cat conftest.$ac_ext >&5
3264   rm -rf conftest*
3265   eval "ac_cv_lib_$ac_lib_var=no"
3266 fi
3267 rm -f conftest*
3268 LIBS="$ac_save_LIBS"
3269
3270 fi
3271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3272   echo "$ac_t""yes" 1>&6
3273     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3274     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3275   cat >> confdefs.h <<EOF
3276 #define $ac_tr_lib 1
3277 EOF
3278
3279   LIBS="-lsocket $LIBS"
3280
3281 else
3282   echo "$ac_t""no" 1>&6
3283 fi
3284  ;;
3285     esac
3286     case "$LIBS" in
3287     *-linet*) ;;
3288     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
3289 echo "configure:3290: checking for connect in -linet" >&5
3290 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
3291 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3292   echo $ac_n "(cached) $ac_c" 1>&6
3293 else
3294   ac_save_LIBS="$LIBS"
3295 LIBS="-linet  $LIBS"
3296 cat > conftest.$ac_ext <<EOF
3297 #line 3298 "configure"
3298 #include "confdefs.h"
3299 /* Override any gcc2 internal prototype to avoid an error.  */
3300 /* We use char because int might match the return type of a gcc2
3301     builtin and then its argument prototype would still apply.  */
3302 char connect();
3303
3304 int main() {
3305 connect()
3306 ; return 0; }
3307 EOF
3308 if { (eval echo configure:3309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3309   rm -rf conftest*
3310   eval "ac_cv_lib_$ac_lib_var=yes"
3311 else
3312   echo "configure: failed program was:" >&5
3313   cat conftest.$ac_ext >&5
3314   rm -rf conftest*
3315   eval "ac_cv_lib_$ac_lib_var=no"
3316 fi
3317 rm -f conftest*
3318 LIBS="$ac_save_LIBS"
3319
3320 fi
3321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3322   echo "$ac_t""yes" 1>&6
3323     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3324     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3325   cat >> confdefs.h <<EOF
3326 #define $ac_tr_lib 1
3327 EOF
3328
3329   LIBS="-linet $LIBS"
3330
3331 else
3332   echo "$ac_t""no" 1>&6
3333 fi
3334  ;;
3335     esac
3336             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
3337        test x"$ac_cv_lib_inet_connect" = x"yes"; then
3338         # ac_cv_func_connect=yes
3339         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
3340         cat >> confdefs.h <<\EOF
3341 #define HAVE_CONNECT 1
3342 EOF
3343
3344     fi
3345 fi
3346
3347
3348 for ac_func in waitpid getcwd strdup strerror chown chmod chroot
3349 do
3350 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3351 echo "configure:3352: checking for $ac_func" >&5
3352 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3353   echo $ac_n "(cached) $ac_c" 1>&6
3354 else
3355   cat > conftest.$ac_ext <<EOF
3356 #line 3357 "configure"
3357 #include "confdefs.h"
3358 /* System header to define __stub macros and hopefully few prototypes,
3359     which can conflict with char $ac_func(); below.  */
3360 #include <assert.h>
3361 /* Override any gcc2 internal prototype to avoid an error.  */
3362 /* We use char because int might match the return type of a gcc2
3363     builtin and then its argument prototype would still apply.  */
3364 char $ac_func();
3365
3366 int main() {
3367
3368 /* The GNU C library defines this for functions which it implements
3369     to always fail with ENOSYS.  Some functions are actually named
3370     something starting with __ and the normal name is an alias.  */
3371 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3372 choke me
3373 #else
3374 $ac_func();
3375 #endif
3376
3377 ; return 0; }
3378 EOF
3379 if { (eval echo configure:3380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3380   rm -rf conftest*
3381   eval "ac_cv_func_$ac_func=yes"
3382 else
3383   echo "configure: failed program was:" >&5
3384   cat conftest.$ac_ext >&5
3385   rm -rf conftest*
3386   eval "ac_cv_func_$ac_func=no"
3387 fi
3388 rm -f conftest*
3389 fi
3390
3391 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3392   echo "$ac_t""yes" 1>&6
3393     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3394   cat >> confdefs.h <<EOF
3395 #define $ac_tr_func 1
3396 EOF
3397  
3398 else
3399   echo "$ac_t""no" 1>&6
3400 fi
3401 done
3402
3403 for ac_func in fstat strchr utime utimes getrlimit fsync execl bzero memset
3404 do
3405 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3406 echo "configure:3407: checking for $ac_func" >&5
3407 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 /* System header to define __stub macros and hopefully few prototypes,
3414     which can conflict with char $ac_func(); below.  */
3415 #include <assert.h>
3416 /* Override any gcc2 internal prototype to avoid an error.  */
3417 /* We use char because int might match the return type of a gcc2
3418     builtin and then its argument prototype would still apply.  */
3419 char $ac_func();
3420
3421 int main() {
3422
3423 /* The GNU C library defines this for functions which it implements
3424     to always fail with ENOSYS.  Some functions are actually named
3425     something starting with __ and the normal name is an alias.  */
3426 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3427 choke me
3428 #else
3429 $ac_func();
3430 #endif
3431
3432 ; return 0; }
3433 EOF
3434 if { (eval echo configure:3435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3435   rm -rf conftest*
3436   eval "ac_cv_func_$ac_func=yes"
3437 else
3438   echo "configure: failed program was:" >&5
3439   cat conftest.$ac_ext >&5
3440   rm -rf conftest*
3441   eval "ac_cv_func_$ac_func=no"
3442 fi
3443 rm -f conftest*
3444 fi
3445
3446 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3447   echo "$ac_t""yes" 1>&6
3448     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3449   cat >> confdefs.h <<EOF
3450 #define $ac_tr_func 1
3451 EOF
3452  
3453 else
3454   echo "$ac_t""no" 1>&6
3455 fi
3456 done
3457
3458 for ac_func in memmove vsnprintf setsid glob strpbrk pipe crypt16 getauthuid
3459 do
3460 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3461 echo "configure:3462: checking for $ac_func" >&5
3462 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3463   echo $ac_n "(cached) $ac_c" 1>&6
3464 else
3465   cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468 /* System header to define __stub macros and hopefully few prototypes,
3469     which can conflict with char $ac_func(); below.  */
3470 #include <assert.h>
3471 /* Override any gcc2 internal prototype to avoid an error.  */
3472 /* We use char because int might match the return type of a gcc2
3473     builtin and then its argument prototype would still apply.  */
3474 char $ac_func();
3475
3476 int main() {
3477
3478 /* The GNU C library defines this for functions which it implements
3479     to always fail with ENOSYS.  Some functions are actually named
3480     something starting with __ and the normal name is an alias.  */
3481 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3482 choke me
3483 #else
3484 $ac_func();
3485 #endif
3486
3487 ; return 0; }
3488 EOF
3489 if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3490   rm -rf conftest*
3491   eval "ac_cv_func_$ac_func=yes"
3492 else
3493   echo "configure: failed program was:" >&5
3494   cat conftest.$ac_ext >&5
3495   rm -rf conftest*
3496   eval "ac_cv_func_$ac_func=no"
3497 fi
3498 rm -f conftest*
3499 fi
3500
3501 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3502   echo "$ac_t""yes" 1>&6
3503     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3504   cat >> confdefs.h <<EOF
3505 #define $ac_tr_func 1
3506 EOF
3507  
3508 else
3509   echo "$ac_t""no" 1>&6
3510 fi
3511 done
3512
3513 for ac_func in strftime sigprocmask sigblock sigaction innetgr
3514 do
3515 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3516 echo "configure:3517: checking for $ac_func" >&5
3517 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3518   echo $ac_n "(cached) $ac_c" 1>&6
3519 else
3520   cat > conftest.$ac_ext <<EOF
3521 #line 3522 "configure"
3522 #include "confdefs.h"
3523 /* System header to define __stub macros and hopefully few prototypes,
3524     which can conflict with char $ac_func(); below.  */
3525 #include <assert.h>
3526 /* Override any gcc2 internal prototype to avoid an error.  */
3527 /* We use char because int might match the return type of a gcc2
3528     builtin and then its argument prototype would still apply.  */
3529 char $ac_func();
3530
3531 int main() {
3532
3533 /* The GNU C library defines this for functions which it implements
3534     to always fail with ENOSYS.  Some functions are actually named
3535     something starting with __ and the normal name is an alias.  */
3536 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3537 choke me
3538 #else
3539 $ac_func();
3540 #endif
3541
3542 ; return 0; }
3543 EOF
3544 if { (eval echo configure:3545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3545   rm -rf conftest*
3546   eval "ac_cv_func_$ac_func=yes"
3547 else
3548   echo "configure: failed program was:" >&5
3549   cat conftest.$ac_ext >&5
3550   rm -rf conftest*
3551   eval "ac_cv_func_$ac_func=no"
3552 fi
3553 rm -f conftest*
3554 fi
3555
3556 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3557   echo "$ac_t""yes" 1>&6
3558     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3559   cat >> confdefs.h <<EOF
3560 #define $ac_tr_func 1
3561 EOF
3562  
3563 else
3564   echo "$ac_t""no" 1>&6
3565 fi
3566 done
3567
3568 for ac_func in initgroups select rdchk getgrnam pathconf putprpwnam
3569 do
3570 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3571 echo "configure:3572: checking for $ac_func" >&5
3572 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3573   echo $ac_n "(cached) $ac_c" 1>&6
3574 else
3575   cat > conftest.$ac_ext <<EOF
3576 #line 3577 "configure"
3577 #include "confdefs.h"
3578 /* System header to define __stub macros and hopefully few prototypes,
3579     which can conflict with char $ac_func(); below.  */
3580 #include <assert.h>
3581 /* Override any gcc2 internal prototype to avoid an error.  */
3582 /* We use char because int might match the return type of a gcc2
3583     builtin and then its argument prototype would still apply.  */
3584 char $ac_func();
3585
3586 int main() {
3587
3588 /* The GNU C library defines this for functions which it implements
3589     to always fail with ENOSYS.  Some functions are actually named
3590     something starting with __ and the normal name is an alias.  */
3591 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3592 choke me
3593 #else
3594 $ac_func();
3595 #endif
3596
3597 ; return 0; }
3598 EOF
3599 if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3600   rm -rf conftest*
3601   eval "ac_cv_func_$ac_func=yes"
3602 else
3603   echo "configure: failed program was:" >&5
3604   cat conftest.$ac_ext >&5
3605   rm -rf conftest*
3606   eval "ac_cv_func_$ac_func=no"
3607 fi
3608 rm -f conftest*
3609 fi
3610
3611 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3612   echo "$ac_t""yes" 1>&6
3613     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3614   cat >> confdefs.h <<EOF
3615 #define $ac_tr_func 1
3616 EOF
3617  
3618 else
3619   echo "$ac_t""no" 1>&6
3620 fi
3621 done
3622
3623 for ac_func in setuidx setgroups mktime rename ftruncate stat64 fstat64 lstat64
3624 do
3625 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3626 echo "configure:3627: checking for $ac_func" >&5
3627 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3628   echo $ac_n "(cached) $ac_c" 1>&6
3629 else
3630   cat > conftest.$ac_ext <<EOF
3631 #line 3632 "configure"
3632 #include "confdefs.h"
3633 /* System header to define __stub macros and hopefully few prototypes,
3634     which can conflict with char $ac_func(); below.  */
3635 #include <assert.h>
3636 /* Override any gcc2 internal prototype to avoid an error.  */
3637 /* We use char because int might match the return type of a gcc2
3638     builtin and then its argument prototype would still apply.  */
3639 char $ac_func();
3640
3641 int main() {
3642
3643 /* The GNU C library defines this for functions which it implements
3644     to always fail with ENOSYS.  Some functions are actually named
3645     something starting with __ and the normal name is an alias.  */
3646 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3647 choke me
3648 #else
3649 $ac_func();
3650 #endif
3651
3652 ; return 0; }
3653 EOF
3654 if { (eval echo configure:3655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3655   rm -rf conftest*
3656   eval "ac_cv_func_$ac_func=yes"
3657 else
3658   echo "configure: failed program was:" >&5
3659   cat conftest.$ac_ext >&5
3660   rm -rf conftest*
3661   eval "ac_cv_func_$ac_func=no"
3662 fi
3663 rm -f conftest*
3664 fi
3665
3666 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3667   echo "$ac_t""yes" 1>&6
3668     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3669   cat >> confdefs.h <<EOF
3670 #define $ac_tr_func 1
3671 EOF
3672  
3673 else
3674   echo "$ac_t""no" 1>&6
3675 fi
3676 done
3677
3678 for ac_func in set_auth_parameters atexit grantpt getspnam dup2 lseek64 ftruncate64
3679 do
3680 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3681 echo "configure:3682: checking for $ac_func" >&5
3682 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3683   echo $ac_n "(cached) $ac_c" 1>&6
3684 else
3685   cat > conftest.$ac_ext <<EOF
3686 #line 3687 "configure"
3687 #include "confdefs.h"
3688 /* System header to define __stub macros and hopefully few prototypes,
3689     which can conflict with char $ac_func(); below.  */
3690 #include <assert.h>
3691 /* Override any gcc2 internal prototype to avoid an error.  */
3692 /* We use char because int might match the return type of a gcc2
3693     builtin and then its argument prototype would still apply.  */
3694 char $ac_func();
3695
3696 int main() {
3697
3698 /* The GNU C library defines this for functions which it implements
3699     to always fail with ENOSYS.  Some functions are actually named
3700     something starting with __ and the normal name is an alias.  */
3701 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3702 choke me
3703 #else
3704 $ac_func();
3705 #endif
3706
3707 ; return 0; }
3708 EOF
3709 if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3710   rm -rf conftest*
3711   eval "ac_cv_func_$ac_func=yes"
3712 else
3713   echo "configure: failed program was:" >&5
3714   cat conftest.$ac_ext >&5
3715   rm -rf conftest*
3716   eval "ac_cv_func_$ac_func=no"
3717 fi
3718 rm -f conftest*
3719 fi
3720
3721 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3722   echo "$ac_t""yes" 1>&6
3723     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3724   cat >> confdefs.h <<EOF
3725 #define $ac_tr_func 1
3726 EOF
3727  
3728 else
3729   echo "$ac_t""no" 1>&6
3730 fi
3731 done
3732
3733 for ac_func in fseek64 ftell64 bigcrypt getprpwnam setluid yp_get_default_domain getpwanam
3734 do
3735 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3736 echo "configure:3737: checking for $ac_func" >&5
3737 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3738   echo $ac_n "(cached) $ac_c" 1>&6
3739 else
3740   cat > conftest.$ac_ext <<EOF
3741 #line 3742 "configure"
3742 #include "confdefs.h"
3743 /* System header to define __stub macros and hopefully few prototypes,
3744     which can conflict with char $ac_func(); below.  */
3745 #include <assert.h>
3746 /* Override any gcc2 internal prototype to avoid an error.  */
3747 /* We use char because int might match the return type of a gcc2
3748     builtin and then its argument prototype would still apply.  */
3749 char $ac_func();
3750
3751 int main() {
3752
3753 /* The GNU C library defines this for functions which it implements
3754     to always fail with ENOSYS.  Some functions are actually named
3755     something starting with __ and the normal name is an alias.  */
3756 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3757 choke me
3758 #else
3759 $ac_func();
3760 #endif
3761
3762 ; return 0; }
3763 EOF
3764 if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3765   rm -rf conftest*
3766   eval "ac_cv_func_$ac_func=yes"
3767 else
3768   echo "configure: failed program was:" >&5
3769   cat conftest.$ac_ext >&5
3770   rm -rf conftest*
3771   eval "ac_cv_func_$ac_func=no"
3772 fi
3773 rm -f conftest*
3774 fi
3775
3776 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3777   echo "$ac_t""yes" 1>&6
3778     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3779   cat >> confdefs.h <<EOF
3780 #define $ac_tr_func 1
3781 EOF
3782  
3783 else
3784   echo "$ac_t""no" 1>&6
3785 fi
3786 done
3787
3788 for ac_func in srandom random srand rand
3789 do
3790 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3791 echo "configure:3792: checking for $ac_func" >&5
3792 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3793   echo $ac_n "(cached) $ac_c" 1>&6
3794 else
3795   cat > conftest.$ac_ext <<EOF
3796 #line 3797 "configure"
3797 #include "confdefs.h"
3798 /* System header to define __stub macros and hopefully few prototypes,
3799     which can conflict with char $ac_func(); below.  */
3800 #include <assert.h>
3801 /* Override any gcc2 internal prototype to avoid an error.  */
3802 /* We use char because int might match the return type of a gcc2
3803     builtin and then its argument prototype would still apply.  */
3804 char $ac_func();
3805
3806 int main() {
3807
3808 /* The GNU C library defines this for functions which it implements
3809     to always fail with ENOSYS.  Some functions are actually named
3810     something starting with __ and the normal name is an alias.  */
3811 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3812 choke me
3813 #else
3814 $ac_func();
3815 #endif
3816
3817 ; return 0; }
3818 EOF
3819 if { (eval echo configure:3820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3820   rm -rf conftest*
3821   eval "ac_cv_func_$ac_func=yes"
3822 else
3823   echo "configure: failed program was:" >&5
3824   cat conftest.$ac_ext >&5
3825   rm -rf conftest*
3826   eval "ac_cv_func_$ac_func=no"
3827 fi
3828 rm -f conftest*
3829 fi
3830
3831 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3832   echo "$ac_t""yes" 1>&6
3833     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3834   cat >> confdefs.h <<EOF
3835 #define $ac_tr_func 1
3836 EOF
3837  
3838 else
3839   echo "$ac_t""no" 1>&6
3840 fi
3841 done
3842
3843
3844 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
3845 do
3846 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3847 echo "configure:3848: checking for $ac_func" >&5
3848 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3849   echo $ac_n "(cached) $ac_c" 1>&6
3850 else
3851   cat > conftest.$ac_ext <<EOF
3852 #line 3853 "configure"
3853 #include "confdefs.h"
3854 /* System header to define __stub macros and hopefully few prototypes,
3855     which can conflict with char $ac_func(); below.  */
3856 #include <assert.h>
3857 /* Override any gcc2 internal prototype to avoid an error.  */
3858 /* We use char because int might match the return type of a gcc2
3859     builtin and then its argument prototype would still apply.  */
3860 char $ac_func();
3861
3862 int main() {
3863
3864 /* The GNU C library defines this for functions which it implements
3865     to always fail with ENOSYS.  Some functions are actually named
3866     something starting with __ and the normal name is an alias.  */
3867 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3868 choke me
3869 #else
3870 $ac_func();
3871 #endif
3872
3873 ; return 0; }
3874 EOF
3875 if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3876   rm -rf conftest*
3877   eval "ac_cv_func_$ac_func=yes"
3878 else
3879   echo "configure: failed program was:" >&5
3880   cat conftest.$ac_ext >&5
3881   rm -rf conftest*
3882   eval "ac_cv_func_$ac_func=no"
3883 fi
3884 rm -f conftest*
3885 fi
3886
3887 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3888   echo "$ac_t""yes" 1>&6
3889     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3890   cat >> confdefs.h <<EOF
3891 #define $ac_tr_func 1
3892 EOF
3893  
3894 else
3895   echo "$ac_t""no" 1>&6
3896 fi
3897 done
3898
3899 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
3900 do
3901 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3902 echo "configure:3903: checking for $ac_func" >&5
3903 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3904   echo $ac_n "(cached) $ac_c" 1>&6
3905 else
3906   cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909 /* System header to define __stub macros and hopefully few prototypes,
3910     which can conflict with char $ac_func(); below.  */
3911 #include <assert.h>
3912 /* Override any gcc2 internal prototype to avoid an error.  */
3913 /* We use char because int might match the return type of a gcc2
3914     builtin and then its argument prototype would still apply.  */
3915 char $ac_func();
3916
3917 int main() {
3918
3919 /* The GNU C library defines this for functions which it implements
3920     to always fail with ENOSYS.  Some functions are actually named
3921     something starting with __ and the normal name is an alias.  */
3922 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3923 choke me
3924 #else
3925 $ac_func();
3926 #endif
3927
3928 ; return 0; }
3929 EOF
3930 if { (eval echo configure:3931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3931   rm -rf conftest*
3932   eval "ac_cv_func_$ac_func=yes"
3933 else
3934   echo "configure: failed program was:" >&5
3935   cat conftest.$ac_ext >&5
3936   rm -rf conftest*
3937   eval "ac_cv_func_$ac_func=no"
3938 fi
3939 rm -f conftest*
3940 fi
3941
3942 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3943   echo "$ac_t""yes" 1>&6
3944     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3945   cat >> confdefs.h <<EOF
3946 #define $ac_tr_func 1
3947 EOF
3948  
3949 else
3950   echo "$ac_t""no" 1>&6
3951 fi
3952 done
3953
3954 for ac_func in __getcwd _getcwd
3955 do
3956 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3957 echo "configure:3958: checking for $ac_func" >&5
3958 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3959   echo $ac_n "(cached) $ac_c" 1>&6
3960 else
3961   cat > conftest.$ac_ext <<EOF
3962 #line 3963 "configure"
3963 #include "confdefs.h"
3964 /* System header to define __stub macros and hopefully few prototypes,
3965     which can conflict with char $ac_func(); below.  */
3966 #include <assert.h>
3967 /* Override any gcc2 internal prototype to avoid an error.  */
3968 /* We use char because int might match the return type of a gcc2
3969     builtin and then its argument prototype would still apply.  */
3970 char $ac_func();
3971
3972 int main() {
3973
3974 /* The GNU C library defines this for functions which it implements
3975     to always fail with ENOSYS.  Some functions are actually named
3976     something starting with __ and the normal name is an alias.  */
3977 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3978 choke me
3979 #else
3980 $ac_func();
3981 #endif
3982
3983 ; return 0; }
3984 EOF
3985 if { (eval echo configure:3986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3986   rm -rf conftest*
3987   eval "ac_cv_func_$ac_func=yes"
3988 else
3989   echo "configure: failed program was:" >&5
3990   cat conftest.$ac_ext >&5
3991   rm -rf conftest*
3992   eval "ac_cv_func_$ac_func=no"
3993 fi
3994 rm -f conftest*
3995 fi
3996
3997 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3998   echo "$ac_t""yes" 1>&6
3999     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4000   cat >> confdefs.h <<EOF
4001 #define $ac_tr_func 1
4002 EOF
4003  
4004 else
4005   echo "$ac_t""no" 1>&6
4006 fi
4007 done
4008
4009 for ac_func in __xstat __fxstat __lxstat
4010 do
4011 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4012 echo "configure:4013: checking for $ac_func" >&5
4013 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4014   echo $ac_n "(cached) $ac_c" 1>&6
4015 else
4016   cat > conftest.$ac_ext <<EOF
4017 #line 4018 "configure"
4018 #include "confdefs.h"
4019 /* System header to define __stub macros and hopefully few prototypes,
4020     which can conflict with char $ac_func(); below.  */
4021 #include <assert.h>
4022 /* Override any gcc2 internal prototype to avoid an error.  */
4023 /* We use char because int might match the return type of a gcc2
4024     builtin and then its argument prototype would still apply.  */
4025 char $ac_func();
4026
4027 int main() {
4028
4029 /* The GNU C library defines this for functions which it implements
4030     to always fail with ENOSYS.  Some functions are actually named
4031     something starting with __ and the normal name is an alias.  */
4032 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4033 choke me
4034 #else
4035 $ac_func();
4036 #endif
4037
4038 ; return 0; }
4039 EOF
4040 if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4041   rm -rf conftest*
4042   eval "ac_cv_func_$ac_func=yes"
4043 else
4044   echo "configure: failed program was:" >&5
4045   cat conftest.$ac_ext >&5
4046   rm -rf conftest*
4047   eval "ac_cv_func_$ac_func=no"
4048 fi
4049 rm -f conftest*
4050 fi
4051
4052 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4053   echo "$ac_t""yes" 1>&6
4054     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4055   cat >> confdefs.h <<EOF
4056 #define $ac_tr_func 1
4057 EOF
4058  
4059 else
4060   echo "$ac_t""no" 1>&6
4061 fi
4062 done
4063
4064 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
4065 do
4066 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4067 echo "configure:4068: checking for $ac_func" >&5
4068 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4069   echo $ac_n "(cached) $ac_c" 1>&6
4070 else
4071   cat > conftest.$ac_ext <<EOF
4072 #line 4073 "configure"
4073 #include "confdefs.h"
4074 /* System header to define __stub macros and hopefully few prototypes,
4075     which can conflict with char $ac_func(); below.  */
4076 #include <assert.h>
4077 /* Override any gcc2 internal prototype to avoid an error.  */
4078 /* We use char because int might match the return type of a gcc2
4079     builtin and then its argument prototype would still apply.  */
4080 char $ac_func();
4081
4082 int main() {
4083
4084 /* The GNU C library defines this for functions which it implements
4085     to always fail with ENOSYS.  Some functions are actually named
4086     something starting with __ and the normal name is an alias.  */
4087 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4088 choke me
4089 #else
4090 $ac_func();
4091 #endif
4092
4093 ; return 0; }
4094 EOF
4095 if { (eval echo configure:4096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4096   rm -rf conftest*
4097   eval "ac_cv_func_$ac_func=yes"
4098 else
4099   echo "configure: failed program was:" >&5
4100   cat conftest.$ac_ext >&5
4101   rm -rf conftest*
4102   eval "ac_cv_func_$ac_func=no"
4103 fi
4104 rm -f conftest*
4105 fi
4106
4107 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4108   echo "$ac_t""yes" 1>&6
4109     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4110   cat >> confdefs.h <<EOF
4111 #define $ac_tr_func 1
4112 EOF
4113  
4114 else
4115   echo "$ac_t""no" 1>&6
4116 fi
4117 done
4118
4119
4120 echo $ac_n "checking for long long""... $ac_c" 1>&6
4121 echo "configure:4122: checking for long long" >&5
4122 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
4123   echo $ac_n "(cached) $ac_c" 1>&6
4124 else
4125   
4126 if test "$cross_compiling" = yes; then
4127   samba_cv_have_longlong=cross
4128 else
4129   cat > conftest.$ac_ext <<EOF
4130 #line 4131 "configure"
4131 #include "confdefs.h"
4132 #include <stdio.h>
4133 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
4134 EOF
4135 if { (eval echo configure:4136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4136 then
4137   samba_cv_have_longlong=yes
4138 else
4139   echo "configure: failed program was:" >&5
4140   cat conftest.$ac_ext >&5
4141   rm -fr conftest*
4142   samba_cv_have_longlong=no
4143 fi
4144 rm -fr conftest*
4145 fi
4146
4147 fi
4148
4149 echo "$ac_t""$samba_cv_have_longlong" 1>&6
4150 if test x"$samba_cv_have_longlong" = x"yes"; then
4151     cat >> confdefs.h <<\EOF
4152 #define HAVE_LONGLONG 1
4153 EOF
4154
4155 fi
4156
4157 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
4158 echo "configure:4159: checking for 64 bit off_t" >&5
4159 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
4160   echo $ac_n "(cached) $ac_c" 1>&6
4161 else
4162   
4163 if test "$cross_compiling" = yes; then
4164   samba_cv_SIZEOF_OFF_T=cross
4165 else
4166   cat > conftest.$ac_ext <<EOF
4167 #line 4168 "configure"
4168 #include "confdefs.h"
4169 #include <stdio.h>
4170 #include <sys/stat.h>
4171 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
4172 EOF
4173 if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4174 then
4175   samba_cv_SIZEOF_OFF_T=yes
4176 else
4177   echo "configure: failed program was:" >&5
4178   cat conftest.$ac_ext >&5
4179   rm -fr conftest*
4180   samba_cv_SIZEOF_OFF_T=no
4181 fi
4182 rm -fr conftest*
4183 fi
4184
4185 fi
4186
4187 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
4188 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
4189     cat >> confdefs.h <<\EOF
4190 #define SIZEOF_OFF_T 8
4191 EOF
4192
4193 fi
4194
4195 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
4196 echo "configure:4197: checking for off64_t" >&5
4197 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
4198   echo $ac_n "(cached) $ac_c" 1>&6
4199 else
4200   
4201 if test "$cross_compiling" = yes; then
4202   samba_cv_HAVE_OFF64_T=cross
4203 else
4204   cat > conftest.$ac_ext <<EOF
4205 #line 4206 "configure"
4206 #include "confdefs.h"
4207 #include <stdio.h>
4208 #include <sys/stat.h>
4209 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
4210 EOF
4211 if { (eval echo configure:4212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4212 then
4213   samba_cv_HAVE_OFF64_T=yes
4214 else
4215   echo "configure: failed program was:" >&5
4216   cat conftest.$ac_ext >&5
4217   rm -fr conftest*
4218   samba_cv_HAVE_OFF64_T=no
4219 fi
4220 rm -fr conftest*
4221 fi
4222
4223 fi
4224
4225 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
4226 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
4227     cat >> confdefs.h <<\EOF
4228 #define HAVE_OFF64_T 1
4229 EOF
4230
4231 fi
4232
4233 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
4234 echo "configure:4235: checking for 64 bit ino_t" >&5
4235 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
4236   echo $ac_n "(cached) $ac_c" 1>&6
4237 else
4238   
4239 if test "$cross_compiling" = yes; then
4240   samba_cv_SIZEOF_INO_T=cross
4241 else
4242   cat > conftest.$ac_ext <<EOF
4243 #line 4244 "configure"
4244 #include "confdefs.h"
4245 #include <stdio.h>
4246 #include <sys/stat.h>
4247 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
4248 EOF
4249 if { (eval echo configure:4250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4250 then
4251   samba_cv_SIZEOF_INO_T=yes
4252 else
4253   echo "configure: failed program was:" >&5
4254   cat conftest.$ac_ext >&5
4255   rm -fr conftest*
4256   samba_cv_SIZEOF_INO_T=no
4257 fi
4258 rm -fr conftest*
4259 fi
4260
4261 fi
4262
4263 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
4264 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
4265     cat >> confdefs.h <<\EOF
4266 #define SIZEOF_INO_T 8
4267 EOF
4268
4269 fi
4270
4271 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
4272 echo "configure:4273: checking for ino64_t" >&5
4273 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
4274   echo $ac_n "(cached) $ac_c" 1>&6
4275 else
4276   
4277 if test "$cross_compiling" = yes; then
4278   samba_cv_HAVE_INO64_T=cross
4279 else
4280   cat > conftest.$ac_ext <<EOF
4281 #line 4282 "configure"
4282 #include "confdefs.h"
4283 #include <stdio.h>
4284 #include <sys/stat.h>
4285 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
4286 EOF
4287 if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4288 then
4289   samba_cv_HAVE_INO64_T=yes
4290 else
4291   echo "configure: failed program was:" >&5
4292   cat conftest.$ac_ext >&5
4293   rm -fr conftest*
4294   samba_cv_HAVE_INO64_T=no
4295 fi
4296 rm -fr conftest*
4297 fi
4298
4299 fi
4300
4301 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
4302 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
4303     cat >> confdefs.h <<\EOF
4304 #define HAVE_INO64_T 1
4305 EOF
4306
4307 fi
4308
4309 echo $ac_n "checking for union semun""... $ac_c" 1>&6
4310 echo "configure:4311: checking for union semun" >&5
4311 if eval "test \"`echo '$''{'samba_cv_HAVE_UNION_SEMUN'+set}'`\" = set"; then
4312   echo $ac_n "(cached) $ac_c" 1>&6
4313 else
4314   
4315 if test "$cross_compiling" = yes; then
4316   samba_cv_HAVE_UNION_SEMUN=cross
4317 else
4318   cat > conftest.$ac_ext <<EOF
4319 #line 4320 "configure"
4320 #include "confdefs.h"
4321
4322 #include <sys/types.h>
4323 #include <sys/ipc.h>
4324 #include <sys/sem.h>
4325 main() { union semun ss; exit(0); }
4326 EOF
4327 if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4328 then
4329   samba_cv_HAVE_UNION_SEMUN=yes
4330 else
4331   echo "configure: failed program was:" >&5
4332   cat conftest.$ac_ext >&5
4333   rm -fr conftest*
4334   samba_cv_HAVE_UNION_SEMUN=no
4335 fi
4336 rm -fr conftest*
4337 fi
4338
4339 fi
4340
4341 echo "$ac_t""$samba_cv_HAVE_UNION_SEMUN" 1>&6
4342 if test x"$samba_cv_HAVE_UNION_SEMUN" = x"yes"; then
4343     cat >> confdefs.h <<\EOF
4344 #define HAVE_UNION_SEMUN 1
4345 EOF
4346
4347 fi
4348
4349 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
4350 echo "configure:4351: checking for unsigned char" >&5
4351 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
4352   echo $ac_n "(cached) $ac_c" 1>&6
4353 else
4354   
4355 if test "$cross_compiling" = yes; then
4356   samba_cv_HAVE_UNSIGNED_CHAR=cross
4357 else
4358   cat > conftest.$ac_ext <<EOF
4359 #line 4360 "configure"
4360 #include "confdefs.h"
4361 #include <stdio.h>
4362 main() { char c; c=250; exit((c > 0)?0:1); }
4363 EOF
4364 if { (eval echo configure:4365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4365 then
4366   samba_cv_HAVE_UNSIGNED_CHAR=yes
4367 else
4368   echo "configure: failed program was:" >&5
4369   cat conftest.$ac_ext >&5
4370   rm -fr conftest*
4371   samba_cv_HAVE_UNSIGNED_CHAR=no
4372 fi
4373 rm -fr conftest*
4374 fi
4375
4376 fi
4377
4378 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
4379 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
4380     cat >> confdefs.h <<\EOF
4381 #define HAVE_UNSIGNED_CHAR 1
4382 EOF
4383
4384 fi
4385
4386 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
4387 echo "configure:4388: checking for sin_len in sock" >&5
4388 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
4389   echo $ac_n "(cached) $ac_c" 1>&6
4390 else
4391   
4392 cat > conftest.$ac_ext <<EOF
4393 #line 4394 "configure"
4394 #include "confdefs.h"
4395 #include <sys/types.h>
4396 #include <sys/socket.h>
4397 #include <netinet/in.h>
4398 int main() {
4399 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
4400 ; return 0; }
4401 EOF
4402 if { (eval echo configure:4403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4403   rm -rf conftest*
4404   samba_cv_HAVE_SOCK_SIN_LEN=yes
4405 else
4406   echo "configure: failed program was:" >&5
4407   cat conftest.$ac_ext >&5
4408   rm -rf conftest*
4409   samba_cv_HAVE_SOCK_SIN_LEN=no
4410 fi
4411 rm -f conftest*
4412 fi
4413
4414 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
4415 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
4416     cat >> confdefs.h <<\EOF
4417 #define HAVE_SOCK_SIN_LEN 1
4418 EOF
4419
4420 fi
4421
4422 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
4423 echo "configure:4424: checking for __FILE__ macro" >&5
4424 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
4425   echo $ac_n "(cached) $ac_c" 1>&6
4426 else
4427   
4428 cat > conftest.$ac_ext <<EOF
4429 #line 4430 "configure"
4430 #include "confdefs.h"
4431 #include <stdio.h>
4432 int main() {
4433 printf("%s\n", __FILE__);
4434 ; return 0; }
4435 EOF
4436 if { (eval echo configure:4437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4437   rm -rf conftest*
4438   samba_cv_HAVE_FILE_MACRO=yes
4439 else
4440   echo "configure: failed program was:" >&5
4441   cat conftest.$ac_ext >&5
4442   rm -rf conftest*
4443   samba_cv_HAVE_FILE_MACRO=no
4444 fi
4445 rm -f conftest*
4446 fi
4447
4448 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
4449 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
4450     cat >> confdefs.h <<\EOF
4451 #define HAVE_FILE_MACRO 1
4452 EOF
4453
4454 fi
4455
4456 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
4457 echo "configure:4458: checking for __FUNCTION__ macro" >&5
4458 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
4459   echo $ac_n "(cached) $ac_c" 1>&6
4460 else
4461   
4462 cat > conftest.$ac_ext <<EOF
4463 #line 4464 "configure"
4464 #include "confdefs.h"
4465 #include <stdio.h>
4466 int main() {
4467 printf("%s\n", __FUNCTION__);
4468 ; return 0; }
4469 EOF
4470 if { (eval echo configure:4471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4471   rm -rf conftest*
4472   samba_cv_HAVE_FUNCTION_MACRO=yes
4473 else
4474   echo "configure: failed program was:" >&5
4475   cat conftest.$ac_ext >&5
4476   rm -rf conftest*
4477   samba_cv_HAVE_FUNCTION_MACRO=no
4478 fi
4479 rm -f conftest*
4480 fi
4481
4482 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
4483 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
4484     cat >> confdefs.h <<\EOF
4485 #define HAVE_FUNCTION_MACRO 1
4486 EOF
4487
4488 fi
4489
4490 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
4491 echo "configure:4492: checking if gettimeofday takes tz argument" >&5
4492 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
4493   echo $ac_n "(cached) $ac_c" 1>&6
4494 else
4495   
4496 if test "$cross_compiling" = yes; then
4497   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
4498 else
4499   cat > conftest.$ac_ext <<EOF
4500 #line 4501 "configure"
4501 #include "confdefs.h"
4502
4503 #include <sys/time.h>
4504 #include <unistd.h>
4505 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
4506 EOF
4507 if { (eval echo configure:4508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4508 then
4509   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
4510 else
4511   echo "configure: failed program was:" >&5
4512   cat conftest.$ac_ext >&5
4513   rm -fr conftest*
4514   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
4515 fi
4516 rm -fr conftest*
4517 fi
4518
4519 fi
4520
4521 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
4522 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
4523     cat >> confdefs.h <<\EOF
4524 #define HAVE_GETTIMEOFDAY_TZ 1
4525 EOF
4526
4527 fi
4528
4529
4530 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
4531 echo "configure:4532: checking for broken readdir" >&5
4532 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
4533   echo $ac_n "(cached) $ac_c" 1>&6
4534 else
4535   
4536 if test "$cross_compiling" = yes; then
4537   samba_cv_HAVE_BROKEN_READDIR=cross
4538 else
4539   cat > conftest.$ac_ext <<EOF
4540 #line 4541 "configure"
4541 #include "confdefs.h"
4542 #include <sys/types.h>
4543 #include <dirent.h>
4544 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
4545 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
4546 di->d_name[0] == 0) exit(0); exit(1);} 
4547 EOF
4548 if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4549 then
4550   samba_cv_HAVE_BROKEN_READDIR=yes
4551 else
4552   echo "configure: failed program was:" >&5
4553   cat conftest.$ac_ext >&5
4554   rm -fr conftest*
4555   samba_cv_HAVE_BROKEN_READDIR=no
4556 fi
4557 rm -fr conftest*
4558 fi
4559
4560 fi
4561
4562 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
4563 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
4564     cat >> confdefs.h <<\EOF
4565 #define HAVE_BROKEN_READDIR 1
4566 EOF
4567
4568 fi
4569
4570 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
4571 echo "configure:4572: checking for utimbuf" >&5
4572 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
4573   echo $ac_n "(cached) $ac_c" 1>&6
4574 else
4575   
4576 cat > conftest.$ac_ext <<EOF
4577 #line 4578 "configure"
4578 #include "confdefs.h"
4579 #include <sys/types.h>
4580 #include <utime.h>
4581 int main() {
4582 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
4583 ; return 0; }
4584 EOF
4585 if { (eval echo configure:4586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4586   rm -rf conftest*
4587   samba_cv_HAVE_UTIMBUF=yes
4588 else
4589   echo "configure: failed program was:" >&5
4590   cat conftest.$ac_ext >&5
4591   rm -rf conftest*
4592   samba_cv_HAVE_UTIMBUF=no
4593 fi
4594 rm -f conftest*
4595 fi
4596
4597 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
4598 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
4599     cat >> confdefs.h <<\EOF
4600 #define HAVE_UTIMBUF 1
4601 EOF
4602
4603 fi
4604
4605 echo $ac_n "checking for kernel oplock type definitions""... $ac_c" 1>&6
4606 echo "configure:4607: checking for kernel oplock type definitions" >&5
4607 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS'+set}'`\" = set"; then
4608   echo $ac_n "(cached) $ac_c" 1>&6
4609 else
4610   
4611 cat > conftest.$ac_ext <<EOF
4612 #line 4613 "configure"
4613 #include "confdefs.h"
4614 #include <sys/types.h>
4615 #include <fcntl.h>
4616 int main() {
4617 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
4618 ; return 0; }
4619 EOF
4620 if { (eval echo configure:4621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4621   rm -rf conftest*
4622   samba_cv_HAVE_KERNEL_OPLOCKS=yes
4623 else
4624   echo "configure: failed program was:" >&5
4625   cat conftest.$ac_ext >&5
4626   rm -rf conftest*
4627   samba_cv_HAVE_KERNEL_OPLOCKS=no
4628 fi
4629 rm -f conftest*
4630 fi
4631
4632 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS" 1>&6
4633 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS" = x"yes"; then
4634     cat >> confdefs.h <<\EOF
4635 #define HAVE_KERNEL_OPLOCKS 1
4636 EOF
4637
4638 fi
4639
4640 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
4641 echo "configure:4642: checking for irix specific capabilities" >&5
4642 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
4643   echo $ac_n "(cached) $ac_c" 1>&6
4644 else
4645   
4646 if test "$cross_compiling" = yes; then
4647   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
4648 else
4649   cat > conftest.$ac_ext <<EOF
4650 #line 4651 "configure"
4651 #include "confdefs.h"
4652 #include <sys/types.h>
4653 #include <sys/capability.h>
4654 main() {
4655  cap_t cap;
4656  if ((cap = cap_get_proc()) == NULL)
4657    exit(1);
4658  cap->cap_effective |= CAP_NETWORK_MGT;
4659  cap->cap_inheritable |= CAP_NETWORK_MGT;
4660  cap_set_proc(cap);
4661  exit(0);
4662 }
4663
4664 EOF
4665 if { (eval echo configure:4666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4666 then
4667   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
4668 else
4669   echo "configure: failed program was:" >&5
4670   cat conftest.$ac_ext >&5
4671   rm -fr conftest*
4672   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
4673 fi
4674 rm -fr conftest*
4675 fi
4676
4677 fi
4678
4679 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
4680 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
4681     cat >> confdefs.h <<\EOF
4682 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
4683 EOF
4684
4685 fi
4686
4687 echo $ac_n "checking for test routines""... $ac_c" 1>&6
4688 echo "configure:4689: checking for test routines" >&5
4689 if test "$cross_compiling" = yes; then
4690   echo "configure: warning: cannot run when cross-compiling" 1>&2
4691 else
4692   cat > conftest.$ac_ext <<EOF
4693 #line 4694 "configure"
4694 #include "confdefs.h"
4695 #include "${srcdir-.}/tests/trivial.c"
4696 EOF
4697 if { (eval echo configure:4698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4698 then
4699   echo "$ac_t""yes" 1>&6
4700 else
4701   echo "configure: failed program was:" >&5
4702   cat conftest.$ac_ext >&5
4703   rm -fr conftest*
4704   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
4705 fi
4706 rm -fr conftest*
4707 fi
4708
4709
4710 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
4711 echo "configure:4712: checking for ftruncate extend" >&5
4712 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
4713   echo $ac_n "(cached) $ac_c" 1>&6
4714 else
4715   
4716 if test "$cross_compiling" = yes; then
4717   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
4718 else
4719   cat > conftest.$ac_ext <<EOF
4720 #line 4721 "configure"
4721 #include "confdefs.h"
4722 #include "${srcdir-.}/tests/ftruncate.c"
4723 EOF
4724 if { (eval echo configure:4725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4725 then
4726   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
4727 else
4728   echo "configure: failed program was:" >&5
4729   cat conftest.$ac_ext >&5
4730   rm -fr conftest*
4731   samba_cv_HAVE_FTRUNCATE_EXTEND=no
4732 fi
4733 rm -fr conftest*
4734 fi
4735
4736 fi
4737
4738 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
4739 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
4740     cat >> confdefs.h <<\EOF
4741 #define HAVE_FTRUNCATE_EXTEND 1
4742 EOF
4743
4744 fi
4745
4746 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
4747 echo "configure:4748: checking for broken getgroups" >&5
4748 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
4749   echo $ac_n "(cached) $ac_c" 1>&6
4750 else
4751   
4752 if test "$cross_compiling" = yes; then
4753   samba_cv_HAVE_BROKEN_GETGROUPS=cross
4754 else
4755   cat > conftest.$ac_ext <<EOF
4756 #line 4757 "configure"
4757 #include "confdefs.h"
4758 #include "${srcdir-.}/tests/getgroups.c"
4759 EOF
4760 if { (eval echo configure:4761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4761 then
4762   samba_cv_HAVE_BROKEN_GETGROUPS=yes
4763 else
4764   echo "configure: failed program was:" >&5
4765   cat conftest.$ac_ext >&5
4766   rm -fr conftest*
4767   samba_cv_HAVE_BROKEN_GETGROUPS=no
4768 fi
4769 rm -fr conftest*
4770 fi
4771
4772 fi
4773
4774 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
4775 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
4776     cat >> confdefs.h <<\EOF
4777 #define HAVE_BROKEN_GETGROUPS 1
4778 EOF
4779
4780 fi
4781
4782 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
4783 echo "configure:4784: checking whether getpass should be replaced" >&5
4784 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
4785   echo $ac_n "(cached) $ac_c" 1>&6
4786 else
4787   
4788 SAVE_CPPFLAGS="$CPPFLAGS"
4789 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/include -I${srcdir-.}/ubiqx"
4790 cat > conftest.$ac_ext <<EOF
4791 #line 4792 "configure"
4792 #include "confdefs.h"
4793
4794 #define REPLACE_GETPASS 1
4795 #define NO_CONFIG_H 1
4796 #define main dont_declare_main
4797 #include "${srcdir-.}/lib/getsmbpass.c"
4798 #undef main
4799
4800 int main() {
4801
4802 ; return 0; }
4803 EOF
4804 if { (eval echo configure:4805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4805   rm -rf conftest*
4806   samba_cv_REPLACE_GETPASS=yes
4807 else
4808   echo "configure: failed program was:" >&5
4809   cat conftest.$ac_ext >&5
4810   rm -rf conftest*
4811   samba_cv_REPLACE_GETPASS=no
4812 fi
4813 rm -f conftest*
4814 CPPFLAGS="$SAVE_CPPFLAGS"
4815
4816 fi
4817
4818 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
4819 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
4820         cat >> confdefs.h <<\EOF
4821 #define REPLACE_GETPASS 1
4822 EOF
4823
4824 fi
4825
4826 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
4827 echo "configure:4828: checking for broken inet_ntoa" >&5
4828 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
4829   echo $ac_n "(cached) $ac_c" 1>&6
4830 else
4831   
4832 if test "$cross_compiling" = yes; then
4833   samba_cv_REPLACE_INET_NTOA=cross
4834 else
4835   cat > conftest.$ac_ext <<EOF
4836 #line 4837 "configure"
4837 #include "confdefs.h"
4838
4839 #include <stdio.h>
4840 #include <sys/types.h>
4841 #include <netinet/in.h>
4842 #include <arpa/inet.h>
4843 main() { struct in_addr ip; ip.s_addr = 0x12345678;
4844 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
4845     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
4846 exit(1);}
4847 EOF
4848 if { (eval echo configure:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4849 then
4850   samba_cv_REPLACE_INET_NTOA=yes
4851 else
4852   echo "configure: failed program was:" >&5
4853   cat conftest.$ac_ext >&5
4854   rm -fr conftest*
4855   samba_cv_REPLACE_INET_NTOA=no
4856 fi
4857 rm -fr conftest*
4858 fi
4859
4860 fi
4861
4862 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
4863 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
4864     cat >> confdefs.h <<\EOF
4865 #define REPLACE_INET_NTOA 1
4866 EOF
4867
4868 fi
4869
4870 echo $ac_n "checking for root""... $ac_c" 1>&6
4871 echo "configure:4872: checking for root" >&5
4872 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
4873   echo $ac_n "(cached) $ac_c" 1>&6
4874 else
4875   
4876 if test "$cross_compiling" = yes; then
4877   samba_cv_HAVE_ROOT=cross
4878 else
4879   cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4882 main() { exit(getuid() != 0); }
4883 EOF
4884 if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4885 then
4886   samba_cv_HAVE_ROOT=yes
4887 else
4888   echo "configure: failed program was:" >&5
4889   cat conftest.$ac_ext >&5
4890   rm -fr conftest*
4891   samba_cv_HAVE_ROOT=no
4892 fi
4893 rm -fr conftest*
4894 fi
4895
4896 fi
4897
4898 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
4899 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
4900     cat >> confdefs.h <<\EOF
4901 #define HAVE_ROOT 1
4902 EOF
4903
4904 else
4905     echo "configure: warning: running as non-root will disable some tests" 1>&2
4906 fi
4907
4908 netmask=no;
4909 echo $ac_n "checking for netmask ifconf""... $ac_c" 1>&6
4910 echo "configure:4911: checking for netmask ifconf" >&5
4911 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_IFCONF'+set}'`\" = set"; then
4912   echo $ac_n "(cached) $ac_c" 1>&6
4913 else
4914   
4915 if test "$cross_compiling" = yes; then
4916   samba_cv_HAVE_NETMASK_IFCONF=cross
4917 else
4918   cat > conftest.$ac_ext <<EOF
4919 #line 4920 "configure"
4920 #include "confdefs.h"
4921
4922 #define HAVE_NETMASK_IFCONF 1
4923 #define AUTOCONF 1
4924 #include "${srcdir-.}/lib/netmask.c"
4925 EOF
4926 if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4927 then
4928   samba_cv_HAVE_NETMASK_IFCONF=yes
4929 else
4930   echo "configure: failed program was:" >&5
4931   cat conftest.$ac_ext >&5
4932   rm -fr conftest*
4933   samba_cv_HAVE_NETMASK_IFCONF=no
4934 fi
4935 rm -fr conftest*
4936 fi
4937
4938 fi
4939
4940 echo "$ac_t""$samba_cv_HAVE_NETMASK_IFCONF" 1>&6
4941 if test x"$samba_cv_HAVE_NETMASK_IFCONF" = x"yes"; then
4942     netmask=yes;cat >> confdefs.h <<\EOF
4943 #define HAVE_NETMASK_IFCONF 1
4944 EOF
4945
4946 fi
4947
4948 if test $netmask = no; then
4949 echo $ac_n "checking for netmask ifreq""... $ac_c" 1>&6
4950 echo "configure:4951: checking for netmask ifreq" >&5
4951 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_IFREQ'+set}'`\" = set"; then
4952   echo $ac_n "(cached) $ac_c" 1>&6
4953 else
4954   
4955 if test "$cross_compiling" = yes; then
4956   samba_cv_HAVE_NETMASK_IFREQ=cross
4957 else
4958   cat > conftest.$ac_ext <<EOF
4959 #line 4960 "configure"
4960 #include "confdefs.h"
4961
4962 #define HAVE_NETMASK_IFREQ 1
4963 #define AUTOCONF 1
4964 #include "${srcdir-.}/lib/netmask.c"
4965 EOF
4966 if { (eval echo configure:4967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4967 then
4968   samba_cv_HAVE_NETMASK_IFREQ=yes
4969 else
4970   echo "configure: failed program was:" >&5
4971   cat conftest.$ac_ext >&5
4972   rm -fr conftest*
4973   samba_cv_HAVE_NETMASK_IFREQ=no
4974 fi
4975 rm -fr conftest*
4976 fi
4977
4978 fi
4979
4980 echo "$ac_t""$samba_cv_HAVE_NETMASK_IFREQ" 1>&6
4981 if test x"$samba_cv_HAVE_NETMASK_IFREQ" = x"yes"; then
4982     netmask=yes;cat >> confdefs.h <<\EOF
4983 #define HAVE_NETMASK_IFREQ 1
4984 EOF
4985
4986 fi
4987 fi
4988
4989 if test $netmask = no; then
4990 echo $ac_n "checking for netmask AIX""... $ac_c" 1>&6
4991 echo "configure:4992: checking for netmask AIX" >&5
4992 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_AIX'+set}'`\" = set"; then
4993   echo $ac_n "(cached) $ac_c" 1>&6
4994 else
4995   
4996 if test "$cross_compiling" = yes; then
4997   samba_cv_HAVE_NETMASK_AIX=cross
4998 else
4999   cat > conftest.$ac_ext <<EOF
5000 #line 5001 "configure"
5001 #include "confdefs.h"
5002
5003 #define HAVE_NETMASK_AIX 1
5004 #define AUTOCONF 1
5005 #include "${srcdir-.}/lib/netmask.c"
5006 EOF
5007 if { (eval echo configure:5008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5008 then
5009   samba_cv_HAVE_NETMASK_AIX=yes
5010 else
5011   echo "configure: failed program was:" >&5
5012   cat conftest.$ac_ext >&5
5013   rm -fr conftest*
5014   samba_cv_HAVE_NETMASK_AIX=no
5015 fi
5016 rm -fr conftest*
5017 fi
5018
5019 fi
5020
5021 echo "$ac_t""$samba_cv_HAVE_NETMASK_AIX" 1>&6
5022 if test x"$samba_cv_HAVE_NETMASK_AIX" = x"yes"; then
5023     netmask=yes;cat >> confdefs.h <<\EOF
5024 #define HAVE_NETMASK_AIX 1
5025 EOF
5026
5027 fi
5028 fi
5029
5030 echo $ac_n "checking for trapdoor seteuid""... $ac_c" 1>&6
5031 echo "configure:5032: checking for trapdoor seteuid" >&5
5032 if eval "test \"`echo '$''{'samba_cv_HAVE_TRAPDOOR_UID'+set}'`\" = set"; then
5033   echo $ac_n "(cached) $ac_c" 1>&6
5034 else
5035   
5036 if test "$cross_compiling" = yes; then
5037   :
5038 else
5039   cat > conftest.$ac_ext <<EOF
5040 #line 5041 "configure"
5041 #include "confdefs.h"
5042 #include "${srcdir-.}/tests/trapdoor.c"
5043 EOF
5044 if { (eval echo configure:5045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5045 then
5046   samba_cv_HAVE_TRAPDOOR_UID=no
5047 else
5048   echo "configure: failed program was:" >&5
5049   cat conftest.$ac_ext >&5
5050   rm -fr conftest*
5051   samba_cv_HAVE_TRAPDOOR_UID=yes
5052 fi
5053 rm -fr conftest*
5054 fi
5055
5056 fi
5057
5058 echo "$ac_t""$samba_cv_HAVE_TRAPDOOR_UID" 1>&6
5059 if test x"$samba_cv_HAVE_TRAPDOOR_UID" = x"yes"; then
5060     cat >> confdefs.h <<\EOF
5061 #define HAVE_TRAPDOOR_UID 1
5062 EOF
5063
5064 fi
5065
5066 echo $ac_n "checking for shared mmap""... $ac_c" 1>&6
5067 echo "configure:5068: checking for shared mmap" >&5
5068 if eval "test \"`echo '$''{'samba_cv_HAVE_SHARED_MMAP'+set}'`\" = set"; then
5069   echo $ac_n "(cached) $ac_c" 1>&6
5070 else
5071   
5072 if test "$cross_compiling" = yes; then
5073   samba_cv_HAVE_SHARED_MMAP=cross
5074 else
5075   cat > conftest.$ac_ext <<EOF
5076 #line 5077 "configure"
5077 #include "confdefs.h"
5078 #include "${srcdir-.}/tests/shared_mmap.c"
5079 EOF
5080 if { (eval echo configure:5081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5081 then
5082   samba_cv_HAVE_SHARED_MMAP=yes
5083 else
5084   echo "configure: failed program was:" >&5
5085   cat conftest.$ac_ext >&5
5086   rm -fr conftest*
5087   samba_cv_HAVE_SHARED_MMAP=no
5088 fi
5089 rm -fr conftest*
5090 fi
5091
5092 fi
5093
5094 echo "$ac_t""$samba_cv_HAVE_SHARED_MMAP" 1>&6
5095 if test x"$samba_cv_HAVE_SHARED_MMAP" = x"yes"; then
5096     cat >> confdefs.h <<\EOF
5097 #define HAVE_SHARED_MMAP 1
5098 EOF
5099
5100 fi
5101
5102 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
5103 echo "configure:5104: checking for fcntl locking" >&5
5104 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
5105   echo $ac_n "(cached) $ac_c" 1>&6
5106 else
5107   
5108 if test "$cross_compiling" = yes; then
5109   samba_cv_HAVE_FCNTL_LOCK=cross
5110 else
5111   cat > conftest.$ac_ext <<EOF
5112 #line 5113 "configure"
5113 #include "confdefs.h"
5114 #include "${srcdir-.}/tests/fcntl_lock.c"
5115 EOF
5116 if { (eval echo configure:5117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5117 then
5118   samba_cv_HAVE_FCNTL_LOCK=yes
5119 else
5120   echo "configure: failed program was:" >&5
5121   cat conftest.$ac_ext >&5
5122   rm -fr conftest*
5123   samba_cv_HAVE_FCNTL_LOCK=no
5124 fi
5125 rm -fr conftest*
5126 fi
5127
5128 fi
5129
5130 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
5131 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
5132     cat >> confdefs.h <<\EOF
5133 #define HAVE_FCNTL_LOCK 1
5134 EOF
5135
5136 fi
5137
5138 echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
5139 echo "configure:5140: checking for 64 bit fcntl locking" >&5
5140 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
5141   echo $ac_n "(cached) $ac_c" 1>&6
5142 else
5143   
5144 if test "$cross_compiling" = yes; then
5145   samba_cv_HAVE_STRUCT_FLOCK64=cross
5146 else
5147   cat > conftest.$ac_ext <<EOF
5148 #line 5149 "configure"
5149 #include "confdefs.h"
5150
5151 #include <stdio.h>
5152 #include <stdlib.h>
5153
5154 #ifdef HAVE_FCNTL_H
5155 #include <fcntl.h>
5156 #endif
5157
5158 #ifdef HAVE_SYS_FCNTL_H
5159 #include <sys/fcntl.h>
5160 #endif
5161 main() { struct flock64 fl64;
5162 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
5163 exit(0);
5164 #else
5165 exit(1);
5166 #endif
5167 }
5168 EOF
5169 if { (eval echo configure:5170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5170 then
5171   samba_cv_HAVE_STRUCT_FLOCK64=yes
5172 else
5173   echo "configure: failed program was:" >&5
5174   cat conftest.$ac_ext >&5
5175   rm -fr conftest*
5176   samba_cv_HAVE_STRUCT_FLOCK64=no
5177 fi
5178 rm -fr conftest*
5179 fi
5180
5181 fi
5182
5183 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
5184 if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
5185     cat >> confdefs.h <<\EOF
5186 #define HAVE_STRUCT_FLOCK64 1
5187 EOF
5188
5189 fi
5190
5191 echo $ac_n "checking for sysv ipc""... $ac_c" 1>&6
5192 echo "configure:5193: checking for sysv ipc" >&5
5193 if eval "test \"`echo '$''{'samba_cv_HAVE_SYSV_IPC'+set}'`\" = set"; then
5194   echo $ac_n "(cached) $ac_c" 1>&6
5195 else
5196   
5197 if test "$cross_compiling" = yes; then
5198   samba_cv_HAVE_SYSV_IPC=cross
5199 else
5200   cat > conftest.$ac_ext <<EOF
5201 #line 5202 "configure"
5202 #include "confdefs.h"
5203 #include "${srcdir-.}/tests/sysv_ipc.c"
5204 EOF
5205 if { (eval echo configure:5206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5206 then
5207   samba_cv_HAVE_SYSV_IPC=yes
5208 else
5209   echo "configure: failed program was:" >&5
5210   cat conftest.$ac_ext >&5
5211   rm -fr conftest*
5212   samba_cv_HAVE_SYSV_IPC=no
5213 fi
5214 rm -fr conftest*
5215 fi
5216
5217 fi
5218
5219 echo "$ac_t""$samba_cv_HAVE_SYSV_IPC" 1>&6
5220 if test x"$samba_cv_HAVE_SYSV_IPC" = x"yes"; then
5221     cat >> confdefs.h <<\EOF
5222 #define HAVE_SYSV_IPC 1
5223 EOF
5224
5225 fi
5226
5227 #################################################
5228 # check for the AFS filesystem
5229 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
5230 echo "configure:5231: checking whether to use AFS" >&5
5231 # Check whether --with-afs or --without-afs was given.
5232 if test "${with_afs+set}" = set; then
5233   withval="$with_afs"
5234    case "$withval" in
5235   yes)
5236     echo "$ac_t""yes" 1>&6
5237     cat >> confdefs.h <<\EOF
5238 #define WITH_AFS 1
5239 EOF
5240
5241     ;;
5242   *)
5243     echo "$ac_t""no" 1>&6
5244     ;;
5245   esac 
5246 else
5247   echo "$ac_t""no" 1>&6
5248
5249 fi
5250
5251
5252
5253 #################################################
5254 # check for the DFS auth system
5255 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
5256 echo "configure:5257: checking whether to use DFS auth" >&5
5257 # Check whether --with-dfs or --without-dfs was given.
5258 if test "${with_dfs+set}" = set; then
5259   withval="$with_dfs"
5260    case "$withval" in
5261   yes)
5262     echo "$ac_t""yes" 1>&6
5263     cat >> confdefs.h <<\EOF
5264 #define WITH_DFS 1
5265 EOF
5266
5267     ;;
5268   *)
5269     echo "$ac_t""no" 1>&6
5270     ;;
5271   esac 
5272 else
5273   echo "$ac_t""no" 1>&6
5274
5275 fi
5276
5277
5278 #################################################
5279 # check for Kerberos IV auth system
5280 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
5281 echo "configure:5282: checking whether to use Kerberos IV" >&5
5282 # Check whether --with-krb4 or --without-krb4 was given.
5283 if test "${with_krb4+set}" = set; then
5284   withval="$with_krb4"
5285      echo "$ac_t""yes" 1>&6
5286     cat >> confdefs.h <<\EOF
5287 #define KRB4_AUTH 1
5288 EOF
5289
5290     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
5291 echo "configure:5292: checking for dn_expand in -lresolv" >&5
5292 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
5293 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5294   echo $ac_n "(cached) $ac_c" 1>&6
5295 else
5296   ac_save_LIBS="$LIBS"
5297 LIBS="-lresolv  $LIBS"
5298 cat > conftest.$ac_ext <<EOF
5299 #line 5300 "configure"
5300 #include "confdefs.h"
5301 /* Override any gcc2 internal prototype to avoid an error.  */
5302 /* We use char because int might match the return type of a gcc2
5303     builtin and then its argument prototype would still apply.  */
5304 char dn_expand();
5305
5306 int main() {
5307 dn_expand()
5308 ; return 0; }
5309 EOF
5310 if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5311   rm -rf conftest*
5312   eval "ac_cv_lib_$ac_lib_var=yes"
5313 else
5314   echo "configure: failed program was:" >&5
5315   cat conftest.$ac_ext >&5
5316   rm -rf conftest*
5317   eval "ac_cv_lib_$ac_lib_var=no"
5318 fi
5319 rm -f conftest*
5320 LIBS="$ac_save_LIBS"
5321
5322 fi
5323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5324   echo "$ac_t""yes" 1>&6
5325     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5326     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5327   cat >> confdefs.h <<EOF
5328 #define $ac_tr_lib 1
5329 EOF
5330
5331   LIBS="-lresolv $LIBS"
5332
5333 else
5334   echo "$ac_t""no" 1>&6
5335 fi
5336
5337     LIBS="$LIBS -lkrb -ldes"
5338     CFLAGS="$CFLAGS -I$withval/include"
5339     LDFLAGS="$LDFLAGS -L$withval/lib"
5340 else
5341   echo "$ac_t""no" 1>&6
5342
5343 fi
5344
5345
5346 #################################################
5347 # check for automount support
5348 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
5349 echo "configure:5350: checking whether to use AUTOMOUNT" >&5
5350 # Check whether --with-automount or --without-automount was given.
5351 if test "${with_automount+set}" = set; then
5352   withval="$with_automount"
5353    case "$withval" in
5354   yes)
5355     echo "$ac_t""yes" 1>&6
5356     cat >> confdefs.h <<\EOF
5357 #define WITH_AUTOMOUNT 1
5358 EOF
5359
5360     ;;
5361   *)
5362     echo "$ac_t""no" 1>&6
5363     ;;
5364   esac 
5365 else
5366   echo "$ac_t""no" 1>&6
5367
5368 fi
5369
5370
5371 #################################################
5372 # check for smbmount support
5373 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
5374 echo "configure:5375: checking whether to use SMBMOUNT" >&5
5375 # Check whether --with-smbmount or --without-smbmount was given.
5376 if test "${with_smbmount+set}" = set; then
5377   withval="$with_smbmount"
5378    case "$withval" in
5379   yes)
5380     echo "$ac_t""yes" 1>&6
5381     cat >> confdefs.h <<\EOF
5382 #define WITH_SMBMOUNT 1
5383 EOF
5384
5385     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
5386     ;;
5387   *)
5388     echo "$ac_t""no" 1>&6
5389     MPROGS=
5390     ;;
5391   esac 
5392 else
5393   echo "$ac_t""no" 1>&6
5394   MPROGS=
5395
5396 fi
5397
5398
5399 #################################################
5400 # check for a LDAP password database
5401 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
5402 echo "configure:5403: checking whether to use LDAP password database" >&5
5403 # Check whether --with-ldap or --without-ldap was given.
5404 if test "${with_ldap+set}" = set; then
5405   withval="$with_ldap"
5406    case "$withval" in
5407   yes)
5408     echo "$ac_t""yes" 1>&6
5409     cat >> confdefs.h <<\EOF
5410 #define WITH_LDAP 1
5411 EOF
5412
5413     ;;
5414   *)
5415     echo "$ac_t""no" 1>&6
5416     ;;
5417   esac 
5418 else
5419   echo "$ac_t""no" 1>&6
5420
5421 fi
5422
5423
5424 #################################################
5425 # check for a NISPLUS password database
5426 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
5427 echo "configure:5428: checking whether to use NISPLUS password database" >&5
5428 # Check whether --with-nisplus or --without-nisplus was given.
5429 if test "${with_nisplus+set}" = set; then
5430   withval="$with_nisplus"
5431    case "$withval" in
5432   yes)
5433     echo "$ac_t""yes" 1>&6
5434     cat >> confdefs.h <<\EOF
5435 #define WITH_NISPLUS 1
5436 EOF
5437
5438     ;;
5439   *)
5440     echo "$ac_t""no" 1>&6
5441     ;;
5442   esac 
5443 else
5444   echo "$ac_t""no" 1>&6
5445
5446 fi
5447
5448
5449 #################################################
5450 # check for a NISPLUS_HOME support 
5451 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
5452 echo "configure:5453: checking whether to use NISPLUS_HOME" >&5
5453 # Check whether --with-nisplus-home or --without-nisplus-home was given.
5454 if test "${with_nisplus_home+set}" = set; then
5455   withval="$with_nisplus_home"
5456    case "$withval" in
5457   yes)
5458     echo "$ac_t""yes" 1>&6
5459     cat >> confdefs.h <<\EOF
5460 #define WITH_NISPLUS_HOME 1
5461 EOF
5462
5463     ;;
5464   *)
5465     echo "$ac_t""no" 1>&6
5466     ;;
5467   esac 
5468 else
5469   echo "$ac_t""no" 1>&6
5470
5471 fi
5472
5473
5474 #################################################
5475 # check for the secure socket layer
5476 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
5477 echo "configure:5478: checking whether to use SSL" >&5
5478 # Check whether --with-ssl or --without-ssl was given.
5479 if test "${with_ssl+set}" = set; then
5480   withval="$with_ssl"
5481    case "$withval" in
5482   yes)
5483     echo "$ac_t""yes" 1>&6
5484     cat >> confdefs.h <<\EOF
5485 #define WITH_SSL 1
5486 EOF
5487
5488     ;;
5489   *)
5490     echo "$ac_t""no" 1>&6
5491     ;;
5492   esac 
5493 else
5494   echo "$ac_t""no" 1>&6
5495
5496 fi
5497
5498
5499 #################################################
5500 # check for experimental mmap support
5501 echo $ac_n "checking whether to use MMAP""... $ac_c" 1>&6
5502 echo "configure:5503: checking whether to use MMAP" >&5
5503 # Check whether --with-mmap or --without-mmap was given.
5504 if test "${with_mmap+set}" = set; then
5505   withval="$with_mmap"
5506    case "$withval" in
5507   yes)
5508     echo "$ac_t""yes" 1>&6
5509     cat >> confdefs.h <<\EOF
5510 #define WITH_MMAP 1
5511 EOF
5512
5513     ;;
5514   *)
5515     echo "$ac_t""no" 1>&6
5516     ;;
5517   esac 
5518 else
5519   echo "$ac_t""no" 1>&6
5520
5521 fi
5522
5523
5524 #################################################
5525 # check for syslog logging
5526 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
5527 echo "configure:5528: checking whether to use syslog logging" >&5
5528 # Check whether --with-syslog or --without-syslog was given.
5529 if test "${with_syslog+set}" = set; then
5530   withval="$with_syslog"
5531    case "$withval" in
5532   yes)
5533     echo "$ac_t""yes" 1>&6
5534     cat >> confdefs.h <<\EOF
5535 #define WITH_SYSLOG 1
5536 EOF
5537
5538     ;;
5539   *)
5540     echo "$ac_t""no" 1>&6
5541     ;;
5542   esac 
5543 else
5544   echo "$ac_t""no" 1>&6
5545
5546 fi
5547
5548
5549 #################################################
5550 # check for experimental netatalk resource fork support
5551 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
5552 echo "configure:5553: checking whether to support netatalk" >&5
5553 # Check whether --with-netatalk or --without-netatalk was given.
5554 if test "${with_netatalk+set}" = set; then
5555   withval="$with_netatalk"
5556    case "$withval" in
5557   yes)
5558     echo "$ac_t""yes" 1>&6
5559     cat >> confdefs.h <<\EOF
5560 #define WITH_NETATALK 1
5561 EOF
5562
5563     ;;
5564   *)
5565     echo "$ac_t""no" 1>&6
5566     ;;
5567   esac 
5568 else
5569   echo "$ac_t""no" 1>&6
5570
5571 fi
5572
5573
5574
5575 #################################################
5576 # these tests are taken from the GNU fileutils package
5577 echo "checking how to get filesystem space usage" 1>&6
5578 echo "configure:5579: checking how to get filesystem space usage" >&5
5579 space=no
5580
5581 # Test for statvfs64.
5582 if test $space = no; then
5583   # SVR4
5584   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
5585 echo "configure:5586: checking statvfs64 function (SVR4)" >&5
5586 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
5587   echo $ac_n "(cached) $ac_c" 1>&6
5588 else
5589   if test "$cross_compiling" = yes; then
5590   fu_cv_sys_stat_statvfs64=cross
5591 else
5592   cat > conftest.$ac_ext <<EOF
5593 #line 5594 "configure"
5594 #include "confdefs.h"
5595
5596 #include <sys/types.h>
5597 #include <sys/statvfs.h>
5598   main ()
5599   {
5600     struct statvfs64 fsd;
5601     exit (statfs64 (".", &fsd));
5602   }
5603 EOF
5604 if { (eval echo configure:5605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5605 then
5606   fu_cv_sys_stat_statvfs64=yes
5607 else
5608   echo "configure: failed program was:" >&5
5609   cat conftest.$ac_ext >&5
5610   rm -fr conftest*
5611   fu_cv_sys_stat_statvfs64=no
5612 fi
5613 rm -fr conftest*
5614 fi
5615
5616 fi
5617
5618 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
5619   if test $fu_cv_sys_stat_statvfs64 = yes; then
5620     space=yes
5621     cat >> confdefs.h <<\EOF
5622 #define STAT_STATVFS64 1
5623 EOF
5624
5625   fi
5626 fi
5627
5628 # Perform only the link test since it seems there are no variants of the
5629 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
5630 # because that got a false positive on SCO OSR5.  Adding the declaration
5631 # of a `struct statvfs' causes this test to fail (as it should) on such
5632 # systems.  That system is reported to work fine with STAT_STATFS4 which
5633 # is what it gets when this test fails.
5634 if test $space = no; then
5635   # SVR4
5636   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
5637 echo "configure:5638: checking statvfs function (SVR4)" >&5
5638 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
5639   echo $ac_n "(cached) $ac_c" 1>&6
5640 else
5641   cat > conftest.$ac_ext <<EOF
5642 #line 5643 "configure"
5643 #include "confdefs.h"
5644 #include <sys/types.h>
5645 #include <sys/statvfs.h>
5646 int main() {
5647 struct statvfs fsd; statvfs (0, &fsd);
5648 ; return 0; }
5649 EOF
5650 if { (eval echo configure:5651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5651   rm -rf conftest*
5652   fu_cv_sys_stat_statvfs=yes
5653 else
5654   echo "configure: failed program was:" >&5
5655   cat conftest.$ac_ext >&5
5656   rm -rf conftest*
5657   fu_cv_sys_stat_statvfs=no
5658 fi
5659 rm -f conftest*
5660 fi
5661
5662 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
5663   if test $fu_cv_sys_stat_statvfs = yes; then
5664     space=yes
5665     cat >> confdefs.h <<\EOF
5666 #define STAT_STATVFS 1
5667 EOF
5668
5669   fi
5670 fi
5671
5672 if test $space = no; then
5673   # DEC Alpha running OSF/1
5674   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
5675 echo "configure:5676: checking for 3-argument statfs function (DEC OSF/1)" >&5
5676   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
5677   echo $ac_n "(cached) $ac_c" 1>&6
5678 else
5679   if test "$cross_compiling" = yes; then
5680   fu_cv_sys_stat_statfs3_osf1=no
5681 else
5682   cat > conftest.$ac_ext <<EOF
5683 #line 5684 "configure"
5684 #include "confdefs.h"
5685
5686 #include <sys/param.h>
5687 #include <sys/types.h>
5688 #include <sys/mount.h>
5689   main ()
5690   {
5691     struct statfs fsd;
5692     fsd.f_fsize = 0;
5693     exit (statfs (".", &fsd, sizeof (struct statfs)));
5694   }
5695 EOF
5696 if { (eval echo configure:5697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5697 then
5698   fu_cv_sys_stat_statfs3_osf1=yes
5699 else
5700   echo "configure: failed program was:" >&5
5701   cat conftest.$ac_ext >&5
5702   rm -fr conftest*
5703   fu_cv_sys_stat_statfs3_osf1=no
5704 fi
5705 rm -fr conftest*
5706 fi
5707
5708 fi
5709
5710   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
5711   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
5712     space=yes
5713     cat >> confdefs.h <<\EOF
5714 #define STAT_STATFS3_OSF1 1
5715 EOF
5716
5717   fi
5718 fi
5719
5720 if test $space = no; then
5721 # AIX
5722   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
5723 echo "configure:5724: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
5724   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
5725   echo $ac_n "(cached) $ac_c" 1>&6
5726 else
5727   if test "$cross_compiling" = yes; then
5728   fu_cv_sys_stat_statfs2_bsize=no
5729 else
5730   cat > conftest.$ac_ext <<EOF
5731 #line 5732 "configure"
5732 #include "confdefs.h"
5733
5734 #ifdef HAVE_SYS_PARAM_H
5735 #include <sys/param.h>
5736 #endif
5737 #ifdef HAVE_SYS_MOUNT_H
5738 #include <sys/mount.h>
5739 #endif
5740 #ifdef HAVE_SYS_VFS_H
5741 #include <sys/vfs.h>
5742 #endif
5743   main ()
5744   {
5745   struct statfs fsd;
5746   fsd.f_bsize = 0;
5747   exit (statfs (".", &fsd));
5748   }
5749 EOF
5750 if { (eval echo configure:5751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5751 then
5752   fu_cv_sys_stat_statfs2_bsize=yes
5753 else
5754   echo "configure: failed program was:" >&5
5755   cat conftest.$ac_ext >&5
5756   rm -fr conftest*
5757   fu_cv_sys_stat_statfs2_bsize=no
5758 fi
5759 rm -fr conftest*
5760 fi
5761
5762 fi
5763
5764   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
5765   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
5766     space=yes
5767     cat >> confdefs.h <<\EOF
5768 #define STAT_STATFS2_BSIZE 1
5769 EOF
5770
5771   fi
5772 fi
5773
5774 if test $space = no; then
5775 # SVR3
5776   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
5777 echo "configure:5778: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
5778   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
5779   echo $ac_n "(cached) $ac_c" 1>&6
5780 else
5781   if test "$cross_compiling" = yes; then
5782   fu_cv_sys_stat_statfs4=no
5783 else
5784   cat > conftest.$ac_ext <<EOF
5785 #line 5786 "configure"
5786 #include "confdefs.h"
5787 #include <sys/types.h>
5788 #include <sys/statfs.h>
5789   main ()
5790   {
5791   struct statfs fsd;
5792   exit (statfs (".", &fsd, sizeof fsd, 0));
5793   }
5794 EOF
5795 if { (eval echo configure:5796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5796 then
5797   fu_cv_sys_stat_statfs4=yes
5798 else
5799   echo "configure: failed program was:" >&5
5800   cat conftest.$ac_ext >&5
5801   rm -fr conftest*
5802   fu_cv_sys_stat_statfs4=no
5803 fi
5804 rm -fr conftest*
5805 fi
5806
5807 fi
5808
5809   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
5810   if test $fu_cv_sys_stat_statfs4 = yes; then
5811     space=yes
5812     cat >> confdefs.h <<\EOF
5813 #define STAT_STATFS4 1
5814 EOF
5815
5816   fi
5817 fi
5818
5819 if test $space = no; then
5820 # 4.4BSD and NetBSD
5821   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
5822 echo "configure:5823: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
5823   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
5824   echo $ac_n "(cached) $ac_c" 1>&6
5825 else
5826   if test "$cross_compiling" = yes; then
5827   fu_cv_sys_stat_statfs2_fsize=no
5828 else
5829   cat > conftest.$ac_ext <<EOF
5830 #line 5831 "configure"
5831 #include "confdefs.h"
5832 #include <sys/types.h>
5833 #ifdef HAVE_SYS_PARAM_H
5834 #include <sys/param.h>
5835 #endif
5836 #ifdef HAVE_SYS_MOUNT_H
5837 #include <sys/mount.h>
5838 #endif
5839   main ()
5840   {
5841   struct statfs fsd;
5842   fsd.f_fsize = 0;
5843   exit (statfs (".", &fsd));
5844   }
5845 EOF
5846 if { (eval echo configure:5847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5847 then
5848   fu_cv_sys_stat_statfs2_fsize=yes
5849 else
5850   echo "configure: failed program was:" >&5
5851   cat conftest.$ac_ext >&5
5852   rm -fr conftest*
5853   fu_cv_sys_stat_statfs2_fsize=no
5854 fi
5855 rm -fr conftest*
5856 fi
5857
5858 fi
5859
5860   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
5861   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
5862     space=yes
5863     cat >> confdefs.h <<\EOF
5864 #define STAT_STATFS2_FSIZE 1
5865 EOF
5866
5867   fi
5868 fi
5869
5870 if test $space = no; then
5871   # Ultrix
5872   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
5873 echo "configure:5874: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
5874   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
5875   echo $ac_n "(cached) $ac_c" 1>&6
5876 else
5877   if test "$cross_compiling" = yes; then
5878   fu_cv_sys_stat_fs_data=no
5879 else
5880   cat > conftest.$ac_ext <<EOF
5881 #line 5882 "configure"
5882 #include "confdefs.h"
5883 #include <sys/types.h>
5884 #ifdef HAVE_SYS_PARAM_H
5885 #include <sys/param.h>
5886 #endif
5887 #ifdef HAVE_SYS_MOUNT_H
5888 #include <sys/mount.h>
5889 #endif
5890 #ifdef HAVE_SYS_FS_TYPES_H
5891 #include <sys/fs_types.h>
5892 #endif
5893   main ()
5894   {
5895   struct fs_data fsd;
5896   /* Ultrix's statfs returns 1 for success,
5897      0 for not mounted, -1 for failure.  */
5898   exit (statfs (".", &fsd) != 1);
5899   }
5900 EOF
5901 if { (eval echo configure:5902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5902 then
5903   fu_cv_sys_stat_fs_data=yes
5904 else
5905   echo "configure: failed program was:" >&5
5906   cat conftest.$ac_ext >&5
5907   rm -fr conftest*
5908   fu_cv_sys_stat_fs_data=no
5909 fi
5910 rm -fr conftest*
5911 fi
5912
5913 fi
5914
5915   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
5916   if test $fu_cv_sys_stat_fs_data = yes; then
5917     space=yes
5918     cat >> confdefs.h <<\EOF
5919 #define STAT_STATFS2_FS_DATA 1
5920 EOF
5921
5922   fi
5923 fi
5924
5925 echo "checking configure summary"
5926 if test "$cross_compiling" = yes; then
5927   :
5928 else
5929   cat > conftest.$ac_ext <<EOF
5930 #line 5931 "configure"
5931 #include "confdefs.h"
5932 #include "${srcdir-.}/tests/summary.c"
5933 EOF
5934 if { (eval echo configure:5935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5935 then
5936   echo "configure OK";
5937 else
5938   echo "configure: failed program was:" >&5
5939   cat conftest.$ac_ext >&5
5940   rm -fr conftest*
5941   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
5942 fi
5943 rm -fr conftest*
5944 fi
5945
5946
5947 trap '' 1 2 15
5948 cat > confcache <<\EOF
5949 # This file is a shell script that caches the results of configure
5950 # tests run on this system so they can be shared between configure
5951 # scripts and configure runs.  It is not useful on other systems.
5952 # If it contains results you don't want to keep, you may remove or edit it.
5953 #
5954 # By default, configure uses ./config.cache as the cache file,
5955 # creating it if it does not exist already.  You can give configure
5956 # the --cache-file=FILE option to use a different cache file; that is
5957 # what configure does when it calls configure scripts in
5958 # subdirectories, so they share the cache.
5959 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5960 # config.status only pays attention to the cache file if you give it the
5961 # --recheck option to rerun configure.
5962 #
5963 EOF
5964 # The following way of writing the cache mishandles newlines in values,
5965 # but we know of no workaround that is simple, portable, and efficient.
5966 # So, don't put newlines in cache variables' values.
5967 # Ultrix sh set writes to stderr and can't be redirected directly,
5968 # and sets the high bit in the cache file unless we assign to the vars.
5969 (set) 2>&1 |
5970   case `(ac_space=' '; set) 2>&1` in
5971   *ac_space=\ *)
5972     # `set' does not quote correctly, so add quotes (double-quote substitution
5973     # turns \\\\ into \\, and sed turns \\ into \).
5974     sed -n \
5975       -e "s/'/'\\\\''/g" \
5976       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5977     ;;
5978   *)
5979     # `set' quotes correctly as required by POSIX, so do not add quotes.
5980     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5981     ;;
5982   esac >> confcache
5983 if cmp -s $cache_file confcache; then
5984   :
5985 else
5986   if test -w $cache_file; then
5987     echo "updating cache $cache_file"
5988     cat confcache > $cache_file
5989   else
5990     echo "not updating unwritable cache $cache_file"
5991   fi
5992 fi
5993 rm -f confcache
5994
5995 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5996
5997 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5998 # Let make expand exec_prefix.
5999 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6000
6001 # Any assignment to VPATH causes Sun make to only execute
6002 # the first set of double-colon rules, so remove it if not needed.
6003 # If there is a colon in the path, we need to keep it.
6004 if test "x$srcdir" = x.; then
6005   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6006 fi
6007
6008 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6009
6010 DEFS=-DHAVE_CONFIG_H
6011
6012 # Without the "./", some shells look in PATH for config.status.
6013 : ${CONFIG_STATUS=./config.status}
6014
6015 echo creating $CONFIG_STATUS
6016 rm -f $CONFIG_STATUS
6017 cat > $CONFIG_STATUS <<EOF
6018 #! /bin/sh
6019 # Generated automatically by configure.
6020 # Run this file to recreate the current configuration.
6021 # This directory was configured as follows,
6022 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6023 #
6024 # $0 $ac_configure_args
6025 #
6026 # Compiler output produced by configure, useful for debugging
6027 # configure, is in ./config.log if it exists.
6028
6029 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6030 for ac_option
6031 do
6032   case "\$ac_option" in
6033   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6034     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6035     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6036   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6037     echo "$CONFIG_STATUS generated by autoconf version 2.12"
6038     exit 0 ;;
6039   -help | --help | --hel | --he | --h)
6040     echo "\$ac_cs_usage"; exit 0 ;;
6041   *) echo "\$ac_cs_usage"; exit 1 ;;
6042   esac
6043 done
6044
6045 ac_given_srcdir=$srcdir
6046 ac_given_INSTALL="$INSTALL"
6047
6048 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6049 EOF
6050 cat >> $CONFIG_STATUS <<EOF
6051
6052 # Protect against being on the right side of a sed subst in config.status.
6053 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6054  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6055 $ac_vpsub
6056 $extrasub
6057 s%@CFLAGS@%$CFLAGS%g
6058 s%@CPPFLAGS@%$CPPFLAGS%g
6059 s%@CXXFLAGS@%$CXXFLAGS%g
6060 s%@DEFS@%$DEFS%g
6061 s%@LDFLAGS@%$LDFLAGS%g
6062 s%@LIBS@%$LIBS%g
6063 s%@exec_prefix@%$exec_prefix%g
6064 s%@prefix@%$prefix%g
6065 s%@program_transform_name@%$program_transform_name%g
6066 s%@bindir@%$bindir%g
6067 s%@sbindir@%$sbindir%g
6068 s%@libexecdir@%$libexecdir%g
6069 s%@datadir@%$datadir%g
6070 s%@sysconfdir@%$sysconfdir%g
6071 s%@sharedstatedir@%$sharedstatedir%g
6072 s%@localstatedir@%$localstatedir%g
6073 s%@libdir@%$libdir%g
6074 s%@includedir@%$includedir%g
6075 s%@oldincludedir@%$oldincludedir%g
6076 s%@infodir@%$infodir%g
6077 s%@mandir@%$mandir%g
6078 s%@CC@%$CC%g
6079 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6080 s%@INSTALL_DATA@%$INSTALL_DATA%g
6081 s%@SHELL@%$SHELL%g
6082 s%@MPROGS@%$MPROGS%g
6083 s%@AWK@%$AWK%g
6084 s%@host@%$host%g
6085 s%@host_alias@%$host_alias%g
6086 s%@host_cpu@%$host_cpu%g
6087 s%@host_vendor@%$host_vendor%g
6088 s%@host_os@%$host_os%g
6089 s%@target@%$target%g
6090 s%@target_alias@%$target_alias%g
6091 s%@target_cpu@%$target_cpu%g
6092 s%@target_vendor@%$target_vendor%g
6093 s%@target_os@%$target_os%g
6094 s%@build@%$build%g
6095 s%@build_alias@%$build_alias%g
6096 s%@build_cpu@%$build_cpu%g
6097 s%@build_vendor@%$build_vendor%g
6098 s%@build_os@%$build_os%g
6099 s%@MAINT@%$MAINT%g
6100 s%@AUTOCONF@%$AUTOCONF%g
6101 s%@AUTOHEADER@%$AUTOHEADER%g
6102 s%@CPP@%$CPP%g
6103 s%@LIBOBJS@%$LIBOBJS%g
6104
6105 CEOF
6106 EOF
6107
6108 cat >> $CONFIG_STATUS <<\EOF
6109
6110 # Split the substitutions into bite-sized pieces for seds with
6111 # small command number limits, like on Digital OSF/1 and HP-UX.
6112 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6113 ac_file=1 # Number of current file.
6114 ac_beg=1 # First line for current file.
6115 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6116 ac_more_lines=:
6117 ac_sed_cmds=""
6118 while $ac_more_lines; do
6119   if test $ac_beg -gt 1; then
6120     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6121   else
6122     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6123   fi
6124   if test ! -s conftest.s$ac_file; then
6125     ac_more_lines=false
6126     rm -f conftest.s$ac_file
6127   else
6128     if test -z "$ac_sed_cmds"; then
6129       ac_sed_cmds="sed -f conftest.s$ac_file"
6130     else
6131       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6132     fi
6133     ac_file=`expr $ac_file + 1`
6134     ac_beg=$ac_end
6135     ac_end=`expr $ac_end + $ac_max_sed_cmds`
6136   fi
6137 done
6138 if test -z "$ac_sed_cmds"; then
6139   ac_sed_cmds=cat
6140 fi
6141 EOF
6142
6143 cat >> $CONFIG_STATUS <<EOF
6144
6145 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
6146 EOF
6147 cat >> $CONFIG_STATUS <<\EOF
6148 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6149   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6150   case "$ac_file" in
6151   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6152        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6153   *) ac_file_in="${ac_file}.in" ;;
6154   esac
6155
6156   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6157
6158   # Remove last slash and all that follows it.  Not all systems have dirname.
6159   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6160   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6161     # The file is in a subdirectory.
6162     test ! -d "$ac_dir" && mkdir "$ac_dir"
6163     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6164     # A "../" for each directory in $ac_dir_suffix.
6165     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6166   else
6167     ac_dir_suffix= ac_dots=
6168   fi
6169
6170   case "$ac_given_srcdir" in
6171   .)  srcdir=.
6172       if test -z "$ac_dots"; then top_srcdir=.
6173       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6174   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6175   *) # Relative path.
6176     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6177     top_srcdir="$ac_dots$ac_given_srcdir" ;;
6178   esac
6179
6180   case "$ac_given_INSTALL" in
6181   [/$]*) INSTALL="$ac_given_INSTALL" ;;
6182   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6183   esac
6184
6185   echo creating "$ac_file"
6186   rm -f "$ac_file"
6187   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6188   case "$ac_file" in
6189   *Makefile*) ac_comsub="1i\\
6190 # $configure_input" ;;
6191   *) ac_comsub= ;;
6192   esac
6193
6194   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6195   sed -e "$ac_comsub
6196 s%@configure_input@%$configure_input%g
6197 s%@srcdir@%$srcdir%g
6198 s%@top_srcdir@%$top_srcdir%g
6199 s%@INSTALL@%$INSTALL%g
6200 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6201 fi; done
6202 rm -f conftest.s*
6203
6204 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6205 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6206 #
6207 # ac_d sets the value in "#define NAME VALUE" lines.
6208 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6209 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
6210 ac_dC='\3'
6211 ac_dD='%g'
6212 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6213 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6214 ac_uB='\([      ]\)%\1#\2define\3'
6215 ac_uC=' '
6216 ac_uD='\4%g'
6217 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6218 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6219 ac_eB='$%\1#\2define\3'
6220 ac_eC=' '
6221 ac_eD='%g'
6222
6223 if test "${CONFIG_HEADERS+set}" != set; then
6224 EOF
6225 cat >> $CONFIG_STATUS <<EOF
6226   CONFIG_HEADERS="include/config.h"
6227 EOF
6228 cat >> $CONFIG_STATUS <<\EOF
6229 fi
6230 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6231   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6232   case "$ac_file" in
6233   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6234        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6235   *) ac_file_in="${ac_file}.in" ;;
6236   esac
6237
6238   echo creating $ac_file
6239
6240   rm -f conftest.frag conftest.in conftest.out
6241   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6242   cat $ac_file_inputs > conftest.in
6243
6244 EOF
6245
6246 # Transform confdefs.h into a sed script conftest.vals that substitutes
6247 # the proper values into config.h.in to produce config.h.  And first:
6248 # Protect against being on the right side of a sed subst in config.status.
6249 # Protect against being in an unquoted here document in config.status.
6250 rm -f conftest.vals
6251 cat > conftest.hdr <<\EOF
6252 s/[\\&%]/\\&/g
6253 s%[\\$`]%\\&%g
6254 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6255 s%ac_d%ac_u%gp
6256 s%ac_u%ac_e%gp
6257 EOF
6258 sed -n -f conftest.hdr confdefs.h > conftest.vals
6259 rm -f conftest.hdr
6260
6261 # This sed command replaces #undef with comments.  This is necessary, for
6262 # example, in the case of _POSIX_SOURCE, which is predefined and required
6263 # on some systems where configure will not decide to define it.
6264 cat >> conftest.vals <<\EOF
6265 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6266 EOF
6267
6268 # Break up conftest.vals because some shells have a limit on
6269 # the size of here documents, and old seds have small limits too.
6270
6271 rm -f conftest.tail
6272 while :
6273 do
6274   ac_lines=`grep -c . conftest.vals`
6275   # grep -c gives empty output for an empty file on some AIX systems.
6276   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6277   # Write a limited-size here document to conftest.frag.
6278   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6279   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6280   echo 'CEOF
6281   sed -f conftest.frag conftest.in > conftest.out
6282   rm -f conftest.in
6283   mv conftest.out conftest.in
6284 ' >> $CONFIG_STATUS
6285   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6286   rm -f conftest.vals
6287   mv conftest.tail conftest.vals
6288 done
6289 rm -f conftest.vals
6290
6291 cat >> $CONFIG_STATUS <<\EOF
6292   rm -f conftest.frag conftest.h
6293   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6294   cat conftest.in >> conftest.h
6295   rm -f conftest.in
6296   if cmp -s $ac_file conftest.h 2>/dev/null; then
6297     echo "$ac_file is unchanged"
6298     rm -f conftest.h
6299   else
6300     # Remove last slash and all that follows it.  Not all systems have dirname.
6301       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6302       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6303       # The file is in a subdirectory.
6304       test ! -d "$ac_dir" && mkdir "$ac_dir"
6305     fi
6306     rm -f $ac_file
6307     mv conftest.h $ac_file
6308   fi
6309 fi; done
6310
6311 EOF
6312 cat >> $CONFIG_STATUS <<EOF
6313
6314 EOF
6315 cat >> $CONFIG_STATUS <<\EOF
6316
6317 exit 0
6318 EOF
6319 chmod +x $CONFIG_STATUS
6320 rm -fr confdefs* $ac_clean_files
6321 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6322