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