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