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