- no getdents on OSF1
[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
813
814
815
816 for ac_prog in mawk gawk nawk awk
817 do
818 # Extract the first word of "$ac_prog", so it can be a program name with args.
819 set dummy $ac_prog; ac_word=$2
820 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
821 echo "configure:822: checking for $ac_word" >&5
822 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
823   echo $ac_n "(cached) $ac_c" 1>&6
824 else
825   if test -n "$AWK"; then
826   ac_cv_prog_AWK="$AWK" # Let the user override the test.
827 else
828   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
829   for ac_dir in $PATH; do
830     test -z "$ac_dir" && ac_dir=.
831     if test -f $ac_dir/$ac_word; then
832       ac_cv_prog_AWK="$ac_prog"
833       break
834     fi
835   done
836   IFS="$ac_save_ifs"
837 fi
838 fi
839 AWK="$ac_cv_prog_AWK"
840 if test -n "$AWK"; then
841   echo "$ac_t""$AWK" 1>&6
842 else
843   echo "$ac_t""no" 1>&6
844 fi
845
846 test -n "$AWK" && break
847 done
848
849
850
851 # Do some error checking and defaulting for the host and target type.
852 # The inputs are:
853 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
854 #
855 # The rules are:
856 # 1. You are not allowed to specify --host, --target, and nonopt at the
857 #    same time.
858 # 2. Host defaults to nonopt.
859 # 3. If nonopt is not specified, then host defaults to the current host,
860 #    as determined by config.guess.
861 # 4. Target and build default to nonopt.
862 # 5. If nonopt is not specified, then target and build default to host.
863
864 # The aliases save the names the user supplied, while $host etc.
865 # will get canonicalized.
866 case $host---$target---$nonopt in
867 NONE---*---* | *---NONE---* | *---*---NONE) ;;
868 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
869 esac
870
871
872 # Make sure we can run config.sub.
873 if $ac_config_sub sun4 >/dev/null 2>&1; then :
874 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
875 fi
876
877 echo $ac_n "checking host system type""... $ac_c" 1>&6
878 echo "configure:879: checking host system type" >&5
879
880 host_alias=$host
881 case "$host_alias" in
882 NONE)
883   case $nonopt in
884   NONE)
885     if host_alias=`$ac_config_guess`; then :
886     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
887     fi ;;
888   *) host_alias=$nonopt ;;
889   esac ;;
890 esac
891
892 host=`$ac_config_sub $host_alias`
893 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
894 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
895 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
896 echo "$ac_t""$host" 1>&6
897
898 echo $ac_n "checking target system type""... $ac_c" 1>&6
899 echo "configure:900: checking target system type" >&5
900
901 target_alias=$target
902 case "$target_alias" in
903 NONE)
904   case $nonopt in
905   NONE) target_alias=$host_alias ;;
906   *) target_alias=$nonopt ;;
907   esac ;;
908 esac
909
910 target=`$ac_config_sub $target_alias`
911 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
912 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
913 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
914 echo "$ac_t""$target" 1>&6
915
916 echo $ac_n "checking build system type""... $ac_c" 1>&6
917 echo "configure:918: checking build system type" >&5
918
919 build_alias=$build
920 case "$build_alias" in
921 NONE)
922   case $nonopt in
923   NONE) build_alias=$host_alias ;;
924   *) build_alias=$nonopt ;;
925   esac ;;
926 esac
927
928 build=`$ac_config_sub $build_alias`
929 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
930 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
931 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
932 echo "$ac_t""$build" 1>&6
933
934 test "$host_alias" != "$target_alias" &&
935   test "$program_prefix$program_suffix$program_transform_name" = \
936     NONENONEs,x,x, &&
937   program_prefix=${target_alias}-
938
939
940     
941     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
942 echo "configure:943: checking config.cache system type" >&5
943     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
944          test x"$ac_cv_host_system_type" != x"$host"; } ||
945        { test x"${ac_cv_build_system_type+set}" = x"set" &&
946          test x"$ac_cv_build_system_type" != x"$build"; } ||
947        { test x"${ac_cv_target_system_type+set}" = x"set" &&
948          test x"$ac_cv_target_system_type" != x"$target"; }; then
949         echo "$ac_t""different" 1>&6
950         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
951     else
952         echo "$ac_t""same" 1>&6
953     fi
954     ac_cv_host_system_type="$host"
955     ac_cv_build_system_type="$build"
956     ac_cv_target_system_type="$target"
957
958
959   # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
960 if test "${enable_maintainer_mode+set}" = set; then
961   enableval="$enable_maintainer_mode"
962   maint_mode=$enableval
963 else
964   maint_mode=no
965 fi
966
967   if test x"$maint_mode" = x"yes"; then MAINT=; else MAINT='#'; fi
968   
969   # Extract the first word of "autoconf", so it can be a program name with args.
970 set dummy autoconf; ac_word=$2
971 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
972 echo "configure:973: checking for $ac_word" >&5
973 if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then
974   echo $ac_n "(cached) $ac_c" 1>&6
975 else
976   case "$AUTOCONF" in
977   /*)
978   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
979   ;;
980   *)
981   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
982   for ac_dir in $PATH; do
983     test -z "$ac_dir" && ac_dir=.
984     if test -f $ac_dir/$ac_word; then
985       ac_cv_path_AUTOCONF="$ac_dir/$ac_word"
986       break
987     fi
988   done
989   IFS="$ac_save_ifs"
990   test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF="autoconf"
991   ;;
992 esac
993 fi
994 AUTOCONF="$ac_cv_path_AUTOCONF"
995 if test -n "$AUTOCONF"; then
996   echo "$ac_t""$AUTOCONF" 1>&6
997 else
998   echo "$ac_t""no" 1>&6
999 fi
1000
1001   
1002   # Extract the first word of "autoheader", so it can be a program name with args.
1003 set dummy autoheader; ac_word=$2
1004 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1005 echo "configure:1006: checking for $ac_word" >&5
1006 if eval "test \"`echo '$''{'ac_cv_path_AUTOHEADER'+set}'`\" = set"; then
1007   echo $ac_n "(cached) $ac_c" 1>&6
1008 else
1009   case "$AUTOHEADER" in
1010   /*)
1011   ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a path.
1012   ;;
1013   *)
1014   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1015   for ac_dir in $PATH; do
1016     test -z "$ac_dir" && ac_dir=.
1017     if test -f $ac_dir/$ac_word; then
1018       ac_cv_path_AUTOHEADER="$ac_dir/$ac_word"
1019       break
1020     fi
1021   done
1022   IFS="$ac_save_ifs"
1023   test -z "$ac_cv_path_AUTOHEADER" && ac_cv_path_AUTOHEADER="autoheader"
1024   ;;
1025 esac
1026 fi
1027 AUTOHEADER="$ac_cv_path_AUTOHEADER"
1028 if test -n "$AUTOHEADER"; then
1029   echo "$ac_t""$AUTOHEADER" 1>&6
1030 else
1031   echo "$ac_t""no" 1>&6
1032 fi
1033
1034   
1035
1036
1037
1038
1039 # this bit needs to be modified for each OS that is suported by
1040 # smbwrapper. You need to specify how to created a shared library and
1041 # how to compile C code to produce PIC object files
1042
1043 # these are the defaults, good for lots of systems
1044 PICFLAG="-fpic"
1045 HOST_OS="$host_os"
1046 LDSHFLAGS="-shared"
1047
1048 # and these are for particular systems
1049 case "$host_os" in
1050         *linux*)   cat >> confdefs.h <<\EOF
1051 #define LINUX 1
1052 EOF
1053 ;;
1054         *solaris*) cat >> confdefs.h <<\EOF
1055 #define SUNOS5 1
1056 EOF
1057
1058                    LDSHFLAGS="-G";;
1059         *sunos*) cat >> confdefs.h <<\EOF
1060 #define SUNOS4 1
1061 EOF
1062 ;;
1063         *irix*) cat >> confdefs.h <<\EOF
1064 #define IRIX 1
1065 EOF
1066
1067                 WRAP32=smbwrapper/smbwrapper.32.so
1068                 PICFLAG="-KPIC"
1069                 ;;
1070         *aix*) cat >> confdefs.h <<\EOF
1071 #define AIX 1
1072 EOF
1073 ;;
1074         *hpux*) cat >> confdefs.h <<\EOF
1075 #define HPUX 1
1076 EOF
1077 ;;
1078         *qnx*) cat >> confdefs.h <<\EOF
1079 #define QNX 1
1080 EOF
1081 ;;
1082         *osf*) cat >> confdefs.h <<\EOF
1083 #define OSF1 1
1084 EOF
1085 ;;
1086         *sco*) cat >> confdefs.h <<\EOF
1087 #define SCO 1
1088 EOF
1089 ;;
1090         *next2*) cat >> confdefs.h <<\EOF
1091 #define NEXT2 1
1092 EOF
1093 ;;
1094 esac
1095
1096 echo $ac_n "checking for inline""... $ac_c" 1>&6
1097 echo "configure:1098: checking for inline" >&5
1098 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1099   echo $ac_n "(cached) $ac_c" 1>&6
1100 else
1101   ac_cv_c_inline=no
1102 for ac_kw in inline __inline__ __inline; do
1103   cat > conftest.$ac_ext <<EOF
1104 #line 1105 "configure"
1105 #include "confdefs.h"
1106
1107 int main() {
1108 } $ac_kw foo() {
1109 ; return 0; }
1110 EOF
1111 if { (eval echo configure:1112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1112   rm -rf conftest*
1113   ac_cv_c_inline=$ac_kw; break
1114 else
1115   echo "configure: failed program was:" >&5
1116   cat conftest.$ac_ext >&5
1117 fi
1118 rm -f conftest*
1119 done
1120
1121 fi
1122
1123 echo "$ac_t""$ac_cv_c_inline" 1>&6
1124 case "$ac_cv_c_inline" in
1125   inline | yes) ;;
1126   no) cat >> confdefs.h <<\EOF
1127 #define inline 
1128 EOF
1129  ;;
1130   *)  cat >> confdefs.h <<EOF
1131 #define inline $ac_cv_c_inline
1132 EOF
1133  ;;
1134 esac
1135
1136 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1137 echo "configure:1138: checking how to run the C preprocessor" >&5
1138 # On Suns, sometimes $CPP names a directory.
1139 if test -n "$CPP" && test -d "$CPP"; then
1140   CPP=
1141 fi
1142 if test -z "$CPP"; then
1143 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1144   echo $ac_n "(cached) $ac_c" 1>&6
1145 else
1146     # This must be in double quotes, not single quotes, because CPP may get
1147   # substituted into the Makefile and "${CC-cc}" will confuse make.
1148   CPP="${CC-cc} -E"
1149   # On the NeXT, cc -E runs the code through the compiler's parser,
1150   # not just through cpp.
1151   cat > conftest.$ac_ext <<EOF
1152 #line 1153 "configure"
1153 #include "confdefs.h"
1154 #include <assert.h>
1155 Syntax Error
1156 EOF
1157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1158 { (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1159 ac_err=`grep -v '^ *+' conftest.out`
1160 if test -z "$ac_err"; then
1161   :
1162 else
1163   echo "$ac_err" >&5
1164   echo "configure: failed program was:" >&5
1165   cat conftest.$ac_ext >&5
1166   rm -rf conftest*
1167   CPP="${CC-cc} -E -traditional-cpp"
1168   cat > conftest.$ac_ext <<EOF
1169 #line 1170 "configure"
1170 #include "confdefs.h"
1171 #include <assert.h>
1172 Syntax Error
1173 EOF
1174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1175 { (eval echo configure:1176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1176 ac_err=`grep -v '^ *+' conftest.out`
1177 if test -z "$ac_err"; then
1178   :
1179 else
1180   echo "$ac_err" >&5
1181   echo "configure: failed program was:" >&5
1182   cat conftest.$ac_ext >&5
1183   rm -rf conftest*
1184   CPP=/lib/cpp
1185 fi
1186 rm -f conftest*
1187 fi
1188 rm -f conftest*
1189   ac_cv_prog_CPP="$CPP"
1190 fi
1191   CPP="$ac_cv_prog_CPP"
1192 else
1193   ac_cv_prog_CPP="$CPP"
1194 fi
1195 echo "$ac_t""$CPP" 1>&6
1196
1197 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1198 echo "configure:1199: checking for ANSI C header files" >&5
1199 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1200   echo $ac_n "(cached) $ac_c" 1>&6
1201 else
1202   cat > conftest.$ac_ext <<EOF
1203 #line 1204 "configure"
1204 #include "confdefs.h"
1205 #include <stdlib.h>
1206 #include <stdarg.h>
1207 #include <string.h>
1208 #include <float.h>
1209 EOF
1210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1211 { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1212 ac_err=`grep -v '^ *+' conftest.out`
1213 if test -z "$ac_err"; then
1214   rm -rf conftest*
1215   ac_cv_header_stdc=yes
1216 else
1217   echo "$ac_err" >&5
1218   echo "configure: failed program was:" >&5
1219   cat conftest.$ac_ext >&5
1220   rm -rf conftest*
1221   ac_cv_header_stdc=no
1222 fi
1223 rm -f conftest*
1224
1225 if test $ac_cv_header_stdc = yes; then
1226   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1227 cat > conftest.$ac_ext <<EOF
1228 #line 1229 "configure"
1229 #include "confdefs.h"
1230 #include <string.h>
1231 EOF
1232 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1233   egrep "memchr" >/dev/null 2>&1; then
1234   :
1235 else
1236   rm -rf conftest*
1237   ac_cv_header_stdc=no
1238 fi
1239 rm -f conftest*
1240
1241 fi
1242
1243 if test $ac_cv_header_stdc = yes; then
1244   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1245 cat > conftest.$ac_ext <<EOF
1246 #line 1247 "configure"
1247 #include "confdefs.h"
1248 #include <stdlib.h>
1249 EOF
1250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1251   egrep "free" >/dev/null 2>&1; then
1252   :
1253 else
1254   rm -rf conftest*
1255   ac_cv_header_stdc=no
1256 fi
1257 rm -f conftest*
1258
1259 fi
1260
1261 if test $ac_cv_header_stdc = yes; then
1262   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1263 if test "$cross_compiling" = yes; then
1264   :
1265 else
1266   cat > conftest.$ac_ext <<EOF
1267 #line 1268 "configure"
1268 #include "confdefs.h"
1269 #include <ctype.h>
1270 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1271 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1272 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1273 int main () { int i; for (i = 0; i < 256; i++)
1274 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1275 exit (0); }
1276
1277 EOF
1278 if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1279 then
1280   :
1281 else
1282   echo "configure: failed program was:" >&5
1283   cat conftest.$ac_ext >&5
1284   rm -fr conftest*
1285   ac_cv_header_stdc=no
1286 fi
1287 rm -fr conftest*
1288 fi
1289
1290 fi
1291 fi
1292
1293 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1294 if test $ac_cv_header_stdc = yes; then
1295   cat >> confdefs.h <<\EOF
1296 #define STDC_HEADERS 1
1297 EOF
1298
1299 fi
1300
1301 ac_header_dirent=no
1302 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1303 do
1304 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1305 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1306 echo "configure:1307: checking for $ac_hdr that defines DIR" >&5
1307 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1308   echo $ac_n "(cached) $ac_c" 1>&6
1309 else
1310   cat > conftest.$ac_ext <<EOF
1311 #line 1312 "configure"
1312 #include "confdefs.h"
1313 #include <sys/types.h>
1314 #include <$ac_hdr>
1315 int main() {
1316 DIR *dirp = 0;
1317 ; return 0; }
1318 EOF
1319 if { (eval echo configure:1320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1320   rm -rf conftest*
1321   eval "ac_cv_header_dirent_$ac_safe=yes"
1322 else
1323   echo "configure: failed program was:" >&5
1324   cat conftest.$ac_ext >&5
1325   rm -rf conftest*
1326   eval "ac_cv_header_dirent_$ac_safe=no"
1327 fi
1328 rm -f conftest*
1329 fi
1330 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1331   echo "$ac_t""yes" 1>&6
1332     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1333   cat >> confdefs.h <<EOF
1334 #define $ac_tr_hdr 1
1335 EOF
1336  ac_header_dirent=$ac_hdr; break
1337 else
1338   echo "$ac_t""no" 1>&6
1339 fi
1340 done
1341 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1342 if test $ac_header_dirent = dirent.h; then
1343 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1344 echo "configure:1345: checking for opendir in -ldir" >&5
1345 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1346 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1347   echo $ac_n "(cached) $ac_c" 1>&6
1348 else
1349   ac_save_LIBS="$LIBS"
1350 LIBS="-ldir  $LIBS"
1351 cat > conftest.$ac_ext <<EOF
1352 #line 1353 "configure"
1353 #include "confdefs.h"
1354 /* Override any gcc2 internal prototype to avoid an error.  */
1355 /* We use char because int might match the return type of a gcc2
1356     builtin and then its argument prototype would still apply.  */
1357 char opendir();
1358
1359 int main() {
1360 opendir()
1361 ; return 0; }
1362 EOF
1363 if { (eval echo configure:1364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1364   rm -rf conftest*
1365   eval "ac_cv_lib_$ac_lib_var=yes"
1366 else
1367   echo "configure: failed program was:" >&5
1368   cat conftest.$ac_ext >&5
1369   rm -rf conftest*
1370   eval "ac_cv_lib_$ac_lib_var=no"
1371 fi
1372 rm -f conftest*
1373 LIBS="$ac_save_LIBS"
1374
1375 fi
1376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1377   echo "$ac_t""yes" 1>&6
1378   LIBS="$LIBS -ldir"
1379 else
1380   echo "$ac_t""no" 1>&6
1381 fi
1382
1383 else
1384 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1385 echo "configure:1386: checking for opendir in -lx" >&5
1386 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1387 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1388   echo $ac_n "(cached) $ac_c" 1>&6
1389 else
1390   ac_save_LIBS="$LIBS"
1391 LIBS="-lx  $LIBS"
1392 cat > conftest.$ac_ext <<EOF
1393 #line 1394 "configure"
1394 #include "confdefs.h"
1395 /* Override any gcc2 internal prototype to avoid an error.  */
1396 /* We use char because int might match the return type of a gcc2
1397     builtin and then its argument prototype would still apply.  */
1398 char opendir();
1399
1400 int main() {
1401 opendir()
1402 ; return 0; }
1403 EOF
1404 if { (eval echo configure:1405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1405   rm -rf conftest*
1406   eval "ac_cv_lib_$ac_lib_var=yes"
1407 else
1408   echo "configure: failed program was:" >&5
1409   cat conftest.$ac_ext >&5
1410   rm -rf conftest*
1411   eval "ac_cv_lib_$ac_lib_var=no"
1412 fi
1413 rm -f conftest*
1414 LIBS="$ac_save_LIBS"
1415
1416 fi
1417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1418   echo "$ac_t""yes" 1>&6
1419   LIBS="$LIBS -lx"
1420 else
1421   echo "$ac_t""no" 1>&6
1422 fi
1423
1424 fi
1425
1426 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1427 echo "configure:1428: checking whether time.h and sys/time.h may both be included" >&5
1428 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1429   echo $ac_n "(cached) $ac_c" 1>&6
1430 else
1431   cat > conftest.$ac_ext <<EOF
1432 #line 1433 "configure"
1433 #include "confdefs.h"
1434 #include <sys/types.h>
1435 #include <sys/time.h>
1436 #include <time.h>
1437 int main() {
1438 struct tm *tp;
1439 ; return 0; }
1440 EOF
1441 if { (eval echo configure:1442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1442   rm -rf conftest*
1443   ac_cv_header_time=yes
1444 else
1445   echo "configure: failed program was:" >&5
1446   cat conftest.$ac_ext >&5
1447   rm -rf conftest*
1448   ac_cv_header_time=no
1449 fi
1450 rm -f conftest*
1451 fi
1452
1453 echo "$ac_t""$ac_cv_header_time" 1>&6
1454 if test $ac_cv_header_time = yes; then
1455   cat >> confdefs.h <<\EOF
1456 #define TIME_WITH_SYS_TIME 1
1457 EOF
1458
1459 fi
1460
1461 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1462 echo "configure:1463: checking for sys/wait.h that is POSIX.1 compatible" >&5
1463 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1464   echo $ac_n "(cached) $ac_c" 1>&6
1465 else
1466   cat > conftest.$ac_ext <<EOF
1467 #line 1468 "configure"
1468 #include "confdefs.h"
1469 #include <sys/types.h>
1470 #include <sys/wait.h>
1471 #ifndef WEXITSTATUS
1472 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1473 #endif
1474 #ifndef WIFEXITED
1475 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1476 #endif
1477 int main() {
1478 int s;
1479 wait (&s);
1480 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1481 ; return 0; }
1482 EOF
1483 if { (eval echo configure:1484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1484   rm -rf conftest*
1485   ac_cv_header_sys_wait_h=yes
1486 else
1487   echo "configure: failed program was:" >&5
1488   cat conftest.$ac_ext >&5
1489   rm -rf conftest*
1490   ac_cv_header_sys_wait_h=no
1491 fi
1492 rm -f conftest*
1493 fi
1494
1495 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1496 if test $ac_cv_header_sys_wait_h = yes; then
1497   cat >> confdefs.h <<\EOF
1498 #define HAVE_SYS_WAIT_H 1
1499 EOF
1500
1501 fi
1502
1503 for ac_hdr in sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1504 do
1505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1507 echo "configure:1508: checking for $ac_hdr" >&5
1508 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1509   echo $ac_n "(cached) $ac_c" 1>&6
1510 else
1511   cat > conftest.$ac_ext <<EOF
1512 #line 1513 "configure"
1513 #include "confdefs.h"
1514 #include <$ac_hdr>
1515 EOF
1516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1517 { (eval echo configure:1518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1518 ac_err=`grep -v '^ *+' conftest.out`
1519 if test -z "$ac_err"; then
1520   rm -rf conftest*
1521   eval "ac_cv_header_$ac_safe=yes"
1522 else
1523   echo "$ac_err" >&5
1524   echo "configure: failed program was:" >&5
1525   cat conftest.$ac_ext >&5
1526   rm -rf conftest*
1527   eval "ac_cv_header_$ac_safe=no"
1528 fi
1529 rm -f conftest*
1530 fi
1531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1532   echo "$ac_t""yes" 1>&6
1533     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1534   cat >> confdefs.h <<EOF
1535 #define $ac_tr_hdr 1
1536 EOF
1537  
1538 else
1539   echo "$ac_t""no" 1>&6
1540 fi
1541 done
1542
1543 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1544 do
1545 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1546 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1547 echo "configure:1548: checking for $ac_hdr" >&5
1548 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1549   echo $ac_n "(cached) $ac_c" 1>&6
1550 else
1551   cat > conftest.$ac_ext <<EOF
1552 #line 1553 "configure"
1553 #include "confdefs.h"
1554 #include <$ac_hdr>
1555 EOF
1556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1557 { (eval echo configure:1558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1558 ac_err=`grep -v '^ *+' conftest.out`
1559 if test -z "$ac_err"; then
1560   rm -rf conftest*
1561   eval "ac_cv_header_$ac_safe=yes"
1562 else
1563   echo "$ac_err" >&5
1564   echo "configure: failed program was:" >&5
1565   cat conftest.$ac_ext >&5
1566   rm -rf conftest*
1567   eval "ac_cv_header_$ac_safe=no"
1568 fi
1569 rm -f conftest*
1570 fi
1571 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1572   echo "$ac_t""yes" 1>&6
1573     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1574   cat >> confdefs.h <<EOF
1575 #define $ac_tr_hdr 1
1576 EOF
1577  
1578 else
1579   echo "$ac_t""no" 1>&6
1580 fi
1581 done
1582
1583 for ac_hdr in compat.h rpc/types.h rpc/xdr.h rpc/auth.h rpc/clnt.h
1584 do
1585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1586 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1587 echo "configure:1588: checking for $ac_hdr" >&5
1588 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1589   echo $ac_n "(cached) $ac_c" 1>&6
1590 else
1591   cat > conftest.$ac_ext <<EOF
1592 #line 1593 "configure"
1593 #include "confdefs.h"
1594 #include <$ac_hdr>
1595 EOF
1596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1597 { (eval echo configure:1598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1598 ac_err=`grep -v '^ *+' conftest.out`
1599 if test -z "$ac_err"; then
1600   rm -rf conftest*
1601   eval "ac_cv_header_$ac_safe=yes"
1602 else
1603   echo "$ac_err" >&5
1604   echo "configure: failed program was:" >&5
1605   cat conftest.$ac_ext >&5
1606   rm -rf conftest*
1607   eval "ac_cv_header_$ac_safe=no"
1608 fi
1609 rm -f conftest*
1610 fi
1611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1612   echo "$ac_t""yes" 1>&6
1613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1614   cat >> confdefs.h <<EOF
1615 #define $ac_tr_hdr 1
1616 EOF
1617  
1618 else
1619   echo "$ac_t""no" 1>&6
1620 fi
1621 done
1622
1623 for ac_hdr in rpcsvc/yp_prot.h rpcsvc/ypclnt.h sys/param.h ctype.h 
1624 do
1625 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1626 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1627 echo "configure:1628: checking for $ac_hdr" >&5
1628 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1629   echo $ac_n "(cached) $ac_c" 1>&6
1630 else
1631   cat > conftest.$ac_ext <<EOF
1632 #line 1633 "configure"
1633 #include "confdefs.h"
1634 #include <$ac_hdr>
1635 EOF
1636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1637 { (eval echo configure:1638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1638 ac_err=`grep -v '^ *+' conftest.out`
1639 if test -z "$ac_err"; then
1640   rm -rf conftest*
1641   eval "ac_cv_header_$ac_safe=yes"
1642 else
1643   echo "$ac_err" >&5
1644   echo "configure: failed program was:" >&5
1645   cat conftest.$ac_ext >&5
1646   rm -rf conftest*
1647   eval "ac_cv_header_$ac_safe=no"
1648 fi
1649 rm -f conftest*
1650 fi
1651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1652   echo "$ac_t""yes" 1>&6
1653     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1654   cat >> confdefs.h <<EOF
1655 #define $ac_tr_hdr 1
1656 EOF
1657  
1658 else
1659   echo "$ac_t""no" 1>&6
1660 fi
1661 done
1662
1663 for ac_hdr in sys/wait.h sys/resource.h sys/ioctl.h sys/mode.h
1664 do
1665 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1666 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1667 echo "configure:1668: checking for $ac_hdr" >&5
1668 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1669   echo $ac_n "(cached) $ac_c" 1>&6
1670 else
1671   cat > conftest.$ac_ext <<EOF
1672 #line 1673 "configure"
1673 #include "confdefs.h"
1674 #include <$ac_hdr>
1675 EOF
1676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1677 { (eval echo configure:1678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1678 ac_err=`grep -v '^ *+' conftest.out`
1679 if test -z "$ac_err"; then
1680   rm -rf conftest*
1681   eval "ac_cv_header_$ac_safe=yes"
1682 else
1683   echo "$ac_err" >&5
1684   echo "configure: failed program was:" >&5
1685   cat conftest.$ac_ext >&5
1686   rm -rf conftest*
1687   eval "ac_cv_header_$ac_safe=no"
1688 fi
1689 rm -f conftest*
1690 fi
1691 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1692   echo "$ac_t""yes" 1>&6
1693     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1694   cat >> confdefs.h <<EOF
1695 #define $ac_tr_hdr 1
1696 EOF
1697  
1698 else
1699   echo "$ac_t""no" 1>&6
1700 fi
1701 done
1702
1703 for ac_hdr in sys/filio.h string.h strings.h stdlib.h sys/socket.h
1704 do
1705 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1706 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1707 echo "configure:1708: checking for $ac_hdr" >&5
1708 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1709   echo $ac_n "(cached) $ac_c" 1>&6
1710 else
1711   cat > conftest.$ac_ext <<EOF
1712 #line 1713 "configure"
1713 #include "confdefs.h"
1714 #include <$ac_hdr>
1715 EOF
1716 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1717 { (eval echo configure:1718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1718 ac_err=`grep -v '^ *+' conftest.out`
1719 if test -z "$ac_err"; then
1720   rm -rf conftest*
1721   eval "ac_cv_header_$ac_safe=yes"
1722 else
1723   echo "$ac_err" >&5
1724   echo "configure: failed program was:" >&5
1725   cat conftest.$ac_ext >&5
1726   rm -rf conftest*
1727   eval "ac_cv_header_$ac_safe=no"
1728 fi
1729 rm -f conftest*
1730 fi
1731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1732   echo "$ac_t""yes" 1>&6
1733     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1734   cat >> confdefs.h <<EOF
1735 #define $ac_tr_hdr 1
1736 EOF
1737  
1738 else
1739   echo "$ac_t""no" 1>&6
1740 fi
1741 done
1742
1743 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h
1744 do
1745 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1746 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1747 echo "configure:1748: checking for $ac_hdr" >&5
1748 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1749   echo $ac_n "(cached) $ac_c" 1>&6
1750 else
1751   cat > conftest.$ac_ext <<EOF
1752 #line 1753 "configure"
1753 #include "confdefs.h"
1754 #include <$ac_hdr>
1755 EOF
1756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1757 { (eval echo configure:1758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1758 ac_err=`grep -v '^ *+' conftest.out`
1759 if test -z "$ac_err"; then
1760   rm -rf conftest*
1761   eval "ac_cv_header_$ac_safe=yes"
1762 else
1763   echo "$ac_err" >&5
1764   echo "configure: failed program was:" >&5
1765   cat conftest.$ac_ext >&5
1766   rm -rf conftest*
1767   eval "ac_cv_header_$ac_safe=no"
1768 fi
1769 rm -f conftest*
1770 fi
1771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1772   echo "$ac_t""yes" 1>&6
1773     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1774   cat >> confdefs.h <<EOF
1775 #define $ac_tr_hdr 1
1776 EOF
1777  
1778 else
1779   echo "$ac_t""no" 1>&6
1780 fi
1781 done
1782
1783 for ac_hdr in sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
1784 do
1785 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1786 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1787 echo "configure:1788: checking for $ac_hdr" >&5
1788 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1789   echo $ac_n "(cached) $ac_c" 1>&6
1790 else
1791   cat > conftest.$ac_ext <<EOF
1792 #line 1793 "configure"
1793 #include "confdefs.h"
1794 #include <$ac_hdr>
1795 EOF
1796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1797 { (eval echo configure:1798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1798 ac_err=`grep -v '^ *+' conftest.out`
1799 if test -z "$ac_err"; then
1800   rm -rf conftest*
1801   eval "ac_cv_header_$ac_safe=yes"
1802 else
1803   echo "$ac_err" >&5
1804   echo "configure: failed program was:" >&5
1805   cat conftest.$ac_ext >&5
1806   rm -rf conftest*
1807   eval "ac_cv_header_$ac_safe=no"
1808 fi
1809 rm -f conftest*
1810 fi
1811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1812   echo "$ac_t""yes" 1>&6
1813     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1814   cat >> confdefs.h <<EOF
1815 #define $ac_tr_hdr 1
1816 EOF
1817  
1818 else
1819   echo "$ac_t""no" 1>&6
1820 fi
1821 done
1822
1823 for ac_hdr in shadow.h netinet/tcp.h sys/security.h security/pam_appl.h
1824 do
1825 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1826 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1827 echo "configure:1828: checking for $ac_hdr" >&5
1828 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1829   echo $ac_n "(cached) $ac_c" 1>&6
1830 else
1831   cat > conftest.$ac_ext <<EOF
1832 #line 1833 "configure"
1833 #include "confdefs.h"
1834 #include <$ac_hdr>
1835 EOF
1836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1837 { (eval echo configure:1838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1838 ac_err=`grep -v '^ *+' conftest.out`
1839 if test -z "$ac_err"; then
1840   rm -rf conftest*
1841   eval "ac_cv_header_$ac_safe=yes"
1842 else
1843   echo "$ac_err" >&5
1844   echo "configure: failed program was:" >&5
1845   cat conftest.$ac_ext >&5
1846   rm -rf conftest*
1847   eval "ac_cv_header_$ac_safe=no"
1848 fi
1849 rm -f conftest*
1850 fi
1851 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1852   echo "$ac_t""yes" 1>&6
1853     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1854   cat >> confdefs.h <<EOF
1855 #define $ac_tr_hdr 1
1856 EOF
1857  
1858 else
1859   echo "$ac_t""no" 1>&6
1860 fi
1861 done
1862
1863 for ac_hdr in stropts.h poll.h readline.h history.h readline/readline.h
1864 do
1865 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1866 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1867 echo "configure:1868: checking for $ac_hdr" >&5
1868 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1869   echo $ac_n "(cached) $ac_c" 1>&6
1870 else
1871   cat > conftest.$ac_ext <<EOF
1872 #line 1873 "configure"
1873 #include "confdefs.h"
1874 #include <$ac_hdr>
1875 EOF
1876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1877 { (eval echo configure:1878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1878 ac_err=`grep -v '^ *+' conftest.out`
1879 if test -z "$ac_err"; then
1880   rm -rf conftest*
1881   eval "ac_cv_header_$ac_safe=yes"
1882 else
1883   echo "$ac_err" >&5
1884   echo "configure: failed program was:" >&5
1885   cat conftest.$ac_ext >&5
1886   rm -rf conftest*
1887   eval "ac_cv_header_$ac_safe=no"
1888 fi
1889 rm -f conftest*
1890 fi
1891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1892   echo "$ac_t""yes" 1>&6
1893     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1894   cat >> confdefs.h <<EOF
1895 #define $ac_tr_hdr 1
1896 EOF
1897  
1898 else
1899   echo "$ac_t""no" 1>&6
1900 fi
1901 done
1902
1903 for ac_hdr in readline/history.h sys/capability.h sysacll.h sys/syscall.h
1904 do
1905 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1906 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1907 echo "configure:1908: checking for $ac_hdr" >&5
1908 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1909   echo $ac_n "(cached) $ac_c" 1>&6
1910 else
1911   cat > conftest.$ac_ext <<EOF
1912 #line 1913 "configure"
1913 #include "confdefs.h"
1914 #include <$ac_hdr>
1915 EOF
1916 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1917 { (eval echo configure:1918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1918 ac_err=`grep -v '^ *+' conftest.out`
1919 if test -z "$ac_err"; then
1920   rm -rf conftest*
1921   eval "ac_cv_header_$ac_safe=yes"
1922 else
1923   echo "$ac_err" >&5
1924   echo "configure: failed program was:" >&5
1925   cat conftest.$ac_ext >&5
1926   rm -rf conftest*
1927   eval "ac_cv_header_$ac_safe=no"
1928 fi
1929 rm -f conftest*
1930 fi
1931 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1932   echo "$ac_t""yes" 1>&6
1933     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1934   cat >> confdefs.h <<EOF
1935 #define $ac_tr_hdr 1
1936 EOF
1937  
1938 else
1939   echo "$ac_t""no" 1>&6
1940 fi
1941 done
1942
1943 for ac_hdr in sys/acl.h sys/cdefs.h
1944 do
1945 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1946 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1947 echo "configure:1948: checking for $ac_hdr" >&5
1948 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1949   echo $ac_n "(cached) $ac_c" 1>&6
1950 else
1951   cat > conftest.$ac_ext <<EOF
1952 #line 1953 "configure"
1953 #include "confdefs.h"
1954 #include <$ac_hdr>
1955 EOF
1956 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1957 { (eval echo configure:1958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1958 ac_err=`grep -v '^ *+' conftest.out`
1959 if test -z "$ac_err"; then
1960   rm -rf conftest*
1961   eval "ac_cv_header_$ac_safe=yes"
1962 else
1963   echo "$ac_err" >&5
1964   echo "configure: failed program was:" >&5
1965   cat conftest.$ac_ext >&5
1966   rm -rf conftest*
1967   eval "ac_cv_header_$ac_safe=no"
1968 fi
1969 rm -f conftest*
1970 fi
1971 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1972   echo "$ac_t""yes" 1>&6
1973     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1974   cat >> confdefs.h <<EOF
1975 #define $ac_tr_hdr 1
1976 EOF
1977  
1978 else
1979   echo "$ac_t""no" 1>&6
1980 fi
1981 done
1982
1983
1984 echo $ac_n "checking size of int""... $ac_c" 1>&6
1985 echo "configure:1986: checking size of int" >&5
1986 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1987   echo $ac_n "(cached) $ac_c" 1>&6
1988 else
1989   if test "$cross_compiling" = yes; then
1990   ac_cv_sizeof_int=cross
1991 else
1992   cat > conftest.$ac_ext <<EOF
1993 #line 1994 "configure"
1994 #include "confdefs.h"
1995 #include <stdio.h>
1996 main()
1997 {
1998   FILE *f=fopen("conftestval", "w");
1999   if (!f) exit(1);
2000   fprintf(f, "%d\n", sizeof(int));
2001   exit(0);
2002 }
2003 EOF
2004 if { (eval echo configure:2005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2005 then
2006   ac_cv_sizeof_int=`cat conftestval`
2007 else
2008   echo "configure: failed program was:" >&5
2009   cat conftest.$ac_ext >&5
2010   rm -fr conftest*
2011   ac_cv_sizeof_int=0
2012 fi
2013 rm -fr conftest*
2014 fi
2015
2016 fi
2017 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2018 cat >> confdefs.h <<EOF
2019 #define SIZEOF_INT $ac_cv_sizeof_int
2020 EOF
2021
2022
2023 echo $ac_n "checking size of long""... $ac_c" 1>&6
2024 echo "configure:2025: checking size of long" >&5
2025 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2026   echo $ac_n "(cached) $ac_c" 1>&6
2027 else
2028   if test "$cross_compiling" = yes; then
2029   ac_cv_sizeof_long=cross
2030 else
2031   cat > conftest.$ac_ext <<EOF
2032 #line 2033 "configure"
2033 #include "confdefs.h"
2034 #include <stdio.h>
2035 main()
2036 {
2037   FILE *f=fopen("conftestval", "w");
2038   if (!f) exit(1);
2039   fprintf(f, "%d\n", sizeof(long));
2040   exit(0);
2041 }
2042 EOF
2043 if { (eval echo configure:2044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2044 then
2045   ac_cv_sizeof_long=`cat conftestval`
2046 else
2047   echo "configure: failed program was:" >&5
2048   cat conftest.$ac_ext >&5
2049   rm -fr conftest*
2050   ac_cv_sizeof_long=0
2051 fi
2052 rm -fr conftest*
2053 fi
2054
2055 fi
2056 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2057 cat >> confdefs.h <<EOF
2058 #define SIZEOF_LONG $ac_cv_sizeof_long
2059 EOF
2060
2061
2062 echo $ac_n "checking size of short""... $ac_c" 1>&6
2063 echo "configure:2064: checking size of short" >&5
2064 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2065   echo $ac_n "(cached) $ac_c" 1>&6
2066 else
2067   if test "$cross_compiling" = yes; then
2068   ac_cv_sizeof_short=cross
2069 else
2070   cat > conftest.$ac_ext <<EOF
2071 #line 2072 "configure"
2072 #include "confdefs.h"
2073 #include <stdio.h>
2074 main()
2075 {
2076   FILE *f=fopen("conftestval", "w");
2077   if (!f) exit(1);
2078   fprintf(f, "%d\n", sizeof(short));
2079   exit(0);
2080 }
2081 EOF
2082 if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2083 then
2084   ac_cv_sizeof_short=`cat conftestval`
2085 else
2086   echo "configure: failed program was:" >&5
2087   cat conftest.$ac_ext >&5
2088   rm -fr conftest*
2089   ac_cv_sizeof_short=0
2090 fi
2091 rm -fr conftest*
2092 fi
2093
2094 fi
2095 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2096 cat >> confdefs.h <<EOF
2097 #define SIZEOF_SHORT $ac_cv_sizeof_short
2098 EOF
2099
2100
2101
2102 echo $ac_n "checking for working const""... $ac_c" 1>&6
2103 echo "configure:2104: checking for working const" >&5
2104 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2105   echo $ac_n "(cached) $ac_c" 1>&6
2106 else
2107   cat > conftest.$ac_ext <<EOF
2108 #line 2109 "configure"
2109 #include "confdefs.h"
2110
2111 int main() {
2112
2113 /* Ultrix mips cc rejects this.  */
2114 typedef int charset[2]; const charset x;
2115 /* SunOS 4.1.1 cc rejects this.  */
2116 char const *const *ccp;
2117 char **p;
2118 /* NEC SVR4.0.2 mips cc rejects this.  */
2119 struct point {int x, y;};
2120 static struct point const zero = {0,0};
2121 /* AIX XL C 1.02.0.0 rejects this.
2122    It does not let you subtract one const X* pointer from another in an arm
2123    of an if-expression whose if-part is not a constant expression */
2124 const char *g = "string";
2125 ccp = &g + (g ? g-g : 0);
2126 /* HPUX 7.0 cc rejects these. */
2127 ++ccp;
2128 p = (char**) ccp;
2129 ccp = (char const *const *) p;
2130 { /* SCO 3.2v4 cc rejects this.  */
2131   char *t;
2132   char const *s = 0 ? (char *) 0 : (char const *) 0;
2133
2134   *t++ = 0;
2135 }
2136 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2137   int x[] = {25, 17};
2138   const int *foo = &x[0];
2139   ++foo;
2140 }
2141 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2142   typedef const int *iptr;
2143   iptr p = 0;
2144   ++p;
2145 }
2146 { /* AIX XL C 1.02.0.0 rejects this saying
2147      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2148   struct s { int j; const int *ap[3]; };
2149   struct s *b; b->j = 5;
2150 }
2151 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2152   const int foo = 10;
2153 }
2154
2155 ; return 0; }
2156 EOF
2157 if { (eval echo configure:2158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2158   rm -rf conftest*
2159   ac_cv_c_const=yes
2160 else
2161   echo "configure: failed program was:" >&5
2162   cat conftest.$ac_ext >&5
2163   rm -rf conftest*
2164   ac_cv_c_const=no
2165 fi
2166 rm -f conftest*
2167 fi
2168
2169 echo "$ac_t""$ac_cv_c_const" 1>&6
2170 if test $ac_cv_c_const = no; then
2171   cat >> confdefs.h <<\EOF
2172 #define const 
2173 EOF
2174
2175 fi
2176
2177 echo $ac_n "checking for inline""... $ac_c" 1>&6
2178 echo "configure:2179: checking for inline" >&5
2179 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2180   echo $ac_n "(cached) $ac_c" 1>&6
2181 else
2182   ac_cv_c_inline=no
2183 for ac_kw in inline __inline__ __inline; do
2184   cat > conftest.$ac_ext <<EOF
2185 #line 2186 "configure"
2186 #include "confdefs.h"
2187
2188 int main() {
2189 } $ac_kw foo() {
2190 ; return 0; }
2191 EOF
2192 if { (eval echo configure:2193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2193   rm -rf conftest*
2194   ac_cv_c_inline=$ac_kw; break
2195 else
2196   echo "configure: failed program was:" >&5
2197   cat conftest.$ac_ext >&5
2198 fi
2199 rm -f conftest*
2200 done
2201
2202 fi
2203
2204 echo "$ac_t""$ac_cv_c_inline" 1>&6
2205 case "$ac_cv_c_inline" in
2206   inline | yes) ;;
2207   no) cat >> confdefs.h <<\EOF
2208 #define inline 
2209 EOF
2210  ;;
2211   *)  cat >> confdefs.h <<EOF
2212 #define inline $ac_cv_c_inline
2213 EOF
2214  ;;
2215 esac
2216
2217 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2218 echo "configure:2219: checking whether byte ordering is bigendian" >&5
2219 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2220   echo $ac_n "(cached) $ac_c" 1>&6
2221 else
2222   ac_cv_c_bigendian=unknown
2223 # See if sys/param.h defines the BYTE_ORDER macro.
2224 cat > conftest.$ac_ext <<EOF
2225 #line 2226 "configure"
2226 #include "confdefs.h"
2227 #include <sys/types.h>
2228 #include <sys/param.h>
2229 int main() {
2230
2231 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2232  bogus endian macros
2233 #endif
2234 ; return 0; }
2235 EOF
2236 if { (eval echo configure:2237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2237   rm -rf conftest*
2238   # It does; now see whether it defined to BIG_ENDIAN or not.
2239 cat > conftest.$ac_ext <<EOF
2240 #line 2241 "configure"
2241 #include "confdefs.h"
2242 #include <sys/types.h>
2243 #include <sys/param.h>
2244 int main() {
2245
2246 #if BYTE_ORDER != BIG_ENDIAN
2247  not big endian
2248 #endif
2249 ; return 0; }
2250 EOF
2251 if { (eval echo configure:2252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2252   rm -rf conftest*
2253   ac_cv_c_bigendian=yes
2254 else
2255   echo "configure: failed program was:" >&5
2256   cat conftest.$ac_ext >&5
2257   rm -rf conftest*
2258   ac_cv_c_bigendian=no
2259 fi
2260 rm -f conftest*
2261 else
2262   echo "configure: failed program was:" >&5
2263   cat conftest.$ac_ext >&5
2264 fi
2265 rm -f conftest*
2266 if test $ac_cv_c_bigendian = unknown; then
2267 if test "$cross_compiling" = yes; then
2268     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2269 else
2270   cat > conftest.$ac_ext <<EOF
2271 #line 2272 "configure"
2272 #include "confdefs.h"
2273 main () {
2274   /* Are we little or big endian?  From Harbison&Steele.  */
2275   union
2276   {
2277     long l;
2278     char c[sizeof (long)];
2279   } u;
2280   u.l = 1;
2281   exit (u.c[sizeof (long) - 1] == 1);
2282 }
2283 EOF
2284 if { (eval echo configure:2285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2285 then
2286   ac_cv_c_bigendian=no
2287 else
2288   echo "configure: failed program was:" >&5
2289   cat conftest.$ac_ext >&5
2290   rm -fr conftest*
2291   ac_cv_c_bigendian=yes
2292 fi
2293 rm -fr conftest*
2294 fi
2295
2296 fi
2297 fi
2298
2299 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2300 if test $ac_cv_c_bigendian = yes; then
2301   cat >> confdefs.h <<\EOF
2302 #define WORDS_BIGENDIAN 1
2303 EOF
2304
2305 fi
2306
2307 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2308 echo "configure:2309: checking whether char is unsigned" >&5
2309 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2310   echo $ac_n "(cached) $ac_c" 1>&6
2311 else
2312   if test "$GCC" = yes; then
2313   # GCC predefines this symbol on systems where it applies.
2314 cat > conftest.$ac_ext <<EOF
2315 #line 2316 "configure"
2316 #include "confdefs.h"
2317 #ifdef __CHAR_UNSIGNED__
2318   yes
2319 #endif
2320
2321 EOF
2322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2323   egrep "yes" >/dev/null 2>&1; then
2324   rm -rf conftest*
2325   ac_cv_c_char_unsigned=yes
2326 else
2327   rm -rf conftest*
2328   ac_cv_c_char_unsigned=no
2329 fi
2330 rm -f conftest*
2331
2332 else
2333 if test "$cross_compiling" = yes; then
2334     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2335 else
2336   cat > conftest.$ac_ext <<EOF
2337 #line 2338 "configure"
2338 #include "confdefs.h"
2339 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2340 #if !defined(__STDC__) || __STDC__ != 1
2341 #define volatile
2342 #endif
2343 main() {
2344   volatile char c = 255; exit(c < 0);
2345 }
2346 EOF
2347 if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2348 then
2349   ac_cv_c_char_unsigned=yes
2350 else
2351   echo "configure: failed program was:" >&5
2352   cat conftest.$ac_ext >&5
2353   rm -fr conftest*
2354   ac_cv_c_char_unsigned=no
2355 fi
2356 rm -fr conftest*
2357 fi
2358
2359 fi
2360 fi
2361
2362 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2363 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2364   cat >> confdefs.h <<\EOF
2365 #define __CHAR_UNSIGNED__ 1
2366 EOF
2367
2368 fi
2369
2370
2371 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2372 echo "configure:2373: checking return type of signal handlers" >&5
2373 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2374   echo $ac_n "(cached) $ac_c" 1>&6
2375 else
2376   cat > conftest.$ac_ext <<EOF
2377 #line 2378 "configure"
2378 #include "confdefs.h"
2379 #include <sys/types.h>
2380 #include <signal.h>
2381 #ifdef signal
2382 #undef signal
2383 #endif
2384 #ifdef __cplusplus
2385 extern "C" void (*signal (int, void (*)(int)))(int);
2386 #else
2387 void (*signal ()) ();
2388 #endif
2389
2390 int main() {
2391 int i;
2392 ; return 0; }
2393 EOF
2394 if { (eval echo configure:2395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2395   rm -rf conftest*
2396   ac_cv_type_signal=void
2397 else
2398   echo "configure: failed program was:" >&5
2399   cat conftest.$ac_ext >&5
2400   rm -rf conftest*
2401   ac_cv_type_signal=int
2402 fi
2403 rm -f conftest*
2404 fi
2405
2406 echo "$ac_t""$ac_cv_type_signal" 1>&6
2407 cat >> confdefs.h <<EOF
2408 #define RETSIGTYPE $ac_cv_type_signal
2409 EOF
2410
2411
2412 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2413 echo "configure:2414: checking for uid_t in sys/types.h" >&5
2414 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2415   echo $ac_n "(cached) $ac_c" 1>&6
2416 else
2417   cat > conftest.$ac_ext <<EOF
2418 #line 2419 "configure"
2419 #include "confdefs.h"
2420 #include <sys/types.h>
2421 EOF
2422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2423   egrep "uid_t" >/dev/null 2>&1; then
2424   rm -rf conftest*
2425   ac_cv_type_uid_t=yes
2426 else
2427   rm -rf conftest*
2428   ac_cv_type_uid_t=no
2429 fi
2430 rm -f conftest*
2431
2432 fi
2433
2434 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2435 if test $ac_cv_type_uid_t = no; then
2436   cat >> confdefs.h <<\EOF
2437 #define uid_t int
2438 EOF
2439
2440   cat >> confdefs.h <<\EOF
2441 #define gid_t int
2442 EOF
2443
2444 fi
2445
2446 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2447 echo "configure:2448: checking for mode_t" >&5
2448 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2449   echo $ac_n "(cached) $ac_c" 1>&6
2450 else
2451   cat > conftest.$ac_ext <<EOF
2452 #line 2453 "configure"
2453 #include "confdefs.h"
2454 #include <sys/types.h>
2455 #if STDC_HEADERS
2456 #include <stdlib.h>
2457 #include <stddef.h>
2458 #endif
2459 EOF
2460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2461   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2462   rm -rf conftest*
2463   ac_cv_type_mode_t=yes
2464 else
2465   rm -rf conftest*
2466   ac_cv_type_mode_t=no
2467 fi
2468 rm -f conftest*
2469
2470 fi
2471 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2472 if test $ac_cv_type_mode_t = no; then
2473   cat >> confdefs.h <<\EOF
2474 #define mode_t int
2475 EOF
2476
2477 fi
2478
2479 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2480 echo "configure:2481: checking for off_t" >&5
2481 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2482   echo $ac_n "(cached) $ac_c" 1>&6
2483 else
2484   cat > conftest.$ac_ext <<EOF
2485 #line 2486 "configure"
2486 #include "confdefs.h"
2487 #include <sys/types.h>
2488 #if STDC_HEADERS
2489 #include <stdlib.h>
2490 #include <stddef.h>
2491 #endif
2492 EOF
2493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2494   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2495   rm -rf conftest*
2496   ac_cv_type_off_t=yes
2497 else
2498   rm -rf conftest*
2499   ac_cv_type_off_t=no
2500 fi
2501 rm -f conftest*
2502
2503 fi
2504 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2505 if test $ac_cv_type_off_t = no; then
2506   cat >> confdefs.h <<\EOF
2507 #define off_t long
2508 EOF
2509
2510 fi
2511
2512 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2513 echo "configure:2514: checking for size_t" >&5
2514 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2515   echo $ac_n "(cached) $ac_c" 1>&6
2516 else
2517   cat > conftest.$ac_ext <<EOF
2518 #line 2519 "configure"
2519 #include "confdefs.h"
2520 #include <sys/types.h>
2521 #if STDC_HEADERS
2522 #include <stdlib.h>
2523 #include <stddef.h>
2524 #endif
2525 EOF
2526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2527   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2528   rm -rf conftest*
2529   ac_cv_type_size_t=yes
2530 else
2531   rm -rf conftest*
2532   ac_cv_type_size_t=no
2533 fi
2534 rm -f conftest*
2535
2536 fi
2537 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2538 if test $ac_cv_type_size_t = no; then
2539   cat >> confdefs.h <<\EOF
2540 #define size_t unsigned
2541 EOF
2542
2543 fi
2544
2545 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2546 echo "configure:2547: checking for pid_t" >&5
2547 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2548   echo $ac_n "(cached) $ac_c" 1>&6
2549 else
2550   cat > conftest.$ac_ext <<EOF
2551 #line 2552 "configure"
2552 #include "confdefs.h"
2553 #include <sys/types.h>
2554 #if STDC_HEADERS
2555 #include <stdlib.h>
2556 #include <stddef.h>
2557 #endif
2558 EOF
2559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2560   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2561   rm -rf conftest*
2562   ac_cv_type_pid_t=yes
2563 else
2564   rm -rf conftest*
2565   ac_cv_type_pid_t=no
2566 fi
2567 rm -f conftest*
2568
2569 fi
2570 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2571 if test $ac_cv_type_pid_t = no; then
2572   cat >> confdefs.h <<\EOF
2573 #define pid_t int
2574 EOF
2575
2576 fi
2577
2578 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
2579 echo "configure:2580: checking for st_rdev in struct stat" >&5
2580 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
2581   echo $ac_n "(cached) $ac_c" 1>&6
2582 else
2583   cat > conftest.$ac_ext <<EOF
2584 #line 2585 "configure"
2585 #include "confdefs.h"
2586 #include <sys/types.h>
2587 #include <sys/stat.h>
2588 int main() {
2589 struct stat s; s.st_rdev;
2590 ; return 0; }
2591 EOF
2592 if { (eval echo configure:2593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2593   rm -rf conftest*
2594   ac_cv_struct_st_rdev=yes
2595 else
2596   echo "configure: failed program was:" >&5
2597   cat conftest.$ac_ext >&5
2598   rm -rf conftest*
2599   ac_cv_struct_st_rdev=no
2600 fi
2601 rm -f conftest*
2602 fi
2603
2604 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
2605 if test $ac_cv_struct_st_rdev = yes; then
2606   cat >> confdefs.h <<\EOF
2607 #define HAVE_ST_RDEV 1
2608 EOF
2609
2610 fi
2611
2612 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
2613 echo "configure:2614: checking for ino_t" >&5
2614 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
2615   echo $ac_n "(cached) $ac_c" 1>&6
2616 else
2617   cat > conftest.$ac_ext <<EOF
2618 #line 2619 "configure"
2619 #include "confdefs.h"
2620 #include <sys/types.h>
2621 #if STDC_HEADERS
2622 #include <stdlib.h>
2623 #include <stddef.h>
2624 #endif
2625 EOF
2626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2627   egrep "ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2628   rm -rf conftest*
2629   ac_cv_type_ino_t=yes
2630 else
2631   rm -rf conftest*
2632   ac_cv_type_ino_t=no
2633 fi
2634 rm -f conftest*
2635
2636 fi
2637 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
2638 if test $ac_cv_type_ino_t = no; then
2639   cat >> confdefs.h <<\EOF
2640 #define ino_t unsigned
2641 EOF
2642
2643 fi
2644
2645 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
2646 echo "configure:2647: checking for loff_t" >&5
2647 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
2648   echo $ac_n "(cached) $ac_c" 1>&6
2649 else
2650   cat > conftest.$ac_ext <<EOF
2651 #line 2652 "configure"
2652 #include "confdefs.h"
2653 #include <sys/types.h>
2654 #if STDC_HEADERS
2655 #include <stdlib.h>
2656 #include <stddef.h>
2657 #endif
2658 EOF
2659 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2660   egrep "loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2661   rm -rf conftest*
2662   ac_cv_type_loff_t=yes
2663 else
2664   rm -rf conftest*
2665   ac_cv_type_loff_t=no
2666 fi
2667 rm -f conftest*
2668
2669 fi
2670 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
2671 if test $ac_cv_type_loff_t = no; then
2672   cat >> confdefs.h <<\EOF
2673 #define loff_t off_t
2674 EOF
2675
2676 fi
2677
2678 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
2679 echo "configure:2680: checking for offset_t" >&5
2680 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
2681   echo $ac_n "(cached) $ac_c" 1>&6
2682 else
2683   cat > conftest.$ac_ext <<EOF
2684 #line 2685 "configure"
2685 #include "confdefs.h"
2686 #include <sys/types.h>
2687 #if STDC_HEADERS
2688 #include <stdlib.h>
2689 #include <stddef.h>
2690 #endif
2691 EOF
2692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2693   egrep "offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2694   rm -rf conftest*
2695   ac_cv_type_offset_t=yes
2696 else
2697   rm -rf conftest*
2698   ac_cv_type_offset_t=no
2699 fi
2700 rm -f conftest*
2701
2702 fi
2703 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
2704 if test $ac_cv_type_offset_t = no; then
2705   cat >> confdefs.h <<\EOF
2706 #define offset_t loff_t
2707 EOF
2708
2709 fi
2710
2711 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
2712 echo "configure:2713: checking for ssize_t" >&5
2713 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
2714   echo $ac_n "(cached) $ac_c" 1>&6
2715 else
2716   cat > conftest.$ac_ext <<EOF
2717 #line 2718 "configure"
2718 #include "confdefs.h"
2719 #include <sys/types.h>
2720 #if STDC_HEADERS
2721 #include <stdlib.h>
2722 #include <stddef.h>
2723 #endif
2724 EOF
2725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2726   egrep "ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2727   rm -rf conftest*
2728   ac_cv_type_ssize_t=yes
2729 else
2730   rm -rf conftest*
2731   ac_cv_type_ssize_t=no
2732 fi
2733 rm -f conftest*
2734
2735 fi
2736 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
2737 if test $ac_cv_type_ssize_t = no; then
2738   cat >> confdefs.h <<\EOF
2739 #define ssize_t int
2740 EOF
2741
2742 fi
2743
2744
2745 echo $ac_n "checking for errno in errno.h""... $ac_c" 1>&6
2746 echo "configure:2747: checking for errno in errno.h" >&5
2747 if eval "test \"`echo '$''{'samba_cv_errno'+set}'`\" = set"; then
2748   echo $ac_n "(cached) $ac_c" 1>&6
2749 else
2750   
2751     cat > conftest.$ac_ext <<EOF
2752 #line 2753 "configure"
2753 #include "confdefs.h"
2754 #include <errno.h>
2755 int main() {
2756 int i = errno
2757 ; return 0; }
2758 EOF
2759 if { (eval echo configure:2760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2760   rm -rf conftest*
2761   samba_cv_errno=yes
2762 else
2763   echo "configure: failed program was:" >&5
2764   cat conftest.$ac_ext >&5
2765   rm -rf conftest*
2766   samba_cv_have_errno_decl=no
2767 fi
2768 rm -f conftest*
2769 fi
2770
2771 echo "$ac_t""$samba_cv_errno" 1>&6
2772 if test x"$samba_cv_errno" = x"yes"; then
2773    cat >> confdefs.h <<\EOF
2774 #define HAVE_ERRNO_DECL 1
2775 EOF
2776
2777 fi
2778
2779 # stupid glibc has the functions but no declaration. grrrr.
2780 echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
2781 echo "configure:2782: checking for setresuid declaration" >&5
2782 if eval "test \"`echo '$''{'samba_cv_have_setresuid_decl'+set}'`\" = set"; then
2783   echo $ac_n "(cached) $ac_c" 1>&6
2784 else
2785   
2786     cat > conftest.$ac_ext <<EOF
2787 #line 2788 "configure"
2788 #include "confdefs.h"
2789 #include <unistd.h>
2790 int main() {
2791 int i = setresuid
2792 ; return 0; }
2793 EOF
2794 if { (eval echo configure:2795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2795   rm -rf conftest*
2796   samba_cv_have_setresuid_decl=yes
2797 else
2798   echo "configure: failed program was:" >&5
2799   cat conftest.$ac_ext >&5
2800   rm -rf conftest*
2801   samba_cv_have_setresuid_decl=no
2802 fi
2803 rm -f conftest*
2804 fi
2805
2806 echo "$ac_t""$samba_cv_have_setresuid_decl" 1>&6
2807 if test x"$samba_cv_have_setresuid_decl" = x"yes"; then
2808     cat >> confdefs.h <<\EOF
2809 #define HAVE_SETRESUID_DECL 1
2810 EOF
2811
2812 fi
2813
2814 # and glibc has setresuid under linux but the function does
2815 # nothing until kernel 2.1.44! very dumb.
2816 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
2817 echo "configure:2818: checking for real setresuid" >&5
2818 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
2819   echo $ac_n "(cached) $ac_c" 1>&6
2820 else
2821   
2822     if test "$cross_compiling" = yes; then
2823   samba_cv_have_setresuid=cross
2824 else
2825   cat > conftest.$ac_ext <<EOF
2826 #line 2827 "configure"
2827 #include "confdefs.h"
2828 #include <errno.h>
2829 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
2830 EOF
2831 if { (eval echo configure:2832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2832 then
2833   samba_cv_have_setresuid=yes
2834 else
2835   echo "configure: failed program was:" >&5
2836   cat conftest.$ac_ext >&5
2837   rm -fr conftest*
2838   samba_cv_have_setresuid=no
2839 fi
2840 rm -fr conftest*
2841 fi
2842
2843 fi
2844
2845 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
2846 if test x"$samba_cv_have_setresuid" = x"yes"; then
2847     cat >> confdefs.h <<\EOF
2848 #define HAVE_SETRESUID 1
2849 EOF
2850
2851 fi
2852
2853 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
2854 echo "configure:2855: checking for 8-bit clean memcmp" >&5
2855 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
2856   echo $ac_n "(cached) $ac_c" 1>&6
2857 else
2858   if test "$cross_compiling" = yes; then
2859   ac_cv_func_memcmp_clean=no
2860 else
2861   cat > conftest.$ac_ext <<EOF
2862 #line 2863 "configure"
2863 #include "confdefs.h"
2864
2865 main()
2866 {
2867   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
2868   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
2869 }
2870
2871 EOF
2872 if { (eval echo configure:2873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2873 then
2874   ac_cv_func_memcmp_clean=yes
2875 else
2876   echo "configure: failed program was:" >&5
2877   cat conftest.$ac_ext >&5
2878   rm -fr conftest*
2879   ac_cv_func_memcmp_clean=no
2880 fi
2881 rm -fr conftest*
2882 fi
2883
2884 fi
2885
2886 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
2887 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
2888
2889
2890 ###############################################
2891 # test for where we get crypt() from
2892 for ac_func in crypt
2893 do
2894 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2895 echo "configure:2896: checking for $ac_func" >&5
2896 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2897   echo $ac_n "(cached) $ac_c" 1>&6
2898 else
2899   cat > conftest.$ac_ext <<EOF
2900 #line 2901 "configure"
2901 #include "confdefs.h"
2902 /* System header to define __stub macros and hopefully few prototypes,
2903     which can conflict with char $ac_func(); below.  */
2904 #include <assert.h>
2905 /* Override any gcc2 internal prototype to avoid an error.  */
2906 /* We use char because int might match the return type of a gcc2
2907     builtin and then its argument prototype would still apply.  */
2908 char $ac_func();
2909
2910 int main() {
2911
2912 /* The GNU C library defines this for functions which it implements
2913     to always fail with ENOSYS.  Some functions are actually named
2914     something starting with __ and the normal name is an alias.  */
2915 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2916 choke me
2917 #else
2918 $ac_func();
2919 #endif
2920
2921 ; return 0; }
2922 EOF
2923 if { (eval echo configure:2924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2924   rm -rf conftest*
2925   eval "ac_cv_func_$ac_func=yes"
2926 else
2927   echo "configure: failed program was:" >&5
2928   cat conftest.$ac_ext >&5
2929   rm -rf conftest*
2930   eval "ac_cv_func_$ac_func=no"
2931 fi
2932 rm -f conftest*
2933 fi
2934
2935 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2936   echo "$ac_t""yes" 1>&6
2937     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2938   cat >> confdefs.h <<EOF
2939 #define $ac_tr_func 1
2940 EOF
2941  
2942 else
2943   echo "$ac_t""no" 1>&6
2944 fi
2945 done
2946
2947 if test x"$ac_cv_func_crypt" = x"no"; then
2948     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
2949 echo "configure:2950: checking for crypt in -lcrypt" >&5
2950 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
2951 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2952   echo $ac_n "(cached) $ac_c" 1>&6
2953 else
2954   ac_save_LIBS="$LIBS"
2955 LIBS="-lcrypt  $LIBS"
2956 cat > conftest.$ac_ext <<EOF
2957 #line 2958 "configure"
2958 #include "confdefs.h"
2959 /* Override any gcc2 internal prototype to avoid an error.  */
2960 /* We use char because int might match the return type of a gcc2
2961     builtin and then its argument prototype would still apply.  */
2962 char crypt();
2963
2964 int main() {
2965 crypt()
2966 ; return 0; }
2967 EOF
2968 if { (eval echo configure:2969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2969   rm -rf conftest*
2970   eval "ac_cv_lib_$ac_lib_var=yes"
2971 else
2972   echo "configure: failed program was:" >&5
2973   cat conftest.$ac_ext >&5
2974   rm -rf conftest*
2975   eval "ac_cv_lib_$ac_lib_var=no"
2976 fi
2977 rm -f conftest*
2978 LIBS="$ac_save_LIBS"
2979
2980 fi
2981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2982   echo "$ac_t""yes" 1>&6
2983   LIBS="$LIBS -lcrypt";
2984         cat >> confdefs.h <<\EOF
2985 #define HAVE_CRYPT 1
2986 EOF
2987
2988 else
2989   echo "$ac_t""no" 1>&6
2990 fi
2991
2992 fi
2993
2994
2995 ###############################################
2996 # test for where we get pam_authenticate() from
2997 # might need libdl for this to work
2998 if test "$ac_cv_header_security_pam_appl_h" = "yes"; then
2999   echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
3000 echo "configure:3001: checking for main in -ldl" >&5
3001 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
3002 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3003   echo $ac_n "(cached) $ac_c" 1>&6
3004 else
3005   ac_save_LIBS="$LIBS"
3006 LIBS="-ldl  $LIBS"
3007 cat > conftest.$ac_ext <<EOF
3008 #line 3009 "configure"
3009 #include "confdefs.h"
3010
3011 int main() {
3012 main()
3013 ; return 0; }
3014 EOF
3015 if { (eval echo configure:3016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3016   rm -rf conftest*
3017   eval "ac_cv_lib_$ac_lib_var=yes"
3018 else
3019   echo "configure: failed program was:" >&5
3020   cat conftest.$ac_ext >&5
3021   rm -rf conftest*
3022   eval "ac_cv_lib_$ac_lib_var=no"
3023 fi
3024 rm -f conftest*
3025 LIBS="$ac_save_LIBS"
3026
3027 fi
3028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3029   echo "$ac_t""yes" 1>&6
3030     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3031     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3032   cat >> confdefs.h <<EOF
3033 #define $ac_tr_lib 1
3034 EOF
3035
3036   LIBS="-ldl $LIBS"
3037
3038 else
3039   echo "$ac_t""no" 1>&6
3040 fi
3041
3042 fi
3043 for ac_func in pam_authenticate
3044 do
3045 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3046 echo "configure:3047: checking for $ac_func" >&5
3047 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3048   echo $ac_n "(cached) $ac_c" 1>&6
3049 else
3050   cat > conftest.$ac_ext <<EOF
3051 #line 3052 "configure"
3052 #include "confdefs.h"
3053 /* System header to define __stub macros and hopefully few prototypes,
3054     which can conflict with char $ac_func(); below.  */
3055 #include <assert.h>
3056 /* Override any gcc2 internal prototype to avoid an error.  */
3057 /* We use char because int might match the return type of a gcc2
3058     builtin and then its argument prototype would still apply.  */
3059 char $ac_func();
3060
3061 int main() {
3062
3063 /* The GNU C library defines this for functions which it implements
3064     to always fail with ENOSYS.  Some functions are actually named
3065     something starting with __ and the normal name is an alias.  */
3066 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3067 choke me
3068 #else
3069 $ac_func();
3070 #endif
3071
3072 ; return 0; }
3073 EOF
3074 if { (eval echo configure:3075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3075   rm -rf conftest*
3076   eval "ac_cv_func_$ac_func=yes"
3077 else
3078   echo "configure: failed program was:" >&5
3079   cat conftest.$ac_ext >&5
3080   rm -rf conftest*
3081   eval "ac_cv_func_$ac_func=no"
3082 fi
3083 rm -f conftest*
3084 fi
3085
3086 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3087   echo "$ac_t""yes" 1>&6
3088     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3089   cat >> confdefs.h <<EOF
3090 #define $ac_tr_func 1
3091 EOF
3092  
3093 else
3094   echo "$ac_t""no" 1>&6
3095 fi
3096 done
3097
3098 if test x"$ac_cv_func_pam_authenticate" = x"no"; then
3099     echo $ac_n "checking for pam_authenticate in -lpam""... $ac_c" 1>&6
3100 echo "configure:3101: checking for pam_authenticate in -lpam" >&5
3101 ac_lib_var=`echo pam'_'pam_authenticate | sed 'y%./+-%__p_%'`
3102 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3103   echo $ac_n "(cached) $ac_c" 1>&6
3104 else
3105   ac_save_LIBS="$LIBS"
3106 LIBS="-lpam  $LIBS"
3107 cat > conftest.$ac_ext <<EOF
3108 #line 3109 "configure"
3109 #include "confdefs.h"
3110 /* Override any gcc2 internal prototype to avoid an error.  */
3111 /* We use char because int might match the return type of a gcc2
3112     builtin and then its argument prototype would still apply.  */
3113 char pam_authenticate();
3114
3115 int main() {
3116 pam_authenticate()
3117 ; return 0; }
3118 EOF
3119 if { (eval echo configure:3120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3120   rm -rf conftest*
3121   eval "ac_cv_lib_$ac_lib_var=yes"
3122 else
3123   echo "configure: failed program was:" >&5
3124   cat conftest.$ac_ext >&5
3125   rm -rf conftest*
3126   eval "ac_cv_lib_$ac_lib_var=no"
3127 fi
3128 rm -f conftest*
3129 LIBS="$ac_save_LIBS"
3130
3131 fi
3132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3133   echo "$ac_t""yes" 1>&6
3134   LIBS="$LIBS -lpam"
3135         cat >> confdefs.h <<\EOF
3136 #define HAVE_PAM_AUTHENTICATE 1
3137 EOF
3138
3139 else
3140   echo "$ac_t""no" 1>&6
3141 fi
3142
3143 fi
3144
3145
3146 ###############################################
3147 # test for where we get readline() from
3148 if test "$ac_cv_header_readline_h" = "yes" ||
3149    test "$ac_cv_header_readline_readline_h" = "yes"; then
3150   echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
3151 echo "configure:3152: checking for readline in -lreadline" >&5
3152 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
3153 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3154   echo $ac_n "(cached) $ac_c" 1>&6
3155 else
3156   ac_save_LIBS="$LIBS"
3157 LIBS="-lreadline  $LIBS"
3158 cat > conftest.$ac_ext <<EOF
3159 #line 3160 "configure"
3160 #include "confdefs.h"
3161 /* Override any gcc2 internal prototype to avoid an error.  */
3162 /* We use char because int might match the return type of a gcc2
3163     builtin and then its argument prototype would still apply.  */
3164 char readline();
3165
3166 int main() {
3167 readline()
3168 ; return 0; }
3169 EOF
3170 if { (eval echo configure:3171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3171   rm -rf conftest*
3172   eval "ac_cv_lib_$ac_lib_var=yes"
3173 else
3174   echo "configure: failed program was:" >&5
3175   cat conftest.$ac_ext >&5
3176   rm -rf conftest*
3177   eval "ac_cv_lib_$ac_lib_var=no"
3178 fi
3179 rm -f conftest*
3180 LIBS="$ac_save_LIBS"
3181
3182 fi
3183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3184   echo "$ac_t""yes" 1>&6
3185     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3186     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3187   cat >> confdefs.h <<EOF
3188 #define $ac_tr_lib 1
3189 EOF
3190
3191   LIBS="-lreadline $LIBS"
3192
3193 else
3194   echo "$ac_t""no" 1>&6
3195 fi
3196
3197 fi
3198
3199
3200 # The following test taken from the cvs sources
3201 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
3202 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
3203 # libsocket.so which has a bad implementation of gethostbyname (it
3204 # only looks in /etc/hosts), so we only look for -lsocket if we need
3205 # it.
3206 for ac_func in connect
3207 do
3208 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3209 echo "configure:3210: checking for $ac_func" >&5
3210 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3211   echo $ac_n "(cached) $ac_c" 1>&6
3212 else
3213   cat > conftest.$ac_ext <<EOF
3214 #line 3215 "configure"
3215 #include "confdefs.h"
3216 /* System header to define __stub macros and hopefully few prototypes,
3217     which can conflict with char $ac_func(); below.  */
3218 #include <assert.h>
3219 /* Override any gcc2 internal prototype to avoid an error.  */
3220 /* We use char because int might match the return type of a gcc2
3221     builtin and then its argument prototype would still apply.  */
3222 char $ac_func();
3223
3224 int main() {
3225
3226 /* The GNU C library defines this for functions which it implements
3227     to always fail with ENOSYS.  Some functions are actually named
3228     something starting with __ and the normal name is an alias.  */
3229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3230 choke me
3231 #else
3232 $ac_func();
3233 #endif
3234
3235 ; return 0; }
3236 EOF
3237 if { (eval echo configure:3238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3238   rm -rf conftest*
3239   eval "ac_cv_func_$ac_func=yes"
3240 else
3241   echo "configure: failed program was:" >&5
3242   cat conftest.$ac_ext >&5
3243   rm -rf conftest*
3244   eval "ac_cv_func_$ac_func=no"
3245 fi
3246 rm -f conftest*
3247 fi
3248
3249 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3250   echo "$ac_t""yes" 1>&6
3251     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3252   cat >> confdefs.h <<EOF
3253 #define $ac_tr_func 1
3254 EOF
3255  
3256 else
3257   echo "$ac_t""no" 1>&6
3258 fi
3259 done
3260
3261 if test x"$ac_cv_func_connect" = x"no"; then
3262     case "$LIBS" in
3263     *-lnsl*) ;;
3264     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
3265 echo "configure:3266: checking for printf in -lnsl_s" >&5
3266 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
3267 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3268   echo $ac_n "(cached) $ac_c" 1>&6
3269 else
3270   ac_save_LIBS="$LIBS"
3271 LIBS="-lnsl_s  $LIBS"
3272 cat > conftest.$ac_ext <<EOF
3273 #line 3274 "configure"
3274 #include "confdefs.h"
3275 /* Override any gcc2 internal prototype to avoid an error.  */
3276 /* We use char because int might match the return type of a gcc2
3277     builtin and then its argument prototype would still apply.  */
3278 char printf();
3279
3280 int main() {
3281 printf()
3282 ; return 0; }
3283 EOF
3284 if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3285   rm -rf conftest*
3286   eval "ac_cv_lib_$ac_lib_var=yes"
3287 else
3288   echo "configure: failed program was:" >&5
3289   cat conftest.$ac_ext >&5
3290   rm -rf conftest*
3291   eval "ac_cv_lib_$ac_lib_var=no"
3292 fi
3293 rm -f conftest*
3294 LIBS="$ac_save_LIBS"
3295
3296 fi
3297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3298   echo "$ac_t""yes" 1>&6
3299     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3300     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3301   cat >> confdefs.h <<EOF
3302 #define $ac_tr_lib 1
3303 EOF
3304
3305   LIBS="-lnsl_s $LIBS"
3306
3307 else
3308   echo "$ac_t""no" 1>&6
3309 fi
3310  ;;
3311     esac
3312     case "$LIBS" in
3313     *-lnsl*) ;;
3314     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
3315 echo "configure:3316: checking for printf in -lnsl" >&5
3316 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
3317 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3318   echo $ac_n "(cached) $ac_c" 1>&6
3319 else
3320   ac_save_LIBS="$LIBS"
3321 LIBS="-lnsl  $LIBS"
3322 cat > conftest.$ac_ext <<EOF
3323 #line 3324 "configure"
3324 #include "confdefs.h"
3325 /* Override any gcc2 internal prototype to avoid an error.  */
3326 /* We use char because int might match the return type of a gcc2
3327     builtin and then its argument prototype would still apply.  */
3328 char printf();
3329
3330 int main() {
3331 printf()
3332 ; return 0; }
3333 EOF
3334 if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3335   rm -rf conftest*
3336   eval "ac_cv_lib_$ac_lib_var=yes"
3337 else
3338   echo "configure: failed program was:" >&5
3339   cat conftest.$ac_ext >&5
3340   rm -rf conftest*
3341   eval "ac_cv_lib_$ac_lib_var=no"
3342 fi
3343 rm -f conftest*
3344 LIBS="$ac_save_LIBS"
3345
3346 fi
3347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3348   echo "$ac_t""yes" 1>&6
3349     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3350     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3351   cat >> confdefs.h <<EOF
3352 #define $ac_tr_lib 1
3353 EOF
3354
3355   LIBS="-lnsl $LIBS"
3356
3357 else
3358   echo "$ac_t""no" 1>&6
3359 fi
3360  ;;
3361     esac
3362     case "$LIBS" in
3363     *-lsocket*) ;;
3364     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3365 echo "configure:3366: checking for connect in -lsocket" >&5
3366 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3367 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3368   echo $ac_n "(cached) $ac_c" 1>&6
3369 else
3370   ac_save_LIBS="$LIBS"
3371 LIBS="-lsocket  $LIBS"
3372 cat > conftest.$ac_ext <<EOF
3373 #line 3374 "configure"
3374 #include "confdefs.h"
3375 /* Override any gcc2 internal prototype to avoid an error.  */
3376 /* We use char because int might match the return type of a gcc2
3377     builtin and then its argument prototype would still apply.  */
3378 char connect();
3379
3380 int main() {
3381 connect()
3382 ; return 0; }
3383 EOF
3384 if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3385   rm -rf conftest*
3386   eval "ac_cv_lib_$ac_lib_var=yes"
3387 else
3388   echo "configure: failed program was:" >&5
3389   cat conftest.$ac_ext >&5
3390   rm -rf conftest*
3391   eval "ac_cv_lib_$ac_lib_var=no"
3392 fi
3393 rm -f conftest*
3394 LIBS="$ac_save_LIBS"
3395
3396 fi
3397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3398   echo "$ac_t""yes" 1>&6
3399     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3400     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3401   cat >> confdefs.h <<EOF
3402 #define $ac_tr_lib 1
3403 EOF
3404
3405   LIBS="-lsocket $LIBS"
3406
3407 else
3408   echo "$ac_t""no" 1>&6
3409 fi
3410  ;;
3411     esac
3412     case "$LIBS" in
3413     *-linet*) ;;
3414     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
3415 echo "configure:3416: checking for connect in -linet" >&5
3416 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
3417 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3418   echo $ac_n "(cached) $ac_c" 1>&6
3419 else
3420   ac_save_LIBS="$LIBS"
3421 LIBS="-linet  $LIBS"
3422 cat > conftest.$ac_ext <<EOF
3423 #line 3424 "configure"
3424 #include "confdefs.h"
3425 /* Override any gcc2 internal prototype to avoid an error.  */
3426 /* We use char because int might match the return type of a gcc2
3427     builtin and then its argument prototype would still apply.  */
3428 char connect();
3429
3430 int main() {
3431 connect()
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_lib_$ac_lib_var=yes"
3437 else
3438   echo "configure: failed program was:" >&5
3439   cat conftest.$ac_ext >&5
3440   rm -rf conftest*
3441   eval "ac_cv_lib_$ac_lib_var=no"
3442 fi
3443 rm -f conftest*
3444 LIBS="$ac_save_LIBS"
3445
3446 fi
3447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3448   echo "$ac_t""yes" 1>&6
3449     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3450     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3451   cat >> confdefs.h <<EOF
3452 #define $ac_tr_lib 1
3453 EOF
3454
3455   LIBS="-linet $LIBS"
3456
3457 else
3458   echo "$ac_t""no" 1>&6
3459 fi
3460  ;;
3461     esac
3462             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
3463        test x"$ac_cv_lib_inet_connect" = x"yes"; then
3464         # ac_cv_func_connect=yes
3465         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
3466         cat >> confdefs.h <<\EOF
3467 #define HAVE_CONNECT 1
3468 EOF
3469
3470     fi
3471 fi
3472
3473
3474 for ac_func in waitpid getcwd strdup strerror chown chmod chroot
3475 do
3476 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3477 echo "configure:3478: checking for $ac_func" >&5
3478 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3479   echo $ac_n "(cached) $ac_c" 1>&6
3480 else
3481   cat > conftest.$ac_ext <<EOF
3482 #line 3483 "configure"
3483 #include "confdefs.h"
3484 /* System header to define __stub macros and hopefully few prototypes,
3485     which can conflict with char $ac_func(); below.  */
3486 #include <assert.h>
3487 /* Override any gcc2 internal prototype to avoid an error.  */
3488 /* We use char because int might match the return type of a gcc2
3489     builtin and then its argument prototype would still apply.  */
3490 char $ac_func();
3491
3492 int main() {
3493
3494 /* The GNU C library defines this for functions which it implements
3495     to always fail with ENOSYS.  Some functions are actually named
3496     something starting with __ and the normal name is an alias.  */
3497 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3498 choke me
3499 #else
3500 $ac_func();
3501 #endif
3502
3503 ; return 0; }
3504 EOF
3505 if { (eval echo configure:3506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3506   rm -rf conftest*
3507   eval "ac_cv_func_$ac_func=yes"
3508 else
3509   echo "configure: failed program was:" >&5
3510   cat conftest.$ac_ext >&5
3511   rm -rf conftest*
3512   eval "ac_cv_func_$ac_func=no"
3513 fi
3514 rm -f conftest*
3515 fi
3516
3517 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3518   echo "$ac_t""yes" 1>&6
3519     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3520   cat >> confdefs.h <<EOF
3521 #define $ac_tr_func 1
3522 EOF
3523  
3524 else
3525   echo "$ac_t""no" 1>&6
3526 fi
3527 done
3528
3529 for ac_func in fstat strchr utime utimes getrlimit fsync execl bzero memset
3530 do
3531 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3532 echo "configure:3533: checking for $ac_func" >&5
3533 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3534   echo $ac_n "(cached) $ac_c" 1>&6
3535 else
3536   cat > conftest.$ac_ext <<EOF
3537 #line 3538 "configure"
3538 #include "confdefs.h"
3539 /* System header to define __stub macros and hopefully few prototypes,
3540     which can conflict with char $ac_func(); below.  */
3541 #include <assert.h>
3542 /* Override any gcc2 internal prototype to avoid an error.  */
3543 /* We use char because int might match the return type of a gcc2
3544     builtin and then its argument prototype would still apply.  */
3545 char $ac_func();
3546
3547 int main() {
3548
3549 /* The GNU C library defines this for functions which it implements
3550     to always fail with ENOSYS.  Some functions are actually named
3551     something starting with __ and the normal name is an alias.  */
3552 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3553 choke me
3554 #else
3555 $ac_func();
3556 #endif
3557
3558 ; return 0; }
3559 EOF
3560 if { (eval echo configure:3561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3561   rm -rf conftest*
3562   eval "ac_cv_func_$ac_func=yes"
3563 else
3564   echo "configure: failed program was:" >&5
3565   cat conftest.$ac_ext >&5
3566   rm -rf conftest*
3567   eval "ac_cv_func_$ac_func=no"
3568 fi
3569 rm -f conftest*
3570 fi
3571
3572 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3573   echo "$ac_t""yes" 1>&6
3574     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3575   cat >> confdefs.h <<EOF
3576 #define $ac_tr_func 1
3577 EOF
3578  
3579 else
3580   echo "$ac_t""no" 1>&6
3581 fi
3582 done
3583
3584 for ac_func in memmove vsnprintf setsid glob strpbrk pipe crypt16 getauthuid
3585 do
3586 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3587 echo "configure:3588: checking for $ac_func" >&5
3588 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3589   echo $ac_n "(cached) $ac_c" 1>&6
3590 else
3591   cat > conftest.$ac_ext <<EOF
3592 #line 3593 "configure"
3593 #include "confdefs.h"
3594 /* System header to define __stub macros and hopefully few prototypes,
3595     which can conflict with char $ac_func(); below.  */
3596 #include <assert.h>
3597 /* Override any gcc2 internal prototype to avoid an error.  */
3598 /* We use char because int might match the return type of a gcc2
3599     builtin and then its argument prototype would still apply.  */
3600 char $ac_func();
3601
3602 int main() {
3603
3604 /* The GNU C library defines this for functions which it implements
3605     to always fail with ENOSYS.  Some functions are actually named
3606     something starting with __ and the normal name is an alias.  */
3607 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3608 choke me
3609 #else
3610 $ac_func();
3611 #endif
3612
3613 ; return 0; }
3614 EOF
3615 if { (eval echo configure:3616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3616   rm -rf conftest*
3617   eval "ac_cv_func_$ac_func=yes"
3618 else
3619   echo "configure: failed program was:" >&5
3620   cat conftest.$ac_ext >&5
3621   rm -rf conftest*
3622   eval "ac_cv_func_$ac_func=no"
3623 fi
3624 rm -f conftest*
3625 fi
3626
3627 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3628   echo "$ac_t""yes" 1>&6
3629     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3630   cat >> confdefs.h <<EOF
3631 #define $ac_tr_func 1
3632 EOF
3633  
3634 else
3635   echo "$ac_t""no" 1>&6
3636 fi
3637 done
3638
3639 for ac_func in strftime sigprocmask sigblock sigaction innetgr
3640 do
3641 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3642 echo "configure:3643: checking for $ac_func" >&5
3643 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3644   echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646   cat > conftest.$ac_ext <<EOF
3647 #line 3648 "configure"
3648 #include "confdefs.h"
3649 /* System header to define __stub macros and hopefully few prototypes,
3650     which can conflict with char $ac_func(); below.  */
3651 #include <assert.h>
3652 /* Override any gcc2 internal prototype to avoid an error.  */
3653 /* We use char because int might match the return type of a gcc2
3654     builtin and then its argument prototype would still apply.  */
3655 char $ac_func();
3656
3657 int main() {
3658
3659 /* The GNU C library defines this for functions which it implements
3660     to always fail with ENOSYS.  Some functions are actually named
3661     something starting with __ and the normal name is an alias.  */
3662 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3663 choke me
3664 #else
3665 $ac_func();
3666 #endif
3667
3668 ; return 0; }
3669 EOF
3670 if { (eval echo configure:3671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3671   rm -rf conftest*
3672   eval "ac_cv_func_$ac_func=yes"
3673 else
3674   echo "configure: failed program was:" >&5
3675   cat conftest.$ac_ext >&5
3676   rm -rf conftest*
3677   eval "ac_cv_func_$ac_func=no"
3678 fi
3679 rm -f conftest*
3680 fi
3681
3682 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3683   echo "$ac_t""yes" 1>&6
3684     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3685   cat >> confdefs.h <<EOF
3686 #define $ac_tr_func 1
3687 EOF
3688  
3689 else
3690   echo "$ac_t""no" 1>&6
3691 fi
3692 done
3693
3694 for ac_func in initgroups select rdchk getgrnam pathconf putprpwnam
3695 do
3696 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3697 echo "configure:3698: checking for $ac_func" >&5
3698 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3699   echo $ac_n "(cached) $ac_c" 1>&6
3700 else
3701   cat > conftest.$ac_ext <<EOF
3702 #line 3703 "configure"
3703 #include "confdefs.h"
3704 /* System header to define __stub macros and hopefully few prototypes,
3705     which can conflict with char $ac_func(); below.  */
3706 #include <assert.h>
3707 /* Override any gcc2 internal prototype to avoid an error.  */
3708 /* We use char because int might match the return type of a gcc2
3709     builtin and then its argument prototype would still apply.  */
3710 char $ac_func();
3711
3712 int main() {
3713
3714 /* The GNU C library defines this for functions which it implements
3715     to always fail with ENOSYS.  Some functions are actually named
3716     something starting with __ and the normal name is an alias.  */
3717 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3718 choke me
3719 #else
3720 $ac_func();
3721 #endif
3722
3723 ; return 0; }
3724 EOF
3725 if { (eval echo configure:3726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3726   rm -rf conftest*
3727   eval "ac_cv_func_$ac_func=yes"
3728 else
3729   echo "configure: failed program was:" >&5
3730   cat conftest.$ac_ext >&5
3731   rm -rf conftest*
3732   eval "ac_cv_func_$ac_func=no"
3733 fi
3734 rm -f conftest*
3735 fi
3736
3737 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3738   echo "$ac_t""yes" 1>&6
3739     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3740   cat >> confdefs.h <<EOF
3741 #define $ac_tr_func 1
3742 EOF
3743  
3744 else
3745   echo "$ac_t""no" 1>&6
3746 fi
3747 done
3748
3749 for ac_func in setuidx setgroups mktime rename ftruncate stat64 fstat64 lstat64
3750 do
3751 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3752 echo "configure:3753: checking for $ac_func" >&5
3753 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3754   echo $ac_n "(cached) $ac_c" 1>&6
3755 else
3756   cat > conftest.$ac_ext <<EOF
3757 #line 3758 "configure"
3758 #include "confdefs.h"
3759 /* System header to define __stub macros and hopefully few prototypes,
3760     which can conflict with char $ac_func(); below.  */
3761 #include <assert.h>
3762 /* Override any gcc2 internal prototype to avoid an error.  */
3763 /* We use char because int might match the return type of a gcc2
3764     builtin and then its argument prototype would still apply.  */
3765 char $ac_func();
3766
3767 int main() {
3768
3769 /* The GNU C library defines this for functions which it implements
3770     to always fail with ENOSYS.  Some functions are actually named
3771     something starting with __ and the normal name is an alias.  */
3772 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3773 choke me
3774 #else
3775 $ac_func();
3776 #endif
3777
3778 ; return 0; }
3779 EOF
3780 if { (eval echo configure:3781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3781   rm -rf conftest*
3782   eval "ac_cv_func_$ac_func=yes"
3783 else
3784   echo "configure: failed program was:" >&5
3785   cat conftest.$ac_ext >&5
3786   rm -rf conftest*
3787   eval "ac_cv_func_$ac_func=no"
3788 fi
3789 rm -f conftest*
3790 fi
3791
3792 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3793   echo "$ac_t""yes" 1>&6
3794     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3795   cat >> confdefs.h <<EOF
3796 #define $ac_tr_func 1
3797 EOF
3798  
3799 else
3800   echo "$ac_t""no" 1>&6
3801 fi
3802 done
3803
3804 for ac_func in set_auth_parameters atexit grantpt getspnam dup2 lseek64 ftruncate64
3805 do
3806 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3807 echo "configure:3808: checking for $ac_func" >&5
3808 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3809   echo $ac_n "(cached) $ac_c" 1>&6
3810 else
3811   cat > conftest.$ac_ext <<EOF
3812 #line 3813 "configure"
3813 #include "confdefs.h"
3814 /* System header to define __stub macros and hopefully few prototypes,
3815     which can conflict with char $ac_func(); below.  */
3816 #include <assert.h>
3817 /* Override any gcc2 internal prototype to avoid an error.  */
3818 /* We use char because int might match the return type of a gcc2
3819     builtin and then its argument prototype would still apply.  */
3820 char $ac_func();
3821
3822 int main() {
3823
3824 /* The GNU C library defines this for functions which it implements
3825     to always fail with ENOSYS.  Some functions are actually named
3826     something starting with __ and the normal name is an alias.  */
3827 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3828 choke me
3829 #else
3830 $ac_func();
3831 #endif
3832
3833 ; return 0; }
3834 EOF
3835 if { (eval echo configure:3836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3836   rm -rf conftest*
3837   eval "ac_cv_func_$ac_func=yes"
3838 else
3839   echo "configure: failed program was:" >&5
3840   cat conftest.$ac_ext >&5
3841   rm -rf conftest*
3842   eval "ac_cv_func_$ac_func=no"
3843 fi
3844 rm -f conftest*
3845 fi
3846
3847 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3848   echo "$ac_t""yes" 1>&6
3849     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3850   cat >> confdefs.h <<EOF
3851 #define $ac_tr_func 1
3852 EOF
3853  
3854 else
3855   echo "$ac_t""no" 1>&6
3856 fi
3857 done
3858
3859 for ac_func in fseek64 ftell64 bigcrypt getprpwnam setluid yp_get_default_domain getpwanam
3860 do
3861 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3862 echo "configure:3863: checking for $ac_func" >&5
3863 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3864   echo $ac_n "(cached) $ac_c" 1>&6
3865 else
3866   cat > conftest.$ac_ext <<EOF
3867 #line 3868 "configure"
3868 #include "confdefs.h"
3869 /* System header to define __stub macros and hopefully few prototypes,
3870     which can conflict with char $ac_func(); below.  */
3871 #include <assert.h>
3872 /* Override any gcc2 internal prototype to avoid an error.  */
3873 /* We use char because int might match the return type of a gcc2
3874     builtin and then its argument prototype would still apply.  */
3875 char $ac_func();
3876
3877 int main() {
3878
3879 /* The GNU C library defines this for functions which it implements
3880     to always fail with ENOSYS.  Some functions are actually named
3881     something starting with __ and the normal name is an alias.  */
3882 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3883 choke me
3884 #else
3885 $ac_func();
3886 #endif
3887
3888 ; return 0; }
3889 EOF
3890 if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3891   rm -rf conftest*
3892   eval "ac_cv_func_$ac_func=yes"
3893 else
3894   echo "configure: failed program was:" >&5
3895   cat conftest.$ac_ext >&5
3896   rm -rf conftest*
3897   eval "ac_cv_func_$ac_func=no"
3898 fi
3899 rm -f conftest*
3900 fi
3901
3902 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3903   echo "$ac_t""yes" 1>&6
3904     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3905   cat >> confdefs.h <<EOF
3906 #define $ac_tr_func 1
3907 EOF
3908  
3909 else
3910   echo "$ac_t""no" 1>&6
3911 fi
3912 done
3913
3914 for ac_func in srandom random srand rand setenv
3915 do
3916 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3917 echo "configure:3918: checking for $ac_func" >&5
3918 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3919   echo $ac_n "(cached) $ac_c" 1>&6
3920 else
3921   cat > conftest.$ac_ext <<EOF
3922 #line 3923 "configure"
3923 #include "confdefs.h"
3924 /* System header to define __stub macros and hopefully few prototypes,
3925     which can conflict with char $ac_func(); below.  */
3926 #include <assert.h>
3927 /* Override any gcc2 internal prototype to avoid an error.  */
3928 /* We use char because int might match the return type of a gcc2
3929     builtin and then its argument prototype would still apply.  */
3930 char $ac_func();
3931
3932 int main() {
3933
3934 /* The GNU C library defines this for functions which it implements
3935     to always fail with ENOSYS.  Some functions are actually named
3936     something starting with __ and the normal name is an alias.  */
3937 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3938 choke me
3939 #else
3940 $ac_func();
3941 #endif
3942
3943 ; return 0; }
3944 EOF
3945 if { (eval echo configure:3946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3946   rm -rf conftest*
3947   eval "ac_cv_func_$ac_func=yes"
3948 else
3949   echo "configure: failed program was:" >&5
3950   cat conftest.$ac_ext >&5
3951   rm -rf conftest*
3952   eval "ac_cv_func_$ac_func=no"
3953 fi
3954 rm -f conftest*
3955 fi
3956
3957 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3958   echo "$ac_t""yes" 1>&6
3959     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3960   cat >> confdefs.h <<EOF
3961 #define $ac_tr_func 1
3962 EOF
3963  
3964 else
3965   echo "$ac_t""no" 1>&6
3966 fi
3967 done
3968
3969
3970 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
3971 do
3972 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3973 echo "configure:3974: checking for $ac_func" >&5
3974 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3975   echo $ac_n "(cached) $ac_c" 1>&6
3976 else
3977   cat > conftest.$ac_ext <<EOF
3978 #line 3979 "configure"
3979 #include "confdefs.h"
3980 /* System header to define __stub macros and hopefully few prototypes,
3981     which can conflict with char $ac_func(); below.  */
3982 #include <assert.h>
3983 /* Override any gcc2 internal prototype to avoid an error.  */
3984 /* We use char because int might match the return type of a gcc2
3985     builtin and then its argument prototype would still apply.  */
3986 char $ac_func();
3987
3988 int main() {
3989
3990 /* The GNU C library defines this for functions which it implements
3991     to always fail with ENOSYS.  Some functions are actually named
3992     something starting with __ and the normal name is an alias.  */
3993 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3994 choke me
3995 #else
3996 $ac_func();
3997 #endif
3998
3999 ; return 0; }
4000 EOF
4001 if { (eval echo configure:4002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4002   rm -rf conftest*
4003   eval "ac_cv_func_$ac_func=yes"
4004 else
4005   echo "configure: failed program was:" >&5
4006   cat conftest.$ac_ext >&5
4007   rm -rf conftest*
4008   eval "ac_cv_func_$ac_func=no"
4009 fi
4010 rm -f conftest*
4011 fi
4012
4013 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4014   echo "$ac_t""yes" 1>&6
4015     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4016   cat >> confdefs.h <<EOF
4017 #define $ac_tr_func 1
4018 EOF
4019  
4020 else
4021   echo "$ac_t""no" 1>&6
4022 fi
4023 done
4024
4025 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
4026 do
4027 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4028 echo "configure:4029: checking for $ac_func" >&5
4029 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4030   echo $ac_n "(cached) $ac_c" 1>&6
4031 else
4032   cat > conftest.$ac_ext <<EOF
4033 #line 4034 "configure"
4034 #include "confdefs.h"
4035 /* System header to define __stub macros and hopefully few prototypes,
4036     which can conflict with char $ac_func(); below.  */
4037 #include <assert.h>
4038 /* Override any gcc2 internal prototype to avoid an error.  */
4039 /* We use char because int might match the return type of a gcc2
4040     builtin and then its argument prototype would still apply.  */
4041 char $ac_func();
4042
4043 int main() {
4044
4045 /* The GNU C library defines this for functions which it implements
4046     to always fail with ENOSYS.  Some functions are actually named
4047     something starting with __ and the normal name is an alias.  */
4048 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4049 choke me
4050 #else
4051 $ac_func();
4052 #endif
4053
4054 ; return 0; }
4055 EOF
4056 if { (eval echo configure:4057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4057   rm -rf conftest*
4058   eval "ac_cv_func_$ac_func=yes"
4059 else
4060   echo "configure: failed program was:" >&5
4061   cat conftest.$ac_ext >&5
4062   rm -rf conftest*
4063   eval "ac_cv_func_$ac_func=no"
4064 fi
4065 rm -f conftest*
4066 fi
4067
4068 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4069   echo "$ac_t""yes" 1>&6
4070     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4071   cat >> confdefs.h <<EOF
4072 #define $ac_tr_func 1
4073 EOF
4074  
4075 else
4076   echo "$ac_t""no" 1>&6
4077 fi
4078 done
4079
4080 for ac_func in __getcwd _getcwd
4081 do
4082 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4083 echo "configure:4084: checking for $ac_func" >&5
4084 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4085   echo $ac_n "(cached) $ac_c" 1>&6
4086 else
4087   cat > conftest.$ac_ext <<EOF
4088 #line 4089 "configure"
4089 #include "confdefs.h"
4090 /* System header to define __stub macros and hopefully few prototypes,
4091     which can conflict with char $ac_func(); below.  */
4092 #include <assert.h>
4093 /* Override any gcc2 internal prototype to avoid an error.  */
4094 /* We use char because int might match the return type of a gcc2
4095     builtin and then its argument prototype would still apply.  */
4096 char $ac_func();
4097
4098 int main() {
4099
4100 /* The GNU C library defines this for functions which it implements
4101     to always fail with ENOSYS.  Some functions are actually named
4102     something starting with __ and the normal name is an alias.  */
4103 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4104 choke me
4105 #else
4106 $ac_func();
4107 #endif
4108
4109 ; return 0; }
4110 EOF
4111 if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4112   rm -rf conftest*
4113   eval "ac_cv_func_$ac_func=yes"
4114 else
4115   echo "configure: failed program was:" >&5
4116   cat conftest.$ac_ext >&5
4117   rm -rf conftest*
4118   eval "ac_cv_func_$ac_func=no"
4119 fi
4120 rm -f conftest*
4121 fi
4122
4123 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4124   echo "$ac_t""yes" 1>&6
4125     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4126   cat >> confdefs.h <<EOF
4127 #define $ac_tr_func 1
4128 EOF
4129  
4130 else
4131   echo "$ac_t""no" 1>&6
4132 fi
4133 done
4134
4135 for ac_func in __xstat __fxstat __lxstat
4136 do
4137 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4138 echo "configure:4139: checking for $ac_func" >&5
4139 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4140   echo $ac_n "(cached) $ac_c" 1>&6
4141 else
4142   cat > conftest.$ac_ext <<EOF
4143 #line 4144 "configure"
4144 #include "confdefs.h"
4145 /* System header to define __stub macros and hopefully few prototypes,
4146     which can conflict with char $ac_func(); below.  */
4147 #include <assert.h>
4148 /* Override any gcc2 internal prototype to avoid an error.  */
4149 /* We use char because int might match the return type of a gcc2
4150     builtin and then its argument prototype would still apply.  */
4151 char $ac_func();
4152
4153 int main() {
4154
4155 /* The GNU C library defines this for functions which it implements
4156     to always fail with ENOSYS.  Some functions are actually named
4157     something starting with __ and the normal name is an alias.  */
4158 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4159 choke me
4160 #else
4161 $ac_func();
4162 #endif
4163
4164 ; return 0; }
4165 EOF
4166 if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4167   rm -rf conftest*
4168   eval "ac_cv_func_$ac_func=yes"
4169 else
4170   echo "configure: failed program was:" >&5
4171   cat conftest.$ac_ext >&5
4172   rm -rf conftest*
4173   eval "ac_cv_func_$ac_func=no"
4174 fi
4175 rm -f conftest*
4176 fi
4177
4178 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4179   echo "$ac_t""yes" 1>&6
4180     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4181   cat >> confdefs.h <<EOF
4182 #define $ac_tr_func 1
4183 EOF
4184  
4185 else
4186   echo "$ac_t""no" 1>&6
4187 fi
4188 done
4189
4190 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
4191 do
4192 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4193 echo "configure:4194: checking for $ac_func" >&5
4194 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4195   echo $ac_n "(cached) $ac_c" 1>&6
4196 else
4197   cat > conftest.$ac_ext <<EOF
4198 #line 4199 "configure"
4199 #include "confdefs.h"
4200 /* System header to define __stub macros and hopefully few prototypes,
4201     which can conflict with char $ac_func(); below.  */
4202 #include <assert.h>
4203 /* Override any gcc2 internal prototype to avoid an error.  */
4204 /* We use char because int might match the return type of a gcc2
4205     builtin and then its argument prototype would still apply.  */
4206 char $ac_func();
4207
4208 int main() {
4209
4210 /* The GNU C library defines this for functions which it implements
4211     to always fail with ENOSYS.  Some functions are actually named
4212     something starting with __ and the normal name is an alias.  */
4213 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4214 choke me
4215 #else
4216 $ac_func();
4217 #endif
4218
4219 ; return 0; }
4220 EOF
4221 if { (eval echo configure:4222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4222   rm -rf conftest*
4223   eval "ac_cv_func_$ac_func=yes"
4224 else
4225   echo "configure: failed program was:" >&5
4226   cat conftest.$ac_ext >&5
4227   rm -rf conftest*
4228   eval "ac_cv_func_$ac_func=no"
4229 fi
4230 rm -f conftest*
4231 fi
4232
4233 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4234   echo "$ac_t""yes" 1>&6
4235     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4236   cat >> confdefs.h <<EOF
4237 #define $ac_tr_func 1
4238 EOF
4239  
4240 else
4241   echo "$ac_t""no" 1>&6
4242 fi
4243 done
4244
4245 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
4246 do
4247 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4248 echo "configure:4249: checking for $ac_func" >&5
4249 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4250   echo $ac_n "(cached) $ac_c" 1>&6
4251 else
4252   cat > conftest.$ac_ext <<EOF
4253 #line 4254 "configure"
4254 #include "confdefs.h"
4255 /* System header to define __stub macros and hopefully few prototypes,
4256     which can conflict with char $ac_func(); below.  */
4257 #include <assert.h>
4258 /* Override any gcc2 internal prototype to avoid an error.  */
4259 /* We use char because int might match the return type of a gcc2
4260     builtin and then its argument prototype would still apply.  */
4261 char $ac_func();
4262
4263 int main() {
4264
4265 /* The GNU C library defines this for functions which it implements
4266     to always fail with ENOSYS.  Some functions are actually named
4267     something starting with __ and the normal name is an alias.  */
4268 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4269 choke me
4270 #else
4271 $ac_func();
4272 #endif
4273
4274 ; return 0; }
4275 EOF
4276 if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4277   rm -rf conftest*
4278   eval "ac_cv_func_$ac_func=yes"
4279 else
4280   echo "configure: failed program was:" >&5
4281   cat conftest.$ac_ext >&5
4282   rm -rf conftest*
4283   eval "ac_cv_func_$ac_func=no"
4284 fi
4285 rm -f conftest*
4286 fi
4287
4288 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4289   echo "$ac_t""yes" 1>&6
4290     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4291   cat >> confdefs.h <<EOF
4292 #define $ac_tr_func 1
4293 EOF
4294  
4295 else
4296   echo "$ac_t""no" 1>&6
4297 fi
4298 done
4299
4300 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
4301 do
4302 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4303 echo "configure:4304: checking for $ac_func" >&5
4304 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4305   echo $ac_n "(cached) $ac_c" 1>&6
4306 else
4307   cat > conftest.$ac_ext <<EOF
4308 #line 4309 "configure"
4309 #include "confdefs.h"
4310 /* System header to define __stub macros and hopefully few prototypes,
4311     which can conflict with char $ac_func(); below.  */
4312 #include <assert.h>
4313 /* Override any gcc2 internal prototype to avoid an error.  */
4314 /* We use char because int might match the return type of a gcc2
4315     builtin and then its argument prototype would still apply.  */
4316 char $ac_func();
4317
4318 int main() {
4319
4320 /* The GNU C library defines this for functions which it implements
4321     to always fail with ENOSYS.  Some functions are actually named
4322     something starting with __ and the normal name is an alias.  */
4323 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4324 choke me
4325 #else
4326 $ac_func();
4327 #endif
4328
4329 ; return 0; }
4330 EOF
4331 if { (eval echo configure:4332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4332   rm -rf conftest*
4333   eval "ac_cv_func_$ac_func=yes"
4334 else
4335   echo "configure: failed program was:" >&5
4336   cat conftest.$ac_ext >&5
4337   rm -rf conftest*
4338   eval "ac_cv_func_$ac_func=no"
4339 fi
4340 rm -f conftest*
4341 fi
4342
4343 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4344   echo "$ac_t""yes" 1>&6
4345     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4346   cat >> confdefs.h <<EOF
4347 #define $ac_tr_func 1
4348 EOF
4349  
4350 else
4351   echo "$ac_t""no" 1>&6
4352 fi
4353 done
4354
4355 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
4356 do
4357 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4358 echo "configure:4359: checking for $ac_func" >&5
4359 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4360   echo $ac_n "(cached) $ac_c" 1>&6
4361 else
4362   cat > conftest.$ac_ext <<EOF
4363 #line 4364 "configure"
4364 #include "confdefs.h"
4365 /* System header to define __stub macros and hopefully few prototypes,
4366     which can conflict with char $ac_func(); below.  */
4367 #include <assert.h>
4368 /* Override any gcc2 internal prototype to avoid an error.  */
4369 /* We use char because int might match the return type of a gcc2
4370     builtin and then its argument prototype would still apply.  */
4371 char $ac_func();
4372
4373 int main() {
4374
4375 /* The GNU C library defines this for functions which it implements
4376     to always fail with ENOSYS.  Some functions are actually named
4377     something starting with __ and the normal name is an alias.  */
4378 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4379 choke me
4380 #else
4381 $ac_func();
4382 #endif
4383
4384 ; return 0; }
4385 EOF
4386 if { (eval echo configure:4387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4387   rm -rf conftest*
4388   eval "ac_cv_func_$ac_func=yes"
4389 else
4390   echo "configure: failed program was:" >&5
4391   cat conftest.$ac_ext >&5
4392   rm -rf conftest*
4393   eval "ac_cv_func_$ac_func=no"
4394 fi
4395 rm -f conftest*
4396 fi
4397
4398 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4399   echo "$ac_t""yes" 1>&6
4400     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4401   cat >> confdefs.h <<EOF
4402 #define $ac_tr_func 1
4403 EOF
4404  
4405 else
4406   echo "$ac_t""no" 1>&6
4407 fi
4408 done
4409
4410 for ac_func in _write __write _fork __fork
4411 do
4412 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4413 echo "configure:4414: checking for $ac_func" >&5
4414 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4415   echo $ac_n "(cached) $ac_c" 1>&6
4416 else
4417   cat > conftest.$ac_ext <<EOF
4418 #line 4419 "configure"
4419 #include "confdefs.h"
4420 /* System header to define __stub macros and hopefully few prototypes,
4421     which can conflict with char $ac_func(); below.  */
4422 #include <assert.h>
4423 /* Override any gcc2 internal prototype to avoid an error.  */
4424 /* We use char because int might match the return type of a gcc2
4425     builtin and then its argument prototype would still apply.  */
4426 char $ac_func();
4427
4428 int main() {
4429
4430 /* The GNU C library defines this for functions which it implements
4431     to always fail with ENOSYS.  Some functions are actually named
4432     something starting with __ and the normal name is an alias.  */
4433 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4434 choke me
4435 #else
4436 $ac_func();
4437 #endif
4438
4439 ; return 0; }
4440 EOF
4441 if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4442   rm -rf conftest*
4443   eval "ac_cv_func_$ac_func=yes"
4444 else
4445   echo "configure: failed program was:" >&5
4446   cat conftest.$ac_ext >&5
4447   rm -rf conftest*
4448   eval "ac_cv_func_$ac_func=no"
4449 fi
4450 rm -f conftest*
4451 fi
4452
4453 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4454   echo "$ac_t""yes" 1>&6
4455     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4456   cat >> confdefs.h <<EOF
4457 #define $ac_tr_func 1
4458 EOF
4459  
4460 else
4461   echo "$ac_t""no" 1>&6
4462 fi
4463 done
4464
4465 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
4466 do
4467 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4468 echo "configure:4469: checking for $ac_func" >&5
4469 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4470   echo $ac_n "(cached) $ac_c" 1>&6
4471 else
4472   cat > conftest.$ac_ext <<EOF
4473 #line 4474 "configure"
4474 #include "confdefs.h"
4475 /* System header to define __stub macros and hopefully few prototypes,
4476     which can conflict with char $ac_func(); below.  */
4477 #include <assert.h>
4478 /* Override any gcc2 internal prototype to avoid an error.  */
4479 /* We use char because int might match the return type of a gcc2
4480     builtin and then its argument prototype would still apply.  */
4481 char $ac_func();
4482
4483 int main() {
4484
4485 /* The GNU C library defines this for functions which it implements
4486     to always fail with ENOSYS.  Some functions are actually named
4487     something starting with __ and the normal name is an alias.  */
4488 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4489 choke me
4490 #else
4491 $ac_func();
4492 #endif
4493
4494 ; return 0; }
4495 EOF
4496 if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4497   rm -rf conftest*
4498   eval "ac_cv_func_$ac_func=yes"
4499 else
4500   echo "configure: failed program was:" >&5
4501   cat conftest.$ac_ext >&5
4502   rm -rf conftest*
4503   eval "ac_cv_func_$ac_func=no"
4504 fi
4505 rm -f conftest*
4506 fi
4507
4508 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4509   echo "$ac_t""yes" 1>&6
4510     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4511   cat >> confdefs.h <<EOF
4512 #define $ac_tr_func 1
4513 EOF
4514  
4515 else
4516   echo "$ac_t""no" 1>&6
4517 fi
4518 done
4519
4520 for ac_func in llseek _llseek __llseek readdir64 _readdir64 __readdir64
4521 do
4522 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4523 echo "configure:4524: checking for $ac_func" >&5
4524 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4525   echo $ac_n "(cached) $ac_c" 1>&6
4526 else
4527   cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530 /* System header to define __stub macros and hopefully few prototypes,
4531     which can conflict with char $ac_func(); below.  */
4532 #include <assert.h>
4533 /* Override any gcc2 internal prototype to avoid an error.  */
4534 /* We use char because int might match the return type of a gcc2
4535     builtin and then its argument prototype would still apply.  */
4536 char $ac_func();
4537
4538 int main() {
4539
4540 /* The GNU C library defines this for functions which it implements
4541     to always fail with ENOSYS.  Some functions are actually named
4542     something starting with __ and the normal name is an alias.  */
4543 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4544 choke me
4545 #else
4546 $ac_func();
4547 #endif
4548
4549 ; return 0; }
4550 EOF
4551 if { (eval echo configure:4552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4552   rm -rf conftest*
4553   eval "ac_cv_func_$ac_func=yes"
4554 else
4555   echo "configure: failed program was:" >&5
4556   cat conftest.$ac_ext >&5
4557   rm -rf conftest*
4558   eval "ac_cv_func_$ac_func=no"
4559 fi
4560 rm -f conftest*
4561 fi
4562
4563 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4564   echo "$ac_t""yes" 1>&6
4565     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4566   cat >> confdefs.h <<EOF
4567 #define $ac_tr_func 1
4568 EOF
4569  
4570 else
4571   echo "$ac_t""no" 1>&6
4572 fi
4573 done
4574
4575 for ac_func in pread _pread __pread pread64 _pread64 __pread64
4576 do
4577 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4578 echo "configure:4579: checking for $ac_func" >&5
4579 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4580   echo $ac_n "(cached) $ac_c" 1>&6
4581 else
4582   cat > conftest.$ac_ext <<EOF
4583 #line 4584 "configure"
4584 #include "confdefs.h"
4585 /* System header to define __stub macros and hopefully few prototypes,
4586     which can conflict with char $ac_func(); below.  */
4587 #include <assert.h>
4588 /* Override any gcc2 internal prototype to avoid an error.  */
4589 /* We use char because int might match the return type of a gcc2
4590     builtin and then its argument prototype would still apply.  */
4591 char $ac_func();
4592
4593 int main() {
4594
4595 /* The GNU C library defines this for functions which it implements
4596     to always fail with ENOSYS.  Some functions are actually named
4597     something starting with __ and the normal name is an alias.  */
4598 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4599 choke me
4600 #else
4601 $ac_func();
4602 #endif
4603
4604 ; return 0; }
4605 EOF
4606 if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4607   rm -rf conftest*
4608   eval "ac_cv_func_$ac_func=yes"
4609 else
4610   echo "configure: failed program was:" >&5
4611   cat conftest.$ac_ext >&5
4612   rm -rf conftest*
4613   eval "ac_cv_func_$ac_func=no"
4614 fi
4615 rm -f conftest*
4616 fi
4617
4618 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4619   echo "$ac_t""yes" 1>&6
4620     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4621   cat >> confdefs.h <<EOF
4622 #define $ac_tr_func 1
4623 EOF
4624  
4625 else
4626   echo "$ac_t""no" 1>&6
4627 fi
4628 done
4629
4630 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
4631 do
4632 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4633 echo "configure:4634: checking for $ac_func" >&5
4634 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4635   echo $ac_n "(cached) $ac_c" 1>&6
4636 else
4637   cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640 /* System header to define __stub macros and hopefully few prototypes,
4641     which can conflict with char $ac_func(); below.  */
4642 #include <assert.h>
4643 /* Override any gcc2 internal prototype to avoid an error.  */
4644 /* We use char because int might match the return type of a gcc2
4645     builtin and then its argument prototype would still apply.  */
4646 char $ac_func();
4647
4648 int main() {
4649
4650 /* The GNU C library defines this for functions which it implements
4651     to always fail with ENOSYS.  Some functions are actually named
4652     something starting with __ and the normal name is an alias.  */
4653 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4654 choke me
4655 #else
4656 $ac_func();
4657 #endif
4658
4659 ; return 0; }
4660 EOF
4661 if { (eval echo configure:4662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4662   rm -rf conftest*
4663   eval "ac_cv_func_$ac_func=yes"
4664 else
4665   echo "configure: failed program was:" >&5
4666   cat conftest.$ac_ext >&5
4667   rm -rf conftest*
4668   eval "ac_cv_func_$ac_func=no"
4669 fi
4670 rm -f conftest*
4671 fi
4672
4673 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4674   echo "$ac_t""yes" 1>&6
4675     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4676   cat >> confdefs.h <<EOF
4677 #define $ac_tr_func 1
4678 EOF
4679  
4680 else
4681   echo "$ac_t""no" 1>&6
4682 fi
4683 done
4684
4685 for ac_func in open64 _open64 __open64 creat64
4686 do
4687 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4688 echo "configure:4689: checking for $ac_func" >&5
4689 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4690   echo $ac_n "(cached) $ac_c" 1>&6
4691 else
4692   cat > conftest.$ac_ext <<EOF
4693 #line 4694 "configure"
4694 #include "confdefs.h"
4695 /* System header to define __stub macros and hopefully few prototypes,
4696     which can conflict with char $ac_func(); below.  */
4697 #include <assert.h>
4698 /* Override any gcc2 internal prototype to avoid an error.  */
4699 /* We use char because int might match the return type of a gcc2
4700     builtin and then its argument prototype would still apply.  */
4701 char $ac_func();
4702
4703 int main() {
4704
4705 /* The GNU C library defines this for functions which it implements
4706     to always fail with ENOSYS.  Some functions are actually named
4707     something starting with __ and the normal name is an alias.  */
4708 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4709 choke me
4710 #else
4711 $ac_func();
4712 #endif
4713
4714 ; return 0; }
4715 EOF
4716 if { (eval echo configure:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4717   rm -rf conftest*
4718   eval "ac_cv_func_$ac_func=yes"
4719 else
4720   echo "configure: failed program was:" >&5
4721   cat conftest.$ac_ext >&5
4722   rm -rf conftest*
4723   eval "ac_cv_func_$ac_func=no"
4724 fi
4725 rm -f conftest*
4726 fi
4727
4728 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4729   echo "$ac_t""yes" 1>&6
4730     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4731   cat >> confdefs.h <<EOF
4732 #define $ac_tr_func 1
4733 EOF
4734  
4735 else
4736   echo "$ac_t""no" 1>&6
4737 fi
4738 done
4739
4740
4741 echo $ac_n "checking for long long""... $ac_c" 1>&6
4742 echo "configure:4743: checking for long long" >&5
4743 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
4744   echo $ac_n "(cached) $ac_c" 1>&6
4745 else
4746   
4747 if test "$cross_compiling" = yes; then
4748   samba_cv_have_longlong=cross
4749 else
4750   cat > conftest.$ac_ext <<EOF
4751 #line 4752 "configure"
4752 #include "confdefs.h"
4753 #include <stdio.h>
4754 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
4755 EOF
4756 if { (eval echo configure:4757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4757 then
4758   samba_cv_have_longlong=yes
4759 else
4760   echo "configure: failed program was:" >&5
4761   cat conftest.$ac_ext >&5
4762   rm -fr conftest*
4763   samba_cv_have_longlong=no
4764 fi
4765 rm -fr conftest*
4766 fi
4767
4768 fi
4769
4770 echo "$ac_t""$samba_cv_have_longlong" 1>&6
4771 if test x"$samba_cv_have_longlong" = x"yes"; then
4772     cat >> confdefs.h <<\EOF
4773 #define HAVE_LONGLONG 1
4774 EOF
4775
4776 fi
4777
4778 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
4779 echo "configure:4780: checking for 64 bit off_t" >&5
4780 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
4781   echo $ac_n "(cached) $ac_c" 1>&6
4782 else
4783   
4784 if test "$cross_compiling" = yes; then
4785   samba_cv_SIZEOF_OFF_T=cross
4786 else
4787   cat > conftest.$ac_ext <<EOF
4788 #line 4789 "configure"
4789 #include "confdefs.h"
4790 #include <stdio.h>
4791 #include <sys/stat.h>
4792 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
4793 EOF
4794 if { (eval echo configure:4795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4795 then
4796   samba_cv_SIZEOF_OFF_T=yes
4797 else
4798   echo "configure: failed program was:" >&5
4799   cat conftest.$ac_ext >&5
4800   rm -fr conftest*
4801   samba_cv_SIZEOF_OFF_T=no
4802 fi
4803 rm -fr conftest*
4804 fi
4805
4806 fi
4807
4808 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
4809 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
4810     cat >> confdefs.h <<\EOF
4811 #define SIZEOF_OFF_T 8
4812 EOF
4813
4814 fi
4815
4816 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
4817 echo "configure:4818: checking for off64_t" >&5
4818 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
4819   echo $ac_n "(cached) $ac_c" 1>&6
4820 else
4821   
4822 if test "$cross_compiling" = yes; then
4823   samba_cv_HAVE_OFF64_T=cross
4824 else
4825   cat > conftest.$ac_ext <<EOF
4826 #line 4827 "configure"
4827 #include "confdefs.h"
4828 #include <stdio.h>
4829 #include <sys/stat.h>
4830 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
4831 EOF
4832 if { (eval echo configure:4833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4833 then
4834   samba_cv_HAVE_OFF64_T=yes
4835 else
4836   echo "configure: failed program was:" >&5
4837   cat conftest.$ac_ext >&5
4838   rm -fr conftest*
4839   samba_cv_HAVE_OFF64_T=no
4840 fi
4841 rm -fr conftest*
4842 fi
4843
4844 fi
4845
4846 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
4847 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
4848     cat >> confdefs.h <<\EOF
4849 #define HAVE_OFF64_T 1
4850 EOF
4851
4852 fi
4853
4854 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
4855 echo "configure:4856: checking for 64 bit ino_t" >&5
4856 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
4857   echo $ac_n "(cached) $ac_c" 1>&6
4858 else
4859   
4860 if test "$cross_compiling" = yes; then
4861   samba_cv_SIZEOF_INO_T=cross
4862 else
4863   cat > conftest.$ac_ext <<EOF
4864 #line 4865 "configure"
4865 #include "confdefs.h"
4866 #include <stdio.h>
4867 #include <sys/stat.h>
4868 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
4869 EOF
4870 if { (eval echo configure:4871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4871 then
4872   samba_cv_SIZEOF_INO_T=yes
4873 else
4874   echo "configure: failed program was:" >&5
4875   cat conftest.$ac_ext >&5
4876   rm -fr conftest*
4877   samba_cv_SIZEOF_INO_T=no
4878 fi
4879 rm -fr conftest*
4880 fi
4881
4882 fi
4883
4884 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
4885 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
4886     cat >> confdefs.h <<\EOF
4887 #define SIZEOF_INO_T 8
4888 EOF
4889
4890 fi
4891
4892 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
4893 echo "configure:4894: checking for ino64_t" >&5
4894 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
4895   echo $ac_n "(cached) $ac_c" 1>&6
4896 else
4897   
4898 if test "$cross_compiling" = yes; then
4899   samba_cv_HAVE_INO64_T=cross
4900 else
4901   cat > conftest.$ac_ext <<EOF
4902 #line 4903 "configure"
4903 #include "confdefs.h"
4904 #include <stdio.h>
4905 #include <sys/stat.h>
4906 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
4907 EOF
4908 if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4909 then
4910   samba_cv_HAVE_INO64_T=yes
4911 else
4912   echo "configure: failed program was:" >&5
4913   cat conftest.$ac_ext >&5
4914   rm -fr conftest*
4915   samba_cv_HAVE_INO64_T=no
4916 fi
4917 rm -fr conftest*
4918 fi
4919
4920 fi
4921
4922 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
4923 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
4924     cat >> confdefs.h <<\EOF
4925 #define HAVE_INO64_T 1
4926 EOF
4927
4928 fi
4929
4930 echo $ac_n "checking for union semun""... $ac_c" 1>&6
4931 echo "configure:4932: checking for union semun" >&5
4932 if eval "test \"`echo '$''{'samba_cv_HAVE_UNION_SEMUN'+set}'`\" = set"; then
4933   echo $ac_n "(cached) $ac_c" 1>&6
4934 else
4935   
4936 if test "$cross_compiling" = yes; then
4937   samba_cv_HAVE_UNION_SEMUN=cross
4938 else
4939   cat > conftest.$ac_ext <<EOF
4940 #line 4941 "configure"
4941 #include "confdefs.h"
4942
4943 #include <sys/types.h>
4944 #include <sys/ipc.h>
4945 #include <sys/sem.h>
4946 main() { union semun ss; exit(0); }
4947 EOF
4948 if { (eval echo configure:4949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4949 then
4950   samba_cv_HAVE_UNION_SEMUN=yes
4951 else
4952   echo "configure: failed program was:" >&5
4953   cat conftest.$ac_ext >&5
4954   rm -fr conftest*
4955   samba_cv_HAVE_UNION_SEMUN=no
4956 fi
4957 rm -fr conftest*
4958 fi
4959
4960 fi
4961
4962 echo "$ac_t""$samba_cv_HAVE_UNION_SEMUN" 1>&6
4963 if test x"$samba_cv_HAVE_UNION_SEMUN" = x"yes"; then
4964     cat >> confdefs.h <<\EOF
4965 #define HAVE_UNION_SEMUN 1
4966 EOF
4967
4968 fi
4969
4970 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
4971 echo "configure:4972: checking for unsigned char" >&5
4972 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
4973   echo $ac_n "(cached) $ac_c" 1>&6
4974 else
4975   
4976 if test "$cross_compiling" = yes; then
4977   samba_cv_HAVE_UNSIGNED_CHAR=cross
4978 else
4979   cat > conftest.$ac_ext <<EOF
4980 #line 4981 "configure"
4981 #include "confdefs.h"
4982 #include <stdio.h>
4983 main() { char c; c=250; exit((c > 0)?0:1); }
4984 EOF
4985 if { (eval echo configure:4986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4986 then
4987   samba_cv_HAVE_UNSIGNED_CHAR=yes
4988 else
4989   echo "configure: failed program was:" >&5
4990   cat conftest.$ac_ext >&5
4991   rm -fr conftest*
4992   samba_cv_HAVE_UNSIGNED_CHAR=no
4993 fi
4994 rm -fr conftest*
4995 fi
4996
4997 fi
4998
4999 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
5000 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
5001     cat >> confdefs.h <<\EOF
5002 #define HAVE_UNSIGNED_CHAR 1
5003 EOF
5004
5005 fi
5006
5007 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
5008 echo "configure:5009: checking for sin_len in sock" >&5
5009 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
5010   echo $ac_n "(cached) $ac_c" 1>&6
5011 else
5012   
5013 cat > conftest.$ac_ext <<EOF
5014 #line 5015 "configure"
5015 #include "confdefs.h"
5016 #include <sys/types.h>
5017 #include <sys/socket.h>
5018 #include <netinet/in.h>
5019 int main() {
5020 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
5021 ; return 0; }
5022 EOF
5023 if { (eval echo configure:5024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5024   rm -rf conftest*
5025   samba_cv_HAVE_SOCK_SIN_LEN=yes
5026 else
5027   echo "configure: failed program was:" >&5
5028   cat conftest.$ac_ext >&5
5029   rm -rf conftest*
5030   samba_cv_HAVE_SOCK_SIN_LEN=no
5031 fi
5032 rm -f conftest*
5033 fi
5034
5035 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
5036 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
5037     cat >> confdefs.h <<\EOF
5038 #define HAVE_SOCK_SIN_LEN 1
5039 EOF
5040
5041 fi
5042
5043 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
5044 echo "configure:5045: checking for __FILE__ macro" >&5
5045 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
5046   echo $ac_n "(cached) $ac_c" 1>&6
5047 else
5048   
5049 cat > conftest.$ac_ext <<EOF
5050 #line 5051 "configure"
5051 #include "confdefs.h"
5052 #include <stdio.h>
5053 int main() {
5054 printf("%s\n", __FILE__);
5055 ; return 0; }
5056 EOF
5057 if { (eval echo configure:5058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5058   rm -rf conftest*
5059   samba_cv_HAVE_FILE_MACRO=yes
5060 else
5061   echo "configure: failed program was:" >&5
5062   cat conftest.$ac_ext >&5
5063   rm -rf conftest*
5064   samba_cv_HAVE_FILE_MACRO=no
5065 fi
5066 rm -f conftest*
5067 fi
5068
5069 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
5070 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
5071     cat >> confdefs.h <<\EOF
5072 #define HAVE_FILE_MACRO 1
5073 EOF
5074
5075 fi
5076
5077 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
5078 echo "configure:5079: checking for __FUNCTION__ macro" >&5
5079 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
5080   echo $ac_n "(cached) $ac_c" 1>&6
5081 else
5082   
5083 cat > conftest.$ac_ext <<EOF
5084 #line 5085 "configure"
5085 #include "confdefs.h"
5086 #include <stdio.h>
5087 int main() {
5088 printf("%s\n", __FUNCTION__);
5089 ; return 0; }
5090 EOF
5091 if { (eval echo configure:5092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5092   rm -rf conftest*
5093   samba_cv_HAVE_FUNCTION_MACRO=yes
5094 else
5095   echo "configure: failed program was:" >&5
5096   cat conftest.$ac_ext >&5
5097   rm -rf conftest*
5098   samba_cv_HAVE_FUNCTION_MACRO=no
5099 fi
5100 rm -f conftest*
5101 fi
5102
5103 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
5104 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
5105     cat >> confdefs.h <<\EOF
5106 #define HAVE_FUNCTION_MACRO 1
5107 EOF
5108
5109 fi
5110
5111 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
5112 echo "configure:5113: checking if gettimeofday takes tz argument" >&5
5113 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
5114   echo $ac_n "(cached) $ac_c" 1>&6
5115 else
5116   
5117 if test "$cross_compiling" = yes; then
5118   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
5119 else
5120   cat > conftest.$ac_ext <<EOF
5121 #line 5122 "configure"
5122 #include "confdefs.h"
5123
5124 #include <sys/time.h>
5125 #include <unistd.h>
5126 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
5127 EOF
5128 if { (eval echo configure:5129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5129 then
5130   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
5131 else
5132   echo "configure: failed program was:" >&5
5133   cat conftest.$ac_ext >&5
5134   rm -fr conftest*
5135   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
5136 fi
5137 rm -fr conftest*
5138 fi
5139
5140 fi
5141
5142 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
5143 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
5144     cat >> confdefs.h <<\EOF
5145 #define HAVE_GETTIMEOFDAY_TZ 1
5146 EOF
5147
5148 fi
5149
5150
5151 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
5152 echo "configure:5153: checking for broken readdir" >&5
5153 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
5154   echo $ac_n "(cached) $ac_c" 1>&6
5155 else
5156   
5157 if test "$cross_compiling" = yes; then
5158   samba_cv_HAVE_BROKEN_READDIR=cross
5159 else
5160   cat > conftest.$ac_ext <<EOF
5161 #line 5162 "configure"
5162 #include "confdefs.h"
5163 #include <sys/types.h>
5164 #include <dirent.h>
5165 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
5166 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
5167 di->d_name[0] == 0) exit(0); exit(1);} 
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_BROKEN_READDIR=yes
5172 else
5173   echo "configure: failed program was:" >&5
5174   cat conftest.$ac_ext >&5
5175   rm -fr conftest*
5176   samba_cv_HAVE_BROKEN_READDIR=no
5177 fi
5178 rm -fr conftest*
5179 fi
5180
5181 fi
5182
5183 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
5184 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
5185     cat >> confdefs.h <<\EOF
5186 #define HAVE_BROKEN_READDIR 1
5187 EOF
5188
5189 fi
5190
5191 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
5192 echo "configure:5193: checking for utimbuf" >&5
5193 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
5194   echo $ac_n "(cached) $ac_c" 1>&6
5195 else
5196   
5197 cat > conftest.$ac_ext <<EOF
5198 #line 5199 "configure"
5199 #include "confdefs.h"
5200 #include <sys/types.h>
5201 #include <utime.h>
5202 int main() {
5203 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
5204 ; return 0; }
5205 EOF
5206 if { (eval echo configure:5207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5207   rm -rf conftest*
5208   samba_cv_HAVE_UTIMBUF=yes
5209 else
5210   echo "configure: failed program was:" >&5
5211   cat conftest.$ac_ext >&5
5212   rm -rf conftest*
5213   samba_cv_HAVE_UTIMBUF=no
5214 fi
5215 rm -f conftest*
5216 fi
5217
5218 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
5219 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
5220     cat >> confdefs.h <<\EOF
5221 #define HAVE_UTIMBUF 1
5222 EOF
5223
5224 fi
5225
5226 echo $ac_n "checking for kernel oplock type definitions""... $ac_c" 1>&6
5227 echo "configure:5228: checking for kernel oplock type definitions" >&5
5228 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS'+set}'`\" = set"; then
5229   echo $ac_n "(cached) $ac_c" 1>&6
5230 else
5231   
5232 cat > conftest.$ac_ext <<EOF
5233 #line 5234 "configure"
5234 #include "confdefs.h"
5235 #include <sys/types.h>
5236 #include <fcntl.h>
5237 int main() {
5238 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
5239 ; return 0; }
5240 EOF
5241 if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5242   rm -rf conftest*
5243   samba_cv_HAVE_KERNEL_OPLOCKS=yes
5244 else
5245   echo "configure: failed program was:" >&5
5246   cat conftest.$ac_ext >&5
5247   rm -rf conftest*
5248   samba_cv_HAVE_KERNEL_OPLOCKS=no
5249 fi
5250 rm -f conftest*
5251 fi
5252
5253 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS" 1>&6
5254 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS" = x"yes"; then
5255     cat >> confdefs.h <<\EOF
5256 #define HAVE_KERNEL_OPLOCKS 1
5257 EOF
5258
5259 fi
5260
5261 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
5262 echo "configure:5263: checking for irix specific capabilities" >&5
5263 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
5264   echo $ac_n "(cached) $ac_c" 1>&6
5265 else
5266   
5267 if test "$cross_compiling" = yes; then
5268   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
5269 else
5270   cat > conftest.$ac_ext <<EOF
5271 #line 5272 "configure"
5272 #include "confdefs.h"
5273 #include <sys/types.h>
5274 #include <sys/capability.h>
5275 main() {
5276  cap_t cap;
5277  if ((cap = cap_get_proc()) == NULL)
5278    exit(1);
5279  cap->cap_effective |= CAP_NETWORK_MGT;
5280  cap->cap_inheritable |= CAP_NETWORK_MGT;
5281  cap_set_proc(cap);
5282  exit(0);
5283 }
5284
5285 EOF
5286 if { (eval echo configure:5287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5287 then
5288   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
5289 else
5290   echo "configure: failed program was:" >&5
5291   cat conftest.$ac_ext >&5
5292   rm -fr conftest*
5293   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
5294 fi
5295 rm -fr conftest*
5296 fi
5297
5298 fi
5299
5300 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
5301 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
5302     cat >> confdefs.h <<\EOF
5303 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
5304 EOF
5305
5306 fi
5307
5308 echo $ac_n "checking for test routines""... $ac_c" 1>&6
5309 echo "configure:5310: checking for test routines" >&5
5310 if test "$cross_compiling" = yes; then
5311   echo "configure: warning: cannot run when cross-compiling" 1>&2
5312 else
5313   cat > conftest.$ac_ext <<EOF
5314 #line 5315 "configure"
5315 #include "confdefs.h"
5316 #include "${srcdir-.}/tests/trivial.c"
5317 EOF
5318 if { (eval echo configure:5319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5319 then
5320   echo "$ac_t""yes" 1>&6
5321 else
5322   echo "configure: failed program was:" >&5
5323   cat conftest.$ac_ext >&5
5324   rm -fr conftest*
5325   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
5326 fi
5327 rm -fr conftest*
5328 fi
5329
5330
5331 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
5332 echo "configure:5333: checking for ftruncate extend" >&5
5333 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
5334   echo $ac_n "(cached) $ac_c" 1>&6
5335 else
5336   
5337 if test "$cross_compiling" = yes; then
5338   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
5339 else
5340   cat > conftest.$ac_ext <<EOF
5341 #line 5342 "configure"
5342 #include "confdefs.h"
5343 #include "${srcdir-.}/tests/ftruncate.c"
5344 EOF
5345 if { (eval echo configure:5346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5346 then
5347   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
5348 else
5349   echo "configure: failed program was:" >&5
5350   cat conftest.$ac_ext >&5
5351   rm -fr conftest*
5352   samba_cv_HAVE_FTRUNCATE_EXTEND=no
5353 fi
5354 rm -fr conftest*
5355 fi
5356
5357 fi
5358
5359 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
5360 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
5361     cat >> confdefs.h <<\EOF
5362 #define HAVE_FTRUNCATE_EXTEND 1
5363 EOF
5364
5365 fi
5366
5367 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
5368 echo "configure:5369: checking for broken getgroups" >&5
5369 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
5370   echo $ac_n "(cached) $ac_c" 1>&6
5371 else
5372   
5373 if test "$cross_compiling" = yes; then
5374   samba_cv_HAVE_BROKEN_GETGROUPS=cross
5375 else
5376   cat > conftest.$ac_ext <<EOF
5377 #line 5378 "configure"
5378 #include "confdefs.h"
5379 #include "${srcdir-.}/tests/getgroups.c"
5380 EOF
5381 if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5382 then
5383   samba_cv_HAVE_BROKEN_GETGROUPS=yes
5384 else
5385   echo "configure: failed program was:" >&5
5386   cat conftest.$ac_ext >&5
5387   rm -fr conftest*
5388   samba_cv_HAVE_BROKEN_GETGROUPS=no
5389 fi
5390 rm -fr conftest*
5391 fi
5392
5393 fi
5394
5395 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
5396 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
5397     cat >> confdefs.h <<\EOF
5398 #define HAVE_BROKEN_GETGROUPS 1
5399 EOF
5400
5401 fi
5402
5403 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
5404 echo "configure:5405: checking whether getpass should be replaced" >&5
5405 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
5406   echo $ac_n "(cached) $ac_c" 1>&6
5407 else
5408   
5409 SAVE_CPPFLAGS="$CPPFLAGS"
5410 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/include -I${srcdir-.}/ubiqx"
5411 cat > conftest.$ac_ext <<EOF
5412 #line 5413 "configure"
5413 #include "confdefs.h"
5414
5415 #define REPLACE_GETPASS 1
5416 #define NO_CONFIG_H 1
5417 #define main dont_declare_main
5418 #include "${srcdir-.}/lib/getsmbpass.c"
5419 #undef main
5420
5421 int main() {
5422
5423 ; return 0; }
5424 EOF
5425 if { (eval echo configure:5426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5426   rm -rf conftest*
5427   samba_cv_REPLACE_GETPASS=yes
5428 else
5429   echo "configure: failed program was:" >&5
5430   cat conftest.$ac_ext >&5
5431   rm -rf conftest*
5432   samba_cv_REPLACE_GETPASS=no
5433 fi
5434 rm -f conftest*
5435 CPPFLAGS="$SAVE_CPPFLAGS"
5436
5437 fi
5438
5439 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
5440 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
5441         cat >> confdefs.h <<\EOF
5442 #define REPLACE_GETPASS 1
5443 EOF
5444
5445 fi
5446
5447 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
5448 echo "configure:5449: checking for broken inet_ntoa" >&5
5449 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
5450   echo $ac_n "(cached) $ac_c" 1>&6
5451 else
5452   
5453 if test "$cross_compiling" = yes; then
5454   samba_cv_REPLACE_INET_NTOA=cross
5455 else
5456   cat > conftest.$ac_ext <<EOF
5457 #line 5458 "configure"
5458 #include "confdefs.h"
5459
5460 #include <stdio.h>
5461 #include <sys/types.h>
5462 #include <netinet/in.h>
5463 #include <arpa/inet.h>
5464 main() { struct in_addr ip; ip.s_addr = 0x12345678;
5465 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
5466     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
5467 exit(1);}
5468 EOF
5469 if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5470 then
5471   samba_cv_REPLACE_INET_NTOA=yes
5472 else
5473   echo "configure: failed program was:" >&5
5474   cat conftest.$ac_ext >&5
5475   rm -fr conftest*
5476   samba_cv_REPLACE_INET_NTOA=no
5477 fi
5478 rm -fr conftest*
5479 fi
5480
5481 fi
5482
5483 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
5484 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
5485     cat >> confdefs.h <<\EOF
5486 #define REPLACE_INET_NTOA 1
5487 EOF
5488
5489 fi
5490
5491 echo $ac_n "checking for root""... $ac_c" 1>&6
5492 echo "configure:5493: checking for root" >&5
5493 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
5494   echo $ac_n "(cached) $ac_c" 1>&6
5495 else
5496   
5497 if test "$cross_compiling" = yes; then
5498   samba_cv_HAVE_ROOT=cross
5499 else
5500   cat > conftest.$ac_ext <<EOF
5501 #line 5502 "configure"
5502 #include "confdefs.h"
5503 main() { exit(getuid() != 0); }
5504 EOF
5505 if { (eval echo configure:5506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5506 then
5507   samba_cv_HAVE_ROOT=yes
5508 else
5509   echo "configure: failed program was:" >&5
5510   cat conftest.$ac_ext >&5
5511   rm -fr conftest*
5512   samba_cv_HAVE_ROOT=no
5513 fi
5514 rm -fr conftest*
5515 fi
5516
5517 fi
5518
5519 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
5520 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
5521     cat >> confdefs.h <<\EOF
5522 #define HAVE_ROOT 1
5523 EOF
5524
5525 else
5526     echo "configure: warning: running as non-root will disable some tests" 1>&2
5527 fi
5528
5529 netmask=no;
5530 echo $ac_n "checking for netmask ifconf""... $ac_c" 1>&6
5531 echo "configure:5532: checking for netmask ifconf" >&5
5532 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_IFCONF'+set}'`\" = set"; then
5533   echo $ac_n "(cached) $ac_c" 1>&6
5534 else
5535   
5536 if test "$cross_compiling" = yes; then
5537   samba_cv_HAVE_NETMASK_IFCONF=cross
5538 else
5539   cat > conftest.$ac_ext <<EOF
5540 #line 5541 "configure"
5541 #include "confdefs.h"
5542
5543 #define HAVE_NETMASK_IFCONF 1
5544 #define AUTOCONF 1
5545 #include "${srcdir-.}/lib/netmask.c"
5546 EOF
5547 if { (eval echo configure:5548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5548 then
5549   samba_cv_HAVE_NETMASK_IFCONF=yes
5550 else
5551   echo "configure: failed program was:" >&5
5552   cat conftest.$ac_ext >&5
5553   rm -fr conftest*
5554   samba_cv_HAVE_NETMASK_IFCONF=no
5555 fi
5556 rm -fr conftest*
5557 fi
5558
5559 fi
5560
5561 echo "$ac_t""$samba_cv_HAVE_NETMASK_IFCONF" 1>&6
5562 if test x"$samba_cv_HAVE_NETMASK_IFCONF" = x"yes"; then
5563     netmask=yes;cat >> confdefs.h <<\EOF
5564 #define HAVE_NETMASK_IFCONF 1
5565 EOF
5566
5567 fi
5568
5569 if test $netmask = no; then
5570 echo $ac_n "checking for netmask ifreq""... $ac_c" 1>&6
5571 echo "configure:5572: checking for netmask ifreq" >&5
5572 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_IFREQ'+set}'`\" = set"; then
5573   echo $ac_n "(cached) $ac_c" 1>&6
5574 else
5575   
5576 if test "$cross_compiling" = yes; then
5577   samba_cv_HAVE_NETMASK_IFREQ=cross
5578 else
5579   cat > conftest.$ac_ext <<EOF
5580 #line 5581 "configure"
5581 #include "confdefs.h"
5582
5583 #define HAVE_NETMASK_IFREQ 1
5584 #define AUTOCONF 1
5585 #include "${srcdir-.}/lib/netmask.c"
5586 EOF
5587 if { (eval echo configure:5588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5588 then
5589   samba_cv_HAVE_NETMASK_IFREQ=yes
5590 else
5591   echo "configure: failed program was:" >&5
5592   cat conftest.$ac_ext >&5
5593   rm -fr conftest*
5594   samba_cv_HAVE_NETMASK_IFREQ=no
5595 fi
5596 rm -fr conftest*
5597 fi
5598
5599 fi
5600
5601 echo "$ac_t""$samba_cv_HAVE_NETMASK_IFREQ" 1>&6
5602 if test x"$samba_cv_HAVE_NETMASK_IFREQ" = x"yes"; then
5603     netmask=yes;cat >> confdefs.h <<\EOF
5604 #define HAVE_NETMASK_IFREQ 1
5605 EOF
5606
5607 fi
5608 fi
5609
5610 if test $netmask = no; then
5611 echo $ac_n "checking for netmask AIX""... $ac_c" 1>&6
5612 echo "configure:5613: checking for netmask AIX" >&5
5613 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_AIX'+set}'`\" = set"; then
5614   echo $ac_n "(cached) $ac_c" 1>&6
5615 else
5616   
5617 if test "$cross_compiling" = yes; then
5618   samba_cv_HAVE_NETMASK_AIX=cross
5619 else
5620   cat > conftest.$ac_ext <<EOF
5621 #line 5622 "configure"
5622 #include "confdefs.h"
5623
5624 #define HAVE_NETMASK_AIX 1
5625 #define AUTOCONF 1
5626 #include "${srcdir-.}/lib/netmask.c"
5627 EOF
5628 if { (eval echo configure:5629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5629 then
5630   samba_cv_HAVE_NETMASK_AIX=yes
5631 else
5632   echo "configure: failed program was:" >&5
5633   cat conftest.$ac_ext >&5
5634   rm -fr conftest*
5635   samba_cv_HAVE_NETMASK_AIX=no
5636 fi
5637 rm -fr conftest*
5638 fi
5639
5640 fi
5641
5642 echo "$ac_t""$samba_cv_HAVE_NETMASK_AIX" 1>&6
5643 if test x"$samba_cv_HAVE_NETMASK_AIX" = x"yes"; then
5644     netmask=yes;cat >> confdefs.h <<\EOF
5645 #define HAVE_NETMASK_AIX 1
5646 EOF
5647
5648 fi
5649 fi
5650
5651 echo $ac_n "checking for trapdoor seteuid""... $ac_c" 1>&6
5652 echo "configure:5653: checking for trapdoor seteuid" >&5
5653 if eval "test \"`echo '$''{'samba_cv_HAVE_TRAPDOOR_UID'+set}'`\" = set"; then
5654   echo $ac_n "(cached) $ac_c" 1>&6
5655 else
5656   
5657 if test "$cross_compiling" = yes; then
5658   :
5659 else
5660   cat > conftest.$ac_ext <<EOF
5661 #line 5662 "configure"
5662 #include "confdefs.h"
5663 #include "${srcdir-.}/tests/trapdoor.c"
5664 EOF
5665 if { (eval echo configure:5666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5666 then
5667   samba_cv_HAVE_TRAPDOOR_UID=no
5668 else
5669   echo "configure: failed program was:" >&5
5670   cat conftest.$ac_ext >&5
5671   rm -fr conftest*
5672   samba_cv_HAVE_TRAPDOOR_UID=yes
5673 fi
5674 rm -fr conftest*
5675 fi
5676
5677 fi
5678
5679 echo "$ac_t""$samba_cv_HAVE_TRAPDOOR_UID" 1>&6
5680 if test x"$samba_cv_HAVE_TRAPDOOR_UID" = x"yes"; then
5681     cat >> confdefs.h <<\EOF
5682 #define HAVE_TRAPDOOR_UID 1
5683 EOF
5684
5685 fi
5686
5687 echo $ac_n "checking for shared mmap""... $ac_c" 1>&6
5688 echo "configure:5689: checking for shared mmap" >&5
5689 if eval "test \"`echo '$''{'samba_cv_HAVE_SHARED_MMAP'+set}'`\" = set"; then
5690   echo $ac_n "(cached) $ac_c" 1>&6
5691 else
5692   
5693 if test "$cross_compiling" = yes; then
5694   samba_cv_HAVE_SHARED_MMAP=cross
5695 else
5696   cat > conftest.$ac_ext <<EOF
5697 #line 5698 "configure"
5698 #include "confdefs.h"
5699 #include "${srcdir-.}/tests/shared_mmap.c"
5700 EOF
5701 if { (eval echo configure:5702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5702 then
5703   samba_cv_HAVE_SHARED_MMAP=yes
5704 else
5705   echo "configure: failed program was:" >&5
5706   cat conftest.$ac_ext >&5
5707   rm -fr conftest*
5708   samba_cv_HAVE_SHARED_MMAP=no
5709 fi
5710 rm -fr conftest*
5711 fi
5712
5713 fi
5714
5715 echo "$ac_t""$samba_cv_HAVE_SHARED_MMAP" 1>&6
5716 if test x"$samba_cv_HAVE_SHARED_MMAP" = x"yes"; then
5717     cat >> confdefs.h <<\EOF
5718 #define HAVE_SHARED_MMAP 1
5719 EOF
5720
5721 fi
5722
5723 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
5724 echo "configure:5725: checking for fcntl locking" >&5
5725 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
5726   echo $ac_n "(cached) $ac_c" 1>&6
5727 else
5728   
5729 if test "$cross_compiling" = yes; then
5730   samba_cv_HAVE_FCNTL_LOCK=cross
5731 else
5732   cat > conftest.$ac_ext <<EOF
5733 #line 5734 "configure"
5734 #include "confdefs.h"
5735 #include "${srcdir-.}/tests/fcntl_lock.c"
5736 EOF
5737 if { (eval echo configure:5738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5738 then
5739   samba_cv_HAVE_FCNTL_LOCK=yes
5740 else
5741   echo "configure: failed program was:" >&5
5742   cat conftest.$ac_ext >&5
5743   rm -fr conftest*
5744   samba_cv_HAVE_FCNTL_LOCK=no
5745 fi
5746 rm -fr conftest*
5747 fi
5748
5749 fi
5750
5751 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
5752 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
5753     cat >> confdefs.h <<\EOF
5754 #define HAVE_FCNTL_LOCK 1
5755 EOF
5756
5757 fi
5758
5759 echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
5760 echo "configure:5761: checking for 64 bit fcntl locking" >&5
5761 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
5762   echo $ac_n "(cached) $ac_c" 1>&6
5763 else
5764   
5765 if test "$cross_compiling" = yes; then
5766   samba_cv_HAVE_STRUCT_FLOCK64=cross
5767 else
5768   cat > conftest.$ac_ext <<EOF
5769 #line 5770 "configure"
5770 #include "confdefs.h"
5771
5772 #include <stdio.h>
5773 #include <stdlib.h>
5774
5775 #ifdef HAVE_FCNTL_H
5776 #include <fcntl.h>
5777 #endif
5778
5779 #ifdef HAVE_SYS_FCNTL_H
5780 #include <sys/fcntl.h>
5781 #endif
5782 main() { struct flock64 fl64;
5783 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
5784 exit(0);
5785 #else
5786 exit(1);
5787 #endif
5788 }
5789 EOF
5790 if { (eval echo configure:5791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5791 then
5792   samba_cv_HAVE_STRUCT_FLOCK64=yes
5793 else
5794   echo "configure: failed program was:" >&5
5795   cat conftest.$ac_ext >&5
5796   rm -fr conftest*
5797   samba_cv_HAVE_STRUCT_FLOCK64=no
5798 fi
5799 rm -fr conftest*
5800 fi
5801
5802 fi
5803
5804 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
5805 if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
5806     cat >> confdefs.h <<\EOF
5807 #define HAVE_STRUCT_FLOCK64 1
5808 EOF
5809
5810 fi
5811
5812 echo $ac_n "checking for sysv ipc""... $ac_c" 1>&6
5813 echo "configure:5814: checking for sysv ipc" >&5
5814 if eval "test \"`echo '$''{'samba_cv_HAVE_SYSV_IPC'+set}'`\" = set"; then
5815   echo $ac_n "(cached) $ac_c" 1>&6
5816 else
5817   
5818 if test "$cross_compiling" = yes; then
5819   samba_cv_HAVE_SYSV_IPC=cross
5820 else
5821   cat > conftest.$ac_ext <<EOF
5822 #line 5823 "configure"
5823 #include "confdefs.h"
5824 #include "${srcdir-.}/tests/sysv_ipc.c"
5825 EOF
5826 if { (eval echo configure:5827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5827 then
5828   samba_cv_HAVE_SYSV_IPC=yes
5829 else
5830   echo "configure: failed program was:" >&5
5831   cat conftest.$ac_ext >&5
5832   rm -fr conftest*
5833   samba_cv_HAVE_SYSV_IPC=no
5834 fi
5835 rm -fr conftest*
5836 fi
5837
5838 fi
5839
5840 echo "$ac_t""$samba_cv_HAVE_SYSV_IPC" 1>&6
5841 if test x"$samba_cv_HAVE_SYSV_IPC" = x"yes"; then
5842     cat >> confdefs.h <<\EOF
5843 #define HAVE_SYSV_IPC 1
5844 EOF
5845
5846 fi
5847
5848 #################################################
5849 # check for the AFS filesystem
5850 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
5851 echo "configure:5852: checking whether to use AFS" >&5
5852 # Check whether --with-afs or --without-afs was given.
5853 if test "${with_afs+set}" = set; then
5854   withval="$with_afs"
5855    case "$withval" in
5856   yes)
5857     echo "$ac_t""yes" 1>&6
5858     cat >> confdefs.h <<\EOF
5859 #define WITH_AFS 1
5860 EOF
5861
5862     ;;
5863   *)
5864     echo "$ac_t""no" 1>&6
5865     ;;
5866   esac 
5867 else
5868   echo "$ac_t""no" 1>&6
5869
5870 fi
5871
5872
5873
5874 #################################################
5875 # check for the DFS auth system
5876 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
5877 echo "configure:5878: checking whether to use DFS auth" >&5
5878 # Check whether --with-dfs or --without-dfs was given.
5879 if test "${with_dfs+set}" = set; then
5880   withval="$with_dfs"
5881    case "$withval" in
5882   yes)
5883     echo "$ac_t""yes" 1>&6
5884     cat >> confdefs.h <<\EOF
5885 #define WITH_DFS 1
5886 EOF
5887
5888     ;;
5889   *)
5890     echo "$ac_t""no" 1>&6
5891     ;;
5892   esac 
5893 else
5894   echo "$ac_t""no" 1>&6
5895
5896 fi
5897
5898
5899 #################################################
5900 # check for Kerberos IV auth system
5901 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
5902 echo "configure:5903: checking whether to use Kerberos IV" >&5
5903 # Check whether --with-krb4 or --without-krb4 was given.
5904 if test "${with_krb4+set}" = set; then
5905   withval="$with_krb4"
5906      echo "$ac_t""yes" 1>&6
5907     cat >> confdefs.h <<\EOF
5908 #define KRB4_AUTH 1
5909 EOF
5910
5911     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
5912 echo "configure:5913: checking for dn_expand in -lresolv" >&5
5913 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
5914 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5915   echo $ac_n "(cached) $ac_c" 1>&6
5916 else
5917   ac_save_LIBS="$LIBS"
5918 LIBS="-lresolv  $LIBS"
5919 cat > conftest.$ac_ext <<EOF
5920 #line 5921 "configure"
5921 #include "confdefs.h"
5922 /* Override any gcc2 internal prototype to avoid an error.  */
5923 /* We use char because int might match the return type of a gcc2
5924     builtin and then its argument prototype would still apply.  */
5925 char dn_expand();
5926
5927 int main() {
5928 dn_expand()
5929 ; return 0; }
5930 EOF
5931 if { (eval echo configure:5932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5932   rm -rf conftest*
5933   eval "ac_cv_lib_$ac_lib_var=yes"
5934 else
5935   echo "configure: failed program was:" >&5
5936   cat conftest.$ac_ext >&5
5937   rm -rf conftest*
5938   eval "ac_cv_lib_$ac_lib_var=no"
5939 fi
5940 rm -f conftest*
5941 LIBS="$ac_save_LIBS"
5942
5943 fi
5944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5945   echo "$ac_t""yes" 1>&6
5946     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5947     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5948   cat >> confdefs.h <<EOF
5949 #define $ac_tr_lib 1
5950 EOF
5951
5952   LIBS="-lresolv $LIBS"
5953
5954 else
5955   echo "$ac_t""no" 1>&6
5956 fi
5957
5958     LIBS="$LIBS -lkrb -ldes"
5959     CFLAGS="$CFLAGS -I$withval/include"
5960     LDFLAGS="$LDFLAGS -L$withval/lib"
5961 else
5962   echo "$ac_t""no" 1>&6
5963
5964 fi
5965
5966
5967 #################################################
5968 # check for automount support
5969 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
5970 echo "configure:5971: checking whether to use AUTOMOUNT" >&5
5971 # Check whether --with-automount or --without-automount was given.
5972 if test "${with_automount+set}" = set; then
5973   withval="$with_automount"
5974    case "$withval" in
5975   yes)
5976     echo "$ac_t""yes" 1>&6
5977     cat >> confdefs.h <<\EOF
5978 #define WITH_AUTOMOUNT 1
5979 EOF
5980
5981     ;;
5982   *)
5983     echo "$ac_t""no" 1>&6
5984     ;;
5985   esac 
5986 else
5987   echo "$ac_t""no" 1>&6
5988
5989 fi
5990
5991
5992 #################################################
5993 # check for smbmount support
5994 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
5995 echo "configure:5996: checking whether to use SMBMOUNT" >&5
5996 # Check whether --with-smbmount or --without-smbmount was given.
5997 if test "${with_smbmount+set}" = set; then
5998   withval="$with_smbmount"
5999    case "$withval" in
6000   yes)
6001     echo "$ac_t""yes" 1>&6
6002     cat >> confdefs.h <<\EOF
6003 #define WITH_SMBMOUNT 1
6004 EOF
6005
6006     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
6007     ;;
6008   *)
6009     echo "$ac_t""no" 1>&6
6010     MPROGS=
6011     ;;
6012   esac 
6013 else
6014   echo "$ac_t""no" 1>&6
6015   MPROGS=
6016
6017 fi
6018
6019
6020 #################################################
6021 # check for a LDAP password database
6022 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
6023 echo "configure:6024: checking whether to use LDAP password database" >&5
6024 # Check whether --with-ldap or --without-ldap was given.
6025 if test "${with_ldap+set}" = set; then
6026   withval="$with_ldap"
6027    case "$withval" in
6028   yes)
6029     echo "$ac_t""yes" 1>&6
6030     cat >> confdefs.h <<\EOF
6031 #define WITH_LDAP 1
6032 EOF
6033
6034     ;;
6035   *)
6036     echo "$ac_t""no" 1>&6
6037     ;;
6038   esac 
6039 else
6040   echo "$ac_t""no" 1>&6
6041
6042 fi
6043
6044
6045 #################################################
6046 # check for a NISPLUS password database
6047 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
6048 echo "configure:6049: checking whether to use NISPLUS password database" >&5
6049 # Check whether --with-nisplus or --without-nisplus was given.
6050 if test "${with_nisplus+set}" = set; then
6051   withval="$with_nisplus"
6052    case "$withval" in
6053   yes)
6054     echo "$ac_t""yes" 1>&6
6055     cat >> confdefs.h <<\EOF
6056 #define WITH_NISPLUS 1
6057 EOF
6058
6059     ;;
6060   *)
6061     echo "$ac_t""no" 1>&6
6062     ;;
6063   esac 
6064 else
6065   echo "$ac_t""no" 1>&6
6066
6067 fi
6068
6069
6070 #################################################
6071 # check for a NISPLUS_HOME support 
6072 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
6073 echo "configure:6074: checking whether to use NISPLUS_HOME" >&5
6074 # Check whether --with-nisplus-home or --without-nisplus-home was given.
6075 if test "${with_nisplus_home+set}" = set; then
6076   withval="$with_nisplus_home"
6077    case "$withval" in
6078   yes)
6079     echo "$ac_t""yes" 1>&6
6080     cat >> confdefs.h <<\EOF
6081 #define WITH_NISPLUS_HOME 1
6082 EOF
6083
6084     ;;
6085   *)
6086     echo "$ac_t""no" 1>&6
6087     ;;
6088   esac 
6089 else
6090   echo "$ac_t""no" 1>&6
6091
6092 fi
6093
6094
6095 #################################################
6096 # check for the secure socket layer
6097 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
6098 echo "configure:6099: checking whether to use SSL" >&5
6099 # Check whether --with-ssl or --without-ssl was given.
6100 if test "${with_ssl+set}" = set; then
6101   withval="$with_ssl"
6102    case "$withval" in
6103   yes)
6104     echo "$ac_t""yes" 1>&6
6105     cat >> confdefs.h <<\EOF
6106 #define WITH_SSL 1
6107 EOF
6108
6109     ;;
6110   *)
6111     echo "$ac_t""no" 1>&6
6112     ;;
6113   esac 
6114 else
6115   echo "$ac_t""no" 1>&6
6116
6117 fi
6118
6119
6120 #################################################
6121 # check for experimental mmap support
6122 echo $ac_n "checking whether to use MMAP""... $ac_c" 1>&6
6123 echo "configure:6124: checking whether to use MMAP" >&5
6124 # Check whether --with-mmap or --without-mmap was given.
6125 if test "${with_mmap+set}" = set; then
6126   withval="$with_mmap"
6127    case "$withval" in
6128   yes)
6129     echo "$ac_t""yes" 1>&6
6130     cat >> confdefs.h <<\EOF
6131 #define WITH_MMAP 1
6132 EOF
6133
6134     ;;
6135   *)
6136     echo "$ac_t""no" 1>&6
6137     ;;
6138   esac 
6139 else
6140   echo "$ac_t""no" 1>&6
6141
6142 fi
6143
6144
6145 #################################################
6146 # check for syslog logging
6147 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
6148 echo "configure:6149: checking whether to use syslog logging" >&5
6149 # Check whether --with-syslog or --without-syslog was given.
6150 if test "${with_syslog+set}" = set; then
6151   withval="$with_syslog"
6152    case "$withval" in
6153   yes)
6154     echo "$ac_t""yes" 1>&6
6155     cat >> confdefs.h <<\EOF
6156 #define WITH_SYSLOG 1
6157 EOF
6158
6159     ;;
6160   *)
6161     echo "$ac_t""no" 1>&6
6162     ;;
6163   esac 
6164 else
6165   echo "$ac_t""no" 1>&6
6166
6167 fi
6168
6169
6170 #################################################
6171 # check for experimental netatalk resource fork support
6172 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
6173 echo "configure:6174: checking whether to support netatalk" >&5
6174 # Check whether --with-netatalk or --without-netatalk was given.
6175 if test "${with_netatalk+set}" = set; then
6176   withval="$with_netatalk"
6177    case "$withval" in
6178   yes)
6179     echo "$ac_t""yes" 1>&6
6180     cat >> confdefs.h <<\EOF
6181 #define WITH_NETATALK 1
6182 EOF
6183
6184     ;;
6185   *)
6186     echo "$ac_t""no" 1>&6
6187     ;;
6188   esac 
6189 else
6190   echo "$ac_t""no" 1>&6
6191
6192 fi
6193
6194
6195
6196 #################################################
6197 # these tests are taken from the GNU fileutils package
6198 echo "checking how to get filesystem space usage" 1>&6
6199 echo "configure:6200: checking how to get filesystem space usage" >&5
6200 space=no
6201
6202 # Test for statvfs64.
6203 if test $space = no; then
6204   # SVR4
6205   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
6206 echo "configure:6207: checking statvfs64 function (SVR4)" >&5
6207 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
6208   echo $ac_n "(cached) $ac_c" 1>&6
6209 else
6210   if test "$cross_compiling" = yes; then
6211   fu_cv_sys_stat_statvfs64=cross
6212 else
6213   cat > conftest.$ac_ext <<EOF
6214 #line 6215 "configure"
6215 #include "confdefs.h"
6216
6217 #include <sys/types.h>
6218 #include <sys/statvfs.h>
6219   main ()
6220   {
6221     struct statvfs64 fsd;
6222     exit (statfs64 (".", &fsd));
6223   }
6224 EOF
6225 if { (eval echo configure:6226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6226 then
6227   fu_cv_sys_stat_statvfs64=yes
6228 else
6229   echo "configure: failed program was:" >&5
6230   cat conftest.$ac_ext >&5
6231   rm -fr conftest*
6232   fu_cv_sys_stat_statvfs64=no
6233 fi
6234 rm -fr conftest*
6235 fi
6236
6237 fi
6238
6239 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
6240   if test $fu_cv_sys_stat_statvfs64 = yes; then
6241     space=yes
6242     cat >> confdefs.h <<\EOF
6243 #define STAT_STATVFS64 1
6244 EOF
6245
6246   fi
6247 fi
6248
6249 # Perform only the link test since it seems there are no variants of the
6250 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
6251 # because that got a false positive on SCO OSR5.  Adding the declaration
6252 # of a `struct statvfs' causes this test to fail (as it should) on such
6253 # systems.  That system is reported to work fine with STAT_STATFS4 which
6254 # is what it gets when this test fails.
6255 if test $space = no; then
6256   # SVR4
6257   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
6258 echo "configure:6259: checking statvfs function (SVR4)" >&5
6259 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
6260   echo $ac_n "(cached) $ac_c" 1>&6
6261 else
6262   cat > conftest.$ac_ext <<EOF
6263 #line 6264 "configure"
6264 #include "confdefs.h"
6265 #include <sys/types.h>
6266 #include <sys/statvfs.h>
6267 int main() {
6268 struct statvfs fsd; statvfs (0, &fsd);
6269 ; return 0; }
6270 EOF
6271 if { (eval echo configure:6272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6272   rm -rf conftest*
6273   fu_cv_sys_stat_statvfs=yes
6274 else
6275   echo "configure: failed program was:" >&5
6276   cat conftest.$ac_ext >&5
6277   rm -rf conftest*
6278   fu_cv_sys_stat_statvfs=no
6279 fi
6280 rm -f conftest*
6281 fi
6282
6283 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
6284   if test $fu_cv_sys_stat_statvfs = yes; then
6285     space=yes
6286     cat >> confdefs.h <<\EOF
6287 #define STAT_STATVFS 1
6288 EOF
6289
6290   fi
6291 fi
6292
6293 if test $space = no; then
6294   # DEC Alpha running OSF/1
6295   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
6296 echo "configure:6297: checking for 3-argument statfs function (DEC OSF/1)" >&5
6297   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
6298   echo $ac_n "(cached) $ac_c" 1>&6
6299 else
6300   if test "$cross_compiling" = yes; then
6301   fu_cv_sys_stat_statfs3_osf1=no
6302 else
6303   cat > conftest.$ac_ext <<EOF
6304 #line 6305 "configure"
6305 #include "confdefs.h"
6306
6307 #include <sys/param.h>
6308 #include <sys/types.h>
6309 #include <sys/mount.h>
6310   main ()
6311   {
6312     struct statfs fsd;
6313     fsd.f_fsize = 0;
6314     exit (statfs (".", &fsd, sizeof (struct statfs)));
6315   }
6316 EOF
6317 if { (eval echo configure:6318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6318 then
6319   fu_cv_sys_stat_statfs3_osf1=yes
6320 else
6321   echo "configure: failed program was:" >&5
6322   cat conftest.$ac_ext >&5
6323   rm -fr conftest*
6324   fu_cv_sys_stat_statfs3_osf1=no
6325 fi
6326 rm -fr conftest*
6327 fi
6328
6329 fi
6330
6331   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
6332   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
6333     space=yes
6334     cat >> confdefs.h <<\EOF
6335 #define STAT_STATFS3_OSF1 1
6336 EOF
6337
6338   fi
6339 fi
6340
6341 if test $space = no; then
6342 # AIX
6343   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
6344 echo "configure:6345: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
6345   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
6346   echo $ac_n "(cached) $ac_c" 1>&6
6347 else
6348   if test "$cross_compiling" = yes; then
6349   fu_cv_sys_stat_statfs2_bsize=no
6350 else
6351   cat > conftest.$ac_ext <<EOF
6352 #line 6353 "configure"
6353 #include "confdefs.h"
6354
6355 #ifdef HAVE_SYS_PARAM_H
6356 #include <sys/param.h>
6357 #endif
6358 #ifdef HAVE_SYS_MOUNT_H
6359 #include <sys/mount.h>
6360 #endif
6361 #ifdef HAVE_SYS_VFS_H
6362 #include <sys/vfs.h>
6363 #endif
6364   main ()
6365   {
6366   struct statfs fsd;
6367   fsd.f_bsize = 0;
6368   exit (statfs (".", &fsd));
6369   }
6370 EOF
6371 if { (eval echo configure:6372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6372 then
6373   fu_cv_sys_stat_statfs2_bsize=yes
6374 else
6375   echo "configure: failed program was:" >&5
6376   cat conftest.$ac_ext >&5
6377   rm -fr conftest*
6378   fu_cv_sys_stat_statfs2_bsize=no
6379 fi
6380 rm -fr conftest*
6381 fi
6382
6383 fi
6384
6385   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
6386   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
6387     space=yes
6388     cat >> confdefs.h <<\EOF
6389 #define STAT_STATFS2_BSIZE 1
6390 EOF
6391
6392   fi
6393 fi
6394
6395 if test $space = no; then
6396 # SVR3
6397   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
6398 echo "configure:6399: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
6399   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
6400   echo $ac_n "(cached) $ac_c" 1>&6
6401 else
6402   if test "$cross_compiling" = yes; then
6403   fu_cv_sys_stat_statfs4=no
6404 else
6405   cat > conftest.$ac_ext <<EOF
6406 #line 6407 "configure"
6407 #include "confdefs.h"
6408 #include <sys/types.h>
6409 #include <sys/statfs.h>
6410   main ()
6411   {
6412   struct statfs fsd;
6413   exit (statfs (".", &fsd, sizeof fsd, 0));
6414   }
6415 EOF
6416 if { (eval echo configure:6417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6417 then
6418   fu_cv_sys_stat_statfs4=yes
6419 else
6420   echo "configure: failed program was:" >&5
6421   cat conftest.$ac_ext >&5
6422   rm -fr conftest*
6423   fu_cv_sys_stat_statfs4=no
6424 fi
6425 rm -fr conftest*
6426 fi
6427
6428 fi
6429
6430   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
6431   if test $fu_cv_sys_stat_statfs4 = yes; then
6432     space=yes
6433     cat >> confdefs.h <<\EOF
6434 #define STAT_STATFS4 1
6435 EOF
6436
6437   fi
6438 fi
6439
6440 if test $space = no; then
6441 # 4.4BSD and NetBSD
6442   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
6443 echo "configure:6444: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
6444   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
6445   echo $ac_n "(cached) $ac_c" 1>&6
6446 else
6447   if test "$cross_compiling" = yes; then
6448   fu_cv_sys_stat_statfs2_fsize=no
6449 else
6450   cat > conftest.$ac_ext <<EOF
6451 #line 6452 "configure"
6452 #include "confdefs.h"
6453 #include <sys/types.h>
6454 #ifdef HAVE_SYS_PARAM_H
6455 #include <sys/param.h>
6456 #endif
6457 #ifdef HAVE_SYS_MOUNT_H
6458 #include <sys/mount.h>
6459 #endif
6460   main ()
6461   {
6462   struct statfs fsd;
6463   fsd.f_fsize = 0;
6464   exit (statfs (".", &fsd));
6465   }
6466 EOF
6467 if { (eval echo configure:6468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6468 then
6469   fu_cv_sys_stat_statfs2_fsize=yes
6470 else
6471   echo "configure: failed program was:" >&5
6472   cat conftest.$ac_ext >&5
6473   rm -fr conftest*
6474   fu_cv_sys_stat_statfs2_fsize=no
6475 fi
6476 rm -fr conftest*
6477 fi
6478
6479 fi
6480
6481   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
6482   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
6483     space=yes
6484     cat >> confdefs.h <<\EOF
6485 #define STAT_STATFS2_FSIZE 1
6486 EOF
6487
6488   fi
6489 fi
6490
6491 if test $space = no; then
6492   # Ultrix
6493   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
6494 echo "configure:6495: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
6495   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
6496   echo $ac_n "(cached) $ac_c" 1>&6
6497 else
6498   if test "$cross_compiling" = yes; then
6499   fu_cv_sys_stat_fs_data=no
6500 else
6501   cat > conftest.$ac_ext <<EOF
6502 #line 6503 "configure"
6503 #include "confdefs.h"
6504 #include <sys/types.h>
6505 #ifdef HAVE_SYS_PARAM_H
6506 #include <sys/param.h>
6507 #endif
6508 #ifdef HAVE_SYS_MOUNT_H
6509 #include <sys/mount.h>
6510 #endif
6511 #ifdef HAVE_SYS_FS_TYPES_H
6512 #include <sys/fs_types.h>
6513 #endif
6514   main ()
6515   {
6516   struct fs_data fsd;
6517   /* Ultrix's statfs returns 1 for success,
6518      0 for not mounted, -1 for failure.  */
6519   exit (statfs (".", &fsd) != 1);
6520   }
6521 EOF
6522 if { (eval echo configure:6523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6523 then
6524   fu_cv_sys_stat_fs_data=yes
6525 else
6526   echo "configure: failed program was:" >&5
6527   cat conftest.$ac_ext >&5
6528   rm -fr conftest*
6529   fu_cv_sys_stat_fs_data=no
6530 fi
6531 rm -fr conftest*
6532 fi
6533
6534 fi
6535
6536   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
6537   if test $fu_cv_sys_stat_fs_data = yes; then
6538     space=yes
6539     cat >> confdefs.h <<\EOF
6540 #define STAT_STATFS2_FS_DATA 1
6541 EOF
6542
6543   fi
6544 fi
6545
6546 echo "checking configure summary"
6547 if test "$cross_compiling" = yes; then
6548   :
6549 else
6550   cat > conftest.$ac_ext <<EOF
6551 #line 6552 "configure"
6552 #include "confdefs.h"
6553 #include "${srcdir-.}/tests/summary.c"
6554 EOF
6555 if { (eval echo configure:6556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
6556 then
6557   echo "configure OK";
6558 else
6559   echo "configure: failed program was:" >&5
6560   cat conftest.$ac_ext >&5
6561   rm -fr conftest*
6562   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
6563 fi
6564 rm -fr conftest*
6565 fi
6566
6567
6568 builddir=`pwd`
6569
6570
6571 trap '' 1 2 15
6572 cat > confcache <<\EOF
6573 # This file is a shell script that caches the results of configure
6574 # tests run on this system so they can be shared between configure
6575 # scripts and configure runs.  It is not useful on other systems.
6576 # If it contains results you don't want to keep, you may remove or edit it.
6577 #
6578 # By default, configure uses ./config.cache as the cache file,
6579 # creating it if it does not exist already.  You can give configure
6580 # the --cache-file=FILE option to use a different cache file; that is
6581 # what configure does when it calls configure scripts in
6582 # subdirectories, so they share the cache.
6583 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6584 # config.status only pays attention to the cache file if you give it the
6585 # --recheck option to rerun configure.
6586 #
6587 EOF
6588 # The following way of writing the cache mishandles newlines in values,
6589 # but we know of no workaround that is simple, portable, and efficient.
6590 # So, don't put newlines in cache variables' values.
6591 # Ultrix sh set writes to stderr and can't be redirected directly,
6592 # and sets the high bit in the cache file unless we assign to the vars.
6593 (set) 2>&1 |
6594   case `(ac_space=' '; set) 2>&1` in
6595   *ac_space=\ *)
6596     # `set' does not quote correctly, so add quotes (double-quote substitution
6597     # turns \\\\ into \\, and sed turns \\ into \).
6598     sed -n \
6599       -e "s/'/'\\\\''/g" \
6600       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6601     ;;
6602   *)
6603     # `set' quotes correctly as required by POSIX, so do not add quotes.
6604     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6605     ;;
6606   esac >> confcache
6607 if cmp -s $cache_file confcache; then
6608   :
6609 else
6610   if test -w $cache_file; then
6611     echo "updating cache $cache_file"
6612     cat confcache > $cache_file
6613   else
6614     echo "not updating unwritable cache $cache_file"
6615   fi
6616 fi
6617 rm -f confcache
6618
6619 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6620
6621 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6622 # Let make expand exec_prefix.
6623 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6624
6625 # Any assignment to VPATH causes Sun make to only execute
6626 # the first set of double-colon rules, so remove it if not needed.
6627 # If there is a colon in the path, we need to keep it.
6628 if test "x$srcdir" = x.; then
6629   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6630 fi
6631
6632 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6633
6634 DEFS=-DHAVE_CONFIG_H
6635
6636 # Without the "./", some shells look in PATH for config.status.
6637 : ${CONFIG_STATUS=./config.status}
6638
6639 echo creating $CONFIG_STATUS
6640 rm -f $CONFIG_STATUS
6641 cat > $CONFIG_STATUS <<EOF
6642 #! /bin/sh
6643 # Generated automatically by configure.
6644 # Run this file to recreate the current configuration.
6645 # This directory was configured as follows,
6646 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6647 #
6648 # $0 $ac_configure_args
6649 #
6650 # Compiler output produced by configure, useful for debugging
6651 # configure, is in ./config.log if it exists.
6652
6653 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6654 for ac_option
6655 do
6656   case "\$ac_option" in
6657   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6658     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6659     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6660   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6661     echo "$CONFIG_STATUS generated by autoconf version 2.12"
6662     exit 0 ;;
6663   -help | --help | --hel | --he | --h)
6664     echo "\$ac_cs_usage"; exit 0 ;;
6665   *) echo "\$ac_cs_usage"; exit 1 ;;
6666   esac
6667 done
6668
6669 ac_given_srcdir=$srcdir
6670 ac_given_INSTALL="$INSTALL"
6671
6672 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6673 EOF
6674 cat >> $CONFIG_STATUS <<EOF
6675
6676 # Protect against being on the right side of a sed subst in config.status.
6677 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6678  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6679 $ac_vpsub
6680 $extrasub
6681 s%@CFLAGS@%$CFLAGS%g
6682 s%@CPPFLAGS@%$CPPFLAGS%g
6683 s%@CXXFLAGS@%$CXXFLAGS%g
6684 s%@DEFS@%$DEFS%g
6685 s%@LDFLAGS@%$LDFLAGS%g
6686 s%@LIBS@%$LIBS%g
6687 s%@exec_prefix@%$exec_prefix%g
6688 s%@prefix@%$prefix%g
6689 s%@program_transform_name@%$program_transform_name%g
6690 s%@bindir@%$bindir%g
6691 s%@sbindir@%$sbindir%g
6692 s%@libexecdir@%$libexecdir%g
6693 s%@datadir@%$datadir%g
6694 s%@sysconfdir@%$sysconfdir%g
6695 s%@sharedstatedir@%$sharedstatedir%g
6696 s%@localstatedir@%$localstatedir%g
6697 s%@libdir@%$libdir%g
6698 s%@includedir@%$includedir%g
6699 s%@oldincludedir@%$oldincludedir%g
6700 s%@infodir@%$infodir%g
6701 s%@mandir@%$mandir%g
6702 s%@CC@%$CC%g
6703 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6704 s%@INSTALL_DATA@%$INSTALL_DATA%g
6705 s%@SHELL@%$SHELL%g
6706 s%@MPROGS@%$MPROGS%g
6707 s%@LDSHFLAGS@%$LDSHFLAGS%g
6708 s%@HOST_OS@%$HOST_OS%g
6709 s%@WRAP32@%$WRAP32%g
6710 s%@PICFLAG@%$PICFLAG%g
6711 s%@AWK@%$AWK%g
6712 s%@host@%$host%g
6713 s%@host_alias@%$host_alias%g
6714 s%@host_cpu@%$host_cpu%g
6715 s%@host_vendor@%$host_vendor%g
6716 s%@host_os@%$host_os%g
6717 s%@target@%$target%g
6718 s%@target_alias@%$target_alias%g
6719 s%@target_cpu@%$target_cpu%g
6720 s%@target_vendor@%$target_vendor%g
6721 s%@target_os@%$target_os%g
6722 s%@build@%$build%g
6723 s%@build_alias@%$build_alias%g
6724 s%@build_cpu@%$build_cpu%g
6725 s%@build_vendor@%$build_vendor%g
6726 s%@build_os@%$build_os%g
6727 s%@MAINT@%$MAINT%g
6728 s%@AUTOCONF@%$AUTOCONF%g
6729 s%@AUTOHEADER@%$AUTOHEADER%g
6730 s%@CPP@%$CPP%g
6731 s%@LIBOBJS@%$LIBOBJS%g
6732 s%@builddir@%$builddir%g
6733
6734 CEOF
6735 EOF
6736
6737 cat >> $CONFIG_STATUS <<\EOF
6738
6739 # Split the substitutions into bite-sized pieces for seds with
6740 # small command number limits, like on Digital OSF/1 and HP-UX.
6741 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6742 ac_file=1 # Number of current file.
6743 ac_beg=1 # First line for current file.
6744 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6745 ac_more_lines=:
6746 ac_sed_cmds=""
6747 while $ac_more_lines; do
6748   if test $ac_beg -gt 1; then
6749     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6750   else
6751     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6752   fi
6753   if test ! -s conftest.s$ac_file; then
6754     ac_more_lines=false
6755     rm -f conftest.s$ac_file
6756   else
6757     if test -z "$ac_sed_cmds"; then
6758       ac_sed_cmds="sed -f conftest.s$ac_file"
6759     else
6760       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6761     fi
6762     ac_file=`expr $ac_file + 1`
6763     ac_beg=$ac_end
6764     ac_end=`expr $ac_end + $ac_max_sed_cmds`
6765   fi
6766 done
6767 if test -z "$ac_sed_cmds"; then
6768   ac_sed_cmds=cat
6769 fi
6770 EOF
6771
6772 cat >> $CONFIG_STATUS <<EOF
6773
6774 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
6775 EOF
6776 cat >> $CONFIG_STATUS <<\EOF
6777 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6778   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6779   case "$ac_file" in
6780   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6781        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6782   *) ac_file_in="${ac_file}.in" ;;
6783   esac
6784
6785   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6786
6787   # Remove last slash and all that follows it.  Not all systems have dirname.
6788   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6789   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6790     # The file is in a subdirectory.
6791     test ! -d "$ac_dir" && mkdir "$ac_dir"
6792     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6793     # A "../" for each directory in $ac_dir_suffix.
6794     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6795   else
6796     ac_dir_suffix= ac_dots=
6797   fi
6798
6799   case "$ac_given_srcdir" in
6800   .)  srcdir=.
6801       if test -z "$ac_dots"; then top_srcdir=.
6802       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6803   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6804   *) # Relative path.
6805     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6806     top_srcdir="$ac_dots$ac_given_srcdir" ;;
6807   esac
6808
6809   case "$ac_given_INSTALL" in
6810   [/$]*) INSTALL="$ac_given_INSTALL" ;;
6811   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6812   esac
6813
6814   echo creating "$ac_file"
6815   rm -f "$ac_file"
6816   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6817   case "$ac_file" in
6818   *Makefile*) ac_comsub="1i\\
6819 # $configure_input" ;;
6820   *) ac_comsub= ;;
6821   esac
6822
6823   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6824   sed -e "$ac_comsub
6825 s%@configure_input@%$configure_input%g
6826 s%@srcdir@%$srcdir%g
6827 s%@top_srcdir@%$top_srcdir%g
6828 s%@INSTALL@%$INSTALL%g
6829 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6830 fi; done
6831 rm -f conftest.s*
6832
6833 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6834 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6835 #
6836 # ac_d sets the value in "#define NAME VALUE" lines.
6837 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6838 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
6839 ac_dC='\3'
6840 ac_dD='%g'
6841 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6842 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6843 ac_uB='\([      ]\)%\1#\2define\3'
6844 ac_uC=' '
6845 ac_uD='\4%g'
6846 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6847 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6848 ac_eB='$%\1#\2define\3'
6849 ac_eC=' '
6850 ac_eD='%g'
6851
6852 if test "${CONFIG_HEADERS+set}" != set; then
6853 EOF
6854 cat >> $CONFIG_STATUS <<EOF
6855   CONFIG_HEADERS="include/config.h"
6856 EOF
6857 cat >> $CONFIG_STATUS <<\EOF
6858 fi
6859 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6860   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6861   case "$ac_file" in
6862   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6863        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6864   *) ac_file_in="${ac_file}.in" ;;
6865   esac
6866
6867   echo creating $ac_file
6868
6869   rm -f conftest.frag conftest.in conftest.out
6870   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6871   cat $ac_file_inputs > conftest.in
6872
6873 EOF
6874
6875 # Transform confdefs.h into a sed script conftest.vals that substitutes
6876 # the proper values into config.h.in to produce config.h.  And first:
6877 # Protect against being on the right side of a sed subst in config.status.
6878 # Protect against being in an unquoted here document in config.status.
6879 rm -f conftest.vals
6880 cat > conftest.hdr <<\EOF
6881 s/[\\&%]/\\&/g
6882 s%[\\$`]%\\&%g
6883 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6884 s%ac_d%ac_u%gp
6885 s%ac_u%ac_e%gp
6886 EOF
6887 sed -n -f conftest.hdr confdefs.h > conftest.vals
6888 rm -f conftest.hdr
6889
6890 # This sed command replaces #undef with comments.  This is necessary, for
6891 # example, in the case of _POSIX_SOURCE, which is predefined and required
6892 # on some systems where configure will not decide to define it.
6893 cat >> conftest.vals <<\EOF
6894 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6895 EOF
6896
6897 # Break up conftest.vals because some shells have a limit on
6898 # the size of here documents, and old seds have small limits too.
6899
6900 rm -f conftest.tail
6901 while :
6902 do
6903   ac_lines=`grep -c . conftest.vals`
6904   # grep -c gives empty output for an empty file on some AIX systems.
6905   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6906   # Write a limited-size here document to conftest.frag.
6907   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6908   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6909   echo 'CEOF
6910   sed -f conftest.frag conftest.in > conftest.out
6911   rm -f conftest.in
6912   mv conftest.out conftest.in
6913 ' >> $CONFIG_STATUS
6914   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6915   rm -f conftest.vals
6916   mv conftest.tail conftest.vals
6917 done
6918 rm -f conftest.vals
6919
6920 cat >> $CONFIG_STATUS <<\EOF
6921   rm -f conftest.frag conftest.h
6922   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6923   cat conftest.in >> conftest.h
6924   rm -f conftest.in
6925   if cmp -s $ac_file conftest.h 2>/dev/null; then
6926     echo "$ac_file is unchanged"
6927     rm -f conftest.h
6928   else
6929     # Remove last slash and all that follows it.  Not all systems have dirname.
6930       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6931       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6932       # The file is in a subdirectory.
6933       test ! -d "$ac_dir" && mkdir "$ac_dir"
6934     fi
6935     rm -f $ac_file
6936     mv conftest.h $ac_file
6937   fi
6938 fi; done
6939
6940 EOF
6941 cat >> $CONFIG_STATUS <<EOF
6942
6943 EOF
6944 cat >> $CONFIG_STATUS <<\EOF
6945
6946 exit 0
6947 EOF
6948 chmod +x $CONFIG_STATUS
6949 rm -fr confdefs* $ac_clean_files
6950 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6951