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