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