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