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