Call VFS initialisation, share connect and share disconnect functions.
[samba.git] / source / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.14.1 
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_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --enable-maintainer-mode enable some make rules for maintainers"
17 ac_help="$ac_help
18   --with-smbwrapper     Include SMB wrapper support
19   --without-smbwrapper  Don't include SMB wrapper support (default)"
20 ac_help="$ac_help
21   --with-afs     Include AFS support
22   --without-afs  Don't include AFS support (default)"
23 ac_help="$ac_help
24   --with-dfs     Include DFS support
25   --without-dfs  Don't include DFS support (default)"
26 ac_help="$ac_help
27   --with-krb4=base-dir     Include Kerberos IV support
28   --whithout-krb4          Don't include Kerbers IV support (default)"
29 ac_help="$ac_help
30   --with-automount     Include AUTOMOUNT support
31   --without-automount  Don't include AUTOMOUNT support (default)"
32 ac_help="$ac_help
33   --with-smbmount     Include SMBMOUNT (Linux only) support
34   --without-smbmount  Don't include SMBMOUNT support (default)"
35 ac_help="$ac_help
36   --with-ldap     Include LDAP support
37   --without-ldap  Don't include LDAP support (default)"
38 ac_help="$ac_help
39   --with-nisplus     Include NISPLUS password database support
40   --without-nisplus  Don't include NISPLUS password database support (default)"
41 ac_help="$ac_help
42   --with-nisplus-home     Include NISPLUS_HOME support
43   --without-nisplus-home  Don't include NISPLUS_HOME support (default)"
44 ac_help="$ac_help
45   --with-ssl     Include SSL support
46   --without-ssl  Don't include SSL support (default)"
47 ac_help="$ac_help
48   --with-mmap     Include experimental MMAP support
49   --without-mmap  Don't include MMAP support (default)"
50 ac_help="$ac_help
51   --with-syslog     Include experimental SYSLOG support
52   --without-syslog  Don't include SYSLOG support (default)"
53 ac_help="$ac_help
54   --with-profile     Include profile support
55   --without-profile  Don't include profile support (default)"
56 ac_help="$ac_help
57   --with-netatalk     Include experimental Netatalk support
58   --without-netatalk  Don't include experimental Netatalk support (default)"
59 ac_help="$ac_help
60   --with-quotas     Include experimental disk-quota support
61   --without-quotas  Don't include experimental disk-quota support (default)"
62
63 # Initialize some variables set by options.
64 # The variables have the same names as the options, with
65 # dashes changed to underlines.
66 build=NONE
67 cache_file=./config.cache
68 exec_prefix=NONE
69 host=NONE
70 no_create=
71 nonopt=NONE
72 no_recursion=
73 prefix=NONE
74 program_prefix=NONE
75 program_suffix=NONE
76 program_transform_name=s,x,x,
77 silent=
78 site=
79 srcdir=
80 target=NONE
81 verbose=
82 x_includes=NONE
83 x_libraries=NONE
84 bindir='${exec_prefix}/bin'
85 sbindir='${exec_prefix}/sbin'
86 libexecdir='${exec_prefix}/libexec'
87 datadir='${prefix}/share'
88 sysconfdir='${prefix}/etc'
89 sharedstatedir='${prefix}/com'
90 localstatedir='${prefix}/var'
91 libdir='${exec_prefix}/lib'
92 includedir='${prefix}/include'
93 oldincludedir='/usr/include'
94 infodir='${prefix}/info'
95 mandir='${prefix}/man'
96
97 # Initialize some other variables.
98 subdirs=
99 MFLAGS= MAKEFLAGS=
100 SHELL=${CONFIG_SHELL-/bin/sh}
101 # Maximum number of lines to put in a shell here document.
102 ac_max_here_lines=12
103
104 ac_prev=
105 for ac_option
106 do
107
108   # If the previous option needs an argument, assign it.
109   if test -n "$ac_prev"; then
110     eval "$ac_prev=\$ac_option"
111     ac_prev=
112     continue
113   fi
114
115   case "$ac_option" in
116   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
117   *) ac_optarg= ;;
118   esac
119
120   # Accept the important Cygnus configure options, so we can diagnose typos.
121
122   case "$ac_option" in
123
124   -bindir | --bindir | --bindi | --bind | --bin | --bi)
125     ac_prev=bindir ;;
126   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
127     bindir="$ac_optarg" ;;
128
129   -build | --build | --buil | --bui | --bu)
130     ac_prev=build ;;
131   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
132     build="$ac_optarg" ;;
133
134   -cache-file | --cache-file | --cache-fil | --cache-fi \
135   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
136     ac_prev=cache_file ;;
137   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
138   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
139     cache_file="$ac_optarg" ;;
140
141   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
142     ac_prev=datadir ;;
143   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
144   | --da=*)
145     datadir="$ac_optarg" ;;
146
147   -disable-* | --disable-*)
148     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
149     # Reject names that are not valid shell variable names.
150     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
151       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
152     fi
153     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
154     eval "enable_${ac_feature}=no" ;;
155
156   -enable-* | --enable-*)
157     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
158     # Reject names that are not valid shell variable names.
159     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
160       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
161     fi
162     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
163     case "$ac_option" in
164       *=*) ;;
165       *) ac_optarg=yes ;;
166     esac
167     eval "enable_${ac_feature}='$ac_optarg'" ;;
168
169   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
170   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
171   | --exec | --exe | --ex)
172     ac_prev=exec_prefix ;;
173   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
174   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
175   | --exec=* | --exe=* | --ex=*)
176     exec_prefix="$ac_optarg" ;;
177
178   -gas | --gas | --ga | --g)
179     # Obsolete; use --with-gas.
180     with_gas=yes ;;
181
182   -help | --help | --hel | --he)
183     # Omit some internal or obsolete options to make the list less imposing.
184     # This message is too long to be a string in the A/UX 3.1 sh.
185     cat << EOF
186 Usage: configure [options] [host]
187 Options: [defaults in brackets after descriptions]
188 Configuration:
189   --cache-file=FILE       cache test results in FILE
190   --help                  print this message
191   --no-create             do not create output files
192   --quiet, --silent       do not print \`checking...' messages
193   --version               print the version of autoconf that created configure
194 Directory and file names:
195   --prefix=PREFIX         install architecture-independent files in PREFIX
196                           [$ac_default_prefix]
197   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
198                           [same as prefix]
199   --bindir=DIR            user executables in DIR [EPREFIX/bin]
200   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
201   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
202   --datadir=DIR           read-only architecture-independent data in DIR
203                           [PREFIX/share]
204   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
205   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
206                           [PREFIX/com]
207   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
208   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
209   --includedir=DIR        C header files in DIR [PREFIX/include]
210   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
211   --infodir=DIR           info documentation in DIR [PREFIX/info]
212   --mandir=DIR            man documentation in DIR [PREFIX/man]
213   --srcdir=DIR            find the sources in DIR [configure dir or ..]
214   --program-prefix=PREFIX prepend PREFIX to installed program names
215   --program-suffix=SUFFIX append SUFFIX to installed program names
216   --program-transform-name=PROGRAM
217                           run sed PROGRAM on installed program names
218 EOF
219     cat << EOF
220 Host type:
221   --build=BUILD           configure for building on BUILD [BUILD=HOST]
222   --host=HOST             configure for HOST [guessed]
223   --target=TARGET         configure for TARGET [TARGET=HOST]
224 Features and packages:
225   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
226   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
227   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
228   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
229   --x-includes=DIR        X include files are in DIR
230   --x-libraries=DIR       X library files are in DIR
231 EOF
232     if test -n "$ac_help"; then
233       echo "--enable and --with options recognized:$ac_help"
234     fi
235     exit 0 ;;
236
237   -host | --host | --hos | --ho)
238     ac_prev=host ;;
239   -host=* | --host=* | --hos=* | --ho=*)
240     host="$ac_optarg" ;;
241
242   -includedir | --includedir | --includedi | --included | --include \
243   | --includ | --inclu | --incl | --inc)
244     ac_prev=includedir ;;
245   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
246   | --includ=* | --inclu=* | --incl=* | --inc=*)
247     includedir="$ac_optarg" ;;
248
249   -infodir | --infodir | --infodi | --infod | --info | --inf)
250     ac_prev=infodir ;;
251   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
252     infodir="$ac_optarg" ;;
253
254   -libdir | --libdir | --libdi | --libd)
255     ac_prev=libdir ;;
256   -libdir=* | --libdir=* | --libdi=* | --libd=*)
257     libdir="$ac_optarg" ;;
258
259   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
260   | --libexe | --libex | --libe)
261     ac_prev=libexecdir ;;
262   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
263   | --libexe=* | --libex=* | --libe=*)
264     libexecdir="$ac_optarg" ;;
265
266   -localstatedir | --localstatedir | --localstatedi | --localstated \
267   | --localstate | --localstat | --localsta | --localst \
268   | --locals | --local | --loca | --loc | --lo)
269     ac_prev=localstatedir ;;
270   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
271   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
272   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
273     localstatedir="$ac_optarg" ;;
274
275   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
276     ac_prev=mandir ;;
277   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
278     mandir="$ac_optarg" ;;
279
280   -nfp | --nfp | --nf)
281     # Obsolete; use --without-fp.
282     with_fp=no ;;
283
284   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
285   | --no-cr | --no-c)
286     no_create=yes ;;
287
288   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
289   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
290     no_recursion=yes ;;
291
292   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
293   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
294   | --oldin | --oldi | --old | --ol | --o)
295     ac_prev=oldincludedir ;;
296   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
297   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
298   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
299     oldincludedir="$ac_optarg" ;;
300
301   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
302     ac_prev=prefix ;;
303   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
304     prefix="$ac_optarg" ;;
305
306   -program-prefix | --program-prefix | --program-prefi | --program-pref \
307   | --program-pre | --program-pr | --program-p)
308     ac_prev=program_prefix ;;
309   -program-prefix=* | --program-prefix=* | --program-prefi=* \
310   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
311     program_prefix="$ac_optarg" ;;
312
313   -program-suffix | --program-suffix | --program-suffi | --program-suff \
314   | --program-suf | --program-su | --program-s)
315     ac_prev=program_suffix ;;
316   -program-suffix=* | --program-suffix=* | --program-suffi=* \
317   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
318     program_suffix="$ac_optarg" ;;
319
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     ac_prev=program_transform_name ;;
328   -program-transform-name=* | --program-transform-name=* \
329   | --program-transform-nam=* | --program-transform-na=* \
330   | --program-transform-n=* | --program-transform-=* \
331   | --program-transform=* | --program-transfor=* \
332   | --program-transfo=* | --program-transf=* \
333   | --program-trans=* | --program-tran=* \
334   | --progr-tra=* | --program-tr=* | --program-t=*)
335     program_transform_name="$ac_optarg" ;;
336
337   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
338   | -silent | --silent | --silen | --sile | --sil)
339     silent=yes ;;
340
341   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
342     ac_prev=sbindir ;;
343   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
344   | --sbi=* | --sb=*)
345     sbindir="$ac_optarg" ;;
346
347   -sharedstatedir | --sharedstatedir | --sharedstatedi \
348   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
349   | --sharedst | --shareds | --shared | --share | --shar \
350   | --sha | --sh)
351     ac_prev=sharedstatedir ;;
352   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
353   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
354   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
355   | --sha=* | --sh=*)
356     sharedstatedir="$ac_optarg" ;;
357
358   -site | --site | --sit)
359     ac_prev=site ;;
360   -site=* | --site=* | --sit=*)
361     site="$ac_optarg" ;;
362
363   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
364     ac_prev=srcdir ;;
365   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
366     srcdir="$ac_optarg" ;;
367
368   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
369   | --syscon | --sysco | --sysc | --sys | --sy)
370     ac_prev=sysconfdir ;;
371   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
372   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
373     sysconfdir="$ac_optarg" ;;
374
375   -target | --target | --targe | --targ | --tar | --ta | --t)
376     ac_prev=target ;;
377   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
378     target="$ac_optarg" ;;
379
380   -v | -verbose | --verbose | --verbos | --verbo | --verb)
381     verbose=yes ;;
382
383   -version | --version | --versio | --versi | --vers)
384     echo "configure generated by autoconf version 2.14.1"
385     exit 0 ;;
386
387   -with-* | --with-*)
388     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
389     # Reject names that are not valid shell variable names.
390     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
391       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
392     fi
393     ac_package=`echo $ac_package| sed 's/-/_/g'`
394     case "$ac_option" in
395       *=*) ;;
396       *) ac_optarg=yes ;;
397     esac
398     eval "with_${ac_package}='$ac_optarg'" ;;
399
400   -without-* | --without-*)
401     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
402     # Reject names that are not valid shell variable names.
403     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
404       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
405     fi
406     ac_package=`echo $ac_package| sed 's/-/_/g'`
407     eval "with_${ac_package}=no" ;;
408
409   --x)
410     # Obsolete; use --with-x.
411     with_x=yes ;;
412
413   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
414   | --x-incl | --x-inc | --x-in | --x-i)
415     ac_prev=x_includes ;;
416   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
417   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
418     x_includes="$ac_optarg" ;;
419
420   -x-libraries | --x-libraries | --x-librarie | --x-librari \
421   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
422     ac_prev=x_libraries ;;
423   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
424   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
425     x_libraries="$ac_optarg" ;;
426
427   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
428     ;;
429
430   *)
431     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
432       echo "configure: warning: $ac_option: invalid host type" 1>&2
433     fi
434     if test "x$nonopt" != xNONE; then
435       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
436     fi
437     nonopt="$ac_option"
438     ;;
439
440   esac
441 done
442
443 if test -n "$ac_prev"; then
444   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
445 fi
446
447 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
448
449 # File descriptor usage:
450 # 0 standard input
451 # 1 file creation
452 # 2 errors and warnings
453 # 3 some systems may open it to /dev/tty
454 # 4 used on the Kubota Titan
455 # 6 checking for... messages and results
456 # 5 compiler messages saved in config.log
457 if test "$silent" = yes; then
458   exec 6>/dev/null
459 else
460   exec 6>&1
461 fi
462 exec 5>./config.log
463
464 echo "\
465 This file contains any messages produced by compilers while
466 running configure, to aid debugging if configure makes a mistake.
467 " 1>&5
468
469 # Strip out --no-create and --no-recursion so they do not pile up.
470 # Also quote any args containing shell metacharacters.
471 ac_configure_args=
472 for ac_arg
473 do
474   case "$ac_arg" in
475   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
476   | --no-cr | --no-c) ;;
477   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
478   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
479   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
480   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
481   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
482   esac
483 done
484
485 # NLS nuisances.
486 # Only set these to C if already set.  These must not be set unconditionally
487 # because not all systems understand e.g. LANG=C (notably SCO).
488 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
489 # Non-C LC_CTYPE values break the ctype check.
490 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
491 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
492 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
493 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
494
495 # confdefs.h avoids OS command line length limits that DEFS can exceed.
496 rm -rf conftest* confdefs.h
497 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
498 echo > confdefs.h
499
500 # A filename unique to this package, relative to the directory that
501 # configure is in, which we can look for to find out if srcdir is correct.
502 ac_unique_file=include/includes.h
503
504 # Find the source files, if location was not specified.
505 if test -z "$srcdir"; then
506   ac_srcdir_defaulted=yes
507   # Try the directory containing this script, then its parent.
508   ac_prog=$0
509   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
510   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
511   srcdir=$ac_confdir
512   if test ! -r $srcdir/$ac_unique_file; then
513     srcdir=..
514   fi
515 else
516   ac_srcdir_defaulted=no
517 fi
518 if test ! -r $srcdir/$ac_unique_file; then
519   if test "$ac_srcdir_defaulted" = yes; then
520     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
521   else
522     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
523   fi
524 fi
525 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
526
527 # Prefer explicitly selected file to automatically selected ones.
528 if test -z "$CONFIG_SITE"; then
529   if test "x$prefix" != xNONE; then
530     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
531   else
532     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
533   fi
534 fi
535 for ac_site_file in $CONFIG_SITE; do
536   if test -r "$ac_site_file"; then
537     echo "loading site script $ac_site_file"
538     . "$ac_site_file"
539   fi
540 done
541
542 if test -r "$cache_file"; then
543   echo "loading cache $cache_file"
544   . $cache_file
545 else
546   echo "creating cache $cache_file"
547   > $cache_file
548 fi
549
550 ac_ext=c
551 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
552 ac_cpp='$CPP $CPPFLAGS'
553 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
554 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
555 cross_compiling=$ac_cv_prog_cc_cross
556
557 ac_exeext=
558 ac_objext=o
559 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
560   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
561   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
562     ac_n= ac_c='
563 ' ac_t='        '
564   else
565     ac_n=-n ac_c= ac_t=
566   fi
567 else
568   ac_n= ac_c='\c' ac_t=
569 fi
570
571
572
573 # we want to be compatibe with older versions of Samba
574
575
576
577
578
579
580
581
582
583
584 # compile with optimisation and without debugging by default
585 CFLAGS=${CFLAGS-"-O"}
586
587 # Extract the first word of "gcc", so it can be a program name with args.
588 set dummy gcc; ac_word=$2
589 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
590 echo "configure:591: checking for $ac_word" >&5
591 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
592   echo $ac_n "(cached) $ac_c" 1>&6
593 else
594   if test -n "$CC"; then
595   ac_cv_prog_CC="$CC" # Let the user override the test.
596 else
597   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
598   ac_dummy="$PATH"
599   for ac_dir in $ac_dummy; do
600     test -z "$ac_dir" && ac_dir=.
601     if test -f $ac_dir/$ac_word; then
602       ac_cv_prog_CC="gcc"
603       break
604     fi
605   done
606   IFS="$ac_save_ifs"
607 fi
608 fi
609 CC="$ac_cv_prog_CC"
610 if test -n "$CC"; then
611   echo "$ac_t""$CC" 1>&6
612 else
613   echo "$ac_t""no" 1>&6
614 fi
615
616 if test -z "$CC"; then
617   # Extract the first word of "cc", so it can be a program name with args.
618 set dummy cc; ac_word=$2
619 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
620 echo "configure:621: checking for $ac_word" >&5
621 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
622   echo $ac_n "(cached) $ac_c" 1>&6
623 else
624   if test -n "$CC"; then
625   ac_cv_prog_CC="$CC" # Let the user override the test.
626 else
627   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
628   ac_prog_rejected=no
629   ac_dummy="$PATH"
630   for ac_dir in $ac_dummy; do
631     test -z "$ac_dir" && ac_dir=.
632     if test -f $ac_dir/$ac_word; then
633       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
634         ac_prog_rejected=yes
635         continue
636       fi
637       ac_cv_prog_CC="cc"
638       break
639     fi
640   done
641   IFS="$ac_save_ifs"
642 if test $ac_prog_rejected = yes; then
643   # We found a bogon in the path, so make sure we never use it.
644   set dummy $ac_cv_prog_CC
645   shift
646   if test $# -gt 0; then
647     # We chose a different compiler from the bogus one.
648     # However, it has the same basename, so the bogon will be chosen
649     # first if we set CC to just the basename; use the full file name.
650     shift
651     set dummy "$ac_dir/$ac_word" "$@"
652     shift
653     ac_cv_prog_CC="$@"
654   fi
655 fi
656 fi
657 fi
658 CC="$ac_cv_prog_CC"
659 if test -n "$CC"; then
660   echo "$ac_t""$CC" 1>&6
661 else
662   echo "$ac_t""no" 1>&6
663 fi
664
665   if test -z "$CC"; then
666     case "`uname -s`" in
667     *win32* | *WIN32*)
668       # Extract the first word of "cl", so it can be a program name with args.
669 set dummy cl; ac_word=$2
670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
671 echo "configure:672: checking for $ac_word" >&5
672 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
673   echo $ac_n "(cached) $ac_c" 1>&6
674 else
675   if test -n "$CC"; then
676   ac_cv_prog_CC="$CC" # Let the user override the test.
677 else
678   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
679   ac_dummy="$PATH"
680   for ac_dir in $ac_dummy; do
681     test -z "$ac_dir" && ac_dir=.
682     if test -f $ac_dir/$ac_word; then
683       ac_cv_prog_CC="cl"
684       break
685     fi
686   done
687   IFS="$ac_save_ifs"
688 fi
689 fi
690 CC="$ac_cv_prog_CC"
691 if test -n "$CC"; then
692   echo "$ac_t""$CC" 1>&6
693 else
694   echo "$ac_t""no" 1>&6
695 fi
696  ;;
697     esac
698   fi
699   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
700 fi
701
702 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
703 echo "configure:704: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
704
705 ac_ext=c
706 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
707 ac_cpp='$CPP $CPPFLAGS'
708 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
709 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
710 cross_compiling=$ac_cv_prog_cc_cross
711
712 cat > conftest.$ac_ext << EOF
713
714 #line 715 "configure"
715 #include "confdefs.h"
716
717 main(){return(0);}
718 EOF
719 if { (eval echo configure:720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
720   ac_cv_prog_cc_works=yes
721   # If we can't run a trivial program, we are probably using a cross compiler.
722   if (./conftest; exit) 2>/dev/null; then
723     ac_cv_prog_cc_cross=no
724   else
725     ac_cv_prog_cc_cross=yes
726   fi
727 else
728   echo "configure: failed program was:" >&5
729   cat conftest.$ac_ext >&5
730   ac_cv_prog_cc_works=no
731 fi
732 rm -fr conftest*
733 ac_ext=c
734 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
735 ac_cpp='$CPP $CPPFLAGS'
736 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
737 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
738 cross_compiling=$ac_cv_prog_cc_cross
739
740 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
741 if test $ac_cv_prog_cc_works = no; then
742   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
743 fi
744 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
745 echo "configure:746: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
746 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
747 cross_compiling=$ac_cv_prog_cc_cross
748
749 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
750 echo "configure:751: checking whether we are using GNU C" >&5
751 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
752   echo $ac_n "(cached) $ac_c" 1>&6
753 else
754   cat > conftest.c <<EOF
755 #ifdef __GNUC__
756   yes;
757 #endif
758 EOF
759 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
760   ac_cv_prog_gcc=yes
761 else
762   ac_cv_prog_gcc=no
763 fi
764 fi
765
766 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
767
768 if test $ac_cv_prog_gcc = yes; then
769   GCC=yes
770 else
771   GCC=
772 fi
773
774 ac_test_CFLAGS="${CFLAGS+set}"
775 ac_save_CFLAGS="$CFLAGS"
776 CFLAGS=
777 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
778 echo "configure:779: checking whether ${CC-cc} accepts -g" >&5
779 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
780   echo $ac_n "(cached) $ac_c" 1>&6
781 else
782   echo 'void f(){}' > conftest.c
783 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
784   ac_cv_prog_cc_g=yes
785 else
786   ac_cv_prog_cc_g=no
787 fi
788 rm -f conftest*
789
790 fi
791
792 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
793 if test "$ac_test_CFLAGS" = set; then
794   CFLAGS="$ac_save_CFLAGS"
795 elif test $ac_cv_prog_cc_g = yes; then
796   if test "$GCC" = yes; then
797     CFLAGS="-g -O2"
798   else
799     CFLAGS="-g"
800   fi
801 else
802   if test "$GCC" = yes; then
803     CFLAGS="-O2"
804   else
805     CFLAGS=
806   fi
807 fi
808
809 ac_aux_dir=
810 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
811   if test -f $ac_dir/install-sh; then
812     ac_aux_dir=$ac_dir
813     ac_install_sh="$ac_aux_dir/install-sh -c"
814     break
815   elif test -f $ac_dir/install.sh; then
816     ac_aux_dir=$ac_dir
817     ac_install_sh="$ac_aux_dir/install.sh -c"
818     break
819   fi
820 done
821 if test -z "$ac_aux_dir"; then
822   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
823 fi
824 ac_config_guess=$ac_aux_dir/config.guess
825 ac_config_sub=$ac_aux_dir/config.sub
826 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
827
828 # Find a good install program.  We prefer a C program (faster),
829 # so one script is as good as another.  But avoid the broken or
830 # incompatible versions:
831 # SysV /etc/install, /usr/sbin/install
832 # SunOS /usr/etc/install
833 # IRIX /sbin/install
834 # AIX /bin/install
835 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
836 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
837 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
838 # ./install, which can be erroneously created by make from ./install.sh.
839 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
840 echo "configure:841: checking for a BSD compatible install" >&5
841 if test -z "$INSTALL"; then
842 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
843   echo $ac_n "(cached) $ac_c" 1>&6
844 else
845     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
846   for ac_dir in $PATH; do
847     # Account for people who put trailing slashes in PATH elements.
848     case "$ac_dir/" in
849     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
850     *)
851       # OSF1 and SCO ODT 3.0 have their own names for install.
852       # Don't use installbsd from OSF since it installs stuff as root
853       # by default.
854       for ac_prog in ginstall scoinst install; do
855         if test -f $ac_dir/$ac_prog; then
856           if test $ac_prog = install &&
857             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
858             # AIX install.  It has an incompatible calling convention.
859             :
860           else
861             ac_cv_path_install="$ac_dir/$ac_prog -c"
862             break 2
863           fi
864         fi
865       done
866       ;;
867     esac
868   done
869   IFS="$ac_save_IFS"
870
871 fi
872   if test "${ac_cv_path_install+set}" = set; then
873     INSTALL="$ac_cv_path_install"
874   else
875     # As a last resort, use the slow shell script.  We don't cache a
876     # path for INSTALL within a source directory, because that will
877     # break other packages using the cache if that directory is
878     # removed, or if the path is relative.
879     INSTALL="$ac_install_sh"
880   fi
881 fi
882 echo "$ac_t""$INSTALL" 1>&6
883
884 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
885 # It thinks the first close brace ends the variable substitution.
886 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
887
888 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
889
890 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
891
892 for ac_prog in mawk gawk nawk awk
893 do
894 # Extract the first word of "$ac_prog", so it can be a program name with args.
895 set dummy $ac_prog; ac_word=$2
896 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
897 echo "configure:898: checking for $ac_word" >&5
898 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
899   echo $ac_n "(cached) $ac_c" 1>&6
900 else
901   if test -n "$AWK"; then
902   ac_cv_prog_AWK="$AWK" # Let the user override the test.
903 else
904   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
905   ac_dummy="$PATH"
906   for ac_dir in $ac_dummy; do
907     test -z "$ac_dir" && ac_dir=.
908     if test -f $ac_dir/$ac_word; then
909       ac_cv_prog_AWK="$ac_prog"
910       break
911     fi
912   done
913   IFS="$ac_save_ifs"
914 fi
915 fi
916 AWK="$ac_cv_prog_AWK"
917 if test -n "$AWK"; then
918   echo "$ac_t""$AWK" 1>&6
919 else
920   echo "$ac_t""no" 1>&6
921 fi
922
923 test -n "$AWK" && break
924 done
925
926
927
928 # Do some error checking and defaulting for the host and target type.
929 # The inputs are:
930 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
931 #
932 # The rules are:
933 # 1. You are not allowed to specify --host, --target, and nonopt at the
934 #    same time.
935 # 2. Host defaults to nonopt.
936 # 3. If nonopt is not specified, then host defaults to the current host,
937 #    as determined by config.guess.
938 # 4. Target and build default to nonopt.
939 # 5. If nonopt is not specified, then target and build default to host.
940
941 # The aliases save the names the user supplied, while $host etc.
942 # will get canonicalized.
943 case $host---$target---$nonopt in
944 NONE---*---* | *---NONE---* | *---*---NONE) ;;
945 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
946 esac
947
948
949 # Make sure we can run config.sub.
950 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
951 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
952 fi
953
954 echo $ac_n "checking host system type""... $ac_c" 1>&6
955 echo "configure:956: checking host system type" >&5
956
957 host_alias=$host
958 case "$host_alias" in
959 NONE)
960   case $nonopt in
961   NONE)
962     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
963     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
964     fi ;;
965   *) host_alias=$nonopt ;;
966   esac ;;
967 esac
968
969 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
970 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
971 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
972 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
973 echo "$ac_t""$host" 1>&6
974
975 echo $ac_n "checking target system type""... $ac_c" 1>&6
976 echo "configure:977: checking target system type" >&5
977
978 target_alias=$target
979 case "$target_alias" in
980 NONE)
981   case $nonopt in
982   NONE) target_alias=$host_alias ;;
983   *) target_alias=$nonopt ;;
984   esac ;;
985 esac
986
987 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
988 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
989 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
990 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
991 echo "$ac_t""$target" 1>&6
992
993 echo $ac_n "checking build system type""... $ac_c" 1>&6
994 echo "configure:995: checking build system type" >&5
995
996 build_alias=$build
997 case "$build_alias" in
998 NONE)
999   case $nonopt in
1000   NONE) build_alias=$host_alias ;;
1001   *) build_alias=$nonopt ;;
1002   esac ;;
1003 esac
1004
1005 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1006 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1007 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1008 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1009 echo "$ac_t""$build" 1>&6
1010
1011 test "$host_alias" != "$target_alias" &&
1012   test "$program_prefix$program_suffix$program_transform_name" = \
1013     NONENONEs,x,x, &&
1014   program_prefix=${target_alias}-
1015
1016
1017     
1018     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1019 echo "configure:1020: checking config.cache system type" >&5
1020     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1021          test x"$ac_cv_host_system_type" != x"$host"; } ||
1022        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1023          test x"$ac_cv_build_system_type" != x"$build"; } ||
1024        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1025          test x"$ac_cv_target_system_type" != x"$target"; }; then
1026         echo "$ac_t""different" 1>&6
1027         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1028     else
1029         echo "$ac_t""same" 1>&6
1030     fi
1031     ac_cv_host_system_type="$host"
1032     ac_cv_build_system_type="$build"
1033     ac_cv_target_system_type="$target"
1034
1035
1036   # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1037 if test "${enable_maintainer_mode+set}" = set; then
1038   enableval="$enable_maintainer_mode"
1039   maint_mode=$enableval
1040 else
1041   maint_mode=no
1042 fi
1043
1044   if test x"$maint_mode" = x"yes"; then MAINT=; else MAINT='#'; fi
1045   
1046   # Extract the first word of "autoconf", so it can be a program name with args.
1047 set dummy autoconf; ac_word=$2
1048 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1049 echo "configure:1050: checking for $ac_word" >&5
1050 if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then
1051   echo $ac_n "(cached) $ac_c" 1>&6
1052 else
1053   case "$AUTOCONF" in
1054   /*)
1055   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
1056   ;;
1057   ?:/*)                  
1058   ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a dos path.
1059   ;;
1060   *)
1061   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1062   ac_dummy="$PATH"
1063   for ac_dir in $ac_dummy; do 
1064     test -z "$ac_dir" && ac_dir=.
1065     if test -f $ac_dir/$ac_word; then
1066       ac_cv_path_AUTOCONF="$ac_dir/$ac_word"
1067       break
1068     fi
1069   done
1070   IFS="$ac_save_ifs"
1071   test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF="autoconf"
1072   ;;
1073 esac
1074 fi
1075 AUTOCONF="$ac_cv_path_AUTOCONF"
1076 if test -n "$AUTOCONF"; then
1077   echo "$ac_t""$AUTOCONF" 1>&6
1078 else
1079   echo "$ac_t""no" 1>&6
1080 fi
1081
1082   
1083   # Extract the first word of "autoheader", so it can be a program name with args.
1084 set dummy autoheader; ac_word=$2
1085 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1086 echo "configure:1087: checking for $ac_word" >&5
1087 if eval "test \"`echo '$''{'ac_cv_path_AUTOHEADER'+set}'`\" = set"; then
1088   echo $ac_n "(cached) $ac_c" 1>&6
1089 else
1090   case "$AUTOHEADER" in
1091   /*)
1092   ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a path.
1093   ;;
1094   ?:/*)                  
1095   ac_cv_path_AUTOHEADER="$AUTOHEADER" # Let the user override the test with a dos path.
1096   ;;
1097   *)
1098   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1099   ac_dummy="$PATH"
1100   for ac_dir in $ac_dummy; do 
1101     test -z "$ac_dir" && ac_dir=.
1102     if test -f $ac_dir/$ac_word; then
1103       ac_cv_path_AUTOHEADER="$ac_dir/$ac_word"
1104       break
1105     fi
1106   done
1107   IFS="$ac_save_ifs"
1108   test -z "$ac_cv_path_AUTOHEADER" && ac_cv_path_AUTOHEADER="autoheader"
1109   ;;
1110 esac
1111 fi
1112 AUTOHEADER="$ac_cv_path_AUTOHEADER"
1113 if test -n "$AUTOHEADER"; then
1114   echo "$ac_t""$AUTOHEADER" 1>&6
1115 else
1116   echo "$ac_t""no" 1>&6
1117 fi
1118
1119   
1120
1121
1122 #
1123 # Config CPPFLAG settings for strange OS's that must be set
1124 # before other tests.
1125 #
1126 case "$host_os" in
1127 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1128     *hpux*)
1129       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1130 echo "configure:1131: checking whether ${CC-cc} accepts -Ae" >&5
1131 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1132   echo $ac_n "(cached) $ac_c" 1>&6
1133 else
1134   echo 'void f(){}' > conftest.c
1135 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1136   ac_cv_prog_cc_Ae=yes
1137 else
1138   ac_cv_prog_cc_Ae=no
1139 fi
1140 rm -f conftest*
1141
1142 fi
1143
1144 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1145       if test $ac_cv_prog_cc_Ae = yes; then
1146         CPPFLAGS="$CPPFLAGS -Ae"
1147       fi
1148       ;;
1149 #
1150 # AIX4.x is *so* broken. It doesn't even admit to having large
1151 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1152 #
1153     *aix4*)
1154       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1155       ;;    
1156 esac
1157
1158 echo $ac_n "checking for inline""... $ac_c" 1>&6
1159 echo "configure:1160: checking for inline" >&5
1160 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1161   echo $ac_n "(cached) $ac_c" 1>&6
1162 else
1163   ac_cv_c_inline=no
1164 for ac_kw in inline __inline__ __inline; do
1165   cat > conftest.$ac_ext <<EOF
1166 #line 1167 "configure"
1167 #include "confdefs.h"
1168
1169 int main() {
1170 } $ac_kw foo() {
1171 ; return 0; }
1172 EOF
1173 if { (eval echo configure:1174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1174   rm -rf conftest*
1175   ac_cv_c_inline=$ac_kw; break
1176 else
1177   echo "configure: failed program was:" >&5
1178   cat conftest.$ac_ext >&5
1179 fi
1180 rm -f conftest*
1181 done
1182
1183 fi
1184
1185 echo "$ac_t""$ac_cv_c_inline" 1>&6
1186 case "$ac_cv_c_inline" in
1187   inline | yes) ;;
1188   no) cat >> confdefs.h <<\EOF
1189 #define inline 
1190 EOF
1191  ;;
1192   *)  cat >> confdefs.h <<EOF
1193 #define inline $ac_cv_c_inline
1194 EOF
1195  ;;
1196 esac
1197
1198 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1199 echo "configure:1200: checking how to run the C preprocessor" >&5
1200 # On Suns, sometimes $CPP names a directory.
1201 if test -n "$CPP" && test -d "$CPP"; then
1202   CPP=
1203 fi
1204 if test -z "$CPP"; then
1205 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1206   echo $ac_n "(cached) $ac_c" 1>&6
1207 else
1208     # This must be in double quotes, not single quotes, because CPP may get
1209   # substituted into the Makefile and "${CC-cc}" will confuse make.
1210   CPP="${CC-cc} -E"
1211   # On the NeXT, cc -E runs the code through the compiler's parser,
1212   # not just through cpp.
1213   cat > conftest.$ac_ext <<EOF
1214 #line 1215 "configure"
1215 #include "confdefs.h"
1216 #include <assert.h>
1217 Syntax Error
1218 EOF
1219 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1220 { (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1221 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1222 if test -z "$ac_err"; then
1223   :
1224 else
1225   echo "$ac_err" >&5
1226   echo "configure: failed program was:" >&5
1227   cat conftest.$ac_ext >&5
1228   rm -rf conftest*
1229   CPP="${CC-cc} -E -traditional-cpp"
1230   cat > conftest.$ac_ext <<EOF
1231 #line 1232 "configure"
1232 #include "confdefs.h"
1233 #include <assert.h>
1234 Syntax Error
1235 EOF
1236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1237 { (eval echo configure:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1239 if test -z "$ac_err"; then
1240   :
1241 else
1242   echo "$ac_err" >&5
1243   echo "configure: failed program was:" >&5
1244   cat conftest.$ac_ext >&5
1245   rm -rf conftest*
1246   CPP="${CC-cc} -nologo -E"
1247   cat > conftest.$ac_ext <<EOF
1248 #line 1249 "configure"
1249 #include "confdefs.h"
1250 #include <assert.h>
1251 Syntax Error
1252 EOF
1253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1254 { (eval echo configure:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1256 if test -z "$ac_err"; then
1257   :
1258 else
1259   echo "$ac_err" >&5
1260   echo "configure: failed program was:" >&5
1261   cat conftest.$ac_ext >&5
1262   rm -rf conftest*
1263   CPP=/lib/cpp
1264 fi
1265 rm -f conftest*
1266 fi
1267 rm -f conftest*
1268 fi
1269 rm -f conftest*
1270   ac_cv_prog_CPP="$CPP"
1271 fi
1272   CPP="$ac_cv_prog_CPP"
1273 else
1274   ac_cv_prog_CPP="$CPP"
1275 fi
1276 echo "$ac_t""$CPP" 1>&6
1277
1278 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1279 echo "configure:1280: checking for ANSI C header files" >&5
1280 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1281   echo $ac_n "(cached) $ac_c" 1>&6
1282 else
1283   cat > conftest.$ac_ext <<EOF
1284 #line 1285 "configure"
1285 #include "confdefs.h"
1286 #include <stdlib.h>
1287 #include <stdarg.h>
1288 #include <string.h>
1289 #include <float.h>
1290 EOF
1291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1292 { (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1294 if test -z "$ac_err"; then
1295   rm -rf conftest*
1296   ac_cv_header_stdc=yes
1297 else
1298   echo "$ac_err" >&5
1299   echo "configure: failed program was:" >&5
1300   cat conftest.$ac_ext >&5
1301   rm -rf conftest*
1302   ac_cv_header_stdc=no
1303 fi
1304 rm -f conftest*
1305
1306 if test $ac_cv_header_stdc = yes; then
1307   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1308 cat > conftest.$ac_ext <<EOF
1309 #line 1310 "configure"
1310 #include "confdefs.h"
1311 #include <string.h>
1312 EOF
1313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1314   egrep "memchr" >/dev/null 2>&1; then
1315   :
1316 else
1317   rm -rf conftest*
1318   ac_cv_header_stdc=no
1319 fi
1320 rm -f conftest*
1321
1322 fi
1323
1324 if test $ac_cv_header_stdc = yes; then
1325   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1326 cat > conftest.$ac_ext <<EOF
1327 #line 1328 "configure"
1328 #include "confdefs.h"
1329 #include <stdlib.h>
1330 EOF
1331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1332   egrep "free" >/dev/null 2>&1; then
1333   :
1334 else
1335   rm -rf conftest*
1336   ac_cv_header_stdc=no
1337 fi
1338 rm -f conftest*
1339
1340 fi
1341
1342 if test $ac_cv_header_stdc = yes; then
1343   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1344 if test "$cross_compiling" = yes; then
1345   :
1346 else
1347   cat > conftest.$ac_ext <<EOF
1348 #line 1349 "configure"
1349 #include "confdefs.h"
1350 #include <ctype.h>
1351 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1352 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1353 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1354 int main () { int i; for (i = 0; i < 256; i++)
1355 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1356 exit (0); }
1357
1358 EOF
1359 if { (eval echo configure:1360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1360 then
1361   :
1362 else
1363   echo "configure: failed program was:" >&5
1364   cat conftest.$ac_ext >&5
1365   rm -fr conftest*
1366   ac_cv_header_stdc=no
1367 fi
1368 rm -fr conftest*
1369 fi
1370
1371 fi
1372 fi
1373
1374 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1375 if test $ac_cv_header_stdc = yes; then
1376   cat >> confdefs.h <<\EOF
1377 #define STDC_HEADERS 1
1378 EOF
1379
1380 fi
1381
1382 ac_header_dirent=no
1383 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1384 do
1385 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1386 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1387 echo "configure:1388: checking for $ac_hdr that defines DIR" >&5
1388 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1389   echo $ac_n "(cached) $ac_c" 1>&6
1390 else
1391   cat > conftest.$ac_ext <<EOF
1392 #line 1393 "configure"
1393 #include "confdefs.h"
1394 #include <sys/types.h>
1395 #include <$ac_hdr>
1396 int main() {
1397 DIR *dirp = 0;
1398 ; return 0; }
1399 EOF
1400 if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1401   rm -rf conftest*
1402   eval "ac_cv_header_dirent_$ac_safe=yes"
1403 else
1404   echo "configure: failed program was:" >&5
1405   cat conftest.$ac_ext >&5
1406   rm -rf conftest*
1407   eval "ac_cv_header_dirent_$ac_safe=no"
1408 fi
1409 rm -f conftest*
1410 fi
1411 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1412   echo "$ac_t""yes" 1>&6
1413     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1414   cat >> confdefs.h <<EOF
1415 #define $ac_tr_hdr 1
1416 EOF
1417  ac_header_dirent=$ac_hdr; break
1418 else
1419   echo "$ac_t""no" 1>&6
1420 fi
1421 done
1422 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1423 if test $ac_header_dirent = dirent.h; then
1424 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1425 echo "configure:1426: checking for opendir in -ldir" >&5
1426 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1427 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1428   echo $ac_n "(cached) $ac_c" 1>&6
1429 else
1430   ac_save_LIBS="$LIBS"
1431 LIBS="-ldir  $LIBS"
1432 cat > conftest.$ac_ext <<EOF
1433 #line 1434 "configure"
1434 #include "confdefs.h"
1435 /* Override any gcc2 internal prototype to avoid an error.  */
1436 /* We use char because int might match the return type of a gcc2
1437     builtin and then its argument prototype would still apply.  */
1438 char opendir();
1439
1440 int main() {
1441 opendir()
1442 ; return 0; }
1443 EOF
1444 if { (eval echo configure:1445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1445   rm -rf conftest*
1446   eval "ac_cv_lib_$ac_lib_var=yes"
1447 else
1448   echo "configure: failed program was:" >&5
1449   cat conftest.$ac_ext >&5
1450   rm -rf conftest*
1451   eval "ac_cv_lib_$ac_lib_var=no"
1452 fi
1453 rm -f conftest*
1454 LIBS="$ac_save_LIBS"
1455
1456 fi
1457 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1458   echo "$ac_t""yes" 1>&6
1459   LIBS="$LIBS -ldir"
1460 else
1461   echo "$ac_t""no" 1>&6
1462 fi
1463
1464 else
1465 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1466 echo "configure:1467: checking for opendir in -lx" >&5
1467 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1468 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1469   echo $ac_n "(cached) $ac_c" 1>&6
1470 else
1471   ac_save_LIBS="$LIBS"
1472 LIBS="-lx  $LIBS"
1473 cat > conftest.$ac_ext <<EOF
1474 #line 1475 "configure"
1475 #include "confdefs.h"
1476 /* Override any gcc2 internal prototype to avoid an error.  */
1477 /* We use char because int might match the return type of a gcc2
1478     builtin and then its argument prototype would still apply.  */
1479 char opendir();
1480
1481 int main() {
1482 opendir()
1483 ; return 0; }
1484 EOF
1485 if { (eval echo configure:1486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1486   rm -rf conftest*
1487   eval "ac_cv_lib_$ac_lib_var=yes"
1488 else
1489   echo "configure: failed program was:" >&5
1490   cat conftest.$ac_ext >&5
1491   rm -rf conftest*
1492   eval "ac_cv_lib_$ac_lib_var=no"
1493 fi
1494 rm -f conftest*
1495 LIBS="$ac_save_LIBS"
1496
1497 fi
1498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1499   echo "$ac_t""yes" 1>&6
1500   LIBS="$LIBS -lx"
1501 else
1502   echo "$ac_t""no" 1>&6
1503 fi
1504
1505 fi
1506
1507 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1508 echo "configure:1509: checking whether time.h and sys/time.h may both be included" >&5
1509 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1510   echo $ac_n "(cached) $ac_c" 1>&6
1511 else
1512   cat > conftest.$ac_ext <<EOF
1513 #line 1514 "configure"
1514 #include "confdefs.h"
1515 #include <sys/types.h>
1516 #include <sys/time.h>
1517 #include <time.h>
1518 int main() {
1519 struct tm *tp;
1520 ; return 0; }
1521 EOF
1522 if { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1523   rm -rf conftest*
1524   ac_cv_header_time=yes
1525 else
1526   echo "configure: failed program was:" >&5
1527   cat conftest.$ac_ext >&5
1528   rm -rf conftest*
1529   ac_cv_header_time=no
1530 fi
1531 rm -f conftest*
1532 fi
1533
1534 echo "$ac_t""$ac_cv_header_time" 1>&6
1535 if test $ac_cv_header_time = yes; then
1536   cat >> confdefs.h <<\EOF
1537 #define TIME_WITH_SYS_TIME 1
1538 EOF
1539
1540 fi
1541
1542 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1543 echo "configure:1544: checking for sys/wait.h that is POSIX.1 compatible" >&5
1544 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1545   echo $ac_n "(cached) $ac_c" 1>&6
1546 else
1547   cat > conftest.$ac_ext <<EOF
1548 #line 1549 "configure"
1549 #include "confdefs.h"
1550 #include <sys/types.h>
1551 #include <sys/wait.h>
1552 #ifndef WEXITSTATUS
1553 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1554 #endif
1555 #ifndef WIFEXITED
1556 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1557 #endif
1558 int main() {
1559 int s;
1560 wait (&s);
1561 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1562 ; return 0; }
1563 EOF
1564 if { (eval echo configure:1565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1565   rm -rf conftest*
1566   ac_cv_header_sys_wait_h=yes
1567 else
1568   echo "configure: failed program was:" >&5
1569   cat conftest.$ac_ext >&5
1570   rm -rf conftest*
1571   ac_cv_header_sys_wait_h=no
1572 fi
1573 rm -f conftest*
1574 fi
1575
1576 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1577 if test $ac_cv_header_sys_wait_h = yes; then
1578   cat >> confdefs.h <<\EOF
1579 #define HAVE_SYS_WAIT_H 1
1580 EOF
1581
1582 fi
1583
1584 for ac_hdr in sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1585 do
1586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1587 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1588 echo "configure:1589: checking for $ac_hdr" >&5
1589 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1590   echo $ac_n "(cached) $ac_c" 1>&6
1591 else
1592   cat > conftest.$ac_ext <<EOF
1593 #line 1594 "configure"
1594 #include "confdefs.h"
1595 #include <$ac_hdr>
1596 EOF
1597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1598 { (eval echo configure:1599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1600 if test -z "$ac_err"; then
1601   rm -rf conftest*
1602   eval "ac_cv_header_$ac_safe=yes"
1603 else
1604   echo "$ac_err" >&5
1605   echo "configure: failed program was:" >&5
1606   cat conftest.$ac_ext >&5
1607   rm -rf conftest*
1608   eval "ac_cv_header_$ac_safe=no"
1609 fi
1610 rm -f conftest*
1611 fi
1612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1613   echo "$ac_t""yes" 1>&6
1614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1615   cat >> confdefs.h <<EOF
1616 #define $ac_tr_hdr 1
1617 EOF
1618  
1619 else
1620   echo "$ac_t""no" 1>&6
1621 fi
1622 done
1623
1624 for ac_hdr in sys/param.h ctype.h 
1625 do
1626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1628 echo "configure:1629: checking for $ac_hdr" >&5
1629 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1630   echo $ac_n "(cached) $ac_c" 1>&6
1631 else
1632   cat > conftest.$ac_ext <<EOF
1633 #line 1634 "configure"
1634 #include "confdefs.h"
1635 #include <$ac_hdr>
1636 EOF
1637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1638 { (eval echo configure:1639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1640 if test -z "$ac_err"; then
1641   rm -rf conftest*
1642   eval "ac_cv_header_$ac_safe=yes"
1643 else
1644   echo "$ac_err" >&5
1645   echo "configure: failed program was:" >&5
1646   cat conftest.$ac_ext >&5
1647   rm -rf conftest*
1648   eval "ac_cv_header_$ac_safe=no"
1649 fi
1650 rm -f conftest*
1651 fi
1652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1653   echo "$ac_t""yes" 1>&6
1654     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1655   cat >> confdefs.h <<EOF
1656 #define $ac_tr_hdr 1
1657 EOF
1658  
1659 else
1660   echo "$ac_t""no" 1>&6
1661 fi
1662 done
1663
1664 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/route.h net/if.h
1665 do
1666 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1667 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1668 echo "configure:1669: checking for $ac_hdr" >&5
1669 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1670   echo $ac_n "(cached) $ac_c" 1>&6
1671 else
1672   cat > conftest.$ac_ext <<EOF
1673 #line 1674 "configure"
1674 #include "confdefs.h"
1675 #include <$ac_hdr>
1676 EOF
1677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1678 { (eval echo configure:1679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1680 if test -z "$ac_err"; then
1681   rm -rf conftest*
1682   eval "ac_cv_header_$ac_safe=yes"
1683 else
1684   echo "$ac_err" >&5
1685   echo "configure: failed program was:" >&5
1686   cat conftest.$ac_ext >&5
1687   rm -rf conftest*
1688   eval "ac_cv_header_$ac_safe=no"
1689 fi
1690 rm -f conftest*
1691 fi
1692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1693   echo "$ac_t""yes" 1>&6
1694     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1695   cat >> confdefs.h <<EOF
1696 #define $ac_tr_hdr 1
1697 EOF
1698  
1699 else
1700   echo "$ac_t""no" 1>&6
1701 fi
1702 done
1703
1704 for ac_hdr in compat.h rpc/rpc.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h sys/param.h ctype.h 
1705 do
1706 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1707 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1708 echo "configure:1709: checking for $ac_hdr" >&5
1709 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1710   echo $ac_n "(cached) $ac_c" 1>&6
1711 else
1712   cat > conftest.$ac_ext <<EOF
1713 #line 1714 "configure"
1714 #include "confdefs.h"
1715 #include <$ac_hdr>
1716 EOF
1717 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1718 { (eval echo configure:1719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1719 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1720 if test -z "$ac_err"; then
1721   rm -rf conftest*
1722   eval "ac_cv_header_$ac_safe=yes"
1723 else
1724   echo "$ac_err" >&5
1725   echo "configure: failed program was:" >&5
1726   cat conftest.$ac_ext >&5
1727   rm -rf conftest*
1728   eval "ac_cv_header_$ac_safe=no"
1729 fi
1730 rm -f conftest*
1731 fi
1732 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1733   echo "$ac_t""yes" 1>&6
1734     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1735   cat >> confdefs.h <<EOF
1736 #define $ac_tr_hdr 1
1737 EOF
1738  
1739 else
1740   echo "$ac_t""no" 1>&6
1741 fi
1742 done
1743
1744 for ac_hdr in sys/wait.h sys/resource.h sys/ioctl.h sys/mode.h sys/mman.h
1745 do
1746 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1747 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1748 echo "configure:1749: checking for $ac_hdr" >&5
1749 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1750   echo $ac_n "(cached) $ac_c" 1>&6
1751 else
1752   cat > conftest.$ac_ext <<EOF
1753 #line 1754 "configure"
1754 #include "confdefs.h"
1755 #include <$ac_hdr>
1756 EOF
1757 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1758 { (eval echo configure:1759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1759 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1760 if test -z "$ac_err"; then
1761   rm -rf conftest*
1762   eval "ac_cv_header_$ac_safe=yes"
1763 else
1764   echo "$ac_err" >&5
1765   echo "configure: failed program was:" >&5
1766   cat conftest.$ac_ext >&5
1767   rm -rf conftest*
1768   eval "ac_cv_header_$ac_safe=no"
1769 fi
1770 rm -f conftest*
1771 fi
1772 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1773   echo "$ac_t""yes" 1>&6
1774     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1775   cat >> confdefs.h <<EOF
1776 #define $ac_tr_hdr 1
1777 EOF
1778  
1779 else
1780   echo "$ac_t""no" 1>&6
1781 fi
1782 done
1783
1784 for ac_hdr in sys/filio.h string.h strings.h stdlib.h sys/socket.h
1785 do
1786 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1787 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1788 echo "configure:1789: checking for $ac_hdr" >&5
1789 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1790   echo $ac_n "(cached) $ac_c" 1>&6
1791 else
1792   cat > conftest.$ac_ext <<EOF
1793 #line 1794 "configure"
1794 #include "confdefs.h"
1795 #include <$ac_hdr>
1796 EOF
1797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1798 { (eval echo configure:1799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1800 if test -z "$ac_err"; then
1801   rm -rf conftest*
1802   eval "ac_cv_header_$ac_safe=yes"
1803 else
1804   echo "$ac_err" >&5
1805   echo "configure: failed program was:" >&5
1806   cat conftest.$ac_ext >&5
1807   rm -rf conftest*
1808   eval "ac_cv_header_$ac_safe=no"
1809 fi
1810 rm -f conftest*
1811 fi
1812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1813   echo "$ac_t""yes" 1>&6
1814     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1815   cat >> confdefs.h <<EOF
1816 #define $ac_tr_hdr 1
1817 EOF
1818  
1819 else
1820   echo "$ac_t""no" 1>&6
1821 fi
1822 done
1823
1824 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h
1825 do
1826 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1827 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1828 echo "configure:1829: checking for $ac_hdr" >&5
1829 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1830   echo $ac_n "(cached) $ac_c" 1>&6
1831 else
1832   cat > conftest.$ac_ext <<EOF
1833 #line 1834 "configure"
1834 #include "confdefs.h"
1835 #include <$ac_hdr>
1836 EOF
1837 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1838 { (eval echo configure:1839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1839 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1840 if test -z "$ac_err"; then
1841   rm -rf conftest*
1842   eval "ac_cv_header_$ac_safe=yes"
1843 else
1844   echo "$ac_err" >&5
1845   echo "configure: failed program was:" >&5
1846   cat conftest.$ac_ext >&5
1847   rm -rf conftest*
1848   eval "ac_cv_header_$ac_safe=no"
1849 fi
1850 rm -f conftest*
1851 fi
1852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1853   echo "$ac_t""yes" 1>&6
1854     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1855   cat >> confdefs.h <<EOF
1856 #define $ac_tr_hdr 1
1857 EOF
1858  
1859 else
1860   echo "$ac_t""no" 1>&6
1861 fi
1862 done
1863
1864 for ac_hdr in sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
1865 do
1866 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1867 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1868 echo "configure:1869: checking for $ac_hdr" >&5
1869 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1870   echo $ac_n "(cached) $ac_c" 1>&6
1871 else
1872   cat > conftest.$ac_ext <<EOF
1873 #line 1874 "configure"
1874 #include "confdefs.h"
1875 #include <$ac_hdr>
1876 EOF
1877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1878 { (eval echo configure:1879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1880 if test -z "$ac_err"; then
1881   rm -rf conftest*
1882   eval "ac_cv_header_$ac_safe=yes"
1883 else
1884   echo "$ac_err" >&5
1885   echo "configure: failed program was:" >&5
1886   cat conftest.$ac_ext >&5
1887   rm -rf conftest*
1888   eval "ac_cv_header_$ac_safe=no"
1889 fi
1890 rm -f conftest*
1891 fi
1892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1893   echo "$ac_t""yes" 1>&6
1894     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1895   cat >> confdefs.h <<EOF
1896 #define $ac_tr_hdr 1
1897 EOF
1898  
1899 else
1900   echo "$ac_t""no" 1>&6
1901 fi
1902 done
1903
1904 for ac_hdr in shadow.h netinet/tcp.h sys/security.h security/pam_appl.h
1905 do
1906 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1907 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1908 echo "configure:1909: checking for $ac_hdr" >&5
1909 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1910   echo $ac_n "(cached) $ac_c" 1>&6
1911 else
1912   cat > conftest.$ac_ext <<EOF
1913 #line 1914 "configure"
1914 #include "confdefs.h"
1915 #include <$ac_hdr>
1916 EOF
1917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1918 { (eval echo configure:1919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1920 if test -z "$ac_err"; then
1921   rm -rf conftest*
1922   eval "ac_cv_header_$ac_safe=yes"
1923 else
1924   echo "$ac_err" >&5
1925   echo "configure: failed program was:" >&5
1926   cat conftest.$ac_ext >&5
1927   rm -rf conftest*
1928   eval "ac_cv_header_$ac_safe=no"
1929 fi
1930 rm -f conftest*
1931 fi
1932 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1933   echo "$ac_t""yes" 1>&6
1934     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1935   cat >> confdefs.h <<EOF
1936 #define $ac_tr_hdr 1
1937 EOF
1938  
1939 else
1940   echo "$ac_t""no" 1>&6
1941 fi
1942 done
1943
1944 for ac_hdr in stropts.h poll.h readline.h history.h readline/readline.h
1945 do
1946 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1947 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1948 echo "configure:1949: checking for $ac_hdr" >&5
1949 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1950   echo $ac_n "(cached) $ac_c" 1>&6
1951 else
1952   cat > conftest.$ac_ext <<EOF
1953 #line 1954 "configure"
1954 #include "confdefs.h"
1955 #include <$ac_hdr>
1956 EOF
1957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1958 { (eval echo configure:1959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1960 if test -z "$ac_err"; then
1961   rm -rf conftest*
1962   eval "ac_cv_header_$ac_safe=yes"
1963 else
1964   echo "$ac_err" >&5
1965   echo "configure: failed program was:" >&5
1966   cat conftest.$ac_ext >&5
1967   rm -rf conftest*
1968   eval "ac_cv_header_$ac_safe=no"
1969 fi
1970 rm -f conftest*
1971 fi
1972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1973   echo "$ac_t""yes" 1>&6
1974     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1975   cat >> confdefs.h <<EOF
1976 #define $ac_tr_hdr 1
1977 EOF
1978  
1979 else
1980   echo "$ac_t""no" 1>&6
1981 fi
1982 done
1983
1984 for ac_hdr in readline/history.h sys/capability.h syscall.h sys/syscall.h
1985 do
1986 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1987 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1988 echo "configure:1989: checking for $ac_hdr" >&5
1989 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1990   echo $ac_n "(cached) $ac_c" 1>&6
1991 else
1992   cat > conftest.$ac_ext <<EOF
1993 #line 1994 "configure"
1994 #include "confdefs.h"
1995 #include <$ac_hdr>
1996 EOF
1997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1998 { (eval echo configure:1999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1999 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2000 if test -z "$ac_err"; then
2001   rm -rf conftest*
2002   eval "ac_cv_header_$ac_safe=yes"
2003 else
2004   echo "$ac_err" >&5
2005   echo "configure: failed program was:" >&5
2006   cat conftest.$ac_ext >&5
2007   rm -rf conftest*
2008   eval "ac_cv_header_$ac_safe=no"
2009 fi
2010 rm -f conftest*
2011 fi
2012 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2013   echo "$ac_t""yes" 1>&6
2014     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2015   cat >> confdefs.h <<EOF
2016 #define $ac_tr_hdr 1
2017 EOF
2018  
2019 else
2020   echo "$ac_t""no" 1>&6
2021 fi
2022 done
2023
2024 for ac_hdr in sys/acl.h sys/cdefs.h glob.h mysql.h
2025 do
2026 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2027 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2028 echo "configure:2029: checking for $ac_hdr" >&5
2029 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2030   echo $ac_n "(cached) $ac_c" 1>&6
2031 else
2032   cat > conftest.$ac_ext <<EOF
2033 #line 2034 "configure"
2034 #include "confdefs.h"
2035 #include <$ac_hdr>
2036 EOF
2037 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2038 { (eval echo configure:2039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2039 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2040 if test -z "$ac_err"; then
2041   rm -rf conftest*
2042   eval "ac_cv_header_$ac_safe=yes"
2043 else
2044   echo "$ac_err" >&5
2045   echo "configure: failed program was:" >&5
2046   cat conftest.$ac_ext >&5
2047   rm -rf conftest*
2048   eval "ac_cv_header_$ac_safe=no"
2049 fi
2050 rm -f conftest*
2051 fi
2052 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2053   echo "$ac_t""yes" 1>&6
2054     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2055   cat >> confdefs.h <<EOF
2056 #define $ac_tr_hdr 1
2057 EOF
2058  
2059 else
2060   echo "$ac_t""no" 1>&6
2061 fi
2062 done
2063
2064
2065 echo $ac_n "checking size of int""... $ac_c" 1>&6
2066 echo "configure:2067: checking size of int" >&5
2067 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2068   echo $ac_n "(cached) $ac_c" 1>&6
2069 else
2070   if test "$cross_compiling" = yes; then
2071   ac_cv_sizeof_int=cross
2072 else
2073   cat > conftest.$ac_ext <<EOF
2074 #line 2075 "configure"
2075 #include "confdefs.h"
2076 #include <stdio.h>
2077 main()
2078 {
2079   FILE *f=fopen("conftestval", "w");
2080   if (!f) exit(1);
2081   fprintf(f, "%d\n", sizeof(int));
2082   exit(0);
2083 }
2084 EOF
2085 if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2086 then
2087   ac_cv_sizeof_int=`cat conftestval`
2088 else
2089   echo "configure: failed program was:" >&5
2090   cat conftest.$ac_ext >&5
2091   rm -fr conftest*
2092   ac_cv_sizeof_int=0
2093 fi
2094 rm -fr conftest*
2095 fi
2096
2097 fi
2098 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2099 cat >> confdefs.h <<EOF
2100 #define SIZEOF_INT $ac_cv_sizeof_int
2101 EOF
2102
2103
2104 echo $ac_n "checking size of long""... $ac_c" 1>&6
2105 echo "configure:2106: checking size of long" >&5
2106 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2107   echo $ac_n "(cached) $ac_c" 1>&6
2108 else
2109   if test "$cross_compiling" = yes; then
2110   ac_cv_sizeof_long=cross
2111 else
2112   cat > conftest.$ac_ext <<EOF
2113 #line 2114 "configure"
2114 #include "confdefs.h"
2115 #include <stdio.h>
2116 main()
2117 {
2118   FILE *f=fopen("conftestval", "w");
2119   if (!f) exit(1);
2120   fprintf(f, "%d\n", sizeof(long));
2121   exit(0);
2122 }
2123 EOF
2124 if { (eval echo configure:2125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2125 then
2126   ac_cv_sizeof_long=`cat conftestval`
2127 else
2128   echo "configure: failed program was:" >&5
2129   cat conftest.$ac_ext >&5
2130   rm -fr conftest*
2131   ac_cv_sizeof_long=0
2132 fi
2133 rm -fr conftest*
2134 fi
2135
2136 fi
2137 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2138 cat >> confdefs.h <<EOF
2139 #define SIZEOF_LONG $ac_cv_sizeof_long
2140 EOF
2141
2142
2143 echo $ac_n "checking size of short""... $ac_c" 1>&6
2144 echo "configure:2145: checking size of short" >&5
2145 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2146   echo $ac_n "(cached) $ac_c" 1>&6
2147 else
2148   if test "$cross_compiling" = yes; then
2149   ac_cv_sizeof_short=cross
2150 else
2151   cat > conftest.$ac_ext <<EOF
2152 #line 2153 "configure"
2153 #include "confdefs.h"
2154 #include <stdio.h>
2155 main()
2156 {
2157   FILE *f=fopen("conftestval", "w");
2158   if (!f) exit(1);
2159   fprintf(f, "%d\n", sizeof(short));
2160   exit(0);
2161 }
2162 EOF
2163 if { (eval echo configure:2164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2164 then
2165   ac_cv_sizeof_short=`cat conftestval`
2166 else
2167   echo "configure: failed program was:" >&5
2168   cat conftest.$ac_ext >&5
2169   rm -fr conftest*
2170   ac_cv_sizeof_short=0
2171 fi
2172 rm -fr conftest*
2173 fi
2174
2175 fi
2176 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2177 cat >> confdefs.h <<EOF
2178 #define SIZEOF_SHORT $ac_cv_sizeof_short
2179 EOF
2180
2181
2182
2183 echo $ac_n "checking for working const""... $ac_c" 1>&6
2184 echo "configure:2185: checking for working const" >&5
2185 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2186   echo $ac_n "(cached) $ac_c" 1>&6
2187 else
2188   cat > conftest.$ac_ext <<EOF
2189 #line 2190 "configure"
2190 #include "confdefs.h"
2191
2192 int main() {
2193
2194 /* Ultrix mips cc rejects this.  */
2195 typedef int charset[2]; const charset x;
2196 /* SunOS 4.1.1 cc rejects this.  */
2197 char const *const *ccp;
2198 char **p;
2199 /* NEC SVR4.0.2 mips cc rejects this.  */
2200 struct point {int x, y;};
2201 static struct point const zero = {0,0};
2202 /* AIX XL C 1.02.0.0 rejects this.
2203    It does not let you subtract one const X* pointer from another in an arm
2204    of an if-expression whose if-part is not a constant expression */
2205 const char *g = "string";
2206 ccp = &g + (g ? g-g : 0);
2207 /* HPUX 7.0 cc rejects these. */
2208 ++ccp;
2209 p = (char**) ccp;
2210 ccp = (char const *const *) p;
2211 { /* SCO 3.2v4 cc rejects this.  */
2212   char *t;
2213   char const *s = 0 ? (char *) 0 : (char const *) 0;
2214
2215   *t++ = 0;
2216 }
2217 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2218   int x[] = {25, 17};
2219   const int *foo = &x[0];
2220   ++foo;
2221 }
2222 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2223   typedef const int *iptr;
2224   iptr p = 0;
2225   ++p;
2226 }
2227 { /* AIX XL C 1.02.0.0 rejects this saying
2228      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2229   struct s { int j; const int *ap[3]; };
2230   struct s *b; b->j = 5;
2231 }
2232 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2233   const int foo = 10;
2234 }
2235
2236 ; return 0; }
2237 EOF
2238 if { (eval echo configure:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2239   rm -rf conftest*
2240   ac_cv_c_const=yes
2241 else
2242   echo "configure: failed program was:" >&5
2243   cat conftest.$ac_ext >&5
2244   rm -rf conftest*
2245   ac_cv_c_const=no
2246 fi
2247 rm -f conftest*
2248 fi
2249
2250 echo "$ac_t""$ac_cv_c_const" 1>&6
2251 if test $ac_cv_c_const = no; then
2252   cat >> confdefs.h <<\EOF
2253 #define const 
2254 EOF
2255
2256 fi
2257
2258 echo $ac_n "checking for inline""... $ac_c" 1>&6
2259 echo "configure:2260: checking for inline" >&5
2260 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2261   echo $ac_n "(cached) $ac_c" 1>&6
2262 else
2263   ac_cv_c_inline=no
2264 for ac_kw in inline __inline__ __inline; do
2265   cat > conftest.$ac_ext <<EOF
2266 #line 2267 "configure"
2267 #include "confdefs.h"
2268
2269 int main() {
2270 } $ac_kw foo() {
2271 ; return 0; }
2272 EOF
2273 if { (eval echo configure:2274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2274   rm -rf conftest*
2275   ac_cv_c_inline=$ac_kw; break
2276 else
2277   echo "configure: failed program was:" >&5
2278   cat conftest.$ac_ext >&5
2279 fi
2280 rm -f conftest*
2281 done
2282
2283 fi
2284
2285 echo "$ac_t""$ac_cv_c_inline" 1>&6
2286 case "$ac_cv_c_inline" in
2287   inline | yes) ;;
2288   no) cat >> confdefs.h <<\EOF
2289 #define inline 
2290 EOF
2291  ;;
2292   *)  cat >> confdefs.h <<EOF
2293 #define inline $ac_cv_c_inline
2294 EOF
2295  ;;
2296 esac
2297
2298 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2299 echo "configure:2300: checking whether byte ordering is bigendian" >&5
2300 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2301   echo $ac_n "(cached) $ac_c" 1>&6
2302 else
2303   ac_cv_c_bigendian=unknown
2304 # See if sys/param.h defines the BYTE_ORDER macro.
2305 cat > conftest.$ac_ext <<EOF
2306 #line 2307 "configure"
2307 #include "confdefs.h"
2308 #include <sys/types.h>
2309 #include <sys/param.h>
2310 int main() {
2311
2312 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2313  bogus endian macros
2314 #endif
2315 ; return 0; }
2316 EOF
2317 if { (eval echo configure:2318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2318   rm -rf conftest*
2319   # It does; now see whether it defined to BIG_ENDIAN or not.
2320 cat > conftest.$ac_ext <<EOF
2321 #line 2322 "configure"
2322 #include "confdefs.h"
2323 #include <sys/types.h>
2324 #include <sys/param.h>
2325 int main() {
2326
2327 #if BYTE_ORDER != BIG_ENDIAN
2328  not big endian
2329 #endif
2330 ; return 0; }
2331 EOF
2332 if { (eval echo configure:2333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2333   rm -rf conftest*
2334   ac_cv_c_bigendian=yes
2335 else
2336   echo "configure: failed program was:" >&5
2337   cat conftest.$ac_ext >&5
2338   rm -rf conftest*
2339   ac_cv_c_bigendian=no
2340 fi
2341 rm -f conftest*
2342 else
2343   echo "configure: failed program was:" >&5
2344   cat conftest.$ac_ext >&5
2345 fi
2346 rm -f conftest*
2347 if test $ac_cv_c_bigendian = unknown; then
2348 if test "$cross_compiling" = yes; then
2349     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2350 else
2351   cat > conftest.$ac_ext <<EOF
2352 #line 2353 "configure"
2353 #include "confdefs.h"
2354 main () {
2355   /* Are we little or big endian?  From Harbison&Steele.  */
2356   union
2357   {
2358     long l;
2359     char c[sizeof (long)];
2360   } u;
2361   u.l = 1;
2362   exit (u.c[sizeof (long) - 1] == 1);
2363 }
2364 EOF
2365 if { (eval echo configure:2366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2366 then
2367   ac_cv_c_bigendian=no
2368 else
2369   echo "configure: failed program was:" >&5
2370   cat conftest.$ac_ext >&5
2371   rm -fr conftest*
2372   ac_cv_c_bigendian=yes
2373 fi
2374 rm -fr conftest*
2375 fi
2376
2377 fi
2378 fi
2379
2380 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2381 if test $ac_cv_c_bigendian = yes; then
2382   cat >> confdefs.h <<\EOF
2383 #define WORDS_BIGENDIAN 1
2384 EOF
2385
2386 fi
2387
2388 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2389 echo "configure:2390: checking whether char is unsigned" >&5
2390 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2391   echo $ac_n "(cached) $ac_c" 1>&6
2392 else
2393   if test "$GCC" = yes; then
2394   # GCC predefines this symbol on systems where it applies.
2395 cat > conftest.$ac_ext <<EOF
2396 #line 2397 "configure"
2397 #include "confdefs.h"
2398 #ifdef __CHAR_UNSIGNED__
2399   yes
2400 #endif
2401
2402 EOF
2403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2404   egrep "yes" >/dev/null 2>&1; then
2405   rm -rf conftest*
2406   ac_cv_c_char_unsigned=yes
2407 else
2408   rm -rf conftest*
2409   ac_cv_c_char_unsigned=no
2410 fi
2411 rm -f conftest*
2412
2413 else
2414 if test "$cross_compiling" = yes; then
2415     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2416 else
2417   cat > conftest.$ac_ext <<EOF
2418 #line 2419 "configure"
2419 #include "confdefs.h"
2420 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2421 #if !defined(__STDC__) || __STDC__ != 1
2422 #define volatile
2423 #endif
2424 main() {
2425   volatile char c = 255; exit(c < 0);
2426 }
2427 EOF
2428 if { (eval echo configure:2429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2429 then
2430   ac_cv_c_char_unsigned=yes
2431 else
2432   echo "configure: failed program was:" >&5
2433   cat conftest.$ac_ext >&5
2434   rm -fr conftest*
2435   ac_cv_c_char_unsigned=no
2436 fi
2437 rm -fr conftest*
2438 fi
2439
2440 fi
2441 fi
2442
2443 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2444 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2445   cat >> confdefs.h <<\EOF
2446 #define __CHAR_UNSIGNED__ 1
2447 EOF
2448
2449 fi
2450
2451
2452 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2453 echo "configure:2454: checking return type of signal handlers" >&5
2454 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2455   echo $ac_n "(cached) $ac_c" 1>&6
2456 else
2457   cat > conftest.$ac_ext <<EOF
2458 #line 2459 "configure"
2459 #include "confdefs.h"
2460 #include <sys/types.h>
2461 #include <signal.h>
2462 #ifdef signal
2463 #undef signal
2464 #endif
2465 #ifdef __cplusplus
2466 extern "C" void (*signal (int, void (*)(int)))(int);
2467 #else
2468 void (*signal ()) ();
2469 #endif
2470
2471 int main() {
2472 int i;
2473 ; return 0; }
2474 EOF
2475 if { (eval echo configure:2476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2476   rm -rf conftest*
2477   ac_cv_type_signal=void
2478 else
2479   echo "configure: failed program was:" >&5
2480   cat conftest.$ac_ext >&5
2481   rm -rf conftest*
2482   ac_cv_type_signal=int
2483 fi
2484 rm -f conftest*
2485 fi
2486
2487 echo "$ac_t""$ac_cv_type_signal" 1>&6
2488 cat >> confdefs.h <<EOF
2489 #define RETSIGTYPE $ac_cv_type_signal
2490 EOF
2491
2492
2493 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2494 echo "configure:2495: checking for uid_t in sys/types.h" >&5
2495 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2496   echo $ac_n "(cached) $ac_c" 1>&6
2497 else
2498   cat > conftest.$ac_ext <<EOF
2499 #line 2500 "configure"
2500 #include "confdefs.h"
2501 #include <sys/types.h>
2502 EOF
2503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2504   egrep "uid_t" >/dev/null 2>&1; then
2505   rm -rf conftest*
2506   ac_cv_type_uid_t=yes
2507 else
2508   rm -rf conftest*
2509   ac_cv_type_uid_t=no
2510 fi
2511 rm -f conftest*
2512
2513 fi
2514
2515 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2516 if test $ac_cv_type_uid_t = no; then
2517   cat >> confdefs.h <<\EOF
2518 #define uid_t int
2519 EOF
2520
2521   cat >> confdefs.h <<\EOF
2522 #define gid_t int
2523 EOF
2524
2525 fi
2526
2527 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2528 echo "configure:2529: checking for mode_t" >&5
2529 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2530   echo $ac_n "(cached) $ac_c" 1>&6
2531 else
2532   cat > conftest.$ac_ext <<EOF
2533 #line 2534 "configure"
2534 #include "confdefs.h"
2535 #include <sys/types.h>
2536 #if STDC_HEADERS
2537 #include <stdlib.h>
2538 #include <stddef.h>
2539 #endif
2540 EOF
2541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2542   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2543   rm -rf conftest*
2544   ac_cv_type_mode_t=yes
2545 else
2546   rm -rf conftest*
2547   ac_cv_type_mode_t=no
2548 fi
2549 rm -f conftest*
2550
2551 fi
2552 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2553 if test $ac_cv_type_mode_t = no; then
2554   cat >> confdefs.h <<\EOF
2555 #define mode_t int
2556 EOF
2557
2558 fi
2559
2560 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2561 echo "configure:2562: checking for off_t" >&5
2562 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2563   echo $ac_n "(cached) $ac_c" 1>&6
2564 else
2565   cat > conftest.$ac_ext <<EOF
2566 #line 2567 "configure"
2567 #include "confdefs.h"
2568 #include <sys/types.h>
2569 #if STDC_HEADERS
2570 #include <stdlib.h>
2571 #include <stddef.h>
2572 #endif
2573 EOF
2574 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2575   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2576   rm -rf conftest*
2577   ac_cv_type_off_t=yes
2578 else
2579   rm -rf conftest*
2580   ac_cv_type_off_t=no
2581 fi
2582 rm -f conftest*
2583
2584 fi
2585 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2586 if test $ac_cv_type_off_t = no; then
2587   cat >> confdefs.h <<\EOF
2588 #define off_t long
2589 EOF
2590
2591 fi
2592
2593 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2594 echo "configure:2595: checking for size_t" >&5
2595 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2596   echo $ac_n "(cached) $ac_c" 1>&6
2597 else
2598   cat > conftest.$ac_ext <<EOF
2599 #line 2600 "configure"
2600 #include "confdefs.h"
2601 #include <sys/types.h>
2602 #if STDC_HEADERS
2603 #include <stdlib.h>
2604 #include <stddef.h>
2605 #endif
2606 EOF
2607 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2608   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2609   rm -rf conftest*
2610   ac_cv_type_size_t=yes
2611 else
2612   rm -rf conftest*
2613   ac_cv_type_size_t=no
2614 fi
2615 rm -f conftest*
2616
2617 fi
2618 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2619 if test $ac_cv_type_size_t = no; then
2620   cat >> confdefs.h <<\EOF
2621 #define size_t unsigned
2622 EOF
2623
2624 fi
2625
2626 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2627 echo "configure:2628: checking for pid_t" >&5
2628 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2629   echo $ac_n "(cached) $ac_c" 1>&6
2630 else
2631   cat > conftest.$ac_ext <<EOF
2632 #line 2633 "configure"
2633 #include "confdefs.h"
2634 #include <sys/types.h>
2635 #if STDC_HEADERS
2636 #include <stdlib.h>
2637 #include <stddef.h>
2638 #endif
2639 EOF
2640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2641   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2642   rm -rf conftest*
2643   ac_cv_type_pid_t=yes
2644 else
2645   rm -rf conftest*
2646   ac_cv_type_pid_t=no
2647 fi
2648 rm -f conftest*
2649
2650 fi
2651 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2652 if test $ac_cv_type_pid_t = no; then
2653   cat >> confdefs.h <<\EOF
2654 #define pid_t int
2655 EOF
2656
2657 fi
2658
2659 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
2660 echo "configure:2661: checking for st_rdev in struct stat" >&5
2661 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
2662   echo $ac_n "(cached) $ac_c" 1>&6
2663 else
2664   cat > conftest.$ac_ext <<EOF
2665 #line 2666 "configure"
2666 #include "confdefs.h"
2667 #include <sys/types.h>
2668 #include <sys/stat.h>
2669 int main() {
2670 struct stat s; s.st_rdev;
2671 ; return 0; }
2672 EOF
2673 if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2674   rm -rf conftest*
2675   ac_cv_struct_st_rdev=yes
2676 else
2677   echo "configure: failed program was:" >&5
2678   cat conftest.$ac_ext >&5
2679   rm -rf conftest*
2680   ac_cv_struct_st_rdev=no
2681 fi
2682 rm -f conftest*
2683 fi
2684
2685 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
2686 if test $ac_cv_struct_st_rdev = yes; then
2687   cat >> confdefs.h <<\EOF
2688 #define HAVE_ST_RDEV 1
2689 EOF
2690
2691 fi
2692
2693 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
2694 echo "configure:2695: checking for d_off in dirent" >&5
2695 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
2696   echo $ac_n "(cached) $ac_c" 1>&6
2697 else
2698   cat > conftest.$ac_ext <<EOF
2699 #line 2700 "configure"
2700 #include "confdefs.h"
2701
2702 #include <unistd.h>
2703 #include <sys/types.h>
2704 #include <dirent.h>
2705 int main() {
2706 struct dirent d; d.d_off;
2707 ; return 0; }
2708 EOF
2709 if { (eval echo configure:2710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2710   rm -rf conftest*
2711   ac_cv_dirent_d_off=yes
2712 else
2713   echo "configure: failed program was:" >&5
2714   cat conftest.$ac_ext >&5
2715   rm -rf conftest*
2716   ac_cv_dirent_d_off=no
2717 fi
2718 rm -f conftest*
2719 fi
2720
2721 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
2722 if test $ac_cv_dirent_d_off = yes; then
2723   cat >> confdefs.h <<\EOF
2724 #define HAVE_DIRENT_D_OFF 1
2725 EOF
2726
2727 fi
2728
2729 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
2730 echo "configure:2731: checking for ino_t" >&5
2731 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
2732   echo $ac_n "(cached) $ac_c" 1>&6
2733 else
2734   cat > conftest.$ac_ext <<EOF
2735 #line 2736 "configure"
2736 #include "confdefs.h"
2737 #include <sys/types.h>
2738 #if STDC_HEADERS
2739 #include <stdlib.h>
2740 #include <stddef.h>
2741 #endif
2742 EOF
2743 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2744   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2745   rm -rf conftest*
2746   ac_cv_type_ino_t=yes
2747 else
2748   rm -rf conftest*
2749   ac_cv_type_ino_t=no
2750 fi
2751 rm -f conftest*
2752
2753 fi
2754 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
2755 if test $ac_cv_type_ino_t = no; then
2756   cat >> confdefs.h <<\EOF
2757 #define ino_t unsigned
2758 EOF
2759
2760 fi
2761
2762 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
2763 echo "configure:2764: checking for loff_t" >&5
2764 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
2765   echo $ac_n "(cached) $ac_c" 1>&6
2766 else
2767   cat > conftest.$ac_ext <<EOF
2768 #line 2769 "configure"
2769 #include "confdefs.h"
2770 #include <sys/types.h>
2771 #if STDC_HEADERS
2772 #include <stdlib.h>
2773 #include <stddef.h>
2774 #endif
2775 EOF
2776 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2777   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2778   rm -rf conftest*
2779   ac_cv_type_loff_t=yes
2780 else
2781   rm -rf conftest*
2782   ac_cv_type_loff_t=no
2783 fi
2784 rm -f conftest*
2785
2786 fi
2787 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
2788 if test $ac_cv_type_loff_t = no; then
2789   cat >> confdefs.h <<\EOF
2790 #define loff_t off_t
2791 EOF
2792
2793 fi
2794
2795 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
2796 echo "configure:2797: checking for offset_t" >&5
2797 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
2798   echo $ac_n "(cached) $ac_c" 1>&6
2799 else
2800   cat > conftest.$ac_ext <<EOF
2801 #line 2802 "configure"
2802 #include "confdefs.h"
2803 #include <sys/types.h>
2804 #if STDC_HEADERS
2805 #include <stdlib.h>
2806 #include <stddef.h>
2807 #endif
2808 EOF
2809 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2810   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2811   rm -rf conftest*
2812   ac_cv_type_offset_t=yes
2813 else
2814   rm -rf conftest*
2815   ac_cv_type_offset_t=no
2816 fi
2817 rm -f conftest*
2818
2819 fi
2820 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
2821 if test $ac_cv_type_offset_t = no; then
2822   cat >> confdefs.h <<\EOF
2823 #define offset_t loff_t
2824 EOF
2825
2826 fi
2827
2828 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
2829 echo "configure:2830: checking for ssize_t" >&5
2830 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
2831   echo $ac_n "(cached) $ac_c" 1>&6
2832 else
2833   cat > conftest.$ac_ext <<EOF
2834 #line 2835 "configure"
2835 #include "confdefs.h"
2836 #include <sys/types.h>
2837 #if STDC_HEADERS
2838 #include <stdlib.h>
2839 #include <stddef.h>
2840 #endif
2841 EOF
2842 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2843   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2844   rm -rf conftest*
2845   ac_cv_type_ssize_t=yes
2846 else
2847   rm -rf conftest*
2848   ac_cv_type_ssize_t=no
2849 fi
2850 rm -f conftest*
2851
2852 fi
2853 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
2854 if test $ac_cv_type_ssize_t = no; then
2855   cat >> confdefs.h <<\EOF
2856 #define ssize_t int
2857 EOF
2858
2859 fi
2860
2861
2862 echo $ac_n "checking for errno in errno.h""... $ac_c" 1>&6
2863 echo "configure:2864: checking for errno in errno.h" >&5
2864 if eval "test \"`echo '$''{'samba_cv_errno'+set}'`\" = set"; then
2865   echo $ac_n "(cached) $ac_c" 1>&6
2866 else
2867   
2868     cat > conftest.$ac_ext <<EOF
2869 #line 2870 "configure"
2870 #include "confdefs.h"
2871 #include <errno.h>
2872 int main() {
2873 int i = errno
2874 ; return 0; }
2875 EOF
2876 if { (eval echo configure:2877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2877   rm -rf conftest*
2878   samba_cv_errno=yes
2879 else
2880   echo "configure: failed program was:" >&5
2881   cat conftest.$ac_ext >&5
2882   rm -rf conftest*
2883   samba_cv_have_errno_decl=no
2884 fi
2885 rm -f conftest*
2886 fi
2887
2888 echo "$ac_t""$samba_cv_errno" 1>&6
2889 if test x"$samba_cv_errno" = x"yes"; then
2890    cat >> confdefs.h <<\EOF
2891 #define HAVE_ERRNO_DECL 1
2892 EOF
2893
2894 fi
2895
2896 # stupid glibc has the functions but no declaration. grrrr.
2897 echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
2898 echo "configure:2899: checking for setresuid declaration" >&5
2899 if eval "test \"`echo '$''{'samba_cv_have_setresuid_decl'+set}'`\" = set"; then
2900   echo $ac_n "(cached) $ac_c" 1>&6
2901 else
2902   
2903     cat > conftest.$ac_ext <<EOF
2904 #line 2905 "configure"
2905 #include "confdefs.h"
2906 #include <unistd.h>
2907 int main() {
2908 int i = (int)setresuid
2909 ; return 0; }
2910 EOF
2911 if { (eval echo configure:2912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2912   rm -rf conftest*
2913   samba_cv_have_setresuid_decl=yes
2914 else
2915   echo "configure: failed program was:" >&5
2916   cat conftest.$ac_ext >&5
2917   rm -rf conftest*
2918   samba_cv_have_setresuid_decl=no
2919 fi
2920 rm -f conftest*
2921 fi
2922
2923 echo "$ac_t""$samba_cv_have_setresuid_decl" 1>&6
2924 if test x"$samba_cv_have_setresuid_decl" = x"yes"; then
2925     cat >> confdefs.h <<\EOF
2926 #define HAVE_SETRESUID_DECL 1
2927 EOF
2928
2929 fi
2930
2931 # stupid glibc has the functions but no declaration. grrrr.
2932 echo $ac_n "checking for crypt declaration""... $ac_c" 1>&6
2933 echo "configure:2934: checking for crypt declaration" >&5
2934 if eval "test \"`echo '$''{'samba_cv_have_crypt_decl'+set}'`\" = set"; then
2935   echo $ac_n "(cached) $ac_c" 1>&6
2936 else
2937   
2938     cat > conftest.$ac_ext <<EOF
2939 #line 2940 "configure"
2940 #include "confdefs.h"
2941 #include <unistd.h>
2942 int main() {
2943 int i = (int)crypt
2944 ; return 0; }
2945 EOF
2946 if { (eval echo configure:2947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2947   rm -rf conftest*
2948   samba_cv_have_crypt_decl=yes
2949 else
2950   echo "configure: failed program was:" >&5
2951   cat conftest.$ac_ext >&5
2952   rm -rf conftest*
2953   samba_cv_have_crypt_decl=no
2954 fi
2955 rm -f conftest*
2956 fi
2957
2958 echo "$ac_t""$samba_cv_have_crypt_decl" 1>&6
2959 if test x"$samba_cv_have_crypt_decl" = x"yes"; then
2960     cat >> confdefs.h <<\EOF
2961 #define HAVE_CRYPT_DECL 1
2962 EOF
2963
2964 fi
2965
2966 # and glibc has setresuid under linux but the function does
2967 # nothing until kernel 2.1.44! very dumb.
2968 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
2969 echo "configure:2970: checking for real setresuid" >&5
2970 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
2971   echo $ac_n "(cached) $ac_c" 1>&6
2972 else
2973   
2974     if test "$cross_compiling" = yes; then
2975   samba_cv_have_setresuid=cross
2976 else
2977   cat > conftest.$ac_ext <<EOF
2978 #line 2979 "configure"
2979 #include "confdefs.h"
2980 #include <errno.h>
2981 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
2982 EOF
2983 if { (eval echo configure:2984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2984 then
2985   samba_cv_have_setresuid=yes
2986 else
2987   echo "configure: failed program was:" >&5
2988   cat conftest.$ac_ext >&5
2989   rm -fr conftest*
2990   samba_cv_have_setresuid=no
2991 fi
2992 rm -fr conftest*
2993 fi
2994
2995 fi
2996
2997 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
2998 if test x"$samba_cv_have_setresuid" = x"yes"; then
2999     cat >> confdefs.h <<\EOF
3000 #define HAVE_SETRESUID 1
3001 EOF
3002
3003 fi
3004
3005 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3006 echo "configure:3007: checking for 8-bit clean memcmp" >&5
3007 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3008   echo $ac_n "(cached) $ac_c" 1>&6
3009 else
3010   if test "$cross_compiling" = yes; then
3011   ac_cv_func_memcmp_clean=no
3012 else
3013   cat > conftest.$ac_ext <<EOF
3014 #line 3015 "configure"
3015 #include "confdefs.h"
3016
3017 main()
3018 {
3019   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3020   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3021 }
3022
3023 EOF
3024 if { (eval echo configure:3025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3025 then
3026   ac_cv_func_memcmp_clean=yes
3027 else
3028   echo "configure: failed program was:" >&5
3029   cat conftest.$ac_ext >&5
3030   rm -fr conftest*
3031   ac_cv_func_memcmp_clean=no
3032 fi
3033 rm -fr conftest*
3034 fi
3035
3036 fi
3037
3038 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3039 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
3040
3041
3042 ###############################################
3043 # test for where we get crypt() from
3044 for ac_func in crypt
3045 do
3046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3047 echo "configure:3048: checking for $ac_func" >&5
3048 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3049   echo $ac_n "(cached) $ac_c" 1>&6
3050 else
3051   cat > conftest.$ac_ext <<EOF
3052 #line 3053 "configure"
3053 #include "confdefs.h"
3054 /* System header to define __stub macros and hopefully few prototypes,
3055     which can conflict with char $ac_func(); below.  */
3056 #include <assert.h>
3057 /* Override any gcc2 internal prototype to avoid an error.  */
3058 /* We use char because int might match the return type of a gcc2
3059     builtin and then its argument prototype would still apply.  */
3060 char $ac_func();
3061 char (*f)();
3062
3063 int main() {
3064
3065 /* The GNU C library defines this for functions which it implements
3066     to always fail with ENOSYS.  Some functions are actually named
3067     something starting with __ and the normal name is an alias.  */
3068 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3069 choke me
3070 #else
3071 f = $ac_func;
3072 #endif
3073
3074 ; return 0; }
3075 EOF
3076 if { (eval echo configure:3077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3077   rm -rf conftest*
3078   eval "ac_cv_func_$ac_func=yes"
3079 else
3080   echo "configure: failed program was:" >&5
3081   cat conftest.$ac_ext >&5
3082   rm -rf conftest*
3083   eval "ac_cv_func_$ac_func=no"
3084 fi
3085 rm -f conftest*
3086 fi
3087
3088 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3089   echo "$ac_t""yes" 1>&6
3090     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3091   cat >> confdefs.h <<EOF
3092 #define $ac_tr_func 1
3093 EOF
3094  
3095 else
3096   echo "$ac_t""no" 1>&6
3097 fi
3098 done
3099
3100 if test x"$ac_cv_func_crypt" = x"no"; then
3101     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3102 echo "configure:3103: checking for crypt in -lcrypt" >&5
3103 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3104 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3105   echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107   ac_save_LIBS="$LIBS"
3108 LIBS="-lcrypt  $LIBS"
3109 cat > conftest.$ac_ext <<EOF
3110 #line 3111 "configure"
3111 #include "confdefs.h"
3112 /* Override any gcc2 internal prototype to avoid an error.  */
3113 /* We use char because int might match the return type of a gcc2
3114     builtin and then its argument prototype would still apply.  */
3115 char crypt();
3116
3117 int main() {
3118 crypt()
3119 ; return 0; }
3120 EOF
3121 if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3122   rm -rf conftest*
3123   eval "ac_cv_lib_$ac_lib_var=yes"
3124 else
3125   echo "configure: failed program was:" >&5
3126   cat conftest.$ac_ext >&5
3127   rm -rf conftest*
3128   eval "ac_cv_lib_$ac_lib_var=no"
3129 fi
3130 rm -f conftest*
3131 LIBS="$ac_save_LIBS"
3132
3133 fi
3134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3135   echo "$ac_t""yes" 1>&6
3136   LIBS="$LIBS -lcrypt";
3137         cat >> confdefs.h <<\EOF
3138 #define HAVE_CRYPT 1
3139 EOF
3140
3141 else
3142   echo "$ac_t""no" 1>&6
3143 fi
3144
3145 fi
3146
3147
3148 ###############################################
3149 # test for where we get pam_authenticate() from
3150 # might need libdl for this to work
3151 if test "$ac_cv_header_security_pam_appl_h" = "yes"; then
3152   echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
3153 echo "configure:3154: checking for main in -ldl" >&5
3154 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
3155 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3156   echo $ac_n "(cached) $ac_c" 1>&6
3157 else
3158   ac_save_LIBS="$LIBS"
3159 LIBS="-ldl  $LIBS"
3160 cat > conftest.$ac_ext <<EOF
3161 #line 3162 "configure"
3162 #include "confdefs.h"
3163
3164 int main() {
3165 main()
3166 ; return 0; }
3167 EOF
3168 if { (eval echo configure:3169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3169   rm -rf conftest*
3170   eval "ac_cv_lib_$ac_lib_var=yes"
3171 else
3172   echo "configure: failed program was:" >&5
3173   cat conftest.$ac_ext >&5
3174   rm -rf conftest*
3175   eval "ac_cv_lib_$ac_lib_var=no"
3176 fi
3177 rm -f conftest*
3178 LIBS="$ac_save_LIBS"
3179
3180 fi
3181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3182   echo "$ac_t""yes" 1>&6
3183     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3184     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3185   cat >> confdefs.h <<EOF
3186 #define $ac_tr_lib 1
3187 EOF
3188
3189   LIBS="-ldl $LIBS"
3190
3191 else
3192   echo "$ac_t""no" 1>&6
3193 fi
3194
3195 fi
3196 for ac_func in pam_authenticate
3197 do
3198 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3199 echo "configure:3200: checking for $ac_func" >&5
3200 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3201   echo $ac_n "(cached) $ac_c" 1>&6
3202 else
3203   cat > conftest.$ac_ext <<EOF
3204 #line 3205 "configure"
3205 #include "confdefs.h"
3206 /* System header to define __stub macros and hopefully few prototypes,
3207     which can conflict with char $ac_func(); below.  */
3208 #include <assert.h>
3209 /* Override any gcc2 internal prototype to avoid an error.  */
3210 /* We use char because int might match the return type of a gcc2
3211     builtin and then its argument prototype would still apply.  */
3212 char $ac_func();
3213 char (*f)();
3214
3215 int main() {
3216
3217 /* The GNU C library defines this for functions which it implements
3218     to always fail with ENOSYS.  Some functions are actually named
3219     something starting with __ and the normal name is an alias.  */
3220 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3221 choke me
3222 #else
3223 f = $ac_func;
3224 #endif
3225
3226 ; return 0; }
3227 EOF
3228 if { (eval echo configure:3229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3229   rm -rf conftest*
3230   eval "ac_cv_func_$ac_func=yes"
3231 else
3232   echo "configure: failed program was:" >&5
3233   cat conftest.$ac_ext >&5
3234   rm -rf conftest*
3235   eval "ac_cv_func_$ac_func=no"
3236 fi
3237 rm -f conftest*
3238 fi
3239
3240 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3241   echo "$ac_t""yes" 1>&6
3242     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3243   cat >> confdefs.h <<EOF
3244 #define $ac_tr_func 1
3245 EOF
3246  
3247 else
3248   echo "$ac_t""no" 1>&6
3249 fi
3250 done
3251
3252 if test x"$ac_cv_func_pam_authenticate" = x"no"; then
3253     echo $ac_n "checking for pam_authenticate in -lpam""... $ac_c" 1>&6
3254 echo "configure:3255: checking for pam_authenticate in -lpam" >&5
3255 ac_lib_var=`echo pam'_'pam_authenticate | sed 'y%./+-%__p_%'`
3256 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3257   echo $ac_n "(cached) $ac_c" 1>&6
3258 else
3259   ac_save_LIBS="$LIBS"
3260 LIBS="-lpam  $LIBS"
3261 cat > conftest.$ac_ext <<EOF
3262 #line 3263 "configure"
3263 #include "confdefs.h"
3264 /* Override any gcc2 internal prototype to avoid an error.  */
3265 /* We use char because int might match the return type of a gcc2
3266     builtin and then its argument prototype would still apply.  */
3267 char pam_authenticate();
3268
3269 int main() {
3270 pam_authenticate()
3271 ; return 0; }
3272 EOF
3273 if { (eval echo configure:3274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3274   rm -rf conftest*
3275   eval "ac_cv_lib_$ac_lib_var=yes"
3276 else
3277   echo "configure: failed program was:" >&5
3278   cat conftest.$ac_ext >&5
3279   rm -rf conftest*
3280   eval "ac_cv_lib_$ac_lib_var=no"
3281 fi
3282 rm -f conftest*
3283 LIBS="$ac_save_LIBS"
3284
3285 fi
3286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3287   echo "$ac_t""yes" 1>&6
3288   LIBS="$LIBS -lpam"
3289         cat >> confdefs.h <<\EOF
3290 #define HAVE_PAM_AUTHENTICATE 1
3291 EOF
3292
3293 else
3294   echo "$ac_t""no" 1>&6
3295 fi
3296
3297 fi
3298
3299
3300 ###############################################
3301 # test for where we get readline() from
3302 if test "$ac_cv_header_readline_h" = "yes" ||
3303    test "$ac_cv_header_readline_readline_h" = "yes"; then
3304   echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
3305 echo "configure:3306: checking for readline in -lreadline" >&5
3306 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
3307 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3308   echo $ac_n "(cached) $ac_c" 1>&6
3309 else
3310   ac_save_LIBS="$LIBS"
3311 LIBS="-lreadline  $LIBS"
3312 cat > conftest.$ac_ext <<EOF
3313 #line 3314 "configure"
3314 #include "confdefs.h"
3315 /* Override any gcc2 internal prototype to avoid an error.  */
3316 /* We use char because int might match the return type of a gcc2
3317     builtin and then its argument prototype would still apply.  */
3318 char readline();
3319
3320 int main() {
3321 readline()
3322 ; return 0; }
3323 EOF
3324 if { (eval echo configure:3325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3325   rm -rf conftest*
3326   eval "ac_cv_lib_$ac_lib_var=yes"
3327 else
3328   echo "configure: failed program was:" >&5
3329   cat conftest.$ac_ext >&5
3330   rm -rf conftest*
3331   eval "ac_cv_lib_$ac_lib_var=no"
3332 fi
3333 rm -f conftest*
3334 LIBS="$ac_save_LIBS"
3335
3336 fi
3337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3338   echo "$ac_t""yes" 1>&6
3339     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3340     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3341   cat >> confdefs.h <<EOF
3342 #define $ac_tr_lib 1
3343 EOF
3344
3345   LIBS="-lreadline $LIBS"
3346
3347 else
3348   echo "$ac_t""no" 1>&6
3349 fi
3350
3351 fi
3352
3353
3354 # The following test taken from the cvs sources
3355 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
3356 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
3357 # libsocket.so which has a bad implementation of gethostbyname (it
3358 # only looks in /etc/hosts), so we only look for -lsocket if we need
3359 # it.
3360 for ac_func in connect
3361 do
3362 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3363 echo "configure:3364: checking for $ac_func" >&5
3364 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3365   echo $ac_n "(cached) $ac_c" 1>&6
3366 else
3367   cat > conftest.$ac_ext <<EOF
3368 #line 3369 "configure"
3369 #include "confdefs.h"
3370 /* System header to define __stub macros and hopefully few prototypes,
3371     which can conflict with char $ac_func(); below.  */
3372 #include <assert.h>
3373 /* Override any gcc2 internal prototype to avoid an error.  */
3374 /* We use char because int might match the return type of a gcc2
3375     builtin and then its argument prototype would still apply.  */
3376 char $ac_func();
3377 char (*f)();
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 f = $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${ac_exeext}; 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${ac_exeext}; 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${ac_exeext}; 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${ac_exeext}; 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${ac_exeext}; 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 strtoul 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 char (*f)();
3647
3648 int main() {
3649
3650 /* The GNU C library defines this for functions which it implements
3651     to always fail with ENOSYS.  Some functions are actually named
3652     something starting with __ and the normal name is an alias.  */
3653 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3654 choke me
3655 #else
3656 f = $ac_func;
3657 #endif
3658
3659 ; return 0; }
3660 EOF
3661 if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3662   rm -rf conftest*
3663   eval "ac_cv_func_$ac_func=yes"
3664 else
3665   echo "configure: failed program was:" >&5
3666   cat conftest.$ac_ext >&5
3667   rm -rf conftest*
3668   eval "ac_cv_func_$ac_func=no"
3669 fi
3670 rm -f conftest*
3671 fi
3672
3673 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3674   echo "$ac_t""yes" 1>&6
3675     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3676   cat >> confdefs.h <<EOF
3677 #define $ac_tr_func 1
3678 EOF
3679  
3680 else
3681   echo "$ac_t""no" 1>&6
3682 fi
3683 done
3684
3685 for ac_func in fstat strchr utime utimes getrlimit fsync execl bzero memset
3686 do
3687 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3688 echo "configure:3689: checking for $ac_func" >&5
3689 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3690   echo $ac_n "(cached) $ac_c" 1>&6
3691 else
3692   cat > conftest.$ac_ext <<EOF
3693 #line 3694 "configure"
3694 #include "confdefs.h"
3695 /* System header to define __stub macros and hopefully few prototypes,
3696     which can conflict with char $ac_func(); below.  */
3697 #include <assert.h>
3698 /* Override any gcc2 internal prototype to avoid an error.  */
3699 /* We use char because int might match the return type of a gcc2
3700     builtin and then its argument prototype would still apply.  */
3701 char $ac_func();
3702 char (*f)();
3703
3704 int main() {
3705
3706 /* The GNU C library defines this for functions which it implements
3707     to always fail with ENOSYS.  Some functions are actually named
3708     something starting with __ and the normal name is an alias.  */
3709 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3710 choke me
3711 #else
3712 f = $ac_func;
3713 #endif
3714
3715 ; return 0; }
3716 EOF
3717 if { (eval echo configure:3718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3718   rm -rf conftest*
3719   eval "ac_cv_func_$ac_func=yes"
3720 else
3721   echo "configure: failed program was:" >&5
3722   cat conftest.$ac_ext >&5
3723   rm -rf conftest*
3724   eval "ac_cv_func_$ac_func=no"
3725 fi
3726 rm -f conftest*
3727 fi
3728
3729 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3730   echo "$ac_t""yes" 1>&6
3731     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3732   cat >> confdefs.h <<EOF
3733 #define $ac_tr_func 1
3734 EOF
3735  
3736 else
3737   echo "$ac_t""no" 1>&6
3738 fi
3739 done
3740
3741 for ac_func in memmove vsnprintf snprintf setsid glob strpbrk pipe crypt16 getauthuid
3742 do
3743 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3744 echo "configure:3745: checking for $ac_func" >&5
3745 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3746   echo $ac_n "(cached) $ac_c" 1>&6
3747 else
3748   cat > conftest.$ac_ext <<EOF
3749 #line 3750 "configure"
3750 #include "confdefs.h"
3751 /* System header to define __stub macros and hopefully few prototypes,
3752     which can conflict with char $ac_func(); below.  */
3753 #include <assert.h>
3754 /* Override any gcc2 internal prototype to avoid an error.  */
3755 /* We use char because int might match the return type of a gcc2
3756     builtin and then its argument prototype would still apply.  */
3757 char $ac_func();
3758 char (*f)();
3759
3760 int main() {
3761
3762 /* The GNU C library defines this for functions which it implements
3763     to always fail with ENOSYS.  Some functions are actually named
3764     something starting with __ and the normal name is an alias.  */
3765 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3766 choke me
3767 #else
3768 f = $ac_func;
3769 #endif
3770
3771 ; return 0; }
3772 EOF
3773 if { (eval echo configure:3774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3774   rm -rf conftest*
3775   eval "ac_cv_func_$ac_func=yes"
3776 else
3777   echo "configure: failed program was:" >&5
3778   cat conftest.$ac_ext >&5
3779   rm -rf conftest*
3780   eval "ac_cv_func_$ac_func=no"
3781 fi
3782 rm -f conftest*
3783 fi
3784
3785 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3786   echo "$ac_t""yes" 1>&6
3787     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3788   cat >> confdefs.h <<EOF
3789 #define $ac_tr_func 1
3790 EOF
3791  
3792 else
3793   echo "$ac_t""no" 1>&6
3794 fi
3795 done
3796
3797 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
3798 do
3799 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3800 echo "configure:3801: checking for $ac_func" >&5
3801 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3802   echo $ac_n "(cached) $ac_c" 1>&6
3803 else
3804   cat > conftest.$ac_ext <<EOF
3805 #line 3806 "configure"
3806 #include "confdefs.h"
3807 /* System header to define __stub macros and hopefully few prototypes,
3808     which can conflict with char $ac_func(); below.  */
3809 #include <assert.h>
3810 /* Override any gcc2 internal prototype to avoid an error.  */
3811 /* We use char because int might match the return type of a gcc2
3812     builtin and then its argument prototype would still apply.  */
3813 char $ac_func();
3814 char (*f)();
3815
3816 int main() {
3817
3818 /* The GNU C library defines this for functions which it implements
3819     to always fail with ENOSYS.  Some functions are actually named
3820     something starting with __ and the normal name is an alias.  */
3821 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3822 choke me
3823 #else
3824 f = $ac_func;
3825 #endif
3826
3827 ; return 0; }
3828 EOF
3829 if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3830   rm -rf conftest*
3831   eval "ac_cv_func_$ac_func=yes"
3832 else
3833   echo "configure: failed program was:" >&5
3834   cat conftest.$ac_ext >&5
3835   rm -rf conftest*
3836   eval "ac_cv_func_$ac_func=no"
3837 fi
3838 rm -f conftest*
3839 fi
3840
3841 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3842   echo "$ac_t""yes" 1>&6
3843     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3844   cat >> confdefs.h <<EOF
3845 #define $ac_tr_func 1
3846 EOF
3847  
3848 else
3849   echo "$ac_t""no" 1>&6
3850 fi
3851 done
3852
3853 for ac_func in initgroups select rdchk getgrnam pathconf
3854 do
3855 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3856 echo "configure:3857: checking for $ac_func" >&5
3857 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3858   echo $ac_n "(cached) $ac_c" 1>&6
3859 else
3860   cat > conftest.$ac_ext <<EOF
3861 #line 3862 "configure"
3862 #include "confdefs.h"
3863 /* System header to define __stub macros and hopefully few prototypes,
3864     which can conflict with char $ac_func(); below.  */
3865 #include <assert.h>
3866 /* Override any gcc2 internal prototype to avoid an error.  */
3867 /* We use char because int might match the return type of a gcc2
3868     builtin and then its argument prototype would still apply.  */
3869 char $ac_func();
3870 char (*f)();
3871
3872 int main() {
3873
3874 /* The GNU C library defines this for functions which it implements
3875     to always fail with ENOSYS.  Some functions are actually named
3876     something starting with __ and the normal name is an alias.  */
3877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3878 choke me
3879 #else
3880 f = $ac_func;
3881 #endif
3882
3883 ; return 0; }
3884 EOF
3885 if { (eval echo configure:3886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3886   rm -rf conftest*
3887   eval "ac_cv_func_$ac_func=yes"
3888 else
3889   echo "configure: failed program was:" >&5
3890   cat conftest.$ac_ext >&5
3891   rm -rf conftest*
3892   eval "ac_cv_func_$ac_func=no"
3893 fi
3894 rm -f conftest*
3895 fi
3896
3897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3898   echo "$ac_t""yes" 1>&6
3899     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3900   cat >> confdefs.h <<EOF
3901 #define $ac_tr_func 1
3902 EOF
3903  
3904 else
3905   echo "$ac_t""no" 1>&6
3906 fi
3907 done
3908
3909 for ac_func in setuidx setgroups mktime rename ftruncate stat64 fstat64 lstat64 fopen64
3910 do
3911 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3912 echo "configure:3913: checking for $ac_func" >&5
3913 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3914   echo $ac_n "(cached) $ac_c" 1>&6
3915 else
3916   cat > conftest.$ac_ext <<EOF
3917 #line 3918 "configure"
3918 #include "confdefs.h"
3919 /* System header to define __stub macros and hopefully few prototypes,
3920     which can conflict with char $ac_func(); below.  */
3921 #include <assert.h>
3922 /* Override any gcc2 internal prototype to avoid an error.  */
3923 /* We use char because int might match the return type of a gcc2
3924     builtin and then its argument prototype would still apply.  */
3925 char $ac_func();
3926 char (*f)();
3927
3928 int main() {
3929
3930 /* The GNU C library defines this for functions which it implements
3931     to always fail with ENOSYS.  Some functions are actually named
3932     something starting with __ and the normal name is an alias.  */
3933 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3934 choke me
3935 #else
3936 f = $ac_func;
3937 #endif
3938
3939 ; return 0; }
3940 EOF
3941 if { (eval echo configure:3942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3942   rm -rf conftest*
3943   eval "ac_cv_func_$ac_func=yes"
3944 else
3945   echo "configure: failed program was:" >&5
3946   cat conftest.$ac_ext >&5
3947   rm -rf conftest*
3948   eval "ac_cv_func_$ac_func=no"
3949 fi
3950 rm -f conftest*
3951 fi
3952
3953 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3954   echo "$ac_t""yes" 1>&6
3955     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3956   cat >> confdefs.h <<EOF
3957 #define $ac_tr_func 1
3958 EOF
3959  
3960 else
3961   echo "$ac_t""no" 1>&6
3962 fi
3963 done
3964
3965 for ac_func in atexit grantpt dup2 lseek64 ftruncate64
3966 do
3967 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3968 echo "configure:3969: checking for $ac_func" >&5
3969 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3970   echo $ac_n "(cached) $ac_c" 1>&6
3971 else
3972   cat > conftest.$ac_ext <<EOF
3973 #line 3974 "configure"
3974 #include "confdefs.h"
3975 /* System header to define __stub macros and hopefully few prototypes,
3976     which can conflict with char $ac_func(); below.  */
3977 #include <assert.h>
3978 /* Override any gcc2 internal prototype to avoid an error.  */
3979 /* We use char because int might match the return type of a gcc2
3980     builtin and then its argument prototype would still apply.  */
3981 char $ac_func();
3982 char (*f)();
3983
3984 int main() {
3985
3986 /* The GNU C library defines this for functions which it implements
3987     to always fail with ENOSYS.  Some functions are actually named
3988     something starting with __ and the normal name is an alias.  */
3989 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3990 choke me
3991 #else
3992 f = $ac_func;
3993 #endif
3994
3995 ; return 0; }
3996 EOF
3997 if { (eval echo configure:3998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3998   rm -rf conftest*
3999   eval "ac_cv_func_$ac_func=yes"
4000 else
4001   echo "configure: failed program was:" >&5
4002   cat conftest.$ac_ext >&5
4003   rm -rf conftest*
4004   eval "ac_cv_func_$ac_func=no"
4005 fi
4006 rm -f conftest*
4007 fi
4008
4009 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4010   echo "$ac_t""yes" 1>&6
4011     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4012   cat >> confdefs.h <<EOF
4013 #define $ac_tr_func 1
4014 EOF
4015  
4016 else
4017   echo "$ac_t""no" 1>&6
4018 fi
4019 done
4020
4021 for ac_func in fseek64 ftell64 setluid yp_get_default_domain getpwanam
4022 do
4023 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4024 echo "configure:4025: checking for $ac_func" >&5
4025 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4026   echo $ac_n "(cached) $ac_c" 1>&6
4027 else
4028   cat > conftest.$ac_ext <<EOF
4029 #line 4030 "configure"
4030 #include "confdefs.h"
4031 /* System header to define __stub macros and hopefully few prototypes,
4032     which can conflict with char $ac_func(); below.  */
4033 #include <assert.h>
4034 /* Override any gcc2 internal prototype to avoid an error.  */
4035 /* We use char because int might match the return type of a gcc2
4036     builtin and then its argument prototype would still apply.  */
4037 char $ac_func();
4038 char (*f)();
4039
4040 int main() {
4041
4042 /* The GNU C library defines this for functions which it implements
4043     to always fail with ENOSYS.  Some functions are actually named
4044     something starting with __ and the normal name is an alias.  */
4045 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4046 choke me
4047 #else
4048 f = $ac_func;
4049 #endif
4050
4051 ; return 0; }
4052 EOF
4053 if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4054   rm -rf conftest*
4055   eval "ac_cv_func_$ac_func=yes"
4056 else
4057   echo "configure: failed program was:" >&5
4058   cat conftest.$ac_ext >&5
4059   rm -rf conftest*
4060   eval "ac_cv_func_$ac_func=no"
4061 fi
4062 rm -f conftest*
4063 fi
4064
4065 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4066   echo "$ac_t""yes" 1>&6
4067     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4068   cat >> confdefs.h <<EOF
4069 #define $ac_tr_func 1
4070 EOF
4071  
4072 else
4073   echo "$ac_t""no" 1>&6
4074 fi
4075 done
4076
4077 for ac_func in srandom random srand rand setenv mmap64
4078 do
4079 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4080 echo "configure:4081: checking for $ac_func" >&5
4081 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4082   echo $ac_n "(cached) $ac_c" 1>&6
4083 else
4084   cat > conftest.$ac_ext <<EOF
4085 #line 4086 "configure"
4086 #include "confdefs.h"
4087 /* System header to define __stub macros and hopefully few prototypes,
4088     which can conflict with char $ac_func(); below.  */
4089 #include <assert.h>
4090 /* Override any gcc2 internal prototype to avoid an error.  */
4091 /* We use char because int might match the return type of a gcc2
4092     builtin and then its argument prototype would still apply.  */
4093 char $ac_func();
4094 char (*f)();
4095
4096 int main() {
4097
4098 /* The GNU C library defines this for functions which it implements
4099     to always fail with ENOSYS.  Some functions are actually named
4100     something starting with __ and the normal name is an alias.  */
4101 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4102 choke me
4103 #else
4104 f = $ac_func;
4105 #endif
4106
4107 ; return 0; }
4108 EOF
4109 if { (eval echo configure:4110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4110   rm -rf conftest*
4111   eval "ac_cv_func_$ac_func=yes"
4112 else
4113   echo "configure: failed program was:" >&5
4114   cat conftest.$ac_ext >&5
4115   rm -rf conftest*
4116   eval "ac_cv_func_$ac_func=no"
4117 fi
4118 rm -f conftest*
4119 fi
4120
4121 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4122   echo "$ac_t""yes" 1>&6
4123     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4124   cat >> confdefs.h <<EOF
4125 #define $ac_tr_func 1
4126 EOF
4127  
4128 else
4129   echo "$ac_t""no" 1>&6
4130 fi
4131 done
4132
4133 # syscall() is needed for smbwrapper.
4134 for ac_func in syscall
4135 do
4136 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4137 echo "configure:4138: checking for $ac_func" >&5
4138 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4139   echo $ac_n "(cached) $ac_c" 1>&6
4140 else
4141   cat > conftest.$ac_ext <<EOF
4142 #line 4143 "configure"
4143 #include "confdefs.h"
4144 /* System header to define __stub macros and hopefully few prototypes,
4145     which can conflict with char $ac_func(); below.  */
4146 #include <assert.h>
4147 /* Override any gcc2 internal prototype to avoid an error.  */
4148 /* We use char because int might match the return type of a gcc2
4149     builtin and then its argument prototype would still apply.  */
4150 char $ac_func();
4151 char (*f)();
4152
4153 int main() {
4154
4155 /* The GNU C library defines this for functions which it implements
4156     to always fail with ENOSYS.  Some functions are actually named
4157     something starting with __ and the normal name is an alias.  */
4158 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4159 choke me
4160 #else
4161 f = $ac_func;
4162 #endif
4163
4164 ; return 0; }
4165 EOF
4166 if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4167   rm -rf conftest*
4168   eval "ac_cv_func_$ac_func=yes"
4169 else
4170   echo "configure: failed program was:" >&5
4171   cat conftest.$ac_ext >&5
4172   rm -rf conftest*
4173   eval "ac_cv_func_$ac_func=no"
4174 fi
4175 rm -f conftest*
4176 fi
4177
4178 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4179   echo "$ac_t""yes" 1>&6
4180     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4181   cat >> confdefs.h <<EOF
4182 #define $ac_tr_func 1
4183 EOF
4184  
4185 else
4186   echo "$ac_t""no" 1>&6
4187 fi
4188 done
4189
4190
4191 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
4192 do
4193 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4194 echo "configure:4195: checking for $ac_func" >&5
4195 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4196   echo $ac_n "(cached) $ac_c" 1>&6
4197 else
4198   cat > conftest.$ac_ext <<EOF
4199 #line 4200 "configure"
4200 #include "confdefs.h"
4201 /* System header to define __stub macros and hopefully few prototypes,
4202     which can conflict with char $ac_func(); below.  */
4203 #include <assert.h>
4204 /* Override any gcc2 internal prototype to avoid an error.  */
4205 /* We use char because int might match the return type of a gcc2
4206     builtin and then its argument prototype would still apply.  */
4207 char $ac_func();
4208 char (*f)();
4209
4210 int main() {
4211
4212 /* The GNU C library defines this for functions which it implements
4213     to always fail with ENOSYS.  Some functions are actually named
4214     something starting with __ and the normal name is an alias.  */
4215 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4216 choke me
4217 #else
4218 f = $ac_func;
4219 #endif
4220
4221 ; return 0; }
4222 EOF
4223 if { (eval echo configure:4224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4224   rm -rf conftest*
4225   eval "ac_cv_func_$ac_func=yes"
4226 else
4227   echo "configure: failed program was:" >&5
4228   cat conftest.$ac_ext >&5
4229   rm -rf conftest*
4230   eval "ac_cv_func_$ac_func=no"
4231 fi
4232 rm -f conftest*
4233 fi
4234
4235 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4236   echo "$ac_t""yes" 1>&6
4237     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4238   cat >> confdefs.h <<EOF
4239 #define $ac_tr_func 1
4240 EOF
4241  
4242 else
4243   echo "$ac_t""no" 1>&6
4244 fi
4245 done
4246
4247 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
4248 do
4249 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4250 echo "configure:4251: checking for $ac_func" >&5
4251 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4252   echo $ac_n "(cached) $ac_c" 1>&6
4253 else
4254   cat > conftest.$ac_ext <<EOF
4255 #line 4256 "configure"
4256 #include "confdefs.h"
4257 /* System header to define __stub macros and hopefully few prototypes,
4258     which can conflict with char $ac_func(); below.  */
4259 #include <assert.h>
4260 /* Override any gcc2 internal prototype to avoid an error.  */
4261 /* We use char because int might match the return type of a gcc2
4262     builtin and then its argument prototype would still apply.  */
4263 char $ac_func();
4264 char (*f)();
4265
4266 int main() {
4267
4268 /* The GNU C library defines this for functions which it implements
4269     to always fail with ENOSYS.  Some functions are actually named
4270     something starting with __ and the normal name is an alias.  */
4271 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4272 choke me
4273 #else
4274 f = $ac_func;
4275 #endif
4276
4277 ; return 0; }
4278 EOF
4279 if { (eval echo configure:4280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4280   rm -rf conftest*
4281   eval "ac_cv_func_$ac_func=yes"
4282 else
4283   echo "configure: failed program was:" >&5
4284   cat conftest.$ac_ext >&5
4285   rm -rf conftest*
4286   eval "ac_cv_func_$ac_func=no"
4287 fi
4288 rm -f conftest*
4289 fi
4290
4291 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4292   echo "$ac_t""yes" 1>&6
4293     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4294   cat >> confdefs.h <<EOF
4295 #define $ac_tr_func 1
4296 EOF
4297  
4298 else
4299   echo "$ac_t""no" 1>&6
4300 fi
4301 done
4302
4303 for ac_func in __getcwd _getcwd
4304 do
4305 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4306 echo "configure:4307: checking for $ac_func" >&5
4307 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4308   echo $ac_n "(cached) $ac_c" 1>&6
4309 else
4310   cat > conftest.$ac_ext <<EOF
4311 #line 4312 "configure"
4312 #include "confdefs.h"
4313 /* System header to define __stub macros and hopefully few prototypes,
4314     which can conflict with char $ac_func(); below.  */
4315 #include <assert.h>
4316 /* Override any gcc2 internal prototype to avoid an error.  */
4317 /* We use char because int might match the return type of a gcc2
4318     builtin and then its argument prototype would still apply.  */
4319 char $ac_func();
4320 char (*f)();
4321
4322 int main() {
4323
4324 /* The GNU C library defines this for functions which it implements
4325     to always fail with ENOSYS.  Some functions are actually named
4326     something starting with __ and the normal name is an alias.  */
4327 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4328 choke me
4329 #else
4330 f = $ac_func;
4331 #endif
4332
4333 ; return 0; }
4334 EOF
4335 if { (eval echo configure:4336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4336   rm -rf conftest*
4337   eval "ac_cv_func_$ac_func=yes"
4338 else
4339   echo "configure: failed program was:" >&5
4340   cat conftest.$ac_ext >&5
4341   rm -rf conftest*
4342   eval "ac_cv_func_$ac_func=no"
4343 fi
4344 rm -f conftest*
4345 fi
4346
4347 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4348   echo "$ac_t""yes" 1>&6
4349     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4350   cat >> confdefs.h <<EOF
4351 #define $ac_tr_func 1
4352 EOF
4353  
4354 else
4355   echo "$ac_t""no" 1>&6
4356 fi
4357 done
4358
4359 for ac_func in __xstat __fxstat __lxstat
4360 do
4361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4362 echo "configure:4363: checking for $ac_func" >&5
4363 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4364   echo $ac_n "(cached) $ac_c" 1>&6
4365 else
4366   cat > conftest.$ac_ext <<EOF
4367 #line 4368 "configure"
4368 #include "confdefs.h"
4369 /* System header to define __stub macros and hopefully few prototypes,
4370     which can conflict with char $ac_func(); below.  */
4371 #include <assert.h>
4372 /* Override any gcc2 internal prototype to avoid an error.  */
4373 /* We use char because int might match the return type of a gcc2
4374     builtin and then its argument prototype would still apply.  */
4375 char $ac_func();
4376 char (*f)();
4377
4378 int main() {
4379
4380 /* The GNU C library defines this for functions which it implements
4381     to always fail with ENOSYS.  Some functions are actually named
4382     something starting with __ and the normal name is an alias.  */
4383 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4384 choke me
4385 #else
4386 f = $ac_func;
4387 #endif
4388
4389 ; return 0; }
4390 EOF
4391 if { (eval echo configure:4392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4392   rm -rf conftest*
4393   eval "ac_cv_func_$ac_func=yes"
4394 else
4395   echo "configure: failed program was:" >&5
4396   cat conftest.$ac_ext >&5
4397   rm -rf conftest*
4398   eval "ac_cv_func_$ac_func=no"
4399 fi
4400 rm -f conftest*
4401 fi
4402
4403 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4404   echo "$ac_t""yes" 1>&6
4405     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4406   cat >> confdefs.h <<EOF
4407 #define $ac_tr_func 1
4408 EOF
4409  
4410 else
4411   echo "$ac_t""no" 1>&6
4412 fi
4413 done
4414
4415 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
4416 do
4417 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4418 echo "configure:4419: checking for $ac_func" >&5
4419 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4420   echo $ac_n "(cached) $ac_c" 1>&6
4421 else
4422   cat > conftest.$ac_ext <<EOF
4423 #line 4424 "configure"
4424 #include "confdefs.h"
4425 /* System header to define __stub macros and hopefully few prototypes,
4426     which can conflict with char $ac_func(); below.  */
4427 #include <assert.h>
4428 /* Override any gcc2 internal prototype to avoid an error.  */
4429 /* We use char because int might match the return type of a gcc2
4430     builtin and then its argument prototype would still apply.  */
4431 char $ac_func();
4432 char (*f)();
4433
4434 int main() {
4435
4436 /* The GNU C library defines this for functions which it implements
4437     to always fail with ENOSYS.  Some functions are actually named
4438     something starting with __ and the normal name is an alias.  */
4439 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4440 choke me
4441 #else
4442 f = $ac_func;
4443 #endif
4444
4445 ; return 0; }
4446 EOF
4447 if { (eval echo configure:4448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4448   rm -rf conftest*
4449   eval "ac_cv_func_$ac_func=yes"
4450 else
4451   echo "configure: failed program was:" >&5
4452   cat conftest.$ac_ext >&5
4453   rm -rf conftest*
4454   eval "ac_cv_func_$ac_func=no"
4455 fi
4456 rm -f conftest*
4457 fi
4458
4459 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4460   echo "$ac_t""yes" 1>&6
4461     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4462   cat >> confdefs.h <<EOF
4463 #define $ac_tr_func 1
4464 EOF
4465  
4466 else
4467   echo "$ac_t""no" 1>&6
4468 fi
4469 done
4470
4471 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
4472 do
4473 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4474 echo "configure:4475: checking for $ac_func" >&5
4475 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4476   echo $ac_n "(cached) $ac_c" 1>&6
4477 else
4478   cat > conftest.$ac_ext <<EOF
4479 #line 4480 "configure"
4480 #include "confdefs.h"
4481 /* System header to define __stub macros and hopefully few prototypes,
4482     which can conflict with char $ac_func(); below.  */
4483 #include <assert.h>
4484 /* Override any gcc2 internal prototype to avoid an error.  */
4485 /* We use char because int might match the return type of a gcc2
4486     builtin and then its argument prototype would still apply.  */
4487 char $ac_func();
4488 char (*f)();
4489
4490 int main() {
4491
4492 /* The GNU C library defines this for functions which it implements
4493     to always fail with ENOSYS.  Some functions are actually named
4494     something starting with __ and the normal name is an alias.  */
4495 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4496 choke me
4497 #else
4498 f = $ac_func;
4499 #endif
4500
4501 ; return 0; }
4502 EOF
4503 if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4504   rm -rf conftest*
4505   eval "ac_cv_func_$ac_func=yes"
4506 else
4507   echo "configure: failed program was:" >&5
4508   cat conftest.$ac_ext >&5
4509   rm -rf conftest*
4510   eval "ac_cv_func_$ac_func=no"
4511 fi
4512 rm -f conftest*
4513 fi
4514
4515 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4516   echo "$ac_t""yes" 1>&6
4517     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4518   cat >> confdefs.h <<EOF
4519 #define $ac_tr_func 1
4520 EOF
4521  
4522 else
4523   echo "$ac_t""no" 1>&6
4524 fi
4525 done
4526
4527 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
4528 do
4529 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4530 echo "configure:4531: checking for $ac_func" >&5
4531 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4532   echo $ac_n "(cached) $ac_c" 1>&6
4533 else
4534   cat > conftest.$ac_ext <<EOF
4535 #line 4536 "configure"
4536 #include "confdefs.h"
4537 /* System header to define __stub macros and hopefully few prototypes,
4538     which can conflict with char $ac_func(); below.  */
4539 #include <assert.h>
4540 /* Override any gcc2 internal prototype to avoid an error.  */
4541 /* We use char because int might match the return type of a gcc2
4542     builtin and then its argument prototype would still apply.  */
4543 char $ac_func();
4544 char (*f)();
4545
4546 int main() {
4547
4548 /* The GNU C library defines this for functions which it implements
4549     to always fail with ENOSYS.  Some functions are actually named
4550     something starting with __ and the normal name is an alias.  */
4551 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4552 choke me
4553 #else
4554 f = $ac_func;
4555 #endif
4556
4557 ; return 0; }
4558 EOF
4559 if { (eval echo configure:4560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4560   rm -rf conftest*
4561   eval "ac_cv_func_$ac_func=yes"
4562 else
4563   echo "configure: failed program was:" >&5
4564   cat conftest.$ac_ext >&5
4565   rm -rf conftest*
4566   eval "ac_cv_func_$ac_func=no"
4567 fi
4568 rm -f conftest*
4569 fi
4570
4571 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4572   echo "$ac_t""yes" 1>&6
4573     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4574   cat >> confdefs.h <<EOF
4575 #define $ac_tr_func 1
4576 EOF
4577  
4578 else
4579   echo "$ac_t""no" 1>&6
4580 fi
4581 done
4582
4583 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
4584 do
4585 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4586 echo "configure:4587: checking for $ac_func" >&5
4587 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4588   echo $ac_n "(cached) $ac_c" 1>&6
4589 else
4590   cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593 /* System header to define __stub macros and hopefully few prototypes,
4594     which can conflict with char $ac_func(); below.  */
4595 #include <assert.h>
4596 /* Override any gcc2 internal prototype to avoid an error.  */
4597 /* We use char because int might match the return type of a gcc2
4598     builtin and then its argument prototype would still apply.  */
4599 char $ac_func();
4600 char (*f)();
4601
4602 int main() {
4603
4604 /* The GNU C library defines this for functions which it implements
4605     to always fail with ENOSYS.  Some functions are actually named
4606     something starting with __ and the normal name is an alias.  */
4607 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4608 choke me
4609 #else
4610 f = $ac_func;
4611 #endif
4612
4613 ; return 0; }
4614 EOF
4615 if { (eval echo configure:4616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4616   rm -rf conftest*
4617   eval "ac_cv_func_$ac_func=yes"
4618 else
4619   echo "configure: failed program was:" >&5
4620   cat conftest.$ac_ext >&5
4621   rm -rf conftest*
4622   eval "ac_cv_func_$ac_func=no"
4623 fi
4624 rm -f conftest*
4625 fi
4626
4627 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4628   echo "$ac_t""yes" 1>&6
4629     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4630   cat >> confdefs.h <<EOF
4631 #define $ac_tr_func 1
4632 EOF
4633  
4634 else
4635   echo "$ac_t""no" 1>&6
4636 fi
4637 done
4638
4639 for ac_func in _write __write _fork __fork
4640 do
4641 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4642 echo "configure:4643: checking for $ac_func" >&5
4643 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4644   echo $ac_n "(cached) $ac_c" 1>&6
4645 else
4646   cat > conftest.$ac_ext <<EOF
4647 #line 4648 "configure"
4648 #include "confdefs.h"
4649 /* System header to define __stub macros and hopefully few prototypes,
4650     which can conflict with char $ac_func(); below.  */
4651 #include <assert.h>
4652 /* Override any gcc2 internal prototype to avoid an error.  */
4653 /* We use char because int might match the return type of a gcc2
4654     builtin and then its argument prototype would still apply.  */
4655 char $ac_func();
4656 char (*f)();
4657
4658 int main() {
4659
4660 /* The GNU C library defines this for functions which it implements
4661     to always fail with ENOSYS.  Some functions are actually named
4662     something starting with __ and the normal name is an alias.  */
4663 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4664 choke me
4665 #else
4666 f = $ac_func;
4667 #endif
4668
4669 ; return 0; }
4670 EOF
4671 if { (eval echo configure:4672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4672   rm -rf conftest*
4673   eval "ac_cv_func_$ac_func=yes"
4674 else
4675   echo "configure: failed program was:" >&5
4676   cat conftest.$ac_ext >&5
4677   rm -rf conftest*
4678   eval "ac_cv_func_$ac_func=no"
4679 fi
4680 rm -f conftest*
4681 fi
4682
4683 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4684   echo "$ac_t""yes" 1>&6
4685     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4686   cat >> confdefs.h <<EOF
4687 #define $ac_tr_func 1
4688 EOF
4689  
4690 else
4691   echo "$ac_t""no" 1>&6
4692 fi
4693 done
4694
4695 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
4696 do
4697 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4698 echo "configure:4699: checking for $ac_func" >&5
4699 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4700   echo $ac_n "(cached) $ac_c" 1>&6
4701 else
4702   cat > conftest.$ac_ext <<EOF
4703 #line 4704 "configure"
4704 #include "confdefs.h"
4705 /* System header to define __stub macros and hopefully few prototypes,
4706     which can conflict with char $ac_func(); below.  */
4707 #include <assert.h>
4708 /* Override any gcc2 internal prototype to avoid an error.  */
4709 /* We use char because int might match the return type of a gcc2
4710     builtin and then its argument prototype would still apply.  */
4711 char $ac_func();
4712 char (*f)();
4713
4714 int main() {
4715
4716 /* The GNU C library defines this for functions which it implements
4717     to always fail with ENOSYS.  Some functions are actually named
4718     something starting with __ and the normal name is an alias.  */
4719 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4720 choke me
4721 #else
4722 f = $ac_func;
4723 #endif
4724
4725 ; return 0; }
4726 EOF
4727 if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4728   rm -rf conftest*
4729   eval "ac_cv_func_$ac_func=yes"
4730 else
4731   echo "configure: failed program was:" >&5
4732   cat conftest.$ac_ext >&5
4733   rm -rf conftest*
4734   eval "ac_cv_func_$ac_func=no"
4735 fi
4736 rm -f conftest*
4737 fi
4738
4739 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4740   echo "$ac_t""yes" 1>&6
4741     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4742   cat >> confdefs.h <<EOF
4743 #define $ac_tr_func 1
4744 EOF
4745  
4746 else
4747   echo "$ac_t""no" 1>&6
4748 fi
4749 done
4750
4751 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
4752 do
4753 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4754 echo "configure:4755: checking for $ac_func" >&5
4755 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4756   echo $ac_n "(cached) $ac_c" 1>&6
4757 else
4758   cat > conftest.$ac_ext <<EOF
4759 #line 4760 "configure"
4760 #include "confdefs.h"
4761 /* System header to define __stub macros and hopefully few prototypes,
4762     which can conflict with char $ac_func(); below.  */
4763 #include <assert.h>
4764 /* Override any gcc2 internal prototype to avoid an error.  */
4765 /* We use char because int might match the return type of a gcc2
4766     builtin and then its argument prototype would still apply.  */
4767 char $ac_func();
4768 char (*f)();
4769
4770 int main() {
4771
4772 /* The GNU C library defines this for functions which it implements
4773     to always fail with ENOSYS.  Some functions are actually named
4774     something starting with __ and the normal name is an alias.  */
4775 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4776 choke me
4777 #else
4778 f = $ac_func;
4779 #endif
4780
4781 ; return 0; }
4782 EOF
4783 if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4784   rm -rf conftest*
4785   eval "ac_cv_func_$ac_func=yes"
4786 else
4787   echo "configure: failed program was:" >&5
4788   cat conftest.$ac_ext >&5
4789   rm -rf conftest*
4790   eval "ac_cv_func_$ac_func=no"
4791 fi
4792 rm -f conftest*
4793 fi
4794
4795 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4796   echo "$ac_t""yes" 1>&6
4797     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4798   cat >> confdefs.h <<EOF
4799 #define $ac_tr_func 1
4800 EOF
4801  
4802 else
4803   echo "$ac_t""no" 1>&6
4804 fi
4805 done
4806
4807 for ac_func in pread _pread __pread pread64 _pread64 __pread64
4808 do
4809 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4810 echo "configure:4811: checking for $ac_func" >&5
4811 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4812   echo $ac_n "(cached) $ac_c" 1>&6
4813 else
4814   cat > conftest.$ac_ext <<EOF
4815 #line 4816 "configure"
4816 #include "confdefs.h"
4817 /* System header to define __stub macros and hopefully few prototypes,
4818     which can conflict with char $ac_func(); below.  */
4819 #include <assert.h>
4820 /* Override any gcc2 internal prototype to avoid an error.  */
4821 /* We use char because int might match the return type of a gcc2
4822     builtin and then its argument prototype would still apply.  */
4823 char $ac_func();
4824 char (*f)();
4825
4826 int main() {
4827
4828 /* The GNU C library defines this for functions which it implements
4829     to always fail with ENOSYS.  Some functions are actually named
4830     something starting with __ and the normal name is an alias.  */
4831 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4832 choke me
4833 #else
4834 f = $ac_func;
4835 #endif
4836
4837 ; return 0; }
4838 EOF
4839 if { (eval echo configure:4840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4840   rm -rf conftest*
4841   eval "ac_cv_func_$ac_func=yes"
4842 else
4843   echo "configure: failed program was:" >&5
4844   cat conftest.$ac_ext >&5
4845   rm -rf conftest*
4846   eval "ac_cv_func_$ac_func=no"
4847 fi
4848 rm -f conftest*
4849 fi
4850
4851 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4852   echo "$ac_t""yes" 1>&6
4853     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4854   cat >> confdefs.h <<EOF
4855 #define $ac_tr_func 1
4856 EOF
4857  
4858 else
4859   echo "$ac_t""no" 1>&6
4860 fi
4861 done
4862
4863 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
4864 do
4865 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4866 echo "configure:4867: checking for $ac_func" >&5
4867 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4868   echo $ac_n "(cached) $ac_c" 1>&6
4869 else
4870   cat > conftest.$ac_ext <<EOF
4871 #line 4872 "configure"
4872 #include "confdefs.h"
4873 /* System header to define __stub macros and hopefully few prototypes,
4874     which can conflict with char $ac_func(); below.  */
4875 #include <assert.h>
4876 /* Override any gcc2 internal prototype to avoid an error.  */
4877 /* We use char because int might match the return type of a gcc2
4878     builtin and then its argument prototype would still apply.  */
4879 char $ac_func();
4880 char (*f)();
4881
4882 int main() {
4883
4884 /* The GNU C library defines this for functions which it implements
4885     to always fail with ENOSYS.  Some functions are actually named
4886     something starting with __ and the normal name is an alias.  */
4887 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4888 choke me
4889 #else
4890 f = $ac_func;
4891 #endif
4892
4893 ; return 0; }
4894 EOF
4895 if { (eval echo configure:4896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4896   rm -rf conftest*
4897   eval "ac_cv_func_$ac_func=yes"
4898 else
4899   echo "configure: failed program was:" >&5
4900   cat conftest.$ac_ext >&5
4901   rm -rf conftest*
4902   eval "ac_cv_func_$ac_func=no"
4903 fi
4904 rm -f conftest*
4905 fi
4906
4907 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4908   echo "$ac_t""yes" 1>&6
4909     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4910   cat >> confdefs.h <<EOF
4911 #define $ac_tr_func 1
4912 EOF
4913  
4914 else
4915   echo "$ac_t""no" 1>&6
4916 fi
4917 done
4918
4919 for ac_func in open64 _open64 __open64 creat64
4920 do
4921 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4922 echo "configure:4923: checking for $ac_func" >&5
4923 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4924   echo $ac_n "(cached) $ac_c" 1>&6
4925 else
4926   cat > conftest.$ac_ext <<EOF
4927 #line 4928 "configure"
4928 #include "confdefs.h"
4929 /* System header to define __stub macros and hopefully few prototypes,
4930     which can conflict with char $ac_func(); below.  */
4931 #include <assert.h>
4932 /* Override any gcc2 internal prototype to avoid an error.  */
4933 /* We use char because int might match the return type of a gcc2
4934     builtin and then its argument prototype would still apply.  */
4935 char $ac_func();
4936 char (*f)();
4937
4938 int main() {
4939
4940 /* The GNU C library defines this for functions which it implements
4941     to always fail with ENOSYS.  Some functions are actually named
4942     something starting with __ and the normal name is an alias.  */
4943 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4944 choke me
4945 #else
4946 f = $ac_func;
4947 #endif
4948
4949 ; return 0; }
4950 EOF
4951 if { (eval echo configure:4952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4952   rm -rf conftest*
4953   eval "ac_cv_func_$ac_func=yes"
4954 else
4955   echo "configure: failed program was:" >&5
4956   cat conftest.$ac_ext >&5
4957   rm -rf conftest*
4958   eval "ac_cv_func_$ac_func=no"
4959 fi
4960 rm -f conftest*
4961 fi
4962
4963 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4964   echo "$ac_t""yes" 1>&6
4965     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4966   cat >> confdefs.h <<EOF
4967 #define $ac_tr_func 1
4968 EOF
4969  
4970 else
4971   echo "$ac_t""no" 1>&6
4972 fi
4973 done
4974
4975
4976 #
4977 # Check for the functions putprpwnam, set_auth_parameters,
4978 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
4979 # Needed for OSF1 and HPUX.
4980 #
4981
4982 case "$LIBS" in
4983   *-lsecurity*) for ac_func in putprpwnam
4984 do
4985 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4986 echo "configure:4987: checking for $ac_func" >&5
4987 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4988   echo $ac_n "(cached) $ac_c" 1>&6
4989 else
4990   cat > conftest.$ac_ext <<EOF
4991 #line 4992 "configure"
4992 #include "confdefs.h"
4993 /* System header to define __stub macros and hopefully few prototypes,
4994     which can conflict with char $ac_func(); below.  */
4995 #include <assert.h>
4996 /* Override any gcc2 internal prototype to avoid an error.  */
4997 /* We use char because int might match the return type of a gcc2
4998     builtin and then its argument prototype would still apply.  */
4999 char $ac_func();
5000 char (*f)();
5001
5002 int main() {
5003
5004 /* The GNU C library defines this for functions which it implements
5005     to always fail with ENOSYS.  Some functions are actually named
5006     something starting with __ and the normal name is an alias.  */
5007 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5008 choke me
5009 #else
5010 f = $ac_func;
5011 #endif
5012
5013 ; return 0; }
5014 EOF
5015 if { (eval echo configure:5016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5016   rm -rf conftest*
5017   eval "ac_cv_func_$ac_func=yes"
5018 else
5019   echo "configure: failed program was:" >&5
5020   cat conftest.$ac_ext >&5
5021   rm -rf conftest*
5022   eval "ac_cv_func_$ac_func=no"
5023 fi
5024 rm -f conftest*
5025 fi
5026
5027 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5028   echo "$ac_t""yes" 1>&6
5029     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5030   cat >> confdefs.h <<EOF
5031 #define $ac_tr_func 1
5032 EOF
5033  
5034 else
5035   echo "$ac_t""no" 1>&6
5036 fi
5037 done
5038  ;;
5039   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
5040 echo "configure:5041: checking for putprpwnam in -lsecurity" >&5
5041 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
5042 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5043   echo $ac_n "(cached) $ac_c" 1>&6
5044 else
5045   ac_save_LIBS="$LIBS"
5046 LIBS="-lsecurity  $LIBS"
5047 cat > conftest.$ac_ext <<EOF
5048 #line 5049 "configure"
5049 #include "confdefs.h"
5050 /* Override any gcc2 internal prototype to avoid an error.  */
5051 /* We use char because int might match the return type of a gcc2
5052     builtin and then its argument prototype would still apply.  */
5053 char putprpwnam();
5054
5055 int main() {
5056 putprpwnam()
5057 ; return 0; }
5058 EOF
5059 if { (eval echo configure:5060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5060   rm -rf conftest*
5061   eval "ac_cv_lib_$ac_lib_var=yes"
5062 else
5063   echo "configure: failed program was:" >&5
5064   cat conftest.$ac_ext >&5
5065   rm -rf conftest*
5066   eval "ac_cv_lib_$ac_lib_var=no"
5067 fi
5068 rm -f conftest*
5069 LIBS="$ac_save_LIBS"
5070
5071 fi
5072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5073   echo "$ac_t""yes" 1>&6
5074     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5075     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5076   cat >> confdefs.h <<EOF
5077 #define $ac_tr_lib 1
5078 EOF
5079
5080   LIBS="-lsecurity $LIBS"
5081
5082 else
5083   echo "$ac_t""no" 1>&6
5084 fi
5085  
5086      for ac_func in putprpwnam
5087 do
5088 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5089 echo "configure:5090: checking for $ac_func" >&5
5090 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5091   echo $ac_n "(cached) $ac_c" 1>&6
5092 else
5093   cat > conftest.$ac_ext <<EOF
5094 #line 5095 "configure"
5095 #include "confdefs.h"
5096 /* System header to define __stub macros and hopefully few prototypes,
5097     which can conflict with char $ac_func(); below.  */
5098 #include <assert.h>
5099 /* Override any gcc2 internal prototype to avoid an error.  */
5100 /* We use char because int might match the return type of a gcc2
5101     builtin and then its argument prototype would still apply.  */
5102 char $ac_func();
5103 char (*f)();
5104
5105 int main() {
5106
5107 /* The GNU C library defines this for functions which it implements
5108     to always fail with ENOSYS.  Some functions are actually named
5109     something starting with __ and the normal name is an alias.  */
5110 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5111 choke me
5112 #else
5113 f = $ac_func;
5114 #endif
5115
5116 ; return 0; }
5117 EOF
5118 if { (eval echo configure:5119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5119   rm -rf conftest*
5120   eval "ac_cv_func_$ac_func=yes"
5121 else
5122   echo "configure: failed program was:" >&5
5123   cat conftest.$ac_ext >&5
5124   rm -rf conftest*
5125   eval "ac_cv_func_$ac_func=no"
5126 fi
5127 rm -f conftest*
5128 fi
5129
5130 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5131   echo "$ac_t""yes" 1>&6
5132     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5133   cat >> confdefs.h <<EOF
5134 #define $ac_tr_func 1
5135 EOF
5136  
5137 else
5138   echo "$ac_t""no" 1>&6
5139 fi
5140 done
5141
5142   ;;
5143   esac
5144
5145 case "$LIBS" in
5146   *-lsec*) for ac_func in putprpwnam
5147 do
5148 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5149 echo "configure:5150: checking for $ac_func" >&5
5150 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5151   echo $ac_n "(cached) $ac_c" 1>&6
5152 else
5153   cat > conftest.$ac_ext <<EOF
5154 #line 5155 "configure"
5155 #include "confdefs.h"
5156 /* System header to define __stub macros and hopefully few prototypes,
5157     which can conflict with char $ac_func(); below.  */
5158 #include <assert.h>
5159 /* Override any gcc2 internal prototype to avoid an error.  */
5160 /* We use char because int might match the return type of a gcc2
5161     builtin and then its argument prototype would still apply.  */
5162 char $ac_func();
5163 char (*f)();
5164
5165 int main() {
5166
5167 /* The GNU C library defines this for functions which it implements
5168     to always fail with ENOSYS.  Some functions are actually named
5169     something starting with __ and the normal name is an alias.  */
5170 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5171 choke me
5172 #else
5173 f = $ac_func;
5174 #endif
5175
5176 ; return 0; }
5177 EOF
5178 if { (eval echo configure:5179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5179   rm -rf conftest*
5180   eval "ac_cv_func_$ac_func=yes"
5181 else
5182   echo "configure: failed program was:" >&5
5183   cat conftest.$ac_ext >&5
5184   rm -rf conftest*
5185   eval "ac_cv_func_$ac_func=no"
5186 fi
5187 rm -f conftest*
5188 fi
5189
5190 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5191   echo "$ac_t""yes" 1>&6
5192     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5193   cat >> confdefs.h <<EOF
5194 #define $ac_tr_func 1
5195 EOF
5196  
5197 else
5198   echo "$ac_t""no" 1>&6
5199 fi
5200 done
5201  ;;
5202   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
5203 echo "configure:5204: checking for putprpwnam in -lsec" >&5
5204 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
5205 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5206   echo $ac_n "(cached) $ac_c" 1>&6
5207 else
5208   ac_save_LIBS="$LIBS"
5209 LIBS="-lsec  $LIBS"
5210 cat > conftest.$ac_ext <<EOF
5211 #line 5212 "configure"
5212 #include "confdefs.h"
5213 /* Override any gcc2 internal prototype to avoid an error.  */
5214 /* We use char because int might match the return type of a gcc2
5215     builtin and then its argument prototype would still apply.  */
5216 char putprpwnam();
5217
5218 int main() {
5219 putprpwnam()
5220 ; return 0; }
5221 EOF
5222 if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5223   rm -rf conftest*
5224   eval "ac_cv_lib_$ac_lib_var=yes"
5225 else
5226   echo "configure: failed program was:" >&5
5227   cat conftest.$ac_ext >&5
5228   rm -rf conftest*
5229   eval "ac_cv_lib_$ac_lib_var=no"
5230 fi
5231 rm -f conftest*
5232 LIBS="$ac_save_LIBS"
5233
5234 fi
5235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5236   echo "$ac_t""yes" 1>&6
5237     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5238     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5239   cat >> confdefs.h <<EOF
5240 #define $ac_tr_lib 1
5241 EOF
5242
5243   LIBS="-lsec $LIBS"
5244
5245 else
5246   echo "$ac_t""no" 1>&6
5247 fi
5248  
5249      for ac_func in putprpwnam
5250 do
5251 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5252 echo "configure:5253: checking for $ac_func" >&5
5253 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5254   echo $ac_n "(cached) $ac_c" 1>&6
5255 else
5256   cat > conftest.$ac_ext <<EOF
5257 #line 5258 "configure"
5258 #include "confdefs.h"
5259 /* System header to define __stub macros and hopefully few prototypes,
5260     which can conflict with char $ac_func(); below.  */
5261 #include <assert.h>
5262 /* Override any gcc2 internal prototype to avoid an error.  */
5263 /* We use char because int might match the return type of a gcc2
5264     builtin and then its argument prototype would still apply.  */
5265 char $ac_func();
5266 char (*f)();
5267
5268 int main() {
5269
5270 /* The GNU C library defines this for functions which it implements
5271     to always fail with ENOSYS.  Some functions are actually named
5272     something starting with __ and the normal name is an alias.  */
5273 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5274 choke me
5275 #else
5276 f = $ac_func;
5277 #endif
5278
5279 ; return 0; }
5280 EOF
5281 if { (eval echo configure:5282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5282   rm -rf conftest*
5283   eval "ac_cv_func_$ac_func=yes"
5284 else
5285   echo "configure: failed program was:" >&5
5286   cat conftest.$ac_ext >&5
5287   rm -rf conftest*
5288   eval "ac_cv_func_$ac_func=no"
5289 fi
5290 rm -f conftest*
5291 fi
5292
5293 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5294   echo "$ac_t""yes" 1>&6
5295     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5296   cat >> confdefs.h <<EOF
5297 #define $ac_tr_func 1
5298 EOF
5299  
5300 else
5301   echo "$ac_t""no" 1>&6
5302 fi
5303 done
5304
5305   ;;
5306   esac
5307
5308
5309 case "$LIBS" in
5310   *-lsecurity*) for ac_func in set_auth_parameters
5311 do
5312 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5313 echo "configure:5314: checking for $ac_func" >&5
5314 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5315   echo $ac_n "(cached) $ac_c" 1>&6
5316 else
5317   cat > conftest.$ac_ext <<EOF
5318 #line 5319 "configure"
5319 #include "confdefs.h"
5320 /* System header to define __stub macros and hopefully few prototypes,
5321     which can conflict with char $ac_func(); below.  */
5322 #include <assert.h>
5323 /* Override any gcc2 internal prototype to avoid an error.  */
5324 /* We use char because int might match the return type of a gcc2
5325     builtin and then its argument prototype would still apply.  */
5326 char $ac_func();
5327 char (*f)();
5328
5329 int main() {
5330
5331 /* The GNU C library defines this for functions which it implements
5332     to always fail with ENOSYS.  Some functions are actually named
5333     something starting with __ and the normal name is an alias.  */
5334 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5335 choke me
5336 #else
5337 f = $ac_func;
5338 #endif
5339
5340 ; return 0; }
5341 EOF
5342 if { (eval echo configure:5343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5343   rm -rf conftest*
5344   eval "ac_cv_func_$ac_func=yes"
5345 else
5346   echo "configure: failed program was:" >&5
5347   cat conftest.$ac_ext >&5
5348   rm -rf conftest*
5349   eval "ac_cv_func_$ac_func=no"
5350 fi
5351 rm -f conftest*
5352 fi
5353
5354 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5355   echo "$ac_t""yes" 1>&6
5356     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5357   cat >> confdefs.h <<EOF
5358 #define $ac_tr_func 1
5359 EOF
5360  
5361 else
5362   echo "$ac_t""no" 1>&6
5363 fi
5364 done
5365  ;;
5366   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
5367 echo "configure:5368: checking for set_auth_parameters in -lsecurity" >&5
5368 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
5369 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5370   echo $ac_n "(cached) $ac_c" 1>&6
5371 else
5372   ac_save_LIBS="$LIBS"
5373 LIBS="-lsecurity  $LIBS"
5374 cat > conftest.$ac_ext <<EOF
5375 #line 5376 "configure"
5376 #include "confdefs.h"
5377 /* Override any gcc2 internal prototype to avoid an error.  */
5378 /* We use char because int might match the return type of a gcc2
5379     builtin and then its argument prototype would still apply.  */
5380 char set_auth_parameters();
5381
5382 int main() {
5383 set_auth_parameters()
5384 ; return 0; }
5385 EOF
5386 if { (eval echo configure:5387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5387   rm -rf conftest*
5388   eval "ac_cv_lib_$ac_lib_var=yes"
5389 else
5390   echo "configure: failed program was:" >&5
5391   cat conftest.$ac_ext >&5
5392   rm -rf conftest*
5393   eval "ac_cv_lib_$ac_lib_var=no"
5394 fi
5395 rm -f conftest*
5396 LIBS="$ac_save_LIBS"
5397
5398 fi
5399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5400   echo "$ac_t""yes" 1>&6
5401     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5402     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5403   cat >> confdefs.h <<EOF
5404 #define $ac_tr_lib 1
5405 EOF
5406
5407   LIBS="-lsecurity $LIBS"
5408
5409 else
5410   echo "$ac_t""no" 1>&6
5411 fi
5412  
5413      for ac_func in set_auth_parameters
5414 do
5415 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5416 echo "configure:5417: checking for $ac_func" >&5
5417 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5418   echo $ac_n "(cached) $ac_c" 1>&6
5419 else
5420   cat > conftest.$ac_ext <<EOF
5421 #line 5422 "configure"
5422 #include "confdefs.h"
5423 /* System header to define __stub macros and hopefully few prototypes,
5424     which can conflict with char $ac_func(); below.  */
5425 #include <assert.h>
5426 /* Override any gcc2 internal prototype to avoid an error.  */
5427 /* We use char because int might match the return type of a gcc2
5428     builtin and then its argument prototype would still apply.  */
5429 char $ac_func();
5430 char (*f)();
5431
5432 int main() {
5433
5434 /* The GNU C library defines this for functions which it implements
5435     to always fail with ENOSYS.  Some functions are actually named
5436     something starting with __ and the normal name is an alias.  */
5437 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5438 choke me
5439 #else
5440 f = $ac_func;
5441 #endif
5442
5443 ; return 0; }
5444 EOF
5445 if { (eval echo configure:5446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5446   rm -rf conftest*
5447   eval "ac_cv_func_$ac_func=yes"
5448 else
5449   echo "configure: failed program was:" >&5
5450   cat conftest.$ac_ext >&5
5451   rm -rf conftest*
5452   eval "ac_cv_func_$ac_func=no"
5453 fi
5454 rm -f conftest*
5455 fi
5456
5457 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5458   echo "$ac_t""yes" 1>&6
5459     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5460   cat >> confdefs.h <<EOF
5461 #define $ac_tr_func 1
5462 EOF
5463  
5464 else
5465   echo "$ac_t""no" 1>&6
5466 fi
5467 done
5468
5469   ;;
5470   esac
5471
5472 case "$LIBS" in
5473   *-lsec*) for ac_func in set_auth_parameters
5474 do
5475 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5476 echo "configure:5477: checking for $ac_func" >&5
5477 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5478   echo $ac_n "(cached) $ac_c" 1>&6
5479 else
5480   cat > conftest.$ac_ext <<EOF
5481 #line 5482 "configure"
5482 #include "confdefs.h"
5483 /* System header to define __stub macros and hopefully few prototypes,
5484     which can conflict with char $ac_func(); below.  */
5485 #include <assert.h>
5486 /* Override any gcc2 internal prototype to avoid an error.  */
5487 /* We use char because int might match the return type of a gcc2
5488     builtin and then its argument prototype would still apply.  */
5489 char $ac_func();
5490 char (*f)();
5491
5492 int main() {
5493
5494 /* The GNU C library defines this for functions which it implements
5495     to always fail with ENOSYS.  Some functions are actually named
5496     something starting with __ and the normal name is an alias.  */
5497 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5498 choke me
5499 #else
5500 f = $ac_func;
5501 #endif
5502
5503 ; return 0; }
5504 EOF
5505 if { (eval echo configure:5506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5506   rm -rf conftest*
5507   eval "ac_cv_func_$ac_func=yes"
5508 else
5509   echo "configure: failed program was:" >&5
5510   cat conftest.$ac_ext >&5
5511   rm -rf conftest*
5512   eval "ac_cv_func_$ac_func=no"
5513 fi
5514 rm -f conftest*
5515 fi
5516
5517 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5518   echo "$ac_t""yes" 1>&6
5519     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5520   cat >> confdefs.h <<EOF
5521 #define $ac_tr_func 1
5522 EOF
5523  
5524 else
5525   echo "$ac_t""no" 1>&6
5526 fi
5527 done
5528  ;;
5529   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
5530 echo "configure:5531: checking for set_auth_parameters in -lsec" >&5
5531 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
5532 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5533   echo $ac_n "(cached) $ac_c" 1>&6
5534 else
5535   ac_save_LIBS="$LIBS"
5536 LIBS="-lsec  $LIBS"
5537 cat > conftest.$ac_ext <<EOF
5538 #line 5539 "configure"
5539 #include "confdefs.h"
5540 /* Override any gcc2 internal prototype to avoid an error.  */
5541 /* We use char because int might match the return type of a gcc2
5542     builtin and then its argument prototype would still apply.  */
5543 char set_auth_parameters();
5544
5545 int main() {
5546 set_auth_parameters()
5547 ; return 0; }
5548 EOF
5549 if { (eval echo configure:5550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5550   rm -rf conftest*
5551   eval "ac_cv_lib_$ac_lib_var=yes"
5552 else
5553   echo "configure: failed program was:" >&5
5554   cat conftest.$ac_ext >&5
5555   rm -rf conftest*
5556   eval "ac_cv_lib_$ac_lib_var=no"
5557 fi
5558 rm -f conftest*
5559 LIBS="$ac_save_LIBS"
5560
5561 fi
5562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5563   echo "$ac_t""yes" 1>&6
5564     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5565     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5566   cat >> confdefs.h <<EOF
5567 #define $ac_tr_lib 1
5568 EOF
5569
5570   LIBS="-lsec $LIBS"
5571
5572 else
5573   echo "$ac_t""no" 1>&6
5574 fi
5575  
5576      for ac_func in set_auth_parameters
5577 do
5578 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5579 echo "configure:5580: checking for $ac_func" >&5
5580 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5581   echo $ac_n "(cached) $ac_c" 1>&6
5582 else
5583   cat > conftest.$ac_ext <<EOF
5584 #line 5585 "configure"
5585 #include "confdefs.h"
5586 /* System header to define __stub macros and hopefully few prototypes,
5587     which can conflict with char $ac_func(); below.  */
5588 #include <assert.h>
5589 /* Override any gcc2 internal prototype to avoid an error.  */
5590 /* We use char because int might match the return type of a gcc2
5591     builtin and then its argument prototype would still apply.  */
5592 char $ac_func();
5593 char (*f)();
5594
5595 int main() {
5596
5597 /* The GNU C library defines this for functions which it implements
5598     to always fail with ENOSYS.  Some functions are actually named
5599     something starting with __ and the normal name is an alias.  */
5600 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5601 choke me
5602 #else
5603 f = $ac_func;
5604 #endif
5605
5606 ; return 0; }
5607 EOF
5608 if { (eval echo configure:5609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5609   rm -rf conftest*
5610   eval "ac_cv_func_$ac_func=yes"
5611 else
5612   echo "configure: failed program was:" >&5
5613   cat conftest.$ac_ext >&5
5614   rm -rf conftest*
5615   eval "ac_cv_func_$ac_func=no"
5616 fi
5617 rm -f conftest*
5618 fi
5619
5620 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5621   echo "$ac_t""yes" 1>&6
5622     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5623   cat >> confdefs.h <<EOF
5624 #define $ac_tr_func 1
5625 EOF
5626  
5627 else
5628   echo "$ac_t""no" 1>&6
5629 fi
5630 done
5631
5632   ;;
5633   esac
5634
5635
5636 case "$LIBS" in
5637   *-lsecurity*) for ac_func in getspnam
5638 do
5639 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5640 echo "configure:5641: checking for $ac_func" >&5
5641 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5642   echo $ac_n "(cached) $ac_c" 1>&6
5643 else
5644   cat > conftest.$ac_ext <<EOF
5645 #line 5646 "configure"
5646 #include "confdefs.h"
5647 /* System header to define __stub macros and hopefully few prototypes,
5648     which can conflict with char $ac_func(); below.  */
5649 #include <assert.h>
5650 /* Override any gcc2 internal prototype to avoid an error.  */
5651 /* We use char because int might match the return type of a gcc2
5652     builtin and then its argument prototype would still apply.  */
5653 char $ac_func();
5654 char (*f)();
5655
5656 int main() {
5657
5658 /* The GNU C library defines this for functions which it implements
5659     to always fail with ENOSYS.  Some functions are actually named
5660     something starting with __ and the normal name is an alias.  */
5661 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5662 choke me
5663 #else
5664 f = $ac_func;
5665 #endif
5666
5667 ; return 0; }
5668 EOF
5669 if { (eval echo configure:5670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5670   rm -rf conftest*
5671   eval "ac_cv_func_$ac_func=yes"
5672 else
5673   echo "configure: failed program was:" >&5
5674   cat conftest.$ac_ext >&5
5675   rm -rf conftest*
5676   eval "ac_cv_func_$ac_func=no"
5677 fi
5678 rm -f conftest*
5679 fi
5680
5681 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5682   echo "$ac_t""yes" 1>&6
5683     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5684   cat >> confdefs.h <<EOF
5685 #define $ac_tr_func 1
5686 EOF
5687  
5688 else
5689   echo "$ac_t""no" 1>&6
5690 fi
5691 done
5692  ;;
5693   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
5694 echo "configure:5695: checking for getspnam in -lsecurity" >&5
5695 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
5696 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5697   echo $ac_n "(cached) $ac_c" 1>&6
5698 else
5699   ac_save_LIBS="$LIBS"
5700 LIBS="-lsecurity  $LIBS"
5701 cat > conftest.$ac_ext <<EOF
5702 #line 5703 "configure"
5703 #include "confdefs.h"
5704 /* Override any gcc2 internal prototype to avoid an error.  */
5705 /* We use char because int might match the return type of a gcc2
5706     builtin and then its argument prototype would still apply.  */
5707 char getspnam();
5708
5709 int main() {
5710 getspnam()
5711 ; return 0; }
5712 EOF
5713 if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5714   rm -rf conftest*
5715   eval "ac_cv_lib_$ac_lib_var=yes"
5716 else
5717   echo "configure: failed program was:" >&5
5718   cat conftest.$ac_ext >&5
5719   rm -rf conftest*
5720   eval "ac_cv_lib_$ac_lib_var=no"
5721 fi
5722 rm -f conftest*
5723 LIBS="$ac_save_LIBS"
5724
5725 fi
5726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5727   echo "$ac_t""yes" 1>&6
5728     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5729     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5730   cat >> confdefs.h <<EOF
5731 #define $ac_tr_lib 1
5732 EOF
5733
5734   LIBS="-lsecurity $LIBS"
5735
5736 else
5737   echo "$ac_t""no" 1>&6
5738 fi
5739  
5740      for ac_func in getspnam
5741 do
5742 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5743 echo "configure:5744: checking for $ac_func" >&5
5744 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5745   echo $ac_n "(cached) $ac_c" 1>&6
5746 else
5747   cat > conftest.$ac_ext <<EOF
5748 #line 5749 "configure"
5749 #include "confdefs.h"
5750 /* System header to define __stub macros and hopefully few prototypes,
5751     which can conflict with char $ac_func(); below.  */
5752 #include <assert.h>
5753 /* Override any gcc2 internal prototype to avoid an error.  */
5754 /* We use char because int might match the return type of a gcc2
5755     builtin and then its argument prototype would still apply.  */
5756 char $ac_func();
5757 char (*f)();
5758
5759 int main() {
5760
5761 /* The GNU C library defines this for functions which it implements
5762     to always fail with ENOSYS.  Some functions are actually named
5763     something starting with __ and the normal name is an alias.  */
5764 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5765 choke me
5766 #else
5767 f = $ac_func;
5768 #endif
5769
5770 ; return 0; }
5771 EOF
5772 if { (eval echo configure:5773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5773   rm -rf conftest*
5774   eval "ac_cv_func_$ac_func=yes"
5775 else
5776   echo "configure: failed program was:" >&5
5777   cat conftest.$ac_ext >&5
5778   rm -rf conftest*
5779   eval "ac_cv_func_$ac_func=no"
5780 fi
5781 rm -f conftest*
5782 fi
5783
5784 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5785   echo "$ac_t""yes" 1>&6
5786     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5787   cat >> confdefs.h <<EOF
5788 #define $ac_tr_func 1
5789 EOF
5790  
5791 else
5792   echo "$ac_t""no" 1>&6
5793 fi
5794 done
5795
5796   ;;
5797   esac
5798
5799 case "$LIBS" in
5800   *-lsec*) for ac_func in getspnam
5801 do
5802 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5803 echo "configure:5804: checking for $ac_func" >&5
5804 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5805   echo $ac_n "(cached) $ac_c" 1>&6
5806 else
5807   cat > conftest.$ac_ext <<EOF
5808 #line 5809 "configure"
5809 #include "confdefs.h"
5810 /* System header to define __stub macros and hopefully few prototypes,
5811     which can conflict with char $ac_func(); below.  */
5812 #include <assert.h>
5813 /* Override any gcc2 internal prototype to avoid an error.  */
5814 /* We use char because int might match the return type of a gcc2
5815     builtin and then its argument prototype would still apply.  */
5816 char $ac_func();
5817 char (*f)();
5818
5819 int main() {
5820
5821 /* The GNU C library defines this for functions which it implements
5822     to always fail with ENOSYS.  Some functions are actually named
5823     something starting with __ and the normal name is an alias.  */
5824 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5825 choke me
5826 #else
5827 f = $ac_func;
5828 #endif
5829
5830 ; return 0; }
5831 EOF
5832 if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5833   rm -rf conftest*
5834   eval "ac_cv_func_$ac_func=yes"
5835 else
5836   echo "configure: failed program was:" >&5
5837   cat conftest.$ac_ext >&5
5838   rm -rf conftest*
5839   eval "ac_cv_func_$ac_func=no"
5840 fi
5841 rm -f conftest*
5842 fi
5843
5844 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5845   echo "$ac_t""yes" 1>&6
5846     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5847   cat >> confdefs.h <<EOF
5848 #define $ac_tr_func 1
5849 EOF
5850  
5851 else
5852   echo "$ac_t""no" 1>&6
5853 fi
5854 done
5855  ;;
5856   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
5857 echo "configure:5858: checking for getspnam in -lsec" >&5
5858 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
5859 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5860   echo $ac_n "(cached) $ac_c" 1>&6
5861 else
5862   ac_save_LIBS="$LIBS"
5863 LIBS="-lsec  $LIBS"
5864 cat > conftest.$ac_ext <<EOF
5865 #line 5866 "configure"
5866 #include "confdefs.h"
5867 /* Override any gcc2 internal prototype to avoid an error.  */
5868 /* We use char because int might match the return type of a gcc2
5869     builtin and then its argument prototype would still apply.  */
5870 char getspnam();
5871
5872 int main() {
5873 getspnam()
5874 ; return 0; }
5875 EOF
5876 if { (eval echo configure:5877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5877   rm -rf conftest*
5878   eval "ac_cv_lib_$ac_lib_var=yes"
5879 else
5880   echo "configure: failed program was:" >&5
5881   cat conftest.$ac_ext >&5
5882   rm -rf conftest*
5883   eval "ac_cv_lib_$ac_lib_var=no"
5884 fi
5885 rm -f conftest*
5886 LIBS="$ac_save_LIBS"
5887
5888 fi
5889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5890   echo "$ac_t""yes" 1>&6
5891     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5892     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5893   cat >> confdefs.h <<EOF
5894 #define $ac_tr_lib 1
5895 EOF
5896
5897   LIBS="-lsec $LIBS"
5898
5899 else
5900   echo "$ac_t""no" 1>&6
5901 fi
5902  
5903      for ac_func in getspnam
5904 do
5905 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5906 echo "configure:5907: checking for $ac_func" >&5
5907 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5908   echo $ac_n "(cached) $ac_c" 1>&6
5909 else
5910   cat > conftest.$ac_ext <<EOF
5911 #line 5912 "configure"
5912 #include "confdefs.h"
5913 /* System header to define __stub macros and hopefully few prototypes,
5914     which can conflict with char $ac_func(); below.  */
5915 #include <assert.h>
5916 /* Override any gcc2 internal prototype to avoid an error.  */
5917 /* We use char because int might match the return type of a gcc2
5918     builtin and then its argument prototype would still apply.  */
5919 char $ac_func();
5920 char (*f)();
5921
5922 int main() {
5923
5924 /* The GNU C library defines this for functions which it implements
5925     to always fail with ENOSYS.  Some functions are actually named
5926     something starting with __ and the normal name is an alias.  */
5927 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5928 choke me
5929 #else
5930 f = $ac_func;
5931 #endif
5932
5933 ; return 0; }
5934 EOF
5935 if { (eval echo configure:5936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5936   rm -rf conftest*
5937   eval "ac_cv_func_$ac_func=yes"
5938 else
5939   echo "configure: failed program was:" >&5
5940   cat conftest.$ac_ext >&5
5941   rm -rf conftest*
5942   eval "ac_cv_func_$ac_func=no"
5943 fi
5944 rm -f conftest*
5945 fi
5946
5947 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5948   echo "$ac_t""yes" 1>&6
5949     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5950   cat >> confdefs.h <<EOF
5951 #define $ac_tr_func 1
5952 EOF
5953  
5954 else
5955   echo "$ac_t""no" 1>&6
5956 fi
5957 done
5958
5959   ;;
5960   esac
5961
5962
5963 case "$LIBS" in
5964   *-lsecurity*) for ac_func in bigcrypt
5965 do
5966 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5967 echo "configure:5968: checking for $ac_func" >&5
5968 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5969   echo $ac_n "(cached) $ac_c" 1>&6
5970 else
5971   cat > conftest.$ac_ext <<EOF
5972 #line 5973 "configure"
5973 #include "confdefs.h"
5974 /* System header to define __stub macros and hopefully few prototypes,
5975     which can conflict with char $ac_func(); below.  */
5976 #include <assert.h>
5977 /* Override any gcc2 internal prototype to avoid an error.  */
5978 /* We use char because int might match the return type of a gcc2
5979     builtin and then its argument prototype would still apply.  */
5980 char $ac_func();
5981 char (*f)();
5982
5983 int main() {
5984
5985 /* The GNU C library defines this for functions which it implements
5986     to always fail with ENOSYS.  Some functions are actually named
5987     something starting with __ and the normal name is an alias.  */
5988 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5989 choke me
5990 #else
5991 f = $ac_func;
5992 #endif
5993
5994 ; return 0; }
5995 EOF
5996 if { (eval echo configure:5997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5997   rm -rf conftest*
5998   eval "ac_cv_func_$ac_func=yes"
5999 else
6000   echo "configure: failed program was:" >&5
6001   cat conftest.$ac_ext >&5
6002   rm -rf conftest*
6003   eval "ac_cv_func_$ac_func=no"
6004 fi
6005 rm -f conftest*
6006 fi
6007
6008 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6009   echo "$ac_t""yes" 1>&6
6010     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6011   cat >> confdefs.h <<EOF
6012 #define $ac_tr_func 1
6013 EOF
6014  
6015 else
6016   echo "$ac_t""no" 1>&6
6017 fi
6018 done
6019  ;;
6020   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
6021 echo "configure:6022: checking for bigcrypt in -lsecurity" >&5
6022 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
6023 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6024   echo $ac_n "(cached) $ac_c" 1>&6
6025 else
6026   ac_save_LIBS="$LIBS"
6027 LIBS="-lsecurity  $LIBS"
6028 cat > conftest.$ac_ext <<EOF
6029 #line 6030 "configure"
6030 #include "confdefs.h"
6031 /* Override any gcc2 internal prototype to avoid an error.  */
6032 /* We use char because int might match the return type of a gcc2
6033     builtin and then its argument prototype would still apply.  */
6034 char bigcrypt();
6035
6036 int main() {
6037 bigcrypt()
6038 ; return 0; }
6039 EOF
6040 if { (eval echo configure:6041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6041   rm -rf conftest*
6042   eval "ac_cv_lib_$ac_lib_var=yes"
6043 else
6044   echo "configure: failed program was:" >&5
6045   cat conftest.$ac_ext >&5
6046   rm -rf conftest*
6047   eval "ac_cv_lib_$ac_lib_var=no"
6048 fi
6049 rm -f conftest*
6050 LIBS="$ac_save_LIBS"
6051
6052 fi
6053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6054   echo "$ac_t""yes" 1>&6
6055     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6056     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6057   cat >> confdefs.h <<EOF
6058 #define $ac_tr_lib 1
6059 EOF
6060
6061   LIBS="-lsecurity $LIBS"
6062
6063 else
6064   echo "$ac_t""no" 1>&6
6065 fi
6066  
6067      for ac_func in bigcrypt
6068 do
6069 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6070 echo "configure:6071: checking for $ac_func" >&5
6071 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6072   echo $ac_n "(cached) $ac_c" 1>&6
6073 else
6074   cat > conftest.$ac_ext <<EOF
6075 #line 6076 "configure"
6076 #include "confdefs.h"
6077 /* System header to define __stub macros and hopefully few prototypes,
6078     which can conflict with char $ac_func(); below.  */
6079 #include <assert.h>
6080 /* Override any gcc2 internal prototype to avoid an error.  */
6081 /* We use char because int might match the return type of a gcc2
6082     builtin and then its argument prototype would still apply.  */
6083 char $ac_func();
6084 char (*f)();
6085
6086 int main() {
6087
6088 /* The GNU C library defines this for functions which it implements
6089     to always fail with ENOSYS.  Some functions are actually named
6090     something starting with __ and the normal name is an alias.  */
6091 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6092 choke me
6093 #else
6094 f = $ac_func;
6095 #endif
6096
6097 ; return 0; }
6098 EOF
6099 if { (eval echo configure:6100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6100   rm -rf conftest*
6101   eval "ac_cv_func_$ac_func=yes"
6102 else
6103   echo "configure: failed program was:" >&5
6104   cat conftest.$ac_ext >&5
6105   rm -rf conftest*
6106   eval "ac_cv_func_$ac_func=no"
6107 fi
6108 rm -f conftest*
6109 fi
6110
6111 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6112   echo "$ac_t""yes" 1>&6
6113     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6114   cat >> confdefs.h <<EOF
6115 #define $ac_tr_func 1
6116 EOF
6117  
6118 else
6119   echo "$ac_t""no" 1>&6
6120 fi
6121 done
6122
6123   ;;
6124   esac
6125
6126 case "$LIBS" in
6127   *-lsec*) for ac_func in bigcrypt
6128 do
6129 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6130 echo "configure:6131: checking for $ac_func" >&5
6131 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6132   echo $ac_n "(cached) $ac_c" 1>&6
6133 else
6134   cat > conftest.$ac_ext <<EOF
6135 #line 6136 "configure"
6136 #include "confdefs.h"
6137 /* System header to define __stub macros and hopefully few prototypes,
6138     which can conflict with char $ac_func(); below.  */
6139 #include <assert.h>
6140 /* Override any gcc2 internal prototype to avoid an error.  */
6141 /* We use char because int might match the return type of a gcc2
6142     builtin and then its argument prototype would still apply.  */
6143 char $ac_func();
6144 char (*f)();
6145
6146 int main() {
6147
6148 /* The GNU C library defines this for functions which it implements
6149     to always fail with ENOSYS.  Some functions are actually named
6150     something starting with __ and the normal name is an alias.  */
6151 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6152 choke me
6153 #else
6154 f = $ac_func;
6155 #endif
6156
6157 ; return 0; }
6158 EOF
6159 if { (eval echo configure:6160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6160   rm -rf conftest*
6161   eval "ac_cv_func_$ac_func=yes"
6162 else
6163   echo "configure: failed program was:" >&5
6164   cat conftest.$ac_ext >&5
6165   rm -rf conftest*
6166   eval "ac_cv_func_$ac_func=no"
6167 fi
6168 rm -f conftest*
6169 fi
6170
6171 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6172   echo "$ac_t""yes" 1>&6
6173     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6174   cat >> confdefs.h <<EOF
6175 #define $ac_tr_func 1
6176 EOF
6177  
6178 else
6179   echo "$ac_t""no" 1>&6
6180 fi
6181 done
6182  ;;
6183   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
6184 echo "configure:6185: checking for bigcrypt in -lsec" >&5
6185 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
6186 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6187   echo $ac_n "(cached) $ac_c" 1>&6
6188 else
6189   ac_save_LIBS="$LIBS"
6190 LIBS="-lsec  $LIBS"
6191 cat > conftest.$ac_ext <<EOF
6192 #line 6193 "configure"
6193 #include "confdefs.h"
6194 /* Override any gcc2 internal prototype to avoid an error.  */
6195 /* We use char because int might match the return type of a gcc2
6196     builtin and then its argument prototype would still apply.  */
6197 char bigcrypt();
6198
6199 int main() {
6200 bigcrypt()
6201 ; return 0; }
6202 EOF
6203 if { (eval echo configure:6204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6204   rm -rf conftest*
6205   eval "ac_cv_lib_$ac_lib_var=yes"
6206 else
6207   echo "configure: failed program was:" >&5
6208   cat conftest.$ac_ext >&5
6209   rm -rf conftest*
6210   eval "ac_cv_lib_$ac_lib_var=no"
6211 fi
6212 rm -f conftest*
6213 LIBS="$ac_save_LIBS"
6214
6215 fi
6216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6217   echo "$ac_t""yes" 1>&6
6218     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6219     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6220   cat >> confdefs.h <<EOF
6221 #define $ac_tr_lib 1
6222 EOF
6223
6224   LIBS="-lsec $LIBS"
6225
6226 else
6227   echo "$ac_t""no" 1>&6
6228 fi
6229  
6230      for ac_func in bigcrypt
6231 do
6232 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6233 echo "configure:6234: checking for $ac_func" >&5
6234 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6235   echo $ac_n "(cached) $ac_c" 1>&6
6236 else
6237   cat > conftest.$ac_ext <<EOF
6238 #line 6239 "configure"
6239 #include "confdefs.h"
6240 /* System header to define __stub macros and hopefully few prototypes,
6241     which can conflict with char $ac_func(); below.  */
6242 #include <assert.h>
6243 /* Override any gcc2 internal prototype to avoid an error.  */
6244 /* We use char because int might match the return type of a gcc2
6245     builtin and then its argument prototype would still apply.  */
6246 char $ac_func();
6247 char (*f)();
6248
6249 int main() {
6250
6251 /* The GNU C library defines this for functions which it implements
6252     to always fail with ENOSYS.  Some functions are actually named
6253     something starting with __ and the normal name is an alias.  */
6254 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6255 choke me
6256 #else
6257 f = $ac_func;
6258 #endif
6259
6260 ; return 0; }
6261 EOF
6262 if { (eval echo configure:6263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6263   rm -rf conftest*
6264   eval "ac_cv_func_$ac_func=yes"
6265 else
6266   echo "configure: failed program was:" >&5
6267   cat conftest.$ac_ext >&5
6268   rm -rf conftest*
6269   eval "ac_cv_func_$ac_func=no"
6270 fi
6271 rm -f conftest*
6272 fi
6273
6274 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6275   echo "$ac_t""yes" 1>&6
6276     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6277   cat >> confdefs.h <<EOF
6278 #define $ac_tr_func 1
6279 EOF
6280  
6281 else
6282   echo "$ac_t""no" 1>&6
6283 fi
6284 done
6285
6286   ;;
6287   esac
6288
6289
6290 case "$LIBS" in
6291   *-lsecurity*) for ac_func in getprpwnam
6292 do
6293 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6294 echo "configure:6295: checking for $ac_func" >&5
6295 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6296   echo $ac_n "(cached) $ac_c" 1>&6
6297 else
6298   cat > conftest.$ac_ext <<EOF
6299 #line 6300 "configure"
6300 #include "confdefs.h"
6301 /* System header to define __stub macros and hopefully few prototypes,
6302     which can conflict with char $ac_func(); below.  */
6303 #include <assert.h>
6304 /* Override any gcc2 internal prototype to avoid an error.  */
6305 /* We use char because int might match the return type of a gcc2
6306     builtin and then its argument prototype would still apply.  */
6307 char $ac_func();
6308 char (*f)();
6309
6310 int main() {
6311
6312 /* The GNU C library defines this for functions which it implements
6313     to always fail with ENOSYS.  Some functions are actually named
6314     something starting with __ and the normal name is an alias.  */
6315 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6316 choke me
6317 #else
6318 f = $ac_func;
6319 #endif
6320
6321 ; return 0; }
6322 EOF
6323 if { (eval echo configure:6324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6324   rm -rf conftest*
6325   eval "ac_cv_func_$ac_func=yes"
6326 else
6327   echo "configure: failed program was:" >&5
6328   cat conftest.$ac_ext >&5
6329   rm -rf conftest*
6330   eval "ac_cv_func_$ac_func=no"
6331 fi
6332 rm -f conftest*
6333 fi
6334
6335 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6336   echo "$ac_t""yes" 1>&6
6337     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6338   cat >> confdefs.h <<EOF
6339 #define $ac_tr_func 1
6340 EOF
6341  
6342 else
6343   echo "$ac_t""no" 1>&6
6344 fi
6345 done
6346  ;;
6347   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
6348 echo "configure:6349: checking for getprpwnam in -lsecurity" >&5
6349 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
6350 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6351   echo $ac_n "(cached) $ac_c" 1>&6
6352 else
6353   ac_save_LIBS="$LIBS"
6354 LIBS="-lsecurity  $LIBS"
6355 cat > conftest.$ac_ext <<EOF
6356 #line 6357 "configure"
6357 #include "confdefs.h"
6358 /* Override any gcc2 internal prototype to avoid an error.  */
6359 /* We use char because int might match the return type of a gcc2
6360     builtin and then its argument prototype would still apply.  */
6361 char getprpwnam();
6362
6363 int main() {
6364 getprpwnam()
6365 ; return 0; }
6366 EOF
6367 if { (eval echo configure:6368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6368   rm -rf conftest*
6369   eval "ac_cv_lib_$ac_lib_var=yes"
6370 else
6371   echo "configure: failed program was:" >&5
6372   cat conftest.$ac_ext >&5
6373   rm -rf conftest*
6374   eval "ac_cv_lib_$ac_lib_var=no"
6375 fi
6376 rm -f conftest*
6377 LIBS="$ac_save_LIBS"
6378
6379 fi
6380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6381   echo "$ac_t""yes" 1>&6
6382     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6383     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6384   cat >> confdefs.h <<EOF
6385 #define $ac_tr_lib 1
6386 EOF
6387
6388   LIBS="-lsecurity $LIBS"
6389
6390 else
6391   echo "$ac_t""no" 1>&6
6392 fi
6393  
6394      for ac_func in getprpwnam
6395 do
6396 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6397 echo "configure:6398: checking for $ac_func" >&5
6398 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6399   echo $ac_n "(cached) $ac_c" 1>&6
6400 else
6401   cat > conftest.$ac_ext <<EOF
6402 #line 6403 "configure"
6403 #include "confdefs.h"
6404 /* System header to define __stub macros and hopefully few prototypes,
6405     which can conflict with char $ac_func(); below.  */
6406 #include <assert.h>
6407 /* Override any gcc2 internal prototype to avoid an error.  */
6408 /* We use char because int might match the return type of a gcc2
6409     builtin and then its argument prototype would still apply.  */
6410 char $ac_func();
6411 char (*f)();
6412
6413 int main() {
6414
6415 /* The GNU C library defines this for functions which it implements
6416     to always fail with ENOSYS.  Some functions are actually named
6417     something starting with __ and the normal name is an alias.  */
6418 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6419 choke me
6420 #else
6421 f = $ac_func;
6422 #endif
6423
6424 ; return 0; }
6425 EOF
6426 if { (eval echo configure:6427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6427   rm -rf conftest*
6428   eval "ac_cv_func_$ac_func=yes"
6429 else
6430   echo "configure: failed program was:" >&5
6431   cat conftest.$ac_ext >&5
6432   rm -rf conftest*
6433   eval "ac_cv_func_$ac_func=no"
6434 fi
6435 rm -f conftest*
6436 fi
6437
6438 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6439   echo "$ac_t""yes" 1>&6
6440     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6441   cat >> confdefs.h <<EOF
6442 #define $ac_tr_func 1
6443 EOF
6444  
6445 else
6446   echo "$ac_t""no" 1>&6
6447 fi
6448 done
6449
6450   ;;
6451   esac
6452
6453 case "$LIBS" in
6454   *-lsec*) for ac_func in getprpwnam
6455 do
6456 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6457 echo "configure:6458: checking for $ac_func" >&5
6458 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6459   echo $ac_n "(cached) $ac_c" 1>&6
6460 else
6461   cat > conftest.$ac_ext <<EOF
6462 #line 6463 "configure"
6463 #include "confdefs.h"
6464 /* System header to define __stub macros and hopefully few prototypes,
6465     which can conflict with char $ac_func(); below.  */
6466 #include <assert.h>
6467 /* Override any gcc2 internal prototype to avoid an error.  */
6468 /* We use char because int might match the return type of a gcc2
6469     builtin and then its argument prototype would still apply.  */
6470 char $ac_func();
6471 char (*f)();
6472
6473 int main() {
6474
6475 /* The GNU C library defines this for functions which it implements
6476     to always fail with ENOSYS.  Some functions are actually named
6477     something starting with __ and the normal name is an alias.  */
6478 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6479 choke me
6480 #else
6481 f = $ac_func;
6482 #endif
6483
6484 ; return 0; }
6485 EOF
6486 if { (eval echo configure:6487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6487   rm -rf conftest*
6488   eval "ac_cv_func_$ac_func=yes"
6489 else
6490   echo "configure: failed program was:" >&5
6491   cat conftest.$ac_ext >&5
6492   rm -rf conftest*
6493   eval "ac_cv_func_$ac_func=no"
6494 fi
6495 rm -f conftest*
6496 fi
6497
6498 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6499   echo "$ac_t""yes" 1>&6
6500     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6501   cat >> confdefs.h <<EOF
6502 #define $ac_tr_func 1
6503 EOF
6504  
6505 else
6506   echo "$ac_t""no" 1>&6
6507 fi
6508 done
6509  ;;
6510   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
6511 echo "configure:6512: checking for getprpwnam in -lsec" >&5
6512 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
6513 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6514   echo $ac_n "(cached) $ac_c" 1>&6
6515 else
6516   ac_save_LIBS="$LIBS"
6517 LIBS="-lsec  $LIBS"
6518 cat > conftest.$ac_ext <<EOF
6519 #line 6520 "configure"
6520 #include "confdefs.h"
6521 /* Override any gcc2 internal prototype to avoid an error.  */
6522 /* We use char because int might match the return type of a gcc2
6523     builtin and then its argument prototype would still apply.  */
6524 char getprpwnam();
6525
6526 int main() {
6527 getprpwnam()
6528 ; return 0; }
6529 EOF
6530 if { (eval echo configure:6531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6531   rm -rf conftest*
6532   eval "ac_cv_lib_$ac_lib_var=yes"
6533 else
6534   echo "configure: failed program was:" >&5
6535   cat conftest.$ac_ext >&5
6536   rm -rf conftest*
6537   eval "ac_cv_lib_$ac_lib_var=no"
6538 fi
6539 rm -f conftest*
6540 LIBS="$ac_save_LIBS"
6541
6542 fi
6543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6544   echo "$ac_t""yes" 1>&6
6545     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6546     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6547   cat >> confdefs.h <<EOF
6548 #define $ac_tr_lib 1
6549 EOF
6550
6551   LIBS="-lsec $LIBS"
6552
6553 else
6554   echo "$ac_t""no" 1>&6
6555 fi
6556  
6557      for ac_func in getprpwnam
6558 do
6559 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6560 echo "configure:6561: checking for $ac_func" >&5
6561 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6562   echo $ac_n "(cached) $ac_c" 1>&6
6563 else
6564   cat > conftest.$ac_ext <<EOF
6565 #line 6566 "configure"
6566 #include "confdefs.h"
6567 /* System header to define __stub macros and hopefully few prototypes,
6568     which can conflict with char $ac_func(); below.  */
6569 #include <assert.h>
6570 /* Override any gcc2 internal prototype to avoid an error.  */
6571 /* We use char because int might match the return type of a gcc2
6572     builtin and then its argument prototype would still apply.  */
6573 char $ac_func();
6574 char (*f)();
6575
6576 int main() {
6577
6578 /* The GNU C library defines this for functions which it implements
6579     to always fail with ENOSYS.  Some functions are actually named
6580     something starting with __ and the normal name is an alias.  */
6581 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6582 choke me
6583 #else
6584 f = $ac_func;
6585 #endif
6586
6587 ; return 0; }
6588 EOF
6589 if { (eval echo configure:6590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6590   rm -rf conftest*
6591   eval "ac_cv_func_$ac_func=yes"
6592 else
6593   echo "configure: failed program was:" >&5
6594   cat conftest.$ac_ext >&5
6595   rm -rf conftest*
6596   eval "ac_cv_func_$ac_func=no"
6597 fi
6598 rm -f conftest*
6599 fi
6600
6601 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6602   echo "$ac_t""yes" 1>&6
6603     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6604   cat >> confdefs.h <<EOF
6605 #define $ac_tr_func 1
6606 EOF
6607  
6608 else
6609   echo "$ac_t""no" 1>&6
6610 fi
6611 done
6612
6613   ;;
6614   esac
6615
6616
6617 # this bit needs to be modified for each OS that is suported by
6618 # smbwrapper. You need to specify how to created a shared library and
6619 # how to compile C code to produce PIC object files
6620
6621 # these are the defaults, good for lots of systems
6622 HOST_OS="$host_os"
6623 LDSHFLAGS="-shared"
6624
6625 # and these are for particular systems
6626 case "$host_os" in
6627                 *linux*)   cat >> confdefs.h <<\EOF
6628 #define LINUX 1
6629 EOF
6630 ;;
6631                 *solaris*) cat >> confdefs.h <<\EOF
6632 #define SUNOS5 1
6633 EOF
6634
6635                                         LDSHFLAGS="-G"
6636                 ;;
6637                 *sunos*) cat >> confdefs.h <<\EOF
6638 #define SUNOS4 1
6639 EOF
6640
6641                                         LDSHFLAGS=""
6642                 ;;
6643                 *bsd*) LDSHFLAGS="-shared -Bshareable"
6644                 ;;
6645                 *irix*) cat >> confdefs.h <<\EOF
6646 #define IRIX 1
6647 EOF
6648
6649                         ATTEMPT_WRAP32_BUILD=yes
6650                 ;;
6651                 *aix*) cat >> confdefs.h <<\EOF
6652 #define AIX 1
6653 EOF
6654 ;;
6655                 *hpux*) cat >> confdefs.h <<\EOF
6656 #define HPUX 1
6657 EOF
6658 ;;
6659                 *qnx*) cat >> confdefs.h <<\EOF
6660 #define QNX 1
6661 EOF
6662 ;;
6663                 *osf*) cat >> confdefs.h <<\EOF
6664 #define OSF1 1
6665 EOF
6666 ;;
6667                 *sco*) cat >> confdefs.h <<\EOF
6668 #define SCO 1
6669 EOF
6670 ;;
6671                 *next2*) cat >> confdefs.h <<\EOF
6672 #define NEXT2 1
6673 EOF
6674 ;;
6675                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
6676 set dummy groff; ac_word=$2
6677 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6678 echo "configure:6679: checking for $ac_word" >&5
6679 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
6680   echo $ac_n "(cached) $ac_c" 1>&6
6681 else
6682   if test -n "$ROFF"; then
6683   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
6684 else
6685   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6686   ac_dummy="$PATH"
6687   for ac_dir in $ac_dummy; do
6688     test -z "$ac_dir" && ac_dir=.
6689     if test -f $ac_dir/$ac_word; then
6690       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
6691       break
6692     fi
6693   done
6694   IFS="$ac_save_ifs"
6695 fi
6696 fi
6697 ROFF="$ac_cv_prog_ROFF"
6698 if test -n "$ROFF"; then
6699   echo "$ac_t""$ROFF" 1>&6
6700 else
6701   echo "$ac_t""no" 1>&6
6702 fi
6703 ;;
6704                 *sysv4.2*) echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6705 echo "configure:6706: checking for strcasecmp in -lresolv" >&5
6706 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6707 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6708   echo $ac_n "(cached) $ac_c" 1>&6
6709 else
6710   ac_save_LIBS="$LIBS"
6711 LIBS="-lresolv  $LIBS"
6712 cat > conftest.$ac_ext <<EOF
6713 #line 6714 "configure"
6714 #include "confdefs.h"
6715 /* Override any gcc2 internal prototype to avoid an error.  */
6716 /* We use char because int might match the return type of a gcc2
6717     builtin and then its argument prototype would still apply.  */
6718 char strcasecmp();
6719
6720 int main() {
6721 strcasecmp()
6722 ; return 0; }
6723 EOF
6724 if { (eval echo configure:6725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6725   rm -rf conftest*
6726   eval "ac_cv_lib_$ac_lib_var=yes"
6727 else
6728   echo "configure: failed program was:" >&5
6729   cat conftest.$ac_ext >&5
6730   rm -rf conftest*
6731   eval "ac_cv_lib_$ac_lib_var=no"
6732 fi
6733 rm -f conftest*
6734 LIBS="$ac_save_LIBS"
6735
6736 fi
6737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6738   echo "$ac_t""yes" 1>&6
6739     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6740     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6741   cat >> confdefs.h <<EOF
6742 #define $ac_tr_lib 1
6743 EOF
6744
6745   LIBS="-lresolv $LIBS"
6746
6747 else
6748   echo "$ac_t""no" 1>&6
6749 fi
6750 ;;
6751 esac
6752
6753 # try to work out how to produce pic code with this compiler
6754 PICFLAG=""
6755 echo $ac_n "checking whether ${CC-cc} accepts -fpic""... $ac_c" 1>&6
6756 echo "configure:6757: checking whether ${CC-cc} accepts -fpic" >&5
6757 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then
6758   echo $ac_n "(cached) $ac_c" 1>&6
6759 else
6760   echo 'void f(){}' > conftest.c
6761 if test -z "`${CC-cc} -fpic -c conftest.c 2>&1`"; then
6762   ac_cv_prog_cc_fpic=yes
6763 else
6764   ac_cv_prog_cc_fpic=no
6765 fi
6766 rm -f conftest*
6767
6768 fi
6769
6770 echo "$ac_t""$ac_cv_prog_cc_fpic" 1>&6
6771 if test $ac_cv_prog_cc_fpic = yes; then
6772    PICFLAG="-fpic";
6773 fi
6774 if test x$PICFLAG = x; then
6775   echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
6776 echo "configure:6777: checking whether ${CC-cc} accepts -Kpic" >&5
6777 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
6778   echo $ac_n "(cached) $ac_c" 1>&6
6779 else
6780   echo 'void f(){}' > conftest.c
6781 if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
6782   ac_cv_prog_cc_Kpic=yes
6783 else
6784   ac_cv_prog_cc_Kpic=no
6785 fi
6786 rm -f conftest*
6787
6788 fi
6789
6790 echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
6791   if test $ac_cv_prog_cc_Kpic = yes; then
6792     PICFLAG="-Kpic";
6793   fi 
6794 fi
6795 if test x$PICFLAG = x; then
6796   echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
6797 echo "configure:6798: checking whether ${CC-cc} accepts -KPIC" >&5
6798 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
6799   echo $ac_n "(cached) $ac_c" 1>&6
6800 else
6801   echo 'void f(){}' > conftest.c
6802 if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
6803   ac_cv_prog_cc_KPIC=yes
6804 else
6805   ac_cv_prog_cc_KPIC=no
6806 fi
6807 rm -f conftest*
6808
6809 fi
6810
6811 echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
6812   if test $ac_cv_prog_cc_KPIC = yes; then
6813     PICFLAG="-KPIC";
6814   fi 
6815 fi
6816
6817 ################
6818
6819 echo $ac_n "checking for long long""... $ac_c" 1>&6
6820 echo "configure:6821: checking for long long" >&5
6821 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
6822   echo $ac_n "(cached) $ac_c" 1>&6
6823 else
6824   
6825 if test "$cross_compiling" = yes; then
6826   samba_cv_have_longlong=cross
6827 else
6828   cat > conftest.$ac_ext <<EOF
6829 #line 6830 "configure"
6830 #include "confdefs.h"
6831 #include <stdio.h>
6832 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
6833 EOF
6834 if { (eval echo configure:6835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6835 then
6836   samba_cv_have_longlong=yes
6837 else
6838   echo "configure: failed program was:" >&5
6839   cat conftest.$ac_ext >&5
6840   rm -fr conftest*
6841   samba_cv_have_longlong=no
6842 fi
6843 rm -fr conftest*
6844 fi
6845
6846 fi
6847
6848 echo "$ac_t""$samba_cv_have_longlong" 1>&6
6849 if test x"$samba_cv_have_longlong" = x"yes"; then
6850     cat >> confdefs.h <<\EOF
6851 #define HAVE_LONGLONG 1
6852 EOF
6853
6854 fi
6855
6856 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
6857 echo "configure:6858: checking for 64 bit off_t" >&5
6858 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
6859   echo $ac_n "(cached) $ac_c" 1>&6
6860 else
6861   
6862 if test "$cross_compiling" = yes; then
6863   samba_cv_SIZEOF_OFF_T=cross
6864 else
6865   cat > conftest.$ac_ext <<EOF
6866 #line 6867 "configure"
6867 #include "confdefs.h"
6868 #include <stdio.h>
6869 #include <sys/stat.h>
6870 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
6871 EOF
6872 if { (eval echo configure:6873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6873 then
6874   samba_cv_SIZEOF_OFF_T=yes
6875 else
6876   echo "configure: failed program was:" >&5
6877   cat conftest.$ac_ext >&5
6878   rm -fr conftest*
6879   samba_cv_SIZEOF_OFF_T=no
6880 fi
6881 rm -fr conftest*
6882 fi
6883
6884 fi
6885
6886 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
6887 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
6888     cat >> confdefs.h <<\EOF
6889 #define SIZEOF_OFF_T 8
6890 EOF
6891
6892 fi
6893
6894 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
6895 echo "configure:6896: checking for off64_t" >&5
6896 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
6897   echo $ac_n "(cached) $ac_c" 1>&6
6898 else
6899   
6900 if test "$cross_compiling" = yes; then
6901   samba_cv_HAVE_OFF64_T=cross
6902 else
6903   cat > conftest.$ac_ext <<EOF
6904 #line 6905 "configure"
6905 #include "confdefs.h"
6906 #include <stdio.h>
6907 #include <sys/stat.h>
6908 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
6909 EOF
6910 if { (eval echo configure:6911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6911 then
6912   samba_cv_HAVE_OFF64_T=yes
6913 else
6914   echo "configure: failed program was:" >&5
6915   cat conftest.$ac_ext >&5
6916   rm -fr conftest*
6917   samba_cv_HAVE_OFF64_T=no
6918 fi
6919 rm -fr conftest*
6920 fi
6921
6922 fi
6923
6924 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
6925 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
6926     cat >> confdefs.h <<\EOF
6927 #define HAVE_OFF64_T 1
6928 EOF
6929
6930 fi
6931
6932 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
6933 echo "configure:6934: checking for 64 bit ino_t" >&5
6934 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
6935   echo $ac_n "(cached) $ac_c" 1>&6
6936 else
6937   
6938 if test "$cross_compiling" = yes; then
6939   samba_cv_SIZEOF_INO_T=cross
6940 else
6941   cat > conftest.$ac_ext <<EOF
6942 #line 6943 "configure"
6943 #include "confdefs.h"
6944 #include <stdio.h>
6945 #include <sys/stat.h>
6946 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
6947 EOF
6948 if { (eval echo configure:6949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6949 then
6950   samba_cv_SIZEOF_INO_T=yes
6951 else
6952   echo "configure: failed program was:" >&5
6953   cat conftest.$ac_ext >&5
6954   rm -fr conftest*
6955   samba_cv_SIZEOF_INO_T=no
6956 fi
6957 rm -fr conftest*
6958 fi
6959
6960 fi
6961
6962 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
6963 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
6964     cat >> confdefs.h <<\EOF
6965 #define SIZEOF_INO_T 8
6966 EOF
6967
6968 fi
6969
6970 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
6971 echo "configure:6972: checking for ino64_t" >&5
6972 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
6973   echo $ac_n "(cached) $ac_c" 1>&6
6974 else
6975   
6976 if test "$cross_compiling" = yes; then
6977   samba_cv_HAVE_INO64_T=cross
6978 else
6979   cat > conftest.$ac_ext <<EOF
6980 #line 6981 "configure"
6981 #include "confdefs.h"
6982 #include <stdio.h>
6983 #include <sys/stat.h>
6984 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
6985 EOF
6986 if { (eval echo configure:6987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6987 then
6988   samba_cv_HAVE_INO64_T=yes
6989 else
6990   echo "configure: failed program was:" >&5
6991   cat conftest.$ac_ext >&5
6992   rm -fr conftest*
6993   samba_cv_HAVE_INO64_T=no
6994 fi
6995 rm -fr conftest*
6996 fi
6997
6998 fi
6999
7000 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
7001 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
7002     cat >> confdefs.h <<\EOF
7003 #define HAVE_INO64_T 1
7004 EOF
7005
7006 fi
7007
7008 echo $ac_n "checking for union semun""... $ac_c" 1>&6
7009 echo "configure:7010: checking for union semun" >&5
7010 if eval "test \"`echo '$''{'samba_cv_HAVE_UNION_SEMUN'+set}'`\" = set"; then
7011   echo $ac_n "(cached) $ac_c" 1>&6
7012 else
7013   
7014 if test "$cross_compiling" = yes; then
7015   samba_cv_HAVE_UNION_SEMUN=cross
7016 else
7017   cat > conftest.$ac_ext <<EOF
7018 #line 7019 "configure"
7019 #include "confdefs.h"
7020
7021 #include <sys/types.h>
7022 #include <sys/ipc.h>
7023 #include <sys/sem.h>
7024 main() { union semun ss; exit(0); }
7025 EOF
7026 if { (eval echo configure:7027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7027 then
7028   samba_cv_HAVE_UNION_SEMUN=yes
7029 else
7030   echo "configure: failed program was:" >&5
7031   cat conftest.$ac_ext >&5
7032   rm -fr conftest*
7033   samba_cv_HAVE_UNION_SEMUN=no
7034 fi
7035 rm -fr conftest*
7036 fi
7037
7038 fi
7039
7040 echo "$ac_t""$samba_cv_HAVE_UNION_SEMUN" 1>&6
7041 if test x"$samba_cv_HAVE_UNION_SEMUN" = x"yes"; then
7042     cat >> confdefs.h <<\EOF
7043 #define HAVE_UNION_SEMUN 1
7044 EOF
7045
7046 fi
7047
7048 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
7049 echo "configure:7050: checking for unsigned char" >&5
7050 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
7051   echo $ac_n "(cached) $ac_c" 1>&6
7052 else
7053   
7054 if test "$cross_compiling" = yes; then
7055   samba_cv_HAVE_UNSIGNED_CHAR=cross
7056 else
7057   cat > conftest.$ac_ext <<EOF
7058 #line 7059 "configure"
7059 #include "confdefs.h"
7060 #include <stdio.h>
7061 main() { char c; c=250; exit((c > 0)?0:1); }
7062 EOF
7063 if { (eval echo configure:7064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7064 then
7065   samba_cv_HAVE_UNSIGNED_CHAR=yes
7066 else
7067   echo "configure: failed program was:" >&5
7068   cat conftest.$ac_ext >&5
7069   rm -fr conftest*
7070   samba_cv_HAVE_UNSIGNED_CHAR=no
7071 fi
7072 rm -fr conftest*
7073 fi
7074
7075 fi
7076
7077 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
7078 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
7079     cat >> confdefs.h <<\EOF
7080 #define HAVE_UNSIGNED_CHAR 1
7081 EOF
7082
7083 fi
7084
7085 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
7086 echo "configure:7087: checking for sin_len in sock" >&5
7087 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
7088   echo $ac_n "(cached) $ac_c" 1>&6
7089 else
7090   
7091 cat > conftest.$ac_ext <<EOF
7092 #line 7093 "configure"
7093 #include "confdefs.h"
7094 #include <sys/types.h>
7095 #include <sys/socket.h>
7096 #include <netinet/in.h>
7097 int main() {
7098 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
7099 ; return 0; }
7100 EOF
7101 if { (eval echo configure:7102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7102   rm -rf conftest*
7103   samba_cv_HAVE_SOCK_SIN_LEN=yes
7104 else
7105   echo "configure: failed program was:" >&5
7106   cat conftest.$ac_ext >&5
7107   rm -rf conftest*
7108   samba_cv_HAVE_SOCK_SIN_LEN=no
7109 fi
7110 rm -f conftest*
7111 fi
7112
7113 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
7114 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
7115     cat >> confdefs.h <<\EOF
7116 #define HAVE_SOCK_SIN_LEN 1
7117 EOF
7118
7119 fi
7120
7121 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
7122 echo "configure:7123: checking whether seekdir returns void" >&5
7123 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
7124   echo $ac_n "(cached) $ac_c" 1>&6
7125 else
7126   
7127 cat > conftest.$ac_ext <<EOF
7128 #line 7129 "configure"
7129 #include "confdefs.h"
7130 #include <sys/types.h>
7131 #include <dirent.h>
7132 void seekdir(DIR *d, long loc) { return; }
7133 int main() {
7134 return 0;
7135 ; return 0; }
7136 EOF
7137 if { (eval echo configure:7138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7138   rm -rf conftest*
7139   samba_cv_SEEKDIR_RETURNS_VOID=yes
7140 else
7141   echo "configure: failed program was:" >&5
7142   cat conftest.$ac_ext >&5
7143   rm -rf conftest*
7144   samba_cv_SEEKDIR_RETURNS_VOID=no
7145 fi
7146 rm -f conftest*
7147 fi
7148
7149 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
7150 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
7151     cat >> confdefs.h <<\EOF
7152 #define SEEKDIR_RETURNS_VOID 1
7153 EOF
7154
7155 fi
7156
7157 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
7158 echo "configure:7159: checking for __FILE__ macro" >&5
7159 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
7160   echo $ac_n "(cached) $ac_c" 1>&6
7161 else
7162   
7163 cat > conftest.$ac_ext <<EOF
7164 #line 7165 "configure"
7165 #include "confdefs.h"
7166 #include <stdio.h>
7167 int main() {
7168 printf("%s\n", __FILE__);
7169 ; return 0; }
7170 EOF
7171 if { (eval echo configure:7172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7172   rm -rf conftest*
7173   samba_cv_HAVE_FILE_MACRO=yes
7174 else
7175   echo "configure: failed program was:" >&5
7176   cat conftest.$ac_ext >&5
7177   rm -rf conftest*
7178   samba_cv_HAVE_FILE_MACRO=no
7179 fi
7180 rm -f conftest*
7181 fi
7182
7183 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
7184 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
7185     cat >> confdefs.h <<\EOF
7186 #define HAVE_FILE_MACRO 1
7187 EOF
7188
7189 fi
7190
7191 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
7192 echo "configure:7193: checking for __FUNCTION__ macro" >&5
7193 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
7194   echo $ac_n "(cached) $ac_c" 1>&6
7195 else
7196   
7197 cat > conftest.$ac_ext <<EOF
7198 #line 7199 "configure"
7199 #include "confdefs.h"
7200 #include <stdio.h>
7201 int main() {
7202 printf("%s\n", __FUNCTION__);
7203 ; return 0; }
7204 EOF
7205 if { (eval echo configure:7206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7206   rm -rf conftest*
7207   samba_cv_HAVE_FUNCTION_MACRO=yes
7208 else
7209   echo "configure: failed program was:" >&5
7210   cat conftest.$ac_ext >&5
7211   rm -rf conftest*
7212   samba_cv_HAVE_FUNCTION_MACRO=no
7213 fi
7214 rm -f conftest*
7215 fi
7216
7217 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
7218 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
7219     cat >> confdefs.h <<\EOF
7220 #define HAVE_FUNCTION_MACRO 1
7221 EOF
7222
7223 fi
7224
7225 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
7226 echo "configure:7227: checking if gettimeofday takes tz argument" >&5
7227 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
7228   echo $ac_n "(cached) $ac_c" 1>&6
7229 else
7230   
7231 if test "$cross_compiling" = yes; then
7232   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
7233 else
7234   cat > conftest.$ac_ext <<EOF
7235 #line 7236 "configure"
7236 #include "confdefs.h"
7237
7238 #include <sys/time.h>
7239 #include <unistd.h>
7240 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
7241 EOF
7242 if { (eval echo configure:7243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7243 then
7244   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
7245 else
7246   echo "configure: failed program was:" >&5
7247   cat conftest.$ac_ext >&5
7248   rm -fr conftest*
7249   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
7250 fi
7251 rm -fr conftest*
7252 fi
7253
7254 fi
7255
7256 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
7257 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
7258     cat >> confdefs.h <<\EOF
7259 #define HAVE_GETTIMEOFDAY_TZ 1
7260 EOF
7261
7262 fi
7263
7264
7265 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
7266 echo "configure:7267: checking for broken readdir" >&5
7267 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
7268   echo $ac_n "(cached) $ac_c" 1>&6
7269 else
7270   
7271 if test "$cross_compiling" = yes; then
7272   samba_cv_HAVE_BROKEN_READDIR=cross
7273 else
7274   cat > conftest.$ac_ext <<EOF
7275 #line 7276 "configure"
7276 #include "confdefs.h"
7277 #include <sys/types.h>
7278 #include <dirent.h>
7279 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
7280 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
7281 di->d_name[0] == 0) exit(0); exit(1);} 
7282 EOF
7283 if { (eval echo configure:7284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7284 then
7285   samba_cv_HAVE_BROKEN_READDIR=yes
7286 else
7287   echo "configure: failed program was:" >&5
7288   cat conftest.$ac_ext >&5
7289   rm -fr conftest*
7290   samba_cv_HAVE_BROKEN_READDIR=no
7291 fi
7292 rm -fr conftest*
7293 fi
7294
7295 fi
7296
7297 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
7298 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
7299     cat >> confdefs.h <<\EOF
7300 #define HAVE_BROKEN_READDIR 1
7301 EOF
7302
7303 fi
7304
7305 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
7306 echo "configure:7307: checking for utimbuf" >&5
7307 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
7308   echo $ac_n "(cached) $ac_c" 1>&6
7309 else
7310   
7311 cat > conftest.$ac_ext <<EOF
7312 #line 7313 "configure"
7313 #include "confdefs.h"
7314 #include <sys/types.h>
7315 #include <utime.h>
7316 int main() {
7317 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
7318 ; return 0; }
7319 EOF
7320 if { (eval echo configure:7321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7321   rm -rf conftest*
7322   samba_cv_HAVE_UTIMBUF=yes
7323 else
7324   echo "configure: failed program was:" >&5
7325   cat conftest.$ac_ext >&5
7326   rm -rf conftest*
7327   samba_cv_HAVE_UTIMBUF=no
7328 fi
7329 rm -f conftest*
7330 fi
7331
7332 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
7333 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
7334     cat >> confdefs.h <<\EOF
7335 #define HAVE_UTIMBUF 1
7336 EOF
7337
7338 fi
7339
7340 echo $ac_n "checking for kernel oplock type definitions""... $ac_c" 1>&6
7341 echo "configure:7342: checking for kernel oplock type definitions" >&5
7342 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS'+set}'`\" = set"; then
7343   echo $ac_n "(cached) $ac_c" 1>&6
7344 else
7345   
7346 cat > conftest.$ac_ext <<EOF
7347 #line 7348 "configure"
7348 #include "confdefs.h"
7349 #include <sys/types.h>
7350 #include <fcntl.h>
7351 int main() {
7352 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
7353 ; return 0; }
7354 EOF
7355 if { (eval echo configure:7356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7356   rm -rf conftest*
7357   samba_cv_HAVE_KERNEL_OPLOCKS=yes
7358 else
7359   echo "configure: failed program was:" >&5
7360   cat conftest.$ac_ext >&5
7361   rm -rf conftest*
7362   samba_cv_HAVE_KERNEL_OPLOCKS=no
7363 fi
7364 rm -f conftest*
7365 fi
7366
7367 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS" 1>&6
7368 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS" = x"yes"; then
7369     cat >> confdefs.h <<\EOF
7370 #define HAVE_KERNEL_OPLOCKS 1
7371 EOF
7372
7373 fi
7374
7375 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
7376 echo "configure:7377: checking for irix specific capabilities" >&5
7377 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
7378   echo $ac_n "(cached) $ac_c" 1>&6
7379 else
7380   
7381 if test "$cross_compiling" = yes; then
7382   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
7383 else
7384   cat > conftest.$ac_ext <<EOF
7385 #line 7386 "configure"
7386 #include "confdefs.h"
7387 #include <sys/types.h>
7388 #include <sys/capability.h>
7389 main() {
7390  cap_t cap;
7391  if ((cap = cap_get_proc()) == NULL)
7392    exit(1);
7393  cap->cap_effective |= CAP_NETWORK_MGT;
7394  cap->cap_inheritable |= CAP_NETWORK_MGT;
7395  cap_set_proc(cap);
7396  exit(0);
7397 }
7398
7399 EOF
7400 if { (eval echo configure:7401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7401 then
7402   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
7403 else
7404   echo "configure: failed program was:" >&5
7405   cat conftest.$ac_ext >&5
7406   rm -fr conftest*
7407   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
7408 fi
7409 rm -fr conftest*
7410 fi
7411
7412 fi
7413
7414 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
7415 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
7416     cat >> confdefs.h <<\EOF
7417 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
7418 EOF
7419
7420 fi
7421
7422 #
7423 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
7424 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
7425 #
7426
7427 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
7428 echo "configure:7429: checking for int16 typedef included by rpc/rpc.h" >&5
7429 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
7430   echo $ac_n "(cached) $ac_c" 1>&6
7431 else
7432   
7433 cat > conftest.$ac_ext <<EOF
7434 #line 7435 "configure"
7435 #include "confdefs.h"
7436 #include <sys/types.h>
7437 #if defined(HAVE_RPC_RPC_H)
7438 #include <rpc/rpc.h>
7439 #endif
7440 int main() {
7441 int16 testvar;
7442 ; return 0; }
7443 EOF
7444 if { (eval echo configure:7445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7445   rm -rf conftest*
7446   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
7447 else
7448   echo "configure: failed program was:" >&5
7449   cat conftest.$ac_ext >&5
7450   rm -rf conftest*
7451   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
7452 fi
7453 rm -f conftest*
7454 fi
7455
7456 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
7457 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
7458     cat >> confdefs.h <<\EOF
7459 #define HAVE_INT16_FROM_RPC_RPC_H 1
7460 EOF
7461
7462 fi
7463
7464 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
7465 echo "configure:7466: checking for uint16 typedef included by rpc/rpc.h" >&5
7466 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
7467   echo $ac_n "(cached) $ac_c" 1>&6
7468 else
7469   
7470 cat > conftest.$ac_ext <<EOF
7471 #line 7472 "configure"
7472 #include "confdefs.h"
7473 #include <sys/types.h>
7474 #if defined(HAVE_RPC_RPC_H)
7475 #include <rpc/rpc.h>
7476 #endif
7477 int main() {
7478 uint16 testvar;
7479 ; return 0; }
7480 EOF
7481 if { (eval echo configure:7482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7482   rm -rf conftest*
7483   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
7484 else
7485   echo "configure: failed program was:" >&5
7486   cat conftest.$ac_ext >&5
7487   rm -rf conftest*
7488   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
7489 fi
7490 rm -f conftest*
7491 fi
7492
7493 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
7494 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
7495     cat >> confdefs.h <<\EOF
7496 #define HAVE_UINT16_FROM_RPC_RPC_H 1
7497 EOF
7498
7499 fi
7500
7501 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
7502 echo "configure:7503: checking for int32 typedef included by rpc/rpc.h" >&5
7503 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
7504   echo $ac_n "(cached) $ac_c" 1>&6
7505 else
7506   
7507 cat > conftest.$ac_ext <<EOF
7508 #line 7509 "configure"
7509 #include "confdefs.h"
7510 #include <sys/types.h>
7511 #if defined(HAVE_RPC_RPC_H)
7512 #include <rpc/rpc.h>
7513 #endif
7514 int main() {
7515 int32 testvar;
7516 ; return 0; }
7517 EOF
7518 if { (eval echo configure:7519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7519   rm -rf conftest*
7520   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
7521 else
7522   echo "configure: failed program was:" >&5
7523   cat conftest.$ac_ext >&5
7524   rm -rf conftest*
7525   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
7526 fi
7527 rm -f conftest*
7528 fi
7529
7530 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
7531 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
7532     cat >> confdefs.h <<\EOF
7533 #define HAVE_INT32_FROM_RPC_RPC_H 1
7534 EOF
7535
7536 fi
7537
7538 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
7539 echo "configure:7540: checking for uint32 typedef included by rpc/rpc.h" >&5
7540 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
7541   echo $ac_n "(cached) $ac_c" 1>&6
7542 else
7543   
7544 cat > conftest.$ac_ext <<EOF
7545 #line 7546 "configure"
7546 #include "confdefs.h"
7547 #include <sys/types.h>
7548 #if defined(HAVE_RPC_RPC_H)
7549 #include <rpc/rpc.h>
7550 #endif
7551 int main() {
7552 uint32 testvar;
7553 ; return 0; }
7554 EOF
7555 if { (eval echo configure:7556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7556   rm -rf conftest*
7557   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
7558 else
7559   echo "configure: failed program was:" >&5
7560   cat conftest.$ac_ext >&5
7561   rm -rf conftest*
7562   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
7563 fi
7564 rm -f conftest*
7565 fi
7566
7567 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
7568 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
7569     cat >> confdefs.h <<\EOF
7570 #define HAVE_UINT32_FROM_RPC_RPC_H 1
7571 EOF
7572
7573 fi
7574
7575 echo $ac_n "checking for test routines""... $ac_c" 1>&6
7576 echo "configure:7577: checking for test routines" >&5
7577 if test "$cross_compiling" = yes; then
7578   echo "configure: warning: cannot run when cross-compiling" 1>&2
7579 else
7580   cat > conftest.$ac_ext <<EOF
7581 #line 7582 "configure"
7582 #include "confdefs.h"
7583 #include "${srcdir-.}/tests/trivial.c"
7584 EOF
7585 if { (eval echo configure:7586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7586 then
7587   echo "$ac_t""yes" 1>&6
7588 else
7589   echo "configure: failed program was:" >&5
7590   cat conftest.$ac_ext >&5
7591   rm -fr conftest*
7592   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
7593 fi
7594 rm -fr conftest*
7595 fi
7596
7597
7598 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
7599 echo "configure:7600: checking for ftruncate extend" >&5
7600 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
7601   echo $ac_n "(cached) $ac_c" 1>&6
7602 else
7603   
7604 if test "$cross_compiling" = yes; then
7605   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
7606 else
7607   cat > conftest.$ac_ext <<EOF
7608 #line 7609 "configure"
7609 #include "confdefs.h"
7610 #include "${srcdir-.}/tests/ftruncate.c"
7611 EOF
7612 if { (eval echo configure:7613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7613 then
7614   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
7615 else
7616   echo "configure: failed program was:" >&5
7617   cat conftest.$ac_ext >&5
7618   rm -fr conftest*
7619   samba_cv_HAVE_FTRUNCATE_EXTEND=no
7620 fi
7621 rm -fr conftest*
7622 fi
7623
7624 fi
7625
7626 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
7627 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
7628     cat >> confdefs.h <<\EOF
7629 #define HAVE_FTRUNCATE_EXTEND 1
7630 EOF
7631
7632 fi
7633
7634 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
7635 echo "configure:7636: checking for broken getgroups" >&5
7636 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
7637   echo $ac_n "(cached) $ac_c" 1>&6
7638 else
7639   
7640 if test "$cross_compiling" = yes; then
7641   samba_cv_HAVE_BROKEN_GETGROUPS=cross
7642 else
7643   cat > conftest.$ac_ext <<EOF
7644 #line 7645 "configure"
7645 #include "confdefs.h"
7646 #include "${srcdir-.}/tests/getgroups.c"
7647 EOF
7648 if { (eval echo configure:7649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7649 then
7650   samba_cv_HAVE_BROKEN_GETGROUPS=yes
7651 else
7652   echo "configure: failed program was:" >&5
7653   cat conftest.$ac_ext >&5
7654   rm -fr conftest*
7655   samba_cv_HAVE_BROKEN_GETGROUPS=no
7656 fi
7657 rm -fr conftest*
7658 fi
7659
7660 fi
7661
7662 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
7663 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
7664     cat >> confdefs.h <<\EOF
7665 #define HAVE_BROKEN_GETGROUPS 1
7666 EOF
7667
7668 fi
7669
7670 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
7671 echo "configure:7672: checking whether getpass should be replaced" >&5
7672 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
7673   echo $ac_n "(cached) $ac_c" 1>&6
7674 else
7675   
7676 SAVE_CPPFLAGS="$CPPFLAGS"
7677 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/include -I${srcdir-.}/ubiqx"
7678 cat > conftest.$ac_ext <<EOF
7679 #line 7680 "configure"
7680 #include "confdefs.h"
7681
7682 #define REPLACE_GETPASS 1
7683 #define NO_CONFIG_H 1
7684 #define main dont_declare_main
7685 #include "${srcdir-.}/lib/getsmbpass.c"
7686 #undef main
7687
7688 int main() {
7689
7690 ; return 0; }
7691 EOF
7692 if { (eval echo configure:7693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7693   rm -rf conftest*
7694   samba_cv_REPLACE_GETPASS=yes
7695 else
7696   echo "configure: failed program was:" >&5
7697   cat conftest.$ac_ext >&5
7698   rm -rf conftest*
7699   samba_cv_REPLACE_GETPASS=no
7700 fi
7701 rm -f conftest*
7702 CPPFLAGS="$SAVE_CPPFLAGS"
7703
7704 fi
7705
7706 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
7707 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
7708         cat >> confdefs.h <<\EOF
7709 #define REPLACE_GETPASS 1
7710 EOF
7711
7712 fi
7713
7714 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
7715 echo "configure:7716: checking for broken inet_ntoa" >&5
7716 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
7717   echo $ac_n "(cached) $ac_c" 1>&6
7718 else
7719   
7720 if test "$cross_compiling" = yes; then
7721   samba_cv_REPLACE_INET_NTOA=cross
7722 else
7723   cat > conftest.$ac_ext <<EOF
7724 #line 7725 "configure"
7725 #include "confdefs.h"
7726
7727 #include <stdio.h>
7728 #include <sys/types.h>
7729 #include <netinet/in.h>
7730 #include <arpa/inet.h>
7731 main() { struct in_addr ip; ip.s_addr = 0x12345678;
7732 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
7733     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
7734 exit(1);}
7735 EOF
7736 if { (eval echo configure:7737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7737 then
7738   samba_cv_REPLACE_INET_NTOA=yes
7739 else
7740   echo "configure: failed program was:" >&5
7741   cat conftest.$ac_ext >&5
7742   rm -fr conftest*
7743   samba_cv_REPLACE_INET_NTOA=no
7744 fi
7745 rm -fr conftest*
7746 fi
7747
7748 fi
7749
7750 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
7751 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
7752     cat >> confdefs.h <<\EOF
7753 #define REPLACE_INET_NTOA 1
7754 EOF
7755
7756 fi
7757
7758 echo $ac_n "checking for root""... $ac_c" 1>&6
7759 echo "configure:7760: checking for root" >&5
7760 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
7761   echo $ac_n "(cached) $ac_c" 1>&6
7762 else
7763   
7764 if test "$cross_compiling" = yes; then
7765   samba_cv_HAVE_ROOT=cross
7766 else
7767   cat > conftest.$ac_ext <<EOF
7768 #line 7769 "configure"
7769 #include "confdefs.h"
7770 main() { exit(getuid() != 0); }
7771 EOF
7772 if { (eval echo configure:7773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7773 then
7774   samba_cv_HAVE_ROOT=yes
7775 else
7776   echo "configure: failed program was:" >&5
7777   cat conftest.$ac_ext >&5
7778   rm -fr conftest*
7779   samba_cv_HAVE_ROOT=no
7780 fi
7781 rm -fr conftest*
7782 fi
7783
7784 fi
7785
7786 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
7787 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
7788     cat >> confdefs.h <<\EOF
7789 #define HAVE_ROOT 1
7790 EOF
7791
7792 else
7793     echo "configure: warning: running as non-root will disable some tests" 1>&2
7794 fi
7795
7796 netmask=no;
7797 echo $ac_n "checking for netmask ifconf""... $ac_c" 1>&6
7798 echo "configure:7799: checking for netmask ifconf" >&5
7799 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_IFCONF'+set}'`\" = set"; then
7800   echo $ac_n "(cached) $ac_c" 1>&6
7801 else
7802   
7803 if test "$cross_compiling" = yes; then
7804   samba_cv_HAVE_NETMASK_IFCONF=cross
7805 else
7806   cat > conftest.$ac_ext <<EOF
7807 #line 7808 "configure"
7808 #include "confdefs.h"
7809
7810 #define HAVE_NETMASK_IFCONF 1
7811 #define AUTOCONF 1
7812 #include "${srcdir-.}/lib/netmask.c"
7813 EOF
7814 if { (eval echo configure:7815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7815 then
7816   samba_cv_HAVE_NETMASK_IFCONF=yes
7817 else
7818   echo "configure: failed program was:" >&5
7819   cat conftest.$ac_ext >&5
7820   rm -fr conftest*
7821   samba_cv_HAVE_NETMASK_IFCONF=no
7822 fi
7823 rm -fr conftest*
7824 fi
7825
7826 fi
7827
7828 echo "$ac_t""$samba_cv_HAVE_NETMASK_IFCONF" 1>&6
7829 if test x"$samba_cv_HAVE_NETMASK_IFCONF" = x"yes"; then
7830     netmask=yes;cat >> confdefs.h <<\EOF
7831 #define HAVE_NETMASK_IFCONF 1
7832 EOF
7833
7834 fi
7835
7836 if test $netmask = no; then
7837 echo $ac_n "checking for netmask ifreq""... $ac_c" 1>&6
7838 echo "configure:7839: checking for netmask ifreq" >&5
7839 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_IFREQ'+set}'`\" = set"; then
7840   echo $ac_n "(cached) $ac_c" 1>&6
7841 else
7842   
7843 if test "$cross_compiling" = yes; then
7844   samba_cv_HAVE_NETMASK_IFREQ=cross
7845 else
7846   cat > conftest.$ac_ext <<EOF
7847 #line 7848 "configure"
7848 #include "confdefs.h"
7849
7850 #define HAVE_NETMASK_IFREQ 1
7851 #define AUTOCONF 1
7852 #include "${srcdir-.}/lib/netmask.c"
7853 EOF
7854 if { (eval echo configure:7855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7855 then
7856   samba_cv_HAVE_NETMASK_IFREQ=yes
7857 else
7858   echo "configure: failed program was:" >&5
7859   cat conftest.$ac_ext >&5
7860   rm -fr conftest*
7861   samba_cv_HAVE_NETMASK_IFREQ=no
7862 fi
7863 rm -fr conftest*
7864 fi
7865
7866 fi
7867
7868 echo "$ac_t""$samba_cv_HAVE_NETMASK_IFREQ" 1>&6
7869 if test x"$samba_cv_HAVE_NETMASK_IFREQ" = x"yes"; then
7870     netmask=yes;cat >> confdefs.h <<\EOF
7871 #define HAVE_NETMASK_IFREQ 1
7872 EOF
7873
7874 fi
7875 fi
7876
7877 if test $netmask = no; then
7878 echo $ac_n "checking for netmask AIX""... $ac_c" 1>&6
7879 echo "configure:7880: checking for netmask AIX" >&5
7880 if eval "test \"`echo '$''{'samba_cv_HAVE_NETMASK_AIX'+set}'`\" = set"; then
7881   echo $ac_n "(cached) $ac_c" 1>&6
7882 else
7883   
7884 if test "$cross_compiling" = yes; then
7885   samba_cv_HAVE_NETMASK_AIX=cross
7886 else
7887   cat > conftest.$ac_ext <<EOF
7888 #line 7889 "configure"
7889 #include "confdefs.h"
7890
7891 #define HAVE_NETMASK_AIX 1
7892 #define AUTOCONF 1
7893 #include "${srcdir-.}/lib/netmask.c"
7894 EOF
7895 if { (eval echo configure:7896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7896 then
7897   samba_cv_HAVE_NETMASK_AIX=yes
7898 else
7899   echo "configure: failed program was:" >&5
7900   cat conftest.$ac_ext >&5
7901   rm -fr conftest*
7902   samba_cv_HAVE_NETMASK_AIX=no
7903 fi
7904 rm -fr conftest*
7905 fi
7906
7907 fi
7908
7909 echo "$ac_t""$samba_cv_HAVE_NETMASK_AIX" 1>&6
7910 if test x"$samba_cv_HAVE_NETMASK_AIX" = x"yes"; then
7911     netmask=yes;cat >> confdefs.h <<\EOF
7912 #define HAVE_NETMASK_AIX 1
7913 EOF
7914
7915 fi
7916 fi
7917
7918 echo $ac_n "checking for trapdoor seteuid""... $ac_c" 1>&6
7919 echo "configure:7920: checking for trapdoor seteuid" >&5
7920 if eval "test \"`echo '$''{'samba_cv_HAVE_TRAPDOOR_UID'+set}'`\" = set"; then
7921   echo $ac_n "(cached) $ac_c" 1>&6
7922 else
7923   
7924 if test "$cross_compiling" = yes; then
7925   :
7926 else
7927   cat > conftest.$ac_ext <<EOF
7928 #line 7929 "configure"
7929 #include "confdefs.h"
7930 #include "${srcdir-.}/tests/trapdoor.c"
7931 EOF
7932 if { (eval echo configure:7933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7933 then
7934   samba_cv_HAVE_TRAPDOOR_UID=no
7935 else
7936   echo "configure: failed program was:" >&5
7937   cat conftest.$ac_ext >&5
7938   rm -fr conftest*
7939   samba_cv_HAVE_TRAPDOOR_UID=yes
7940 fi
7941 rm -fr conftest*
7942 fi
7943
7944 fi
7945
7946 echo "$ac_t""$samba_cv_HAVE_TRAPDOOR_UID" 1>&6
7947 if test x"$samba_cv_HAVE_TRAPDOOR_UID" = x"yes"; then
7948     cat >> confdefs.h <<\EOF
7949 #define HAVE_TRAPDOOR_UID 1
7950 EOF
7951
7952 fi
7953
7954 echo $ac_n "checking for shared mmap""... $ac_c" 1>&6
7955 echo "configure:7956: checking for shared mmap" >&5
7956 if eval "test \"`echo '$''{'samba_cv_HAVE_SHARED_MMAP'+set}'`\" = set"; then
7957   echo $ac_n "(cached) $ac_c" 1>&6
7958 else
7959   
7960 if test "$cross_compiling" = yes; then
7961   samba_cv_HAVE_SHARED_MMAP=cross
7962 else
7963   cat > conftest.$ac_ext <<EOF
7964 #line 7965 "configure"
7965 #include "confdefs.h"
7966 #include "${srcdir-.}/tests/shared_mmap.c"
7967 EOF
7968 if { (eval echo configure:7969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7969 then
7970   samba_cv_HAVE_SHARED_MMAP=yes
7971 else
7972   echo "configure: failed program was:" >&5
7973   cat conftest.$ac_ext >&5
7974   rm -fr conftest*
7975   samba_cv_HAVE_SHARED_MMAP=no
7976 fi
7977 rm -fr conftest*
7978 fi
7979
7980 fi
7981
7982 echo "$ac_t""$samba_cv_HAVE_SHARED_MMAP" 1>&6
7983 if test x"$samba_cv_HAVE_SHARED_MMAP" = x"yes"; then
7984     cat >> confdefs.h <<\EOF
7985 #define HAVE_SHARED_MMAP 1
7986 EOF
7987
7988 fi
7989
7990 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
7991 echo "configure:7992: checking for fcntl locking" >&5
7992 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
7993   echo $ac_n "(cached) $ac_c" 1>&6
7994 else
7995   
7996 if test "$cross_compiling" = yes; then
7997   samba_cv_HAVE_FCNTL_LOCK=cross
7998 else
7999   cat > conftest.$ac_ext <<EOF
8000 #line 8001 "configure"
8001 #include "confdefs.h"
8002 #include "${srcdir-.}/tests/fcntl_lock.c"
8003 EOF
8004 if { (eval echo configure:8005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8005 then
8006   samba_cv_HAVE_FCNTL_LOCK=yes
8007 else
8008   echo "configure: failed program was:" >&5
8009   cat conftest.$ac_ext >&5
8010   rm -fr conftest*
8011   samba_cv_HAVE_FCNTL_LOCK=no
8012 fi
8013 rm -fr conftest*
8014 fi
8015
8016 fi
8017
8018 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
8019 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
8020     cat >> confdefs.h <<\EOF
8021 #define HAVE_FCNTL_LOCK 1
8022 EOF
8023
8024 fi
8025
8026 echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
8027 echo "configure:8028: checking for 64 bit fcntl locking" >&5
8028 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
8029   echo $ac_n "(cached) $ac_c" 1>&6
8030 else
8031   
8032 if test "$cross_compiling" = yes; then
8033   samba_cv_HAVE_STRUCT_FLOCK64=cross
8034 else
8035   cat > conftest.$ac_ext <<EOF
8036 #line 8037 "configure"
8037 #include "confdefs.h"
8038
8039 #include <stdio.h>
8040 #include <stdlib.h>
8041
8042 #ifdef HAVE_FCNTL_H
8043 #include <fcntl.h>
8044 #endif
8045
8046 #ifdef HAVE_SYS_FCNTL_H
8047 #include <sys/fcntl.h>
8048 #endif
8049 main() { struct flock64 fl64;
8050 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
8051 exit(0);
8052 #else
8053 exit(1);
8054 #endif
8055 }
8056 EOF
8057 if { (eval echo configure:8058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8058 then
8059   samba_cv_HAVE_STRUCT_FLOCK64=yes
8060 else
8061   echo "configure: failed program was:" >&5
8062   cat conftest.$ac_ext >&5
8063   rm -fr conftest*
8064   samba_cv_HAVE_STRUCT_FLOCK64=no
8065 fi
8066 rm -fr conftest*
8067 fi
8068
8069 fi
8070
8071 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
8072 if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
8073     cat >> confdefs.h <<\EOF
8074 #define HAVE_STRUCT_FLOCK64 1
8075 EOF
8076
8077 fi
8078
8079 echo $ac_n "checking for sysv ipc""... $ac_c" 1>&6
8080 echo "configure:8081: checking for sysv ipc" >&5
8081 if eval "test \"`echo '$''{'samba_cv_HAVE_SYSV_IPC'+set}'`\" = set"; then
8082   echo $ac_n "(cached) $ac_c" 1>&6
8083 else
8084   
8085 if test "$cross_compiling" = yes; then
8086   samba_cv_HAVE_SYSV_IPC=cross
8087 else
8088   cat > conftest.$ac_ext <<EOF
8089 #line 8090 "configure"
8090 #include "confdefs.h"
8091 #include "${srcdir-.}/tests/sysv_ipc.c"
8092 EOF
8093 if { (eval echo configure:8094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8094 then
8095   samba_cv_HAVE_SYSV_IPC=yes
8096 else
8097   echo "configure: failed program was:" >&5
8098   cat conftest.$ac_ext >&5
8099   rm -fr conftest*
8100   samba_cv_HAVE_SYSV_IPC=no
8101 fi
8102 rm -fr conftest*
8103 fi
8104
8105 fi
8106
8107 echo "$ac_t""$samba_cv_HAVE_SYSV_IPC" 1>&6
8108 if test x"$samba_cv_HAVE_SYSV_IPC" = x"yes"; then
8109     cat >> confdefs.h <<\EOF
8110 #define HAVE_SYSV_IPC 1
8111 EOF
8112
8113 fi
8114
8115 #################################################
8116 # check for smbwrapper support
8117 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
8118 echo "configure:8119: checking whether to use smbwrapper" >&5
8119 # Check whether --with-smbwrapper or --without-smbwrapper was given.
8120 if test "${with_smbwrapper+set}" = set; then
8121   withval="$with_smbwrapper"
8122    case "$withval" in
8123   yes)
8124     echo "$ac_t""yes" 1>&6
8125     cat >> confdefs.h <<\EOF
8126 #define WITH_SMBWRAPPER 1
8127 EOF
8128
8129         WRAP="bin/smbsh bin/smbwrapper.so"
8130
8131         if test x$ATTEMPT_WRAP32_BUILD = x; then
8132                 WRAP32=""
8133         else
8134                         WRAP32=bin/smbwrapper.32.so
8135         fi
8136
8137 # Conditions under which smbwrapper should not be built.
8138
8139         if test x$PICFLAG = x; then
8140            echo No support for PIC code - disabling smbwrapper and smbsh
8141            WRAP=""
8142            WRAP32=""
8143         elif test x$ac_cv_func_syscall = xno; then
8144            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
8145            WRAP=""
8146            WRAP32=""
8147         fi
8148     ;;
8149   *)
8150     echo "$ac_t""no" 1>&6
8151     ;;
8152   esac 
8153 else
8154   echo "$ac_t""no" 1>&6
8155
8156 fi
8157
8158
8159 #################################################
8160 # check for the AFS filesystem
8161 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
8162 echo "configure:8163: checking whether to use AFS" >&5
8163 # Check whether --with-afs or --without-afs was given.
8164 if test "${with_afs+set}" = set; then
8165   withval="$with_afs"
8166    case "$withval" in
8167   yes)
8168     echo "$ac_t""yes" 1>&6
8169     cat >> confdefs.h <<\EOF
8170 #define WITH_AFS 1
8171 EOF
8172
8173     ;;
8174   *)
8175     echo "$ac_t""no" 1>&6
8176     ;;
8177   esac 
8178 else
8179   echo "$ac_t""no" 1>&6
8180
8181 fi
8182
8183
8184
8185 #################################################
8186 # check for the DFS auth system
8187 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
8188 echo "configure:8189: checking whether to use DFS auth" >&5
8189 # Check whether --with-dfs or --without-dfs was given.
8190 if test "${with_dfs+set}" = set; then
8191   withval="$with_dfs"
8192    case "$withval" in
8193   yes)
8194     echo "$ac_t""yes" 1>&6
8195     cat >> confdefs.h <<\EOF
8196 #define WITH_DFS 1
8197 EOF
8198
8199     ;;
8200   *)
8201     echo "$ac_t""no" 1>&6
8202     ;;
8203   esac 
8204 else
8205   echo "$ac_t""no" 1>&6
8206
8207 fi
8208
8209
8210 #################################################
8211 # check for Kerberos IV auth system
8212 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
8213 echo "configure:8214: checking whether to use Kerberos IV" >&5
8214 # Check whether --with-krb4 or --without-krb4 was given.
8215 if test "${with_krb4+set}" = set; then
8216   withval="$with_krb4"
8217      echo "$ac_t""yes" 1>&6
8218     cat >> confdefs.h <<\EOF
8219 #define KRB4_AUTH 1
8220 EOF
8221
8222     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
8223 echo "configure:8224: checking for dn_expand in -lresolv" >&5
8224 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
8225 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8226   echo $ac_n "(cached) $ac_c" 1>&6
8227 else
8228   ac_save_LIBS="$LIBS"
8229 LIBS="-lresolv  $LIBS"
8230 cat > conftest.$ac_ext <<EOF
8231 #line 8232 "configure"
8232 #include "confdefs.h"
8233 /* Override any gcc2 internal prototype to avoid an error.  */
8234 /* We use char because int might match the return type of a gcc2
8235     builtin and then its argument prototype would still apply.  */
8236 char dn_expand();
8237
8238 int main() {
8239 dn_expand()
8240 ; return 0; }
8241 EOF
8242 if { (eval echo configure:8243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8243   rm -rf conftest*
8244   eval "ac_cv_lib_$ac_lib_var=yes"
8245 else
8246   echo "configure: failed program was:" >&5
8247   cat conftest.$ac_ext >&5
8248   rm -rf conftest*
8249   eval "ac_cv_lib_$ac_lib_var=no"
8250 fi
8251 rm -f conftest*
8252 LIBS="$ac_save_LIBS"
8253
8254 fi
8255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8256   echo "$ac_t""yes" 1>&6
8257     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8258     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8259   cat >> confdefs.h <<EOF
8260 #define $ac_tr_lib 1
8261 EOF
8262
8263   LIBS="-lresolv $LIBS"
8264
8265 else
8266   echo "$ac_t""no" 1>&6
8267 fi
8268
8269     LIBS="$LIBS -lkrb -ldes"
8270     CFLAGS="$CFLAGS -I$withval/include"
8271     LDFLAGS="$LDFLAGS -L$withval/lib"
8272 else
8273   echo "$ac_t""no" 1>&6
8274
8275 fi
8276
8277
8278 #################################################
8279 # check for automount support
8280 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
8281 echo "configure:8282: checking whether to use AUTOMOUNT" >&5
8282 # Check whether --with-automount or --without-automount was given.
8283 if test "${with_automount+set}" = set; then
8284   withval="$with_automount"
8285    case "$withval" in
8286   yes)
8287     echo "$ac_t""yes" 1>&6
8288     cat >> confdefs.h <<\EOF
8289 #define WITH_AUTOMOUNT 1
8290 EOF
8291
8292     ;;
8293   *)
8294     echo "$ac_t""no" 1>&6
8295     ;;
8296   esac 
8297 else
8298   echo "$ac_t""no" 1>&6
8299
8300 fi
8301
8302
8303 #################################################
8304 # check for smbmount support
8305 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
8306 echo "configure:8307: checking whether to use SMBMOUNT" >&5
8307 # Check whether --with-smbmount or --without-smbmount was given.
8308 if test "${with_smbmount+set}" = set; then
8309   withval="$with_smbmount"
8310    case "$withval" in
8311   yes)
8312     echo "$ac_t""yes" 1>&6
8313     cat >> confdefs.h <<\EOF
8314 #define WITH_SMBMOUNT 1
8315 EOF
8316
8317     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
8318     ;;
8319   *)
8320     echo "$ac_t""no" 1>&6
8321     MPROGS=
8322     ;;
8323   esac 
8324 else
8325   echo "$ac_t""no" 1>&6
8326   MPROGS=
8327
8328 fi
8329
8330
8331 #################################################
8332 # check for a LDAP password database
8333 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
8334 echo "configure:8335: checking whether to use LDAP password database" >&5
8335 # Check whether --with-ldap or --without-ldap was given.
8336 if test "${with_ldap+set}" = set; then
8337   withval="$with_ldap"
8338    case "$withval" in
8339   yes)
8340     echo "$ac_t""yes" 1>&6
8341     cat >> confdefs.h <<\EOF
8342 #define WITH_LDAP 1
8343 EOF
8344
8345     LIBS="$LIBS -lldap -llber"
8346     ;;
8347   *)
8348     echo "$ac_t""no" 1>&6
8349     ;;
8350   esac 
8351 else
8352   echo "$ac_t""no" 1>&6
8353
8354 fi
8355
8356
8357 #################################################
8358 # check for a NISPLUS password database
8359 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
8360 echo "configure:8361: checking whether to use NISPLUS password database" >&5
8361 # Check whether --with-nisplus or --without-nisplus was given.
8362 if test "${with_nisplus+set}" = set; then
8363   withval="$with_nisplus"
8364    case "$withval" in
8365   yes)
8366     echo "$ac_t""yes" 1>&6
8367     cat >> confdefs.h <<\EOF
8368 #define WITH_NISPLUS 1
8369 EOF
8370
8371     ;;
8372   *)
8373     echo "$ac_t""no" 1>&6
8374     ;;
8375   esac 
8376 else
8377   echo "$ac_t""no" 1>&6
8378
8379 fi
8380
8381
8382 #################################################
8383 # check for a NISPLUS_HOME support 
8384 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
8385 echo "configure:8386: checking whether to use NISPLUS_HOME" >&5
8386 # Check whether --with-nisplus-home or --without-nisplus-home was given.
8387 if test "${with_nisplus_home+set}" = set; then
8388   withval="$with_nisplus_home"
8389    case "$withval" in
8390   yes)
8391     echo "$ac_t""yes" 1>&6
8392     cat >> confdefs.h <<\EOF
8393 #define WITH_NISPLUS_HOME 1
8394 EOF
8395
8396     ;;
8397   *)
8398     echo "$ac_t""no" 1>&6
8399     ;;
8400   esac 
8401 else
8402   echo "$ac_t""no" 1>&6
8403
8404 fi
8405
8406
8407 #################################################
8408 # check for the secure socket layer
8409 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
8410 echo "configure:8411: checking whether to use SSL" >&5
8411 # Check whether --with-ssl or --without-ssl was given.
8412 if test "${with_ssl+set}" = set; then
8413   withval="$with_ssl"
8414    case "$withval" in
8415   yes)
8416     echo "$ac_t""yes" 1>&6
8417     cat >> confdefs.h <<\EOF
8418 #define WITH_SSL 1
8419 EOF
8420
8421     ;;
8422   *)
8423     echo "$ac_t""no" 1>&6
8424     ;;
8425   esac 
8426 else
8427   echo "$ac_t""no" 1>&6
8428
8429 fi
8430
8431
8432 #################################################
8433 # check for experimental mmap support
8434 echo $ac_n "checking whether to use MMAP""... $ac_c" 1>&6
8435 echo "configure:8436: checking whether to use MMAP" >&5
8436 # Check whether --with-mmap or --without-mmap was given.
8437 if test "${with_mmap+set}" = set; then
8438   withval="$with_mmap"
8439    case "$withval" in
8440   yes)
8441     echo "$ac_t""yes" 1>&6
8442     cat >> confdefs.h <<\EOF
8443 #define WITH_MMAP 1
8444 EOF
8445
8446     ;;
8447   *)
8448     echo "$ac_t""no" 1>&6
8449     ;;
8450   esac 
8451 else
8452   echo "$ac_t""no" 1>&6
8453
8454 fi
8455
8456
8457 #################################################
8458 # check for syslog logging
8459 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
8460 echo "configure:8461: checking whether to use syslog logging" >&5
8461 # Check whether --with-syslog or --without-syslog was given.
8462 if test "${with_syslog+set}" = set; then
8463   withval="$with_syslog"
8464    case "$withval" in
8465   yes)
8466     echo "$ac_t""yes" 1>&6
8467     cat >> confdefs.h <<\EOF
8468 #define WITH_SYSLOG 1
8469 EOF
8470
8471     ;;
8472   *)
8473     echo "$ac_t""no" 1>&6
8474     ;;
8475   esac 
8476 else
8477   echo "$ac_t""no" 1>&6
8478
8479 fi
8480
8481
8482 #################################################
8483 # check for a shared memory profiling support
8484 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
8485 echo "configure:8486: checking whether to use profiling" >&5
8486 # Check whether --with-profile or --without-profile was given.
8487 if test "${with_profile+set}" = set; then
8488   withval="$with_profile"
8489    case "$withval" in
8490   yes)
8491     echo "$ac_t""yes" 1>&6
8492     cat >> confdefs.h <<\EOF
8493 #define WITH_PROFILE 1
8494 EOF
8495
8496     ;;
8497   *)
8498     echo "$ac_t""no" 1>&6
8499     ;;
8500   esac 
8501 else
8502   echo "$ac_t""no" 1>&6
8503
8504 fi
8505
8506
8507
8508 #################################################
8509 # check for experimental netatalk resource fork support
8510 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
8511 echo "configure:8512: checking whether to support netatalk" >&5
8512 # Check whether --with-netatalk or --without-netatalk was given.
8513 if test "${with_netatalk+set}" = set; then
8514   withval="$with_netatalk"
8515    case "$withval" in
8516   yes)
8517     echo "$ac_t""yes" 1>&6
8518     cat >> confdefs.h <<\EOF
8519 #define WITH_NETATALK 1
8520 EOF
8521
8522     ;;
8523   *)
8524     echo "$ac_t""no" 1>&6
8525     ;;
8526   esac 
8527 else
8528   echo "$ac_t""no" 1>&6
8529
8530 fi
8531
8532
8533 #################################################
8534 # check for experimental disk-quotas support
8535 QUOTAOBJS=noquotas.o
8536
8537 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
8538 echo "configure:8539: checking whether to support disk-quotas" >&5
8539 # Check whether --with-quotas or --without-quotas was given.
8540 if test "${with_quotas+set}" = set; then
8541   withval="$with_quotas"
8542    case "$withval" in
8543   yes)
8544     echo "$ac_t""yes" 1>&6
8545     QUOTAOBJS=quotas.o
8546     ;;
8547   *)
8548     echo "$ac_t""no" 1>&6
8549     ;;
8550   esac 
8551 else
8552   echo "$ac_t""no" 1>&6
8553
8554 fi
8555
8556
8557
8558 #################################################
8559 # these tests are taken from the GNU fileutils package
8560 echo "checking how to get filesystem space usage" 1>&6
8561 echo "configure:8562: checking how to get filesystem space usage" >&5
8562 space=no
8563
8564 # Test for statvfs64.
8565 if test $space = no; then
8566   # SVR4
8567   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
8568 echo "configure:8569: checking statvfs64 function (SVR4)" >&5
8569 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
8570   echo $ac_n "(cached) $ac_c" 1>&6
8571 else
8572   if test "$cross_compiling" = yes; then
8573   fu_cv_sys_stat_statvfs64=cross
8574 else
8575   cat > conftest.$ac_ext <<EOF
8576 #line 8577 "configure"
8577 #include "confdefs.h"
8578
8579 #include <sys/types.h>
8580 #include <sys/statvfs.h>
8581   main ()
8582   {
8583     struct statvfs64 fsd;
8584     exit (statfs64 (".", &fsd));
8585   }
8586 EOF
8587 if { (eval echo configure:8588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8588 then
8589   fu_cv_sys_stat_statvfs64=yes
8590 else
8591   echo "configure: failed program was:" >&5
8592   cat conftest.$ac_ext >&5
8593   rm -fr conftest*
8594   fu_cv_sys_stat_statvfs64=no
8595 fi
8596 rm -fr conftest*
8597 fi
8598
8599 fi
8600
8601 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
8602   if test $fu_cv_sys_stat_statvfs64 = yes; then
8603     space=yes
8604     cat >> confdefs.h <<\EOF
8605 #define STAT_STATVFS64 1
8606 EOF
8607
8608   fi
8609 fi
8610
8611 # Perform only the link test since it seems there are no variants of the
8612 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
8613 # because that got a false positive on SCO OSR5.  Adding the declaration
8614 # of a `struct statvfs' causes this test to fail (as it should) on such
8615 # systems.  That system is reported to work fine with STAT_STATFS4 which
8616 # is what it gets when this test fails.
8617 if test $space = no; then
8618   # SVR4
8619   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
8620 echo "configure:8621: checking statvfs function (SVR4)" >&5
8621 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
8622   echo $ac_n "(cached) $ac_c" 1>&6
8623 else
8624   cat > conftest.$ac_ext <<EOF
8625 #line 8626 "configure"
8626 #include "confdefs.h"
8627 #include <sys/types.h>
8628 #include <sys/statvfs.h>
8629 int main() {
8630 struct statvfs fsd; statvfs (0, &fsd);
8631 ; return 0; }
8632 EOF
8633 if { (eval echo configure:8634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8634   rm -rf conftest*
8635   fu_cv_sys_stat_statvfs=yes
8636 else
8637   echo "configure: failed program was:" >&5
8638   cat conftest.$ac_ext >&5
8639   rm -rf conftest*
8640   fu_cv_sys_stat_statvfs=no
8641 fi
8642 rm -f conftest*
8643 fi
8644
8645 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
8646   if test $fu_cv_sys_stat_statvfs = yes; then
8647     space=yes
8648     cat >> confdefs.h <<\EOF
8649 #define STAT_STATVFS 1
8650 EOF
8651
8652   fi
8653 fi
8654
8655 if test $space = no; then
8656   # DEC Alpha running OSF/1
8657   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
8658 echo "configure:8659: checking for 3-argument statfs function (DEC OSF/1)" >&5
8659   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
8660   echo $ac_n "(cached) $ac_c" 1>&6
8661 else
8662   if test "$cross_compiling" = yes; then
8663   fu_cv_sys_stat_statfs3_osf1=no
8664 else
8665   cat > conftest.$ac_ext <<EOF
8666 #line 8667 "configure"
8667 #include "confdefs.h"
8668
8669 #include <sys/param.h>
8670 #include <sys/types.h>
8671 #include <sys/mount.h>
8672   main ()
8673   {
8674     struct statfs fsd;
8675     fsd.f_fsize = 0;
8676     exit (statfs (".", &fsd, sizeof (struct statfs)));
8677   }
8678 EOF
8679 if { (eval echo configure:8680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8680 then
8681   fu_cv_sys_stat_statfs3_osf1=yes
8682 else
8683   echo "configure: failed program was:" >&5
8684   cat conftest.$ac_ext >&5
8685   rm -fr conftest*
8686   fu_cv_sys_stat_statfs3_osf1=no
8687 fi
8688 rm -fr conftest*
8689 fi
8690
8691 fi
8692
8693   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
8694   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
8695     space=yes
8696     cat >> confdefs.h <<\EOF
8697 #define STAT_STATFS3_OSF1 1
8698 EOF
8699
8700   fi
8701 fi
8702
8703 if test $space = no; then
8704 # AIX
8705   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
8706 echo "configure:8707: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
8707   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
8708   echo $ac_n "(cached) $ac_c" 1>&6
8709 else
8710   if test "$cross_compiling" = yes; then
8711   fu_cv_sys_stat_statfs2_bsize=no
8712 else
8713   cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716
8717 #ifdef HAVE_SYS_PARAM_H
8718 #include <sys/param.h>
8719 #endif
8720 #ifdef HAVE_SYS_MOUNT_H
8721 #include <sys/mount.h>
8722 #endif
8723 #ifdef HAVE_SYS_VFS_H
8724 #include <sys/vfs.h>
8725 #endif
8726   main ()
8727   {
8728   struct statfs fsd;
8729   fsd.f_bsize = 0;
8730   exit (statfs (".", &fsd));
8731   }
8732 EOF
8733 if { (eval echo configure:8734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8734 then
8735   fu_cv_sys_stat_statfs2_bsize=yes
8736 else
8737   echo "configure: failed program was:" >&5
8738   cat conftest.$ac_ext >&5
8739   rm -fr conftest*
8740   fu_cv_sys_stat_statfs2_bsize=no
8741 fi
8742 rm -fr conftest*
8743 fi
8744
8745 fi
8746
8747   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
8748   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
8749     space=yes
8750     cat >> confdefs.h <<\EOF
8751 #define STAT_STATFS2_BSIZE 1
8752 EOF
8753
8754   fi
8755 fi
8756
8757 if test $space = no; then
8758 # SVR3
8759   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
8760 echo "configure:8761: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
8761   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
8762   echo $ac_n "(cached) $ac_c" 1>&6
8763 else
8764   if test "$cross_compiling" = yes; then
8765   fu_cv_sys_stat_statfs4=no
8766 else
8767   cat > conftest.$ac_ext <<EOF
8768 #line 8769 "configure"
8769 #include "confdefs.h"
8770 #include <sys/types.h>
8771 #include <sys/statfs.h>
8772   main ()
8773   {
8774   struct statfs fsd;
8775   exit (statfs (".", &fsd, sizeof fsd, 0));
8776   }
8777 EOF
8778 if { (eval echo configure:8779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8779 then
8780   fu_cv_sys_stat_statfs4=yes
8781 else
8782   echo "configure: failed program was:" >&5
8783   cat conftest.$ac_ext >&5
8784   rm -fr conftest*
8785   fu_cv_sys_stat_statfs4=no
8786 fi
8787 rm -fr conftest*
8788 fi
8789
8790 fi
8791
8792   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
8793   if test $fu_cv_sys_stat_statfs4 = yes; then
8794     space=yes
8795     cat >> confdefs.h <<\EOF
8796 #define STAT_STATFS4 1
8797 EOF
8798
8799   fi
8800 fi
8801
8802 if test $space = no; then
8803 # 4.4BSD and NetBSD
8804   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
8805 echo "configure:8806: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
8806   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
8807   echo $ac_n "(cached) $ac_c" 1>&6
8808 else
8809   if test "$cross_compiling" = yes; then
8810   fu_cv_sys_stat_statfs2_fsize=no
8811 else
8812   cat > conftest.$ac_ext <<EOF
8813 #line 8814 "configure"
8814 #include "confdefs.h"
8815 #include <sys/types.h>
8816 #ifdef HAVE_SYS_PARAM_H
8817 #include <sys/param.h>
8818 #endif
8819 #ifdef HAVE_SYS_MOUNT_H
8820 #include <sys/mount.h>
8821 #endif
8822   main ()
8823   {
8824   struct statfs fsd;
8825   fsd.f_fsize = 0;
8826   exit (statfs (".", &fsd));
8827   }
8828 EOF
8829 if { (eval echo configure:8830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8830 then
8831   fu_cv_sys_stat_statfs2_fsize=yes
8832 else
8833   echo "configure: failed program was:" >&5
8834   cat conftest.$ac_ext >&5
8835   rm -fr conftest*
8836   fu_cv_sys_stat_statfs2_fsize=no
8837 fi
8838 rm -fr conftest*
8839 fi
8840
8841 fi
8842
8843   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
8844   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
8845     space=yes
8846     cat >> confdefs.h <<\EOF
8847 #define STAT_STATFS2_FSIZE 1
8848 EOF
8849
8850   fi
8851 fi
8852
8853 if test $space = no; then
8854   # Ultrix
8855   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
8856 echo "configure:8857: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
8857   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
8858   echo $ac_n "(cached) $ac_c" 1>&6
8859 else
8860   if test "$cross_compiling" = yes; then
8861   fu_cv_sys_stat_fs_data=no
8862 else
8863   cat > conftest.$ac_ext <<EOF
8864 #line 8865 "configure"
8865 #include "confdefs.h"
8866 #include <sys/types.h>
8867 #ifdef HAVE_SYS_PARAM_H
8868 #include <sys/param.h>
8869 #endif
8870 #ifdef HAVE_SYS_MOUNT_H
8871 #include <sys/mount.h>
8872 #endif
8873 #ifdef HAVE_SYS_FS_TYPES_H
8874 #include <sys/fs_types.h>
8875 #endif
8876   main ()
8877   {
8878   struct fs_data fsd;
8879   /* Ultrix's statfs returns 1 for success,
8880      0 for not mounted, -1 for failure.  */
8881   exit (statfs (".", &fsd) != 1);
8882   }
8883 EOF
8884 if { (eval echo configure:8885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8885 then
8886   fu_cv_sys_stat_fs_data=yes
8887 else
8888   echo "configure: failed program was:" >&5
8889   cat conftest.$ac_ext >&5
8890   rm -fr conftest*
8891   fu_cv_sys_stat_fs_data=no
8892 fi
8893 rm -fr conftest*
8894 fi
8895
8896 fi
8897
8898   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
8899   if test $fu_cv_sys_stat_fs_data = yes; then
8900     space=yes
8901     cat >> confdefs.h <<\EOF
8902 #define STAT_STATFS2_FS_DATA 1
8903 EOF
8904
8905   fi
8906 fi
8907
8908 echo "checking configure summary"
8909 if test "$cross_compiling" = yes; then
8910   :
8911 else
8912   cat > conftest.$ac_ext <<EOF
8913 #line 8914 "configure"
8914 #include "confdefs.h"
8915 #include "${srcdir-.}/tests/summary.c"
8916 EOF
8917 if { (eval echo configure:8918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8918 then
8919   echo "configure OK";
8920 else
8921   echo "configure: failed program was:" >&5
8922   cat conftest.$ac_ext >&5
8923   rm -fr conftest*
8924   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
8925 fi
8926 rm -fr conftest*
8927 fi
8928
8929
8930 builddir=`pwd`
8931
8932
8933 trap '' 1 2 15
8934 cat > confcache <<\EOF
8935 # This file is a shell script that caches the results of configure
8936 # tests run on this system so they can be shared between configure
8937 # scripts and configure runs.  It is not useful on other systems.
8938 # If it contains results you don't want to keep, you may remove or edit it.
8939 #
8940 # By default, configure uses ./config.cache as the cache file,
8941 # creating it if it does not exist already.  You can give configure
8942 # the --cache-file=FILE option to use a different cache file; that is
8943 # what configure does when it calls configure scripts in
8944 # subdirectories, so they share the cache.
8945 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8946 # config.status only pays attention to the cache file if you give it the
8947 # --recheck option to rerun configure.
8948 #
8949 EOF
8950 # The following way of writing the cache mishandles newlines in values,
8951 # but we know of no workaround that is simple, portable, and efficient.
8952 # So, don't put newlines in cache variables' values.
8953 # Ultrix sh set writes to stderr and can't be redirected directly,
8954 # and sets the high bit in the cache file unless we assign to the vars.
8955 (set) 2>&1 |
8956   case `(ac_space=' '; set | grep ac_space) 2>&1` in
8957   *ac_space=\ *)
8958     # `set' does not quote correctly, so add quotes (double-quote substitution
8959     # turns \\\\ into \\, and sed turns \\ into \).
8960     sed -n \
8961       -e "s/'/'\\\\''/g" \
8962       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8963     ;;
8964   *)
8965     # `set' quotes correctly as required by POSIX, so do not add quotes.
8966     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8967     ;;
8968   esac >> confcache
8969 if cmp -s $cache_file confcache; then
8970   :
8971 else
8972   if test -w $cache_file; then
8973     echo "updating cache $cache_file"
8974     cat confcache > $cache_file
8975   else
8976     echo "not updating unwritable cache $cache_file"
8977   fi
8978 fi
8979 rm -f confcache
8980
8981 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8982
8983 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8984 # Let make expand exec_prefix.
8985 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8986
8987 # Any assignment to VPATH causes Sun make to only execute
8988 # the first set of double-colon rules, so remove it if not needed.
8989 # If there is a colon in the path, we need to keep it.
8990 if test "x$srcdir" = x.; then
8991   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
8992 fi
8993
8994 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8995
8996 DEFS=-DHAVE_CONFIG_H
8997
8998 # Without the "./", some shells look in PATH for config.status.
8999 : ${CONFIG_STATUS=./config.status}
9000
9001 echo creating $CONFIG_STATUS
9002 rm -f $CONFIG_STATUS
9003 cat > $CONFIG_STATUS <<EOF
9004 #! /bin/sh
9005 # Generated automatically by configure.
9006 # Run this file to recreate the current configuration.
9007 # This directory was configured as follows,
9008 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9009 #
9010 # $0 $ac_configure_args
9011 #
9012 # Compiler output produced by configure, useful for debugging
9013 # configure, is in ./config.log if it exists.
9014
9015 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9016 for ac_option
9017 do
9018   case "\$ac_option" in
9019   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9020     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9021     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9022   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9023     echo "$CONFIG_STATUS generated by autoconf version 2.14.1"
9024     exit 0 ;;
9025   -help | --help | --hel | --he | --h)
9026     echo "\$ac_cs_usage"; exit 0 ;;
9027   *) echo "\$ac_cs_usage"; exit 1 ;;
9028   esac
9029 done
9030
9031 ac_given_srcdir=$srcdir
9032 ac_given_INSTALL="$INSTALL"
9033
9034 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9035 EOF
9036 cat >> $CONFIG_STATUS <<EOF
9037
9038 # Protect against being on the right side of a sed subst in config.status.
9039 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9040  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9041 $ac_vpsub
9042 $extrasub
9043 s%@SHELL@%$SHELL%g
9044 s%@CFLAGS@%$CFLAGS%g
9045 s%@CPPFLAGS@%$CPPFLAGS%g
9046 s%@CXXFLAGS@%$CXXFLAGS%g
9047 s%@FFLAGS@%$FFLAGS%g
9048 s%@DEFS@%$DEFS%g
9049 s%@LDFLAGS@%$LDFLAGS%g
9050 s%@LIBS@%$LIBS%g
9051 s%@exec_prefix@%$exec_prefix%g
9052 s%@prefix@%$prefix%g
9053 s%@program_transform_name@%$program_transform_name%g
9054 s%@bindir@%$bindir%g
9055 s%@sbindir@%$sbindir%g
9056 s%@libexecdir@%$libexecdir%g
9057 s%@datadir@%$datadir%g
9058 s%@sysconfdir@%$sysconfdir%g
9059 s%@sharedstatedir@%$sharedstatedir%g
9060 s%@localstatedir@%$localstatedir%g
9061 s%@libdir@%$libdir%g
9062 s%@includedir@%$includedir%g
9063 s%@oldincludedir@%$oldincludedir%g
9064 s%@infodir@%$infodir%g
9065 s%@mandir@%$mandir%g
9066 s%@MPROGS@%$MPROGS%g
9067 s%@LDSHFLAGS@%$LDSHFLAGS%g
9068 s%@HOST_OS@%$HOST_OS%g
9069 s%@WRAP@%$WRAP%g
9070 s%@WRAP32@%$WRAP32%g
9071 s%@PICFLAG@%$PICFLAG%g
9072 s%@CC@%$CC%g
9073 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9074 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9075 s%@INSTALL_DATA@%$INSTALL_DATA%g
9076 s%@AWK@%$AWK%g
9077 s%@host@%$host%g
9078 s%@host_alias@%$host_alias%g
9079 s%@host_cpu@%$host_cpu%g
9080 s%@host_vendor@%$host_vendor%g
9081 s%@host_os@%$host_os%g
9082 s%@target@%$target%g
9083 s%@target_alias@%$target_alias%g
9084 s%@target_cpu@%$target_cpu%g
9085 s%@target_vendor@%$target_vendor%g
9086 s%@target_os@%$target_os%g
9087 s%@build@%$build%g
9088 s%@build_alias@%$build_alias%g
9089 s%@build_cpu@%$build_cpu%g
9090 s%@build_vendor@%$build_vendor%g
9091 s%@build_os@%$build_os%g
9092 s%@MAINT@%$MAINT%g
9093 s%@AUTOCONF@%$AUTOCONF%g
9094 s%@AUTOHEADER@%$AUTOHEADER%g
9095 s%@CPP@%$CPP%g
9096 s%@LIBOBJS@%$LIBOBJS%g
9097 s%@ROFF@%$ROFF%g
9098 s%@QUOTAOBJS@%$QUOTAOBJS%g
9099 s%@builddir@%$builddir%g
9100
9101 CEOF
9102 EOF
9103
9104 cat >> $CONFIG_STATUS <<\EOF
9105
9106 # Split the substitutions into bite-sized pieces for seds with
9107 # small command number limits, like on Digital OSF/1 and HP-UX.
9108 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9109 ac_file=1 # Number of current file.
9110 ac_beg=1 # First line for current file.
9111 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9112 ac_more_lines=:
9113 ac_sed_cmds=""
9114 while $ac_more_lines; do
9115   if test $ac_beg -gt 1; then
9116     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9117   else
9118     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9119   fi
9120   if test ! -s conftest.s$ac_file; then
9121     ac_more_lines=false
9122     rm -f conftest.s$ac_file
9123   else
9124     if test -z "$ac_sed_cmds"; then
9125       ac_sed_cmds="sed -f conftest.s$ac_file"
9126     else
9127       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9128     fi
9129     ac_file=`expr $ac_file + 1`
9130     ac_beg=$ac_end
9131     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9132   fi
9133 done
9134 if test -z "$ac_sed_cmds"; then
9135   ac_sed_cmds=cat
9136 fi
9137 EOF
9138
9139 cat >> $CONFIG_STATUS <<EOF
9140
9141 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
9142 EOF
9143 cat >> $CONFIG_STATUS <<\EOF
9144 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9145   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9146   case "$ac_file" in
9147   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9148        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9149   *) ac_file_in="${ac_file}.in" ;;
9150   esac
9151
9152   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9153
9154   # Remove last slash and all that follows it.  Not all systems have dirname.
9155   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9156   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9157     # The file is in a subdirectory.
9158     test ! -d "$ac_dir" && mkdir "$ac_dir"
9159     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9160     # A "../" for each directory in $ac_dir_suffix.
9161     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9162   else
9163     ac_dir_suffix= ac_dots=
9164   fi
9165
9166   case "$ac_given_srcdir" in
9167   .)  srcdir=.
9168       if test -z "$ac_dots"; then top_srcdir=.
9169       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9170   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9171   *) # Relative path.
9172     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9173     top_srcdir="$ac_dots$ac_given_srcdir" ;;
9174   esac
9175
9176   case "$ac_given_INSTALL" in
9177   [/$]*) INSTALL="$ac_given_INSTALL" ;;
9178   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9179   esac
9180
9181   echo creating "$ac_file"
9182   rm -f "$ac_file"
9183   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9184   case "$ac_file" in
9185   *Makefile*) ac_comsub="1i\\
9186 # $configure_input" ;;
9187   *) ac_comsub= ;;
9188   esac
9189
9190   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9191   sed -e "$ac_comsub
9192 s%@configure_input@%$configure_input%g
9193 s%@srcdir@%$srcdir%g
9194 s%@top_srcdir@%$top_srcdir%g
9195 s%@INSTALL@%$INSTALL%g
9196 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9197 fi; done
9198 rm -f conftest.s*
9199
9200 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9201 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9202 #
9203 # ac_d sets the value in "#define NAME VALUE" lines.
9204 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9205 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9206 ac_dC='\3'
9207 ac_dD='%g'
9208 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9209 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9210 ac_uB='\([      ]\)%\1#\2define\3'
9211 ac_uC=' '
9212 ac_uD='\4%g'
9213 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9214 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9215 ac_eB='$%\1#\2define\3'
9216 ac_eC=' '
9217 ac_eD='%g'
9218
9219 if test "${CONFIG_HEADERS+set}" != set; then
9220 EOF
9221 cat >> $CONFIG_STATUS <<EOF
9222   CONFIG_HEADERS="include/config.h"
9223 EOF
9224 cat >> $CONFIG_STATUS <<\EOF
9225 fi
9226 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9227   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9228   case "$ac_file" in
9229   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9230        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9231   *) ac_file_in="${ac_file}.in" ;;
9232   esac
9233
9234   echo creating $ac_file
9235
9236   rm -f conftest.frag conftest.in conftest.out
9237   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9238   cat $ac_file_inputs > conftest.in
9239
9240 EOF
9241
9242 # Transform confdefs.h into a sed script conftest.vals that substitutes
9243 # the proper values into config.h.in to produce config.h.  And first:
9244 # Protect against being on the right side of a sed subst in config.status.
9245 # Protect against being in an unquoted here document in config.status.
9246 rm -f conftest.vals
9247 cat > conftest.hdr <<\EOF
9248 s/[\\&%]/\\&/g
9249 s%[\\$`]%\\&%g
9250 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9251 s%ac_d%ac_u%gp
9252 s%ac_u%ac_e%gp
9253 EOF
9254 sed -n -f conftest.hdr confdefs.h > conftest.vals
9255 rm -f conftest.hdr
9256
9257 # This sed command replaces #undef with comments.  This is necessary, for
9258 # example, in the case of _POSIX_SOURCE, which is predefined and required
9259 # on some systems where configure will not decide to define it.
9260 cat >> conftest.vals <<\EOF
9261 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9262 EOF
9263
9264 # Break up conftest.vals because some shells have a limit on
9265 # the size of here documents, and old seds have small limits too.
9266
9267 rm -f conftest.tail
9268 while :
9269 do
9270   ac_lines=`grep -c . conftest.vals`
9271   # grep -c gives empty output for an empty file on some AIX systems.
9272   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9273   # Write a limited-size here document to conftest.frag.
9274   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9275   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9276   echo 'CEOF
9277   sed -f conftest.frag conftest.in > conftest.out
9278   rm -f conftest.in
9279   mv conftest.out conftest.in
9280 ' >> $CONFIG_STATUS
9281   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9282   rm -f conftest.vals
9283   mv conftest.tail conftest.vals
9284 done
9285 rm -f conftest.vals
9286
9287 cat >> $CONFIG_STATUS <<\EOF
9288   rm -f conftest.frag conftest.h
9289   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9290   cat conftest.in >> conftest.h
9291   rm -f conftest.in
9292   if cmp -s $ac_file conftest.h 2>/dev/null; then
9293     echo "$ac_file is unchanged"
9294     rm -f conftest.h
9295   else
9296     # Remove last slash and all that follows it.  Not all systems have dirname.
9297       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9298       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9299       # The file is in a subdirectory.
9300       test ! -d "$ac_dir" && mkdir "$ac_dir"
9301     fi
9302     rm -f $ac_file
9303     mv conftest.h $ac_file
9304   fi
9305 fi; done
9306
9307 EOF
9308 cat >> $CONFIG_STATUS <<EOF
9309
9310 EOF
9311 cat >> $CONFIG_STATUS <<\EOF
9312
9313 exit 0
9314 EOF
9315 chmod +x $CONFIG_STATUS
9316 rm -fr confdefs* $ac_clean_files
9317 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9318