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