Patch from Steve Langasek <vorlon@netexpress.net>:
[sfrench/samba-autobuild/.git] / source / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
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   --with-fhs              Use FHS-compliant paths (default=no)"
17 ac_help="$ac_help
18   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
19 ac_help="$ac_help
20   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
21 ac_help="$ac_help
22   --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)"
23 ac_help="$ac_help
24   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
25 ac_help="$ac_help
26   --with-configdir=DIR    Where to put configuration files (\$libdir)"
27 ac_help="$ac_help
28   --with-logfilebase=DIR  Where to put log files (\$(VARDIR))"
29 ac_help="$ac_help
30   --enable-debug          Turn on compiler debugging information (default=no)"
31 ac_help="$ac_help
32   --enable-developer      Turn on developer warnings and debugging (default=no)"
33 ac_help="$ac_help
34   --enable-krb5developer  Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)"
35 ac_help="$ac_help
36   --enable-dmalloc        Enable heap debugging [default=no]"
37 ac_help="$ac_help
38   --enable-cups           Turn on CUPS support (default=auto)"
39 ac_help="$ac_help
40   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
41 ac_help="$ac_help
42   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
43 ac_help="$ac_help
44   --with-smbwrapper       Include SMB wrapper support (default=no) "
45 ac_help="$ac_help
46   --with-afs              Include AFS clear-text auth support (default=no) "
47 ac_help="$ac_help
48   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
49 ac_help="$ac_help
50    --with-ads  Active Directory support (default yes)"
51 ac_help="$ac_help
52   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
53 ac_help="$ac_help
54    --with-ldap  LDAP support (default yes)"
55 ac_help="$ac_help
56   --with-automount        Include AUTOMOUNT support (default=no)"
57 ac_help="$ac_help
58   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
59 ac_help="$ac_help
60   --with-pam              Include PAM support (default=no)"
61 ac_help="$ac_help
62   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
63 ac_help="$ac_help
64   --with-sam              Build new (experimental) SAM database (default=no)"
65 ac_help="$ac_help
66   --with-ldapsam           Include LDAP SAM 2.2 compatible configuration (default=no)"
67 ac_help="$ac_help
68   --with-tdbsam           Include experimental TDB SAM support (default=no)"
69 ac_help="$ac_help
70   --with-nisplussam       Include NISPLUS SAM support (default=no)"
71 ac_help="$ac_help
72   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
73 ac_help="$ac_help
74   --with-syslog           Include experimental SYSLOG support (default=no)"
75 ac_help="$ac_help
76   --with-profiling-data   Include gathering source code profile information (default=no)"
77 ac_help="$ac_help
78   --with-quotas           Include experimental disk-quota support (default=no)"
79 ac_help="$ac_help
80   --with-utmp             Include experimental utmp accounting (default=no)"
81 ac_help="$ac_help
82   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
83 ac_help="$ac_help
84   --with-libsmbclient     Build the libsmbclient shared library (default=yes)"
85 ac_help="$ac_help
86   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
87 ac_help="$ac_help
88   --with-acl-support      Include ACL support (default=no)"
89 ac_help="$ac_help
90   --with-sendfile-support      Check for sendfile support (default=no)"
91 ac_help="$ac_help
92   --with-winbind          Build winbind (default, if supported by OS)"
93 ac_help="$ac_help
94   --with-included-popt    use bundled popt library, not from system"
95 ac_help="$ac_help
96   --with-python=PYTHONNAME  build Python libraries"
97
98 # Initialize some variables set by options.
99 # The variables have the same names as the options, with
100 # dashes changed to underlines.
101 build=NONE
102 cache_file=./config.cache
103 exec_prefix=NONE
104 host=NONE
105 no_create=
106 nonopt=NONE
107 no_recursion=
108 prefix=NONE
109 program_prefix=NONE
110 program_suffix=NONE
111 program_transform_name=s,x,x,
112 silent=
113 site=
114 srcdir=
115 target=NONE
116 verbose=
117 x_includes=NONE
118 x_libraries=NONE
119 bindir='${exec_prefix}/bin'
120 sbindir='${exec_prefix}/sbin'
121 libexecdir='${exec_prefix}/libexec'
122 datadir='${prefix}/share'
123 sysconfdir='${prefix}/etc'
124 sharedstatedir='${prefix}/com'
125 localstatedir='${prefix}/var'
126 libdir='${exec_prefix}/lib'
127 includedir='${prefix}/include'
128 oldincludedir='/usr/include'
129 infodir='${prefix}/info'
130 mandir='${prefix}/man'
131
132 # Initialize some other variables.
133 subdirs=
134 MFLAGS= MAKEFLAGS=
135 SHELL=${CONFIG_SHELL-/bin/sh}
136 # Maximum number of lines to put in a shell here document.
137 ac_max_here_lines=12
138
139 ac_prev=
140 for ac_option
141 do
142
143   # If the previous option needs an argument, assign it.
144   if test -n "$ac_prev"; then
145     eval "$ac_prev=\$ac_option"
146     ac_prev=
147     continue
148   fi
149
150   case "$ac_option" in
151   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
152   *) ac_optarg= ;;
153   esac
154
155   # Accept the important Cygnus configure options, so we can diagnose typos.
156
157   case "$ac_option" in
158
159   -bindir | --bindir | --bindi | --bind | --bin | --bi)
160     ac_prev=bindir ;;
161   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
162     bindir="$ac_optarg" ;;
163
164   -build | --build | --buil | --bui | --bu)
165     ac_prev=build ;;
166   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
167     build="$ac_optarg" ;;
168
169   -cache-file | --cache-file | --cache-fil | --cache-fi \
170   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
171     ac_prev=cache_file ;;
172   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
173   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
174     cache_file="$ac_optarg" ;;
175
176   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
177     ac_prev=datadir ;;
178   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
179   | --da=*)
180     datadir="$ac_optarg" ;;
181
182   -disable-* | --disable-*)
183     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
184     # Reject names that are not valid shell variable names.
185     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
186       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
187     fi
188     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
189     eval "enable_${ac_feature}=no" ;;
190
191   -enable-* | --enable-*)
192     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
193     # Reject names that are not valid shell variable names.
194     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
195       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
196     fi
197     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
198     case "$ac_option" in
199       *=*) ;;
200       *) ac_optarg=yes ;;
201     esac
202     eval "enable_${ac_feature}='$ac_optarg'" ;;
203
204   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
205   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
206   | --exec | --exe | --ex)
207     ac_prev=exec_prefix ;;
208   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
209   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
210   | --exec=* | --exe=* | --ex=*)
211     exec_prefix="$ac_optarg" ;;
212
213   -gas | --gas | --ga | --g)
214     # Obsolete; use --with-gas.
215     with_gas=yes ;;
216
217   -help | --help | --hel | --he)
218     # Omit some internal or obsolete options to make the list less imposing.
219     # This message is too long to be a string in the A/UX 3.1 sh.
220     cat << EOF
221 Usage: configure [options] [host]
222 Options: [defaults in brackets after descriptions]
223 Configuration:
224   --cache-file=FILE       cache test results in FILE
225   --help                  print this message
226   --no-create             do not create output files
227   --quiet, --silent       do not print \`checking...' messages
228   --version               print the version of autoconf that created configure
229 Directory and file names:
230   --prefix=PREFIX         install architecture-independent files in PREFIX
231                           [$ac_default_prefix]
232   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
233                           [same as prefix]
234   --bindir=DIR            user executables in DIR [EPREFIX/bin]
235   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
236   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
237   --datadir=DIR           read-only architecture-independent data in DIR
238                           [PREFIX/share]
239   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
240   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
241                           [PREFIX/com]
242   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
243   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
244   --includedir=DIR        C header files in DIR [PREFIX/include]
245   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
246   --infodir=DIR           info documentation in DIR [PREFIX/info]
247   --mandir=DIR            man documentation in DIR [PREFIX/man]
248   --srcdir=DIR            find the sources in DIR [configure dir or ..]
249   --program-prefix=PREFIX prepend PREFIX to installed program names
250   --program-suffix=SUFFIX append SUFFIX to installed program names
251   --program-transform-name=PROGRAM
252                           run sed PROGRAM on installed program names
253 EOF
254     cat << EOF
255 Host type:
256   --build=BUILD           configure for building on BUILD [BUILD=HOST]
257   --host=HOST             configure for HOST [guessed]
258   --target=TARGET         configure for TARGET [TARGET=HOST]
259 Features and packages:
260   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
261   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
262   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
263   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
264   --x-includes=DIR        X include files are in DIR
265   --x-libraries=DIR       X library files are in DIR
266 EOF
267     if test -n "$ac_help"; then
268       echo "--enable and --with options recognized:$ac_help"
269     fi
270     exit 0 ;;
271
272   -host | --host | --hos | --ho)
273     ac_prev=host ;;
274   -host=* | --host=* | --hos=* | --ho=*)
275     host="$ac_optarg" ;;
276
277   -includedir | --includedir | --includedi | --included | --include \
278   | --includ | --inclu | --incl | --inc)
279     ac_prev=includedir ;;
280   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
281   | --includ=* | --inclu=* | --incl=* | --inc=*)
282     includedir="$ac_optarg" ;;
283
284   -infodir | --infodir | --infodi | --infod | --info | --inf)
285     ac_prev=infodir ;;
286   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
287     infodir="$ac_optarg" ;;
288
289   -libdir | --libdir | --libdi | --libd)
290     ac_prev=libdir ;;
291   -libdir=* | --libdir=* | --libdi=* | --libd=*)
292     libdir="$ac_optarg" ;;
293
294   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
295   | --libexe | --libex | --libe)
296     ac_prev=libexecdir ;;
297   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
298   | --libexe=* | --libex=* | --libe=*)
299     libexecdir="$ac_optarg" ;;
300
301   -localstatedir | --localstatedir | --localstatedi | --localstated \
302   | --localstate | --localstat | --localsta | --localst \
303   | --locals | --local | --loca | --loc | --lo)
304     ac_prev=localstatedir ;;
305   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
306   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
307   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
308     localstatedir="$ac_optarg" ;;
309
310   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
311     ac_prev=mandir ;;
312   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
313     mandir="$ac_optarg" ;;
314
315   -nfp | --nfp | --nf)
316     # Obsolete; use --without-fp.
317     with_fp=no ;;
318
319   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
320   | --no-cr | --no-c)
321     no_create=yes ;;
322
323   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
324   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
325     no_recursion=yes ;;
326
327   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
328   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
329   | --oldin | --oldi | --old | --ol | --o)
330     ac_prev=oldincludedir ;;
331   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
332   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
333   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
334     oldincludedir="$ac_optarg" ;;
335
336   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
337     ac_prev=prefix ;;
338   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
339     prefix="$ac_optarg" ;;
340
341   -program-prefix | --program-prefix | --program-prefi | --program-pref \
342   | --program-pre | --program-pr | --program-p)
343     ac_prev=program_prefix ;;
344   -program-prefix=* | --program-prefix=* | --program-prefi=* \
345   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
346     program_prefix="$ac_optarg" ;;
347
348   -program-suffix | --program-suffix | --program-suffi | --program-suff \
349   | --program-suf | --program-su | --program-s)
350     ac_prev=program_suffix ;;
351   -program-suffix=* | --program-suffix=* | --program-suffi=* \
352   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
353     program_suffix="$ac_optarg" ;;
354
355   -program-transform-name | --program-transform-name \
356   | --program-transform-nam | --program-transform-na \
357   | --program-transform-n | --program-transform- \
358   | --program-transform | --program-transfor \
359   | --program-transfo | --program-transf \
360   | --program-trans | --program-tran \
361   | --progr-tra | --program-tr | --program-t)
362     ac_prev=program_transform_name ;;
363   -program-transform-name=* | --program-transform-name=* \
364   | --program-transform-nam=* | --program-transform-na=* \
365   | --program-transform-n=* | --program-transform-=* \
366   | --program-transform=* | --program-transfor=* \
367   | --program-transfo=* | --program-transf=* \
368   | --program-trans=* | --program-tran=* \
369   | --progr-tra=* | --program-tr=* | --program-t=*)
370     program_transform_name="$ac_optarg" ;;
371
372   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
373   | -silent | --silent | --silen | --sile | --sil)
374     silent=yes ;;
375
376   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
377     ac_prev=sbindir ;;
378   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
379   | --sbi=* | --sb=*)
380     sbindir="$ac_optarg" ;;
381
382   -sharedstatedir | --sharedstatedir | --sharedstatedi \
383   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
384   | --sharedst | --shareds | --shared | --share | --shar \
385   | --sha | --sh)
386     ac_prev=sharedstatedir ;;
387   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
388   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
389   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
390   | --sha=* | --sh=*)
391     sharedstatedir="$ac_optarg" ;;
392
393   -site | --site | --sit)
394     ac_prev=site ;;
395   -site=* | --site=* | --sit=*)
396     site="$ac_optarg" ;;
397
398   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
399     ac_prev=srcdir ;;
400   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
401     srcdir="$ac_optarg" ;;
402
403   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
404   | --syscon | --sysco | --sysc | --sys | --sy)
405     ac_prev=sysconfdir ;;
406   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
407   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
408     sysconfdir="$ac_optarg" ;;
409
410   -target | --target | --targe | --targ | --tar | --ta | --t)
411     ac_prev=target ;;
412   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
413     target="$ac_optarg" ;;
414
415   -v | -verbose | --verbose | --verbos | --verbo | --verb)
416     verbose=yes ;;
417
418   -version | --version | --versio | --versi | --vers)
419     echo "configure generated by autoconf version 2.13"
420     exit 0 ;;
421
422   -with-* | --with-*)
423     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
424     # Reject names that are not valid shell variable names.
425     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
426       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
427     fi
428     ac_package=`echo $ac_package| sed 's/-/_/g'`
429     case "$ac_option" in
430       *=*) ;;
431       *) ac_optarg=yes ;;
432     esac
433     eval "with_${ac_package}='$ac_optarg'" ;;
434
435   -without-* | --without-*)
436     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
437     # Reject names that are not valid shell variable names.
438     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
439       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
440     fi
441     ac_package=`echo $ac_package| sed 's/-/_/g'`
442     eval "with_${ac_package}=no" ;;
443
444   --x)
445     # Obsolete; use --with-x.
446     with_x=yes ;;
447
448   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
449   | --x-incl | --x-inc | --x-in | --x-i)
450     ac_prev=x_includes ;;
451   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
452   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
453     x_includes="$ac_optarg" ;;
454
455   -x-libraries | --x-libraries | --x-librarie | --x-librari \
456   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
457     ac_prev=x_libraries ;;
458   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
459   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
460     x_libraries="$ac_optarg" ;;
461
462   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
463     ;;
464
465   *)
466     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
467       echo "configure: warning: $ac_option: invalid host type" 1>&2
468     fi
469     if test "x$nonopt" != xNONE; then
470       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
471     fi
472     nonopt="$ac_option"
473     ;;
474
475   esac
476 done
477
478 if test -n "$ac_prev"; then
479   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
480 fi
481
482 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
483
484 # File descriptor usage:
485 # 0 standard input
486 # 1 file creation
487 # 2 errors and warnings
488 # 3 some systems may open it to /dev/tty
489 # 4 used on the Kubota Titan
490 # 6 checking for... messages and results
491 # 5 compiler messages saved in config.log
492 if test "$silent" = yes; then
493   exec 6>/dev/null
494 else
495   exec 6>&1
496 fi
497 exec 5>./config.log
498
499 echo "\
500 This file contains any messages produced by compilers while
501 running configure, to aid debugging if configure makes a mistake.
502 " 1>&5
503
504 # Strip out --no-create and --no-recursion so they do not pile up.
505 # Also quote any args containing shell metacharacters.
506 ac_configure_args=
507 for ac_arg
508 do
509   case "$ac_arg" in
510   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
511   | --no-cr | --no-c) ;;
512   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
513   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
514   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
515   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
516   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
517   esac
518 done
519
520 # NLS nuisances.
521 # Only set these to C if already set.  These must not be set unconditionally
522 # because not all systems understand e.g. LANG=C (notably SCO).
523 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
524 # Non-C LC_CTYPE values break the ctype check.
525 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
526 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
527 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
528 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
529
530 # confdefs.h avoids OS command line length limits that DEFS can exceed.
531 rm -rf conftest* confdefs.h
532 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
533 echo > confdefs.h
534
535 # A filename unique to this package, relative to the directory that
536 # configure is in, which we can look for to find out if srcdir is correct.
537 ac_unique_file=include/includes.h
538
539 # Find the source files, if location was not specified.
540 if test -z "$srcdir"; then
541   ac_srcdir_defaulted=yes
542   # Try the directory containing this script, then its parent.
543   ac_prog=$0
544   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
545   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
546   srcdir=$ac_confdir
547   if test ! -r $srcdir/$ac_unique_file; then
548     srcdir=..
549   fi
550 else
551   ac_srcdir_defaulted=no
552 fi
553 if test ! -r $srcdir/$ac_unique_file; then
554   if test "$ac_srcdir_defaulted" = yes; then
555     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
556   else
557     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
558   fi
559 fi
560 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
561
562 # Prefer explicitly selected file to automatically selected ones.
563 if test -z "$CONFIG_SITE"; then
564   if test "x$prefix" != xNONE; then
565     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
566   else
567     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
568   fi
569 fi
570 for ac_site_file in $CONFIG_SITE; do
571   if test -r "$ac_site_file"; then
572     echo "loading site script $ac_site_file"
573     . "$ac_site_file"
574   fi
575 done
576
577 if test -r "$cache_file"; then
578   echo "loading cache $cache_file"
579   . $cache_file
580 else
581   echo "creating cache $cache_file"
582   > $cache_file
583 fi
584
585 ac_ext=c
586 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
587 ac_cpp='$CPP $CPPFLAGS'
588 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
589 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
590 cross_compiling=$ac_cv_prog_cc_cross
591
592 ac_exeext=
593 ac_objext=o
594 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
595   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
596   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
597     ac_n= ac_c='
598 ' ac_t='        '
599   else
600     ac_n=-n ac_c= ac_t=
601   fi
602 else
603   ac_n= ac_c='\c' ac_t=
604 fi
605
606
607
608
609 #################################################
610 # Directory handling stuff to support both the
611 # legacy SAMBA directories and FHS compliant
612 # ones...
613
614
615 # Check whether --with-fhs or --without-fhs was given.
616 if test "${with_fhs+set}" = set; then
617   withval="$with_fhs"
618   configdir="${sysconfdir}/samba"
619     lockdir="\${VARDIR}/cache/samba"
620     piddir="\$(VARDIR)/run/samba"
621     logfilebase="\${VARDIR}/log/samba"
622     privatedir="\${CONFIGDIR}/private"
623     swatdir="\${DATADIR}/samba/swat"
624 else
625   configdir="\$(LIBDIR)"
626     logfilebase="\$(VARDIR)"
627     lockdir="\${VARDIR}/locks"
628     piddir="\$(VARDIR)/locks"
629     privatedir="\${prefix}/private"
630     swatdir="\${prefix}/swat"
631 fi
632
633
634 #################################################
635 # set private directory location
636 # Check whether --with-privatedir or --without-privatedir was given.
637 if test "${with_privatedir+set}" = set; then
638   withval="$with_privatedir"
639    case "$withval" in
640   yes|no)
641   #
642   # Just in case anybody calls it without argument
643   #
644     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
645   ;;
646   * )
647     privatedir="$withval"
648     ;;
649   esac
650 fi
651
652
653 #################################################
654 # set lock directory location
655 # Check whether --with-lockdir or --without-lockdir was given.
656 if test "${with_lockdir+set}" = set; then
657   withval="$with_lockdir"
658    case "$withval" in
659   yes|no)
660   #
661   # Just in case anybody calls it without argument
662   #
663     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
664   ;;
665   * )
666     lockdir="$withval"
667     ;;
668   esac
669 fi
670
671
672 #################################################
673 # set pid directory location
674 # Check whether --with-piddir or --without-piddir was given.
675 if test "${with_piddir+set}" = set; then
676   withval="$with_piddir"
677    case "$withval" in
678   yes|no)
679   #
680   # Just in case anybody calls it without argument
681   #
682     echo "configure: warning: --with-piddir called without argument - will use default" 1>&2
683   ;;
684   * )
685     piddir="$withval"
686     ;;
687   esac
688 fi
689
690
691 #################################################
692 # set SWAT directory location
693 # Check whether --with-swatdir or --without-swatdir was given.
694 if test "${with_swatdir+set}" = set; then
695   withval="$with_swatdir"
696    case "$withval" in
697   yes|no)
698   #
699   # Just in case anybody does it
700   #
701     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
702   ;;
703   * )
704     swatdir="$withval"
705     ;;
706   esac
707 fi
708
709
710 #################################################
711 # set configuration directory location
712 # Check whether --with-configdir or --without-configdir was given.
713 if test "${with_configdir+set}" = set; then
714   withval="$with_configdir"
715    case "$withval" in
716   yes|no)
717   #
718   # Just in case anybody does it
719   #
720     echo "configure: warning: --with-configdir called without argument - will use default" 1>&2
721   ;;
722   * )
723     configdir="$withval"
724     ;;
725   esac
726 fi
727
728
729 #################################################
730 # set log directory location
731 # Check whether --with-logfilebase or --without-logfilebase was given.
732 if test "${with_logfilebase+set}" = set; then
733   withval="$with_logfilebase"
734    case "$withval" in
735   yes|no)
736   #
737   # Just in case anybody does it
738   #
739     echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
740   ;;
741   * )
742     logfilebase="$withval"
743     ;;
744   esac
745 fi
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777 # compile with optimization and without debugging by default
778 CFLAGS="-O ${CFLAGS}"
779
780 # Check whether --enable-debug or --disable-debug was given.
781 if test "${enable_debug+set}" = set; then
782   enableval="$enable_debug"
783   if eval "test x$enable_debug = xyes"; then
784         CFLAGS="${CFLAGS} -g"
785     fi
786 fi
787
788
789 # Check whether --enable-developer or --disable-developer was given.
790 if test "${enable_developer+set}" = set; then
791   enableval="$enable_developer"
792   if eval "test x$enable_developer = xyes"; then
793         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
794     fi
795 fi
796
797
798 # Check whether --enable-krb5developer or --disable-krb5developer was given.
799 if test "${enable_krb5developer+set}" = set; then
800   enableval="$enable_krb5developer"
801   if eval "test x$enable_krb5developer = xyes"; then
802         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
803     fi
804 fi
805
806
807 # Check whether --enable-dmalloc or --disable-dmalloc was given.
808 if test "${enable_dmalloc+set}" = set; then
809   enableval="$enable_dmalloc"
810   :
811 fi
812
813
814 if test "x$enable_dmalloc" = xyes
815 then
816         cat >> confdefs.h <<\EOF
817 #define ENABLE_DMALLOC 1
818 EOF
819
820         cat >> confdefs.h <<\EOF
821 #define DMALLOC_FUNC_CHECK 1
822 EOF
823
824         LIBS="$LIBS -ldmalloc"  
825 fi
826
827 # Extract the first word of "gcc", so it can be a program name with args.
828 set dummy gcc; ac_word=$2
829 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
830 echo "configure:831: checking for $ac_word" >&5
831 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
832   echo $ac_n "(cached) $ac_c" 1>&6
833 else
834   if test -n "$CC"; then
835   ac_cv_prog_CC="$CC" # Let the user override the test.
836 else
837   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
838   ac_dummy="$PATH"
839   for ac_dir in $ac_dummy; do
840     test -z "$ac_dir" && ac_dir=.
841     if test -f $ac_dir/$ac_word; then
842       ac_cv_prog_CC="gcc"
843       break
844     fi
845   done
846   IFS="$ac_save_ifs"
847 fi
848 fi
849 CC="$ac_cv_prog_CC"
850 if test -n "$CC"; then
851   echo "$ac_t""$CC" 1>&6
852 else
853   echo "$ac_t""no" 1>&6
854 fi
855
856 if test -z "$CC"; then
857   # Extract the first word of "cc", so it can be a program name with args.
858 set dummy cc; ac_word=$2
859 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
860 echo "configure:861: checking for $ac_word" >&5
861 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
862   echo $ac_n "(cached) $ac_c" 1>&6
863 else
864   if test -n "$CC"; then
865   ac_cv_prog_CC="$CC" # Let the user override the test.
866 else
867   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
868   ac_prog_rejected=no
869   ac_dummy="$PATH"
870   for ac_dir in $ac_dummy; do
871     test -z "$ac_dir" && ac_dir=.
872     if test -f $ac_dir/$ac_word; then
873       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
874         ac_prog_rejected=yes
875         continue
876       fi
877       ac_cv_prog_CC="cc"
878       break
879     fi
880   done
881   IFS="$ac_save_ifs"
882 if test $ac_prog_rejected = yes; then
883   # We found a bogon in the path, so make sure we never use it.
884   set dummy $ac_cv_prog_CC
885   shift
886   if test $# -gt 0; then
887     # We chose a different compiler from the bogus one.
888     # However, it has the same basename, so the bogon will be chosen
889     # first if we set CC to just the basename; use the full file name.
890     shift
891     set dummy "$ac_dir/$ac_word" "$@"
892     shift
893     ac_cv_prog_CC="$@"
894   fi
895 fi
896 fi
897 fi
898 CC="$ac_cv_prog_CC"
899 if test -n "$CC"; then
900   echo "$ac_t""$CC" 1>&6
901 else
902   echo "$ac_t""no" 1>&6
903 fi
904
905   if test -z "$CC"; then
906     case "`uname -s`" in
907     *win32* | *WIN32*)
908       # Extract the first word of "cl", so it can be a program name with args.
909 set dummy cl; ac_word=$2
910 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
911 echo "configure:912: checking for $ac_word" >&5
912 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
913   echo $ac_n "(cached) $ac_c" 1>&6
914 else
915   if test -n "$CC"; then
916   ac_cv_prog_CC="$CC" # Let the user override the test.
917 else
918   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
919   ac_dummy="$PATH"
920   for ac_dir in $ac_dummy; do
921     test -z "$ac_dir" && ac_dir=.
922     if test -f $ac_dir/$ac_word; then
923       ac_cv_prog_CC="cl"
924       break
925     fi
926   done
927   IFS="$ac_save_ifs"
928 fi
929 fi
930 CC="$ac_cv_prog_CC"
931 if test -n "$CC"; then
932   echo "$ac_t""$CC" 1>&6
933 else
934   echo "$ac_t""no" 1>&6
935 fi
936  ;;
937     esac
938   fi
939   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
940 fi
941
942 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
943 echo "configure:944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
944
945 ac_ext=c
946 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
947 ac_cpp='$CPP $CPPFLAGS'
948 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
949 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
950 cross_compiling=$ac_cv_prog_cc_cross
951
952 cat > conftest.$ac_ext << EOF
953
954 #line 955 "configure"
955 #include "confdefs.h"
956
957 main(){return(0);}
958 EOF
959 if { (eval echo configure:960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
960   ac_cv_prog_cc_works=yes
961   # If we can't run a trivial program, we are probably using a cross compiler.
962   if (./conftest; exit) 2>/dev/null; then
963     ac_cv_prog_cc_cross=no
964   else
965     ac_cv_prog_cc_cross=yes
966   fi
967 else
968   echo "configure: failed program was:" >&5
969   cat conftest.$ac_ext >&5
970   ac_cv_prog_cc_works=no
971 fi
972 rm -fr conftest*
973 ac_ext=c
974 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
975 ac_cpp='$CPP $CPPFLAGS'
976 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
977 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
978 cross_compiling=$ac_cv_prog_cc_cross
979
980 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
981 if test $ac_cv_prog_cc_works = no; then
982   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
983 fi
984 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
985 echo "configure:986: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
986 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
987 cross_compiling=$ac_cv_prog_cc_cross
988
989 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
990 echo "configure:991: checking whether we are using GNU C" >&5
991 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
992   echo $ac_n "(cached) $ac_c" 1>&6
993 else
994   cat > conftest.c <<EOF
995 #ifdef __GNUC__
996   yes;
997 #endif
998 EOF
999 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1000   ac_cv_prog_gcc=yes
1001 else
1002   ac_cv_prog_gcc=no
1003 fi
1004 fi
1005
1006 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1007
1008 if test $ac_cv_prog_gcc = yes; then
1009   GCC=yes
1010 else
1011   GCC=
1012 fi
1013
1014 ac_test_CFLAGS="${CFLAGS+set}"
1015 ac_save_CFLAGS="$CFLAGS"
1016 CFLAGS=
1017 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1018 echo "configure:1019: checking whether ${CC-cc} accepts -g" >&5
1019 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1020   echo $ac_n "(cached) $ac_c" 1>&6
1021 else
1022   echo 'void f(){}' > conftest.c
1023 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1024   ac_cv_prog_cc_g=yes
1025 else
1026   ac_cv_prog_cc_g=no
1027 fi
1028 rm -f conftest*
1029
1030 fi
1031
1032 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1033 if test "$ac_test_CFLAGS" = set; then
1034   CFLAGS="$ac_save_CFLAGS"
1035 elif test $ac_cv_prog_cc_g = yes; then
1036   if test "$GCC" = yes; then
1037     CFLAGS="-g -O2"
1038   else
1039     CFLAGS="-g"
1040   fi
1041 else
1042   if test "$GCC" = yes; then
1043     CFLAGS="-O2"
1044   else
1045     CFLAGS=
1046   fi
1047 fi
1048
1049 ac_aux_dir=
1050 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1051   if test -f $ac_dir/install-sh; then
1052     ac_aux_dir=$ac_dir
1053     ac_install_sh="$ac_aux_dir/install-sh -c"
1054     break
1055   elif test -f $ac_dir/install.sh; then
1056     ac_aux_dir=$ac_dir
1057     ac_install_sh="$ac_aux_dir/install.sh -c"
1058     break
1059   fi
1060 done
1061 if test -z "$ac_aux_dir"; then
1062   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1063 fi
1064 ac_config_guess=$ac_aux_dir/config.guess
1065 ac_config_sub=$ac_aux_dir/config.sub
1066 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1067
1068 # Find a good install program.  We prefer a C program (faster),
1069 # so one script is as good as another.  But avoid the broken or
1070 # incompatible versions:
1071 # SysV /etc/install, /usr/sbin/install
1072 # SunOS /usr/etc/install
1073 # IRIX /sbin/install
1074 # AIX /bin/install
1075 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1076 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1077 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1078 # ./install, which can be erroneously created by make from ./install.sh.
1079 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1080 echo "configure:1081: checking for a BSD compatible install" >&5
1081 if test -z "$INSTALL"; then
1082 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1083   echo $ac_n "(cached) $ac_c" 1>&6
1084 else
1085     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1086   for ac_dir in $PATH; do
1087     # Account for people who put trailing slashes in PATH elements.
1088     case "$ac_dir/" in
1089     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1090     *)
1091       # OSF1 and SCO ODT 3.0 have their own names for install.
1092       # Don't use installbsd from OSF since it installs stuff as root
1093       # by default.
1094       for ac_prog in ginstall scoinst install; do
1095         if test -f $ac_dir/$ac_prog; then
1096           if test $ac_prog = install &&
1097             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1098             # AIX install.  It has an incompatible calling convention.
1099             :
1100           else
1101             ac_cv_path_install="$ac_dir/$ac_prog -c"
1102             break 2
1103           fi
1104         fi
1105       done
1106       ;;
1107     esac
1108   done
1109   IFS="$ac_save_IFS"
1110
1111 fi
1112   if test "${ac_cv_path_install+set}" = set; then
1113     INSTALL="$ac_cv_path_install"
1114   else
1115     # As a last resort, use the slow shell script.  We don't cache a
1116     # path for INSTALL within a source directory, because that will
1117     # break other packages using the cache if that directory is
1118     # removed, or if the path is relative.
1119     INSTALL="$ac_install_sh"
1120   fi
1121 fi
1122 echo "$ac_t""$INSTALL" 1>&6
1123
1124 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1125 # It thinks the first close brace ends the variable substitution.
1126 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1127
1128 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1129
1130 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1131
1132 for ac_prog in gawk mawk nawk awk
1133 do
1134 # Extract the first word of "$ac_prog", so it can be a program name with args.
1135 set dummy $ac_prog; ac_word=$2
1136 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1137 echo "configure:1138: checking for $ac_word" >&5
1138 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1139   echo $ac_n "(cached) $ac_c" 1>&6
1140 else
1141   if test -n "$AWK"; then
1142   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1143 else
1144   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1145   ac_dummy="$PATH"
1146   for ac_dir in $ac_dummy; do
1147     test -z "$ac_dir" && ac_dir=.
1148     if test -f $ac_dir/$ac_word; then
1149       ac_cv_prog_AWK="$ac_prog"
1150       break
1151     fi
1152   done
1153   IFS="$ac_save_ifs"
1154 fi
1155 fi
1156 AWK="$ac_cv_prog_AWK"
1157 if test -n "$AWK"; then
1158   echo "$ac_t""$AWK" 1>&6
1159 else
1160   echo "$ac_t""no" 1>&6
1161 fi
1162
1163 test -n "$AWK" && break
1164 done
1165
1166
1167 LD=ld
1168 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1169 echo "configure:1170: checking if the linker ($LD) is GNU ld" >&5
1170 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1171   echo $ac_n "(cached) $ac_c" 1>&6
1172 else
1173   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1174 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1175   ac_cv_prog_gnu_ld=yes
1176 else
1177   ac_cv_prog_gnu_ld=no
1178 fi
1179 fi
1180
1181 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1182
1183
1184 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1185 echo "configure:1186: checking for POSIXized ISC" >&5
1186 if test -d /etc/conf/kconfig.d &&
1187   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1188 then
1189   echo "$ac_t""yes" 1>&6
1190   ISC=yes # If later tests want to check for ISC.
1191   cat >> confdefs.h <<\EOF
1192 #define _POSIX_SOURCE 1
1193 EOF
1194
1195   if test "$GCC" = yes; then
1196     CC="$CC -posix"
1197   else
1198     CC="$CC -Xp"
1199   fi
1200 else
1201   echo "$ac_t""no" 1>&6
1202   ISC=
1203 fi
1204
1205
1206 if test "x$CC" != xcc; then
1207   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1208 echo "configure:1209: checking whether $CC and cc understand -c and -o together" >&5
1209 else
1210   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1211 echo "configure:1212: checking whether cc understands -c and -o together" >&5
1212 fi
1213 set dummy $CC; ac_cc="`echo $2 |
1214                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1215 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1216   echo $ac_n "(cached) $ac_c" 1>&6
1217 else
1218   echo 'foo(){}' > conftest.c
1219 # Make sure it works both with $CC and with simple cc.
1220 # We do the test twice because some compilers refuse to overwrite an
1221 # existing .o file with -o, though they will create one.
1222 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1223 if { (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1224    test -f conftest.o && { (eval echo configure:1225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1225 then
1226   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1227   if test "x$CC" != xcc; then
1228     # Test first that cc exists at all.
1229     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1230       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1231       if { (eval echo configure:1232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1232          test -f conftest.o && { (eval echo configure:1233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1233       then
1234         # cc works too.
1235         :
1236       else
1237         # cc exists but doesn't like -o.
1238         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1239       fi
1240     fi
1241   fi
1242 else
1243   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1244 fi
1245 rm -f conftest*
1246
1247 fi
1248 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1249   echo "$ac_t""yes" 1>&6
1250 else
1251   echo "$ac_t""no" 1>&6
1252   cat >> confdefs.h <<\EOF
1253 #define NO_MINUS_C_MINUS_O 1
1254 EOF
1255
1256 fi
1257
1258 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1259       BROKEN_CC=
1260 else
1261       BROKEN_CC=#
1262 fi
1263
1264
1265 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1266 echo "configure:1267: checking that the C compiler understands volatile" >&5
1267 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1268   echo $ac_n "(cached) $ac_c" 1>&6
1269 else
1270   
1271     cat > conftest.$ac_ext <<EOF
1272 #line 1273 "configure"
1273 #include "confdefs.h"
1274 #include <sys/types.h>
1275 int main() {
1276 volatile int i = 0
1277 ; return 0; }
1278 EOF
1279 if { (eval echo configure:1280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1280   rm -rf conftest*
1281   samba_cv_volatile=yes
1282 else
1283   echo "configure: failed program was:" >&5
1284   cat conftest.$ac_ext >&5
1285   rm -rf conftest*
1286   samba_cv_volatile=no
1287 fi
1288 rm -f conftest*
1289 fi
1290
1291 echo "$ac_t""$samba_cv_volatile" 1>&6
1292 if test x"$samba_cv_volatile" = x"yes"; then
1293    cat >> confdefs.h <<\EOF
1294 #define HAVE_VOLATILE 1
1295 EOF
1296
1297 fi
1298
1299
1300
1301 # Do some error checking and defaulting for the host and target type.
1302 # The inputs are:
1303 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1304 #
1305 # The rules are:
1306 # 1. You are not allowed to specify --host, --target, and nonopt at the
1307 #    same time.
1308 # 2. Host defaults to nonopt.
1309 # 3. If nonopt is not specified, then host defaults to the current host,
1310 #    as determined by config.guess.
1311 # 4. Target and build default to nonopt.
1312 # 5. If nonopt is not specified, then target and build default to host.
1313
1314 # The aliases save the names the user supplied, while $host etc.
1315 # will get canonicalized.
1316 case $host---$target---$nonopt in
1317 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1318 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1319 esac
1320
1321
1322 # Make sure we can run config.sub.
1323 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1324 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1325 fi
1326
1327 echo $ac_n "checking host system type""... $ac_c" 1>&6
1328 echo "configure:1329: checking host system type" >&5
1329
1330 host_alias=$host
1331 case "$host_alias" in
1332 NONE)
1333   case $nonopt in
1334   NONE)
1335     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1336     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1337     fi ;;
1338   *) host_alias=$nonopt ;;
1339   esac ;;
1340 esac
1341
1342 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1343 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1344 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1345 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1346 echo "$ac_t""$host" 1>&6
1347
1348 echo $ac_n "checking target system type""... $ac_c" 1>&6
1349 echo "configure:1350: checking target system type" >&5
1350
1351 target_alias=$target
1352 case "$target_alias" in
1353 NONE)
1354   case $nonopt in
1355   NONE) target_alias=$host_alias ;;
1356   *) target_alias=$nonopt ;;
1357   esac ;;
1358 esac
1359
1360 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1361 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1362 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1363 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1364 echo "$ac_t""$target" 1>&6
1365
1366 echo $ac_n "checking build system type""... $ac_c" 1>&6
1367 echo "configure:1368: checking build system type" >&5
1368
1369 build_alias=$build
1370 case "$build_alias" in
1371 NONE)
1372   case $nonopt in
1373   NONE) build_alias=$host_alias ;;
1374   *) build_alias=$nonopt ;;
1375   esac ;;
1376 esac
1377
1378 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1379 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1380 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1381 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1382 echo "$ac_t""$build" 1>&6
1383
1384 test "$host_alias" != "$target_alias" &&
1385   test "$program_prefix$program_suffix$program_transform_name" = \
1386     NONENONEs,x,x, &&
1387   program_prefix=${target_alias}-
1388
1389
1390   case "$host_os" in
1391         *irix6*) cat >> confdefs.h <<\EOF
1392 #include <standards.h>
1393 EOF
1394
1395         ;;
1396 esac
1397
1398
1399     
1400     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1401 echo "configure:1402: checking config.cache system type" >&5
1402     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1403          test x"$ac_cv_host_system_type" != x"$host"; } ||
1404        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1405          test x"$ac_cv_build_system_type" != x"$build"; } ||
1406        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1407          test x"$ac_cv_target_system_type" != x"$target"; }; then
1408         echo "$ac_t""different" 1>&6
1409         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1410     else
1411         echo "$ac_t""same" 1>&6
1412     fi
1413     ac_cv_host_system_type="$host"
1414     ac_cv_build_system_type="$build"
1415     ac_cv_target_system_type="$target"
1416
1417
1418 DYNEXP=
1419
1420 #
1421 # Config CPPFLAG settings for strange OS's that must be set
1422 # before other tests.
1423 #
1424 case "$host_os" in
1425 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1426     *hpux*)
1427     
1428       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1429 echo "configure:1430: checking whether ${CC-cc} accepts -Ae" >&5
1430 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1431   echo $ac_n "(cached) $ac_c" 1>&6
1432 else
1433   echo 'void f(){}' > conftest.c
1434 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1435   ac_cv_prog_cc_Ae=yes
1436 else
1437   ac_cv_prog_cc_Ae=no
1438 fi
1439 rm -f conftest*
1440
1441 fi
1442
1443 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1444       # mmap on HPUX is completely broken...
1445       cat >> confdefs.h <<\EOF
1446 #define MMAP_BLACKLIST 1
1447 EOF
1448
1449       if test $ac_cv_prog_cc_Ae = yes; then
1450         CPPFLAGS="$CPPFLAGS -Ae"
1451       fi
1452 #
1453 # Defines needed for HPUX support.
1454 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1455 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1456 #
1457       case `uname -r` in
1458                         *9*|*10*)
1459                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1460                                 cat >> confdefs.h <<\EOF
1461 #define USE_BOTH_CRYPT_CALLS 1
1462 EOF
1463
1464                                 cat >> confdefs.h <<\EOF
1465 #define _HPUX_SOURCE 1
1466 EOF
1467
1468                                 cat >> confdefs.h <<\EOF
1469 #define _POSIX_SOURCE 1
1470 EOF
1471
1472                                 cat >> confdefs.h <<\EOF
1473 #define _ALIGNMENT_REQUIRED 1
1474 EOF
1475
1476                                 cat >> confdefs.h <<\EOF
1477 #define _MAX_ALIGNMENT 4
1478 EOF
1479
1480                                 ;;
1481                         *11*)
1482                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1483                                 cat >> confdefs.h <<\EOF
1484 #define USE_BOTH_CRYPT_CALLS 1
1485 EOF
1486
1487                                 cat >> confdefs.h <<\EOF
1488 #define _HPUX_SOURCE 1
1489 EOF
1490
1491                                 cat >> confdefs.h <<\EOF
1492 #define _POSIX_SOURCE 1
1493 EOF
1494
1495                                 cat >> confdefs.h <<\EOF
1496 #define _LARGEFILE64_SOURCE 1
1497 EOF
1498
1499                                 cat >> confdefs.h <<\EOF
1500 #define _ALIGNMENT_REQUIRED 1
1501 EOF
1502
1503                                 cat >> confdefs.h <<\EOF
1504 #define _MAX_ALIGNMENT 4
1505 EOF
1506
1507                                 ;;
1508       esac
1509       DYNEXP="-Wl,-E"
1510       ;;
1511
1512 #
1513 # CRAY Unicos has broken const handling
1514        *unicos*)
1515           echo "$ac_t""disabling const" 1>&6
1516           CPPFLAGS="$CPPFLAGS -Dconst="
1517           ;;
1518         
1519 #
1520 # AIX4.x doesn't even admit to having large
1521 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1522 #
1523     *aix4*)
1524           echo "$ac_t""enabling large file support" 1>&6
1525       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1526       cat >> confdefs.h <<\EOF
1527 #define _LARGE_FILES 1
1528 EOF
1529
1530       ;;    
1531 #
1532 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1533 # to the existance of large files..
1534 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1535 # recommendations on large file support, however it makes the
1536 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1537 # recommendation makes the compile fail on gcc2.7. JRA.
1538 #
1539         *solaris*)
1540                 case `uname -r` in
1541                         5.0*|5.1*|5.2*|5.3*|5.5*)
1542                                 echo "$ac_t""no large file support" 1>&6
1543                                 ;;
1544                         5.*)
1545                         echo "$ac_t""enabling large file support" 1>&6
1546                         if test "$ac_cv_prog_gcc" = yes; then
1547                                 ${CC-cc} -v >conftest.c 2>&1
1548                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1549                                 rm -fr conftest.c
1550                                 case "$ac_cv_gcc_compiler_version_number" in
1551                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1552                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1553                                                 cat >> confdefs.h <<\EOF
1554 #define _LARGEFILE64_SOURCE 1
1555 EOF
1556
1557                                                 ;;
1558                                         *)
1559                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1560                                                 cat >> confdefs.h <<\EOF
1561 #define _LARGEFILE64_SOURCE 1
1562 EOF
1563
1564                                                 cat >> confdefs.h <<\EOF
1565 #define _FILE_OFFSET_BITS 64
1566 EOF
1567
1568                                                 ;;
1569                                 esac
1570                         else
1571                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1572                                 cat >> confdefs.h <<\EOF
1573 #define _LARGEFILE64_SOURCE 1
1574 EOF
1575
1576                                 cat >> confdefs.h <<\EOF
1577 #define _FILE_OFFSET_BITS 64
1578 EOF
1579
1580                         fi
1581                         ;;
1582                 esac
1583                 ;;
1584 #
1585 # Tests needed for SINIX large file support.
1586 #
1587     *sysv4*)
1588       if test $host = mips-sni-sysv4 ; then
1589         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1590 echo "configure:1591: checking for LFS support" >&5
1591         old_CPPFLAGS="$CPPFLAGS"
1592         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1593         if test "$cross_compiling" = yes; then
1594   SINIX_LFS_SUPPORT=cross
1595 else
1596   cat > conftest.$ac_ext <<EOF
1597 #line 1598 "configure"
1598 #include "confdefs.h"
1599
1600 #include <unistd.h>
1601 main () {
1602 #if _LFS64_LARGEFILE == 1
1603 exit(0);
1604 #else
1605 exit(1);
1606 #endif
1607 }
1608 EOF
1609 if { (eval echo configure:1610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1610 then
1611   SINIX_LFS_SUPPORT=yes
1612 else
1613   echo "configure: failed program was:" >&5
1614   cat conftest.$ac_ext >&5
1615   rm -fr conftest*
1616   SINIX_LFS_SUPPORT=no
1617 fi
1618 rm -fr conftest*
1619 fi
1620
1621         CPPFLAGS="$old_CPPFLAGS"
1622         if test x$SINIX_LFS_SUPPORT = xyes ; then
1623           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1624           cat >> confdefs.h <<\EOF
1625 #define _LARGEFILE64_SOURCE 1
1626 EOF
1627
1628           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1629           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1630           LIBS="`getconf LFS64_LIBS` $LIBS"
1631         fi
1632       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1633       fi
1634     ;;
1635
1636 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1637 #
1638     *linux*)
1639         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1640 echo "configure:1641: checking for LFS support" >&5
1641         old_CPPFLAGS="$CPPFLAGS"
1642         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1643        if test "$cross_compiling" = yes; then
1644   LINUX_LFS_SUPPORT=cross
1645 else
1646   cat > conftest.$ac_ext <<EOF
1647 #line 1648 "configure"
1648 #include "confdefs.h"
1649
1650 #include <unistd.h>
1651 #include <sys/utsname.h>
1652 main() {
1653 #if _LFS64_LARGEFILE == 1
1654        struct utsname uts;
1655        char *release;
1656        int major, minor;
1657
1658        /* Ensure this is glibc 2.2 or higher */
1659 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1660        int libc_major = __GLIBC__;
1661        int libc_minor = __GLIBC_MINOR__;
1662
1663        if (libc_major < 2)
1664               exit(1);
1665        if (libc_minor < 2)
1666               exit(1);
1667 #endif
1668
1669        /* Ensure this is kernel 2.4 or higher */
1670
1671        uname(&uts);
1672        release = uts.release;
1673        major = atoi(strsep(&release, "."));
1674        minor = atoi(strsep(&release, "."));
1675
1676        if (major > 2 || (major == 2 && minor > 3))
1677                exit(0);
1678        exit(1);
1679 #else
1680        exit(1);
1681 #endif
1682 }
1683
1684 EOF
1685 if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1686 then
1687   LINUX_LFS_SUPPORT=yes
1688 else
1689   echo "configure: failed program was:" >&5
1690   cat conftest.$ac_ext >&5
1691   rm -fr conftest*
1692   LINUX_LFS_SUPPORT=no
1693 fi
1694 rm -fr conftest*
1695 fi
1696
1697         CPPFLAGS="$old_CPPFLAGS"
1698         if test x$LINUX_LFS_SUPPORT = xyes ; then
1699           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1700           cat >> confdefs.h <<\EOF
1701 #define _LARGEFILE64_SOURCE 1
1702 EOF
1703
1704           cat >> confdefs.h <<\EOF
1705 #define _FILE_OFFSET_BITS 64
1706 EOF
1707
1708           cat >> confdefs.h <<\EOF
1709 #define _GNU_SOURCE 1
1710 EOF
1711
1712         fi
1713        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1714                 ;;
1715
1716     *hurd*)
1717         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1718 echo "configure:1719: checking for LFS support" >&5
1719         old_CPPFLAGS="$CPPFLAGS"
1720         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1721         if test "$cross_compiling" = yes; then
1722   GLIBC_LFS_SUPPORT=cross
1723 else
1724   cat > conftest.$ac_ext <<EOF
1725 #line 1726 "configure"
1726 #include "confdefs.h"
1727
1728 #include <unistd.h>
1729 main () {
1730 #if _LFS64_LARGEFILE == 1
1731 exit(0);
1732 #else
1733 exit(1);
1734 #endif
1735 }
1736 EOF
1737 if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1738 then
1739   GLIBC_LFS_SUPPORT=yes
1740 else
1741   echo "configure: failed program was:" >&5
1742   cat conftest.$ac_ext >&5
1743   rm -fr conftest*
1744   GLIBC_LFS_SUPPORT=no
1745 fi
1746 rm -fr conftest*
1747 fi
1748
1749         CPPFLAGS="$old_CPPFLAGS"
1750         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1751           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1752           cat >> confdefs.h <<\EOF
1753 #define _LARGEFILE64_SOURCE 1
1754 EOF
1755
1756           cat >> confdefs.h <<\EOF
1757 #define _GNU_SOURCE 1
1758 EOF
1759
1760         fi
1761       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1762     ;;
1763
1764 esac
1765
1766 echo $ac_n "checking for inline""... $ac_c" 1>&6
1767 echo "configure:1768: checking for inline" >&5
1768 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1769   echo $ac_n "(cached) $ac_c" 1>&6
1770 else
1771   ac_cv_c_inline=no
1772 for ac_kw in inline __inline__ __inline; do
1773   cat > conftest.$ac_ext <<EOF
1774 #line 1775 "configure"
1775 #include "confdefs.h"
1776
1777 int main() {
1778 } $ac_kw foo() {
1779 ; return 0; }
1780 EOF
1781 if { (eval echo configure:1782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1782   rm -rf conftest*
1783   ac_cv_c_inline=$ac_kw; break
1784 else
1785   echo "configure: failed program was:" >&5
1786   cat conftest.$ac_ext >&5
1787 fi
1788 rm -f conftest*
1789 done
1790
1791 fi
1792
1793 echo "$ac_t""$ac_cv_c_inline" 1>&6
1794 case "$ac_cv_c_inline" in
1795   inline | yes) ;;
1796   no) cat >> confdefs.h <<\EOF
1797 #define inline 
1798 EOF
1799  ;;
1800   *)  cat >> confdefs.h <<EOF
1801 #define inline $ac_cv_c_inline
1802 EOF
1803  ;;
1804 esac
1805
1806 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1807 echo "configure:1808: checking how to run the C preprocessor" >&5
1808 # On Suns, sometimes $CPP names a directory.
1809 if test -n "$CPP" && test -d "$CPP"; then
1810   CPP=
1811 fi
1812 if test -z "$CPP"; then
1813 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1814   echo $ac_n "(cached) $ac_c" 1>&6
1815 else
1816     # This must be in double quotes, not single quotes, because CPP may get
1817   # substituted into the Makefile and "${CC-cc}" will confuse make.
1818   CPP="${CC-cc} -E"
1819   # On the NeXT, cc -E runs the code through the compiler's parser,
1820   # not just through cpp.
1821   cat > conftest.$ac_ext <<EOF
1822 #line 1823 "configure"
1823 #include "confdefs.h"
1824 #include <assert.h>
1825 Syntax Error
1826 EOF
1827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1828 { (eval echo configure:1829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1830 if test -z "$ac_err"; then
1831   :
1832 else
1833   echo "$ac_err" >&5
1834   echo "configure: failed program was:" >&5
1835   cat conftest.$ac_ext >&5
1836   rm -rf conftest*
1837   CPP="${CC-cc} -E -traditional-cpp"
1838   cat > conftest.$ac_ext <<EOF
1839 #line 1840 "configure"
1840 #include "confdefs.h"
1841 #include <assert.h>
1842 Syntax Error
1843 EOF
1844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1845 { (eval echo configure:1846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1847 if test -z "$ac_err"; then
1848   :
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   CPP="${CC-cc} -nologo -E"
1855   cat > conftest.$ac_ext <<EOF
1856 #line 1857 "configure"
1857 #include "confdefs.h"
1858 #include <assert.h>
1859 Syntax Error
1860 EOF
1861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1862 { (eval echo configure:1863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1864 if test -z "$ac_err"; then
1865   :
1866 else
1867   echo "$ac_err" >&5
1868   echo "configure: failed program was:" >&5
1869   cat conftest.$ac_ext >&5
1870   rm -rf conftest*
1871   CPP=/lib/cpp
1872 fi
1873 rm -f conftest*
1874 fi
1875 rm -f conftest*
1876 fi
1877 rm -f conftest*
1878   ac_cv_prog_CPP="$CPP"
1879 fi
1880   CPP="$ac_cv_prog_CPP"
1881 else
1882   ac_cv_prog_CPP="$CPP"
1883 fi
1884 echo "$ac_t""$CPP" 1>&6
1885
1886 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1887 echo "configure:1888: checking for ANSI C header files" >&5
1888 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1889   echo $ac_n "(cached) $ac_c" 1>&6
1890 else
1891   cat > conftest.$ac_ext <<EOF
1892 #line 1893 "configure"
1893 #include "confdefs.h"
1894 #include <stdlib.h>
1895 #include <stdarg.h>
1896 #include <string.h>
1897 #include <float.h>
1898 EOF
1899 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1900 { (eval echo configure:1901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1901 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1902 if test -z "$ac_err"; then
1903   rm -rf conftest*
1904   ac_cv_header_stdc=yes
1905 else
1906   echo "$ac_err" >&5
1907   echo "configure: failed program was:" >&5
1908   cat conftest.$ac_ext >&5
1909   rm -rf conftest*
1910   ac_cv_header_stdc=no
1911 fi
1912 rm -f conftest*
1913
1914 if test $ac_cv_header_stdc = yes; then
1915   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1916 cat > conftest.$ac_ext <<EOF
1917 #line 1918 "configure"
1918 #include "confdefs.h"
1919 #include <string.h>
1920 EOF
1921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1922   egrep "memchr" >/dev/null 2>&1; then
1923   :
1924 else
1925   rm -rf conftest*
1926   ac_cv_header_stdc=no
1927 fi
1928 rm -f conftest*
1929
1930 fi
1931
1932 if test $ac_cv_header_stdc = yes; then
1933   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1934 cat > conftest.$ac_ext <<EOF
1935 #line 1936 "configure"
1936 #include "confdefs.h"
1937 #include <stdlib.h>
1938 EOF
1939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1940   egrep "free" >/dev/null 2>&1; then
1941   :
1942 else
1943   rm -rf conftest*
1944   ac_cv_header_stdc=no
1945 fi
1946 rm -f conftest*
1947
1948 fi
1949
1950 if test $ac_cv_header_stdc = yes; then
1951   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1952 if test "$cross_compiling" = yes; then
1953   :
1954 else
1955   cat > conftest.$ac_ext <<EOF
1956 #line 1957 "configure"
1957 #include "confdefs.h"
1958 #include <ctype.h>
1959 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1960 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1961 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1962 int main () { int i; for (i = 0; i < 256; i++)
1963 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1964 exit (0); }
1965
1966 EOF
1967 if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1968 then
1969   :
1970 else
1971   echo "configure: failed program was:" >&5
1972   cat conftest.$ac_ext >&5
1973   rm -fr conftest*
1974   ac_cv_header_stdc=no
1975 fi
1976 rm -fr conftest*
1977 fi
1978
1979 fi
1980 fi
1981
1982 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1983 if test $ac_cv_header_stdc = yes; then
1984   cat >> confdefs.h <<\EOF
1985 #define STDC_HEADERS 1
1986 EOF
1987
1988 fi
1989
1990 ac_header_dirent=no
1991 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1992 do
1993 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1994 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1995 echo "configure:1996: checking for $ac_hdr that defines DIR" >&5
1996 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1997   echo $ac_n "(cached) $ac_c" 1>&6
1998 else
1999   cat > conftest.$ac_ext <<EOF
2000 #line 2001 "configure"
2001 #include "confdefs.h"
2002 #include <sys/types.h>
2003 #include <$ac_hdr>
2004 int main() {
2005 DIR *dirp = 0;
2006 ; return 0; }
2007 EOF
2008 if { (eval echo configure:2009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2009   rm -rf conftest*
2010   eval "ac_cv_header_dirent_$ac_safe=yes"
2011 else
2012   echo "configure: failed program was:" >&5
2013   cat conftest.$ac_ext >&5
2014   rm -rf conftest*
2015   eval "ac_cv_header_dirent_$ac_safe=no"
2016 fi
2017 rm -f conftest*
2018 fi
2019 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2020   echo "$ac_t""yes" 1>&6
2021     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2022   cat >> confdefs.h <<EOF
2023 #define $ac_tr_hdr 1
2024 EOF
2025  ac_header_dirent=$ac_hdr; break
2026 else
2027   echo "$ac_t""no" 1>&6
2028 fi
2029 done
2030 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2031 if test $ac_header_dirent = dirent.h; then
2032 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2033 echo "configure:2034: checking for opendir in -ldir" >&5
2034 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2035 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2036   echo $ac_n "(cached) $ac_c" 1>&6
2037 else
2038   ac_save_LIBS="$LIBS"
2039 LIBS="-ldir  $LIBS"
2040 cat > conftest.$ac_ext <<EOF
2041 #line 2042 "configure"
2042 #include "confdefs.h"
2043 /* Override any gcc2 internal prototype to avoid an error.  */
2044 /* We use char because int might match the return type of a gcc2
2045     builtin and then its argument prototype would still apply.  */
2046 char opendir();
2047
2048 int main() {
2049 opendir()
2050 ; return 0; }
2051 EOF
2052 if { (eval echo configure:2053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2053   rm -rf conftest*
2054   eval "ac_cv_lib_$ac_lib_var=yes"
2055 else
2056   echo "configure: failed program was:" >&5
2057   cat conftest.$ac_ext >&5
2058   rm -rf conftest*
2059   eval "ac_cv_lib_$ac_lib_var=no"
2060 fi
2061 rm -f conftest*
2062 LIBS="$ac_save_LIBS"
2063
2064 fi
2065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2066   echo "$ac_t""yes" 1>&6
2067   LIBS="$LIBS -ldir"
2068 else
2069   echo "$ac_t""no" 1>&6
2070 fi
2071
2072 else
2073 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2074 echo "configure:2075: checking for opendir in -lx" >&5
2075 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2076 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2077   echo $ac_n "(cached) $ac_c" 1>&6
2078 else
2079   ac_save_LIBS="$LIBS"
2080 LIBS="-lx  $LIBS"
2081 cat > conftest.$ac_ext <<EOF
2082 #line 2083 "configure"
2083 #include "confdefs.h"
2084 /* Override any gcc2 internal prototype to avoid an error.  */
2085 /* We use char because int might match the return type of a gcc2
2086     builtin and then its argument prototype would still apply.  */
2087 char opendir();
2088
2089 int main() {
2090 opendir()
2091 ; return 0; }
2092 EOF
2093 if { (eval echo configure:2094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2094   rm -rf conftest*
2095   eval "ac_cv_lib_$ac_lib_var=yes"
2096 else
2097   echo "configure: failed program was:" >&5
2098   cat conftest.$ac_ext >&5
2099   rm -rf conftest*
2100   eval "ac_cv_lib_$ac_lib_var=no"
2101 fi
2102 rm -f conftest*
2103 LIBS="$ac_save_LIBS"
2104
2105 fi
2106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2107   echo "$ac_t""yes" 1>&6
2108   LIBS="$LIBS -lx"
2109 else
2110   echo "$ac_t""no" 1>&6
2111 fi
2112
2113 fi
2114
2115 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2116 echo "configure:2117: checking whether time.h and sys/time.h may both be included" >&5
2117 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2118   echo $ac_n "(cached) $ac_c" 1>&6
2119 else
2120   cat > conftest.$ac_ext <<EOF
2121 #line 2122 "configure"
2122 #include "confdefs.h"
2123 #include <sys/types.h>
2124 #include <sys/time.h>
2125 #include <time.h>
2126 int main() {
2127 struct tm *tp;
2128 ; return 0; }
2129 EOF
2130 if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2131   rm -rf conftest*
2132   ac_cv_header_time=yes
2133 else
2134   echo "configure: failed program was:" >&5
2135   cat conftest.$ac_ext >&5
2136   rm -rf conftest*
2137   ac_cv_header_time=no
2138 fi
2139 rm -f conftest*
2140 fi
2141
2142 echo "$ac_t""$ac_cv_header_time" 1>&6
2143 if test $ac_cv_header_time = yes; then
2144   cat >> confdefs.h <<\EOF
2145 #define TIME_WITH_SYS_TIME 1
2146 EOF
2147
2148 fi
2149
2150 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2151 echo "configure:2152: checking for sys/wait.h that is POSIX.1 compatible" >&5
2152 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2153   echo $ac_n "(cached) $ac_c" 1>&6
2154 else
2155   cat > conftest.$ac_ext <<EOF
2156 #line 2157 "configure"
2157 #include "confdefs.h"
2158 #include <sys/types.h>
2159 #include <sys/wait.h>
2160 #ifndef WEXITSTATUS
2161 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2162 #endif
2163 #ifndef WIFEXITED
2164 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2165 #endif
2166 int main() {
2167 int s;
2168 wait (&s);
2169 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2170 ; return 0; }
2171 EOF
2172 if { (eval echo configure:2173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2173   rm -rf conftest*
2174   ac_cv_header_sys_wait_h=yes
2175 else
2176   echo "configure: failed program was:" >&5
2177   cat conftest.$ac_ext >&5
2178   rm -rf conftest*
2179   ac_cv_header_sys_wait_h=no
2180 fi
2181 rm -f conftest*
2182 fi
2183
2184 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2185 if test $ac_cv_header_sys_wait_h = yes; then
2186   cat >> confdefs.h <<\EOF
2187 #define HAVE_SYS_WAIT_H 1
2188 EOF
2189
2190 fi
2191
2192 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2193 do
2194 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2195 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2196 echo "configure:2197: checking for $ac_hdr" >&5
2197 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2198   echo $ac_n "(cached) $ac_c" 1>&6
2199 else
2200   cat > conftest.$ac_ext <<EOF
2201 #line 2202 "configure"
2202 #include "confdefs.h"
2203 #include <$ac_hdr>
2204 EOF
2205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2206 { (eval echo configure:2207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2208 if test -z "$ac_err"; then
2209   rm -rf conftest*
2210   eval "ac_cv_header_$ac_safe=yes"
2211 else
2212   echo "$ac_err" >&5
2213   echo "configure: failed program was:" >&5
2214   cat conftest.$ac_ext >&5
2215   rm -rf conftest*
2216   eval "ac_cv_header_$ac_safe=no"
2217 fi
2218 rm -f conftest*
2219 fi
2220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2221   echo "$ac_t""yes" 1>&6
2222     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2223   cat >> confdefs.h <<EOF
2224 #define $ac_tr_hdr 1
2225 EOF
2226  
2227 else
2228   echo "$ac_t""no" 1>&6
2229 fi
2230 done
2231
2232 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2233 do
2234 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2235 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2236 echo "configure:2237: checking for $ac_hdr" >&5
2237 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2238   echo $ac_n "(cached) $ac_c" 1>&6
2239 else
2240   cat > conftest.$ac_ext <<EOF
2241 #line 2242 "configure"
2242 #include "confdefs.h"
2243 #include <$ac_hdr>
2244 EOF
2245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2246 { (eval echo configure:2247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2248 if test -z "$ac_err"; then
2249   rm -rf conftest*
2250   eval "ac_cv_header_$ac_safe=yes"
2251 else
2252   echo "$ac_err" >&5
2253   echo "configure: failed program was:" >&5
2254   cat conftest.$ac_ext >&5
2255   rm -rf conftest*
2256   eval "ac_cv_header_$ac_safe=no"
2257 fi
2258 rm -f conftest*
2259 fi
2260 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2261   echo "$ac_t""yes" 1>&6
2262     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2263   cat >> confdefs.h <<EOF
2264 #define $ac_tr_hdr 1
2265 EOF
2266  
2267 else
2268   echo "$ac_t""no" 1>&6
2269 fi
2270 done
2271
2272 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2273 do
2274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2276 echo "configure:2277: checking for $ac_hdr" >&5
2277 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2278   echo $ac_n "(cached) $ac_c" 1>&6
2279 else
2280   cat > conftest.$ac_ext <<EOF
2281 #line 2282 "configure"
2282 #include "confdefs.h"
2283 #include <$ac_hdr>
2284 EOF
2285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2286 { (eval echo configure:2287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2288 if test -z "$ac_err"; then
2289   rm -rf conftest*
2290   eval "ac_cv_header_$ac_safe=yes"
2291 else
2292   echo "$ac_err" >&5
2293   echo "configure: failed program was:" >&5
2294   cat conftest.$ac_ext >&5
2295   rm -rf conftest*
2296   eval "ac_cv_header_$ac_safe=no"
2297 fi
2298 rm -f conftest*
2299 fi
2300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2301   echo "$ac_t""yes" 1>&6
2302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2303   cat >> confdefs.h <<EOF
2304 #define $ac_tr_hdr 1
2305 EOF
2306  
2307 else
2308   echo "$ac_t""no" 1>&6
2309 fi
2310 done
2311
2312 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2313 do
2314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2316 echo "configure:2317: checking for $ac_hdr" >&5
2317 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2318   echo $ac_n "(cached) $ac_c" 1>&6
2319 else
2320   cat > conftest.$ac_ext <<EOF
2321 #line 2322 "configure"
2322 #include "confdefs.h"
2323 #include <$ac_hdr>
2324 EOF
2325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2326 { (eval echo configure:2327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2328 if test -z "$ac_err"; then
2329   rm -rf conftest*
2330   eval "ac_cv_header_$ac_safe=yes"
2331 else
2332   echo "$ac_err" >&5
2333   echo "configure: failed program was:" >&5
2334   cat conftest.$ac_ext >&5
2335   rm -rf conftest*
2336   eval "ac_cv_header_$ac_safe=no"
2337 fi
2338 rm -f conftest*
2339 fi
2340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2341   echo "$ac_t""yes" 1>&6
2342     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2343   cat >> confdefs.h <<EOF
2344 #define $ac_tr_hdr 1
2345 EOF
2346  
2347 else
2348   echo "$ac_t""no" 1>&6
2349 fi
2350 done
2351
2352 for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h
2353 do
2354 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2355 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2356 echo "configure:2357: checking for $ac_hdr" >&5
2357 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2358   echo $ac_n "(cached) $ac_c" 1>&6
2359 else
2360   cat > conftest.$ac_ext <<EOF
2361 #line 2362 "configure"
2362 #include "confdefs.h"
2363 #include <$ac_hdr>
2364 EOF
2365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2366 { (eval echo configure:2367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2368 if test -z "$ac_err"; then
2369   rm -rf conftest*
2370   eval "ac_cv_header_$ac_safe=yes"
2371 else
2372   echo "$ac_err" >&5
2373   echo "configure: failed program was:" >&5
2374   cat conftest.$ac_ext >&5
2375   rm -rf conftest*
2376   eval "ac_cv_header_$ac_safe=no"
2377 fi
2378 rm -f conftest*
2379 fi
2380 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2381   echo "$ac_t""yes" 1>&6
2382     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2383   cat >> confdefs.h <<EOF
2384 #define $ac_tr_hdr 1
2385 EOF
2386  
2387 else
2388   echo "$ac_t""no" 1>&6
2389 fi
2390 done
2391
2392 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2393 do
2394 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2395 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2396 echo "configure:2397: checking for $ac_hdr" >&5
2397 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2398   echo $ac_n "(cached) $ac_c" 1>&6
2399 else
2400   cat > conftest.$ac_ext <<EOF
2401 #line 2402 "configure"
2402 #include "confdefs.h"
2403 #include <$ac_hdr>
2404 EOF
2405 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2406 { (eval echo configure:2407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2407 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2408 if test -z "$ac_err"; then
2409   rm -rf conftest*
2410   eval "ac_cv_header_$ac_safe=yes"
2411 else
2412   echo "$ac_err" >&5
2413   echo "configure: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415   rm -rf conftest*
2416   eval "ac_cv_header_$ac_safe=no"
2417 fi
2418 rm -f conftest*
2419 fi
2420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2421   echo "$ac_t""yes" 1>&6
2422     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2423   cat >> confdefs.h <<EOF
2424 #define $ac_tr_hdr 1
2425 EOF
2426  
2427 else
2428   echo "$ac_t""no" 1>&6
2429 fi
2430 done
2431
2432 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2433 do
2434 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2435 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2436 echo "configure:2437: checking for $ac_hdr" >&5
2437 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2438   echo $ac_n "(cached) $ac_c" 1>&6
2439 else
2440   cat > conftest.$ac_ext <<EOF
2441 #line 2442 "configure"
2442 #include "confdefs.h"
2443 #include <$ac_hdr>
2444 EOF
2445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2446 { (eval echo configure:2447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2448 if test -z "$ac_err"; then
2449   rm -rf conftest*
2450   eval "ac_cv_header_$ac_safe=yes"
2451 else
2452   echo "$ac_err" >&5
2453   echo "configure: failed program was:" >&5
2454   cat conftest.$ac_ext >&5
2455   rm -rf conftest*
2456   eval "ac_cv_header_$ac_safe=no"
2457 fi
2458 rm -f conftest*
2459 fi
2460 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2461   echo "$ac_t""yes" 1>&6
2462     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2463   cat >> confdefs.h <<EOF
2464 #define $ac_tr_hdr 1
2465 EOF
2466  
2467 else
2468   echo "$ac_t""no" 1>&6
2469 fi
2470 done
2471
2472 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2473 do
2474 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2475 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2476 echo "configure:2477: checking for $ac_hdr" >&5
2477 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2478   echo $ac_n "(cached) $ac_c" 1>&6
2479 else
2480   cat > conftest.$ac_ext <<EOF
2481 #line 2482 "configure"
2482 #include "confdefs.h"
2483 #include <$ac_hdr>
2484 EOF
2485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2486 { (eval echo configure:2487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2488 if test -z "$ac_err"; then
2489   rm -rf conftest*
2490   eval "ac_cv_header_$ac_safe=yes"
2491 else
2492   echo "$ac_err" >&5
2493   echo "configure: failed program was:" >&5
2494   cat conftest.$ac_ext >&5
2495   rm -rf conftest*
2496   eval "ac_cv_header_$ac_safe=no"
2497 fi
2498 rm -f conftest*
2499 fi
2500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2501   echo "$ac_t""yes" 1>&6
2502     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2503   cat >> confdefs.h <<EOF
2504 #define $ac_tr_hdr 1
2505 EOF
2506  
2507 else
2508   echo "$ac_t""no" 1>&6
2509 fi
2510 done
2511
2512 for ac_hdr in sys/syslog.h syslog.h
2513 do
2514 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2515 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2516 echo "configure:2517: checking for $ac_hdr" >&5
2517 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2518   echo $ac_n "(cached) $ac_c" 1>&6
2519 else
2520   cat > conftest.$ac_ext <<EOF
2521 #line 2522 "configure"
2522 #include "confdefs.h"
2523 #include <$ac_hdr>
2524 EOF
2525 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2526 { (eval echo configure:2527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2527 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2528 if test -z "$ac_err"; then
2529   rm -rf conftest*
2530   eval "ac_cv_header_$ac_safe=yes"
2531 else
2532   echo "$ac_err" >&5
2533   echo "configure: failed program was:" >&5
2534   cat conftest.$ac_ext >&5
2535   rm -rf conftest*
2536   eval "ac_cv_header_$ac_safe=no"
2537 fi
2538 rm -f conftest*
2539 fi
2540 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2541   echo "$ac_t""yes" 1>&6
2542     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2543   cat >> confdefs.h <<EOF
2544 #define $ac_tr_hdr 1
2545 EOF
2546  
2547 else
2548   echo "$ac_t""no" 1>&6
2549 fi
2550 done
2551
2552
2553 #
2554 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2555 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2556 #
2557 case "$host_os" in
2558     *hpux*)
2559                 cat > conftest.$ac_ext <<EOF
2560 #line 2561 "configure"
2561 #include "confdefs.h"
2562 #include <shadow.h>
2563 int main() {
2564 struct spwd testme
2565 ; return 0; }
2566 EOF
2567 if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2568   rm -rf conftest*
2569   ac_cv_header_shadow_h=yes
2570 else
2571   echo "configure: failed program was:" >&5
2572   cat conftest.$ac_ext >&5
2573   rm -rf conftest*
2574   ac_cv_header_shadow_h=no
2575 fi
2576 rm -f conftest*
2577                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2578                    cat >> confdefs.h <<\EOF
2579 #define HAVE_SHADOW_H 1
2580 EOF
2581
2582                 fi
2583         ;;
2584 esac
2585 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2586 do
2587 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2588 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2589 echo "configure:2590: checking for $ac_hdr" >&5
2590 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2591   echo $ac_n "(cached) $ac_c" 1>&6
2592 else
2593   cat > conftest.$ac_ext <<EOF
2594 #line 2595 "configure"
2595 #include "confdefs.h"
2596 #include <$ac_hdr>
2597 EOF
2598 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2599 { (eval echo configure:2600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2600 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2601 if test -z "$ac_err"; then
2602   rm -rf conftest*
2603   eval "ac_cv_header_$ac_safe=yes"
2604 else
2605   echo "$ac_err" >&5
2606   echo "configure: failed program was:" >&5
2607   cat conftest.$ac_ext >&5
2608   rm -rf conftest*
2609   eval "ac_cv_header_$ac_safe=no"
2610 fi
2611 rm -f conftest*
2612 fi
2613 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2614   echo "$ac_t""yes" 1>&6
2615     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2616   cat >> confdefs.h <<EOF
2617 #define $ac_tr_hdr 1
2618 EOF
2619  
2620 else
2621   echo "$ac_t""no" 1>&6
2622 fi
2623 done
2624
2625 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2626 do
2627 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2628 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2629 echo "configure:2630: checking for $ac_hdr" >&5
2630 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2631   echo $ac_n "(cached) $ac_c" 1>&6
2632 else
2633   cat > conftest.$ac_ext <<EOF
2634 #line 2635 "configure"
2635 #include "confdefs.h"
2636 #include <$ac_hdr>
2637 EOF
2638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2639 { (eval echo configure:2640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2641 if test -z "$ac_err"; then
2642   rm -rf conftest*
2643   eval "ac_cv_header_$ac_safe=yes"
2644 else
2645   echo "$ac_err" >&5
2646   echo "configure: failed program was:" >&5
2647   cat conftest.$ac_ext >&5
2648   rm -rf conftest*
2649   eval "ac_cv_header_$ac_safe=no"
2650 fi
2651 rm -f conftest*
2652 fi
2653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2654   echo "$ac_t""yes" 1>&6
2655     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2656   cat >> confdefs.h <<EOF
2657 #define $ac_tr_hdr 1
2658 EOF
2659  
2660 else
2661   echo "$ac_t""no" 1>&6
2662 fi
2663 done
2664
2665 for ac_hdr in stropts.h poll.h
2666 do
2667 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2668 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2669 echo "configure:2670: checking for $ac_hdr" >&5
2670 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2671   echo $ac_n "(cached) $ac_c" 1>&6
2672 else
2673   cat > conftest.$ac_ext <<EOF
2674 #line 2675 "configure"
2675 #include "confdefs.h"
2676 #include <$ac_hdr>
2677 EOF
2678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2679 { (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2681 if test -z "$ac_err"; then
2682   rm -rf conftest*
2683   eval "ac_cv_header_$ac_safe=yes"
2684 else
2685   echo "$ac_err" >&5
2686   echo "configure: failed program was:" >&5
2687   cat conftest.$ac_ext >&5
2688   rm -rf conftest*
2689   eval "ac_cv_header_$ac_safe=no"
2690 fi
2691 rm -f conftest*
2692 fi
2693 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2694   echo "$ac_t""yes" 1>&6
2695     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2696   cat >> confdefs.h <<EOF
2697 #define $ac_tr_hdr 1
2698 EOF
2699  
2700 else
2701   echo "$ac_t""no" 1>&6
2702 fi
2703 done
2704
2705 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2706 do
2707 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2708 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2709 echo "configure:2710: checking for $ac_hdr" >&5
2710 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2711   echo $ac_n "(cached) $ac_c" 1>&6
2712 else
2713   cat > conftest.$ac_ext <<EOF
2714 #line 2715 "configure"
2715 #include "confdefs.h"
2716 #include <$ac_hdr>
2717 EOF
2718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2719 { (eval echo configure:2720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2721 if test -z "$ac_err"; then
2722   rm -rf conftest*
2723   eval "ac_cv_header_$ac_safe=yes"
2724 else
2725   echo "$ac_err" >&5
2726   echo "configure: failed program was:" >&5
2727   cat conftest.$ac_ext >&5
2728   rm -rf conftest*
2729   eval "ac_cv_header_$ac_safe=no"
2730 fi
2731 rm -f conftest*
2732 fi
2733 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2734   echo "$ac_t""yes" 1>&6
2735     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2736   cat >> confdefs.h <<EOF
2737 #define $ac_tr_hdr 1
2738 EOF
2739  
2740 else
2741   echo "$ac_t""no" 1>&6
2742 fi
2743 done
2744
2745 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2746 do
2747 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2748 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2749 echo "configure:2750: checking for $ac_hdr" >&5
2750 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2751   echo $ac_n "(cached) $ac_c" 1>&6
2752 else
2753   cat > conftest.$ac_ext <<EOF
2754 #line 2755 "configure"
2755 #include "confdefs.h"
2756 #include <$ac_hdr>
2757 EOF
2758 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2759 { (eval echo configure:2760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2760 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2761 if test -z "$ac_err"; then
2762   rm -rf conftest*
2763   eval "ac_cv_header_$ac_safe=yes"
2764 else
2765   echo "$ac_err" >&5
2766   echo "configure: failed program was:" >&5
2767   cat conftest.$ac_ext >&5
2768   rm -rf conftest*
2769   eval "ac_cv_header_$ac_safe=no"
2770 fi
2771 rm -f conftest*
2772 fi
2773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2774   echo "$ac_t""yes" 1>&6
2775     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2776   cat >> confdefs.h <<EOF
2777 #define $ac_tr_hdr 1
2778 EOF
2779  
2780 else
2781   echo "$ac_t""no" 1>&6
2782 fi
2783 done
2784
2785
2786 # For experimental utmp support (lastlog on some BSD-like systems)
2787 for ac_hdr in utmp.h utmpx.h lastlog.h
2788 do
2789 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2790 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2791 echo "configure:2792: checking for $ac_hdr" >&5
2792 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2793   echo $ac_n "(cached) $ac_c" 1>&6
2794 else
2795   cat > conftest.$ac_ext <<EOF
2796 #line 2797 "configure"
2797 #include "confdefs.h"
2798 #include <$ac_hdr>
2799 EOF
2800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2801 { (eval echo configure:2802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2803 if test -z "$ac_err"; then
2804   rm -rf conftest*
2805   eval "ac_cv_header_$ac_safe=yes"
2806 else
2807   echo "$ac_err" >&5
2808   echo "configure: failed program was:" >&5
2809   cat conftest.$ac_ext >&5
2810   rm -rf conftest*
2811   eval "ac_cv_header_$ac_safe=no"
2812 fi
2813 rm -f conftest*
2814 fi
2815 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2816   echo "$ac_t""yes" 1>&6
2817     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2818   cat >> confdefs.h <<EOF
2819 #define $ac_tr_hdr 1
2820 EOF
2821  
2822 else
2823   echo "$ac_t""no" 1>&6
2824 fi
2825 done
2826
2827  
2828 # For quotas on Veritas VxFS filesystems
2829 for ac_hdr in sys/fs/vx_quota.h
2830 do
2831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2832 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2833 echo "configure:2834: checking for $ac_hdr" >&5
2834 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2835   echo $ac_n "(cached) $ac_c" 1>&6
2836 else
2837   cat > conftest.$ac_ext <<EOF
2838 #line 2839 "configure"
2839 #include "confdefs.h"
2840 #include <$ac_hdr>
2841 EOF
2842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2843 { (eval echo configure:2844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2845 if test -z "$ac_err"; then
2846   rm -rf conftest*
2847   eval "ac_cv_header_$ac_safe=yes"
2848 else
2849   echo "$ac_err" >&5
2850   echo "configure: failed program was:" >&5
2851   cat conftest.$ac_ext >&5
2852   rm -rf conftest*
2853   eval "ac_cv_header_$ac_safe=no"
2854 fi
2855 rm -f conftest*
2856 fi
2857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2858   echo "$ac_t""yes" 1>&6
2859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2860   cat >> confdefs.h <<EOF
2861 #define $ac_tr_hdr 1
2862 EOF
2863  
2864 else
2865   echo "$ac_t""no" 1>&6
2866 fi
2867 done
2868
2869
2870 # For quotas on Linux XFS filesystems
2871 for ac_hdr in linux/xqm.h
2872 do
2873 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2874 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2875 echo "configure:2876: checking for $ac_hdr" >&5
2876 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2877   echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879   cat > conftest.$ac_ext <<EOF
2880 #line 2881 "configure"
2881 #include "confdefs.h"
2882 #include <$ac_hdr>
2883 EOF
2884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2885 { (eval echo configure:2886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2887 if test -z "$ac_err"; then
2888   rm -rf conftest*
2889   eval "ac_cv_header_$ac_safe=yes"
2890 else
2891   echo "$ac_err" >&5
2892   echo "configure: failed program was:" >&5
2893   cat conftest.$ac_ext >&5
2894   rm -rf conftest*
2895   eval "ac_cv_header_$ac_safe=no"
2896 fi
2897 rm -f conftest*
2898 fi
2899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2900   echo "$ac_t""yes" 1>&6
2901     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2902   cat >> confdefs.h <<EOF
2903 #define $ac_tr_hdr 1
2904 EOF
2905  
2906 else
2907   echo "$ac_t""no" 1>&6
2908 fi
2909 done
2910
2911
2912 echo $ac_n "checking size of int""... $ac_c" 1>&6
2913 echo "configure:2914: checking size of int" >&5
2914 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2915   echo $ac_n "(cached) $ac_c" 1>&6
2916 else
2917   if test "$cross_compiling" = yes; then
2918   ac_cv_sizeof_int=cross
2919 else
2920   cat > conftest.$ac_ext <<EOF
2921 #line 2922 "configure"
2922 #include "confdefs.h"
2923 #include <stdio.h>
2924 int main()
2925 {
2926   FILE *f=fopen("conftestval", "w");
2927   if (!f) return(1);
2928   fprintf(f, "%d\n", sizeof(int));
2929   return(0);
2930 }
2931 EOF
2932 if { (eval echo configure:2933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2933 then
2934   ac_cv_sizeof_int=`cat conftestval`
2935 else
2936   echo "configure: failed program was:" >&5
2937   cat conftest.$ac_ext >&5
2938   rm -fr conftest*
2939   ac_cv_sizeof_int=0
2940 fi
2941 rm -fr conftest*
2942 fi
2943
2944 fi
2945 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2946 cat >> confdefs.h <<EOF
2947 #define SIZEOF_INT $ac_cv_sizeof_int
2948 EOF
2949
2950
2951 echo $ac_n "checking size of long""... $ac_c" 1>&6
2952 echo "configure:2953: checking size of long" >&5
2953 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2954   echo $ac_n "(cached) $ac_c" 1>&6
2955 else
2956   if test "$cross_compiling" = yes; then
2957   ac_cv_sizeof_long=cross
2958 else
2959   cat > conftest.$ac_ext <<EOF
2960 #line 2961 "configure"
2961 #include "confdefs.h"
2962 #include <stdio.h>
2963 int main()
2964 {
2965   FILE *f=fopen("conftestval", "w");
2966   if (!f) return(1);
2967   fprintf(f, "%d\n", sizeof(long));
2968   return(0);
2969 }
2970 EOF
2971 if { (eval echo configure:2972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2972 then
2973   ac_cv_sizeof_long=`cat conftestval`
2974 else
2975   echo "configure: failed program was:" >&5
2976   cat conftest.$ac_ext >&5
2977   rm -fr conftest*
2978   ac_cv_sizeof_long=0
2979 fi
2980 rm -fr conftest*
2981 fi
2982
2983 fi
2984 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2985 cat >> confdefs.h <<EOF
2986 #define SIZEOF_LONG $ac_cv_sizeof_long
2987 EOF
2988
2989
2990 echo $ac_n "checking size of short""... $ac_c" 1>&6
2991 echo "configure:2992: checking size of short" >&5
2992 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2993   echo $ac_n "(cached) $ac_c" 1>&6
2994 else
2995   if test "$cross_compiling" = yes; then
2996   ac_cv_sizeof_short=cross
2997 else
2998   cat > conftest.$ac_ext <<EOF
2999 #line 3000 "configure"
3000 #include "confdefs.h"
3001 #include <stdio.h>
3002 int main()
3003 {
3004   FILE *f=fopen("conftestval", "w");
3005   if (!f) return(1);
3006   fprintf(f, "%d\n", sizeof(short));
3007   return(0);
3008 }
3009 EOF
3010 if { (eval echo configure:3011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3011 then
3012   ac_cv_sizeof_short=`cat conftestval`
3013 else
3014   echo "configure: failed program was:" >&5
3015   cat conftest.$ac_ext >&5
3016   rm -fr conftest*
3017   ac_cv_sizeof_short=0
3018 fi
3019 rm -fr conftest*
3020 fi
3021
3022 fi
3023 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3024 cat >> confdefs.h <<EOF
3025 #define SIZEOF_SHORT $ac_cv_sizeof_short
3026 EOF
3027
3028
3029
3030 echo $ac_n "checking for working const""... $ac_c" 1>&6
3031 echo "configure:3032: checking for working const" >&5
3032 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3033   echo $ac_n "(cached) $ac_c" 1>&6
3034 else
3035   cat > conftest.$ac_ext <<EOF
3036 #line 3037 "configure"
3037 #include "confdefs.h"
3038
3039 int main() {
3040
3041 /* Ultrix mips cc rejects this.  */
3042 typedef int charset[2]; const charset x;
3043 /* SunOS 4.1.1 cc rejects this.  */
3044 char const *const *ccp;
3045 char **p;
3046 /* NEC SVR4.0.2 mips cc rejects this.  */
3047 struct point {int x, y;};
3048 static struct point const zero = {0,0};
3049 /* AIX XL C 1.02.0.0 rejects this.
3050    It does not let you subtract one const X* pointer from another in an arm
3051    of an if-expression whose if-part is not a constant expression */
3052 const char *g = "string";
3053 ccp = &g + (g ? g-g : 0);
3054 /* HPUX 7.0 cc rejects these. */
3055 ++ccp;
3056 p = (char**) ccp;
3057 ccp = (char const *const *) p;
3058 { /* SCO 3.2v4 cc rejects this.  */
3059   char *t;
3060   char const *s = 0 ? (char *) 0 : (char const *) 0;
3061
3062   *t++ = 0;
3063 }
3064 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3065   int x[] = {25, 17};
3066   const int *foo = &x[0];
3067   ++foo;
3068 }
3069 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3070   typedef const int *iptr;
3071   iptr p = 0;
3072   ++p;
3073 }
3074 { /* AIX XL C 1.02.0.0 rejects this saying
3075      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3076   struct s { int j; const int *ap[3]; };
3077   struct s *b; b->j = 5;
3078 }
3079 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3080   const int foo = 10;
3081 }
3082
3083 ; return 0; }
3084 EOF
3085 if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3086   rm -rf conftest*
3087   ac_cv_c_const=yes
3088 else
3089   echo "configure: failed program was:" >&5
3090   cat conftest.$ac_ext >&5
3091   rm -rf conftest*
3092   ac_cv_c_const=no
3093 fi
3094 rm -f conftest*
3095 fi
3096
3097 echo "$ac_t""$ac_cv_c_const" 1>&6
3098 if test $ac_cv_c_const = no; then
3099   cat >> confdefs.h <<\EOF
3100 #define const 
3101 EOF
3102
3103 fi
3104
3105 echo $ac_n "checking for inline""... $ac_c" 1>&6
3106 echo "configure:3107: checking for inline" >&5
3107 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3108   echo $ac_n "(cached) $ac_c" 1>&6
3109 else
3110   ac_cv_c_inline=no
3111 for ac_kw in inline __inline__ __inline; do
3112   cat > conftest.$ac_ext <<EOF
3113 #line 3114 "configure"
3114 #include "confdefs.h"
3115
3116 int main() {
3117 } $ac_kw foo() {
3118 ; return 0; }
3119 EOF
3120 if { (eval echo configure:3121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3121   rm -rf conftest*
3122   ac_cv_c_inline=$ac_kw; break
3123 else
3124   echo "configure: failed program was:" >&5
3125   cat conftest.$ac_ext >&5
3126 fi
3127 rm -f conftest*
3128 done
3129
3130 fi
3131
3132 echo "$ac_t""$ac_cv_c_inline" 1>&6
3133 case "$ac_cv_c_inline" in
3134   inline | yes) ;;
3135   no) cat >> confdefs.h <<\EOF
3136 #define inline 
3137 EOF
3138  ;;
3139   *)  cat >> confdefs.h <<EOF
3140 #define inline $ac_cv_c_inline
3141 EOF
3142  ;;
3143 esac
3144
3145 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3146 echo "configure:3147: checking whether byte ordering is bigendian" >&5
3147 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3148   echo $ac_n "(cached) $ac_c" 1>&6
3149 else
3150   ac_cv_c_bigendian=unknown
3151 # See if sys/param.h defines the BYTE_ORDER macro.
3152 cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155 #include <sys/types.h>
3156 #include <sys/param.h>
3157 int main() {
3158
3159 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3160  bogus endian macros
3161 #endif
3162 ; return 0; }
3163 EOF
3164 if { (eval echo configure:3165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3165   rm -rf conftest*
3166   # It does; now see whether it defined to BIG_ENDIAN or not.
3167 cat > conftest.$ac_ext <<EOF
3168 #line 3169 "configure"
3169 #include "confdefs.h"
3170 #include <sys/types.h>
3171 #include <sys/param.h>
3172 int main() {
3173
3174 #if BYTE_ORDER != BIG_ENDIAN
3175  not big endian
3176 #endif
3177 ; return 0; }
3178 EOF
3179 if { (eval echo configure:3180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3180   rm -rf conftest*
3181   ac_cv_c_bigendian=yes
3182 else
3183   echo "configure: failed program was:" >&5
3184   cat conftest.$ac_ext >&5
3185   rm -rf conftest*
3186   ac_cv_c_bigendian=no
3187 fi
3188 rm -f conftest*
3189 else
3190   echo "configure: failed program was:" >&5
3191   cat conftest.$ac_ext >&5
3192 fi
3193 rm -f conftest*
3194 if test $ac_cv_c_bigendian = unknown; then
3195 if test "$cross_compiling" = yes; then
3196     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3197 else
3198   cat > conftest.$ac_ext <<EOF
3199 #line 3200 "configure"
3200 #include "confdefs.h"
3201 main () {
3202   /* Are we little or big endian?  From Harbison&Steele.  */
3203   union
3204   {
3205     long l;
3206     char c[sizeof (long)];
3207   } u;
3208   u.l = 1;
3209   exit (u.c[sizeof (long) - 1] == 1);
3210 }
3211 EOF
3212 if { (eval echo configure:3213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3213 then
3214   ac_cv_c_bigendian=no
3215 else
3216   echo "configure: failed program was:" >&5
3217   cat conftest.$ac_ext >&5
3218   rm -fr conftest*
3219   ac_cv_c_bigendian=yes
3220 fi
3221 rm -fr conftest*
3222 fi
3223
3224 fi
3225 fi
3226
3227 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3228 if test $ac_cv_c_bigendian = yes; then
3229   cat >> confdefs.h <<\EOF
3230 #define WORDS_BIGENDIAN 1
3231 EOF
3232
3233 fi
3234
3235 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3236 echo "configure:3237: checking whether char is unsigned" >&5
3237 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3238   echo $ac_n "(cached) $ac_c" 1>&6
3239 else
3240   if test "$GCC" = yes; then
3241   # GCC predefines this symbol on systems where it applies.
3242 cat > conftest.$ac_ext <<EOF
3243 #line 3244 "configure"
3244 #include "confdefs.h"
3245 #ifdef __CHAR_UNSIGNED__
3246   yes
3247 #endif
3248
3249 EOF
3250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3251   egrep "yes" >/dev/null 2>&1; then
3252   rm -rf conftest*
3253   ac_cv_c_char_unsigned=yes
3254 else
3255   rm -rf conftest*
3256   ac_cv_c_char_unsigned=no
3257 fi
3258 rm -f conftest*
3259
3260 else
3261 if test "$cross_compiling" = yes; then
3262     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3263 else
3264   cat > conftest.$ac_ext <<EOF
3265 #line 3266 "configure"
3266 #include "confdefs.h"
3267 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3268 #if !defined(__STDC__) || __STDC__ != 1
3269 #define volatile
3270 #endif
3271 main() {
3272   volatile char c = 255; exit(c < 0);
3273 }
3274 EOF
3275 if { (eval echo configure:3276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3276 then
3277   ac_cv_c_char_unsigned=yes
3278 else
3279   echo "configure: failed program was:" >&5
3280   cat conftest.$ac_ext >&5
3281   rm -fr conftest*
3282   ac_cv_c_char_unsigned=no
3283 fi
3284 rm -fr conftest*
3285 fi
3286
3287 fi
3288 fi
3289
3290 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3291 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3292   cat >> confdefs.h <<\EOF
3293 #define __CHAR_UNSIGNED__ 1
3294 EOF
3295
3296 fi
3297
3298
3299 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3300 echo "configure:3301: checking return type of signal handlers" >&5
3301 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3302   echo $ac_n "(cached) $ac_c" 1>&6
3303 else
3304   cat > conftest.$ac_ext <<EOF
3305 #line 3306 "configure"
3306 #include "confdefs.h"
3307 #include <sys/types.h>
3308 #include <signal.h>
3309 #ifdef signal
3310 #undef signal
3311 #endif
3312 #ifdef __cplusplus
3313 extern "C" void (*signal (int, void (*)(int)))(int);
3314 #else
3315 void (*signal ()) ();
3316 #endif
3317
3318 int main() {
3319 int i;
3320 ; return 0; }
3321 EOF
3322 if { (eval echo configure:3323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3323   rm -rf conftest*
3324   ac_cv_type_signal=void
3325 else
3326   echo "configure: failed program was:" >&5
3327   cat conftest.$ac_ext >&5
3328   rm -rf conftest*
3329   ac_cv_type_signal=int
3330 fi
3331 rm -f conftest*
3332 fi
3333
3334 echo "$ac_t""$ac_cv_type_signal" 1>&6
3335 cat >> confdefs.h <<EOF
3336 #define RETSIGTYPE $ac_cv_type_signal
3337 EOF
3338
3339
3340 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3341 echo "configure:3342: checking for uid_t in sys/types.h" >&5
3342 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3343   echo $ac_n "(cached) $ac_c" 1>&6
3344 else
3345   cat > conftest.$ac_ext <<EOF
3346 #line 3347 "configure"
3347 #include "confdefs.h"
3348 #include <sys/types.h>
3349 EOF
3350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3351   egrep "uid_t" >/dev/null 2>&1; then
3352   rm -rf conftest*
3353   ac_cv_type_uid_t=yes
3354 else
3355   rm -rf conftest*
3356   ac_cv_type_uid_t=no
3357 fi
3358 rm -f conftest*
3359
3360 fi
3361
3362 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3363 if test $ac_cv_type_uid_t = no; then
3364   cat >> confdefs.h <<\EOF
3365 #define uid_t int
3366 EOF
3367
3368   cat >> confdefs.h <<\EOF
3369 #define gid_t int
3370 EOF
3371
3372 fi
3373
3374 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3375 echo "configure:3376: checking for mode_t" >&5
3376 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3377   echo $ac_n "(cached) $ac_c" 1>&6
3378 else
3379   cat > conftest.$ac_ext <<EOF
3380 #line 3381 "configure"
3381 #include "confdefs.h"
3382 #include <sys/types.h>
3383 #if STDC_HEADERS
3384 #include <stdlib.h>
3385 #include <stddef.h>
3386 #endif
3387 EOF
3388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3389   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3390   rm -rf conftest*
3391   ac_cv_type_mode_t=yes
3392 else
3393   rm -rf conftest*
3394   ac_cv_type_mode_t=no
3395 fi
3396 rm -f conftest*
3397
3398 fi
3399 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3400 if test $ac_cv_type_mode_t = no; then
3401   cat >> confdefs.h <<\EOF
3402 #define mode_t int
3403 EOF
3404
3405 fi
3406
3407 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3408 echo "configure:3409: checking for off_t" >&5
3409 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3410   echo $ac_n "(cached) $ac_c" 1>&6
3411 else
3412   cat > conftest.$ac_ext <<EOF
3413 #line 3414 "configure"
3414 #include "confdefs.h"
3415 #include <sys/types.h>
3416 #if STDC_HEADERS
3417 #include <stdlib.h>
3418 #include <stddef.h>
3419 #endif
3420 EOF
3421 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3422   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3423   rm -rf conftest*
3424   ac_cv_type_off_t=yes
3425 else
3426   rm -rf conftest*
3427   ac_cv_type_off_t=no
3428 fi
3429 rm -f conftest*
3430
3431 fi
3432 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3433 if test $ac_cv_type_off_t = no; then
3434   cat >> confdefs.h <<\EOF
3435 #define off_t long
3436 EOF
3437
3438 fi
3439
3440 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3441 echo "configure:3442: checking for size_t" >&5
3442 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3443   echo $ac_n "(cached) $ac_c" 1>&6
3444 else
3445   cat > conftest.$ac_ext <<EOF
3446 #line 3447 "configure"
3447 #include "confdefs.h"
3448 #include <sys/types.h>
3449 #if STDC_HEADERS
3450 #include <stdlib.h>
3451 #include <stddef.h>
3452 #endif
3453 EOF
3454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3455   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3456   rm -rf conftest*
3457   ac_cv_type_size_t=yes
3458 else
3459   rm -rf conftest*
3460   ac_cv_type_size_t=no
3461 fi
3462 rm -f conftest*
3463
3464 fi
3465 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3466 if test $ac_cv_type_size_t = no; then
3467   cat >> confdefs.h <<\EOF
3468 #define size_t unsigned
3469 EOF
3470
3471 fi
3472
3473 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3474 echo "configure:3475: checking for pid_t" >&5
3475 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3476   echo $ac_n "(cached) $ac_c" 1>&6
3477 else
3478   cat > conftest.$ac_ext <<EOF
3479 #line 3480 "configure"
3480 #include "confdefs.h"
3481 #include <sys/types.h>
3482 #if STDC_HEADERS
3483 #include <stdlib.h>
3484 #include <stddef.h>
3485 #endif
3486 EOF
3487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3488   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3489   rm -rf conftest*
3490   ac_cv_type_pid_t=yes
3491 else
3492   rm -rf conftest*
3493   ac_cv_type_pid_t=no
3494 fi
3495 rm -f conftest*
3496
3497 fi
3498 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3499 if test $ac_cv_type_pid_t = no; then
3500   cat >> confdefs.h <<\EOF
3501 #define pid_t int
3502 EOF
3503
3504 fi
3505
3506 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3507 echo "configure:3508: checking for st_rdev in struct stat" >&5
3508 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3509   echo $ac_n "(cached) $ac_c" 1>&6
3510 else
3511   cat > conftest.$ac_ext <<EOF
3512 #line 3513 "configure"
3513 #include "confdefs.h"
3514 #include <sys/types.h>
3515 #include <sys/stat.h>
3516 int main() {
3517 struct stat s; s.st_rdev;
3518 ; return 0; }
3519 EOF
3520 if { (eval echo configure:3521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3521   rm -rf conftest*
3522   ac_cv_struct_st_rdev=yes
3523 else
3524   echo "configure: failed program was:" >&5
3525   cat conftest.$ac_ext >&5
3526   rm -rf conftest*
3527   ac_cv_struct_st_rdev=no
3528 fi
3529 rm -f conftest*
3530 fi
3531
3532 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3533 if test $ac_cv_struct_st_rdev = yes; then
3534   cat >> confdefs.h <<\EOF
3535 #define HAVE_ST_RDEV 1
3536 EOF
3537
3538 fi
3539
3540 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3541 echo "configure:3542: checking for d_off in dirent" >&5
3542 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3543   echo $ac_n "(cached) $ac_c" 1>&6
3544 else
3545   cat > conftest.$ac_ext <<EOF
3546 #line 3547 "configure"
3547 #include "confdefs.h"
3548
3549 #include <unistd.h>
3550 #include <sys/types.h>
3551 #include <dirent.h>
3552 int main() {
3553 struct dirent d; d.d_off;
3554 ; return 0; }
3555 EOF
3556 if { (eval echo configure:3557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3557   rm -rf conftest*
3558   ac_cv_dirent_d_off=yes
3559 else
3560   echo "configure: failed program was:" >&5
3561   cat conftest.$ac_ext >&5
3562   rm -rf conftest*
3563   ac_cv_dirent_d_off=no
3564 fi
3565 rm -f conftest*
3566 fi
3567
3568 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3569 if test $ac_cv_dirent_d_off = yes; then
3570   cat >> confdefs.h <<\EOF
3571 #define HAVE_DIRENT_D_OFF 1
3572 EOF
3573
3574 fi
3575
3576 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3577 echo "configure:3578: checking for ino_t" >&5
3578 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3579   echo $ac_n "(cached) $ac_c" 1>&6
3580 else
3581   cat > conftest.$ac_ext <<EOF
3582 #line 3583 "configure"
3583 #include "confdefs.h"
3584 #include <sys/types.h>
3585 #if STDC_HEADERS
3586 #include <stdlib.h>
3587 #include <stddef.h>
3588 #endif
3589 EOF
3590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3591   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3592   rm -rf conftest*
3593   ac_cv_type_ino_t=yes
3594 else
3595   rm -rf conftest*
3596   ac_cv_type_ino_t=no
3597 fi
3598 rm -f conftest*
3599
3600 fi
3601 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3602 if test $ac_cv_type_ino_t = no; then
3603   cat >> confdefs.h <<\EOF
3604 #define ino_t unsigned
3605 EOF
3606
3607 fi
3608
3609 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3610 echo "configure:3611: checking for loff_t" >&5
3611 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3612   echo $ac_n "(cached) $ac_c" 1>&6
3613 else
3614   cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617 #include <sys/types.h>
3618 #if STDC_HEADERS
3619 #include <stdlib.h>
3620 #include <stddef.h>
3621 #endif
3622 EOF
3623 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3624   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3625   rm -rf conftest*
3626   ac_cv_type_loff_t=yes
3627 else
3628   rm -rf conftest*
3629   ac_cv_type_loff_t=no
3630 fi
3631 rm -f conftest*
3632
3633 fi
3634 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3635 if test $ac_cv_type_loff_t = no; then
3636   cat >> confdefs.h <<\EOF
3637 #define loff_t off_t
3638 EOF
3639
3640 fi
3641
3642 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3643 echo "configure:3644: checking for offset_t" >&5
3644 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3645   echo $ac_n "(cached) $ac_c" 1>&6
3646 else
3647   cat > conftest.$ac_ext <<EOF
3648 #line 3649 "configure"
3649 #include "confdefs.h"
3650 #include <sys/types.h>
3651 #if STDC_HEADERS
3652 #include <stdlib.h>
3653 #include <stddef.h>
3654 #endif
3655 EOF
3656 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3657   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3658   rm -rf conftest*
3659   ac_cv_type_offset_t=yes
3660 else
3661   rm -rf conftest*
3662   ac_cv_type_offset_t=no
3663 fi
3664 rm -f conftest*
3665
3666 fi
3667 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3668 if test $ac_cv_type_offset_t = no; then
3669   cat >> confdefs.h <<\EOF
3670 #define offset_t loff_t
3671 EOF
3672
3673 fi
3674
3675 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3676 echo "configure:3677: checking for ssize_t" >&5
3677 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3678   echo $ac_n "(cached) $ac_c" 1>&6
3679 else
3680   cat > conftest.$ac_ext <<EOF
3681 #line 3682 "configure"
3682 #include "confdefs.h"
3683 #include <sys/types.h>
3684 #if STDC_HEADERS
3685 #include <stdlib.h>
3686 #include <stddef.h>
3687 #endif
3688 EOF
3689 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3690   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3691   rm -rf conftest*
3692   ac_cv_type_ssize_t=yes
3693 else
3694   rm -rf conftest*
3695   ac_cv_type_ssize_t=no
3696 fi
3697 rm -f conftest*
3698
3699 fi
3700 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3701 if test $ac_cv_type_ssize_t = no; then
3702   cat >> confdefs.h <<\EOF
3703 #define ssize_t int
3704 EOF
3705
3706 fi
3707
3708 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3709 echo "configure:3710: checking for wchar_t" >&5
3710 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3711   echo $ac_n "(cached) $ac_c" 1>&6
3712 else
3713   cat > conftest.$ac_ext <<EOF
3714 #line 3715 "configure"
3715 #include "confdefs.h"
3716 #include <sys/types.h>
3717 #if STDC_HEADERS
3718 #include <stdlib.h>
3719 #include <stddef.h>
3720 #endif
3721 EOF
3722 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3723   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3724   rm -rf conftest*
3725   ac_cv_type_wchar_t=yes
3726 else
3727   rm -rf conftest*
3728   ac_cv_type_wchar_t=no
3729 fi
3730 rm -f conftest*
3731
3732 fi
3733 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3734 if test $ac_cv_type_wchar_t = no; then
3735   cat >> confdefs.h <<\EOF
3736 #define wchar_t unsigned short
3737 EOF
3738
3739 fi
3740
3741
3742 ############################################
3743 # for cups support we need libcups, and a handful of header files
3744
3745 # Check whether --enable-cups or --disable-cups was given.
3746 if test "${enable_cups+set}" = set; then
3747   enableval="$enable_cups"
3748   :
3749 fi
3750
3751
3752 if test x$enable_cups != xno; then
3753         # Extract the first word of "cups-config", so it can be a program name with args.
3754 set dummy cups-config; ac_word=$2
3755 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3756 echo "configure:3757: checking for $ac_word" >&5
3757 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
3758   echo $ac_n "(cached) $ac_c" 1>&6
3759 else
3760   case "$CUPS_CONFIG" in
3761   /*)
3762   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
3763   ;;
3764   ?:/*)                  
3765   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
3766   ;;
3767   *)
3768   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3769   ac_dummy="$PATH"
3770   for ac_dir in $ac_dummy; do 
3771     test -z "$ac_dir" && ac_dir=.
3772     if test -f $ac_dir/$ac_word; then
3773       ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
3774       break
3775     fi
3776   done
3777   IFS="$ac_save_ifs"
3778   ;;
3779 esac
3780 fi
3781 CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
3782 if test -n "$CUPS_CONFIG"; then
3783   echo "$ac_t""$CUPS_CONFIG" 1>&6
3784 else
3785   echo "$ac_t""no" 1>&6
3786 fi
3787
3788
3789         if test "x$CUPS_CONFIG" != x; then
3790                         cat >> confdefs.h <<\EOF
3791 #define HAVE_CUPS 1
3792 EOF
3793
3794                 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
3795                 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
3796                 PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`"
3797         fi
3798 fi
3799
3800 ############################################
3801 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3802 for ac_func in dlopen
3803 do
3804 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3805 echo "configure:3806: checking for $ac_func" >&5
3806 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3807   echo $ac_n "(cached) $ac_c" 1>&6
3808 else
3809   cat > conftest.$ac_ext <<EOF
3810 #line 3811 "configure"
3811 #include "confdefs.h"
3812 /* System header to define __stub macros and hopefully few prototypes,
3813     which can conflict with char $ac_func(); below.  */
3814 #include <assert.h>
3815 /* Override any gcc2 internal prototype to avoid an error.  */
3816 /* We use char because int might match the return type of a gcc2
3817     builtin and then its argument prototype would still apply.  */
3818 char $ac_func();
3819
3820 int main() {
3821
3822 /* The GNU C library defines this for functions which it implements
3823     to always fail with ENOSYS.  Some functions are actually named
3824     something starting with __ and the normal name is an alias.  */
3825 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3826 choke me
3827 #else
3828 $ac_func();
3829 #endif
3830
3831 ; return 0; }
3832 EOF
3833 if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3834   rm -rf conftest*
3835   eval "ac_cv_func_$ac_func=yes"
3836 else
3837   echo "configure: failed program was:" >&5
3838   cat conftest.$ac_ext >&5
3839   rm -rf conftest*
3840   eval "ac_cv_func_$ac_func=no"
3841 fi
3842 rm -f conftest*
3843 fi
3844
3845 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3846   echo "$ac_t""yes" 1>&6
3847     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3848   cat >> confdefs.h <<EOF
3849 #define $ac_tr_func 1
3850 EOF
3851  
3852 else
3853   echo "$ac_t""no" 1>&6
3854 fi
3855 done
3856
3857 if test x"$ac_cv_func_dlopen" = x"no"; then
3858     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3859 echo "configure:3860: checking for dlopen in -ldl" >&5
3860 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3861 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3862   echo $ac_n "(cached) $ac_c" 1>&6
3863 else
3864   ac_save_LIBS="$LIBS"
3865 LIBS="-ldl  $LIBS"
3866 cat > conftest.$ac_ext <<EOF
3867 #line 3868 "configure"
3868 #include "confdefs.h"
3869 /* Override any gcc2 internal prototype to avoid an error.  */
3870 /* We use char because int might match the return type of a gcc2
3871     builtin and then its argument prototype would still apply.  */
3872 char dlopen();
3873
3874 int main() {
3875 dlopen()
3876 ; return 0; }
3877 EOF
3878 if { (eval echo configure:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3879   rm -rf conftest*
3880   eval "ac_cv_lib_$ac_lib_var=yes"
3881 else
3882   echo "configure: failed program was:" >&5
3883   cat conftest.$ac_ext >&5
3884   rm -rf conftest*
3885   eval "ac_cv_lib_$ac_lib_var=no"
3886 fi
3887 rm -f conftest*
3888 LIBS="$ac_save_LIBS"
3889
3890 fi
3891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3892   echo "$ac_t""yes" 1>&6
3893   LIBS="$LIBS -ldl";
3894         cat >> confdefs.h <<\EOF
3895 #define HAVE_DLOPEN 1
3896 EOF
3897
3898 else
3899   echo "$ac_t""no" 1>&6
3900 fi
3901
3902 fi
3903 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3904
3905 ############################################
3906 # check if the compiler can do immediate structures
3907 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3908 echo "configure:3909: checking for immediate structures" >&5
3909 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3910   echo $ac_n "(cached) $ac_c" 1>&6
3911 else
3912   
3913     cat > conftest.$ac_ext <<EOF
3914 #line 3915 "configure"
3915 #include "confdefs.h"
3916
3917 #include <stdio.h>
3918 int main() {
3919
3920    typedef struct {unsigned x;} FOOBAR;
3921    #define X_FOOBAR(x) ((FOOBAR) { x })
3922    #define FOO_ONE X_FOOBAR(1)
3923    FOOBAR f = FOO_ONE;   
3924    static struct {
3925         FOOBAR y; 
3926         } f2[] = {
3927                 {FOO_ONE}
3928         };   
3929
3930 ; return 0; }
3931 EOF
3932 if { (eval echo configure:3933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3933   rm -rf conftest*
3934   samba_cv_immediate_structures=yes
3935 else
3936   echo "configure: failed program was:" >&5
3937   cat conftest.$ac_ext >&5
3938   rm -rf conftest*
3939   samba_cv_immediate_structures=no
3940 fi
3941 rm -f conftest*
3942 fi
3943
3944 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3945 if test x"$samba_cv_immediate_structures" = x"yes"; then
3946    cat >> confdefs.h <<\EOF
3947 #define HAVE_IMMEDIATE_STRUCTURES 1
3948 EOF
3949
3950 fi
3951
3952 ############################################
3953 # check for unix domain sockets
3954 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3955 echo "configure:3956: checking for unix domain sockets" >&5
3956 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3957   echo $ac_n "(cached) $ac_c" 1>&6
3958 else
3959   
3960     cat > conftest.$ac_ext <<EOF
3961 #line 3962 "configure"
3962 #include "confdefs.h"
3963
3964 #include <sys/types.h>
3965 #include <stdlib.h>
3966 #include <stddef.h>
3967 #include <sys/socket.h>
3968 #include <sys/un.h>
3969 int main() {
3970
3971   struct sockaddr_un sunaddr; 
3972   sunaddr.sun_family = AF_UNIX;
3973
3974 ; return 0; }
3975 EOF
3976 if { (eval echo configure:3977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3977   rm -rf conftest*
3978   samba_cv_unixsocket=yes
3979 else
3980   echo "configure: failed program was:" >&5
3981   cat conftest.$ac_ext >&5
3982   rm -rf conftest*
3983   samba_cv_unixsocket=no
3984 fi
3985 rm -f conftest*
3986 fi
3987
3988 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3989 if test x"$samba_cv_unixsocket" = x"yes"; then
3990    cat >> confdefs.h <<\EOF
3991 #define HAVE_UNIXSOCKET 1
3992 EOF
3993
3994 fi
3995
3996
3997 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3998 echo "configure:3999: checking for socklen_t type" >&5
3999 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
4000   echo $ac_n "(cached) $ac_c" 1>&6
4001 else
4002   
4003     cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4006
4007 #include <sys/types.h>
4008 #if STDC_HEADERS
4009 #include <stdlib.h>
4010 #include <stddef.h>
4011 #endif
4012 #include <sys/socket.h>
4013 int main() {
4014 socklen_t i = 0
4015 ; return 0; }
4016 EOF
4017 if { (eval echo configure:4018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4018   rm -rf conftest*
4019   samba_cv_socklen_t=yes
4020 else
4021   echo "configure: failed program was:" >&5
4022   cat conftest.$ac_ext >&5
4023   rm -rf conftest*
4024   samba_cv_socklen_t=no
4025 fi
4026 rm -f conftest*
4027 fi
4028
4029 echo "$ac_t""$samba_cv_socklen_t" 1>&6
4030 if test x"$samba_cv_socklen_t" = x"yes"; then
4031    cat >> confdefs.h <<\EOF
4032 #define HAVE_SOCKLEN_T_TYPE 1
4033 EOF
4034
4035 fi
4036
4037 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
4038 echo "configure:4039: checking for sig_atomic_t type" >&5
4039 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
4040   echo $ac_n "(cached) $ac_c" 1>&6
4041 else
4042   
4043     cat > conftest.$ac_ext <<EOF
4044 #line 4045 "configure"
4045 #include "confdefs.h"
4046
4047 #include <sys/types.h>
4048 #if STDC_HEADERS
4049 #include <stdlib.h>
4050 #include <stddef.h>
4051 #endif
4052 #include <signal.h>
4053 int main() {
4054 sig_atomic_t i = 0
4055 ; return 0; }
4056 EOF
4057 if { (eval echo configure:4058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4058   rm -rf conftest*
4059   samba_cv_sig_atomic_t=yes
4060 else
4061   echo "configure: failed program was:" >&5
4062   cat conftest.$ac_ext >&5
4063   rm -rf conftest*
4064   samba_cv_sig_atomic_t=no
4065 fi
4066 rm -f conftest*
4067 fi
4068
4069 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4070 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4071    cat >> confdefs.h <<\EOF
4072 #define HAVE_SIG_ATOMIC_T_TYPE 1
4073 EOF
4074
4075 fi
4076
4077 # stupid headers have the functions but no declaration. grrrr.
4078
4079  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4080 echo "configure:4081: checking for errno declaration" >&5
4081 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4082   echo $ac_n "(cached) $ac_c" 1>&6
4083 else
4084   
4085     cat > conftest.$ac_ext <<EOF
4086 #line 4087 "configure"
4087 #include "confdefs.h"
4088 #include <errno.h>
4089 int main() {
4090 int i = (int)errno
4091 ; return 0; }
4092 EOF
4093 if { (eval echo configure:4094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4094   rm -rf conftest*
4095   ac_cv_have_errno_decl=yes
4096 else
4097   echo "configure: failed program was:" >&5
4098   cat conftest.$ac_ext >&5
4099   rm -rf conftest*
4100   ac_cv_have_errno_decl=no
4101 fi
4102 rm -f conftest*
4103 fi
4104
4105 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4106  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4107     cat >> confdefs.h <<\EOF
4108 #define HAVE_ERRNO_DECL 1
4109 EOF
4110
4111  fi
4112
4113
4114  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4115 echo "configure:4116: checking for setresuid declaration" >&5
4116 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4117   echo $ac_n "(cached) $ac_c" 1>&6
4118 else
4119   
4120     cat > conftest.$ac_ext <<EOF
4121 #line 4122 "configure"
4122 #include "confdefs.h"
4123 #include <unistd.h>
4124 int main() {
4125 int i = (int)setresuid
4126 ; return 0; }
4127 EOF
4128 if { (eval echo configure:4129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4129   rm -rf conftest*
4130   ac_cv_have_setresuid_decl=yes
4131 else
4132   echo "configure: failed program was:" >&5
4133   cat conftest.$ac_ext >&5
4134   rm -rf conftest*
4135   ac_cv_have_setresuid_decl=no
4136 fi
4137 rm -f conftest*
4138 fi
4139
4140 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4141  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4142     cat >> confdefs.h <<\EOF
4143 #define HAVE_SETRESUID_DECL 1
4144 EOF
4145
4146  fi
4147
4148
4149  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4150 echo "configure:4151: checking for setresgid declaration" >&5
4151 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4152   echo $ac_n "(cached) $ac_c" 1>&6
4153 else
4154   
4155     cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 #include <unistd.h>
4159 int main() {
4160 int i = (int)setresgid
4161 ; return 0; }
4162 EOF
4163 if { (eval echo configure:4164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4164   rm -rf conftest*
4165   ac_cv_have_setresgid_decl=yes
4166 else
4167   echo "configure: failed program was:" >&5
4168   cat conftest.$ac_ext >&5
4169   rm -rf conftest*
4170   ac_cv_have_setresgid_decl=no
4171 fi
4172 rm -f conftest*
4173 fi
4174
4175 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4176  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4177     cat >> confdefs.h <<\EOF
4178 #define HAVE_SETRESGID_DECL 1
4179 EOF
4180
4181  fi
4182
4183
4184  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4185 echo "configure:4186: checking for asprintf declaration" >&5
4186 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4187   echo $ac_n "(cached) $ac_c" 1>&6
4188 else
4189   
4190     cat > conftest.$ac_ext <<EOF
4191 #line 4192 "configure"
4192 #include "confdefs.h"
4193 #include <stdio.h>
4194 int main() {
4195 int i = (int)asprintf
4196 ; return 0; }
4197 EOF
4198 if { (eval echo configure:4199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4199   rm -rf conftest*
4200   ac_cv_have_asprintf_decl=yes
4201 else
4202   echo "configure: failed program was:" >&5
4203   cat conftest.$ac_ext >&5
4204   rm -rf conftest*
4205   ac_cv_have_asprintf_decl=no
4206 fi
4207 rm -f conftest*
4208 fi
4209
4210 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4211  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4212     cat >> confdefs.h <<\EOF
4213 #define HAVE_ASPRINTF_DECL 1
4214 EOF
4215
4216  fi
4217
4218
4219  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4220 echo "configure:4221: checking for vasprintf declaration" >&5
4221 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4222   echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224   
4225     cat > conftest.$ac_ext <<EOF
4226 #line 4227 "configure"
4227 #include "confdefs.h"
4228 #include <stdio.h>
4229 int main() {
4230 int i = (int)vasprintf
4231 ; return 0; }
4232 EOF
4233 if { (eval echo configure:4234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4234   rm -rf conftest*
4235   ac_cv_have_vasprintf_decl=yes
4236 else
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   ac_cv_have_vasprintf_decl=no
4241 fi
4242 rm -f conftest*
4243 fi
4244
4245 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4246  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4247     cat >> confdefs.h <<\EOF
4248 #define HAVE_VASPRINTF_DECL 1
4249 EOF
4250
4251  fi
4252
4253
4254  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4255 echo "configure:4256: checking for vsnprintf declaration" >&5
4256 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4257   echo $ac_n "(cached) $ac_c" 1>&6
4258 else
4259   
4260     cat > conftest.$ac_ext <<EOF
4261 #line 4262 "configure"
4262 #include "confdefs.h"
4263 #include <stdio.h>
4264 int main() {
4265 int i = (int)vsnprintf
4266 ; return 0; }
4267 EOF
4268 if { (eval echo configure:4269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4269   rm -rf conftest*
4270   ac_cv_have_vsnprintf_decl=yes
4271 else
4272   echo "configure: failed program was:" >&5
4273   cat conftest.$ac_ext >&5
4274   rm -rf conftest*
4275   ac_cv_have_vsnprintf_decl=no
4276 fi
4277 rm -f conftest*
4278 fi
4279
4280 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4281  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4282     cat >> confdefs.h <<\EOF
4283 #define HAVE_VSNPRINTF_DECL 1
4284 EOF
4285
4286  fi
4287
4288
4289  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4290 echo "configure:4291: checking for snprintf declaration" >&5
4291 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4292   echo $ac_n "(cached) $ac_c" 1>&6
4293 else
4294   
4295     cat > conftest.$ac_ext <<EOF
4296 #line 4297 "configure"
4297 #include "confdefs.h"
4298 #include <stdio.h>
4299 int main() {
4300 int i = (int)snprintf
4301 ; return 0; }
4302 EOF
4303 if { (eval echo configure:4304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4304   rm -rf conftest*
4305   ac_cv_have_snprintf_decl=yes
4306 else
4307   echo "configure: failed program was:" >&5
4308   cat conftest.$ac_ext >&5
4309   rm -rf conftest*
4310   ac_cv_have_snprintf_decl=no
4311 fi
4312 rm -f conftest*
4313 fi
4314
4315 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4316  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4317     cat >> confdefs.h <<\EOF
4318 #define HAVE_SNPRINTF_DECL 1
4319 EOF
4320
4321  fi
4322
4323
4324 # and glibc has setresuid under linux but the function does
4325 # nothing until kernel 2.1.44! very dumb.
4326 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4327 echo "configure:4328: checking for real setresuid" >&5
4328 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4329   echo $ac_n "(cached) $ac_c" 1>&6
4330 else
4331   
4332     if test "$cross_compiling" = yes; then
4333   samba_cv_have_setresuid=cross
4334 else
4335   cat > conftest.$ac_ext <<EOF
4336 #line 4337 "configure"
4337 #include "confdefs.h"
4338 #include <errno.h>
4339 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4340 EOF
4341 if { (eval echo configure:4342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4342 then
4343   samba_cv_have_setresuid=yes
4344 else
4345   echo "configure: failed program was:" >&5
4346   cat conftest.$ac_ext >&5
4347   rm -fr conftest*
4348   samba_cv_have_setresuid=no
4349 fi
4350 rm -fr conftest*
4351 fi
4352
4353 fi
4354
4355 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4356 if test x"$samba_cv_have_setresuid" = x"yes"; then
4357     cat >> confdefs.h <<\EOF
4358 #define HAVE_SETRESUID 1
4359 EOF
4360
4361 fi
4362
4363 # Do the same check for setresguid...
4364 #
4365 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4366 echo "configure:4367: checking for real setresgid" >&5
4367 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4368   echo $ac_n "(cached) $ac_c" 1>&6
4369 else
4370   
4371     if test "$cross_compiling" = yes; then
4372   samba_cv_have_setresgid=cross
4373 else
4374   cat > conftest.$ac_ext <<EOF
4375 #line 4376 "configure"
4376 #include "confdefs.h"
4377 #include <unistd.h>
4378 #include <errno.h>
4379 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4380 EOF
4381 if { (eval echo configure:4382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4382 then
4383   samba_cv_have_setresgid=yes
4384 else
4385   echo "configure: failed program was:" >&5
4386   cat conftest.$ac_ext >&5
4387   rm -fr conftest*
4388   samba_cv_have_setresgid=no
4389 fi
4390 rm -fr conftest*
4391 fi
4392
4393 fi
4394
4395 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4396 if test x"$samba_cv_have_setresgid" = x"yes"; then
4397     cat >> confdefs.h <<\EOF
4398 #define HAVE_SETRESGID 1
4399 EOF
4400
4401 fi
4402
4403 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4404 echo "configure:4405: checking for 8-bit clean memcmp" >&5
4405 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4406   echo $ac_n "(cached) $ac_c" 1>&6
4407 else
4408   if test "$cross_compiling" = yes; then
4409   ac_cv_func_memcmp_clean=no
4410 else
4411   cat > conftest.$ac_ext <<EOF
4412 #line 4413 "configure"
4413 #include "confdefs.h"
4414
4415 main()
4416 {
4417   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4418   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4419 }
4420
4421 EOF
4422 if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4423 then
4424   ac_cv_func_memcmp_clean=yes
4425 else
4426   echo "configure: failed program was:" >&5
4427   cat conftest.$ac_ext >&5
4428   rm -fr conftest*
4429   ac_cv_func_memcmp_clean=no
4430 fi
4431 rm -fr conftest*
4432 fi
4433
4434 fi
4435
4436 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4437 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4438
4439
4440 ###############################################
4441 # test for where we get crypt() from
4442 for ac_func in crypt
4443 do
4444 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4445 echo "configure:4446: checking for $ac_func" >&5
4446 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4447   echo $ac_n "(cached) $ac_c" 1>&6
4448 else
4449   cat > conftest.$ac_ext <<EOF
4450 #line 4451 "configure"
4451 #include "confdefs.h"
4452 /* System header to define __stub macros and hopefully few prototypes,
4453     which can conflict with char $ac_func(); below.  */
4454 #include <assert.h>
4455 /* Override any gcc2 internal prototype to avoid an error.  */
4456 /* We use char because int might match the return type of a gcc2
4457     builtin and then its argument prototype would still apply.  */
4458 char $ac_func();
4459
4460 int main() {
4461
4462 /* The GNU C library defines this for functions which it implements
4463     to always fail with ENOSYS.  Some functions are actually named
4464     something starting with __ and the normal name is an alias.  */
4465 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4466 choke me
4467 #else
4468 $ac_func();
4469 #endif
4470
4471 ; return 0; }
4472 EOF
4473 if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4474   rm -rf conftest*
4475   eval "ac_cv_func_$ac_func=yes"
4476 else
4477   echo "configure: failed program was:" >&5
4478   cat conftest.$ac_ext >&5
4479   rm -rf conftest*
4480   eval "ac_cv_func_$ac_func=no"
4481 fi
4482 rm -f conftest*
4483 fi
4484
4485 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4486   echo "$ac_t""yes" 1>&6
4487     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4488   cat >> confdefs.h <<EOF
4489 #define $ac_tr_func 1
4490 EOF
4491  
4492 else
4493   echo "$ac_t""no" 1>&6
4494 fi
4495 done
4496
4497 if test x"$ac_cv_func_crypt" = x"no"; then
4498     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4499 echo "configure:4500: checking for crypt in -lcrypt" >&5
4500 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4501 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4502   echo $ac_n "(cached) $ac_c" 1>&6
4503 else
4504   ac_save_LIBS="$LIBS"
4505 LIBS="-lcrypt  $LIBS"
4506 cat > conftest.$ac_ext <<EOF
4507 #line 4508 "configure"
4508 #include "confdefs.h"
4509 /* Override any gcc2 internal prototype to avoid an error.  */
4510 /* We use char because int might match the return type of a gcc2
4511     builtin and then its argument prototype would still apply.  */
4512 char crypt();
4513
4514 int main() {
4515 crypt()
4516 ; return 0; }
4517 EOF
4518 if { (eval echo configure:4519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4519   rm -rf conftest*
4520   eval "ac_cv_lib_$ac_lib_var=yes"
4521 else
4522   echo "configure: failed program was:" >&5
4523   cat conftest.$ac_ext >&5
4524   rm -rf conftest*
4525   eval "ac_cv_lib_$ac_lib_var=no"
4526 fi
4527 rm -f conftest*
4528 LIBS="$ac_save_LIBS"
4529
4530 fi
4531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4532   echo "$ac_t""yes" 1>&6
4533   AUTHLIBS="$AUTHLIBS -lcrypt";
4534         cat >> confdefs.h <<\EOF
4535 #define HAVE_CRYPT 1
4536 EOF
4537
4538 else
4539   echo "$ac_t""no" 1>&6
4540 fi
4541
4542 fi
4543
4544
4545 ###############################################
4546 # Readline included by default unless explicitly asked not to
4547 test "${with_readline+set}" != "set" && with_readline=yes
4548
4549 # test for where we get readline() from
4550 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4551 echo "configure:4552: checking whether to use readline" >&5
4552 # Check whether --with-readline or --without-readline was given.
4553 if test "${with_readline+set}" = set; then
4554   withval="$with_readline"
4555     case "$with_readline" in
4556   yes)
4557     echo "$ac_t""yes" 1>&6
4558
4559     for ac_hdr in readline.h history.h readline/readline.h
4560 do
4561 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4562 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4563 echo "configure:4564: checking for $ac_hdr" >&5
4564 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4565   echo $ac_n "(cached) $ac_c" 1>&6
4566 else
4567   cat > conftest.$ac_ext <<EOF
4568 #line 4569 "configure"
4569 #include "confdefs.h"
4570 #include <$ac_hdr>
4571 EOF
4572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4573 { (eval echo configure:4574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4575 if test -z "$ac_err"; then
4576   rm -rf conftest*
4577   eval "ac_cv_header_$ac_safe=yes"
4578 else
4579   echo "$ac_err" >&5
4580   echo "configure: failed program was:" >&5
4581   cat conftest.$ac_ext >&5
4582   rm -rf conftest*
4583   eval "ac_cv_header_$ac_safe=no"
4584 fi
4585 rm -f conftest*
4586 fi
4587 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4588   echo "$ac_t""yes" 1>&6
4589     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4590   cat >> confdefs.h <<EOF
4591 #define $ac_tr_hdr 1
4592 EOF
4593  
4594 else
4595   echo "$ac_t""no" 1>&6
4596 fi
4597 done
4598
4599     for ac_hdr in readline/history.h
4600 do
4601 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4602 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4603 echo "configure:4604: checking for $ac_hdr" >&5
4604 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4605   echo $ac_n "(cached) $ac_c" 1>&6
4606 else
4607   cat > conftest.$ac_ext <<EOF
4608 #line 4609 "configure"
4609 #include "confdefs.h"
4610 #include <$ac_hdr>
4611 EOF
4612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4613 { (eval echo configure:4614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4615 if test -z "$ac_err"; then
4616   rm -rf conftest*
4617   eval "ac_cv_header_$ac_safe=yes"
4618 else
4619   echo "$ac_err" >&5
4620   echo "configure: failed program was:" >&5
4621   cat conftest.$ac_ext >&5
4622   rm -rf conftest*
4623   eval "ac_cv_header_$ac_safe=no"
4624 fi
4625 rm -f conftest*
4626 fi
4627 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4628   echo "$ac_t""yes" 1>&6
4629     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4630   cat >> confdefs.h <<EOF
4631 #define $ac_tr_hdr 1
4632 EOF
4633  
4634 else
4635   echo "$ac_t""no" 1>&6
4636 fi
4637 done
4638
4639
4640     for ac_hdr in readline.h readline/readline.h
4641 do
4642 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4643 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4644 echo "configure:4645: checking for $ac_hdr" >&5
4645 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4646   echo $ac_n "(cached) $ac_c" 1>&6
4647 else
4648   cat > conftest.$ac_ext <<EOF
4649 #line 4650 "configure"
4650 #include "confdefs.h"
4651 #include <$ac_hdr>
4652 EOF
4653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4654 { (eval echo configure:4655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4656 if test -z "$ac_err"; then
4657   rm -rf conftest*
4658   eval "ac_cv_header_$ac_safe=yes"
4659 else
4660   echo "$ac_err" >&5
4661   echo "configure: failed program was:" >&5
4662   cat conftest.$ac_ext >&5
4663   rm -rf conftest*
4664   eval "ac_cv_header_$ac_safe=no"
4665 fi
4666 rm -f conftest*
4667 fi
4668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4669   echo "$ac_t""yes" 1>&6
4670     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4671   cat >> confdefs.h <<EOF
4672 #define $ac_tr_hdr 1
4673 EOF
4674  
4675       for termlib in ncurses curses termcap terminfo termlib; do
4676        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4677 echo "configure:4678: checking for tgetent in -l${termlib}" >&5
4678 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4679 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682   ac_save_LIBS="$LIBS"
4683 LIBS="-l${termlib}  $LIBS"
4684 cat > conftest.$ac_ext <<EOF
4685 #line 4686 "configure"
4686 #include "confdefs.h"
4687 /* Override any gcc2 internal prototype to avoid an error.  */
4688 /* We use char because int might match the return type of a gcc2
4689     builtin and then its argument prototype would still apply.  */
4690 char tgetent();
4691
4692 int main() {
4693 tgetent()
4694 ; return 0; }
4695 EOF
4696 if { (eval echo configure:4697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4697   rm -rf conftest*
4698   eval "ac_cv_lib_$ac_lib_var=yes"
4699 else
4700   echo "configure: failed program was:" >&5
4701   cat conftest.$ac_ext >&5
4702   rm -rf conftest*
4703   eval "ac_cv_lib_$ac_lib_var=no"
4704 fi
4705 rm -f conftest*
4706 LIBS="$ac_save_LIBS"
4707
4708 fi
4709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4710   echo "$ac_t""yes" 1>&6
4711   TERMLIBS="-l${termlib}"; break
4712 else
4713   echo "$ac_t""no" 1>&6
4714 fi
4715
4716       done
4717       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4718 echo "configure:4719: checking for rl_callback_handler_install in -lreadline" >&5
4719 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4720 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4721   echo $ac_n "(cached) $ac_c" 1>&6
4722 else
4723   ac_save_LIBS="$LIBS"
4724 LIBS="-lreadline $TERMLIBS $LIBS"
4725 cat > conftest.$ac_ext <<EOF
4726 #line 4727 "configure"
4727 #include "confdefs.h"
4728 /* Override any gcc2 internal prototype to avoid an error.  */
4729 /* We use char because int might match the return type of a gcc2
4730     builtin and then its argument prototype would still apply.  */
4731 char rl_callback_handler_install();
4732
4733 int main() {
4734 rl_callback_handler_install()
4735 ; return 0; }
4736 EOF
4737 if { (eval echo configure:4738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4738   rm -rf conftest*
4739   eval "ac_cv_lib_$ac_lib_var=yes"
4740 else
4741   echo "configure: failed program was:" >&5
4742   cat conftest.$ac_ext >&5
4743   rm -rf conftest*
4744   eval "ac_cv_lib_$ac_lib_var=no"
4745 fi
4746 rm -f conftest*
4747 LIBS="$ac_save_LIBS"
4748
4749 fi
4750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4751   echo "$ac_t""yes" 1>&6
4752   TERMLIBS="-lreadline $TERMLIBS"
4753        cat >> confdefs.h <<\EOF
4754 #define HAVE_LIBREADLINE 1
4755 EOF
4756
4757        break
4758 else
4759   echo "$ac_t""no" 1>&6
4760 TERMLIBS=
4761 fi
4762
4763 else
4764   echo "$ac_t""no" 1>&6
4765 fi
4766 done
4767
4768     ;;
4769   no)
4770     echo "$ac_t""no" 1>&6
4771     ;;
4772   *)
4773     echo "$ac_t""yes" 1>&6
4774
4775     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4776     # alternate readline path
4777     _ldflags=${LDFLAGS}
4778     _cppflags=${CPPFLAGS}
4779
4780     # Add additional search path
4781     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4782     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4783
4784     for ac_hdr in readline.h history.h readline/readline.h
4785 do
4786 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4787 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4788 echo "configure:4789: checking for $ac_hdr" >&5
4789 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4790   echo $ac_n "(cached) $ac_c" 1>&6
4791 else
4792   cat > conftest.$ac_ext <<EOF
4793 #line 4794 "configure"
4794 #include "confdefs.h"
4795 #include <$ac_hdr>
4796 EOF
4797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4798 { (eval echo configure:4799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4800 if test -z "$ac_err"; then
4801   rm -rf conftest*
4802   eval "ac_cv_header_$ac_safe=yes"
4803 else
4804   echo "$ac_err" >&5
4805   echo "configure: failed program was:" >&5
4806   cat conftest.$ac_ext >&5
4807   rm -rf conftest*
4808   eval "ac_cv_header_$ac_safe=no"
4809 fi
4810 rm -f conftest*
4811 fi
4812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4813   echo "$ac_t""yes" 1>&6
4814     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4815   cat >> confdefs.h <<EOF
4816 #define $ac_tr_hdr 1
4817 EOF
4818  
4819 else
4820   echo "$ac_t""no" 1>&6
4821 fi
4822 done
4823
4824     for ac_hdr in readline/history.h
4825 do
4826 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4827 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4828 echo "configure:4829: checking for $ac_hdr" >&5
4829 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4830   echo $ac_n "(cached) $ac_c" 1>&6
4831 else
4832   cat > conftest.$ac_ext <<EOF
4833 #line 4834 "configure"
4834 #include "confdefs.h"
4835 #include <$ac_hdr>
4836 EOF
4837 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4838 { (eval echo configure:4839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4839 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4840 if test -z "$ac_err"; then
4841   rm -rf conftest*
4842   eval "ac_cv_header_$ac_safe=yes"
4843 else
4844   echo "$ac_err" >&5
4845   echo "configure: failed program was:" >&5
4846   cat conftest.$ac_ext >&5
4847   rm -rf conftest*
4848   eval "ac_cv_header_$ac_safe=no"
4849 fi
4850 rm -f conftest*
4851 fi
4852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4853   echo "$ac_t""yes" 1>&6
4854     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4855   cat >> confdefs.h <<EOF
4856 #define $ac_tr_hdr 1
4857 EOF
4858  
4859 else
4860   echo "$ac_t""no" 1>&6
4861 fi
4862 done
4863
4864
4865     for ac_hdr in readline.h readline/readline.h
4866 do
4867 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4868 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4869 echo "configure:4870: checking for $ac_hdr" >&5
4870 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876 #include <$ac_hdr>
4877 EOF
4878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4879 { (eval echo configure:4880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4881 if test -z "$ac_err"; then
4882   rm -rf conftest*
4883   eval "ac_cv_header_$ac_safe=yes"
4884 else
4885   echo "$ac_err" >&5
4886   echo "configure: failed program was:" >&5
4887   cat conftest.$ac_ext >&5
4888   rm -rf conftest*
4889   eval "ac_cv_header_$ac_safe=no"
4890 fi
4891 rm -f conftest*
4892 fi
4893 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4894   echo "$ac_t""yes" 1>&6
4895     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4896   cat >> confdefs.h <<EOF
4897 #define $ac_tr_hdr 1
4898 EOF
4899  
4900       for termlib in ncurses curses termcap terminfo termlib; do
4901        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4902 echo "configure:4903: checking for tgetent in -l${termlib}" >&5
4903 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4904 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4905   echo $ac_n "(cached) $ac_c" 1>&6
4906 else
4907   ac_save_LIBS="$LIBS"
4908 LIBS="-l${termlib}  $LIBS"
4909 cat > conftest.$ac_ext <<EOF
4910 #line 4911 "configure"
4911 #include "confdefs.h"
4912 /* Override any gcc2 internal prototype to avoid an error.  */
4913 /* We use char because int might match the return type of a gcc2
4914     builtin and then its argument prototype would still apply.  */
4915 char tgetent();
4916
4917 int main() {
4918 tgetent()
4919 ; return 0; }
4920 EOF
4921 if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4922   rm -rf conftest*
4923   eval "ac_cv_lib_$ac_lib_var=yes"
4924 else
4925   echo "configure: failed program was:" >&5
4926   cat conftest.$ac_ext >&5
4927   rm -rf conftest*
4928   eval "ac_cv_lib_$ac_lib_var=no"
4929 fi
4930 rm -f conftest*
4931 LIBS="$ac_save_LIBS"
4932
4933 fi
4934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4935   echo "$ac_t""yes" 1>&6
4936   TERMLIBS="-l${termlib}"; break
4937 else
4938   echo "$ac_t""no" 1>&6
4939 fi
4940
4941       done
4942       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4943 echo "configure:4944: checking for rl_callback_handler_install in -lreadline" >&5
4944 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4945 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4946   echo $ac_n "(cached) $ac_c" 1>&6
4947 else
4948   ac_save_LIBS="$LIBS"
4949 LIBS="-lreadline $TERMLIBS $LIBS"
4950 cat > conftest.$ac_ext <<EOF
4951 #line 4952 "configure"
4952 #include "confdefs.h"
4953 /* Override any gcc2 internal prototype to avoid an error.  */
4954 /* We use char because int might match the return type of a gcc2
4955     builtin and then its argument prototype would still apply.  */
4956 char rl_callback_handler_install();
4957
4958 int main() {
4959 rl_callback_handler_install()
4960 ; return 0; }
4961 EOF
4962 if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4963   rm -rf conftest*
4964   eval "ac_cv_lib_$ac_lib_var=yes"
4965 else
4966   echo "configure: failed program was:" >&5
4967   cat conftest.$ac_ext >&5
4968   rm -rf conftest*
4969   eval "ac_cv_lib_$ac_lib_var=no"
4970 fi
4971 rm -f conftest*
4972 LIBS="$ac_save_LIBS"
4973
4974 fi
4975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4976   echo "$ac_t""yes" 1>&6
4977   TERMLDFLAGS="-L$with_readline/lib"
4978        TERMCPPFLAGS="-I$with_readline/include"
4979        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4980        TERMLIBS="-lreadline $TERMLIBS"
4981        cat >> confdefs.h <<\EOF
4982 #define HAVE_LIBREADLINE 1
4983 EOF
4984
4985        break
4986 else
4987   echo "$ac_t""no" 1>&6
4988 TERMLIBS= CPPFLAGS=$_cppflags
4989 fi
4990
4991 else
4992   echo "$ac_t""no" 1>&6
4993 fi
4994 done
4995
4996
4997     LDFLAGS=$_ldflags
4998     ;;
4999   esac
5000 else
5001   echo "$ac_t""no" 1>&6
5002
5003 fi
5004
5005
5006
5007
5008 # The readline API changed slightly from readline3 to readline4, so
5009 # code will generate warnings on one of them unless we have a few
5010 # special cases.
5011 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
5012 echo "configure:5013: checking for rl_completion_matches in -lreadline" >&5
5013 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
5014 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5015   echo $ac_n "(cached) $ac_c" 1>&6
5016 else
5017   ac_save_LIBS="$LIBS"
5018 LIBS="-lreadline $TERMLIBS $LIBS"
5019 cat > conftest.$ac_ext <<EOF
5020 #line 5021 "configure"
5021 #include "confdefs.h"
5022 /* Override any gcc2 internal prototype to avoid an error.  */
5023 /* We use char because int might match the return type of a gcc2
5024     builtin and then its argument prototype would still apply.  */
5025 char rl_completion_matches();
5026
5027 int main() {
5028 rl_completion_matches()
5029 ; return 0; }
5030 EOF
5031 if { (eval echo configure:5032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5032   rm -rf conftest*
5033   eval "ac_cv_lib_$ac_lib_var=yes"
5034 else
5035   echo "configure: failed program was:" >&5
5036   cat conftest.$ac_ext >&5
5037   rm -rf conftest*
5038   eval "ac_cv_lib_$ac_lib_var=no"
5039 fi
5040 rm -f conftest*
5041 LIBS="$ac_save_LIBS"
5042
5043 fi
5044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5045   echo "$ac_t""yes" 1>&6
5046   cat >> confdefs.h <<\EOF
5047 #define HAVE_NEW_LIBREADLINE 1
5048 EOF
5049
5050 else
5051   echo "$ac_t""no" 1>&6
5052 fi
5053
5054
5055 # The following test taken from the cvs sources
5056 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5057 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5058 # libsocket.so which has a bad implementation of gethostbyname (it
5059 # only looks in /etc/hosts), so we only look for -lsocket if we need
5060 # it.
5061 for ac_func in connect
5062 do
5063 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5064 echo "configure:5065: checking for $ac_func" >&5
5065 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5066   echo $ac_n "(cached) $ac_c" 1>&6
5067 else
5068   cat > conftest.$ac_ext <<EOF
5069 #line 5070 "configure"
5070 #include "confdefs.h"
5071 /* System header to define __stub macros and hopefully few prototypes,
5072     which can conflict with char $ac_func(); below.  */
5073 #include <assert.h>
5074 /* Override any gcc2 internal prototype to avoid an error.  */
5075 /* We use char because int might match the return type of a gcc2
5076     builtin and then its argument prototype would still apply.  */
5077 char $ac_func();
5078
5079 int main() {
5080
5081 /* The GNU C library defines this for functions which it implements
5082     to always fail with ENOSYS.  Some functions are actually named
5083     something starting with __ and the normal name is an alias.  */
5084 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5085 choke me
5086 #else
5087 $ac_func();
5088 #endif
5089
5090 ; return 0; }
5091 EOF
5092 if { (eval echo configure:5093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5093   rm -rf conftest*
5094   eval "ac_cv_func_$ac_func=yes"
5095 else
5096   echo "configure: failed program was:" >&5
5097   cat conftest.$ac_ext >&5
5098   rm -rf conftest*
5099   eval "ac_cv_func_$ac_func=no"
5100 fi
5101 rm -f conftest*
5102 fi
5103
5104 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5105   echo "$ac_t""yes" 1>&6
5106     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5107   cat >> confdefs.h <<EOF
5108 #define $ac_tr_func 1
5109 EOF
5110  
5111 else
5112   echo "$ac_t""no" 1>&6
5113 fi
5114 done
5115
5116 if test x"$ac_cv_func_connect" = x"no"; then
5117     case "$LIBS" in
5118     *-lnsl*) ;;
5119     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5120 echo "configure:5121: checking for printf in -lnsl_s" >&5
5121 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5122 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5123   echo $ac_n "(cached) $ac_c" 1>&6
5124 else
5125   ac_save_LIBS="$LIBS"
5126 LIBS="-lnsl_s  $LIBS"
5127 cat > conftest.$ac_ext <<EOF
5128 #line 5129 "configure"
5129 #include "confdefs.h"
5130 /* Override any gcc2 internal prototype to avoid an error.  */
5131 /* We use char because int might match the return type of a gcc2
5132     builtin and then its argument prototype would still apply.  */
5133 char printf();
5134
5135 int main() {
5136 printf()
5137 ; return 0; }
5138 EOF
5139 if { (eval echo configure:5140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5140   rm -rf conftest*
5141   eval "ac_cv_lib_$ac_lib_var=yes"
5142 else
5143   echo "configure: failed program was:" >&5
5144   cat conftest.$ac_ext >&5
5145   rm -rf conftest*
5146   eval "ac_cv_lib_$ac_lib_var=no"
5147 fi
5148 rm -f conftest*
5149 LIBS="$ac_save_LIBS"
5150
5151 fi
5152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5153   echo "$ac_t""yes" 1>&6
5154     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5155     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5156   cat >> confdefs.h <<EOF
5157 #define $ac_tr_lib 1
5158 EOF
5159
5160   LIBS="-lnsl_s $LIBS"
5161
5162 else
5163   echo "$ac_t""no" 1>&6
5164 fi
5165  ;;
5166     esac
5167     case "$LIBS" in
5168     *-lnsl*) ;;
5169     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5170 echo "configure:5171: checking for printf in -lnsl" >&5
5171 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5172 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5173   echo $ac_n "(cached) $ac_c" 1>&6
5174 else
5175   ac_save_LIBS="$LIBS"
5176 LIBS="-lnsl  $LIBS"
5177 cat > conftest.$ac_ext <<EOF
5178 #line 5179 "configure"
5179 #include "confdefs.h"
5180 /* Override any gcc2 internal prototype to avoid an error.  */
5181 /* We use char because int might match the return type of a gcc2
5182     builtin and then its argument prototype would still apply.  */
5183 char printf();
5184
5185 int main() {
5186 printf()
5187 ; return 0; }
5188 EOF
5189 if { (eval echo configure:5190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5190   rm -rf conftest*
5191   eval "ac_cv_lib_$ac_lib_var=yes"
5192 else
5193   echo "configure: failed program was:" >&5
5194   cat conftest.$ac_ext >&5
5195   rm -rf conftest*
5196   eval "ac_cv_lib_$ac_lib_var=no"
5197 fi
5198 rm -f conftest*
5199 LIBS="$ac_save_LIBS"
5200
5201 fi
5202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5203   echo "$ac_t""yes" 1>&6
5204     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5205     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5206   cat >> confdefs.h <<EOF
5207 #define $ac_tr_lib 1
5208 EOF
5209
5210   LIBS="-lnsl $LIBS"
5211
5212 else
5213   echo "$ac_t""no" 1>&6
5214 fi
5215  ;;
5216     esac
5217     case "$LIBS" in
5218     *-lsocket*) ;;
5219     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5220 echo "configure:5221: checking for connect in -lsocket" >&5
5221 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5222 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5223   echo $ac_n "(cached) $ac_c" 1>&6
5224 else
5225   ac_save_LIBS="$LIBS"
5226 LIBS="-lsocket  $LIBS"
5227 cat > conftest.$ac_ext <<EOF
5228 #line 5229 "configure"
5229 #include "confdefs.h"
5230 /* Override any gcc2 internal prototype to avoid an error.  */
5231 /* We use char because int might match the return type of a gcc2
5232     builtin and then its argument prototype would still apply.  */
5233 char connect();
5234
5235 int main() {
5236 connect()
5237 ; return 0; }
5238 EOF
5239 if { (eval echo configure:5240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5240   rm -rf conftest*
5241   eval "ac_cv_lib_$ac_lib_var=yes"
5242 else
5243   echo "configure: failed program was:" >&5
5244   cat conftest.$ac_ext >&5
5245   rm -rf conftest*
5246   eval "ac_cv_lib_$ac_lib_var=no"
5247 fi
5248 rm -f conftest*
5249 LIBS="$ac_save_LIBS"
5250
5251 fi
5252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5253   echo "$ac_t""yes" 1>&6
5254     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5255     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5256   cat >> confdefs.h <<EOF
5257 #define $ac_tr_lib 1
5258 EOF
5259
5260   LIBS="-lsocket $LIBS"
5261
5262 else
5263   echo "$ac_t""no" 1>&6
5264 fi
5265  ;;
5266     esac
5267     case "$LIBS" in
5268     *-linet*) ;;
5269     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5270 echo "configure:5271: checking for connect in -linet" >&5
5271 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5272 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5273   echo $ac_n "(cached) $ac_c" 1>&6
5274 else
5275   ac_save_LIBS="$LIBS"
5276 LIBS="-linet  $LIBS"
5277 cat > conftest.$ac_ext <<EOF
5278 #line 5279 "configure"
5279 #include "confdefs.h"
5280 /* Override any gcc2 internal prototype to avoid an error.  */
5281 /* We use char because int might match the return type of a gcc2
5282     builtin and then its argument prototype would still apply.  */
5283 char connect();
5284
5285 int main() {
5286 connect()
5287 ; return 0; }
5288 EOF
5289 if { (eval echo configure:5290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5290   rm -rf conftest*
5291   eval "ac_cv_lib_$ac_lib_var=yes"
5292 else
5293   echo "configure: failed program was:" >&5
5294   cat conftest.$ac_ext >&5
5295   rm -rf conftest*
5296   eval "ac_cv_lib_$ac_lib_var=no"
5297 fi
5298 rm -f conftest*
5299 LIBS="$ac_save_LIBS"
5300
5301 fi
5302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5303   echo "$ac_t""yes" 1>&6
5304     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5305     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5306   cat >> confdefs.h <<EOF
5307 #define $ac_tr_lib 1
5308 EOF
5309
5310   LIBS="-linet $LIBS"
5311
5312 else
5313   echo "$ac_t""no" 1>&6
5314 fi
5315  ;;
5316     esac
5317             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5318        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5319         # ac_cv_func_connect=yes
5320         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5321         cat >> confdefs.h <<\EOF
5322 #define HAVE_CONNECT 1
5323 EOF
5324
5325     fi
5326 fi
5327
5328 ###############################################
5329 # test for where we get get_yp_default_domain() from
5330 for ac_func in yp_get_default_domain
5331 do
5332 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5333 echo "configure:5334: checking for $ac_func" >&5
5334 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5335   echo $ac_n "(cached) $ac_c" 1>&6
5336 else
5337   cat > conftest.$ac_ext <<EOF
5338 #line 5339 "configure"
5339 #include "confdefs.h"
5340 /* System header to define __stub macros and hopefully few prototypes,
5341     which can conflict with char $ac_func(); below.  */
5342 #include <assert.h>
5343 /* Override any gcc2 internal prototype to avoid an error.  */
5344 /* We use char because int might match the return type of a gcc2
5345     builtin and then its argument prototype would still apply.  */
5346 char $ac_func();
5347
5348 int main() {
5349
5350 /* The GNU C library defines this for functions which it implements
5351     to always fail with ENOSYS.  Some functions are actually named
5352     something starting with __ and the normal name is an alias.  */
5353 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5354 choke me
5355 #else
5356 $ac_func();
5357 #endif
5358
5359 ; return 0; }
5360 EOF
5361 if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5362   rm -rf conftest*
5363   eval "ac_cv_func_$ac_func=yes"
5364 else
5365   echo "configure: failed program was:" >&5
5366   cat conftest.$ac_ext >&5
5367   rm -rf conftest*
5368   eval "ac_cv_func_$ac_func=no"
5369 fi
5370 rm -f conftest*
5371 fi
5372
5373 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5374   echo "$ac_t""yes" 1>&6
5375     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5376   cat >> confdefs.h <<EOF
5377 #define $ac_tr_func 1
5378 EOF
5379  
5380 else
5381   echo "$ac_t""no" 1>&6
5382 fi
5383 done
5384
5385 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5386         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5387 echo "configure:5388: checking for yp_get_default_domain in -lnsl" >&5
5388 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5389 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5390   echo $ac_n "(cached) $ac_c" 1>&6
5391 else
5392   ac_save_LIBS="$LIBS"
5393 LIBS="-lnsl  $LIBS"
5394 cat > conftest.$ac_ext <<EOF
5395 #line 5396 "configure"
5396 #include "confdefs.h"
5397 /* Override any gcc2 internal prototype to avoid an error.  */
5398 /* We use char because int might match the return type of a gcc2
5399     builtin and then its argument prototype would still apply.  */
5400 char yp_get_default_domain();
5401
5402 int main() {
5403 yp_get_default_domain()
5404 ; return 0; }
5405 EOF
5406 if { (eval echo configure:5407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5407   rm -rf conftest*
5408   eval "ac_cv_lib_$ac_lib_var=yes"
5409 else
5410   echo "configure: failed program was:" >&5
5411   cat conftest.$ac_ext >&5
5412   rm -rf conftest*
5413   eval "ac_cv_lib_$ac_lib_var=no"
5414 fi
5415 rm -f conftest*
5416 LIBS="$ac_save_LIBS"
5417
5418 fi
5419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5420   echo "$ac_t""yes" 1>&6
5421   LIBS="$LIBS -lnsl";
5422         cat >> confdefs.h <<\EOF
5423 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5424 EOF
5425
5426 else
5427   echo "$ac_t""no" 1>&6
5428 fi
5429  
5430 fi
5431
5432 # Check if we have execl, if not we need to compile smbrun.
5433 for ac_func in execl
5434 do
5435 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5436 echo "configure:5437: checking for $ac_func" >&5
5437 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5438   echo $ac_n "(cached) $ac_c" 1>&6
5439 else
5440   cat > conftest.$ac_ext <<EOF
5441 #line 5442 "configure"
5442 #include "confdefs.h"
5443 /* System header to define __stub macros and hopefully few prototypes,
5444     which can conflict with char $ac_func(); below.  */
5445 #include <assert.h>
5446 /* Override any gcc2 internal prototype to avoid an error.  */
5447 /* We use char because int might match the return type of a gcc2
5448     builtin and then its argument prototype would still apply.  */
5449 char $ac_func();
5450
5451 int main() {
5452
5453 /* The GNU C library defines this for functions which it implements
5454     to always fail with ENOSYS.  Some functions are actually named
5455     something starting with __ and the normal name is an alias.  */
5456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5457 choke me
5458 #else
5459 $ac_func();
5460 #endif
5461
5462 ; return 0; }
5463 EOF
5464 if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5465   rm -rf conftest*
5466   eval "ac_cv_func_$ac_func=yes"
5467 else
5468   echo "configure: failed program was:" >&5
5469   cat conftest.$ac_ext >&5
5470   rm -rf conftest*
5471   eval "ac_cv_func_$ac_func=no"
5472 fi
5473 rm -f conftest*
5474 fi
5475
5476 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5477   echo "$ac_t""yes" 1>&6
5478     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5479   cat >> confdefs.h <<EOF
5480 #define $ac_tr_func 1
5481 EOF
5482  
5483 else
5484   echo "$ac_t""no" 1>&6
5485 fi
5486 done
5487
5488 if test x"$ac_cv_func_execl" = x"no"; then
5489     RUNPROG="bin/smbrun"
5490 else
5491     RUNPROG=""
5492 fi
5493
5494 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5495 do
5496 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5497 echo "configure:5498: checking for $ac_func" >&5
5498 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5499   echo $ac_n "(cached) $ac_c" 1>&6
5500 else
5501   cat > conftest.$ac_ext <<EOF
5502 #line 5503 "configure"
5503 #include "confdefs.h"
5504 /* System header to define __stub macros and hopefully few prototypes,
5505     which can conflict with char $ac_func(); below.  */
5506 #include <assert.h>
5507 /* Override any gcc2 internal prototype to avoid an error.  */
5508 /* We use char because int might match the return type of a gcc2
5509     builtin and then its argument prototype would still apply.  */
5510 char $ac_func();
5511
5512 int main() {
5513
5514 /* The GNU C library defines this for functions which it implements
5515     to always fail with ENOSYS.  Some functions are actually named
5516     something starting with __ and the normal name is an alias.  */
5517 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5518 choke me
5519 #else
5520 $ac_func();
5521 #endif
5522
5523 ; return 0; }
5524 EOF
5525 if { (eval echo configure:5526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5526   rm -rf conftest*
5527   eval "ac_cv_func_$ac_func=yes"
5528 else
5529   echo "configure: failed program was:" >&5
5530   cat conftest.$ac_ext >&5
5531   rm -rf conftest*
5532   eval "ac_cv_func_$ac_func=no"
5533 fi
5534 rm -f conftest*
5535 fi
5536
5537 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5538   echo "$ac_t""yes" 1>&6
5539     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5540   cat >> confdefs.h <<EOF
5541 #define $ac_tr_func 1
5542 EOF
5543  
5544 else
5545   echo "$ac_t""no" 1>&6
5546 fi
5547 done
5548
5549 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5550 do
5551 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5552 echo "configure:5553: checking for $ac_func" >&5
5553 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5554   echo $ac_n "(cached) $ac_c" 1>&6
5555 else
5556   cat > conftest.$ac_ext <<EOF
5557 #line 5558 "configure"
5558 #include "confdefs.h"
5559 /* System header to define __stub macros and hopefully few prototypes,
5560     which can conflict with char $ac_func(); below.  */
5561 #include <assert.h>
5562 /* Override any gcc2 internal prototype to avoid an error.  */
5563 /* We use char because int might match the return type of a gcc2
5564     builtin and then its argument prototype would still apply.  */
5565 char $ac_func();
5566
5567 int main() {
5568
5569 /* The GNU C library defines this for functions which it implements
5570     to always fail with ENOSYS.  Some functions are actually named
5571     something starting with __ and the normal name is an alias.  */
5572 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5573 choke me
5574 #else
5575 $ac_func();
5576 #endif
5577
5578 ; return 0; }
5579 EOF
5580 if { (eval echo configure:5581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5581   rm -rf conftest*
5582   eval "ac_cv_func_$ac_func=yes"
5583 else
5584   echo "configure: failed program was:" >&5
5585   cat conftest.$ac_ext >&5
5586   rm -rf conftest*
5587   eval "ac_cv_func_$ac_func=no"
5588 fi
5589 rm -f conftest*
5590 fi
5591
5592 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5593   echo "$ac_t""yes" 1>&6
5594     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5595   cat >> confdefs.h <<EOF
5596 #define $ac_tr_func 1
5597 EOF
5598  
5599 else
5600   echo "$ac_t""no" 1>&6
5601 fi
5602 done
5603
5604 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5605 do
5606 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5607 echo "configure:5608: checking for $ac_func" >&5
5608 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5609   echo $ac_n "(cached) $ac_c" 1>&6
5610 else
5611   cat > conftest.$ac_ext <<EOF
5612 #line 5613 "configure"
5613 #include "confdefs.h"
5614 /* System header to define __stub macros and hopefully few prototypes,
5615     which can conflict with char $ac_func(); below.  */
5616 #include <assert.h>
5617 /* Override any gcc2 internal prototype to avoid an error.  */
5618 /* We use char because int might match the return type of a gcc2
5619     builtin and then its argument prototype would still apply.  */
5620 char $ac_func();
5621
5622 int main() {
5623
5624 /* The GNU C library defines this for functions which it implements
5625     to always fail with ENOSYS.  Some functions are actually named
5626     something starting with __ and the normal name is an alias.  */
5627 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5628 choke me
5629 #else
5630 $ac_func();
5631 #endif
5632
5633 ; return 0; }
5634 EOF
5635 if { (eval echo configure:5636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5636   rm -rf conftest*
5637   eval "ac_cv_func_$ac_func=yes"
5638 else
5639   echo "configure: failed program was:" >&5
5640   cat conftest.$ac_ext >&5
5641   rm -rf conftest*
5642   eval "ac_cv_func_$ac_func=no"
5643 fi
5644 rm -f conftest*
5645 fi
5646
5647 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5648   echo "$ac_t""yes" 1>&6
5649     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5650   cat >> confdefs.h <<EOF
5651 #define $ac_tr_func 1
5652 EOF
5653  
5654 else
5655   echo "$ac_t""no" 1>&6
5656 fi
5657 done
5658
5659 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5660 do
5661 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5662 echo "configure:5663: checking for $ac_func" >&5
5663 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5664   echo $ac_n "(cached) $ac_c" 1>&6
5665 else
5666   cat > conftest.$ac_ext <<EOF
5667 #line 5668 "configure"
5668 #include "confdefs.h"
5669 /* System header to define __stub macros and hopefully few prototypes,
5670     which can conflict with char $ac_func(); below.  */
5671 #include <assert.h>
5672 /* Override any gcc2 internal prototype to avoid an error.  */
5673 /* We use char because int might match the return type of a gcc2
5674     builtin and then its argument prototype would still apply.  */
5675 char $ac_func();
5676
5677 int main() {
5678
5679 /* The GNU C library defines this for functions which it implements
5680     to always fail with ENOSYS.  Some functions are actually named
5681     something starting with __ and the normal name is an alias.  */
5682 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5683 choke me
5684 #else
5685 $ac_func();
5686 #endif
5687
5688 ; return 0; }
5689 EOF
5690 if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5691   rm -rf conftest*
5692   eval "ac_cv_func_$ac_func=yes"
5693 else
5694   echo "configure: failed program was:" >&5
5695   cat conftest.$ac_ext >&5
5696   rm -rf conftest*
5697   eval "ac_cv_func_$ac_func=no"
5698 fi
5699 rm -f conftest*
5700 fi
5701
5702 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5703   echo "$ac_t""yes" 1>&6
5704     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5705   cat >> confdefs.h <<EOF
5706 #define $ac_tr_func 1
5707 EOF
5708  
5709 else
5710   echo "$ac_t""no" 1>&6
5711 fi
5712 done
5713
5714 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5715 do
5716 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5717 echo "configure:5718: checking for $ac_func" >&5
5718 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5719   echo $ac_n "(cached) $ac_c" 1>&6
5720 else
5721   cat > conftest.$ac_ext <<EOF
5722 #line 5723 "configure"
5723 #include "confdefs.h"
5724 /* System header to define __stub macros and hopefully few prototypes,
5725     which can conflict with char $ac_func(); below.  */
5726 #include <assert.h>
5727 /* Override any gcc2 internal prototype to avoid an error.  */
5728 /* We use char because int might match the return type of a gcc2
5729     builtin and then its argument prototype would still apply.  */
5730 char $ac_func();
5731
5732 int main() {
5733
5734 /* The GNU C library defines this for functions which it implements
5735     to always fail with ENOSYS.  Some functions are actually named
5736     something starting with __ and the normal name is an alias.  */
5737 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5738 choke me
5739 #else
5740 $ac_func();
5741 #endif
5742
5743 ; return 0; }
5744 EOF
5745 if { (eval echo configure:5746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5746   rm -rf conftest*
5747   eval "ac_cv_func_$ac_func=yes"
5748 else
5749   echo "configure: failed program was:" >&5
5750   cat conftest.$ac_ext >&5
5751   rm -rf conftest*
5752   eval "ac_cv_func_$ac_func=no"
5753 fi
5754 rm -f conftest*
5755 fi
5756
5757 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5758   echo "$ac_t""yes" 1>&6
5759     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5760   cat >> confdefs.h <<EOF
5761 #define $ac_tr_func 1
5762 EOF
5763  
5764 else
5765   echo "$ac_t""no" 1>&6
5766 fi
5767 done
5768
5769 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5770 do
5771 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5772 echo "configure:5773: checking for $ac_func" >&5
5773 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5774   echo $ac_n "(cached) $ac_c" 1>&6
5775 else
5776   cat > conftest.$ac_ext <<EOF
5777 #line 5778 "configure"
5778 #include "confdefs.h"
5779 /* System header to define __stub macros and hopefully few prototypes,
5780     which can conflict with char $ac_func(); below.  */
5781 #include <assert.h>
5782 /* Override any gcc2 internal prototype to avoid an error.  */
5783 /* We use char because int might match the return type of a gcc2
5784     builtin and then its argument prototype would still apply.  */
5785 char $ac_func();
5786
5787 int main() {
5788
5789 /* The GNU C library defines this for functions which it implements
5790     to always fail with ENOSYS.  Some functions are actually named
5791     something starting with __ and the normal name is an alias.  */
5792 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5793 choke me
5794 #else
5795 $ac_func();
5796 #endif
5797
5798 ; return 0; }
5799 EOF
5800 if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5801   rm -rf conftest*
5802   eval "ac_cv_func_$ac_func=yes"
5803 else
5804   echo "configure: failed program was:" >&5
5805   cat conftest.$ac_ext >&5
5806   rm -rf conftest*
5807   eval "ac_cv_func_$ac_func=no"
5808 fi
5809 rm -f conftest*
5810 fi
5811
5812 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5813   echo "$ac_t""yes" 1>&6
5814     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5815   cat >> confdefs.h <<EOF
5816 #define $ac_tr_func 1
5817 EOF
5818  
5819 else
5820   echo "$ac_t""no" 1>&6
5821 fi
5822 done
5823
5824 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5825 do
5826 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5827 echo "configure:5828: checking for $ac_func" >&5
5828 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5829   echo $ac_n "(cached) $ac_c" 1>&6
5830 else
5831   cat > conftest.$ac_ext <<EOF
5832 #line 5833 "configure"
5833 #include "confdefs.h"
5834 /* System header to define __stub macros and hopefully few prototypes,
5835     which can conflict with char $ac_func(); below.  */
5836 #include <assert.h>
5837 /* Override any gcc2 internal prototype to avoid an error.  */
5838 /* We use char because int might match the return type of a gcc2
5839     builtin and then its argument prototype would still apply.  */
5840 char $ac_func();
5841
5842 int main() {
5843
5844 /* The GNU C library defines this for functions which it implements
5845     to always fail with ENOSYS.  Some functions are actually named
5846     something starting with __ and the normal name is an alias.  */
5847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5848 choke me
5849 #else
5850 $ac_func();
5851 #endif
5852
5853 ; return 0; }
5854 EOF
5855 if { (eval echo configure:5856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5856   rm -rf conftest*
5857   eval "ac_cv_func_$ac_func=yes"
5858 else
5859   echo "configure: failed program was:" >&5
5860   cat conftest.$ac_ext >&5
5861   rm -rf conftest*
5862   eval "ac_cv_func_$ac_func=no"
5863 fi
5864 rm -f conftest*
5865 fi
5866
5867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5868   echo "$ac_t""yes" 1>&6
5869     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5870   cat >> confdefs.h <<EOF
5871 #define $ac_tr_func 1
5872 EOF
5873  
5874 else
5875   echo "$ac_t""no" 1>&6
5876 fi
5877 done
5878
5879 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
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${ac_exeext}; 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 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5935 do
5936 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5937 echo "configure:5938: checking for $ac_func" >&5
5938 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5939   echo $ac_n "(cached) $ac_c" 1>&6
5940 else
5941   cat > conftest.$ac_ext <<EOF
5942 #line 5943 "configure"
5943 #include "confdefs.h"
5944 /* System header to define __stub macros and hopefully few prototypes,
5945     which can conflict with char $ac_func(); below.  */
5946 #include <assert.h>
5947 /* Override any gcc2 internal prototype to avoid an error.  */
5948 /* We use char because int might match the return type of a gcc2
5949     builtin and then its argument prototype would still apply.  */
5950 char $ac_func();
5951
5952 int main() {
5953
5954 /* The GNU C library defines this for functions which it implements
5955     to always fail with ENOSYS.  Some functions are actually named
5956     something starting with __ and the normal name is an alias.  */
5957 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5958 choke me
5959 #else
5960 $ac_func();
5961 #endif
5962
5963 ; return 0; }
5964 EOF
5965 if { (eval echo configure:5966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5966   rm -rf conftest*
5967   eval "ac_cv_func_$ac_func=yes"
5968 else
5969   echo "configure: failed program was:" >&5
5970   cat conftest.$ac_ext >&5
5971   rm -rf conftest*
5972   eval "ac_cv_func_$ac_func=no"
5973 fi
5974 rm -f conftest*
5975 fi
5976
5977 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5978   echo "$ac_t""yes" 1>&6
5979     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5980   cat >> confdefs.h <<EOF
5981 #define $ac_tr_func 1
5982 EOF
5983  
5984 else
5985   echo "$ac_t""no" 1>&6
5986 fi
5987 done
5988
5989 for ac_func in syslog vsyslog getgrouplist
5990 do
5991 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5992 echo "configure:5993: checking for $ac_func" >&5
5993 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5994   echo $ac_n "(cached) $ac_c" 1>&6
5995 else
5996   cat > conftest.$ac_ext <<EOF
5997 #line 5998 "configure"
5998 #include "confdefs.h"
5999 /* System header to define __stub macros and hopefully few prototypes,
6000     which can conflict with char $ac_func(); below.  */
6001 #include <assert.h>
6002 /* Override any gcc2 internal prototype to avoid an error.  */
6003 /* We use char because int might match the return type of a gcc2
6004     builtin and then its argument prototype would still apply.  */
6005 char $ac_func();
6006
6007 int main() {
6008
6009 /* The GNU C library defines this for functions which it implements
6010     to always fail with ENOSYS.  Some functions are actually named
6011     something starting with __ and the normal name is an alias.  */
6012 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6013 choke me
6014 #else
6015 $ac_func();
6016 #endif
6017
6018 ; return 0; }
6019 EOF
6020 if { (eval echo configure:6021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6021   rm -rf conftest*
6022   eval "ac_cv_func_$ac_func=yes"
6023 else
6024   echo "configure: failed program was:" >&5
6025   cat conftest.$ac_ext >&5
6026   rm -rf conftest*
6027   eval "ac_cv_func_$ac_func=no"
6028 fi
6029 rm -f conftest*
6030 fi
6031
6032 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6033   echo "$ac_t""yes" 1>&6
6034     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6035   cat >> confdefs.h <<EOF
6036 #define $ac_tr_func 1
6037 EOF
6038  
6039 else
6040   echo "$ac_t""no" 1>&6
6041 fi
6042 done
6043
6044 # setbuffer is needed for smbtorture
6045 for ac_func in setbuffer
6046 do
6047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6048 echo "configure:6049: checking for $ac_func" >&5
6049 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6050   echo $ac_n "(cached) $ac_c" 1>&6
6051 else
6052   cat > conftest.$ac_ext <<EOF
6053 #line 6054 "configure"
6054 #include "confdefs.h"
6055 /* System header to define __stub macros and hopefully few prototypes,
6056     which can conflict with char $ac_func(); below.  */
6057 #include <assert.h>
6058 /* Override any gcc2 internal prototype to avoid an error.  */
6059 /* We use char because int might match the return type of a gcc2
6060     builtin and then its argument prototype would still apply.  */
6061 char $ac_func();
6062
6063 int main() {
6064
6065 /* The GNU C library defines this for functions which it implements
6066     to always fail with ENOSYS.  Some functions are actually named
6067     something starting with __ and the normal name is an alias.  */
6068 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6069 choke me
6070 #else
6071 $ac_func();
6072 #endif
6073
6074 ; return 0; }
6075 EOF
6076 if { (eval echo configure:6077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6077   rm -rf conftest*
6078   eval "ac_cv_func_$ac_func=yes"
6079 else
6080   echo "configure: failed program was:" >&5
6081   cat conftest.$ac_ext >&5
6082   rm -rf conftest*
6083   eval "ac_cv_func_$ac_func=no"
6084 fi
6085 rm -f conftest*
6086 fi
6087
6088 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6089   echo "$ac_t""yes" 1>&6
6090     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6091   cat >> confdefs.h <<EOF
6092 #define $ac_tr_func 1
6093 EOF
6094  
6095 else
6096   echo "$ac_t""no" 1>&6
6097 fi
6098 done
6099
6100
6101 # syscall() is needed for smbwrapper.
6102 for ac_func in syscall
6103 do
6104 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6105 echo "configure:6106: checking for $ac_func" >&5
6106 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6107   echo $ac_n "(cached) $ac_c" 1>&6
6108 else
6109   cat > conftest.$ac_ext <<EOF
6110 #line 6111 "configure"
6111 #include "confdefs.h"
6112 /* System header to define __stub macros and hopefully few prototypes,
6113     which can conflict with char $ac_func(); below.  */
6114 #include <assert.h>
6115 /* Override any gcc2 internal prototype to avoid an error.  */
6116 /* We use char because int might match the return type of a gcc2
6117     builtin and then its argument prototype would still apply.  */
6118 char $ac_func();
6119
6120 int main() {
6121
6122 /* The GNU C library defines this for functions which it implements
6123     to always fail with ENOSYS.  Some functions are actually named
6124     something starting with __ and the normal name is an alias.  */
6125 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6126 choke me
6127 #else
6128 $ac_func();
6129 #endif
6130
6131 ; return 0; }
6132 EOF
6133 if { (eval echo configure:6134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6134   rm -rf conftest*
6135   eval "ac_cv_func_$ac_func=yes"
6136 else
6137   echo "configure: failed program was:" >&5
6138   cat conftest.$ac_ext >&5
6139   rm -rf conftest*
6140   eval "ac_cv_func_$ac_func=no"
6141 fi
6142 rm -f conftest*
6143 fi
6144
6145 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6146   echo "$ac_t""yes" 1>&6
6147     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6148   cat >> confdefs.h <<EOF
6149 #define $ac_tr_func 1
6150 EOF
6151  
6152 else
6153   echo "$ac_t""no" 1>&6
6154 fi
6155 done
6156
6157
6158 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6159 do
6160 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6161 echo "configure:6162: checking for $ac_func" >&5
6162 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6163   echo $ac_n "(cached) $ac_c" 1>&6
6164 else
6165   cat > conftest.$ac_ext <<EOF
6166 #line 6167 "configure"
6167 #include "confdefs.h"
6168 /* System header to define __stub macros and hopefully few prototypes,
6169     which can conflict with char $ac_func(); below.  */
6170 #include <assert.h>
6171 /* Override any gcc2 internal prototype to avoid an error.  */
6172 /* We use char because int might match the return type of a gcc2
6173     builtin and then its argument prototype would still apply.  */
6174 char $ac_func();
6175
6176 int main() {
6177
6178 /* The GNU C library defines this for functions which it implements
6179     to always fail with ENOSYS.  Some functions are actually named
6180     something starting with __ and the normal name is an alias.  */
6181 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6182 choke me
6183 #else
6184 $ac_func();
6185 #endif
6186
6187 ; return 0; }
6188 EOF
6189 if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6190   rm -rf conftest*
6191   eval "ac_cv_func_$ac_func=yes"
6192 else
6193   echo "configure: failed program was:" >&5
6194   cat conftest.$ac_ext >&5
6195   rm -rf conftest*
6196   eval "ac_cv_func_$ac_func=no"
6197 fi
6198 rm -f conftest*
6199 fi
6200
6201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6202   echo "$ac_t""yes" 1>&6
6203     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6204   cat >> confdefs.h <<EOF
6205 #define $ac_tr_func 1
6206 EOF
6207  
6208 else
6209   echo "$ac_t""no" 1>&6
6210 fi
6211 done
6212
6213 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6214 do
6215 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6216 echo "configure:6217: checking for $ac_func" >&5
6217 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6218   echo $ac_n "(cached) $ac_c" 1>&6
6219 else
6220   cat > conftest.$ac_ext <<EOF
6221 #line 6222 "configure"
6222 #include "confdefs.h"
6223 /* System header to define __stub macros and hopefully few prototypes,
6224     which can conflict with char $ac_func(); below.  */
6225 #include <assert.h>
6226 /* Override any gcc2 internal prototype to avoid an error.  */
6227 /* We use char because int might match the return type of a gcc2
6228     builtin and then its argument prototype would still apply.  */
6229 char $ac_func();
6230
6231 int main() {
6232
6233 /* The GNU C library defines this for functions which it implements
6234     to always fail with ENOSYS.  Some functions are actually named
6235     something starting with __ and the normal name is an alias.  */
6236 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6237 choke me
6238 #else
6239 $ac_func();
6240 #endif
6241
6242 ; return 0; }
6243 EOF
6244 if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6245   rm -rf conftest*
6246   eval "ac_cv_func_$ac_func=yes"
6247 else
6248   echo "configure: failed program was:" >&5
6249   cat conftest.$ac_ext >&5
6250   rm -rf conftest*
6251   eval "ac_cv_func_$ac_func=no"
6252 fi
6253 rm -f conftest*
6254 fi
6255
6256 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6257   echo "$ac_t""yes" 1>&6
6258     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6259   cat >> confdefs.h <<EOF
6260 #define $ac_tr_func 1
6261 EOF
6262  
6263 else
6264   echo "$ac_t""no" 1>&6
6265 fi
6266 done
6267
6268 for ac_func in __getcwd _getcwd
6269 do
6270 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6271 echo "configure:6272: checking for $ac_func" >&5
6272 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6273   echo $ac_n "(cached) $ac_c" 1>&6
6274 else
6275   cat > conftest.$ac_ext <<EOF
6276 #line 6277 "configure"
6277 #include "confdefs.h"
6278 /* System header to define __stub macros and hopefully few prototypes,
6279     which can conflict with char $ac_func(); below.  */
6280 #include <assert.h>
6281 /* Override any gcc2 internal prototype to avoid an error.  */
6282 /* We use char because int might match the return type of a gcc2
6283     builtin and then its argument prototype would still apply.  */
6284 char $ac_func();
6285
6286 int main() {
6287
6288 /* The GNU C library defines this for functions which it implements
6289     to always fail with ENOSYS.  Some functions are actually named
6290     something starting with __ and the normal name is an alias.  */
6291 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6292 choke me
6293 #else
6294 $ac_func();
6295 #endif
6296
6297 ; return 0; }
6298 EOF
6299 if { (eval echo configure:6300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6300   rm -rf conftest*
6301   eval "ac_cv_func_$ac_func=yes"
6302 else
6303   echo "configure: failed program was:" >&5
6304   cat conftest.$ac_ext >&5
6305   rm -rf conftest*
6306   eval "ac_cv_func_$ac_func=no"
6307 fi
6308 rm -f conftest*
6309 fi
6310
6311 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6312   echo "$ac_t""yes" 1>&6
6313     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6314   cat >> confdefs.h <<EOF
6315 #define $ac_tr_func 1
6316 EOF
6317  
6318 else
6319   echo "$ac_t""no" 1>&6
6320 fi
6321 done
6322
6323 for ac_func in __xstat __fxstat __lxstat
6324 do
6325 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6326 echo "configure:6327: checking for $ac_func" >&5
6327 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6328   echo $ac_n "(cached) $ac_c" 1>&6
6329 else
6330   cat > conftest.$ac_ext <<EOF
6331 #line 6332 "configure"
6332 #include "confdefs.h"
6333 /* System header to define __stub macros and hopefully few prototypes,
6334     which can conflict with char $ac_func(); below.  */
6335 #include <assert.h>
6336 /* Override any gcc2 internal prototype to avoid an error.  */
6337 /* We use char because int might match the return type of a gcc2
6338     builtin and then its argument prototype would still apply.  */
6339 char $ac_func();
6340
6341 int main() {
6342
6343 /* The GNU C library defines this for functions which it implements
6344     to always fail with ENOSYS.  Some functions are actually named
6345     something starting with __ and the normal name is an alias.  */
6346 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6347 choke me
6348 #else
6349 $ac_func();
6350 #endif
6351
6352 ; return 0; }
6353 EOF
6354 if { (eval echo configure:6355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6355   rm -rf conftest*
6356   eval "ac_cv_func_$ac_func=yes"
6357 else
6358   echo "configure: failed program was:" >&5
6359   cat conftest.$ac_ext >&5
6360   rm -rf conftest*
6361   eval "ac_cv_func_$ac_func=no"
6362 fi
6363 rm -f conftest*
6364 fi
6365
6366 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6367   echo "$ac_t""yes" 1>&6
6368     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6369   cat >> confdefs.h <<EOF
6370 #define $ac_tr_func 1
6371 EOF
6372  
6373 else
6374   echo "$ac_t""no" 1>&6
6375 fi
6376 done
6377
6378 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6379 do
6380 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6381 echo "configure:6382: checking for $ac_func" >&5
6382 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6383   echo $ac_n "(cached) $ac_c" 1>&6
6384 else
6385   cat > conftest.$ac_ext <<EOF
6386 #line 6387 "configure"
6387 #include "confdefs.h"
6388 /* System header to define __stub macros and hopefully few prototypes,
6389     which can conflict with char $ac_func(); below.  */
6390 #include <assert.h>
6391 /* Override any gcc2 internal prototype to avoid an error.  */
6392 /* We use char because int might match the return type of a gcc2
6393     builtin and then its argument prototype would still apply.  */
6394 char $ac_func();
6395
6396 int main() {
6397
6398 /* The GNU C library defines this for functions which it implements
6399     to always fail with ENOSYS.  Some functions are actually named
6400     something starting with __ and the normal name is an alias.  */
6401 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6402 choke me
6403 #else
6404 $ac_func();
6405 #endif
6406
6407 ; return 0; }
6408 EOF
6409 if { (eval echo configure:6410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6410   rm -rf conftest*
6411   eval "ac_cv_func_$ac_func=yes"
6412 else
6413   echo "configure: failed program was:" >&5
6414   cat conftest.$ac_ext >&5
6415   rm -rf conftest*
6416   eval "ac_cv_func_$ac_func=no"
6417 fi
6418 rm -f conftest*
6419 fi
6420
6421 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6422   echo "$ac_t""yes" 1>&6
6423     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6424   cat >> confdefs.h <<EOF
6425 #define $ac_tr_func 1
6426 EOF
6427  
6428 else
6429   echo "$ac_t""no" 1>&6
6430 fi
6431 done
6432
6433 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6434 do
6435 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6436 echo "configure:6437: checking for $ac_func" >&5
6437 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6438   echo $ac_n "(cached) $ac_c" 1>&6
6439 else
6440   cat > conftest.$ac_ext <<EOF
6441 #line 6442 "configure"
6442 #include "confdefs.h"
6443 /* System header to define __stub macros and hopefully few prototypes,
6444     which can conflict with char $ac_func(); below.  */
6445 #include <assert.h>
6446 /* Override any gcc2 internal prototype to avoid an error.  */
6447 /* We use char because int might match the return type of a gcc2
6448     builtin and then its argument prototype would still apply.  */
6449 char $ac_func();
6450
6451 int main() {
6452
6453 /* The GNU C library defines this for functions which it implements
6454     to always fail with ENOSYS.  Some functions are actually named
6455     something starting with __ and the normal name is an alias.  */
6456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6457 choke me
6458 #else
6459 $ac_func();
6460 #endif
6461
6462 ; return 0; }
6463 EOF
6464 if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6465   rm -rf conftest*
6466   eval "ac_cv_func_$ac_func=yes"
6467 else
6468   echo "configure: failed program was:" >&5
6469   cat conftest.$ac_ext >&5
6470   rm -rf conftest*
6471   eval "ac_cv_func_$ac_func=no"
6472 fi
6473 rm -f conftest*
6474 fi
6475
6476 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6477   echo "$ac_t""yes" 1>&6
6478     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6479   cat >> confdefs.h <<EOF
6480 #define $ac_tr_func 1
6481 EOF
6482  
6483 else
6484   echo "$ac_t""no" 1>&6
6485 fi
6486 done
6487
6488 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6489 do
6490 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6491 echo "configure:6492: checking for $ac_func" >&5
6492 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6493   echo $ac_n "(cached) $ac_c" 1>&6
6494 else
6495   cat > conftest.$ac_ext <<EOF
6496 #line 6497 "configure"
6497 #include "confdefs.h"
6498 /* System header to define __stub macros and hopefully few prototypes,
6499     which can conflict with char $ac_func(); below.  */
6500 #include <assert.h>
6501 /* Override any gcc2 internal prototype to avoid an error.  */
6502 /* We use char because int might match the return type of a gcc2
6503     builtin and then its argument prototype would still apply.  */
6504 char $ac_func();
6505
6506 int main() {
6507
6508 /* The GNU C library defines this for functions which it implements
6509     to always fail with ENOSYS.  Some functions are actually named
6510     something starting with __ and the normal name is an alias.  */
6511 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6512 choke me
6513 #else
6514 $ac_func();
6515 #endif
6516
6517 ; return 0; }
6518 EOF
6519 if { (eval echo configure:6520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6520   rm -rf conftest*
6521   eval "ac_cv_func_$ac_func=yes"
6522 else
6523   echo "configure: failed program was:" >&5
6524   cat conftest.$ac_ext >&5
6525   rm -rf conftest*
6526   eval "ac_cv_func_$ac_func=no"
6527 fi
6528 rm -f conftest*
6529 fi
6530
6531 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6532   echo "$ac_t""yes" 1>&6
6533     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6534   cat >> confdefs.h <<EOF
6535 #define $ac_tr_func 1
6536 EOF
6537  
6538 else
6539   echo "$ac_t""no" 1>&6
6540 fi
6541 done
6542
6543 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6544 do
6545 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6546 echo "configure:6547: checking for $ac_func" >&5
6547 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6548   echo $ac_n "(cached) $ac_c" 1>&6
6549 else
6550   cat > conftest.$ac_ext <<EOF
6551 #line 6552 "configure"
6552 #include "confdefs.h"
6553 /* System header to define __stub macros and hopefully few prototypes,
6554     which can conflict with char $ac_func(); below.  */
6555 #include <assert.h>
6556 /* Override any gcc2 internal prototype to avoid an error.  */
6557 /* We use char because int might match the return type of a gcc2
6558     builtin and then its argument prototype would still apply.  */
6559 char $ac_func();
6560
6561 int main() {
6562
6563 /* The GNU C library defines this for functions which it implements
6564     to always fail with ENOSYS.  Some functions are actually named
6565     something starting with __ and the normal name is an alias.  */
6566 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6567 choke me
6568 #else
6569 $ac_func();
6570 #endif
6571
6572 ; return 0; }
6573 EOF
6574 if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6575   rm -rf conftest*
6576   eval "ac_cv_func_$ac_func=yes"
6577 else
6578   echo "configure: failed program was:" >&5
6579   cat conftest.$ac_ext >&5
6580   rm -rf conftest*
6581   eval "ac_cv_func_$ac_func=no"
6582 fi
6583 rm -f conftest*
6584 fi
6585
6586 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6587   echo "$ac_t""yes" 1>&6
6588     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6589   cat >> confdefs.h <<EOF
6590 #define $ac_tr_func 1
6591 EOF
6592  
6593 else
6594   echo "$ac_t""no" 1>&6
6595 fi
6596 done
6597
6598 for ac_func in _write __write _fork __fork
6599 do
6600 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6601 echo "configure:6602: checking for $ac_func" >&5
6602 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6603   echo $ac_n "(cached) $ac_c" 1>&6
6604 else
6605   cat > conftest.$ac_ext <<EOF
6606 #line 6607 "configure"
6607 #include "confdefs.h"
6608 /* System header to define __stub macros and hopefully few prototypes,
6609     which can conflict with char $ac_func(); below.  */
6610 #include <assert.h>
6611 /* Override any gcc2 internal prototype to avoid an error.  */
6612 /* We use char because int might match the return type of a gcc2
6613     builtin and then its argument prototype would still apply.  */
6614 char $ac_func();
6615
6616 int main() {
6617
6618 /* The GNU C library defines this for functions which it implements
6619     to always fail with ENOSYS.  Some functions are actually named
6620     something starting with __ and the normal name is an alias.  */
6621 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6622 choke me
6623 #else
6624 $ac_func();
6625 #endif
6626
6627 ; return 0; }
6628 EOF
6629 if { (eval echo configure:6630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6630   rm -rf conftest*
6631   eval "ac_cv_func_$ac_func=yes"
6632 else
6633   echo "configure: failed program was:" >&5
6634   cat conftest.$ac_ext >&5
6635   rm -rf conftest*
6636   eval "ac_cv_func_$ac_func=no"
6637 fi
6638 rm -f conftest*
6639 fi
6640
6641 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6642   echo "$ac_t""yes" 1>&6
6643     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6644   cat >> confdefs.h <<EOF
6645 #define $ac_tr_func 1
6646 EOF
6647  
6648 else
6649   echo "$ac_t""no" 1>&6
6650 fi
6651 done
6652
6653 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6654 do
6655 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6656 echo "configure:6657: checking for $ac_func" >&5
6657 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6658   echo $ac_n "(cached) $ac_c" 1>&6
6659 else
6660   cat > conftest.$ac_ext <<EOF
6661 #line 6662 "configure"
6662 #include "confdefs.h"
6663 /* System header to define __stub macros and hopefully few prototypes,
6664     which can conflict with char $ac_func(); below.  */
6665 #include <assert.h>
6666 /* Override any gcc2 internal prototype to avoid an error.  */
6667 /* We use char because int might match the return type of a gcc2
6668     builtin and then its argument prototype would still apply.  */
6669 char $ac_func();
6670
6671 int main() {
6672
6673 /* The GNU C library defines this for functions which it implements
6674     to always fail with ENOSYS.  Some functions are actually named
6675     something starting with __ and the normal name is an alias.  */
6676 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6677 choke me
6678 #else
6679 $ac_func();
6680 #endif
6681
6682 ; return 0; }
6683 EOF
6684 if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6685   rm -rf conftest*
6686   eval "ac_cv_func_$ac_func=yes"
6687 else
6688   echo "configure: failed program was:" >&5
6689   cat conftest.$ac_ext >&5
6690   rm -rf conftest*
6691   eval "ac_cv_func_$ac_func=no"
6692 fi
6693 rm -f conftest*
6694 fi
6695
6696 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6697   echo "$ac_t""yes" 1>&6
6698     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6699   cat >> confdefs.h <<EOF
6700 #define $ac_tr_func 1
6701 EOF
6702  
6703 else
6704   echo "$ac_t""no" 1>&6
6705 fi
6706 done
6707
6708 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6709 do
6710 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6711 echo "configure:6712: checking for $ac_func" >&5
6712 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6713   echo $ac_n "(cached) $ac_c" 1>&6
6714 else
6715   cat > conftest.$ac_ext <<EOF
6716 #line 6717 "configure"
6717 #include "confdefs.h"
6718 /* System header to define __stub macros and hopefully few prototypes,
6719     which can conflict with char $ac_func(); below.  */
6720 #include <assert.h>
6721 /* Override any gcc2 internal prototype to avoid an error.  */
6722 /* We use char because int might match the return type of a gcc2
6723     builtin and then its argument prototype would still apply.  */
6724 char $ac_func();
6725
6726 int main() {
6727
6728 /* The GNU C library defines this for functions which it implements
6729     to always fail with ENOSYS.  Some functions are actually named
6730     something starting with __ and the normal name is an alias.  */
6731 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6732 choke me
6733 #else
6734 $ac_func();
6735 #endif
6736
6737 ; return 0; }
6738 EOF
6739 if { (eval echo configure:6740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6740   rm -rf conftest*
6741   eval "ac_cv_func_$ac_func=yes"
6742 else
6743   echo "configure: failed program was:" >&5
6744   cat conftest.$ac_ext >&5
6745   rm -rf conftest*
6746   eval "ac_cv_func_$ac_func=no"
6747 fi
6748 rm -f conftest*
6749 fi
6750
6751 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6752   echo "$ac_t""yes" 1>&6
6753     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6754   cat >> confdefs.h <<EOF
6755 #define $ac_tr_func 1
6756 EOF
6757  
6758 else
6759   echo "$ac_t""no" 1>&6
6760 fi
6761 done
6762
6763 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6764 do
6765 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6766 echo "configure:6767: checking for $ac_func" >&5
6767 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6768   echo $ac_n "(cached) $ac_c" 1>&6
6769 else
6770   cat > conftest.$ac_ext <<EOF
6771 #line 6772 "configure"
6772 #include "confdefs.h"
6773 /* System header to define __stub macros and hopefully few prototypes,
6774     which can conflict with char $ac_func(); below.  */
6775 #include <assert.h>
6776 /* Override any gcc2 internal prototype to avoid an error.  */
6777 /* We use char because int might match the return type of a gcc2
6778     builtin and then its argument prototype would still apply.  */
6779 char $ac_func();
6780
6781 int main() {
6782
6783 /* The GNU C library defines this for functions which it implements
6784     to always fail with ENOSYS.  Some functions are actually named
6785     something starting with __ and the normal name is an alias.  */
6786 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6787 choke me
6788 #else
6789 $ac_func();
6790 #endif
6791
6792 ; return 0; }
6793 EOF
6794 if { (eval echo configure:6795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6795   rm -rf conftest*
6796   eval "ac_cv_func_$ac_func=yes"
6797 else
6798   echo "configure: failed program was:" >&5
6799   cat conftest.$ac_ext >&5
6800   rm -rf conftest*
6801   eval "ac_cv_func_$ac_func=no"
6802 fi
6803 rm -f conftest*
6804 fi
6805
6806 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6807   echo "$ac_t""yes" 1>&6
6808     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6809   cat >> confdefs.h <<EOF
6810 #define $ac_tr_func 1
6811 EOF
6812  
6813 else
6814   echo "$ac_t""no" 1>&6
6815 fi
6816 done
6817
6818 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6819 do
6820 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6821 echo "configure:6822: checking for $ac_func" >&5
6822 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6823   echo $ac_n "(cached) $ac_c" 1>&6
6824 else
6825   cat > conftest.$ac_ext <<EOF
6826 #line 6827 "configure"
6827 #include "confdefs.h"
6828 /* System header to define __stub macros and hopefully few prototypes,
6829     which can conflict with char $ac_func(); below.  */
6830 #include <assert.h>
6831 /* Override any gcc2 internal prototype to avoid an error.  */
6832 /* We use char because int might match the return type of a gcc2
6833     builtin and then its argument prototype would still apply.  */
6834 char $ac_func();
6835
6836 int main() {
6837
6838 /* The GNU C library defines this for functions which it implements
6839     to always fail with ENOSYS.  Some functions are actually named
6840     something starting with __ and the normal name is an alias.  */
6841 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6842 choke me
6843 #else
6844 $ac_func();
6845 #endif
6846
6847 ; return 0; }
6848 EOF
6849 if { (eval echo configure:6850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6850   rm -rf conftest*
6851   eval "ac_cv_func_$ac_func=yes"
6852 else
6853   echo "configure: failed program was:" >&5
6854   cat conftest.$ac_ext >&5
6855   rm -rf conftest*
6856   eval "ac_cv_func_$ac_func=no"
6857 fi
6858 rm -f conftest*
6859 fi
6860
6861 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6862   echo "$ac_t""yes" 1>&6
6863     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6864   cat >> confdefs.h <<EOF
6865 #define $ac_tr_func 1
6866 EOF
6867  
6868 else
6869   echo "$ac_t""no" 1>&6
6870 fi
6871 done
6872
6873 for ac_func in open64 _open64 __open64 creat64
6874 do
6875 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6876 echo "configure:6877: checking for $ac_func" >&5
6877 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6878   echo $ac_n "(cached) $ac_c" 1>&6
6879 else
6880   cat > conftest.$ac_ext <<EOF
6881 #line 6882 "configure"
6882 #include "confdefs.h"
6883 /* System header to define __stub macros and hopefully few prototypes,
6884     which can conflict with char $ac_func(); below.  */
6885 #include <assert.h>
6886 /* Override any gcc2 internal prototype to avoid an error.  */
6887 /* We use char because int might match the return type of a gcc2
6888     builtin and then its argument prototype would still apply.  */
6889 char $ac_func();
6890
6891 int main() {
6892
6893 /* The GNU C library defines this for functions which it implements
6894     to always fail with ENOSYS.  Some functions are actually named
6895     something starting with __ and the normal name is an alias.  */
6896 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6897 choke me
6898 #else
6899 $ac_func();
6900 #endif
6901
6902 ; return 0; }
6903 EOF
6904 if { (eval echo configure:6905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6905   rm -rf conftest*
6906   eval "ac_cv_func_$ac_func=yes"
6907 else
6908   echo "configure: failed program was:" >&5
6909   cat conftest.$ac_ext >&5
6910   rm -rf conftest*
6911   eval "ac_cv_func_$ac_func=no"
6912 fi
6913 rm -f conftest*
6914 fi
6915
6916 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6917   echo "$ac_t""yes" 1>&6
6918     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6919   cat >> confdefs.h <<EOF
6920 #define $ac_tr_func 1
6921 EOF
6922  
6923 else
6924   echo "$ac_t""no" 1>&6
6925 fi
6926 done
6927
6928
6929 #
6930 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6931 #
6932
6933 if test x$ac_cv_func_stat64 = xno ; then
6934   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6935 echo "configure:6936: checking for stat64 in <sys/stat.h>" >&5
6936   cat > conftest.$ac_ext <<EOF
6937 #line 6938 "configure"
6938 #include "confdefs.h"
6939
6940 #if defined(HAVE_UNISTD_H)
6941 #include <unistd.h>
6942 #endif
6943 #include <sys/stat.h>
6944
6945 int main() {
6946 struct stat64 st64; exit(stat64(".",&st64));
6947 ; return 0; }
6948 EOF
6949 if { (eval echo configure:6950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6950   rm -rf conftest*
6951   ac_cv_func_stat64=yes
6952 else
6953   echo "configure: failed program was:" >&5
6954   cat conftest.$ac_ext >&5
6955 fi
6956 rm -f conftest*
6957   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6958   if test x$ac_cv_func_stat64 = xyes ; then
6959     cat >> confdefs.h <<\EOF
6960 #define HAVE_STAT64 1
6961 EOF
6962
6963   fi
6964 fi
6965
6966 if test x$ac_cv_func_lstat64 = xno ; then
6967   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6968 echo "configure:6969: checking for lstat64 in <sys/stat.h>" >&5
6969   cat > conftest.$ac_ext <<EOF
6970 #line 6971 "configure"
6971 #include "confdefs.h"
6972
6973 #if defined(HAVE_UNISTD_H)
6974 #include <unistd.h>
6975 #endif
6976 #include <sys/stat.h>
6977
6978 int main() {
6979 struct stat64 st64; exit(lstat64(".",&st64));
6980 ; return 0; }
6981 EOF
6982 if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6983   rm -rf conftest*
6984   ac_cv_func_lstat64=yes
6985 else
6986   echo "configure: failed program was:" >&5
6987   cat conftest.$ac_ext >&5
6988 fi
6989 rm -f conftest*
6990   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6991   if test x$ac_cv_func_lstat64 = xyes ; then
6992     cat >> confdefs.h <<\EOF
6993 #define HAVE_LSTAT64 1
6994 EOF
6995
6996   fi
6997 fi
6998
6999 if test x$ac_cv_func_fstat64 = xno ; then
7000   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
7001 echo "configure:7002: checking for fstat64 in <sys/stat.h>" >&5
7002   cat > conftest.$ac_ext <<EOF
7003 #line 7004 "configure"
7004 #include "confdefs.h"
7005
7006 #if defined(HAVE_UNISTD_H)
7007 #include <unistd.h>
7008 #endif
7009 #include <sys/stat.h>
7010
7011 int main() {
7012 struct stat64 st64; exit(fstat64(0,&st64));
7013 ; return 0; }
7014 EOF
7015 if { (eval echo configure:7016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7016   rm -rf conftest*
7017   ac_cv_func_fstat64=yes
7018 else
7019   echo "configure: failed program was:" >&5
7020   cat conftest.$ac_ext >&5
7021 fi
7022 rm -f conftest*
7023   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
7024   if test x$ac_cv_func_fstat64 = xyes ; then
7025     cat >> confdefs.h <<\EOF
7026 #define HAVE_FSTAT64 1
7027 EOF
7028
7029   fi
7030 fi
7031
7032 #####################################
7033 # we might need the resolv library on some systems
7034 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
7035 echo "configure:7036: checking for dn_expand in -lresolv" >&5
7036 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
7037 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7038   echo $ac_n "(cached) $ac_c" 1>&6
7039 else
7040   ac_save_LIBS="$LIBS"
7041 LIBS="-lresolv  $LIBS"
7042 cat > conftest.$ac_ext <<EOF
7043 #line 7044 "configure"
7044 #include "confdefs.h"
7045 /* Override any gcc2 internal prototype to avoid an error.  */
7046 /* We use char because int might match the return type of a gcc2
7047     builtin and then its argument prototype would still apply.  */
7048 char dn_expand();
7049
7050 int main() {
7051 dn_expand()
7052 ; return 0; }
7053 EOF
7054 if { (eval echo configure:7055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7055   rm -rf conftest*
7056   eval "ac_cv_lib_$ac_lib_var=yes"
7057 else
7058   echo "configure: failed program was:" >&5
7059   cat conftest.$ac_ext >&5
7060   rm -rf conftest*
7061   eval "ac_cv_lib_$ac_lib_var=no"
7062 fi
7063 rm -f conftest*
7064 LIBS="$ac_save_LIBS"
7065
7066 fi
7067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7068   echo "$ac_t""yes" 1>&6
7069     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7071   cat >> confdefs.h <<EOF
7072 #define $ac_tr_lib 1
7073 EOF
7074
7075   LIBS="-lresolv $LIBS"
7076
7077 else
7078   echo "$ac_t""no" 1>&6
7079 fi
7080
7081
7082 #
7083 # Check for the functions putprpwnam, set_auth_parameters,
7084 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7085 # Needed for OSF1 and HPUX.
7086 #
7087
7088 case "$LIBS" in
7089   *-lsecurity*) for ac_func in putprpwnam
7090 do
7091 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7092 echo "configure:7093: checking for $ac_func" >&5
7093 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7094   echo $ac_n "(cached) $ac_c" 1>&6
7095 else
7096   cat > conftest.$ac_ext <<EOF
7097 #line 7098 "configure"
7098 #include "confdefs.h"
7099 /* System header to define __stub macros and hopefully few prototypes,
7100     which can conflict with char $ac_func(); below.  */
7101 #include <assert.h>
7102 /* Override any gcc2 internal prototype to avoid an error.  */
7103 /* We use char because int might match the return type of a gcc2
7104     builtin and then its argument prototype would still apply.  */
7105 char $ac_func();
7106
7107 int main() {
7108
7109 /* The GNU C library defines this for functions which it implements
7110     to always fail with ENOSYS.  Some functions are actually named
7111     something starting with __ and the normal name is an alias.  */
7112 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7113 choke me
7114 #else
7115 $ac_func();
7116 #endif
7117
7118 ; return 0; }
7119 EOF
7120 if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7121   rm -rf conftest*
7122   eval "ac_cv_func_$ac_func=yes"
7123 else
7124   echo "configure: failed program was:" >&5
7125   cat conftest.$ac_ext >&5
7126   rm -rf conftest*
7127   eval "ac_cv_func_$ac_func=no"
7128 fi
7129 rm -f conftest*
7130 fi
7131
7132 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7133   echo "$ac_t""yes" 1>&6
7134     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7135   cat >> confdefs.h <<EOF
7136 #define $ac_tr_func 1
7137 EOF
7138  
7139 else
7140   echo "$ac_t""no" 1>&6
7141 fi
7142 done
7143  ;;
7144   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7145 echo "configure:7146: checking for putprpwnam in -lsecurity" >&5
7146 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7147 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7148   echo $ac_n "(cached) $ac_c" 1>&6
7149 else
7150   ac_save_LIBS="$LIBS"
7151 LIBS="-lsecurity  $LIBS"
7152 cat > conftest.$ac_ext <<EOF
7153 #line 7154 "configure"
7154 #include "confdefs.h"
7155 /* Override any gcc2 internal prototype to avoid an error.  */
7156 /* We use char because int might match the return type of a gcc2
7157     builtin and then its argument prototype would still apply.  */
7158 char putprpwnam();
7159
7160 int main() {
7161 putprpwnam()
7162 ; return 0; }
7163 EOF
7164 if { (eval echo configure:7165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7165   rm -rf conftest*
7166   eval "ac_cv_lib_$ac_lib_var=yes"
7167 else
7168   echo "configure: failed program was:" >&5
7169   cat conftest.$ac_ext >&5
7170   rm -rf conftest*
7171   eval "ac_cv_lib_$ac_lib_var=no"
7172 fi
7173 rm -f conftest*
7174 LIBS="$ac_save_LIBS"
7175
7176 fi
7177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7178   echo "$ac_t""yes" 1>&6
7179     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7180     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7181   cat >> confdefs.h <<EOF
7182 #define $ac_tr_lib 1
7183 EOF
7184
7185   LIBS="-lsecurity $LIBS"
7186
7187 else
7188   echo "$ac_t""no" 1>&6
7189 fi
7190  
7191      for ac_func in putprpwnam
7192 do
7193 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7194 echo "configure:7195: checking for $ac_func" >&5
7195 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7196   echo $ac_n "(cached) $ac_c" 1>&6
7197 else
7198   cat > conftest.$ac_ext <<EOF
7199 #line 7200 "configure"
7200 #include "confdefs.h"
7201 /* System header to define __stub macros and hopefully few prototypes,
7202     which can conflict with char $ac_func(); below.  */
7203 #include <assert.h>
7204 /* Override any gcc2 internal prototype to avoid an error.  */
7205 /* We use char because int might match the return type of a gcc2
7206     builtin and then its argument prototype would still apply.  */
7207 char $ac_func();
7208
7209 int main() {
7210
7211 /* The GNU C library defines this for functions which it implements
7212     to always fail with ENOSYS.  Some functions are actually named
7213     something starting with __ and the normal name is an alias.  */
7214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7215 choke me
7216 #else
7217 $ac_func();
7218 #endif
7219
7220 ; return 0; }
7221 EOF
7222 if { (eval echo configure:7223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7223   rm -rf conftest*
7224   eval "ac_cv_func_$ac_func=yes"
7225 else
7226   echo "configure: failed program was:" >&5
7227   cat conftest.$ac_ext >&5
7228   rm -rf conftest*
7229   eval "ac_cv_func_$ac_func=no"
7230 fi
7231 rm -f conftest*
7232 fi
7233
7234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7235   echo "$ac_t""yes" 1>&6
7236     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7237   cat >> confdefs.h <<EOF
7238 #define $ac_tr_func 1
7239 EOF
7240  
7241 else
7242   echo "$ac_t""no" 1>&6
7243 fi
7244 done
7245
7246   ;;
7247   esac
7248
7249 case "$LIBS" in
7250   *-lsec*) for ac_func in putprpwnam
7251 do
7252 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7253 echo "configure:7254: checking for $ac_func" >&5
7254 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7255   echo $ac_n "(cached) $ac_c" 1>&6
7256 else
7257   cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7260 /* System header to define __stub macros and hopefully few prototypes,
7261     which can conflict with char $ac_func(); below.  */
7262 #include <assert.h>
7263 /* Override any gcc2 internal prototype to avoid an error.  */
7264 /* We use char because int might match the return type of a gcc2
7265     builtin and then its argument prototype would still apply.  */
7266 char $ac_func();
7267
7268 int main() {
7269
7270 /* The GNU C library defines this for functions which it implements
7271     to always fail with ENOSYS.  Some functions are actually named
7272     something starting with __ and the normal name is an alias.  */
7273 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7274 choke me
7275 #else
7276 $ac_func();
7277 #endif
7278
7279 ; return 0; }
7280 EOF
7281 if { (eval echo configure:7282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7282   rm -rf conftest*
7283   eval "ac_cv_func_$ac_func=yes"
7284 else
7285   echo "configure: failed program was:" >&5
7286   cat conftest.$ac_ext >&5
7287   rm -rf conftest*
7288   eval "ac_cv_func_$ac_func=no"
7289 fi
7290 rm -f conftest*
7291 fi
7292
7293 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7294   echo "$ac_t""yes" 1>&6
7295     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7296   cat >> confdefs.h <<EOF
7297 #define $ac_tr_func 1
7298 EOF
7299  
7300 else
7301   echo "$ac_t""no" 1>&6
7302 fi
7303 done
7304  ;;
7305   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7306 echo "configure:7307: checking for putprpwnam in -lsec" >&5
7307 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7308 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7309   echo $ac_n "(cached) $ac_c" 1>&6
7310 else
7311   ac_save_LIBS="$LIBS"
7312 LIBS="-lsec  $LIBS"
7313 cat > conftest.$ac_ext <<EOF
7314 #line 7315 "configure"
7315 #include "confdefs.h"
7316 /* Override any gcc2 internal prototype to avoid an error.  */
7317 /* We use char because int might match the return type of a gcc2
7318     builtin and then its argument prototype would still apply.  */
7319 char putprpwnam();
7320
7321 int main() {
7322 putprpwnam()
7323 ; return 0; }
7324 EOF
7325 if { (eval echo configure:7326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7326   rm -rf conftest*
7327   eval "ac_cv_lib_$ac_lib_var=yes"
7328 else
7329   echo "configure: failed program was:" >&5
7330   cat conftest.$ac_ext >&5
7331   rm -rf conftest*
7332   eval "ac_cv_lib_$ac_lib_var=no"
7333 fi
7334 rm -f conftest*
7335 LIBS="$ac_save_LIBS"
7336
7337 fi
7338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7339   echo "$ac_t""yes" 1>&6
7340     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7341     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7342   cat >> confdefs.h <<EOF
7343 #define $ac_tr_lib 1
7344 EOF
7345
7346   LIBS="-lsec $LIBS"
7347
7348 else
7349   echo "$ac_t""no" 1>&6
7350 fi
7351  
7352      for ac_func in putprpwnam
7353 do
7354 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7355 echo "configure:7356: checking for $ac_func" >&5
7356 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7357   echo $ac_n "(cached) $ac_c" 1>&6
7358 else
7359   cat > conftest.$ac_ext <<EOF
7360 #line 7361 "configure"
7361 #include "confdefs.h"
7362 /* System header to define __stub macros and hopefully few prototypes,
7363     which can conflict with char $ac_func(); below.  */
7364 #include <assert.h>
7365 /* Override any gcc2 internal prototype to avoid an error.  */
7366 /* We use char because int might match the return type of a gcc2
7367     builtin and then its argument prototype would still apply.  */
7368 char $ac_func();
7369
7370 int main() {
7371
7372 /* The GNU C library defines this for functions which it implements
7373     to always fail with ENOSYS.  Some functions are actually named
7374     something starting with __ and the normal name is an alias.  */
7375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7376 choke me
7377 #else
7378 $ac_func();
7379 #endif
7380
7381 ; return 0; }
7382 EOF
7383 if { (eval echo configure:7384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7384   rm -rf conftest*
7385   eval "ac_cv_func_$ac_func=yes"
7386 else
7387   echo "configure: failed program was:" >&5
7388   cat conftest.$ac_ext >&5
7389   rm -rf conftest*
7390   eval "ac_cv_func_$ac_func=no"
7391 fi
7392 rm -f conftest*
7393 fi
7394
7395 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7396   echo "$ac_t""yes" 1>&6
7397     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7398   cat >> confdefs.h <<EOF
7399 #define $ac_tr_func 1
7400 EOF
7401  
7402 else
7403   echo "$ac_t""no" 1>&6
7404 fi
7405 done
7406
7407   ;;
7408   esac
7409
7410
7411 case "$LIBS" in
7412   *-lsecurity*) for ac_func in set_auth_parameters
7413 do
7414 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7415 echo "configure:7416: checking for $ac_func" >&5
7416 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7417   echo $ac_n "(cached) $ac_c" 1>&6
7418 else
7419   cat > conftest.$ac_ext <<EOF
7420 #line 7421 "configure"
7421 #include "confdefs.h"
7422 /* System header to define __stub macros and hopefully few prototypes,
7423     which can conflict with char $ac_func(); below.  */
7424 #include <assert.h>
7425 /* Override any gcc2 internal prototype to avoid an error.  */
7426 /* We use char because int might match the return type of a gcc2
7427     builtin and then its argument prototype would still apply.  */
7428 char $ac_func();
7429
7430 int main() {
7431
7432 /* The GNU C library defines this for functions which it implements
7433     to always fail with ENOSYS.  Some functions are actually named
7434     something starting with __ and the normal name is an alias.  */
7435 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7436 choke me
7437 #else
7438 $ac_func();
7439 #endif
7440
7441 ; return 0; }
7442 EOF
7443 if { (eval echo configure:7444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7444   rm -rf conftest*
7445   eval "ac_cv_func_$ac_func=yes"
7446 else
7447   echo "configure: failed program was:" >&5
7448   cat conftest.$ac_ext >&5
7449   rm -rf conftest*
7450   eval "ac_cv_func_$ac_func=no"
7451 fi
7452 rm -f conftest*
7453 fi
7454
7455 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7456   echo "$ac_t""yes" 1>&6
7457     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7458   cat >> confdefs.h <<EOF
7459 #define $ac_tr_func 1
7460 EOF
7461  
7462 else
7463   echo "$ac_t""no" 1>&6
7464 fi
7465 done
7466  ;;
7467   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7468 echo "configure:7469: checking for set_auth_parameters in -lsecurity" >&5
7469 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7470 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7471   echo $ac_n "(cached) $ac_c" 1>&6
7472 else
7473   ac_save_LIBS="$LIBS"
7474 LIBS="-lsecurity  $LIBS"
7475 cat > conftest.$ac_ext <<EOF
7476 #line 7477 "configure"
7477 #include "confdefs.h"
7478 /* Override any gcc2 internal prototype to avoid an error.  */
7479 /* We use char because int might match the return type of a gcc2
7480     builtin and then its argument prototype would still apply.  */
7481 char set_auth_parameters();
7482
7483 int main() {
7484 set_auth_parameters()
7485 ; return 0; }
7486 EOF
7487 if { (eval echo configure:7488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7488   rm -rf conftest*
7489   eval "ac_cv_lib_$ac_lib_var=yes"
7490 else
7491   echo "configure: failed program was:" >&5
7492   cat conftest.$ac_ext >&5
7493   rm -rf conftest*
7494   eval "ac_cv_lib_$ac_lib_var=no"
7495 fi
7496 rm -f conftest*
7497 LIBS="$ac_save_LIBS"
7498
7499 fi
7500 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7501   echo "$ac_t""yes" 1>&6
7502     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7503     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7504   cat >> confdefs.h <<EOF
7505 #define $ac_tr_lib 1
7506 EOF
7507
7508   LIBS="-lsecurity $LIBS"
7509
7510 else
7511   echo "$ac_t""no" 1>&6
7512 fi
7513  
7514      for ac_func in set_auth_parameters
7515 do
7516 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7517 echo "configure:7518: checking for $ac_func" >&5
7518 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7519   echo $ac_n "(cached) $ac_c" 1>&6
7520 else
7521   cat > conftest.$ac_ext <<EOF
7522 #line 7523 "configure"
7523 #include "confdefs.h"
7524 /* System header to define __stub macros and hopefully few prototypes,
7525     which can conflict with char $ac_func(); below.  */
7526 #include <assert.h>
7527 /* Override any gcc2 internal prototype to avoid an error.  */
7528 /* We use char because int might match the return type of a gcc2
7529     builtin and then its argument prototype would still apply.  */
7530 char $ac_func();
7531
7532 int main() {
7533
7534 /* The GNU C library defines this for functions which it implements
7535     to always fail with ENOSYS.  Some functions are actually named
7536     something starting with __ and the normal name is an alias.  */
7537 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7538 choke me
7539 #else
7540 $ac_func();
7541 #endif
7542
7543 ; return 0; }
7544 EOF
7545 if { (eval echo configure:7546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7546   rm -rf conftest*
7547   eval "ac_cv_func_$ac_func=yes"
7548 else
7549   echo "configure: failed program was:" >&5
7550   cat conftest.$ac_ext >&5
7551   rm -rf conftest*
7552   eval "ac_cv_func_$ac_func=no"
7553 fi
7554 rm -f conftest*
7555 fi
7556
7557 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7558   echo "$ac_t""yes" 1>&6
7559     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7560   cat >> confdefs.h <<EOF
7561 #define $ac_tr_func 1
7562 EOF
7563  
7564 else
7565   echo "$ac_t""no" 1>&6
7566 fi
7567 done
7568
7569   ;;
7570   esac
7571
7572 case "$LIBS" in
7573   *-lsec*) for ac_func in set_auth_parameters
7574 do
7575 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7576 echo "configure:7577: checking for $ac_func" >&5
7577 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7578   echo $ac_n "(cached) $ac_c" 1>&6
7579 else
7580   cat > conftest.$ac_ext <<EOF
7581 #line 7582 "configure"
7582 #include "confdefs.h"
7583 /* System header to define __stub macros and hopefully few prototypes,
7584     which can conflict with char $ac_func(); below.  */
7585 #include <assert.h>
7586 /* Override any gcc2 internal prototype to avoid an error.  */
7587 /* We use char because int might match the return type of a gcc2
7588     builtin and then its argument prototype would still apply.  */
7589 char $ac_func();
7590
7591 int main() {
7592
7593 /* The GNU C library defines this for functions which it implements
7594     to always fail with ENOSYS.  Some functions are actually named
7595     something starting with __ and the normal name is an alias.  */
7596 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7597 choke me
7598 #else
7599 $ac_func();
7600 #endif
7601
7602 ; return 0; }
7603 EOF
7604 if { (eval echo configure:7605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7605   rm -rf conftest*
7606   eval "ac_cv_func_$ac_func=yes"
7607 else
7608   echo "configure: failed program was:" >&5
7609   cat conftest.$ac_ext >&5
7610   rm -rf conftest*
7611   eval "ac_cv_func_$ac_func=no"
7612 fi
7613 rm -f conftest*
7614 fi
7615
7616 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7617   echo "$ac_t""yes" 1>&6
7618     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7619   cat >> confdefs.h <<EOF
7620 #define $ac_tr_func 1
7621 EOF
7622  
7623 else
7624   echo "$ac_t""no" 1>&6
7625 fi
7626 done
7627  ;;
7628   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7629 echo "configure:7630: checking for set_auth_parameters in -lsec" >&5
7630 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7631 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7632   echo $ac_n "(cached) $ac_c" 1>&6
7633 else
7634   ac_save_LIBS="$LIBS"
7635 LIBS="-lsec  $LIBS"
7636 cat > conftest.$ac_ext <<EOF
7637 #line 7638 "configure"
7638 #include "confdefs.h"
7639 /* Override any gcc2 internal prototype to avoid an error.  */
7640 /* We use char because int might match the return type of a gcc2
7641     builtin and then its argument prototype would still apply.  */
7642 char set_auth_parameters();
7643
7644 int main() {
7645 set_auth_parameters()
7646 ; return 0; }
7647 EOF
7648 if { (eval echo configure:7649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7649   rm -rf conftest*
7650   eval "ac_cv_lib_$ac_lib_var=yes"
7651 else
7652   echo "configure: failed program was:" >&5
7653   cat conftest.$ac_ext >&5
7654   rm -rf conftest*
7655   eval "ac_cv_lib_$ac_lib_var=no"
7656 fi
7657 rm -f conftest*
7658 LIBS="$ac_save_LIBS"
7659
7660 fi
7661 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7662   echo "$ac_t""yes" 1>&6
7663     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7664     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7665   cat >> confdefs.h <<EOF
7666 #define $ac_tr_lib 1
7667 EOF
7668
7669   LIBS="-lsec $LIBS"
7670
7671 else
7672   echo "$ac_t""no" 1>&6
7673 fi
7674  
7675      for ac_func in set_auth_parameters
7676 do
7677 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7678 echo "configure:7679: checking for $ac_func" >&5
7679 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7680   echo $ac_n "(cached) $ac_c" 1>&6
7681 else
7682   cat > conftest.$ac_ext <<EOF
7683 #line 7684 "configure"
7684 #include "confdefs.h"
7685 /* System header to define __stub macros and hopefully few prototypes,
7686     which can conflict with char $ac_func(); below.  */
7687 #include <assert.h>
7688 /* Override any gcc2 internal prototype to avoid an error.  */
7689 /* We use char because int might match the return type of a gcc2
7690     builtin and then its argument prototype would still apply.  */
7691 char $ac_func();
7692
7693 int main() {
7694
7695 /* The GNU C library defines this for functions which it implements
7696     to always fail with ENOSYS.  Some functions are actually named
7697     something starting with __ and the normal name is an alias.  */
7698 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7699 choke me
7700 #else
7701 $ac_func();
7702 #endif
7703
7704 ; return 0; }
7705 EOF
7706 if { (eval echo configure:7707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7707   rm -rf conftest*
7708   eval "ac_cv_func_$ac_func=yes"
7709 else
7710   echo "configure: failed program was:" >&5
7711   cat conftest.$ac_ext >&5
7712   rm -rf conftest*
7713   eval "ac_cv_func_$ac_func=no"
7714 fi
7715 rm -f conftest*
7716 fi
7717
7718 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7719   echo "$ac_t""yes" 1>&6
7720     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7721   cat >> confdefs.h <<EOF
7722 #define $ac_tr_func 1
7723 EOF
7724  
7725 else
7726   echo "$ac_t""no" 1>&6
7727 fi
7728 done
7729
7730   ;;
7731   esac
7732
7733
7734 # UnixWare 7.x has its getspnam in -lgen
7735 case "$LIBS" in
7736   *-lgen*) for ac_func in getspnam
7737 do
7738 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7739 echo "configure:7740: checking for $ac_func" >&5
7740 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7741   echo $ac_n "(cached) $ac_c" 1>&6
7742 else
7743   cat > conftest.$ac_ext <<EOF
7744 #line 7745 "configure"
7745 #include "confdefs.h"
7746 /* System header to define __stub macros and hopefully few prototypes,
7747     which can conflict with char $ac_func(); below.  */
7748 #include <assert.h>
7749 /* Override any gcc2 internal prototype to avoid an error.  */
7750 /* We use char because int might match the return type of a gcc2
7751     builtin and then its argument prototype would still apply.  */
7752 char $ac_func();
7753
7754 int main() {
7755
7756 /* The GNU C library defines this for functions which it implements
7757     to always fail with ENOSYS.  Some functions are actually named
7758     something starting with __ and the normal name is an alias.  */
7759 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7760 choke me
7761 #else
7762 $ac_func();
7763 #endif
7764
7765 ; return 0; }
7766 EOF
7767 if { (eval echo configure:7768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7768   rm -rf conftest*
7769   eval "ac_cv_func_$ac_func=yes"
7770 else
7771   echo "configure: failed program was:" >&5
7772   cat conftest.$ac_ext >&5
7773   rm -rf conftest*
7774   eval "ac_cv_func_$ac_func=no"
7775 fi
7776 rm -f conftest*
7777 fi
7778
7779 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7780   echo "$ac_t""yes" 1>&6
7781     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7782   cat >> confdefs.h <<EOF
7783 #define $ac_tr_func 1
7784 EOF
7785  
7786 else
7787   echo "$ac_t""no" 1>&6
7788 fi
7789 done
7790  ;;
7791   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7792 echo "configure:7793: checking for getspnam in -lgen" >&5
7793 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7794 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7795   echo $ac_n "(cached) $ac_c" 1>&6
7796 else
7797   ac_save_LIBS="$LIBS"
7798 LIBS="-lgen  $LIBS"
7799 cat > conftest.$ac_ext <<EOF
7800 #line 7801 "configure"
7801 #include "confdefs.h"
7802 /* Override any gcc2 internal prototype to avoid an error.  */
7803 /* We use char because int might match the return type of a gcc2
7804     builtin and then its argument prototype would still apply.  */
7805 char getspnam();
7806
7807 int main() {
7808 getspnam()
7809 ; return 0; }
7810 EOF
7811 if { (eval echo configure:7812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7812   rm -rf conftest*
7813   eval "ac_cv_lib_$ac_lib_var=yes"
7814 else
7815   echo "configure: failed program was:" >&5
7816   cat conftest.$ac_ext >&5
7817   rm -rf conftest*
7818   eval "ac_cv_lib_$ac_lib_var=no"
7819 fi
7820 rm -f conftest*
7821 LIBS="$ac_save_LIBS"
7822
7823 fi
7824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7825   echo "$ac_t""yes" 1>&6
7826     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7827     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7828   cat >> confdefs.h <<EOF
7829 #define $ac_tr_lib 1
7830 EOF
7831
7832   LIBS="-lgen $LIBS"
7833
7834 else
7835   echo "$ac_t""no" 1>&6
7836 fi
7837  
7838      for ac_func in getspnam
7839 do
7840 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7841 echo "configure:7842: checking for $ac_func" >&5
7842 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7843   echo $ac_n "(cached) $ac_c" 1>&6
7844 else
7845   cat > conftest.$ac_ext <<EOF
7846 #line 7847 "configure"
7847 #include "confdefs.h"
7848 /* System header to define __stub macros and hopefully few prototypes,
7849     which can conflict with char $ac_func(); below.  */
7850 #include <assert.h>
7851 /* Override any gcc2 internal prototype to avoid an error.  */
7852 /* We use char because int might match the return type of a gcc2
7853     builtin and then its argument prototype would still apply.  */
7854 char $ac_func();
7855
7856 int main() {
7857
7858 /* The GNU C library defines this for functions which it implements
7859     to always fail with ENOSYS.  Some functions are actually named
7860     something starting with __ and the normal name is an alias.  */
7861 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7862 choke me
7863 #else
7864 $ac_func();
7865 #endif
7866
7867 ; return 0; }
7868 EOF
7869 if { (eval echo configure:7870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7870   rm -rf conftest*
7871   eval "ac_cv_func_$ac_func=yes"
7872 else
7873   echo "configure: failed program was:" >&5
7874   cat conftest.$ac_ext >&5
7875   rm -rf conftest*
7876   eval "ac_cv_func_$ac_func=no"
7877 fi
7878 rm -f conftest*
7879 fi
7880
7881 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7882   echo "$ac_t""yes" 1>&6
7883     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7884   cat >> confdefs.h <<EOF
7885 #define $ac_tr_func 1
7886 EOF
7887  
7888 else
7889   echo "$ac_t""no" 1>&6
7890 fi
7891 done
7892
7893   ;;
7894   esac
7895
7896
7897 case "$LIBS" in
7898   *-lsecurity*) for ac_func in getspnam
7899 do
7900 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7901 echo "configure:7902: checking for $ac_func" >&5
7902 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7903   echo $ac_n "(cached) $ac_c" 1>&6
7904 else
7905   cat > conftest.$ac_ext <<EOF
7906 #line 7907 "configure"
7907 #include "confdefs.h"
7908 /* System header to define __stub macros and hopefully few prototypes,
7909     which can conflict with char $ac_func(); below.  */
7910 #include <assert.h>
7911 /* Override any gcc2 internal prototype to avoid an error.  */
7912 /* We use char because int might match the return type of a gcc2
7913     builtin and then its argument prototype would still apply.  */
7914 char $ac_func();
7915
7916 int main() {
7917
7918 /* The GNU C library defines this for functions which it implements
7919     to always fail with ENOSYS.  Some functions are actually named
7920     something starting with __ and the normal name is an alias.  */
7921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7922 choke me
7923 #else
7924 $ac_func();
7925 #endif
7926
7927 ; return 0; }
7928 EOF
7929 if { (eval echo configure:7930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7930   rm -rf conftest*
7931   eval "ac_cv_func_$ac_func=yes"
7932 else
7933   echo "configure: failed program was:" >&5
7934   cat conftest.$ac_ext >&5
7935   rm -rf conftest*
7936   eval "ac_cv_func_$ac_func=no"
7937 fi
7938 rm -f conftest*
7939 fi
7940
7941 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7942   echo "$ac_t""yes" 1>&6
7943     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7944   cat >> confdefs.h <<EOF
7945 #define $ac_tr_func 1
7946 EOF
7947  
7948 else
7949   echo "$ac_t""no" 1>&6
7950 fi
7951 done
7952  ;;
7953   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7954 echo "configure:7955: checking for getspnam in -lsecurity" >&5
7955 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7956 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7957   echo $ac_n "(cached) $ac_c" 1>&6
7958 else
7959   ac_save_LIBS="$LIBS"
7960 LIBS="-lsecurity  $LIBS"
7961 cat > conftest.$ac_ext <<EOF
7962 #line 7963 "configure"
7963 #include "confdefs.h"
7964 /* Override any gcc2 internal prototype to avoid an error.  */
7965 /* We use char because int might match the return type of a gcc2
7966     builtin and then its argument prototype would still apply.  */
7967 char getspnam();
7968
7969 int main() {
7970 getspnam()
7971 ; return 0; }
7972 EOF
7973 if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7974   rm -rf conftest*
7975   eval "ac_cv_lib_$ac_lib_var=yes"
7976 else
7977   echo "configure: failed program was:" >&5
7978   cat conftest.$ac_ext >&5
7979   rm -rf conftest*
7980   eval "ac_cv_lib_$ac_lib_var=no"
7981 fi
7982 rm -f conftest*
7983 LIBS="$ac_save_LIBS"
7984
7985 fi
7986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7987   echo "$ac_t""yes" 1>&6
7988     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7989     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7990   cat >> confdefs.h <<EOF
7991 #define $ac_tr_lib 1
7992 EOF
7993
7994   LIBS="-lsecurity $LIBS"
7995
7996 else
7997   echo "$ac_t""no" 1>&6
7998 fi
7999  
8000      for ac_func in getspnam
8001 do
8002 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8003 echo "configure:8004: checking for $ac_func" >&5
8004 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8005   echo $ac_n "(cached) $ac_c" 1>&6
8006 else
8007   cat > conftest.$ac_ext <<EOF
8008 #line 8009 "configure"
8009 #include "confdefs.h"
8010 /* System header to define __stub macros and hopefully few prototypes,
8011     which can conflict with char $ac_func(); below.  */
8012 #include <assert.h>
8013 /* Override any gcc2 internal prototype to avoid an error.  */
8014 /* We use char because int might match the return type of a gcc2
8015     builtin and then its argument prototype would still apply.  */
8016 char $ac_func();
8017
8018 int main() {
8019
8020 /* The GNU C library defines this for functions which it implements
8021     to always fail with ENOSYS.  Some functions are actually named
8022     something starting with __ and the normal name is an alias.  */
8023 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8024 choke me
8025 #else
8026 $ac_func();
8027 #endif
8028
8029 ; return 0; }
8030 EOF
8031 if { (eval echo configure:8032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8032   rm -rf conftest*
8033   eval "ac_cv_func_$ac_func=yes"
8034 else
8035   echo "configure: failed program was:" >&5
8036   cat conftest.$ac_ext >&5
8037   rm -rf conftest*
8038   eval "ac_cv_func_$ac_func=no"
8039 fi
8040 rm -f conftest*
8041 fi
8042
8043 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8044   echo "$ac_t""yes" 1>&6
8045     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8046   cat >> confdefs.h <<EOF
8047 #define $ac_tr_func 1
8048 EOF
8049  
8050 else
8051   echo "$ac_t""no" 1>&6
8052 fi
8053 done
8054
8055   ;;
8056   esac
8057
8058 case "$LIBS" in
8059   *-lsec*) for ac_func in getspnam
8060 do
8061 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8062 echo "configure:8063: checking for $ac_func" >&5
8063 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8064   echo $ac_n "(cached) $ac_c" 1>&6
8065 else
8066   cat > conftest.$ac_ext <<EOF
8067 #line 8068 "configure"
8068 #include "confdefs.h"
8069 /* System header to define __stub macros and hopefully few prototypes,
8070     which can conflict with char $ac_func(); below.  */
8071 #include <assert.h>
8072 /* Override any gcc2 internal prototype to avoid an error.  */
8073 /* We use char because int might match the return type of a gcc2
8074     builtin and then its argument prototype would still apply.  */
8075 char $ac_func();
8076
8077 int main() {
8078
8079 /* The GNU C library defines this for functions which it implements
8080     to always fail with ENOSYS.  Some functions are actually named
8081     something starting with __ and the normal name is an alias.  */
8082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8083 choke me
8084 #else
8085 $ac_func();
8086 #endif
8087
8088 ; return 0; }
8089 EOF
8090 if { (eval echo configure:8091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8091   rm -rf conftest*
8092   eval "ac_cv_func_$ac_func=yes"
8093 else
8094   echo "configure: failed program was:" >&5
8095   cat conftest.$ac_ext >&5
8096   rm -rf conftest*
8097   eval "ac_cv_func_$ac_func=no"
8098 fi
8099 rm -f conftest*
8100 fi
8101
8102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8103   echo "$ac_t""yes" 1>&6
8104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8105   cat >> confdefs.h <<EOF
8106 #define $ac_tr_func 1
8107 EOF
8108  
8109 else
8110   echo "$ac_t""no" 1>&6
8111 fi
8112 done
8113  ;;
8114   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8115 echo "configure:8116: checking for getspnam in -lsec" >&5
8116 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8117 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8118   echo $ac_n "(cached) $ac_c" 1>&6
8119 else
8120   ac_save_LIBS="$LIBS"
8121 LIBS="-lsec  $LIBS"
8122 cat > conftest.$ac_ext <<EOF
8123 #line 8124 "configure"
8124 #include "confdefs.h"
8125 /* Override any gcc2 internal prototype to avoid an error.  */
8126 /* We use char because int might match the return type of a gcc2
8127     builtin and then its argument prototype would still apply.  */
8128 char getspnam();
8129
8130 int main() {
8131 getspnam()
8132 ; return 0; }
8133 EOF
8134 if { (eval echo configure:8135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8135   rm -rf conftest*
8136   eval "ac_cv_lib_$ac_lib_var=yes"
8137 else
8138   echo "configure: failed program was:" >&5
8139   cat conftest.$ac_ext >&5
8140   rm -rf conftest*
8141   eval "ac_cv_lib_$ac_lib_var=no"
8142 fi
8143 rm -f conftest*
8144 LIBS="$ac_save_LIBS"
8145
8146 fi
8147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8148   echo "$ac_t""yes" 1>&6
8149     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8150     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8151   cat >> confdefs.h <<EOF
8152 #define $ac_tr_lib 1
8153 EOF
8154
8155   LIBS="-lsec $LIBS"
8156
8157 else
8158   echo "$ac_t""no" 1>&6
8159 fi
8160  
8161      for ac_func in getspnam
8162 do
8163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8164 echo "configure:8165: checking for $ac_func" >&5
8165 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8166   echo $ac_n "(cached) $ac_c" 1>&6
8167 else
8168   cat > conftest.$ac_ext <<EOF
8169 #line 8170 "configure"
8170 #include "confdefs.h"
8171 /* System header to define __stub macros and hopefully few prototypes,
8172     which can conflict with char $ac_func(); below.  */
8173 #include <assert.h>
8174 /* Override any gcc2 internal prototype to avoid an error.  */
8175 /* We use char because int might match the return type of a gcc2
8176     builtin and then its argument prototype would still apply.  */
8177 char $ac_func();
8178
8179 int main() {
8180
8181 /* The GNU C library defines this for functions which it implements
8182     to always fail with ENOSYS.  Some functions are actually named
8183     something starting with __ and the normal name is an alias.  */
8184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8185 choke me
8186 #else
8187 $ac_func();
8188 #endif
8189
8190 ; return 0; }
8191 EOF
8192 if { (eval echo configure:8193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8193   rm -rf conftest*
8194   eval "ac_cv_func_$ac_func=yes"
8195 else
8196   echo "configure: failed program was:" >&5
8197   cat conftest.$ac_ext >&5
8198   rm -rf conftest*
8199   eval "ac_cv_func_$ac_func=no"
8200 fi
8201 rm -f conftest*
8202 fi
8203
8204 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8205   echo "$ac_t""yes" 1>&6
8206     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8207   cat >> confdefs.h <<EOF
8208 #define $ac_tr_func 1
8209 EOF
8210  
8211 else
8212   echo "$ac_t""no" 1>&6
8213 fi
8214 done
8215
8216   ;;
8217   esac
8218
8219
8220 case "$LIBS" in
8221   *-lsecurity*) for ac_func in bigcrypt
8222 do
8223 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8224 echo "configure:8225: checking for $ac_func" >&5
8225 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8226   echo $ac_n "(cached) $ac_c" 1>&6
8227 else
8228   cat > conftest.$ac_ext <<EOF
8229 #line 8230 "configure"
8230 #include "confdefs.h"
8231 /* System header to define __stub macros and hopefully few prototypes,
8232     which can conflict with char $ac_func(); below.  */
8233 #include <assert.h>
8234 /* Override any gcc2 internal prototype to avoid an error.  */
8235 /* We use char because int might match the return type of a gcc2
8236     builtin and then its argument prototype would still apply.  */
8237 char $ac_func();
8238
8239 int main() {
8240
8241 /* The GNU C library defines this for functions which it implements
8242     to always fail with ENOSYS.  Some functions are actually named
8243     something starting with __ and the normal name is an alias.  */
8244 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8245 choke me
8246 #else
8247 $ac_func();
8248 #endif
8249
8250 ; return 0; }
8251 EOF
8252 if { (eval echo configure:8253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8253   rm -rf conftest*
8254   eval "ac_cv_func_$ac_func=yes"
8255 else
8256   echo "configure: failed program was:" >&5
8257   cat conftest.$ac_ext >&5
8258   rm -rf conftest*
8259   eval "ac_cv_func_$ac_func=no"
8260 fi
8261 rm -f conftest*
8262 fi
8263
8264 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8265   echo "$ac_t""yes" 1>&6
8266     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8267   cat >> confdefs.h <<EOF
8268 #define $ac_tr_func 1
8269 EOF
8270  
8271 else
8272   echo "$ac_t""no" 1>&6
8273 fi
8274 done
8275  ;;
8276   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8277 echo "configure:8278: checking for bigcrypt in -lsecurity" >&5
8278 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8279 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8280   echo $ac_n "(cached) $ac_c" 1>&6
8281 else
8282   ac_save_LIBS="$LIBS"
8283 LIBS="-lsecurity  $LIBS"
8284 cat > conftest.$ac_ext <<EOF
8285 #line 8286 "configure"
8286 #include "confdefs.h"
8287 /* Override any gcc2 internal prototype to avoid an error.  */
8288 /* We use char because int might match the return type of a gcc2
8289     builtin and then its argument prototype would still apply.  */
8290 char bigcrypt();
8291
8292 int main() {
8293 bigcrypt()
8294 ; return 0; }
8295 EOF
8296 if { (eval echo configure:8297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8297   rm -rf conftest*
8298   eval "ac_cv_lib_$ac_lib_var=yes"
8299 else
8300   echo "configure: failed program was:" >&5
8301   cat conftest.$ac_ext >&5
8302   rm -rf conftest*
8303   eval "ac_cv_lib_$ac_lib_var=no"
8304 fi
8305 rm -f conftest*
8306 LIBS="$ac_save_LIBS"
8307
8308 fi
8309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8310   echo "$ac_t""yes" 1>&6
8311     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8312     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8313   cat >> confdefs.h <<EOF
8314 #define $ac_tr_lib 1
8315 EOF
8316
8317   LIBS="-lsecurity $LIBS"
8318
8319 else
8320   echo "$ac_t""no" 1>&6
8321 fi
8322  
8323      for ac_func in bigcrypt
8324 do
8325 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8326 echo "configure:8327: checking for $ac_func" >&5
8327 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8328   echo $ac_n "(cached) $ac_c" 1>&6
8329 else
8330   cat > conftest.$ac_ext <<EOF
8331 #line 8332 "configure"
8332 #include "confdefs.h"
8333 /* System header to define __stub macros and hopefully few prototypes,
8334     which can conflict with char $ac_func(); below.  */
8335 #include <assert.h>
8336 /* Override any gcc2 internal prototype to avoid an error.  */
8337 /* We use char because int might match the return type of a gcc2
8338     builtin and then its argument prototype would still apply.  */
8339 char $ac_func();
8340
8341 int main() {
8342
8343 /* The GNU C library defines this for functions which it implements
8344     to always fail with ENOSYS.  Some functions are actually named
8345     something starting with __ and the normal name is an alias.  */
8346 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8347 choke me
8348 #else
8349 $ac_func();
8350 #endif
8351
8352 ; return 0; }
8353 EOF
8354 if { (eval echo configure:8355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8355   rm -rf conftest*
8356   eval "ac_cv_func_$ac_func=yes"
8357 else
8358   echo "configure: failed program was:" >&5
8359   cat conftest.$ac_ext >&5
8360   rm -rf conftest*
8361   eval "ac_cv_func_$ac_func=no"
8362 fi
8363 rm -f conftest*
8364 fi
8365
8366 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8367   echo "$ac_t""yes" 1>&6
8368     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8369   cat >> confdefs.h <<EOF
8370 #define $ac_tr_func 1
8371 EOF
8372  
8373 else
8374   echo "$ac_t""no" 1>&6
8375 fi
8376 done
8377
8378   ;;
8379   esac
8380
8381 case "$LIBS" in
8382   *-lsec*) for ac_func in bigcrypt
8383 do
8384 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8385 echo "configure:8386: checking for $ac_func" >&5
8386 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8387   echo $ac_n "(cached) $ac_c" 1>&6
8388 else
8389   cat > conftest.$ac_ext <<EOF
8390 #line 8391 "configure"
8391 #include "confdefs.h"
8392 /* System header to define __stub macros and hopefully few prototypes,
8393     which can conflict with char $ac_func(); below.  */
8394 #include <assert.h>
8395 /* Override any gcc2 internal prototype to avoid an error.  */
8396 /* We use char because int might match the return type of a gcc2
8397     builtin and then its argument prototype would still apply.  */
8398 char $ac_func();
8399
8400 int main() {
8401
8402 /* The GNU C library defines this for functions which it implements
8403     to always fail with ENOSYS.  Some functions are actually named
8404     something starting with __ and the normal name is an alias.  */
8405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8406 choke me
8407 #else
8408 $ac_func();
8409 #endif
8410
8411 ; return 0; }
8412 EOF
8413 if { (eval echo configure:8414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8414   rm -rf conftest*
8415   eval "ac_cv_func_$ac_func=yes"
8416 else
8417   echo "configure: failed program was:" >&5
8418   cat conftest.$ac_ext >&5
8419   rm -rf conftest*
8420   eval "ac_cv_func_$ac_func=no"
8421 fi
8422 rm -f conftest*
8423 fi
8424
8425 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8426   echo "$ac_t""yes" 1>&6
8427     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8428   cat >> confdefs.h <<EOF
8429 #define $ac_tr_func 1
8430 EOF
8431  
8432 else
8433   echo "$ac_t""no" 1>&6
8434 fi
8435 done
8436  ;;
8437   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8438 echo "configure:8439: checking for bigcrypt in -lsec" >&5
8439 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8440 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8441   echo $ac_n "(cached) $ac_c" 1>&6
8442 else
8443   ac_save_LIBS="$LIBS"
8444 LIBS="-lsec  $LIBS"
8445 cat > conftest.$ac_ext <<EOF
8446 #line 8447 "configure"
8447 #include "confdefs.h"
8448 /* Override any gcc2 internal prototype to avoid an error.  */
8449 /* We use char because int might match the return type of a gcc2
8450     builtin and then its argument prototype would still apply.  */
8451 char bigcrypt();
8452
8453 int main() {
8454 bigcrypt()
8455 ; return 0; }
8456 EOF
8457 if { (eval echo configure:8458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8458   rm -rf conftest*
8459   eval "ac_cv_lib_$ac_lib_var=yes"
8460 else
8461   echo "configure: failed program was:" >&5
8462   cat conftest.$ac_ext >&5
8463   rm -rf conftest*
8464   eval "ac_cv_lib_$ac_lib_var=no"
8465 fi
8466 rm -f conftest*
8467 LIBS="$ac_save_LIBS"
8468
8469 fi
8470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8471   echo "$ac_t""yes" 1>&6
8472     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8473     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8474   cat >> confdefs.h <<EOF
8475 #define $ac_tr_lib 1
8476 EOF
8477
8478   LIBS="-lsec $LIBS"
8479
8480 else
8481   echo "$ac_t""no" 1>&6
8482 fi
8483  
8484      for ac_func in bigcrypt
8485 do
8486 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8487 echo "configure:8488: checking for $ac_func" >&5
8488 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8489   echo $ac_n "(cached) $ac_c" 1>&6
8490 else
8491   cat > conftest.$ac_ext <<EOF
8492 #line 8493 "configure"
8493 #include "confdefs.h"
8494 /* System header to define __stub macros and hopefully few prototypes,
8495     which can conflict with char $ac_func(); below.  */
8496 #include <assert.h>
8497 /* Override any gcc2 internal prototype to avoid an error.  */
8498 /* We use char because int might match the return type of a gcc2
8499     builtin and then its argument prototype would still apply.  */
8500 char $ac_func();
8501
8502 int main() {
8503
8504 /* The GNU C library defines this for functions which it implements
8505     to always fail with ENOSYS.  Some functions are actually named
8506     something starting with __ and the normal name is an alias.  */
8507 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8508 choke me
8509 #else
8510 $ac_func();
8511 #endif
8512
8513 ; return 0; }
8514 EOF
8515 if { (eval echo configure:8516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8516   rm -rf conftest*
8517   eval "ac_cv_func_$ac_func=yes"
8518 else
8519   echo "configure: failed program was:" >&5
8520   cat conftest.$ac_ext >&5
8521   rm -rf conftest*
8522   eval "ac_cv_func_$ac_func=no"
8523 fi
8524 rm -f conftest*
8525 fi
8526
8527 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8528   echo "$ac_t""yes" 1>&6
8529     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8530   cat >> confdefs.h <<EOF
8531 #define $ac_tr_func 1
8532 EOF
8533  
8534 else
8535   echo "$ac_t""no" 1>&6
8536 fi
8537 done
8538
8539   ;;
8540   esac
8541
8542
8543 case "$LIBS" in
8544   *-lsecurity*) for ac_func in getprpwnam
8545 do
8546 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8547 echo "configure:8548: checking for $ac_func" >&5
8548 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8549   echo $ac_n "(cached) $ac_c" 1>&6
8550 else
8551   cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 /* System header to define __stub macros and hopefully few prototypes,
8555     which can conflict with char $ac_func(); below.  */
8556 #include <assert.h>
8557 /* Override any gcc2 internal prototype to avoid an error.  */
8558 /* We use char because int might match the return type of a gcc2
8559     builtin and then its argument prototype would still apply.  */
8560 char $ac_func();
8561
8562 int main() {
8563
8564 /* The GNU C library defines this for functions which it implements
8565     to always fail with ENOSYS.  Some functions are actually named
8566     something starting with __ and the normal name is an alias.  */
8567 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8568 choke me
8569 #else
8570 $ac_func();
8571 #endif
8572
8573 ; return 0; }
8574 EOF
8575 if { (eval echo configure:8576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8576   rm -rf conftest*
8577   eval "ac_cv_func_$ac_func=yes"
8578 else
8579   echo "configure: failed program was:" >&5
8580   cat conftest.$ac_ext >&5
8581   rm -rf conftest*
8582   eval "ac_cv_func_$ac_func=no"
8583 fi
8584 rm -f conftest*
8585 fi
8586
8587 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8588   echo "$ac_t""yes" 1>&6
8589     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8590   cat >> confdefs.h <<EOF
8591 #define $ac_tr_func 1
8592 EOF
8593  
8594 else
8595   echo "$ac_t""no" 1>&6
8596 fi
8597 done
8598  ;;
8599   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8600 echo "configure:8601: checking for getprpwnam in -lsecurity" >&5
8601 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8603   echo $ac_n "(cached) $ac_c" 1>&6
8604 else
8605   ac_save_LIBS="$LIBS"
8606 LIBS="-lsecurity  $LIBS"
8607 cat > conftest.$ac_ext <<EOF
8608 #line 8609 "configure"
8609 #include "confdefs.h"
8610 /* Override any gcc2 internal prototype to avoid an error.  */
8611 /* We use char because int might match the return type of a gcc2
8612     builtin and then its argument prototype would still apply.  */
8613 char getprpwnam();
8614
8615 int main() {
8616 getprpwnam()
8617 ; return 0; }
8618 EOF
8619 if { (eval echo configure:8620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8620   rm -rf conftest*
8621   eval "ac_cv_lib_$ac_lib_var=yes"
8622 else
8623   echo "configure: failed program was:" >&5
8624   cat conftest.$ac_ext >&5
8625   rm -rf conftest*
8626   eval "ac_cv_lib_$ac_lib_var=no"
8627 fi
8628 rm -f conftest*
8629 LIBS="$ac_save_LIBS"
8630
8631 fi
8632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8633   echo "$ac_t""yes" 1>&6
8634     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8635     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8636   cat >> confdefs.h <<EOF
8637 #define $ac_tr_lib 1
8638 EOF
8639
8640   LIBS="-lsecurity $LIBS"
8641
8642 else
8643   echo "$ac_t""no" 1>&6
8644 fi
8645  
8646      for ac_func in getprpwnam
8647 do
8648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8649 echo "configure:8650: checking for $ac_func" >&5
8650 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8651   echo $ac_n "(cached) $ac_c" 1>&6
8652 else
8653   cat > conftest.$ac_ext <<EOF
8654 #line 8655 "configure"
8655 #include "confdefs.h"
8656 /* System header to define __stub macros and hopefully few prototypes,
8657     which can conflict with char $ac_func(); below.  */
8658 #include <assert.h>
8659 /* Override any gcc2 internal prototype to avoid an error.  */
8660 /* We use char because int might match the return type of a gcc2
8661     builtin and then its argument prototype would still apply.  */
8662 char $ac_func();
8663
8664 int main() {
8665
8666 /* The GNU C library defines this for functions which it implements
8667     to always fail with ENOSYS.  Some functions are actually named
8668     something starting with __ and the normal name is an alias.  */
8669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8670 choke me
8671 #else
8672 $ac_func();
8673 #endif
8674
8675 ; return 0; }
8676 EOF
8677 if { (eval echo configure:8678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8678   rm -rf conftest*
8679   eval "ac_cv_func_$ac_func=yes"
8680 else
8681   echo "configure: failed program was:" >&5
8682   cat conftest.$ac_ext >&5
8683   rm -rf conftest*
8684   eval "ac_cv_func_$ac_func=no"
8685 fi
8686 rm -f conftest*
8687 fi
8688
8689 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8690   echo "$ac_t""yes" 1>&6
8691     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8692   cat >> confdefs.h <<EOF
8693 #define $ac_tr_func 1
8694 EOF
8695  
8696 else
8697   echo "$ac_t""no" 1>&6
8698 fi
8699 done
8700
8701   ;;
8702   esac
8703
8704 case "$LIBS" in
8705   *-lsec*) for ac_func in getprpwnam
8706 do
8707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8708 echo "configure:8709: checking for $ac_func" >&5
8709 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8710   echo $ac_n "(cached) $ac_c" 1>&6
8711 else
8712   cat > conftest.$ac_ext <<EOF
8713 #line 8714 "configure"
8714 #include "confdefs.h"
8715 /* System header to define __stub macros and hopefully few prototypes,
8716     which can conflict with char $ac_func(); below.  */
8717 #include <assert.h>
8718 /* Override any gcc2 internal prototype to avoid an error.  */
8719 /* We use char because int might match the return type of a gcc2
8720     builtin and then its argument prototype would still apply.  */
8721 char $ac_func();
8722
8723 int main() {
8724
8725 /* The GNU C library defines this for functions which it implements
8726     to always fail with ENOSYS.  Some functions are actually named
8727     something starting with __ and the normal name is an alias.  */
8728 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8729 choke me
8730 #else
8731 $ac_func();
8732 #endif
8733
8734 ; return 0; }
8735 EOF
8736 if { (eval echo configure:8737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8737   rm -rf conftest*
8738   eval "ac_cv_func_$ac_func=yes"
8739 else
8740   echo "configure: failed program was:" >&5
8741   cat conftest.$ac_ext >&5
8742   rm -rf conftest*
8743   eval "ac_cv_func_$ac_func=no"
8744 fi
8745 rm -f conftest*
8746 fi
8747
8748 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8749   echo "$ac_t""yes" 1>&6
8750     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8751   cat >> confdefs.h <<EOF
8752 #define $ac_tr_func 1
8753 EOF
8754  
8755 else
8756   echo "$ac_t""no" 1>&6
8757 fi
8758 done
8759  ;;
8760   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8761 echo "configure:8762: checking for getprpwnam in -lsec" >&5
8762 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8763 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8764   echo $ac_n "(cached) $ac_c" 1>&6
8765 else
8766   ac_save_LIBS="$LIBS"
8767 LIBS="-lsec  $LIBS"
8768 cat > conftest.$ac_ext <<EOF
8769 #line 8770 "configure"
8770 #include "confdefs.h"
8771 /* Override any gcc2 internal prototype to avoid an error.  */
8772 /* We use char because int might match the return type of a gcc2
8773     builtin and then its argument prototype would still apply.  */
8774 char getprpwnam();
8775
8776 int main() {
8777 getprpwnam()
8778 ; return 0; }
8779 EOF
8780 if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8781   rm -rf conftest*
8782   eval "ac_cv_lib_$ac_lib_var=yes"
8783 else
8784   echo "configure: failed program was:" >&5
8785   cat conftest.$ac_ext >&5
8786   rm -rf conftest*
8787   eval "ac_cv_lib_$ac_lib_var=no"
8788 fi
8789 rm -f conftest*
8790 LIBS="$ac_save_LIBS"
8791
8792 fi
8793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8794   echo "$ac_t""yes" 1>&6
8795     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8796     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8797   cat >> confdefs.h <<EOF
8798 #define $ac_tr_lib 1
8799 EOF
8800
8801   LIBS="-lsec $LIBS"
8802
8803 else
8804   echo "$ac_t""no" 1>&6
8805 fi
8806  
8807      for ac_func in getprpwnam
8808 do
8809 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8810 echo "configure:8811: checking for $ac_func" >&5
8811 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8812   echo $ac_n "(cached) $ac_c" 1>&6
8813 else
8814   cat > conftest.$ac_ext <<EOF
8815 #line 8816 "configure"
8816 #include "confdefs.h"
8817 /* System header to define __stub macros and hopefully few prototypes,
8818     which can conflict with char $ac_func(); below.  */
8819 #include <assert.h>
8820 /* Override any gcc2 internal prototype to avoid an error.  */
8821 /* We use char because int might match the return type of a gcc2
8822     builtin and then its argument prototype would still apply.  */
8823 char $ac_func();
8824
8825 int main() {
8826
8827 /* The GNU C library defines this for functions which it implements
8828     to always fail with ENOSYS.  Some functions are actually named
8829     something starting with __ and the normal name is an alias.  */
8830 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8831 choke me
8832 #else
8833 $ac_func();
8834 #endif
8835
8836 ; return 0; }
8837 EOF
8838 if { (eval echo configure:8839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8839   rm -rf conftest*
8840   eval "ac_cv_func_$ac_func=yes"
8841 else
8842   echo "configure: failed program was:" >&5
8843   cat conftest.$ac_ext >&5
8844   rm -rf conftest*
8845   eval "ac_cv_func_$ac_func=no"
8846 fi
8847 rm -f conftest*
8848 fi
8849
8850 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8851   echo "$ac_t""yes" 1>&6
8852     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8853   cat >> confdefs.h <<EOF
8854 #define $ac_tr_func 1
8855 EOF
8856  
8857 else
8858   echo "$ac_t""no" 1>&6
8859 fi
8860 done
8861
8862   ;;
8863   esac
8864
8865
8866 # this bit needs to be modified for each OS that is suported by
8867 # smbwrapper. You need to specify how to created a shared library and
8868 # how to compile C code to produce PIC object files
8869
8870 # these are the defaults, good for lots of systems
8871 HOST_OS="$host_os"
8872 LDSHFLAGS="-shared"
8873 SONAMEFLAG="#"
8874 SHLD="\${CC}"
8875 PICFLAG=""
8876 PICSUFFIX="po"
8877 POBAD_CC="#"
8878 SHLIBEXT="so"
8879 # Assume non-shared by default and override below
8880 BLDSHARED="false"
8881 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8882 echo "configure:8883: checking ability to build shared libraries" >&5
8883
8884 # and these are for particular systems
8885 case "$host_os" in
8886                 *linux*)   cat >> confdefs.h <<\EOF
8887 #define LINUX 1
8888 EOF
8889
8890                         BLDSHARED="true"
8891                         LDSHFLAGS="-shared" 
8892                         DYNEXP="-Wl,--export-dynamic"
8893                         PICFLAG="-fPIC"
8894                         SONAMEFLAG="-Wl,-soname="
8895                         cat >> confdefs.h <<\EOF
8896 #define STAT_ST_BLOCKSIZE 512
8897 EOF
8898
8899                 ;;
8900                 *solaris*) cat >> confdefs.h <<\EOF
8901 #define SUNOS5 1
8902 EOF
8903
8904                         BLDSHARED="true"
8905                         LDSHFLAGS="-G"
8906                         SONAMEFLAG="-h "
8907                         if test "${GCC}" = "yes"; then
8908                                 PICFLAG="-fPIC"
8909                                 if test "${ac_cv_prog_gnu_ld}" = "yes"; then
8910                                         DYNEXP="-Wl,-E"
8911                                 fi
8912                         else
8913                                 PICFLAG="-KPIC"
8914                                 ## ${CFLAGS} added for building 64-bit shared 
8915                                 ## libs using Sun's Compiler
8916                                 LDSHFLAGS="-G \${CFLAGS}"
8917                                 POBAD_CC=""
8918                                 PICSUFFIX="po.o"
8919                         fi
8920                         cat >> confdefs.h <<\EOF
8921 #define STAT_ST_BLOCKSIZE 512
8922 EOF
8923
8924                 ;;
8925                 *sunos*) cat >> confdefs.h <<\EOF
8926 #define SUNOS4 1
8927 EOF
8928
8929                         BLDSHARED="true"
8930                         LDSHFLAGS="-G"
8931                         SONAMEFLAG="-Wl,-h,"
8932                         PICFLAG="-KPIC"   # Is this correct for SunOS
8933                 ;;
8934                 *freebsd*)  BLDSHARED="true"
8935                         LDSHFLAGS="-shared"
8936                         DYNEXP="-Wl,--export-dynamic"
8937                         SONAMEFLAG="-Wl,-soname,"
8938                         PICFLAG="-fPIC -DPIC"
8939                         cat >> confdefs.h <<\EOF
8940 #define STAT_ST_BLOCKSIZE 512
8941 EOF
8942
8943                 ;;
8944                 *openbsd*)  BLDSHARED="true"
8945                         LDSHFLAGS="-shared"
8946                         DYNEXP="-Wl,-Bdynamic"
8947                         SONAMEFLAG="-Wl,-soname,"
8948                         PICFLAG="-fPIC"
8949                         cat >> confdefs.h <<\EOF
8950 #define STAT_ST_BLOCKSIZE 512
8951 EOF
8952
8953                 ;;
8954                 *irix*) cat >> confdefs.h <<\EOF
8955 #define IRIX 1
8956 EOF
8957
8958                         case "$host_os" in
8959                         *irix6*) cat >> confdefs.h <<\EOF
8960 #define IRIX6 1
8961 EOF
8962
8963                         ;;
8964                         esac
8965                         ATTEMPT_WRAP32_BUILD=yes
8966                         BLDSHARED="true"
8967                         LDSHFLAGS="-set_version sgi1.0 -shared"
8968                         SONAMEFLAG="-soname "
8969                         SHLD="\${LD}"
8970                         if test "${GCC}" = "yes"; then
8971                                 PICFLAG="-fPIC"
8972                         else 
8973                                 PICFLAG="-KPIC"
8974                         fi
8975                         cat >> confdefs.h <<\EOF
8976 #define STAT_ST_BLOCKSIZE 512
8977 EOF
8978
8979                 ;;
8980                 *aix*) cat >> confdefs.h <<\EOF
8981 #define AIX 1
8982 EOF
8983
8984                         BLDSHARED="true"
8985                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8986                         DYNEXP="-Wl,-brtl,-bexpall"
8987                         PICFLAG="-O2"
8988                         if test "${GCC}" != "yes"; then
8989                                 ## for funky AIX compiler using strncpy()
8990                                 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
8991                         fi
8992
8993                         cat >> confdefs.h <<\EOF
8994 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8995 EOF
8996
8997                 ;;
8998                 *hpux*) cat >> confdefs.h <<\EOF
8999 #define HPUX 1
9000 EOF
9001
9002                         SHLIBEXT="sl"
9003                         # Use special PIC flags for the native HP-UX compiler.
9004                         if test $ac_cv_prog_cc_Ae = yes; then
9005                                 BLDSHARED="true"
9006                                 SHLD="/usr/bin/ld"
9007                                 LDSHFLAGS="-B symbolic -b -z"
9008                                 SONAMEFLAG="+h "
9009                                 PICFLAG="+z"
9010                         fi
9011                         DYNEXP="-Wl,-E"
9012                         cat >> confdefs.h <<\EOF
9013 #define STAT_ST_BLOCKSIZE 8192
9014 EOF
9015
9016                 ;;
9017                 *qnx*) cat >> confdefs.h <<\EOF
9018 #define QNX 1
9019 EOF
9020 ;;
9021                 *osf*) cat >> confdefs.h <<\EOF
9022 #define OSF1 1
9023 EOF
9024
9025                         BLDSHARED="true"
9026                         LDSHFLAGS="-shared"
9027                         SONAMEFLAG="-Wl,-soname,"
9028                         PICFLAG="-fPIC"
9029                 ;;
9030                 *sco*) cat >> confdefs.h <<\EOF
9031 #define SCO 1
9032 EOF
9033 ;;
9034                 *unixware*) cat >> confdefs.h <<\EOF
9035 #define UNIXWARE 1
9036 EOF
9037
9038                         BLDSHARED="true"
9039                         LDSHFLAGS="-shared"
9040                         SONAMEFLAG="-Wl,-soname,"
9041                         PICFLAG="-KPIC"
9042                 ;;
9043                 *next2*) cat >> confdefs.h <<\EOF
9044 #define NEXT2 1
9045 EOF
9046 ;;
9047                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
9048 set dummy groff; ac_word=$2
9049 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9050 echo "configure:9051: checking for $ac_word" >&5
9051 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
9052   echo $ac_n "(cached) $ac_c" 1>&6
9053 else
9054   if test -n "$ROFF"; then
9055   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
9056 else
9057   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
9058   ac_dummy="$PATH"
9059   for ac_dir in $ac_dummy; do
9060     test -z "$ac_dir" && ac_dir=.
9061     if test -f $ac_dir/$ac_word; then
9062       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9063       break
9064     fi
9065   done
9066   IFS="$ac_save_ifs"
9067 fi
9068 fi
9069 ROFF="$ac_cv_prog_ROFF"
9070 if test -n "$ROFF"; then
9071   echo "$ac_t""$ROFF" 1>&6
9072 else
9073   echo "$ac_t""no" 1>&6
9074 fi
9075 ;;
9076                 *sysv4*)
9077                         case "$host" in
9078                                 *-univel-*)     if  test "$GCC" != yes ; then
9079                                                 cat >> confdefs.h <<\EOF
9080 #define HAVE_MEMSET 1
9081 EOF
9082
9083                                         fi
9084                                         LDSHFLAGS="-G"
9085                                         DYNEXP="-Bexport"
9086                                 ;;
9087                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
9088 #define RELIANTUNIX 1
9089 EOF
9090 ;;
9091                         esac
9092                 ;;
9093
9094                 *sysv5*)
9095                         if  test "$GCC" != yes ; then
9096                                 cat >> confdefs.h <<\EOF
9097 #define HAVE_MEMSET 1
9098 EOF
9099
9100                         fi
9101                         LDSHFLAGS="-G"
9102                 ;;
9103 esac
9104
9105 echo "$ac_t""$BLDSHARED" 1>&6
9106 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9107 echo "configure:9108: checking linker flags for shared libraries" >&5
9108 echo "$ac_t""$LDSHFLAGS" 1>&6
9109 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9110 echo "configure:9111: checking compiler flags for position-independent code" >&5
9111 echo "$ac_t""$PICFLAGS" 1>&6
9112
9113 #######################################################
9114 # test whether building a shared library actually works
9115 if test $BLDSHARED = true; then
9116 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9117 echo "configure:9118: checking whether building shared libraries actually works" >&5
9118 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9119   echo $ac_n "(cached) $ac_c" 1>&6
9120 else
9121   
9122    ac_cv_shlib_works=no
9123    # try building a trivial shared library
9124    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9125      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9126      ac_cv_shlib_works=yes
9127    rm -f shlib.so shlib.po
9128
9129 fi
9130
9131 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9132 if test $ac_cv_shlib_works = no; then
9133    BLDSHARED=false
9134 fi
9135 fi
9136
9137
9138 # this updates our target list if we can build shared libs
9139 if test $BLDSHARED = true; then
9140    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9141 else
9142    LIBSMBCLIENT_SHARED=
9143 fi
9144
9145 ################
9146
9147 echo $ac_n "checking for long long""... $ac_c" 1>&6
9148 echo "configure:9149: checking for long long" >&5
9149 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9150   echo $ac_n "(cached) $ac_c" 1>&6
9151 else
9152   
9153 if test "$cross_compiling" = yes; then
9154   samba_cv_have_longlong=cross
9155 else
9156   cat > conftest.$ac_ext <<EOF
9157 #line 9158 "configure"
9158 #include "confdefs.h"
9159 #include <stdio.h>
9160 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9161 EOF
9162 if { (eval echo configure:9163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9163 then
9164   samba_cv_have_longlong=yes
9165 else
9166   echo "configure: failed program was:" >&5
9167   cat conftest.$ac_ext >&5
9168   rm -fr conftest*
9169   samba_cv_have_longlong=no
9170 fi
9171 rm -fr conftest*
9172 fi
9173
9174 fi
9175
9176 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9177 if test x"$samba_cv_have_longlong" = x"yes"; then
9178     cat >> confdefs.h <<\EOF
9179 #define HAVE_LONGLONG 1
9180 EOF
9181
9182 fi
9183
9184 #
9185 # Check if the compiler supports the LL prefix on long long integers.
9186 # AIX needs this.
9187
9188 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9189 echo "configure:9190: checking for LL suffix on long long integers" >&5
9190 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9191   echo $ac_n "(cached) $ac_c" 1>&6
9192 else
9193   
9194     cat > conftest.$ac_ext <<EOF
9195 #line 9196 "configure"
9196 #include "confdefs.h"
9197 #include <stdio.h>
9198 int main() {
9199 long long i = 0x8000000000LL
9200 ; return 0; }
9201 EOF
9202 if { (eval echo configure:9203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9203   rm -rf conftest*
9204   samba_cv_compiler_supports_ll=yes
9205 else
9206   echo "configure: failed program was:" >&5
9207   cat conftest.$ac_ext >&5
9208   rm -rf conftest*
9209   samba_cv_compiler_supports_ll=no
9210 fi
9211 rm -f conftest*
9212 fi
9213
9214 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9215 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9216    cat >> confdefs.h <<\EOF
9217 #define COMPILER_SUPPORTS_LL 1
9218 EOF
9219
9220 fi
9221
9222   
9223 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9224 echo "configure:9225: checking for 64 bit off_t" >&5
9225 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9226   echo $ac_n "(cached) $ac_c" 1>&6
9227 else
9228   
9229 if test "$cross_compiling" = yes; then
9230   samba_cv_SIZEOF_OFF_T=cross
9231 else
9232   cat > conftest.$ac_ext <<EOF
9233 #line 9234 "configure"
9234 #include "confdefs.h"
9235 #include <stdio.h>
9236 #include <sys/stat.h>
9237 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9238 EOF
9239 if { (eval echo configure:9240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9240 then
9241   samba_cv_SIZEOF_OFF_T=yes
9242 else
9243   echo "configure: failed program was:" >&5
9244   cat conftest.$ac_ext >&5
9245   rm -fr conftest*
9246   samba_cv_SIZEOF_OFF_T=no
9247 fi
9248 rm -fr conftest*
9249 fi
9250
9251 fi
9252
9253 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9254 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9255     cat >> confdefs.h <<\EOF
9256 #define SIZEOF_OFF_T 8
9257 EOF
9258
9259 fi
9260
9261 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9262 echo "configure:9263: checking for off64_t" >&5
9263 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9264   echo $ac_n "(cached) $ac_c" 1>&6
9265 else
9266   
9267 if test "$cross_compiling" = yes; then
9268   samba_cv_HAVE_OFF64_T=cross
9269 else
9270   cat > conftest.$ac_ext <<EOF
9271 #line 9272 "configure"
9272 #include "confdefs.h"
9273
9274 #if defined(HAVE_UNISTD_H)
9275 #include <unistd.h>
9276 #endif
9277 #include <stdio.h>
9278 #include <sys/stat.h>
9279 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9280 EOF
9281 if { (eval echo configure:9282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9282 then
9283   samba_cv_HAVE_OFF64_T=yes
9284 else
9285   echo "configure: failed program was:" >&5
9286   cat conftest.$ac_ext >&5
9287   rm -fr conftest*
9288   samba_cv_HAVE_OFF64_T=no
9289 fi
9290 rm -fr conftest*
9291 fi
9292
9293 fi
9294
9295 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9296 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9297     cat >> confdefs.h <<\EOF
9298 #define HAVE_OFF64_T 1
9299 EOF
9300
9301 fi
9302
9303 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9304 echo "configure:9305: checking for 64 bit ino_t" >&5
9305 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9306   echo $ac_n "(cached) $ac_c" 1>&6
9307 else
9308   
9309 if test "$cross_compiling" = yes; then
9310   samba_cv_SIZEOF_INO_T=cross
9311 else
9312   cat > conftest.$ac_ext <<EOF
9313 #line 9314 "configure"
9314 #include "confdefs.h"
9315 #include <stdio.h>
9316 #include <sys/stat.h>
9317 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9318 EOF
9319 if { (eval echo configure:9320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9320 then
9321   samba_cv_SIZEOF_INO_T=yes
9322 else
9323   echo "configure: failed program was:" >&5
9324   cat conftest.$ac_ext >&5
9325   rm -fr conftest*
9326   samba_cv_SIZEOF_INO_T=no
9327 fi
9328 rm -fr conftest*
9329 fi
9330
9331 fi
9332
9333 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9334 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9335     cat >> confdefs.h <<\EOF
9336 #define SIZEOF_INO_T 8
9337 EOF
9338
9339 fi
9340
9341 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9342 echo "configure:9343: checking for ino64_t" >&5
9343 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9344   echo $ac_n "(cached) $ac_c" 1>&6
9345 else
9346   
9347 if test "$cross_compiling" = yes; then
9348   samba_cv_HAVE_INO64_T=cross
9349 else
9350   cat > conftest.$ac_ext <<EOF
9351 #line 9352 "configure"
9352 #include "confdefs.h"
9353
9354 #if defined(HAVE_UNISTD_H)
9355 #include <unistd.h>
9356 #endif
9357 #include <stdio.h>
9358 #include <sys/stat.h>
9359 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9360 EOF
9361 if { (eval echo configure:9362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9362 then
9363   samba_cv_HAVE_INO64_T=yes
9364 else
9365   echo "configure: failed program was:" >&5
9366   cat conftest.$ac_ext >&5
9367   rm -fr conftest*
9368   samba_cv_HAVE_INO64_T=no
9369 fi
9370 rm -fr conftest*
9371 fi
9372
9373 fi
9374
9375 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9376 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9377     cat >> confdefs.h <<\EOF
9378 #define HAVE_INO64_T 1
9379 EOF
9380
9381 fi
9382
9383 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9384 echo "configure:9385: checking for dev64_t" >&5
9385 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9386   echo $ac_n "(cached) $ac_c" 1>&6
9387 else
9388   
9389 if test "$cross_compiling" = yes; then
9390   samba_cv_HAVE_DEV64_T=cross
9391 else
9392   cat > conftest.$ac_ext <<EOF
9393 #line 9394 "configure"
9394 #include "confdefs.h"
9395
9396 #if defined(HAVE_UNISTD_H)
9397 #include <unistd.h>
9398 #endif
9399 #include <stdio.h>
9400 #include <sys/stat.h>
9401 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9402 EOF
9403 if { (eval echo configure:9404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9404 then
9405   samba_cv_HAVE_DEV64_T=yes
9406 else
9407   echo "configure: failed program was:" >&5
9408   cat conftest.$ac_ext >&5
9409   rm -fr conftest*
9410   samba_cv_HAVE_DEV64_T=no
9411 fi
9412 rm -fr conftest*
9413 fi
9414
9415 fi
9416
9417 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9418 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9419     cat >> confdefs.h <<\EOF
9420 #define HAVE_DEV64_T 1
9421 EOF
9422
9423 fi
9424
9425 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9426 echo "configure:9427: checking for struct dirent64" >&5
9427 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9428   echo $ac_n "(cached) $ac_c" 1>&6
9429 else
9430   
9431 cat > conftest.$ac_ext <<EOF
9432 #line 9433 "configure"
9433 #include "confdefs.h"
9434
9435 #if defined(HAVE_UNISTD_H)
9436 #include <unistd.h>
9437 #endif
9438 #include <sys/types.h>
9439 #include <dirent.h>
9440 int main() {
9441 struct dirent64 de;
9442 ; return 0; }
9443 EOF
9444 if { (eval echo configure:9445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9445   rm -rf conftest*
9446   samba_cv_HAVE_STRUCT_DIRENT64=yes
9447 else
9448   echo "configure: failed program was:" >&5
9449   cat conftest.$ac_ext >&5
9450   rm -rf conftest*
9451   samba_cv_HAVE_STRUCT_DIRENT64=no
9452 fi
9453 rm -f conftest*
9454 fi
9455
9456 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9457 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
9458     cat >> confdefs.h <<\EOF
9459 #define HAVE_STRUCT_DIRENT64 1
9460 EOF
9461
9462 fi
9463
9464 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9465 echo "configure:9466: checking for major macro" >&5
9466 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9467   echo $ac_n "(cached) $ac_c" 1>&6
9468 else
9469   
9470 if test "$cross_compiling" = yes; then
9471   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9472 else
9473   cat > conftest.$ac_ext <<EOF
9474 #line 9475 "configure"
9475 #include "confdefs.h"
9476
9477 #if defined(HAVE_UNISTD_H)
9478 #include <unistd.h>
9479 #endif
9480 #include <sys/types.h>
9481 main() { dev_t dev; int i = major(dev); return 0; }
9482 EOF
9483 if { (eval echo configure:9484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9484 then
9485   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9486 else
9487   echo "configure: failed program was:" >&5
9488   cat conftest.$ac_ext >&5
9489   rm -fr conftest*
9490   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9491 fi
9492 rm -fr conftest*
9493 fi
9494
9495 fi
9496
9497 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9498 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9499     cat >> confdefs.h <<\EOF
9500 #define HAVE_DEVICE_MAJOR_FN 1
9501 EOF
9502
9503 fi
9504
9505 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9506 echo "configure:9507: checking for minor macro" >&5
9507 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9508   echo $ac_n "(cached) $ac_c" 1>&6
9509 else
9510   
9511 if test "$cross_compiling" = yes; then
9512   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9513 else
9514   cat > conftest.$ac_ext <<EOF
9515 #line 9516 "configure"
9516 #include "confdefs.h"
9517
9518 #if defined(HAVE_UNISTD_H)
9519 #include <unistd.h>
9520 #endif
9521 #include <sys/types.h>
9522 main() { dev_t dev; int i = minor(dev); return 0; }
9523 EOF
9524 if { (eval echo configure:9525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9525 then
9526   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9527 else
9528   echo "configure: failed program was:" >&5
9529   cat conftest.$ac_ext >&5
9530   rm -fr conftest*
9531   samba_cv_HAVE_DEVICE_MINOR_FN=no
9532 fi
9533 rm -fr conftest*
9534 fi
9535
9536 fi
9537
9538 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9539 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9540     cat >> confdefs.h <<\EOF
9541 #define HAVE_DEVICE_MINOR_FN 1
9542 EOF
9543
9544 fi
9545
9546 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9547 echo "configure:9548: checking for unsigned char" >&5
9548 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9549   echo $ac_n "(cached) $ac_c" 1>&6
9550 else
9551   
9552 if test "$cross_compiling" = yes; then
9553   samba_cv_HAVE_UNSIGNED_CHAR=cross
9554 else
9555   cat > conftest.$ac_ext <<EOF
9556 #line 9557 "configure"
9557 #include "confdefs.h"
9558 #include <stdio.h>
9559 main() { char c; c=250; exit((c > 0)?0:1); }
9560 EOF
9561 if { (eval echo configure:9562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9562 then
9563   samba_cv_HAVE_UNSIGNED_CHAR=yes
9564 else
9565   echo "configure: failed program was:" >&5
9566   cat conftest.$ac_ext >&5
9567   rm -fr conftest*
9568   samba_cv_HAVE_UNSIGNED_CHAR=no
9569 fi
9570 rm -fr conftest*
9571 fi
9572
9573 fi
9574
9575 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9576 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9577     cat >> confdefs.h <<\EOF
9578 #define HAVE_UNSIGNED_CHAR 1
9579 EOF
9580
9581 fi
9582
9583 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9584 echo "configure:9585: checking for sin_len in sock" >&5
9585 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9586   echo $ac_n "(cached) $ac_c" 1>&6
9587 else
9588   
9589 cat > conftest.$ac_ext <<EOF
9590 #line 9591 "configure"
9591 #include "confdefs.h"
9592 #include <sys/types.h>
9593 #include <sys/socket.h>
9594 #include <netinet/in.h>
9595 int main() {
9596 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9597 ; return 0; }
9598 EOF
9599 if { (eval echo configure:9600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9600   rm -rf conftest*
9601   samba_cv_HAVE_SOCK_SIN_LEN=yes
9602 else
9603   echo "configure: failed program was:" >&5
9604   cat conftest.$ac_ext >&5
9605   rm -rf conftest*
9606   samba_cv_HAVE_SOCK_SIN_LEN=no
9607 fi
9608 rm -f conftest*
9609 fi
9610
9611 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9612 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9613     cat >> confdefs.h <<\EOF
9614 #define HAVE_SOCK_SIN_LEN 1
9615 EOF
9616
9617 fi
9618
9619 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9620 echo "configure:9621: checking whether seekdir returns void" >&5
9621 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9622   echo $ac_n "(cached) $ac_c" 1>&6
9623 else
9624   
9625 cat > conftest.$ac_ext <<EOF
9626 #line 9627 "configure"
9627 #include "confdefs.h"
9628 #include <sys/types.h>
9629 #include <dirent.h>
9630 void seekdir(DIR *d, long loc) { return; }
9631 int main() {
9632 return 0;
9633 ; return 0; }
9634 EOF
9635 if { (eval echo configure:9636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9636   rm -rf conftest*
9637   samba_cv_SEEKDIR_RETURNS_VOID=yes
9638 else
9639   echo "configure: failed program was:" >&5
9640   cat conftest.$ac_ext >&5
9641   rm -rf conftest*
9642   samba_cv_SEEKDIR_RETURNS_VOID=no
9643 fi
9644 rm -f conftest*
9645 fi
9646
9647 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9648 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9649     cat >> confdefs.h <<\EOF
9650 #define SEEKDIR_RETURNS_VOID 1
9651 EOF
9652
9653 fi
9654
9655 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9656 echo "configure:9657: checking for __FILE__ macro" >&5
9657 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9658   echo $ac_n "(cached) $ac_c" 1>&6
9659 else
9660   
9661 cat > conftest.$ac_ext <<EOF
9662 #line 9663 "configure"
9663 #include "confdefs.h"
9664 #include <stdio.h>
9665 int main() {
9666 printf("%s\n", __FILE__);
9667 ; return 0; }
9668 EOF
9669 if { (eval echo configure:9670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9670   rm -rf conftest*
9671   samba_cv_HAVE_FILE_MACRO=yes
9672 else
9673   echo "configure: failed program was:" >&5
9674   cat conftest.$ac_ext >&5
9675   rm -rf conftest*
9676   samba_cv_HAVE_FILE_MACRO=no
9677 fi
9678 rm -f conftest*
9679 fi
9680
9681 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9682 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9683     cat >> confdefs.h <<\EOF
9684 #define HAVE_FILE_MACRO 1
9685 EOF
9686
9687 fi
9688
9689 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9690 echo "configure:9691: checking for __FUNCTION__ macro" >&5
9691 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9692   echo $ac_n "(cached) $ac_c" 1>&6
9693 else
9694   
9695 cat > conftest.$ac_ext <<EOF
9696 #line 9697 "configure"
9697 #include "confdefs.h"
9698 #include <stdio.h>
9699 int main() {
9700 printf("%s\n", __FUNCTION__);
9701 ; return 0; }
9702 EOF
9703 if { (eval echo configure:9704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9704   rm -rf conftest*
9705   samba_cv_HAVE_FUNCTION_MACRO=yes
9706 else
9707   echo "configure: failed program was:" >&5
9708   cat conftest.$ac_ext >&5
9709   rm -rf conftest*
9710   samba_cv_HAVE_FUNCTION_MACRO=no
9711 fi
9712 rm -f conftest*
9713 fi
9714
9715 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9716 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9717     cat >> confdefs.h <<\EOF
9718 #define HAVE_FUNCTION_MACRO 1
9719 EOF
9720
9721 fi
9722
9723 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9724 echo "configure:9725: checking if gettimeofday takes tz argument" >&5
9725 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9726   echo $ac_n "(cached) $ac_c" 1>&6
9727 else
9728   
9729 if test "$cross_compiling" = yes; then
9730   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9731 else
9732   cat > conftest.$ac_ext <<EOF
9733 #line 9734 "configure"
9734 #include "confdefs.h"
9735
9736 #include <sys/time.h>
9737 #include <unistd.h>
9738 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9739 EOF
9740 if { (eval echo configure:9741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9741 then
9742   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9743 else
9744   echo "configure: failed program was:" >&5
9745   cat conftest.$ac_ext >&5
9746   rm -fr conftest*
9747   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9748 fi
9749 rm -fr conftest*
9750 fi
9751
9752 fi
9753
9754 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9755 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9756     cat >> confdefs.h <<\EOF
9757 #define HAVE_GETTIMEOFDAY_TZ 1
9758 EOF
9759
9760 fi
9761
9762 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9763 echo "configure:9764: checking for __va_copy" >&5
9764 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9765   echo $ac_n "(cached) $ac_c" 1>&6
9766 else
9767   
9768 cat > conftest.$ac_ext <<EOF
9769 #line 9770 "configure"
9770 #include "confdefs.h"
9771 #include <stdarg.h>
9772 va_list ap1,ap2;
9773 int main() {
9774 __va_copy(ap1,ap2);
9775 ; return 0; }
9776 EOF
9777 if { (eval echo configure:9778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9778   rm -rf conftest*
9779   samba_cv_HAVE_VA_COPY=yes
9780 else
9781   echo "configure: failed program was:" >&5
9782   cat conftest.$ac_ext >&5
9783   rm -rf conftest*
9784   samba_cv_HAVE_VA_COPY=no
9785 fi
9786 rm -f conftest*
9787 fi
9788
9789 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9790 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9791     cat >> confdefs.h <<\EOF
9792 #define HAVE_VA_COPY 1
9793 EOF
9794
9795 fi
9796
9797 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9798 echo "configure:9799: checking for C99 vsnprintf" >&5
9799 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9800   echo $ac_n "(cached) $ac_c" 1>&6
9801 else
9802   
9803 if test "$cross_compiling" = yes; then
9804   samba_cv_HAVE_C99_VSNPRINTF=cross
9805 else
9806   cat > conftest.$ac_ext <<EOF
9807 #line 9808 "configure"
9808 #include "confdefs.h"
9809
9810 #include <sys/types.h>
9811 #include <stdarg.h>
9812 void foo(const char *format, ...) { 
9813        va_list ap;
9814        int len;
9815        char buf[5];
9816
9817        va_start(ap, format);
9818        len = vsnprintf(buf, 0, format, ap);
9819        va_end(ap);
9820        if (len != 5) exit(1);
9821
9822        va_start(ap, format);
9823        len = vsnprintf(0, 0, format, ap);
9824        va_end(ap);
9825        if (len != 5) exit(1);
9826
9827        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9828
9829        exit(0);
9830 }
9831 main() { foo("hello"); }
9832
9833 EOF
9834 if { (eval echo configure:9835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9835 then
9836   samba_cv_HAVE_C99_VSNPRINTF=yes
9837 else
9838   echo "configure: failed program was:" >&5
9839   cat conftest.$ac_ext >&5
9840   rm -fr conftest*
9841   samba_cv_HAVE_C99_VSNPRINTF=no
9842 fi
9843 rm -fr conftest*
9844 fi
9845
9846 fi
9847
9848 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9849 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9850     cat >> confdefs.h <<\EOF
9851 #define HAVE_C99_VSNPRINTF 1
9852 EOF
9853
9854 fi
9855
9856 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9857 echo "configure:9858: checking for broken readdir" >&5
9858 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9859   echo $ac_n "(cached) $ac_c" 1>&6
9860 else
9861   
9862 if test "$cross_compiling" = yes; then
9863   samba_cv_HAVE_BROKEN_READDIR=cross
9864 else
9865   cat > conftest.$ac_ext <<EOF
9866 #line 9867 "configure"
9867 #include "confdefs.h"
9868 #include <sys/types.h>
9869 #include <dirent.h>
9870 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9871 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9872 di->d_name[0] == 0) exit(0); exit(1);} 
9873 EOF
9874 if { (eval echo configure:9875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9875 then
9876   samba_cv_HAVE_BROKEN_READDIR=yes
9877 else
9878   echo "configure: failed program was:" >&5
9879   cat conftest.$ac_ext >&5
9880   rm -fr conftest*
9881   samba_cv_HAVE_BROKEN_READDIR=no
9882 fi
9883 rm -fr conftest*
9884 fi
9885
9886 fi
9887
9888 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9889 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9890     cat >> confdefs.h <<\EOF
9891 #define HAVE_BROKEN_READDIR 1
9892 EOF
9893
9894 fi
9895
9896 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9897 echo "configure:9898: checking for utimbuf" >&5
9898 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9899   echo $ac_n "(cached) $ac_c" 1>&6
9900 else
9901   
9902 cat > conftest.$ac_ext <<EOF
9903 #line 9904 "configure"
9904 #include "confdefs.h"
9905 #include <sys/types.h>
9906 #include <utime.h>
9907 int main() {
9908 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9909 ; return 0; }
9910 EOF
9911 if { (eval echo configure:9912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9912   rm -rf conftest*
9913   samba_cv_HAVE_UTIMBUF=yes
9914 else
9915   echo "configure: failed program was:" >&5
9916   cat conftest.$ac_ext >&5
9917   rm -rf conftest*
9918   samba_cv_HAVE_UTIMBUF=no
9919 fi
9920 rm -f conftest*
9921 fi
9922
9923 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9924 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9925     cat >> confdefs.h <<\EOF
9926 #define HAVE_UTIMBUF 1
9927 EOF
9928
9929 fi
9930
9931
9932 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9933 do
9934 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9935 echo "configure:9936: checking for $ac_func" >&5
9936 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9937   echo $ac_n "(cached) $ac_c" 1>&6
9938 else
9939   cat > conftest.$ac_ext <<EOF
9940 #line 9941 "configure"
9941 #include "confdefs.h"
9942 /* System header to define __stub macros and hopefully few prototypes,
9943     which can conflict with char $ac_func(); below.  */
9944 #include <assert.h>
9945 /* Override any gcc2 internal prototype to avoid an error.  */
9946 /* We use char because int might match the return type of a gcc2
9947     builtin and then its argument prototype would still apply.  */
9948 char $ac_func();
9949
9950 int main() {
9951
9952 /* The GNU C library defines this for functions which it implements
9953     to always fail with ENOSYS.  Some functions are actually named
9954     something starting with __ and the normal name is an alias.  */
9955 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9956 choke me
9957 #else
9958 $ac_func();
9959 #endif
9960
9961 ; return 0; }
9962 EOF
9963 if { (eval echo configure:9964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9964   rm -rf conftest*
9965   eval "ac_cv_func_$ac_func=yes"
9966 else
9967   echo "configure: failed program was:" >&5
9968   cat conftest.$ac_ext >&5
9969   rm -rf conftest*
9970   eval "ac_cv_func_$ac_func=no"
9971 fi
9972 rm -f conftest*
9973 fi
9974
9975 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9976   echo "$ac_t""yes" 1>&6
9977     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9978   cat >> confdefs.h <<EOF
9979 #define $ac_tr_func 1
9980 EOF
9981  
9982 else
9983   echo "$ac_t""no" 1>&6
9984 fi
9985 done
9986
9987
9988 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9989 echo "configure:9990: checking for ut_name in utmp" >&5
9990 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9991   echo $ac_n "(cached) $ac_c" 1>&6
9992 else
9993   
9994 cat > conftest.$ac_ext <<EOF
9995 #line 9996 "configure"
9996 #include "confdefs.h"
9997 #include <sys/types.h>
9998 #include <utmp.h>
9999 int main() {
10000 struct utmp ut;  ut.ut_name[0] = 'a';
10001 ; return 0; }
10002 EOF
10003 if { (eval echo configure:10004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10004   rm -rf conftest*
10005   samba_cv_HAVE_UT_UT_NAME=yes
10006 else
10007   echo "configure: failed program was:" >&5
10008   cat conftest.$ac_ext >&5
10009   rm -rf conftest*
10010   samba_cv_HAVE_UT_UT_NAME=no
10011 fi
10012 rm -f conftest*
10013 fi
10014
10015 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
10016 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
10017     cat >> confdefs.h <<\EOF
10018 #define HAVE_UT_UT_NAME 1
10019 EOF
10020
10021 fi 
10022
10023 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
10024 echo "configure:10025: checking for ut_user in utmp" >&5
10025 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
10026   echo $ac_n "(cached) $ac_c" 1>&6
10027 else
10028   
10029 cat > conftest.$ac_ext <<EOF
10030 #line 10031 "configure"
10031 #include "confdefs.h"
10032 #include <sys/types.h>
10033 #include <utmp.h>
10034 int main() {
10035 struct utmp ut;  ut.ut_user[0] = 'a';
10036 ; return 0; }
10037 EOF
10038 if { (eval echo configure:10039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10039   rm -rf conftest*
10040   samba_cv_HAVE_UT_UT_USER=yes
10041 else
10042   echo "configure: failed program was:" >&5
10043   cat conftest.$ac_ext >&5
10044   rm -rf conftest*
10045   samba_cv_HAVE_UT_UT_USER=no
10046 fi
10047 rm -f conftest*
10048 fi
10049
10050 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
10051 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
10052     cat >> confdefs.h <<\EOF
10053 #define HAVE_UT_UT_USER 1
10054 EOF
10055
10056 fi 
10057
10058 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10059 echo "configure:10060: checking for ut_id in utmp" >&5
10060 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10061   echo $ac_n "(cached) $ac_c" 1>&6
10062 else
10063   
10064 cat > conftest.$ac_ext <<EOF
10065 #line 10066 "configure"
10066 #include "confdefs.h"
10067 #include <sys/types.h>
10068 #include <utmp.h>
10069 int main() {
10070 struct utmp ut;  ut.ut_id[0] = 'a';
10071 ; return 0; }
10072 EOF
10073 if { (eval echo configure:10074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10074   rm -rf conftest*
10075   samba_cv_HAVE_UT_UT_ID=yes
10076 else
10077   echo "configure: failed program was:" >&5
10078   cat conftest.$ac_ext >&5
10079   rm -rf conftest*
10080   samba_cv_HAVE_UT_UT_ID=no
10081 fi
10082 rm -f conftest*
10083 fi
10084
10085 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10086 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10087     cat >> confdefs.h <<\EOF
10088 #define HAVE_UT_UT_ID 1
10089 EOF
10090
10091 fi 
10092
10093 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10094 echo "configure:10095: checking for ut_host in utmp" >&5
10095 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10096   echo $ac_n "(cached) $ac_c" 1>&6
10097 else
10098   
10099 cat > conftest.$ac_ext <<EOF
10100 #line 10101 "configure"
10101 #include "confdefs.h"
10102 #include <sys/types.h>
10103 #include <utmp.h>
10104 int main() {
10105 struct utmp ut;  ut.ut_host[0] = 'a';
10106 ; return 0; }
10107 EOF
10108 if { (eval echo configure:10109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10109   rm -rf conftest*
10110   samba_cv_HAVE_UT_UT_HOST=yes
10111 else
10112   echo "configure: failed program was:" >&5
10113   cat conftest.$ac_ext >&5
10114   rm -rf conftest*
10115   samba_cv_HAVE_UT_UT_HOST=no
10116 fi
10117 rm -f conftest*
10118 fi
10119
10120 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10121 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10122     cat >> confdefs.h <<\EOF
10123 #define HAVE_UT_UT_HOST 1
10124 EOF
10125
10126 fi 
10127
10128 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10129 echo "configure:10130: checking for ut_time in utmp" >&5
10130 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10131   echo $ac_n "(cached) $ac_c" 1>&6
10132 else
10133   
10134 cat > conftest.$ac_ext <<EOF
10135 #line 10136 "configure"
10136 #include "confdefs.h"
10137 #include <sys/types.h>
10138 #include <utmp.h>
10139 int main() {
10140 struct utmp ut;  time_t t; ut.ut_time = t;
10141 ; return 0; }
10142 EOF
10143 if { (eval echo configure:10144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10144   rm -rf conftest*
10145   samba_cv_HAVE_UT_UT_TIME=yes
10146 else
10147   echo "configure: failed program was:" >&5
10148   cat conftest.$ac_ext >&5
10149   rm -rf conftest*
10150   samba_cv_HAVE_UT_UT_TIME=no
10151 fi
10152 rm -f conftest*
10153 fi
10154
10155 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10156 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10157     cat >> confdefs.h <<\EOF
10158 #define HAVE_UT_UT_TIME 1
10159 EOF
10160
10161 fi 
10162
10163 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10164 echo "configure:10165: checking for ut_tv in utmp" >&5
10165 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10166   echo $ac_n "(cached) $ac_c" 1>&6
10167 else
10168   
10169 cat > conftest.$ac_ext <<EOF
10170 #line 10171 "configure"
10171 #include "confdefs.h"
10172 #include <sys/types.h>
10173 #include <utmp.h>
10174 int main() {
10175 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10176 ; return 0; }
10177 EOF
10178 if { (eval echo configure:10179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10179   rm -rf conftest*
10180   samba_cv_HAVE_UT_UT_TV=yes
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184   rm -rf conftest*
10185   samba_cv_HAVE_UT_UT_TV=no
10186 fi
10187 rm -f conftest*
10188 fi
10189
10190 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10191 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10192     cat >> confdefs.h <<\EOF
10193 #define HAVE_UT_UT_TV 1
10194 EOF
10195
10196 fi 
10197
10198 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10199 echo "configure:10200: checking for ut_type in utmp" >&5
10200 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10201   echo $ac_n "(cached) $ac_c" 1>&6
10202 else
10203   
10204 cat > conftest.$ac_ext <<EOF
10205 #line 10206 "configure"
10206 #include "confdefs.h"
10207 #include <sys/types.h>
10208 #include <utmp.h>
10209 int main() {
10210 struct utmp ut;  ut.ut_type = 0;
10211 ; return 0; }
10212 EOF
10213 if { (eval echo configure:10214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10214   rm -rf conftest*
10215   samba_cv_HAVE_UT_UT_TYPE=yes
10216 else
10217   echo "configure: failed program was:" >&5
10218   cat conftest.$ac_ext >&5
10219   rm -rf conftest*
10220   samba_cv_HAVE_UT_UT_TYPE=no
10221 fi
10222 rm -f conftest*
10223 fi
10224
10225 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10226 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10227     cat >> confdefs.h <<\EOF
10228 #define HAVE_UT_UT_TYPE 1
10229 EOF
10230
10231 fi 
10232
10233 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10234 echo "configure:10235: checking for ut_pid in utmp" >&5
10235 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10236   echo $ac_n "(cached) $ac_c" 1>&6
10237 else
10238   
10239 cat > conftest.$ac_ext <<EOF
10240 #line 10241 "configure"
10241 #include "confdefs.h"
10242 #include <sys/types.h>
10243 #include <utmp.h>
10244 int main() {
10245 struct utmp ut;  ut.ut_pid = 0;
10246 ; return 0; }
10247 EOF
10248 if { (eval echo configure:10249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10249   rm -rf conftest*
10250   samba_cv_HAVE_UT_UT_PID=yes
10251 else
10252   echo "configure: failed program was:" >&5
10253   cat conftest.$ac_ext >&5
10254   rm -rf conftest*
10255   samba_cv_HAVE_UT_UT_PID=no
10256 fi
10257 rm -f conftest*
10258 fi
10259
10260 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10261 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10262     cat >> confdefs.h <<\EOF
10263 #define HAVE_UT_UT_PID 1
10264 EOF
10265
10266 fi 
10267
10268 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10269 echo "configure:10270: checking for ut_exit in utmp" >&5
10270 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10271   echo $ac_n "(cached) $ac_c" 1>&6
10272 else
10273   
10274 cat > conftest.$ac_ext <<EOF
10275 #line 10276 "configure"
10276 #include "confdefs.h"
10277 #include <sys/types.h>
10278 #include <utmp.h>
10279 int main() {
10280 struct utmp ut;  ut.ut_exit.e_exit = 0;
10281 ; return 0; }
10282 EOF
10283 if { (eval echo configure:10284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10284   rm -rf conftest*
10285   samba_cv_HAVE_UT_UT_EXIT=yes
10286 else
10287   echo "configure: failed program was:" >&5
10288   cat conftest.$ac_ext >&5
10289   rm -rf conftest*
10290   samba_cv_HAVE_UT_UT_EXIT=no
10291 fi
10292 rm -f conftest*
10293 fi
10294
10295 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10296 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10297     cat >> confdefs.h <<\EOF
10298 #define HAVE_UT_UT_EXIT 1
10299 EOF
10300
10301 fi 
10302
10303 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10304 echo "configure:10305: checking for ut_addr in utmp" >&5
10305 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10306   echo $ac_n "(cached) $ac_c" 1>&6
10307 else
10308   
10309 cat > conftest.$ac_ext <<EOF
10310 #line 10311 "configure"
10311 #include "confdefs.h"
10312 #include <sys/types.h>
10313 #include <utmp.h>
10314 int main() {
10315 struct utmp ut;  ut.ut_addr = 0;
10316 ; return 0; }
10317 EOF
10318 if { (eval echo configure:10319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10319   rm -rf conftest*
10320   samba_cv_HAVE_UT_UT_ADDR=yes
10321 else
10322   echo "configure: failed program was:" >&5
10323   cat conftest.$ac_ext >&5
10324   rm -rf conftest*
10325   samba_cv_HAVE_UT_UT_ADDR=no
10326 fi
10327 rm -f conftest*
10328 fi
10329
10330 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10331 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10332     cat >> confdefs.h <<\EOF
10333 #define HAVE_UT_UT_ADDR 1
10334 EOF
10335
10336 fi 
10337
10338 if test x$ac_cv_func_pututline = xyes ; then
10339   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10340 echo "configure:10341: checking whether pututline returns pointer" >&5
10341 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10342   echo $ac_n "(cached) $ac_c" 1>&6
10343 else
10344   
10345   cat > conftest.$ac_ext <<EOF
10346 #line 10347 "configure"
10347 #include "confdefs.h"
10348 #include <sys/types.h>
10349 #include <utmp.h>
10350 int main() {
10351 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10352 ; return 0; }
10353 EOF
10354 if { (eval echo configure:10355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10355   rm -rf conftest*
10356   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10357 else
10358   echo "configure: failed program was:" >&5
10359   cat conftest.$ac_ext >&5
10360   rm -rf conftest*
10361   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10362 fi
10363 rm -f conftest*
10364 fi
10365
10366 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10367   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10368       cat >> confdefs.h <<\EOF
10369 #define PUTUTLINE_RETURNS_UTMP 1
10370 EOF
10371
10372   fi
10373 fi
10374
10375 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10376 echo "configure:10377: checking for ut_syslen in utmpx" >&5
10377 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10378   echo $ac_n "(cached) $ac_c" 1>&6
10379 else
10380   
10381 cat > conftest.$ac_ext <<EOF
10382 #line 10383 "configure"
10383 #include "confdefs.h"
10384 #include <sys/types.h>
10385 #include <utmpx.h>
10386 int main() {
10387 struct utmpx ux;  ux.ut_syslen = 0;
10388 ; return 0; }
10389 EOF
10390 if { (eval echo configure:10391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10391   rm -rf conftest*
10392   samba_cv_HAVE_UX_UT_SYSLEN=yes
10393 else
10394   echo "configure: failed program was:" >&5
10395   cat conftest.$ac_ext >&5
10396   rm -rf conftest*
10397   samba_cv_HAVE_UX_UT_SYSLEN=no
10398 fi
10399 rm -f conftest*
10400 fi
10401
10402 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10403 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10404     cat >> confdefs.h <<\EOF
10405 #define HAVE_UX_UT_SYSLEN 1
10406 EOF
10407
10408 fi 
10409
10410
10411 #################################################
10412 # check for libiconv support
10413 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10414 echo "configure:10415: checking whether to use libiconv" >&5
10415 # Check whether --with-libiconv or --without-libiconv was given.
10416 if test "${with_libiconv+set}" = set; then
10417   withval="$with_libiconv"
10418    case "$withval" in
10419   no)
10420     echo "$ac_t""no" 1>&6
10421     ;;
10422   *)
10423     echo "$ac_t""yes" 1>&6
10424     CFLAGS="$CFLAGS -I$withval/include"
10425     LDFLAGS="$LDFLAGS -L$withval/lib"
10426     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10427 echo "configure:10428: checking for iconv_open in -liconv" >&5
10428 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10429 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10430   echo $ac_n "(cached) $ac_c" 1>&6
10431 else
10432   ac_save_LIBS="$LIBS"
10433 LIBS="-liconv  $LIBS"
10434 cat > conftest.$ac_ext <<EOF
10435 #line 10436 "configure"
10436 #include "confdefs.h"
10437 /* Override any gcc2 internal prototype to avoid an error.  */
10438 /* We use char because int might match the return type of a gcc2
10439     builtin and then its argument prototype would still apply.  */
10440 char iconv_open();
10441
10442 int main() {
10443 iconv_open()
10444 ; return 0; }
10445 EOF
10446 if { (eval echo configure:10447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10447   rm -rf conftest*
10448   eval "ac_cv_lib_$ac_lib_var=yes"
10449 else
10450   echo "configure: failed program was:" >&5
10451   cat conftest.$ac_ext >&5
10452   rm -rf conftest*
10453   eval "ac_cv_lib_$ac_lib_var=no"
10454 fi
10455 rm -f conftest*
10456 LIBS="$ac_save_LIBS"
10457
10458 fi
10459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10460   echo "$ac_t""yes" 1>&6
10461     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10462     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10463   cat >> confdefs.h <<EOF
10464 #define $ac_tr_lib 1
10465 EOF
10466
10467   LIBS="-liconv $LIBS"
10468
10469 else
10470   echo "$ac_t""no" 1>&6
10471 fi
10472
10473     cat >> confdefs.h <<EOF
10474 #define WITH_LIBICONV "${withval}"
10475 EOF
10476
10477     ;;
10478   esac 
10479 else
10480   echo "$ac_t""no" 1>&6
10481
10482 fi
10483
10484
10485
10486 ############
10487 # check for iconv in libc
10488 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10489 echo "configure:10490: checking for working iconv" >&5
10490 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10491   echo $ac_n "(cached) $ac_c" 1>&6
10492 else
10493   
10494 if test "$cross_compiling" = yes; then
10495   samba_cv_HAVE_NATIVE_ICONV=cross
10496 else
10497   cat > conftest.$ac_ext <<EOF
10498 #line 10499 "configure"
10499 #include "confdefs.h"
10500
10501 #include <iconv.h>
10502 main() {
10503        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10504        if (cd == 0 || cd == (iconv_t)-1) return -1;
10505        return 0;
10506 }
10507
10508 EOF
10509 if { (eval echo configure:10510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10510 then
10511   samba_cv_HAVE_NATIVE_ICONV=yes
10512 else
10513   echo "configure: failed program was:" >&5
10514   cat conftest.$ac_ext >&5
10515   rm -fr conftest*
10516   samba_cv_HAVE_NATIVE_ICONV=no
10517 fi
10518 rm -fr conftest*
10519 fi
10520
10521 fi
10522
10523 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10524 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10525     cat >> confdefs.h <<\EOF
10526 #define HAVE_NATIVE_ICONV 1
10527 EOF
10528
10529 fi
10530
10531
10532 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10533 echo "configure:10534: checking for Linux kernel oplocks" >&5
10534 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10535   echo $ac_n "(cached) $ac_c" 1>&6
10536 else
10537   
10538 if test "$cross_compiling" = yes; then
10539   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10540 else
10541   cat > conftest.$ac_ext <<EOF
10542 #line 10543 "configure"
10543 #include "confdefs.h"
10544
10545 #include <sys/types.h>
10546 #include <fcntl.h>
10547 #ifndef F_GETLEASE
10548 #define F_GETLEASE      1025
10549 #endif
10550 main() {
10551        int fd = open("/dev/null", O_RDONLY);
10552        return fcntl(fd, F_GETLEASE, 0) == -1;
10553 }
10554
10555 EOF
10556 if { (eval echo configure:10557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10557 then
10558   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10559 else
10560   echo "configure: failed program was:" >&5
10561   cat conftest.$ac_ext >&5
10562   rm -fr conftest*
10563   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10564 fi
10565 rm -fr conftest*
10566 fi
10567
10568 fi
10569
10570 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10571 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10572     cat >> confdefs.h <<\EOF
10573 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10574 EOF
10575
10576 fi
10577
10578 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10579 echo "configure:10580: checking for kernel change notify support" >&5
10580 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10581   echo $ac_n "(cached) $ac_c" 1>&6
10582 else
10583   
10584 if test "$cross_compiling" = yes; then
10585   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10586 else
10587   cat > conftest.$ac_ext <<EOF
10588 #line 10589 "configure"
10589 #include "confdefs.h"
10590
10591 #include <sys/types.h>
10592 #include <fcntl.h>
10593 #include <signal.h>
10594 #ifndef F_NOTIFY
10595 #define F_NOTIFY 1026
10596 #endif
10597 main() {
10598         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10599 }
10600
10601 EOF
10602 if { (eval echo configure:10603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10603 then
10604   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10605 else
10606   echo "configure: failed program was:" >&5
10607   cat conftest.$ac_ext >&5
10608   rm -fr conftest*
10609   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10610 fi
10611 rm -fr conftest*
10612 fi
10613
10614 fi
10615
10616 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10617 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10618     cat >> confdefs.h <<\EOF
10619 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10620 EOF
10621
10622 fi
10623
10624 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10625 echo "configure:10626: checking for kernel share modes" >&5
10626 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10627   echo $ac_n "(cached) $ac_c" 1>&6
10628 else
10629   
10630 if test "$cross_compiling" = yes; then
10631   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10632 else
10633   cat > conftest.$ac_ext <<EOF
10634 #line 10635 "configure"
10635 #include "confdefs.h"
10636
10637 #include <sys/types.h>
10638 #include <fcntl.h>
10639 #include <signal.h>
10640 #include <sys/file.h>
10641 #ifndef LOCK_MAND
10642 #define LOCK_MAND       32
10643 #define LOCK_READ       64
10644 #endif
10645 main() {
10646         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10647 }
10648
10649 EOF
10650 if { (eval echo configure:10651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10651 then
10652   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10653 else
10654   echo "configure: failed program was:" >&5
10655   cat conftest.$ac_ext >&5
10656   rm -fr conftest*
10657   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10658 fi
10659 rm -fr conftest*
10660 fi
10661
10662 fi
10663
10664 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10665 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10666     cat >> confdefs.h <<\EOF
10667 #define HAVE_KERNEL_SHARE_MODES 1
10668 EOF
10669
10670 fi
10671
10672
10673
10674
10675 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10676 echo "configure:10677: checking for IRIX kernel oplock type definitions" >&5
10677 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10678   echo $ac_n "(cached) $ac_c" 1>&6
10679 else
10680   
10681 cat > conftest.$ac_ext <<EOF
10682 #line 10683 "configure"
10683 #include "confdefs.h"
10684 #include <sys/types.h>
10685 #include <fcntl.h>
10686 int main() {
10687 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10688 ; return 0; }
10689 EOF
10690 if { (eval echo configure:10691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10691   rm -rf conftest*
10692   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10693 else
10694   echo "configure: failed program was:" >&5
10695   cat conftest.$ac_ext >&5
10696   rm -rf conftest*
10697   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10698 fi
10699 rm -f conftest*
10700 fi
10701
10702 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10703 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10704     cat >> confdefs.h <<\EOF
10705 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10706 EOF
10707
10708 fi
10709
10710 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10711 echo "configure:10712: checking for irix specific capabilities" >&5
10712 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10713   echo $ac_n "(cached) $ac_c" 1>&6
10714 else
10715   
10716 if test "$cross_compiling" = yes; then
10717   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10718 else
10719   cat > conftest.$ac_ext <<EOF
10720 #line 10721 "configure"
10721 #include "confdefs.h"
10722 #include <sys/types.h>
10723 #include <sys/capability.h>
10724 main() {
10725  cap_t cap;
10726  if ((cap = cap_get_proc()) == NULL)
10727    exit(1);
10728  cap->cap_effective |= CAP_NETWORK_MGT;
10729  cap->cap_inheritable |= CAP_NETWORK_MGT;
10730  cap_set_proc(cap);
10731  exit(0);
10732 }
10733
10734 EOF
10735 if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10736 then
10737   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10738 else
10739   echo "configure: failed program was:" >&5
10740   cat conftest.$ac_ext >&5
10741   rm -fr conftest*
10742   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10743 fi
10744 rm -fr conftest*
10745 fi
10746
10747 fi
10748
10749 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10750 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10751     cat >> confdefs.h <<\EOF
10752 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10753 EOF
10754
10755 fi
10756
10757 #
10758 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10759 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10760 #
10761
10762 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10763 echo "configure:10764: checking for int16 typedef included by rpc/rpc.h" >&5
10764 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10765   echo $ac_n "(cached) $ac_c" 1>&6
10766 else
10767   
10768 cat > conftest.$ac_ext <<EOF
10769 #line 10770 "configure"
10770 #include "confdefs.h"
10771 #include <sys/types.h>
10772 #if defined(HAVE_RPC_RPC_H)
10773 #include <rpc/rpc.h>
10774 #endif
10775 int main() {
10776 int16 testvar;
10777 ; return 0; }
10778 EOF
10779 if { (eval echo configure:10780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10780   rm -rf conftest*
10781   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10782 else
10783   echo "configure: failed program was:" >&5
10784   cat conftest.$ac_ext >&5
10785   rm -rf conftest*
10786   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10787 fi
10788 rm -f conftest*
10789 fi
10790
10791 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10792 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10793     cat >> confdefs.h <<\EOF
10794 #define HAVE_INT16_FROM_RPC_RPC_H 1
10795 EOF
10796
10797 fi
10798
10799 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10800 echo "configure:10801: checking for uint16 typedef included by rpc/rpc.h" >&5
10801 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10802   echo $ac_n "(cached) $ac_c" 1>&6
10803 else
10804   
10805 cat > conftest.$ac_ext <<EOF
10806 #line 10807 "configure"
10807 #include "confdefs.h"
10808 #include <sys/types.h>
10809 #if defined(HAVE_RPC_RPC_H)
10810 #include <rpc/rpc.h>
10811 #endif
10812 int main() {
10813 uint16 testvar;
10814 ; return 0; }
10815 EOF
10816 if { (eval echo configure:10817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10817   rm -rf conftest*
10818   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10819 else
10820   echo "configure: failed program was:" >&5
10821   cat conftest.$ac_ext >&5
10822   rm -rf conftest*
10823   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10824 fi
10825 rm -f conftest*
10826 fi
10827
10828 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10829 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10830     cat >> confdefs.h <<\EOF
10831 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10832 EOF
10833
10834 fi
10835
10836 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10837 echo "configure:10838: checking for int32 typedef included by rpc/rpc.h" >&5
10838 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10839   echo $ac_n "(cached) $ac_c" 1>&6
10840 else
10841   
10842 cat > conftest.$ac_ext <<EOF
10843 #line 10844 "configure"
10844 #include "confdefs.h"
10845 #include <sys/types.h>
10846 #if defined(HAVE_RPC_RPC_H)
10847 #include <rpc/rpc.h>
10848 #endif
10849 int main() {
10850 int32 testvar;
10851 ; return 0; }
10852 EOF
10853 if { (eval echo configure:10854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10854   rm -rf conftest*
10855   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10856 else
10857   echo "configure: failed program was:" >&5
10858   cat conftest.$ac_ext >&5
10859   rm -rf conftest*
10860   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10861 fi
10862 rm -f conftest*
10863 fi
10864
10865 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10866 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10867     cat >> confdefs.h <<\EOF
10868 #define HAVE_INT32_FROM_RPC_RPC_H 1
10869 EOF
10870
10871 fi
10872
10873 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10874 echo "configure:10875: checking for uint32 typedef included by rpc/rpc.h" >&5
10875 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10876   echo $ac_n "(cached) $ac_c" 1>&6
10877 else
10878   
10879 cat > conftest.$ac_ext <<EOF
10880 #line 10881 "configure"
10881 #include "confdefs.h"
10882 #include <sys/types.h>
10883 #if defined(HAVE_RPC_RPC_H)
10884 #include <rpc/rpc.h>
10885 #endif
10886 int main() {
10887 uint32 testvar;
10888 ; return 0; }
10889 EOF
10890 if { (eval echo configure:10891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10891   rm -rf conftest*
10892   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10893 else
10894   echo "configure: failed program was:" >&5
10895   cat conftest.$ac_ext >&5
10896   rm -rf conftest*
10897   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10898 fi
10899 rm -f conftest*
10900 fi
10901
10902 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10903 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10904     cat >> confdefs.h <<\EOF
10905 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10906 EOF
10907
10908 fi
10909
10910
10911 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10912 echo "configure:10913: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10913 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10914   echo $ac_n "(cached) $ac_c" 1>&6
10915 else
10916   
10917 cat > conftest.$ac_ext <<EOF
10918 #line 10919 "configure"
10919 #include "confdefs.h"
10920 #include <sys/types.h>
10921 #ifdef HAVE_SYS_SECURITY_H
10922 #include <sys/security.h>
10923 #include <prot.h>
10924 #endif  /* HAVE_SYS_SECURITY_H */
10925 #if defined(HAVE_RPC_RPC_H)
10926 #include <rpc/rpc.h>
10927 #endif
10928 int main() {
10929 int testvar;
10930 ; return 0; }
10931 EOF
10932 if { (eval echo configure:10933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10933   rm -rf conftest*
10934   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10935 else
10936   echo "configure: failed program was:" >&5
10937   cat conftest.$ac_ext >&5
10938   rm -rf conftest*
10939   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10940 fi
10941 rm -f conftest*
10942 fi
10943
10944 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10945 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10946     cat >> confdefs.h <<\EOF
10947 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10948 EOF
10949
10950 fi
10951
10952 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10953 echo "configure:10954: checking for test routines" >&5
10954 if test "$cross_compiling" = yes; then
10955   echo "configure: warning: cannot run when cross-compiling" 1>&2
10956 else
10957   cat > conftest.$ac_ext <<EOF
10958 #line 10959 "configure"
10959 #include "confdefs.h"
10960 #include "${srcdir-.}/tests/trivial.c"
10961 EOF
10962 if { (eval echo configure:10963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10963 then
10964   echo "$ac_t""yes" 1>&6
10965 else
10966   echo "configure: failed program was:" >&5
10967   cat conftest.$ac_ext >&5
10968   rm -fr conftest*
10969   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10970 fi
10971 rm -fr conftest*
10972 fi
10973
10974
10975 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10976 echo "configure:10977: checking for ftruncate extend" >&5
10977 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10978   echo $ac_n "(cached) $ac_c" 1>&6
10979 else
10980   
10981 if test "$cross_compiling" = yes; then
10982   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10983 else
10984   cat > conftest.$ac_ext <<EOF
10985 #line 10986 "configure"
10986 #include "confdefs.h"
10987 #include "${srcdir-.}/tests/ftruncate.c"
10988 EOF
10989 if { (eval echo configure:10990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10990 then
10991   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10992 else
10993   echo "configure: failed program was:" >&5
10994   cat conftest.$ac_ext >&5
10995   rm -fr conftest*
10996   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10997 fi
10998 rm -fr conftest*
10999 fi
11000
11001 fi
11002
11003 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
11004 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
11005     cat >> confdefs.h <<\EOF
11006 #define HAVE_FTRUNCATE_EXTEND 1
11007 EOF
11008
11009 fi
11010
11011 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
11012 echo "configure:11013: checking for AF_LOCAL socket support" >&5
11013 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
11014   echo $ac_n "(cached) $ac_c" 1>&6
11015 else
11016   
11017 if test "$cross_compiling" = yes; then
11018   samba_cv_HAVE_WORKING_AF_LOCAL=cross
11019 else
11020   cat > conftest.$ac_ext <<EOF
11021 #line 11022 "configure"
11022 #include "confdefs.h"
11023 #include "${srcdir-.}/tests/unixsock.c"
11024 EOF
11025 if { (eval echo configure:11026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11026 then
11027   samba_cv_HAVE_WORKING_AF_LOCAL=yes
11028 else
11029   echo "configure: failed program was:" >&5
11030   cat conftest.$ac_ext >&5
11031   rm -fr conftest*
11032   samba_cv_HAVE_WORKING_AF_LOCAL=no
11033 fi
11034 rm -fr conftest*
11035 fi
11036
11037 fi
11038
11039 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
11040 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
11041 then
11042     cat >> confdefs.h <<\EOF
11043 #define HAVE_WORKING_AF_LOCAL 1
11044 EOF
11045
11046 fi
11047
11048 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
11049 echo "configure:11050: checking for broken getgroups" >&5
11050 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
11051   echo $ac_n "(cached) $ac_c" 1>&6
11052 else
11053   
11054 if test "$cross_compiling" = yes; then
11055   samba_cv_HAVE_BROKEN_GETGROUPS=cross
11056 else
11057   cat > conftest.$ac_ext <<EOF
11058 #line 11059 "configure"
11059 #include "confdefs.h"
11060 #include "${srcdir-.}/tests/getgroups.c"
11061 EOF
11062 if { (eval echo configure:11063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11063 then
11064   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11065 else
11066   echo "configure: failed program was:" >&5
11067   cat conftest.$ac_ext >&5
11068   rm -fr conftest*
11069   samba_cv_HAVE_BROKEN_GETGROUPS=no
11070 fi
11071 rm -fr conftest*
11072 fi
11073
11074 fi
11075
11076 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11077 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11078     cat >> confdefs.h <<\EOF
11079 #define HAVE_BROKEN_GETGROUPS 1
11080 EOF
11081
11082 fi
11083
11084 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11085 echo "configure:11086: checking whether getpass should be replaced" >&5
11086 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11087   echo $ac_n "(cached) $ac_c" 1>&6
11088 else
11089   
11090 SAVE_CPPFLAGS="$CPPFLAGS"
11091 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt  -I${srcdir-.}/smbwrapper"
11092 cat > conftest.$ac_ext <<EOF
11093 #line 11094 "configure"
11094 #include "confdefs.h"
11095
11096 #define REPLACE_GETPASS 1
11097 #define NO_CONFIG_H 1
11098 #define main dont_declare_main
11099 #include "${srcdir-.}/lib/getsmbpass.c"
11100 #undef main
11101
11102 int main() {
11103
11104 ; return 0; }
11105 EOF
11106 if { (eval echo configure:11107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11107   rm -rf conftest*
11108   samba_cv_REPLACE_GETPASS=yes
11109 else
11110   echo "configure: failed program was:" >&5
11111   cat conftest.$ac_ext >&5
11112   rm -rf conftest*
11113   samba_cv_REPLACE_GETPASS=no
11114 fi
11115 rm -f conftest*
11116 CPPFLAGS="$SAVE_CPPFLAGS"
11117
11118 fi
11119
11120 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11121 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11122         cat >> confdefs.h <<\EOF
11123 #define REPLACE_GETPASS 1
11124 EOF
11125
11126 fi
11127
11128 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11129 echo "configure:11130: checking for broken inet_ntoa" >&5
11130 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11131   echo $ac_n "(cached) $ac_c" 1>&6
11132 else
11133   
11134 if test "$cross_compiling" = yes; then
11135   samba_cv_REPLACE_INET_NTOA=cross
11136 else
11137   cat > conftest.$ac_ext <<EOF
11138 #line 11139 "configure"
11139 #include "confdefs.h"
11140
11141 #include <stdio.h>
11142 #include <sys/types.h>
11143 #include <netinet/in.h>
11144 #ifdef HAVE_ARPA_INET_H
11145 #include <arpa/inet.h>
11146 #endif
11147 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11148 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11149     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11150 exit(1);}
11151 EOF
11152 if { (eval echo configure:11153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11153 then
11154   samba_cv_REPLACE_INET_NTOA=yes
11155 else
11156   echo "configure: failed program was:" >&5
11157   cat conftest.$ac_ext >&5
11158   rm -fr conftest*
11159   samba_cv_REPLACE_INET_NTOA=no
11160 fi
11161 rm -fr conftest*
11162 fi
11163
11164 fi
11165
11166 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11167 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11168     cat >> confdefs.h <<\EOF
11169 #define REPLACE_INET_NTOA 1
11170 EOF
11171
11172 fi
11173
11174 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11175 echo "configure:11176: checking for secure mkstemp" >&5
11176 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11177   echo $ac_n "(cached) $ac_c" 1>&6
11178 else
11179   
11180 if test "$cross_compiling" = yes; then
11181   samba_cv_HAVE_SECURE_MKSTEMP=cross
11182 else
11183   cat > conftest.$ac_ext <<EOF
11184 #line 11185 "configure"
11185 #include "confdefs.h"
11186 #include <stdlib.h>
11187 #include <sys/types.h>
11188 #include <sys/stat.h>
11189 #include <unistd.h>
11190 main() { 
11191   struct stat st;
11192   char tpl[20]="/tmp/test.XXXXXX"; 
11193   int fd = mkstemp(tpl); 
11194   if (fd == -1) exit(1);
11195   unlink(tpl);
11196   if (fstat(fd, &st) != 0) exit(1);
11197   if ((st.st_mode & 0777) != 0600) exit(1);
11198   exit(0);
11199 }
11200 EOF
11201 if { (eval echo configure:11202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11202 then
11203   samba_cv_HAVE_SECURE_MKSTEMP=yes
11204 else
11205   echo "configure: failed program was:" >&5
11206   cat conftest.$ac_ext >&5
11207   rm -fr conftest*
11208   samba_cv_HAVE_SECURE_MKSTEMP=no
11209 fi
11210 rm -fr conftest*
11211 fi
11212
11213 fi
11214
11215 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11216 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11217     cat >> confdefs.h <<\EOF
11218 #define HAVE_SECURE_MKSTEMP 1
11219 EOF
11220
11221 fi
11222
11223 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11224 echo "configure:11225: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11225 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11226   echo $ac_n "(cached) $ac_c" 1>&6
11227 else
11228   
11229 if test "$cross_compiling" = yes; then
11230   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11231 else
11232   cat > conftest.$ac_ext <<EOF
11233 #line 11234 "configure"
11234 #include "confdefs.h"
11235 #include <unistd.h>
11236 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11237 EOF
11238 if { (eval echo configure:11239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11239 then
11240   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11241 else
11242   echo "configure: failed program was:" >&5
11243   cat conftest.$ac_ext >&5
11244   rm -fr conftest*
11245   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11246 fi
11247 rm -fr conftest*
11248 fi
11249
11250 fi
11251
11252 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11253 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11254     cat >> confdefs.h <<\EOF
11255 #define SYSCONF_SC_NGROUPS_MAX 1
11256 EOF
11257
11258 fi
11259
11260 echo $ac_n "checking for root""... $ac_c" 1>&6
11261 echo "configure:11262: checking for root" >&5
11262 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11263   echo $ac_n "(cached) $ac_c" 1>&6
11264 else
11265   
11266 if test "$cross_compiling" = yes; then
11267   samba_cv_HAVE_ROOT=cross
11268 else
11269   cat > conftest.$ac_ext <<EOF
11270 #line 11271 "configure"
11271 #include "confdefs.h"
11272 main() { exit(getuid() != 0); }
11273 EOF
11274 if { (eval echo configure:11275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11275 then
11276   samba_cv_HAVE_ROOT=yes
11277 else
11278   echo "configure: failed program was:" >&5
11279   cat conftest.$ac_ext >&5
11280   rm -fr conftest*
11281   samba_cv_HAVE_ROOT=no
11282 fi
11283 rm -fr conftest*
11284 fi
11285
11286 fi
11287
11288 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11289 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11290     cat >> confdefs.h <<\EOF
11291 #define HAVE_ROOT 1
11292 EOF
11293
11294 else
11295     echo "configure: warning: running as non-root will disable some tests" 1>&2
11296 fi
11297
11298 ##################
11299 # look for a method of finding the list of network interfaces
11300 iface=no;
11301 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11302 echo "configure:11303: checking for iface AIX" >&5
11303 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11304   echo $ac_n "(cached) $ac_c" 1>&6
11305 else
11306   
11307 if test "$cross_compiling" = yes; then
11308   samba_cv_HAVE_IFACE_AIX=cross
11309 else
11310   cat > conftest.$ac_ext <<EOF
11311 #line 11312 "configure"
11312 #include "confdefs.h"
11313
11314 #define HAVE_IFACE_AIX 1
11315 #define AUTOCONF_TEST 1
11316 #include "confdefs.h"
11317 #include "${srcdir-.}/lib/interfaces.c"
11318 EOF
11319 if { (eval echo configure:11320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11320 then
11321   samba_cv_HAVE_IFACE_AIX=yes
11322 else
11323   echo "configure: failed program was:" >&5
11324   cat conftest.$ac_ext >&5
11325   rm -fr conftest*
11326   samba_cv_HAVE_IFACE_AIX=no
11327 fi
11328 rm -fr conftest*
11329 fi
11330
11331 fi
11332
11333 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11334 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11335     iface=yes;cat >> confdefs.h <<\EOF
11336 #define HAVE_IFACE_AIX 1
11337 EOF
11338
11339 fi
11340
11341 if test $iface = no; then
11342 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11343 echo "configure:11344: checking for iface ifconf" >&5
11344 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11345   echo $ac_n "(cached) $ac_c" 1>&6
11346 else
11347   
11348 if test "$cross_compiling" = yes; then
11349   samba_cv_HAVE_IFACE_IFCONF=cross
11350 else
11351   cat > conftest.$ac_ext <<EOF
11352 #line 11353 "configure"
11353 #include "confdefs.h"
11354
11355 #define HAVE_IFACE_IFCONF 1
11356 #define AUTOCONF_TEST 1
11357 #include "confdefs.h"
11358 #include "${srcdir-.}/lib/interfaces.c"
11359 EOF
11360 if { (eval echo configure:11361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11361 then
11362   samba_cv_HAVE_IFACE_IFCONF=yes
11363 else
11364   echo "configure: failed program was:" >&5
11365   cat conftest.$ac_ext >&5
11366   rm -fr conftest*
11367   samba_cv_HAVE_IFACE_IFCONF=no
11368 fi
11369 rm -fr conftest*
11370 fi
11371
11372 fi
11373
11374 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11375 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11376     iface=yes;cat >> confdefs.h <<\EOF
11377 #define HAVE_IFACE_IFCONF 1
11378 EOF
11379
11380 fi
11381 fi
11382
11383 if test $iface = no; then
11384 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11385 echo "configure:11386: checking for iface ifreq" >&5
11386 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11387   echo $ac_n "(cached) $ac_c" 1>&6
11388 else
11389   
11390 if test "$cross_compiling" = yes; then
11391   samba_cv_HAVE_IFACE_IFREQ=cross
11392 else
11393   cat > conftest.$ac_ext <<EOF
11394 #line 11395 "configure"
11395 #include "confdefs.h"
11396
11397 #define HAVE_IFACE_IFREQ 1
11398 #define AUTOCONF_TEST 1
11399 #include "confdefs.h"
11400 #include "${srcdir-.}/lib/interfaces.c"
11401 EOF
11402 if { (eval echo configure:11403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11403 then
11404   samba_cv_HAVE_IFACE_IFREQ=yes
11405 else
11406   echo "configure: failed program was:" >&5
11407   cat conftest.$ac_ext >&5
11408   rm -fr conftest*
11409   samba_cv_HAVE_IFACE_IFREQ=no
11410 fi
11411 rm -fr conftest*
11412 fi
11413
11414 fi
11415
11416 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11417 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11418     iface=yes;cat >> confdefs.h <<\EOF
11419 #define HAVE_IFACE_IFREQ 1
11420 EOF
11421
11422 fi
11423 fi
11424
11425
11426 ################################################
11427 # look for a method of setting the effective uid
11428 seteuid=no;
11429 if test $seteuid = no; then
11430 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11431 echo "configure:11432: checking for setresuid" >&5
11432 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11433   echo $ac_n "(cached) $ac_c" 1>&6
11434 else
11435   
11436 if test "$cross_compiling" = yes; then
11437   samba_cv_USE_SETRESUID=cross
11438 else
11439   cat > conftest.$ac_ext <<EOF
11440 #line 11441 "configure"
11441 #include "confdefs.h"
11442
11443 #define AUTOCONF_TEST 1
11444 #define USE_SETRESUID 1
11445 #include "confdefs.h"
11446 #include "${srcdir-.}/lib/util_sec.c"
11447 EOF
11448 if { (eval echo configure:11449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11449 then
11450   samba_cv_USE_SETRESUID=yes
11451 else
11452   echo "configure: failed program was:" >&5
11453   cat conftest.$ac_ext >&5
11454   rm -fr conftest*
11455   samba_cv_USE_SETRESUID=no
11456 fi
11457 rm -fr conftest*
11458 fi
11459
11460 fi
11461
11462 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11463 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11464     seteuid=yes;cat >> confdefs.h <<\EOF
11465 #define USE_SETRESUID 1
11466 EOF
11467
11468 fi
11469 fi
11470
11471
11472 if test $seteuid = no; then
11473 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11474 echo "configure:11475: checking for setreuid" >&5
11475 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11476   echo $ac_n "(cached) $ac_c" 1>&6
11477 else
11478   
11479 if test "$cross_compiling" = yes; then
11480   samba_cv_USE_SETREUID=cross
11481 else
11482   cat > conftest.$ac_ext <<EOF
11483 #line 11484 "configure"
11484 #include "confdefs.h"
11485
11486 #define AUTOCONF_TEST 1
11487 #define USE_SETREUID 1
11488 #include "confdefs.h"
11489 #include "${srcdir-.}/lib/util_sec.c"
11490 EOF
11491 if { (eval echo configure:11492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11492 then
11493   samba_cv_USE_SETREUID=yes
11494 else
11495   echo "configure: failed program was:" >&5
11496   cat conftest.$ac_ext >&5
11497   rm -fr conftest*
11498   samba_cv_USE_SETREUID=no
11499 fi
11500 rm -fr conftest*
11501 fi
11502
11503 fi
11504
11505 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11506 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11507     seteuid=yes;cat >> confdefs.h <<\EOF
11508 #define USE_SETREUID 1
11509 EOF
11510
11511 fi
11512 fi
11513
11514 if test $seteuid = no; then
11515 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11516 echo "configure:11517: checking for seteuid" >&5
11517 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11518   echo $ac_n "(cached) $ac_c" 1>&6
11519 else
11520   
11521 if test "$cross_compiling" = yes; then
11522   samba_cv_USE_SETEUID=cross
11523 else
11524   cat > conftest.$ac_ext <<EOF
11525 #line 11526 "configure"
11526 #include "confdefs.h"
11527
11528 #define AUTOCONF_TEST 1
11529 #define USE_SETEUID 1
11530 #include "confdefs.h"
11531 #include "${srcdir-.}/lib/util_sec.c"
11532 EOF
11533 if { (eval echo configure:11534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11534 then
11535   samba_cv_USE_SETEUID=yes
11536 else
11537   echo "configure: failed program was:" >&5
11538   cat conftest.$ac_ext >&5
11539   rm -fr conftest*
11540   samba_cv_USE_SETEUID=no
11541 fi
11542 rm -fr conftest*
11543 fi
11544
11545 fi
11546
11547 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11548 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11549     seteuid=yes;cat >> confdefs.h <<\EOF
11550 #define USE_SETEUID 1
11551 EOF
11552
11553 fi
11554 fi
11555
11556 if test $seteuid = no; then
11557 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11558 echo "configure:11559: checking for setuidx" >&5
11559 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11560   echo $ac_n "(cached) $ac_c" 1>&6
11561 else
11562   
11563 if test "$cross_compiling" = yes; then
11564   samba_cv_USE_SETUIDX=cross
11565 else
11566   cat > conftest.$ac_ext <<EOF
11567 #line 11568 "configure"
11568 #include "confdefs.h"
11569
11570 #define AUTOCONF_TEST 1
11571 #define USE_SETUIDX 1
11572 #include "confdefs.h"
11573 #include "${srcdir-.}/lib/util_sec.c"
11574 EOF
11575 if { (eval echo configure:11576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11576 then
11577   samba_cv_USE_SETUIDX=yes
11578 else
11579   echo "configure: failed program was:" >&5
11580   cat conftest.$ac_ext >&5
11581   rm -fr conftest*
11582   samba_cv_USE_SETUIDX=no
11583 fi
11584 rm -fr conftest*
11585 fi
11586
11587 fi
11588
11589 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11590 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11591     seteuid=yes;cat >> confdefs.h <<\EOF
11592 #define USE_SETUIDX 1
11593 EOF
11594
11595 fi
11596 fi
11597
11598
11599 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11600 echo "configure:11601: checking for working mmap" >&5
11601 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11602   echo $ac_n "(cached) $ac_c" 1>&6
11603 else
11604   
11605 if test "$cross_compiling" = yes; then
11606   samba_cv_HAVE_MMAP=cross
11607 else
11608   cat > conftest.$ac_ext <<EOF
11609 #line 11610 "configure"
11610 #include "confdefs.h"
11611 #include "${srcdir-.}/tests/shared_mmap.c"
11612 EOF
11613 if { (eval echo configure:11614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11614 then
11615   samba_cv_HAVE_MMAP=yes
11616 else
11617   echo "configure: failed program was:" >&5
11618   cat conftest.$ac_ext >&5
11619   rm -fr conftest*
11620   samba_cv_HAVE_MMAP=no
11621 fi
11622 rm -fr conftest*
11623 fi
11624
11625 fi
11626
11627 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11628 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11629     cat >> confdefs.h <<\EOF
11630 #define HAVE_MMAP 1
11631 EOF
11632
11633 fi
11634
11635 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11636 echo "configure:11637: checking for ftruncate needs root" >&5
11637 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11638   echo $ac_n "(cached) $ac_c" 1>&6
11639 else
11640   
11641 if test "$cross_compiling" = yes; then
11642   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11643 else
11644   cat > conftest.$ac_ext <<EOF
11645 #line 11646 "configure"
11646 #include "confdefs.h"
11647 #include "${srcdir-.}/tests/ftruncroot.c"
11648 EOF
11649 if { (eval echo configure:11650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11650 then
11651   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11652 else
11653   echo "configure: failed program was:" >&5
11654   cat conftest.$ac_ext >&5
11655   rm -fr conftest*
11656   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11657 fi
11658 rm -fr conftest*
11659 fi
11660
11661 fi
11662
11663 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11664 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11665     cat >> confdefs.h <<\EOF
11666 #define FTRUNCATE_NEEDS_ROOT 1
11667 EOF
11668
11669 fi
11670
11671 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11672 echo "configure:11673: checking for fcntl locking" >&5
11673 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11674   echo $ac_n "(cached) $ac_c" 1>&6
11675 else
11676   
11677 if test "$cross_compiling" = yes; then
11678   samba_cv_HAVE_FCNTL_LOCK=cross
11679 else
11680   cat > conftest.$ac_ext <<EOF
11681 #line 11682 "configure"
11682 #include "confdefs.h"
11683 #include "${srcdir-.}/tests/fcntl_lock.c"
11684 EOF
11685 if { (eval echo configure:11686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11686 then
11687   samba_cv_HAVE_FCNTL_LOCK=yes
11688 else
11689   echo "configure: failed program was:" >&5
11690   cat conftest.$ac_ext >&5
11691   rm -fr conftest*
11692   samba_cv_HAVE_FCNTL_LOCK=no
11693 fi
11694 rm -fr conftest*
11695 fi
11696
11697 fi
11698
11699 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11700 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11701     cat >> confdefs.h <<\EOF
11702 #define HAVE_FCNTL_LOCK 1
11703 EOF
11704
11705 fi
11706
11707 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11708 echo "configure:11709: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11709 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11710   echo $ac_n "(cached) $ac_c" 1>&6
11711 else
11712   
11713 if test "$cross_compiling" = yes; then
11714   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11715 else
11716   cat > conftest.$ac_ext <<EOF
11717 #line 11718 "configure"
11718 #include "confdefs.h"
11719 #include "${srcdir-.}/tests/fcntl_lock64.c"
11720 EOF
11721 if { (eval echo configure:11722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11722 then
11723   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11724 else
11725   echo "configure: failed program was:" >&5
11726   cat conftest.$ac_ext >&5
11727   rm -fr conftest*
11728   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11729 fi
11730 rm -fr conftest*
11731 fi
11732
11733 fi
11734
11735 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11736 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11737     cat >> confdefs.h <<\EOF
11738 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11739 EOF
11740
11741
11742 else
11743
11744
11745   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11746 echo "configure:11747: checking for 64 bit fcntl locking" >&5
11747 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11748   echo $ac_n "(cached) $ac_c" 1>&6
11749 else
11750   
11751   if test "$cross_compiling" = yes; then
11752   samba_cv_HAVE_STRUCT_FLOCK64=cross
11753 else
11754   cat > conftest.$ac_ext <<EOF
11755 #line 11756 "configure"
11756 #include "confdefs.h"
11757
11758 #if defined(HAVE_UNISTD_H)
11759 #include <unistd.h>
11760 #endif
11761 #include <stdio.h>
11762 #include <stdlib.h>
11763
11764 #ifdef HAVE_FCNTL_H
11765 #include <fcntl.h>
11766 #endif
11767
11768 #ifdef HAVE_SYS_FCNTL_H
11769 #include <sys/fcntl.h>
11770 #endif
11771 main() { struct flock64 fl64;
11772 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11773 exit(0);
11774 #else
11775 exit(1);
11776 #endif
11777 }
11778 EOF
11779 if { (eval echo configure:11780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11780 then
11781   samba_cv_HAVE_STRUCT_FLOCK64=yes
11782 else
11783   echo "configure: failed program was:" >&5
11784   cat conftest.$ac_ext >&5
11785   rm -fr conftest*
11786   samba_cv_HAVE_STRUCT_FLOCK64=no
11787 fi
11788 rm -fr conftest*
11789 fi
11790
11791 fi
11792
11793 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11794
11795   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11796       cat >> confdefs.h <<\EOF
11797 #define HAVE_STRUCT_FLOCK64 1
11798 EOF
11799
11800   fi
11801 fi
11802
11803 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11804 echo "configure:11805: checking for st_blocks in struct stat" >&5
11805 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11806   echo $ac_n "(cached) $ac_c" 1>&6
11807 else
11808   
11809 cat > conftest.$ac_ext <<EOF
11810 #line 11811 "configure"
11811 #include "confdefs.h"
11812 #include <sys/types.h>
11813 #include <sys/stat.h>
11814 #include <unistd.h>
11815 int main() {
11816 struct stat st;  st.st_blocks = 0;
11817 ; return 0; }
11818 EOF
11819 if { (eval echo configure:11820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11820   rm -rf conftest*
11821   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11822 else
11823   echo "configure: failed program was:" >&5
11824   cat conftest.$ac_ext >&5
11825   rm -rf conftest*
11826   samba_cv_HAVE_STAT_ST_BLOCKS=no
11827 fi
11828 rm -f conftest*
11829 fi
11830
11831 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11832 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11833     cat >> confdefs.h <<\EOF
11834 #define HAVE_STAT_ST_BLOCKS 1
11835 EOF
11836
11837 fi 
11838
11839 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
11840 echo "configure:11841: checking for st_blksize in struct stat" >&5
11841 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLKSIZE'+set}'`\" = set"; then
11842   echo $ac_n "(cached) $ac_c" 1>&6
11843 else
11844   
11845 cat > conftest.$ac_ext <<EOF
11846 #line 11847 "configure"
11847 #include "confdefs.h"
11848 #include <sys/types.h>
11849 #include <sys/stat.h>
11850 #include <unistd.h>
11851 int main() {
11852 struct stat st;  st.st_blksize = 0;
11853 ; return 0; }
11854 EOF
11855 if { (eval echo configure:11856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11856   rm -rf conftest*
11857   samba_cv_HAVE_STAT_ST_BLKSIZE=yes
11858 else
11859   echo "configure: failed program was:" >&5
11860   cat conftest.$ac_ext >&5
11861   rm -rf conftest*
11862   samba_cv_HAVE_STAT_ST_BLKSIZE=no
11863 fi
11864 rm -f conftest*
11865 fi
11866
11867 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLKSIZE" 1>&6
11868 if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then
11869     cat >> confdefs.h <<\EOF
11870 #define HAVE_STAT_ST_BLKSIZE 1
11871 EOF
11872
11873 fi
11874
11875 case "$host_os" in
11876 *linux*)
11877 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11878 echo "configure:11879: checking for broken RedHat 7.2 system header files" >&5
11879 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11880   echo $ac_n "(cached) $ac_c" 1>&6
11881 else
11882   
11883 cat > conftest.$ac_ext <<EOF
11884 #line 11885 "configure"
11885 #include "confdefs.h"
11886
11887 #ifdef HAVE_SYS_VFS_H
11888 #include <sys/vfs.h>
11889 #endif
11890 #ifdef HAVE_SYS_CAPABILITY_H
11891 #include <sys/capability.h>
11892 #endif
11893
11894 int main() {
11895 int i;
11896 ; return 0; }
11897 EOF
11898 if { (eval echo configure:11899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11899   rm -rf conftest*
11900   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11901 else
11902   echo "configure: failed program was:" >&5
11903   cat conftest.$ac_ext >&5
11904   rm -rf conftest*
11905   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11906 fi
11907 rm -f conftest*
11908 fi
11909
11910 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11911 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11912    cat >> confdefs.h <<\EOF
11913 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11914 EOF
11915
11916 fi
11917 ;;
11918 esac
11919
11920 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11921 echo "configure:11922: checking for broken nisplus include files" >&5
11922 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11923   echo $ac_n "(cached) $ac_c" 1>&6
11924 else
11925   
11926 cat > conftest.$ac_ext <<EOF
11927 #line 11928 "configure"
11928 #include "confdefs.h"
11929 #include <sys/acl.h>
11930 #if defined(HAVE_RPCSVC_NIS_H)
11931 #include <rpcsvc/nis.h>
11932 #endif
11933 int main() {
11934 int i;
11935 ; return 0; }
11936 EOF
11937 if { (eval echo configure:11938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11938   rm -rf conftest*
11939   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11940 else
11941   echo "configure: failed program was:" >&5
11942   cat conftest.$ac_ext >&5
11943   rm -rf conftest*
11944   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11945 fi
11946 rm -f conftest*
11947 fi
11948
11949 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11950 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11951     cat >> confdefs.h <<\EOF
11952 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11953 EOF
11954
11955 fi
11956
11957
11958 #################################################
11959 # check for smbwrapper support
11960 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11961 echo "configure:11962: checking whether to use smbwrapper" >&5
11962 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11963 if test "${with_smbwrapper+set}" = set; then
11964   withval="$with_smbwrapper"
11965    case "$withval" in
11966   yes)
11967     echo "$ac_t""yes" 1>&6
11968     cat >> confdefs.h <<\EOF
11969 #define WITH_SMBWRAPPER 1
11970 EOF
11971
11972         WRAPPROG="bin/smbsh"
11973         WRAP="bin/smbwrapper.$SHLIBEXT"
11974
11975         if test x$ATTEMPT_WRAP32_BUILD = x; then
11976                 WRAP32=""
11977         else
11978                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11979         fi
11980
11981 # Conditions under which smbwrapper should not be built.
11982
11983         if test x$PICFLAG = x; then
11984            echo No support for PIC code - disabling smbwrapper and smbsh
11985            WRAPPROG=""
11986            WRAP=""
11987            WRAP32=""
11988         elif test x$ac_cv_func_syscall = xno; then
11989            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11990            WRAPPROG=""
11991            WRAP=""
11992            WRAP32=""
11993         fi
11994     ;;
11995   *)
11996     echo "$ac_t""no" 1>&6
11997     ;;
11998   esac 
11999 else
12000   echo "$ac_t""no" 1>&6
12001
12002 fi
12003
12004
12005 #################################################
12006 # check for AFS clear-text auth support
12007 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
12008 echo "configure:12009: checking whether to use AFS clear-text auth" >&5
12009 # Check whether --with-afs or --without-afs was given.
12010 if test "${with_afs+set}" = set; then
12011   withval="$with_afs"
12012    case "$withval" in
12013   yes)
12014     echo "$ac_t""yes" 1>&6
12015     cat >> confdefs.h <<\EOF
12016 #define WITH_AFS 1
12017 EOF
12018
12019     ;;
12020   *)
12021     echo "$ac_t""no" 1>&6
12022     ;;
12023   esac 
12024 else
12025   echo "$ac_t""no" 1>&6
12026
12027 fi
12028
12029
12030
12031 #################################################
12032 # check for the DFS clear-text auth system
12033 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
12034 echo "configure:12035: checking whether to use DFS clear-text auth" >&5
12035 # Check whether --with-dfs or --without-dfs was given.
12036 if test "${with_dfs+set}" = set; then
12037   withval="$with_dfs"
12038    case "$withval" in
12039   yes)
12040     echo "$ac_t""yes" 1>&6
12041     cat >> confdefs.h <<\EOF
12042 #define WITH_DFS 1
12043 EOF
12044
12045     ;;
12046   *)
12047     echo "$ac_t""no" 1>&6
12048     ;;
12049   esac 
12050 else
12051   echo "$ac_t""no" 1>&6
12052
12053 fi
12054
12055
12056 #################################################
12057 # active directory support
12058
12059 with_ads_support=yes
12060 echo $ac_n "checking whether to use Active Directory""... $ac_c" 1>&6
12061 echo "configure:12062: checking whether to use Active Directory" >&5
12062
12063 # Check whether --with-ads or --without-ads was given.
12064 if test "${with_ads+set}" = set; then
12065   withval="$with_ads"
12066    case "$withval" in
12067     no)
12068         with_ads_support=no
12069         ;;
12070   esac 
12071 fi
12072
12073
12074 if test x"$with_ads_support" = x"yes"; then
12075    cat >> confdefs.h <<\EOF
12076 #define WITH_ADS 1
12077 EOF
12078
12079 fi
12080
12081 echo "$ac_t""$with_ads_support" 1>&6
12082
12083 FOUND_KRB5=no
12084 if test x"$with_ads_support" = x"yes"; then
12085
12086   #################################################
12087   # check for location of Kerberos 5 install
12088   echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
12089 echo "configure:12090: checking for kerberos 5 install path" >&5
12090   # Check whether --with-krb5 or --without-krb5 was given.
12091 if test "${with_krb5+set}" = set; then
12092   withval="$with_krb5"
12093    case "$withval" in
12094     no)
12095       echo "$ac_t""no" 1>&6
12096       ;;
12097     *)
12098       echo "$ac_t""yes" 1>&6
12099       LIBS="$LIBS -lkrb5"
12100       CFLAGS="$CFLAGS -I$withval/include"
12101       CPPFLAGS="$CPPFLAGS -I$withval/include"
12102       LDFLAGS="$LDFLAGS -L$withval/lib"
12103       FOUND_KRB5=yes
12104       ;;
12105     esac 
12106 else
12107   echo "$ac_t""no" 1>&6
12108   
12109 fi
12110
12111
12112
12113 if test x$FOUND_KRB5 = x"no"; then
12114 #################################################
12115 # see if this box has the RedHat location for kerberos
12116 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
12117 echo "configure:12118: checking for /usr/kerberos" >&5
12118 if test -d /usr/kerberos; then
12119     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
12120     CFLAGS="$CFLAGS -I/usr/kerberos/include"
12121     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
12122     echo "$ac_t""yes" 1>&6
12123 else
12124     echo "$ac_t""no" 1>&6
12125 fi
12126 fi
12127
12128
12129   # now check for krb5.h. Some systems have the libraries without the headers!
12130   # note that this check is done here to allow for different kerberos
12131   # include paths
12132   for ac_hdr in krb5.h
12133 do
12134 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12135 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12136 echo "configure:12137: checking for $ac_hdr" >&5
12137 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12138   echo $ac_n "(cached) $ac_c" 1>&6
12139 else
12140   cat > conftest.$ac_ext <<EOF
12141 #line 12142 "configure"
12142 #include "confdefs.h"
12143 #include <$ac_hdr>
12144 EOF
12145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12146 { (eval echo configure:12147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12148 if test -z "$ac_err"; then
12149   rm -rf conftest*
12150   eval "ac_cv_header_$ac_safe=yes"
12151 else
12152   echo "$ac_err" >&5
12153   echo "configure: failed program was:" >&5
12154   cat conftest.$ac_ext >&5
12155   rm -rf conftest*
12156   eval "ac_cv_header_$ac_safe=no"
12157 fi
12158 rm -f conftest*
12159 fi
12160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12161   echo "$ac_t""yes" 1>&6
12162     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12163   cat >> confdefs.h <<EOF
12164 #define $ac_tr_hdr 1
12165 EOF
12166  
12167 else
12168   echo "$ac_t""no" 1>&6
12169 fi
12170 done
12171
12172
12173   # now check for gssapi headers.  This is also done here to allow for
12174   # different kerberos include paths
12175   for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12176 do
12177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12179 echo "configure:12180: checking for $ac_hdr" >&5
12180 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12181   echo $ac_n "(cached) $ac_c" 1>&6
12182 else
12183   cat > conftest.$ac_ext <<EOF
12184 #line 12185 "configure"
12185 #include "confdefs.h"
12186 #include <$ac_hdr>
12187 EOF
12188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12189 { (eval echo configure:12190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12191 if test -z "$ac_err"; then
12192   rm -rf conftest*
12193   eval "ac_cv_header_$ac_safe=yes"
12194 else
12195   echo "$ac_err" >&5
12196   echo "configure: failed program was:" >&5
12197   cat conftest.$ac_ext >&5
12198   rm -rf conftest*
12199   eval "ac_cv_header_$ac_safe=no"
12200 fi
12201 rm -f conftest*
12202 fi
12203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12204   echo "$ac_t""yes" 1>&6
12205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12206   cat >> confdefs.h <<EOF
12207 #define $ac_tr_hdr 1
12208 EOF
12209  
12210 else
12211   echo "$ac_t""no" 1>&6
12212 fi
12213 done
12214
12215
12216   ##################################################################
12217   # we might need the k5crypto and com_err libraries on some systems
12218   echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12219 echo "configure:12220: checking for _et_list in -lcom_err" >&5
12220 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12221 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12222   echo $ac_n "(cached) $ac_c" 1>&6
12223 else
12224   ac_save_LIBS="$LIBS"
12225 LIBS="-lcom_err  $LIBS"
12226 cat > conftest.$ac_ext <<EOF
12227 #line 12228 "configure"
12228 #include "confdefs.h"
12229 /* Override any gcc2 internal prototype to avoid an error.  */
12230 /* We use char because int might match the return type of a gcc2
12231     builtin and then its argument prototype would still apply.  */
12232 char _et_list();
12233
12234 int main() {
12235 _et_list()
12236 ; return 0; }
12237 EOF
12238 if { (eval echo configure:12239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12239   rm -rf conftest*
12240   eval "ac_cv_lib_$ac_lib_var=yes"
12241 else
12242   echo "configure: failed program was:" >&5
12243   cat conftest.$ac_ext >&5
12244   rm -rf conftest*
12245   eval "ac_cv_lib_$ac_lib_var=no"
12246 fi
12247 rm -f conftest*
12248 LIBS="$ac_save_LIBS"
12249
12250 fi
12251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12252   echo "$ac_t""yes" 1>&6
12253   LIBS="$LIBS -lcom_err"
12254 else
12255   echo "$ac_t""no" 1>&6
12256 fi
12257
12258   echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12259 echo "configure:12260: checking for krb5_encrypt_data in -lk5crypto" >&5
12260 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12261 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12262   echo $ac_n "(cached) $ac_c" 1>&6
12263 else
12264   ac_save_LIBS="$LIBS"
12265 LIBS="-lk5crypto  $LIBS"
12266 cat > conftest.$ac_ext <<EOF
12267 #line 12268 "configure"
12268 #include "confdefs.h"
12269 /* Override any gcc2 internal prototype to avoid an error.  */
12270 /* We use char because int might match the return type of a gcc2
12271     builtin and then its argument prototype would still apply.  */
12272 char krb5_encrypt_data();
12273
12274 int main() {
12275 krb5_encrypt_data()
12276 ; return 0; }
12277 EOF
12278 if { (eval echo configure:12279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12279   rm -rf conftest*
12280   eval "ac_cv_lib_$ac_lib_var=yes"
12281 else
12282   echo "configure: failed program was:" >&5
12283   cat conftest.$ac_ext >&5
12284   rm -rf conftest*
12285   eval "ac_cv_lib_$ac_lib_var=no"
12286 fi
12287 rm -f conftest*
12288 LIBS="$ac_save_LIBS"
12289
12290 fi
12291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12292   echo "$ac_t""yes" 1>&6
12293   LIBS="$LIBS -lk5crypto"
12294 else
12295   echo "$ac_t""no" 1>&6
12296 fi
12297
12298
12299   ########################################################
12300   # now see if we can find the krb5 libs in standard paths
12301   # or as specified above
12302   echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12303 echo "configure:12304: checking for krb5_mk_req_extended in -lkrb5" >&5
12304 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12305 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12306   echo $ac_n "(cached) $ac_c" 1>&6
12307 else
12308   ac_save_LIBS="$LIBS"
12309 LIBS="-lkrb5  $LIBS"
12310 cat > conftest.$ac_ext <<EOF
12311 #line 12312 "configure"
12312 #include "confdefs.h"
12313 /* Override any gcc2 internal prototype to avoid an error.  */
12314 /* We use char because int might match the return type of a gcc2
12315     builtin and then its argument prototype would still apply.  */
12316 char krb5_mk_req_extended();
12317
12318 int main() {
12319 krb5_mk_req_extended()
12320 ; return 0; }
12321 EOF
12322 if { (eval echo configure:12323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12323   rm -rf conftest*
12324   eval "ac_cv_lib_$ac_lib_var=yes"
12325 else
12326   echo "configure: failed program was:" >&5
12327   cat conftest.$ac_ext >&5
12328   rm -rf conftest*
12329   eval "ac_cv_lib_$ac_lib_var=no"
12330 fi
12331 rm -f conftest*
12332 LIBS="$ac_save_LIBS"
12333
12334 fi
12335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12336   echo "$ac_t""yes" 1>&6
12337   LIBS="$LIBS -lkrb5";
12338         cat >> confdefs.h <<\EOF
12339 #define HAVE_KRB5 1
12340 EOF
12341
12342 else
12343   echo "$ac_t""no" 1>&6
12344 fi
12345
12346
12347   ########################################################
12348   # now see if we can find the gssapi libs in standard paths
12349   echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12350 echo "configure:12351: checking for gss_display_status in -lgssapi_krb5" >&5
12351 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12352 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12353   echo $ac_n "(cached) $ac_c" 1>&6
12354 else
12355   ac_save_LIBS="$LIBS"
12356 LIBS="-lgssapi_krb5  $LIBS"
12357 cat > conftest.$ac_ext <<EOF
12358 #line 12359 "configure"
12359 #include "confdefs.h"
12360 /* Override any gcc2 internal prototype to avoid an error.  */
12361 /* We use char because int might match the return type of a gcc2
12362     builtin and then its argument prototype would still apply.  */
12363 char gss_display_status();
12364
12365 int main() {
12366 gss_display_status()
12367 ; return 0; }
12368 EOF
12369 if { (eval echo configure:12370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12370   rm -rf conftest*
12371   eval "ac_cv_lib_$ac_lib_var=yes"
12372 else
12373   echo "configure: failed program was:" >&5
12374   cat conftest.$ac_ext >&5
12375   rm -rf conftest*
12376   eval "ac_cv_lib_$ac_lib_var=no"
12377 fi
12378 rm -f conftest*
12379 LIBS="$ac_save_LIBS"
12380
12381 fi
12382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12383   echo "$ac_t""yes" 1>&6
12384   LIBS="$LIBS -lgssapi_krb5";
12385         cat >> confdefs.h <<\EOF
12386 #define HAVE_GSSAPI 1
12387 EOF
12388
12389 else
12390   echo "$ac_t""no" 1>&6
12391 fi
12392
12393 fi
12394
12395 ########################################################
12396 # Compile with LDAP support?
12397
12398 with_ldap_support=yes
12399 echo $ac_n "checking whether to use LDAP""... $ac_c" 1>&6
12400 echo "configure:12401: checking whether to use LDAP" >&5
12401
12402 # Check whether --with-ldap or --without-ldap was given.
12403 if test "${with_ldap+set}" = set; then
12404   withval="$with_ldap"
12405    case "$withval" in
12406     no)
12407         with_ldap_support=no
12408         ;;
12409   esac 
12410 fi
12411
12412
12413 echo "$ac_t""$with_ldap_support" 1>&6
12414
12415 if test x"$with_ldap_support" = x"yes"; then
12416
12417   ##################################################################
12418   # we might need the lber lib on some systems. To avoid link errors
12419   # this test must be before the libldap test
12420   echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12421 echo "configure:12422: checking for ber_scanf in -llber" >&5
12422 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12423 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12424   echo $ac_n "(cached) $ac_c" 1>&6
12425 else
12426   ac_save_LIBS="$LIBS"
12427 LIBS="-llber  $LIBS"
12428 cat > conftest.$ac_ext <<EOF
12429 #line 12430 "configure"
12430 #include "confdefs.h"
12431 /* Override any gcc2 internal prototype to avoid an error.  */
12432 /* We use char because int might match the return type of a gcc2
12433     builtin and then its argument prototype would still apply.  */
12434 char ber_scanf();
12435
12436 int main() {
12437 ber_scanf()
12438 ; return 0; }
12439 EOF
12440 if { (eval echo configure:12441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12441   rm -rf conftest*
12442   eval "ac_cv_lib_$ac_lib_var=yes"
12443 else
12444   echo "configure: failed program was:" >&5
12445   cat conftest.$ac_ext >&5
12446   rm -rf conftest*
12447   eval "ac_cv_lib_$ac_lib_var=no"
12448 fi
12449 rm -f conftest*
12450 LIBS="$ac_save_LIBS"
12451
12452 fi
12453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12454   echo "$ac_t""yes" 1>&6
12455   LIBS="$LIBS -llber"
12456 else
12457   echo "$ac_t""no" 1>&6
12458 fi
12459
12460
12461   ########################################################
12462   # now see if we can find the ldap libs in standard paths
12463   if test x$have_ldap != xyes; then
12464   echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12465 echo "configure:12466: checking for ldap_domain2hostlist in -lldap" >&5
12466 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12467 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12468   echo $ac_n "(cached) $ac_c" 1>&6
12469 else
12470   ac_save_LIBS="$LIBS"
12471 LIBS="-lldap  $LIBS"
12472 cat > conftest.$ac_ext <<EOF
12473 #line 12474 "configure"
12474 #include "confdefs.h"
12475 /* Override any gcc2 internal prototype to avoid an error.  */
12476 /* We use char because int might match the return type of a gcc2
12477     builtin and then its argument prototype would still apply.  */
12478 char ldap_domain2hostlist();
12479
12480 int main() {
12481 ldap_domain2hostlist()
12482 ; return 0; }
12483 EOF
12484 if { (eval echo configure:12485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12485   rm -rf conftest*
12486   eval "ac_cv_lib_$ac_lib_var=yes"
12487 else
12488   echo "configure: failed program was:" >&5
12489   cat conftest.$ac_ext >&5
12490   rm -rf conftest*
12491   eval "ac_cv_lib_$ac_lib_var=no"
12492 fi
12493 rm -f conftest*
12494 LIBS="$ac_save_LIBS"
12495
12496 fi
12497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12498   echo "$ac_t""yes" 1>&6
12499   LIBS="$LIBS -lldap";
12500         cat >> confdefs.h <<\EOF
12501 #define HAVE_LDAP 1
12502 EOF
12503
12504 else
12505   echo "$ac_t""no" 1>&6
12506 fi
12507
12508
12509         ########################################################
12510         # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
12511         # Check found in pam_ldap 145.
12512         for ac_func in ldap_set_rebind_proc
12513 do
12514 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12515 echo "configure:12516: checking for $ac_func" >&5
12516 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12517   echo $ac_n "(cached) $ac_c" 1>&6
12518 else
12519   cat > conftest.$ac_ext <<EOF
12520 #line 12521 "configure"
12521 #include "confdefs.h"
12522 /* System header to define __stub macros and hopefully few prototypes,
12523     which can conflict with char $ac_func(); below.  */
12524 #include <assert.h>
12525 /* Override any gcc2 internal prototype to avoid an error.  */
12526 /* We use char because int might match the return type of a gcc2
12527     builtin and then its argument prototype would still apply.  */
12528 char $ac_func();
12529
12530 int main() {
12531
12532 /* The GNU C library defines this for functions which it implements
12533     to always fail with ENOSYS.  Some functions are actually named
12534     something starting with __ and the normal name is an alias.  */
12535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12536 choke me
12537 #else
12538 $ac_func();
12539 #endif
12540
12541 ; return 0; }
12542 EOF
12543 if { (eval echo configure:12544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12544   rm -rf conftest*
12545   eval "ac_cv_func_$ac_func=yes"
12546 else
12547   echo "configure: failed program was:" >&5
12548   cat conftest.$ac_ext >&5
12549   rm -rf conftest*
12550   eval "ac_cv_func_$ac_func=no"
12551 fi
12552 rm -f conftest*
12553 fi
12554
12555 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12556   echo "$ac_t""yes" 1>&6
12557     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12558   cat >> confdefs.h <<EOF
12559 #define $ac_tr_func 1
12560 EOF
12561  
12562 else
12563   echo "$ac_t""no" 1>&6
12564 fi
12565 done
12566
12567         echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6
12568 echo "configure:12569: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
12569 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then
12570   echo $ac_n "(cached) $ac_c" 1>&6
12571 else
12572   
12573         cat > conftest.$ac_ext <<EOF
12574 #line 12575 "configure"
12575 #include "confdefs.h"
12576
12577         #include <lber.h>
12578         #include <ldap.h>
12579 int main() {
12580 ldap_set_rebind_proc(0, 0, 0);
12581 ; return 0; }
12582 EOF
12583 if { (eval echo configure:12584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12584   rm -rf conftest*
12585   pam_ldap_cv_ldap_set_rebind_proc=3
12586 else
12587   echo "configure: failed program was:" >&5
12588   cat conftest.$ac_ext >&5
12589   rm -rf conftest*
12590   pam_ldap_cv_ldap_set_rebind_proc=2
12591 fi
12592 rm -f conftest* 
12593 fi
12594
12595 echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6
12596         cat >> confdefs.h <<EOF
12597 #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc
12598 EOF
12599
12600   fi
12601 fi
12602
12603 #################################################
12604 # check for automount support
12605 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12606 echo "configure:12607: checking whether to use AUTOMOUNT" >&5
12607 # Check whether --with-automount or --without-automount was given.
12608 if test "${with_automount+set}" = set; then
12609   withval="$with_automount"
12610    case "$withval" in
12611   yes)
12612     echo "$ac_t""yes" 1>&6
12613     cat >> confdefs.h <<\EOF
12614 #define WITH_AUTOMOUNT 1
12615 EOF
12616
12617     ;;
12618   *)
12619     echo "$ac_t""no" 1>&6
12620     ;;
12621   esac 
12622 else
12623   echo "$ac_t""no" 1>&6
12624
12625 fi
12626
12627
12628 #################################################
12629 # check for smbmount support
12630 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12631 echo "configure:12632: checking whether to use SMBMOUNT" >&5
12632 # Check whether --with-smbmount or --without-smbmount was given.
12633 if test "${with_smbmount+set}" = set; then
12634   withval="$with_smbmount"
12635    case "$withval" in
12636   yes)
12637         case "$host_os" in
12638         *linux*)
12639                 echo "$ac_t""yes" 1>&6
12640                 cat >> confdefs.h <<\EOF
12641 #define WITH_SMBMOUNT 1
12642 EOF
12643
12644                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12645                 ;;
12646         *)
12647                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12648                 ;;
12649         esac
12650     ;;
12651   *)
12652     echo "$ac_t""no" 1>&6
12653     MPROGS=
12654     ;;
12655   esac 
12656 else
12657   echo "$ac_t""no" 1>&6
12658   MPROGS=
12659
12660 fi
12661
12662
12663
12664 #################################################
12665 # check for a PAM clear-text auth, accounts, password and session support
12666 with_pam_for_crypt=no
12667 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12668 echo "configure:12669: checking whether to use PAM" >&5
12669 # Check whether --with-pam or --without-pam was given.
12670 if test "${with_pam+set}" = set; then
12671   withval="$with_pam"
12672    case "$withval" in
12673   yes)
12674     echo "$ac_t""yes" 1>&6
12675     cat >> confdefs.h <<\EOF
12676 #define WITH_PAM 1
12677 EOF
12678
12679     AUTHLIBS="$AUTHLIBS -lpam"
12680     with_pam_for_crypt=yes
12681     ;;
12682   *)
12683     echo "$ac_t""no" 1>&6
12684     ;;
12685   esac 
12686 else
12687   echo "$ac_t""no" 1>&6
12688
12689 fi
12690
12691
12692 # we can't build a pam module if we don't have pam.
12693 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12694 echo "configure:12695: checking for pam_get_data in -lpam" >&5
12695 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12696 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12697   echo $ac_n "(cached) $ac_c" 1>&6
12698 else
12699   ac_save_LIBS="$LIBS"
12700 LIBS="-lpam  $LIBS"
12701 cat > conftest.$ac_ext <<EOF
12702 #line 12703 "configure"
12703 #include "confdefs.h"
12704 /* Override any gcc2 internal prototype to avoid an error.  */
12705 /* We use char because int might match the return type of a gcc2
12706     builtin and then its argument prototype would still apply.  */
12707 char pam_get_data();
12708
12709 int main() {
12710 pam_get_data()
12711 ; return 0; }
12712 EOF
12713 if { (eval echo configure:12714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12714   rm -rf conftest*
12715   eval "ac_cv_lib_$ac_lib_var=yes"
12716 else
12717   echo "configure: failed program was:" >&5
12718   cat conftest.$ac_ext >&5
12719   rm -rf conftest*
12720   eval "ac_cv_lib_$ac_lib_var=no"
12721 fi
12722 rm -f conftest*
12723 LIBS="$ac_save_LIBS"
12724
12725 fi
12726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12727   echo "$ac_t""yes" 1>&6
12728   cat >> confdefs.h <<\EOF
12729 #define HAVE_LIBPAM 1
12730 EOF
12731
12732 else
12733   echo "$ac_t""no" 1>&6
12734 fi
12735
12736
12737 #################################################
12738 # check for pam_smbpass support
12739 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12740 echo "configure:12741: checking whether to use pam_smbpass" >&5
12741 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12742 if test "${with_pam_smbpass+set}" = set; then
12743   withval="$with_pam_smbpass"
12744    case "$withval" in
12745   yes)
12746     echo "$ac_t""yes" 1>&6
12747
12748 # Conditions under which pam_smbpass should not be built.
12749
12750        if test x$PICFLAG = x; then
12751           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12752           PAM_MOD=""
12753        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12754           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12755           PAM_MOD=""
12756        else
12757           PAM_MOD="bin/pam_smbpass.so"
12758        fi
12759     ;;
12760   *)
12761     echo "$ac_t""no" 1>&6
12762     ;;
12763   esac 
12764 else
12765   echo "$ac_t""no" 1>&6
12766
12767 fi
12768
12769
12770
12771 ###############################################
12772 # test for where we get crypt() from, but only
12773 # if not using PAM
12774 if test x"$with_pam_for_crypt" = x"no"; then
12775 for ac_func in crypt
12776 do
12777 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12778 echo "configure:12779: checking for $ac_func" >&5
12779 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12780   echo $ac_n "(cached) $ac_c" 1>&6
12781 else
12782   cat > conftest.$ac_ext <<EOF
12783 #line 12784 "configure"
12784 #include "confdefs.h"
12785 /* System header to define __stub macros and hopefully few prototypes,
12786     which can conflict with char $ac_func(); below.  */
12787 #include <assert.h>
12788 /* Override any gcc2 internal prototype to avoid an error.  */
12789 /* We use char because int might match the return type of a gcc2
12790     builtin and then its argument prototype would still apply.  */
12791 char $ac_func();
12792
12793 int main() {
12794
12795 /* The GNU C library defines this for functions which it implements
12796     to always fail with ENOSYS.  Some functions are actually named
12797     something starting with __ and the normal name is an alias.  */
12798 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12799 choke me
12800 #else
12801 $ac_func();
12802 #endif
12803
12804 ; return 0; }
12805 EOF
12806 if { (eval echo configure:12807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12807   rm -rf conftest*
12808   eval "ac_cv_func_$ac_func=yes"
12809 else
12810   echo "configure: failed program was:" >&5
12811   cat conftest.$ac_ext >&5
12812   rm -rf conftest*
12813   eval "ac_cv_func_$ac_func=no"
12814 fi
12815 rm -f conftest*
12816 fi
12817
12818 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12819   echo "$ac_t""yes" 1>&6
12820     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12821   cat >> confdefs.h <<EOF
12822 #define $ac_tr_func 1
12823 EOF
12824  
12825 else
12826   echo "$ac_t""no" 1>&6
12827 fi
12828 done
12829
12830 if test x"$ac_cv_func_crypt" = x"no"; then
12831     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12832 echo "configure:12833: checking for crypt in -lcrypt" >&5
12833 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12834 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12835   echo $ac_n "(cached) $ac_c" 1>&6
12836 else
12837   ac_save_LIBS="$LIBS"
12838 LIBS="-lcrypt  $LIBS"
12839 cat > conftest.$ac_ext <<EOF
12840 #line 12841 "configure"
12841 #include "confdefs.h"
12842 /* Override any gcc2 internal prototype to avoid an error.  */
12843 /* We use char because int might match the return type of a gcc2
12844     builtin and then its argument prototype would still apply.  */
12845 char crypt();
12846
12847 int main() {
12848 crypt()
12849 ; return 0; }
12850 EOF
12851 if { (eval echo configure:12852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12852   rm -rf conftest*
12853   eval "ac_cv_lib_$ac_lib_var=yes"
12854 else
12855   echo "configure: failed program was:" >&5
12856   cat conftest.$ac_ext >&5
12857   rm -rf conftest*
12858   eval "ac_cv_lib_$ac_lib_var=no"
12859 fi
12860 rm -f conftest*
12861 LIBS="$ac_save_LIBS"
12862
12863 fi
12864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12865   echo "$ac_t""yes" 1>&6
12866   AUTHLIBS="$AUTHLIBS -lcrypt";
12867         cat >> confdefs.h <<\EOF
12868 #define HAVE_CRYPT 1
12869 EOF
12870
12871 else
12872   echo "$ac_t""no" 1>&6
12873 fi
12874
12875 fi
12876 fi
12877
12878 ##
12879 ## moved after the check for -lcrypt in order to
12880 ## ensure that the necessary libraries are included
12881 ## check checking for truncated salt.  Wrapped by the
12882 ## $with_pam_for_crypt variable as above   --jerry
12883 ##
12884 if test $with_pam_for_crypt = no; then
12885 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12886 echo "configure:12887: checking for a crypt that needs truncated salt" >&5
12887 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12888   echo $ac_n "(cached) $ac_c" 1>&6
12889 else
12890   
12891 crypt_LIBS="$LIBS"
12892 LIBS="$AUTHLIBS $LIBS"
12893 if test "$cross_compiling" = yes; then
12894   samba_cv_HAVE_TRUNCATED_SALT=cross
12895 else
12896   cat > conftest.$ac_ext <<EOF
12897 #line 12898 "configure"
12898 #include "confdefs.h"
12899 #include "${srcdir-.}/tests/crypttest.c"
12900 EOF
12901 if { (eval echo configure:12902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12902 then
12903   samba_cv_HAVE_TRUNCATED_SALT=no
12904 else
12905   echo "configure: failed program was:" >&5
12906   cat conftest.$ac_ext >&5
12907   rm -fr conftest*
12908   samba_cv_HAVE_TRUNCATED_SALT=yes
12909 fi
12910 rm -fr conftest*
12911 fi
12912
12913 LIBS="$crypt_LIBS"
12914 fi
12915
12916 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12917 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12918         cat >> confdefs.h <<\EOF
12919 #define HAVE_TRUNCATED_SALT 1
12920 EOF
12921
12922 fi
12923 fi
12924
12925 # New experimental SAM system
12926
12927 echo $ac_n "checking whether to build the new (experimental) SAM database""... $ac_c" 1>&6
12928 echo "configure:12929: checking whether to build the new (experimental) SAM database" >&5
12929 # Check whether --with-sam or --without-sam was given.
12930 if test "${with_sam+set}" = set; then
12931   withval="$with_sam"
12932    case "$withval" in
12933   yes)
12934     echo "$ac_t""yes" 1>&6
12935     cat >> confdefs.h <<\EOF
12936 #define WITH_SAM 1
12937 EOF
12938
12939     ;;
12940   *)
12941     echo "$ac_t""no" 1>&6
12942     ;;
12943   esac 
12944 else
12945   echo "$ac_t""no" 1>&6
12946
12947 fi
12948
12949
12950
12951 ########################################################################################
12952 ##
12953 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12954 ##
12955 ########################################################################################
12956
12957 #################################################
12958 # check for a LDAP password database configuration backwards compatibility
12959 echo $ac_n "checking whether to use LDAP SAM 2.2 compatible configuration""... $ac_c" 1>&6
12960 echo "configure:12961: checking whether to use LDAP SAM 2.2 compatible configuration" >&5
12961 # Check whether --with-ldapsam or --without-ldapsam was given.
12962 if test "${with_ldapsam+set}" = set; then
12963   withval="$with_ldapsam"
12964    case "$withval" in
12965   yes)
12966     echo "$ac_t""yes" 1>&6
12967     cat >> confdefs.h <<\EOF
12968 #define WITH_LDAP_SAMCONFIG 1
12969 EOF
12970
12971     ;;
12972   *)
12973     echo "$ac_t""no" 1>&6
12974     ;;
12975   esac 
12976 else
12977   echo "$ac_t""no" 1>&6
12978
12979 fi
12980
12981
12982 #################################################
12983 # check for a TDB password database
12984 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12985 echo "configure:12986: checking whether to use TDB SAM database" >&5
12986 # Check whether --with-tdbsam or --without-tdbsam was given.
12987 if test "${with_tdbsam+set}" = set; then
12988   withval="$with_tdbsam"
12989    case "$withval" in
12990   yes)
12991     echo "$ac_t""yes" 1>&6
12992     cat >> confdefs.h <<\EOF
12993 #define WITH_TDB_SAM 1
12994 EOF
12995
12996     ;;
12997   *)
12998     echo "$ac_t""no" 1>&6
12999     ;;
13000   esac 
13001 else
13002   echo "$ac_t""no" 1>&6
13003
13004 fi
13005
13006
13007 #################################################
13008 # check for a NISPLUS password database
13009 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
13010 echo "configure:13011: checking whether to use NISPLUS SAM database" >&5
13011 # Check whether --with-nisplussam or --without-nisplussam was given.
13012 if test "${with_nisplussam+set}" = set; then
13013   withval="$with_nisplussam"
13014    case "$withval" in
13015   yes)
13016     echo "$ac_t""yes" 1>&6
13017     cat >> confdefs.h <<\EOF
13018 #define WITH_NISPLUS_SAM 1
13019 EOF
13020
13021     ;;
13022   *)
13023     echo "$ac_t""no" 1>&6
13024     ;;
13025   esac 
13026 else
13027   echo "$ac_t""no" 1>&6
13028
13029 fi
13030
13031
13032 ########################################################################################
13033 ##
13034 ## END OF TESTS FOR SAM BACKENDS.  
13035 ##
13036 ########################################################################################
13037
13038 #################################################
13039 # check for a NISPLUS_HOME support 
13040 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
13041 echo "configure:13042: checking whether to use NISPLUS_HOME" >&5
13042 # Check whether --with-nisplus-home or --without-nisplus-home was given.
13043 if test "${with_nisplus_home+set}" = set; then
13044   withval="$with_nisplus_home"
13045    case "$withval" in
13046   yes)
13047     echo "$ac_t""yes" 1>&6
13048     cat >> confdefs.h <<\EOF
13049 #define WITH_NISPLUS_HOME 1
13050 EOF
13051
13052     ;;
13053   *)
13054     echo "$ac_t""no" 1>&6
13055     ;;
13056   esac 
13057 else
13058   echo "$ac_t""no" 1>&6
13059
13060 fi
13061
13062
13063 #################################################
13064 # check for syslog logging
13065 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
13066 echo "configure:13067: checking whether to use syslog logging" >&5
13067 # Check whether --with-syslog or --without-syslog was given.
13068 if test "${with_syslog+set}" = set; then
13069   withval="$with_syslog"
13070    case "$withval" in
13071   yes)
13072     echo "$ac_t""yes" 1>&6
13073     cat >> confdefs.h <<\EOF
13074 #define WITH_SYSLOG 1
13075 EOF
13076
13077     ;;
13078   *)
13079     echo "$ac_t""no" 1>&6
13080     ;;
13081   esac 
13082 else
13083   echo "$ac_t""no" 1>&6
13084
13085 fi
13086
13087
13088 #################################################
13089 # check for a shared memory profiling support
13090 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
13091 echo "configure:13092: checking whether to use profiling" >&5
13092 # Check whether --with-profiling-data or --without-profiling-data was given.
13093 if test "${with_profiling_data+set}" = set; then
13094   withval="$with_profiling_data"
13095    case "$withval" in
13096   yes)
13097     echo "$ac_t""yes" 1>&6
13098     cat >> confdefs.h <<\EOF
13099 #define WITH_PROFILE 1
13100 EOF
13101
13102     ;;
13103   *)
13104     echo "$ac_t""no" 1>&6
13105     ;;
13106   esac 
13107 else
13108   echo "$ac_t""no" 1>&6
13109
13110 fi
13111
13112
13113
13114 #################################################
13115 # check for experimental disk-quotas support
13116 QUOTAOBJS=smbd/noquotas.o
13117
13118 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
13119 echo "configure:13120: checking whether to support disk-quotas" >&5
13120 # Check whether --with-quotas or --without-quotas was given.
13121 if test "${with_quotas+set}" = set; then
13122   withval="$with_quotas"
13123    case "$withval" in
13124   yes)
13125     echo "$ac_t""yes" 1>&6
13126     case "$host_os" in
13127       *linux*)
13128         # Check for kernel 2.4.x quota braindamage...
13129         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
13130 echo "configure:13131: checking for linux 2.4.x quota braindamage.." >&5
13131 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
13132   echo $ac_n "(cached) $ac_c" 1>&6
13133 else
13134   
13135         cat > conftest.$ac_ext <<EOF
13136 #line 13137 "configure"
13137 #include "confdefs.h"
13138 #include <stdio.h>
13139 #include <sys/types.h>
13140 #include <asm/types.h>
13141 #include <linux/quota.h>
13142 #include <mntent.h>
13143 #include <linux/unistd.h>
13144 int main() {
13145 struct mem_dqblk D;
13146 ; return 0; }
13147 EOF
13148 if { (eval echo configure:13149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13149   rm -rf conftest*
13150   samba_cv_linux_2_4_quota_braindamage=yes
13151 else
13152   echo "configure: failed program was:" >&5
13153   cat conftest.$ac_ext >&5
13154   rm -rf conftest*
13155   samba_cv_linux_2_4_quota_braindamage=no
13156 fi
13157 rm -f conftest*
13158 fi
13159
13160 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
13161 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
13162         cat >> confdefs.h <<\EOF
13163 #define LINUX_QUOTAS_2 1
13164 EOF
13165
13166 else
13167         cat >> confdefs.h <<\EOF
13168 #define LINUX_QUOTAS_1 1
13169 EOF
13170
13171 fi
13172         ;;
13173       *)
13174         ;;
13175     esac
13176     QUOTAOBJS=smbd/quotas.o
13177     cat >> confdefs.h <<\EOF
13178 #define WITH_QUOTAS 1
13179 EOF
13180
13181     ;;
13182   *)
13183     echo "$ac_t""no" 1>&6
13184     ;;
13185   esac 
13186 else
13187   echo "$ac_t""no" 1>&6
13188
13189 fi
13190
13191
13192
13193 #################################################
13194 # check for experimental utmp accounting
13195
13196 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
13197 echo "configure:13198: checking whether to support utmp accounting" >&5
13198 # Check whether --with-utmp or --without-utmp was given.
13199 if test "${with_utmp+set}" = set; then
13200   withval="$with_utmp"
13201    case "$withval" in
13202   yes)
13203     echo "$ac_t""yes" 1>&6
13204     cat >> confdefs.h <<\EOF
13205 #define WITH_UTMP 1
13206 EOF
13207
13208     ;;
13209   *)
13210     echo "$ac_t""no" 1>&6
13211     ;;
13212   esac 
13213 else
13214   echo "$ac_t""no" 1>&6
13215
13216 fi
13217
13218
13219 #################################################
13220 # choose native language(s) of man pages
13221 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13222 echo "configure:13223: checking chosen man pages' language(s)" >&5
13223 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13224 if test "${with_manpages_langs+set}" = set; then
13225   withval="$with_manpages_langs"
13226    case "$withval" in
13227   yes|no)
13228     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13229     manlangs="en"
13230   ;;
13231   *)
13232     manlangs="$withval"
13233   ;;
13234   esac
13235
13236   echo "$ac_t""$manlangs" 1>&6
13237   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13238   
13239 else
13240   manlangs="en"
13241   echo "$ac_t""$manlangs" 1>&6
13242   
13243
13244 fi
13245
13246
13247 #################################################
13248 # should we build libsmbclient?
13249
13250 LIBSMBCLIENT_SHARED=
13251 LIBSMBCLIENT=
13252 echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
13253 echo "configure:13254: checking whether to build the libsmbclient shared library" >&5
13254 # Check whether --with-libsmbclient or --without-libsmbclient was given.
13255 if test "${with_libsmbclient+set}" = set; then
13256   withval="$with_libsmbclient"
13257    case "$withval" in
13258   no) 
13259      echo "$ac_t""no" 1>&6
13260      ;;
13261   *)
13262      if test $BLDSHARED = true; then
13263         LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
13264         LIBSMBCLIENT=libsmbclient
13265         echo "$ac_t""yes" 1>&6
13266      else
13267         echo "$ac_t""no shared library support" 1>&6
13268      fi
13269      ;;
13270   esac 
13271 else
13272   echo "$ac_t""yes" 1>&6
13273
13274 fi
13275
13276
13277
13278 #################################################
13279 # these tests are taken from the GNU fileutils package
13280 echo "checking how to get filesystem space usage" 1>&6
13281 echo "configure:13282: checking how to get filesystem space usage" >&5
13282 space=no
13283
13284 # Test for statvfs64.
13285 if test $space = no; then
13286   # SVR4
13287   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13288 echo "configure:13289: checking statvfs64 function (SVR4)" >&5
13289 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13290   echo $ac_n "(cached) $ac_c" 1>&6
13291 else
13292   if test "$cross_compiling" = yes; then
13293   fu_cv_sys_stat_statvfs64=cross
13294 else
13295   cat > conftest.$ac_ext <<EOF
13296 #line 13297 "configure"
13297 #include "confdefs.h"
13298
13299 #if defined(HAVE_UNISTD_H)
13300 #include <unistd.h>
13301 #endif
13302 #include <sys/types.h>
13303 #include <sys/statvfs.h>
13304   main ()
13305   {
13306     struct statvfs64 fsd;
13307     exit (statvfs64 (".", &fsd));
13308   }
13309 EOF
13310 if { (eval echo configure:13311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13311 then
13312   fu_cv_sys_stat_statvfs64=yes
13313 else
13314   echo "configure: failed program was:" >&5
13315   cat conftest.$ac_ext >&5
13316   rm -fr conftest*
13317   fu_cv_sys_stat_statvfs64=no
13318 fi
13319 rm -fr conftest*
13320 fi
13321
13322 fi
13323
13324 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13325   if test $fu_cv_sys_stat_statvfs64 = yes; then
13326     space=yes
13327     cat >> confdefs.h <<\EOF
13328 #define STAT_STATVFS64 1
13329 EOF
13330
13331   fi
13332 fi
13333
13334 # Perform only the link test since it seems there are no variants of the
13335 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13336 # because that got a false positive on SCO OSR5.  Adding the declaration
13337 # of a `struct statvfs' causes this test to fail (as it should) on such
13338 # systems.  That system is reported to work fine with STAT_STATFS4 which
13339 # is what it gets when this test fails.
13340 if test $space = no; then
13341   # SVR4
13342   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13343 echo "configure:13344: checking statvfs function (SVR4)" >&5
13344 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13345   echo $ac_n "(cached) $ac_c" 1>&6
13346 else
13347   cat > conftest.$ac_ext <<EOF
13348 #line 13349 "configure"
13349 #include "confdefs.h"
13350 #include <sys/types.h>
13351 #include <sys/statvfs.h>
13352 int main() {
13353 struct statvfs fsd; statvfs (0, &fsd);
13354 ; return 0; }
13355 EOF
13356 if { (eval echo configure:13357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13357   rm -rf conftest*
13358   fu_cv_sys_stat_statvfs=yes
13359 else
13360   echo "configure: failed program was:" >&5
13361   cat conftest.$ac_ext >&5
13362   rm -rf conftest*
13363   fu_cv_sys_stat_statvfs=no
13364 fi
13365 rm -f conftest*
13366 fi
13367
13368 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13369   if test $fu_cv_sys_stat_statvfs = yes; then
13370     space=yes
13371     cat >> confdefs.h <<\EOF
13372 #define STAT_STATVFS 1
13373 EOF
13374
13375   fi
13376 fi
13377
13378 if test $space = no; then
13379   # DEC Alpha running OSF/1
13380   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13381 echo "configure:13382: checking for 3-argument statfs function (DEC OSF/1)" >&5
13382   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13383   echo $ac_n "(cached) $ac_c" 1>&6
13384 else
13385   if test "$cross_compiling" = yes; then
13386   fu_cv_sys_stat_statfs3_osf1=no
13387 else
13388   cat > conftest.$ac_ext <<EOF
13389 #line 13390 "configure"
13390 #include "confdefs.h"
13391
13392 #include <sys/param.h>
13393 #include <sys/types.h>
13394 #include <sys/mount.h>
13395   main ()
13396   {
13397     struct statfs fsd;
13398     fsd.f_fsize = 0;
13399     exit (statfs (".", &fsd, sizeof (struct statfs)));
13400   }
13401 EOF
13402 if { (eval echo configure:13403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13403 then
13404   fu_cv_sys_stat_statfs3_osf1=yes
13405 else
13406   echo "configure: failed program was:" >&5
13407   cat conftest.$ac_ext >&5
13408   rm -fr conftest*
13409   fu_cv_sys_stat_statfs3_osf1=no
13410 fi
13411 rm -fr conftest*
13412 fi
13413
13414 fi
13415
13416   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13417   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13418     space=yes
13419     cat >> confdefs.h <<\EOF
13420 #define STAT_STATFS3_OSF1 1
13421 EOF
13422
13423   fi
13424 fi
13425
13426 if test $space = no; then
13427 # AIX
13428   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13429 echo "configure:13430: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13430   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13431   echo $ac_n "(cached) $ac_c" 1>&6
13432 else
13433   if test "$cross_compiling" = yes; then
13434   fu_cv_sys_stat_statfs2_bsize=no
13435 else
13436   cat > conftest.$ac_ext <<EOF
13437 #line 13438 "configure"
13438 #include "confdefs.h"
13439
13440 #ifdef HAVE_SYS_PARAM_H
13441 #include <sys/param.h>
13442 #endif
13443 #ifdef HAVE_SYS_MOUNT_H
13444 #include <sys/mount.h>
13445 #endif
13446 #ifdef HAVE_SYS_VFS_H
13447 #include <sys/vfs.h>
13448 #endif
13449   main ()
13450   {
13451   struct statfs fsd;
13452   fsd.f_bsize = 0;
13453   exit (statfs (".", &fsd));
13454   }
13455 EOF
13456 if { (eval echo configure:13457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13457 then
13458   fu_cv_sys_stat_statfs2_bsize=yes
13459 else
13460   echo "configure: failed program was:" >&5
13461   cat conftest.$ac_ext >&5
13462   rm -fr conftest*
13463   fu_cv_sys_stat_statfs2_bsize=no
13464 fi
13465 rm -fr conftest*
13466 fi
13467
13468 fi
13469
13470   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13471   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13472     space=yes
13473     cat >> confdefs.h <<\EOF
13474 #define STAT_STATFS2_BSIZE 1
13475 EOF
13476
13477   fi
13478 fi
13479
13480 if test $space = no; then
13481 # SVR3
13482   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13483 echo "configure:13484: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13484   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13485   echo $ac_n "(cached) $ac_c" 1>&6
13486 else
13487   if test "$cross_compiling" = yes; then
13488   fu_cv_sys_stat_statfs4=no
13489 else
13490   cat > conftest.$ac_ext <<EOF
13491 #line 13492 "configure"
13492 #include "confdefs.h"
13493 #include <sys/types.h>
13494 #include <sys/statfs.h>
13495   main ()
13496   {
13497   struct statfs fsd;
13498   exit (statfs (".", &fsd, sizeof fsd, 0));
13499   }
13500 EOF
13501 if { (eval echo configure:13502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13502 then
13503   fu_cv_sys_stat_statfs4=yes
13504 else
13505   echo "configure: failed program was:" >&5
13506   cat conftest.$ac_ext >&5
13507   rm -fr conftest*
13508   fu_cv_sys_stat_statfs4=no
13509 fi
13510 rm -fr conftest*
13511 fi
13512
13513 fi
13514
13515   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13516   if test $fu_cv_sys_stat_statfs4 = yes; then
13517     space=yes
13518     cat >> confdefs.h <<\EOF
13519 #define STAT_STATFS4 1
13520 EOF
13521
13522   fi
13523 fi
13524
13525 if test $space = no; then
13526 # 4.4BSD and NetBSD
13527   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13528 echo "configure:13529: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13529   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13530   echo $ac_n "(cached) $ac_c" 1>&6
13531 else
13532   if test "$cross_compiling" = yes; then
13533   fu_cv_sys_stat_statfs2_fsize=no
13534 else
13535   cat > conftest.$ac_ext <<EOF
13536 #line 13537 "configure"
13537 #include "confdefs.h"
13538 #include <sys/types.h>
13539 #ifdef HAVE_SYS_PARAM_H
13540 #include <sys/param.h>
13541 #endif
13542 #ifdef HAVE_SYS_MOUNT_H
13543 #include <sys/mount.h>
13544 #endif
13545   main ()
13546   {
13547   struct statfs fsd;
13548   fsd.f_fsize = 0;
13549   exit (statfs (".", &fsd));
13550   }
13551 EOF
13552 if { (eval echo configure:13553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13553 then
13554   fu_cv_sys_stat_statfs2_fsize=yes
13555 else
13556   echo "configure: failed program was:" >&5
13557   cat conftest.$ac_ext >&5
13558   rm -fr conftest*
13559   fu_cv_sys_stat_statfs2_fsize=no
13560 fi
13561 rm -fr conftest*
13562 fi
13563
13564 fi
13565
13566   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13567   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13568     space=yes
13569     cat >> confdefs.h <<\EOF
13570 #define STAT_STATFS2_FSIZE 1
13571 EOF
13572
13573   fi
13574 fi
13575
13576 if test $space = no; then
13577   # Ultrix
13578   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13579 echo "configure:13580: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13580   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13581   echo $ac_n "(cached) $ac_c" 1>&6
13582 else
13583   if test "$cross_compiling" = yes; then
13584   fu_cv_sys_stat_fs_data=no
13585 else
13586   cat > conftest.$ac_ext <<EOF
13587 #line 13588 "configure"
13588 #include "confdefs.h"
13589 #include <sys/types.h>
13590 #ifdef HAVE_SYS_PARAM_H
13591 #include <sys/param.h>
13592 #endif
13593 #ifdef HAVE_SYS_MOUNT_H
13594 #include <sys/mount.h>
13595 #endif
13596 #ifdef HAVE_SYS_FS_TYPES_H
13597 #include <sys/fs_types.h>
13598 #endif
13599   main ()
13600   {
13601   struct fs_data fsd;
13602   /* Ultrix's statfs returns 1 for success,
13603      0 for not mounted, -1 for failure.  */
13604   exit (statfs (".", &fsd) != 1);
13605   }
13606 EOF
13607 if { (eval echo configure:13608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13608 then
13609   fu_cv_sys_stat_fs_data=yes
13610 else
13611   echo "configure: failed program was:" >&5
13612   cat conftest.$ac_ext >&5
13613   rm -fr conftest*
13614   fu_cv_sys_stat_fs_data=no
13615 fi
13616 rm -fr conftest*
13617 fi
13618
13619 fi
13620
13621   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13622   if test $fu_cv_sys_stat_fs_data = yes; then
13623     space=yes
13624     cat >> confdefs.h <<\EOF
13625 #define STAT_STATFS2_FS_DATA 1
13626 EOF
13627
13628   fi
13629 fi
13630
13631 #
13632 # As a gating factor for large file support, in order to
13633 # use <4GB files we must have the following minimal support
13634 # available.
13635 # long long, and a 64 bit off_t or off64_t.
13636 # If we don't have all of these then disable large
13637 # file support.
13638 #
13639 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13640 echo "configure:13641: checking if large file support can be enabled" >&5
13641 cat > conftest.$ac_ext <<EOF
13642 #line 13643 "configure"
13643 #include "confdefs.h"
13644
13645 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13646 #include <sys/types.h>
13647 #else
13648 __COMPILE_ERROR_
13649 #endif
13650
13651 int main() {
13652 int i
13653 ; return 0; }
13654 EOF
13655 if { (eval echo configure:13656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13656   rm -rf conftest*
13657   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13658 else
13659   echo "configure: failed program was:" >&5
13660   cat conftest.$ac_ext >&5
13661   rm -rf conftest*
13662   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13663 fi
13664 rm -f conftest*
13665 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13666     cat >> confdefs.h <<\EOF
13667 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13668 EOF
13669
13670 fi
13671 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13672
13673 # Check whether --with-spinlocks or --without-spinlocks was given.
13674 if test "${with_spinlocks+set}" = set; then
13675   withval="$with_spinlocks"
13676   :
13677 fi
13678
13679 if test "x$with_spinlocks" = "xyes"; then
13680     cat >> confdefs.h <<\EOF
13681 #define USE_SPINLOCKS 1
13682 EOF
13683
13684
13685     case "$host_cpu" in
13686         sparc)
13687             cat >> confdefs.h <<\EOF
13688 #define SPARC_SPINLOCKS 1
13689 EOF
13690
13691             ;;
13692
13693         i386|i486|i586|i686)
13694             cat >> confdefs.h <<\EOF
13695 #define INTEL_SPINLOCKS 1
13696 EOF
13697
13698             ;;
13699
13700         mips)
13701             cat >> confdefs.h <<\EOF
13702 #define MIPS_SPINLOCKS 1
13703 EOF
13704
13705             ;;
13706
13707         powerpc)
13708             cat >> confdefs.h <<\EOF
13709 #define POWERPC_SPINLOCKS 1
13710 EOF
13711
13712             ;;
13713     esac
13714 fi
13715
13716 #################################################
13717 # check for ACL support
13718
13719 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13720 echo "configure:13721: checking whether to support ACLs" >&5
13721 # Check whether --with-acl-support or --without-acl-support was given.
13722 if test "${with_acl_support+set}" = set; then
13723   withval="$with_acl_support"
13724    case "$withval" in
13725   yes)
13726
13727         case "$host_os" in
13728         *sysv5*)
13729                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13730                 cat >> confdefs.h <<\EOF
13731 #define HAVE_UNIXWARE_ACLS 1
13732 EOF
13733
13734                 ;;
13735         *solaris*)
13736                 echo "$ac_t""Using solaris ACLs" 1>&6
13737                 cat >> confdefs.h <<\EOF
13738 #define HAVE_SOLARIS_ACLS 1
13739 EOF
13740
13741                 ;;
13742         *hpux*)
13743                 echo "$ac_t""Using HPUX ACLs" 1>&6
13744                 cat >> confdefs.h <<\EOF
13745 #define HAVE_HPUX_ACLS 1
13746 EOF
13747
13748                 ;;
13749         *irix*)
13750                 echo "$ac_t""Using IRIX ACLs" 1>&6
13751                 cat >> confdefs.h <<\EOF
13752 #define HAVE_IRIX_ACLS 1
13753 EOF
13754
13755                 ;;
13756         *aix*)
13757                 echo "$ac_t""Using AIX ACLs" 1>&6
13758                 cat >> confdefs.h <<\EOF
13759 #define HAVE_AIX_ACLS 1
13760 EOF
13761
13762                 ;;
13763         *osf*)
13764                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13765                 cat >> confdefs.h <<\EOF
13766 #define HAVE_TRU64_ACLS 1
13767 EOF
13768
13769                 LIBS="$LIBS -lpacl"
13770                 ;;
13771         *)
13772                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13773 echo "configure:13774: checking for acl_get_file in -lacl" >&5
13774 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13775 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13776   echo $ac_n "(cached) $ac_c" 1>&6
13777 else
13778   ac_save_LIBS="$LIBS"
13779 LIBS="-lacl  $LIBS"
13780 cat > conftest.$ac_ext <<EOF
13781 #line 13782 "configure"
13782 #include "confdefs.h"
13783 /* Override any gcc2 internal prototype to avoid an error.  */
13784 /* We use char because int might match the return type of a gcc2
13785     builtin and then its argument prototype would still apply.  */
13786 char acl_get_file();
13787
13788 int main() {
13789 acl_get_file()
13790 ; return 0; }
13791 EOF
13792 if { (eval echo configure:13793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13793   rm -rf conftest*
13794   eval "ac_cv_lib_$ac_lib_var=yes"
13795 else
13796   echo "configure: failed program was:" >&5
13797   cat conftest.$ac_ext >&5
13798   rm -rf conftest*
13799   eval "ac_cv_lib_$ac_lib_var=no"
13800 fi
13801 rm -f conftest*
13802 LIBS="$ac_save_LIBS"
13803
13804 fi
13805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13806   echo "$ac_t""yes" 1>&6
13807     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13808     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13809   cat >> confdefs.h <<EOF
13810 #define $ac_tr_lib 1
13811 EOF
13812
13813   LIBS="-lacl $LIBS"
13814
13815 else
13816   echo "$ac_t""no" 1>&6
13817 fi
13818
13819                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13820 echo "configure:13821: checking for ACL support" >&5
13821 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13822   echo $ac_n "(cached) $ac_c" 1>&6
13823 else
13824   
13825                 cat > conftest.$ac_ext <<EOF
13826 #line 13827 "configure"
13827 #include "confdefs.h"
13828 #include <sys/types.h>
13829 #include <sys/acl.h>
13830 int main() {
13831  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13832 ; return 0; }
13833 EOF
13834 if { (eval echo configure:13835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13835   rm -rf conftest*
13836   samba_cv_HAVE_POSIX_ACLS=yes
13837 else
13838   echo "configure: failed program was:" >&5
13839   cat conftest.$ac_ext >&5
13840   rm -rf conftest*
13841   samba_cv_HAVE_POSIX_ACLS=no
13842 fi
13843 rm -f conftest*
13844 fi
13845
13846 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13847                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13848                                 echo "$ac_t""Using posix ACLs" 1>&6
13849                                 cat >> confdefs.h <<\EOF
13850 #define HAVE_POSIX_ACLS 1
13851 EOF
13852
13853                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13854 echo "configure:13855: checking for acl_get_perm_np" >&5
13855 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13856   echo $ac_n "(cached) $ac_c" 1>&6
13857 else
13858   
13859                                 cat > conftest.$ac_ext <<EOF
13860 #line 13861 "configure"
13861 #include "confdefs.h"
13862 #include <sys/types.h>
13863 #include <sys/acl.h>
13864 int main() {
13865  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13866 ; return 0; }
13867 EOF
13868 if { (eval echo configure:13869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13869   rm -rf conftest*
13870   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13871 else
13872   echo "configure: failed program was:" >&5
13873   cat conftest.$ac_ext >&5
13874   rm -rf conftest*
13875   samba_cv_HAVE_ACL_GET_PERM_NP=no
13876 fi
13877 rm -f conftest*
13878 fi
13879
13880 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13881                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13882                                         cat >> confdefs.h <<\EOF
13883 #define HAVE_ACL_GET_PERM_NP 1
13884 EOF
13885
13886                                 fi
13887                         fi
13888             ;;
13889         esac
13890         ;;
13891   *)
13892     echo "$ac_t""no" 1>&6
13893     cat >> confdefs.h <<\EOF
13894 #define HAVE_NO_ACLS 1
13895 EOF
13896
13897     ;;
13898   esac 
13899 else
13900   cat >> confdefs.h <<\EOF
13901 #define HAVE_NO_ACLS 1
13902 EOF
13903
13904   echo "$ac_t""no" 1>&6
13905
13906 fi
13907
13908
13909 #################################################
13910 # check for sendfile support
13911
13912 echo $ac_n "checking whether to check for support sendfile""... $ac_c" 1>&6
13913 echo "configure:13914: checking whether to check for support sendfile" >&5
13914 # Check whether --with-sendfile-support or --without-sendfile-support was given.
13915 if test "${with_sendfile_support+set}" = set; then
13916   withval="$with_sendfile_support"
13917    case "$withval" in
13918   yes)
13919
13920         echo "$ac_t""yes" 1>&6;
13921
13922         case "$host_os" in
13923         *linux*)
13924                 echo $ac_n "checking for linux sendfile64 support""... $ac_c" 1>&6
13925 echo "configure:13926: checking for linux sendfile64 support" >&5
13926 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then
13927   echo $ac_n "(cached) $ac_c" 1>&6
13928 else
13929   
13930                 cat > conftest.$ac_ext <<EOF
13931 #line 13932 "configure"
13932 #include "confdefs.h"
13933 #include <sys/sendfile.h>
13934 int main() {
13935 \
13936 int tofd, fromfd;
13937 off64_t offset;
13938 size_t total;
13939 ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total);
13940
13941 ; return 0; }
13942 EOF
13943 if { (eval echo configure:13944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13944   rm -rf conftest*
13945   samba_cv_HAVE_SENDFILE64=yes
13946 else
13947   echo "configure: failed program was:" >&5
13948   cat conftest.$ac_ext >&5
13949   rm -rf conftest*
13950   samba_cv_HAVE_SENDFILE64=no
13951 fi
13952 rm -f conftest*
13953 fi
13954
13955 echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6
13956
13957                 echo $ac_n "checking for linux sendfile support""... $ac_c" 1>&6
13958 echo "configure:13959: checking for linux sendfile support" >&5
13959 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
13960   echo $ac_n "(cached) $ac_c" 1>&6
13961 else
13962   
13963                 cat > conftest.$ac_ext <<EOF
13964 #line 13965 "configure"
13965 #include "confdefs.h"
13966 #include <sys/sendfile.h>
13967 int main() {
13968 \
13969 int tofd, fromfd;
13970 off_t offset;
13971 size_t total;
13972 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
13973
13974 ; return 0; }
13975 EOF
13976 if { (eval echo configure:13977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13977   rm -rf conftest*
13978   samba_cv_HAVE_SENDFILE=yes
13979 else
13980   echo "configure: failed program was:" >&5
13981   cat conftest.$ac_ext >&5
13982   rm -rf conftest*
13983   samba_cv_HAVE_SENDFILE=no
13984 fi
13985 rm -f conftest*
13986 fi
13987
13988 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
13989
13990 # Try and cope with broken Linux sendfile....
13991                 echo $ac_n "checking for broken linux sendfile support""... $ac_c" 1>&6
13992 echo "configure:13993: checking for broken linux sendfile support" >&5
13993 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_LINUX_SENDFILE'+set}'`\" = set"; then
13994   echo $ac_n "(cached) $ac_c" 1>&6
13995 else
13996   
13997                 cat > conftest.$ac_ext <<EOF
13998 #line 13999 "configure"
13999 #include "confdefs.h"
14000 \
14001 #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
14002 #undef _FILE_OFFSET_BITS
14003 #endif
14004 #include <sys/sendfile.h>
14005 int main() {
14006 \
14007 int tofd, fromfd;
14008 off_t offset;
14009 size_t total;
14010 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
14011
14012 ; return 0; }
14013 EOF
14014 if { (eval echo configure:14015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14015   rm -rf conftest*
14016   samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes
14017 else
14018   echo "configure: failed program was:" >&5
14019   cat conftest.$ac_ext >&5
14020   rm -rf conftest*
14021   samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no
14022 fi
14023 rm -f conftest*
14024 fi
14025
14026 echo "$ac_t""$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" 1>&6
14027
14028         if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
14029                 cat >> confdefs.h <<\EOF
14030 #define HAVE_SENDFILE64 1
14031 EOF
14032
14033                 cat >> confdefs.h <<\EOF
14034 #define LINUX_SENDFILE_API 1
14035 EOF
14036
14037                 cat >> confdefs.h <<\EOF
14038 #define WITH_SENDFILE 1
14039 EOF
14040
14041         elif test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
14042                 cat >> confdefs.h <<\EOF
14043 #define HAVE_SENDFILE 1
14044 EOF
14045
14046                 cat >> confdefs.h <<\EOF
14047 #define LINUX_SENDFILE_API 1
14048 EOF
14049
14050                 cat >> confdefs.h <<\EOF
14051 #define WITH_SENDFILE 1
14052 EOF
14053
14054         elif test x"$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then
14055                 cat >> confdefs.h <<\EOF
14056 #define LINUX_BROKEN_SENDFILE_API 1
14057 EOF
14058
14059                 cat >> confdefs.h <<\EOF
14060 #define WITH_SENDFILE 1
14061 EOF
14062
14063         else
14064                 echo "$ac_t""no" 1>&6;
14065         fi
14066
14067         ;;
14068         *freebsd*)
14069                 echo $ac_n "checking for freebsd sendfile support""... $ac_c" 1>&6
14070 echo "configure:14071: checking for freebsd sendfile support" >&5
14071 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
14072   echo $ac_n "(cached) $ac_c" 1>&6
14073 else
14074   
14075                 cat > conftest.$ac_ext <<EOF
14076 #line 14077 "configure"
14077 #include "confdefs.h"
14078 \
14079 #include <sys/types.h>
14080 #include <sys/socket.h>
14081 #include <sys/uio.h>
14082 int main() {
14083 \
14084         int fromfd, tofd;
14085         off_t offset, nwritten;
14086         struct sf_hdtr hdr;
14087         struct iovec hdtrl;
14088         hdr->headers = &hdtrl;
14089         hdr->hdr_cnt = 1;
14090         hdr->trailers = NULL;
14091         hdr->trl_cnt = 0;
14092         hdtrl.iov_base = NULL;
14093         hdtrl.iov_len = 0;
14094         int ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
14095
14096 ; return 0; }
14097 EOF
14098 if { (eval echo configure:14099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14099   rm -rf conftest*
14100   samba_cv_HAVE_SENDFILE=yes
14101 else
14102   echo "configure: failed program was:" >&5
14103   cat conftest.$ac_ext >&5
14104   rm -rf conftest*
14105   samba_cv_HAVE_SENDFILE=no
14106 fi
14107 rm -f conftest*
14108 fi
14109
14110 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
14111
14112         if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
14113                 cat >> confdefs.h <<\EOF
14114 #define HAVE_SENDFILE 1
14115 EOF
14116
14117                 cat >> confdefs.h <<\EOF
14118 #define FREEBSD_SENDFILE_API 1
14119 EOF
14120
14121                 cat >> confdefs.h <<\EOF
14122 #define WITH_SENDFILE 1
14123 EOF
14124
14125         else
14126                 echo "$ac_t""no" 1>&6;
14127         fi
14128         ;;
14129
14130         *hpux*)
14131                 echo $ac_n "checking for hpux sendfile64 support""... $ac_c" 1>&6
14132 echo "configure:14133: checking for hpux sendfile64 support" >&5
14133 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then
14134   echo $ac_n "(cached) $ac_c" 1>&6
14135 else
14136   
14137                 cat > conftest.$ac_ext <<EOF
14138 #line 14139 "configure"
14139 #include "confdefs.h"
14140 \
14141 #include <sys/socket.h>
14142 #include <sys/uio.h>
14143 int main() {
14144 \
14145         int fromfd, tofd;
14146         size_t total=0;
14147         struct iovec hdtrl[2];
14148         ssize_t nwritten;
14149         off64_t offset;
14150
14151         hdtrl[0].iov_base = 0;
14152         hdtrl[0].iov_len = 0;
14153
14154         nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0);
14155
14156 ; return 0; }
14157 EOF
14158 if { (eval echo configure:14159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14159   rm -rf conftest*
14160   samba_cv_HAVE_SENDFILE64=yes
14161 else
14162   echo "configure: failed program was:" >&5
14163   cat conftest.$ac_ext >&5
14164   rm -rf conftest*
14165   samba_cv_HAVE_SENDFILE64=no
14166 fi
14167 rm -f conftest*
14168 fi
14169
14170 echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6
14171         if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
14172                 cat >> confdefs.h <<\EOF
14173 #define HAVE_SENDFILE64 1
14174 EOF
14175
14176                 cat >> confdefs.h <<\EOF
14177 #define HPUX_SENDFILE_API 1
14178 EOF
14179
14180                 cat >> confdefs.h <<\EOF
14181 #define WITH_SENDFILE 1
14182 EOF
14183
14184         else
14185                 echo "$ac_t""no" 1>&6;
14186         fi
14187
14188                 echo $ac_n "checking for hpux sendfile support""... $ac_c" 1>&6
14189 echo "configure:14190: checking for hpux sendfile support" >&5
14190 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
14191   echo $ac_n "(cached) $ac_c" 1>&6
14192 else
14193   
14194                 cat > conftest.$ac_ext <<EOF
14195 #line 14196 "configure"
14196 #include "confdefs.h"
14197 \
14198 #include <sys/socket.h>
14199 #include <sys/uio.h>
14200 int main() {
14201 \
14202         int fromfd, tofd;
14203         size_t total=0;
14204         struct iovec hdtrl[2];
14205         ssize_t nwritten;
14206         off_t offset;
14207
14208         hdtrl[0].iov_base = 0;
14209         hdtrl[0].iov_len = 0;
14210
14211         nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0);
14212
14213 ; return 0; }
14214 EOF
14215 if { (eval echo configure:14216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14216   rm -rf conftest*
14217   samba_cv_HAVE_SENDFILE=yes
14218 else
14219   echo "configure: failed program was:" >&5
14220   cat conftest.$ac_ext >&5
14221   rm -rf conftest*
14222   samba_cv_HAVE_SENDFILE=no
14223 fi
14224 rm -f conftest*
14225 fi
14226
14227 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
14228         if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
14229                 cat >> confdefs.h <<\EOF
14230 #define HAVE_SENDFILE 1
14231 EOF
14232
14233                 cat >> confdefs.h <<\EOF
14234 #define HPUX_SENDFILE_API 1
14235 EOF
14236
14237                 cat >> confdefs.h <<\EOF
14238 #define WITH_SENDFILE 1
14239 EOF
14240
14241         else
14242                 echo "$ac_t""no" 1>&6;
14243         fi
14244         ;;
14245
14246         *solaris*)
14247                 LIBS="$LIBS -lsendfile"
14248                 echo $ac_n "checking for solaris sendfilev64 support""... $ac_c" 1>&6
14249 echo "configure:14250: checking for solaris sendfilev64 support" >&5
14250 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV64'+set}'`\" = set"; then
14251   echo $ac_n "(cached) $ac_c" 1>&6
14252 else
14253   
14254                 cat > conftest.$ac_ext <<EOF
14255 #line 14256 "configure"
14256 #include "confdefs.h"
14257 \
14258 #include <sys/sendfile.h>
14259 int main() {
14260 \
14261         int sfvcnt;
14262         size_t xferred;
14263         struct sendfilevec vec[2];
14264         ssize_t nwritten;
14265         int tofd;
14266
14267         sfvcnt = 2;
14268
14269         vec[0].sfv_fd = SFV_FD_SELF;
14270         vec[0].sfv_flag = 0;
14271         vec[0].sfv_off = 0;
14272         vec[0].sfv_len = 0;
14273
14274         vec[1].sfv_fd = 0;
14275         vec[1].sfv_flag = 0;
14276         vec[1].sfv_off = 0;
14277         vec[1].sfv_len = 0;
14278         nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred);
14279
14280 ; return 0; }
14281 EOF
14282 if { (eval echo configure:14283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14283   rm -rf conftest*
14284   samba_cv_HAVE_SENDFILEV64=yes
14285 else
14286   echo "configure: failed program was:" >&5
14287   cat conftest.$ac_ext >&5
14288   rm -rf conftest*
14289   samba_cv_HAVE_SENDFILEV64=no
14290 fi
14291 rm -f conftest*
14292 fi
14293
14294 echo "$ac_t""$samba_cv_HAVE_SENDFILEV64" 1>&6
14295
14296         if test x"$samba_cv_HAVE_SENDFILEV64" = x"yes"; then
14297                 cat >> confdefs.h <<\EOF
14298 #define HAVE_SENDFILEV64 1
14299 EOF
14300
14301                 cat >> confdefs.h <<\EOF
14302 #define SOLARIS_SENDFILE_API 1
14303 EOF
14304
14305                 cat >> confdefs.h <<\EOF
14306 #define WITH_SENDFILE 1
14307 EOF
14308
14309         else
14310                 echo "$ac_t""no" 1>&6;
14311         fi
14312
14313                 echo $ac_n "checking for solaris sendfilev support""... $ac_c" 1>&6
14314 echo "configure:14315: checking for solaris sendfilev support" >&5
14315 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV'+set}'`\" = set"; then
14316   echo $ac_n "(cached) $ac_c" 1>&6
14317 else
14318   
14319                 cat > conftest.$ac_ext <<EOF
14320 #line 14321 "configure"
14321 #include "confdefs.h"
14322 \
14323 #include <sys/sendfile.h>
14324 int main() {
14325 \
14326         int sfvcnt;
14327         size_t xferred;
14328         struct sendfilevec vec[2];
14329         ssize_t nwritten;
14330         int tofd;
14331
14332         sfvcnt = 2;
14333
14334         vec[0].sfv_fd = SFV_FD_SELF;
14335         vec[0].sfv_flag = 0;
14336         vec[0].sfv_off = 0;
14337         vec[0].sfv_len = 0;
14338
14339         vec[1].sfv_fd = 0;
14340         vec[1].sfv_flag = 0;
14341         vec[1].sfv_off = 0;
14342         vec[1].sfv_len = 0;
14343         nwritten = sendfilev(tofd, vec, sfvcnt, &xferred);
14344
14345 ; return 0; }
14346 EOF
14347 if { (eval echo configure:14348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14348   rm -rf conftest*
14349   samba_cv_HAVE_SENDFILEV=yes
14350 else
14351   echo "configure: failed program was:" >&5
14352   cat conftest.$ac_ext >&5
14353   rm -rf conftest*
14354   samba_cv_HAVE_SENDFILEV=no
14355 fi
14356 rm -f conftest*
14357 fi
14358
14359 echo "$ac_t""$samba_cv_HAVE_SENDFILEV" 1>&6
14360
14361         if test x"$samba_cv_HAVE_SENDFILEV" = x"yes"; then
14362                 cat >> confdefs.h <<\EOF
14363 #define HAVE_SENDFILEV 1
14364 EOF
14365
14366                 cat >> confdefs.h <<\EOF
14367 #define SOLARIS_SENDFILE_API 1
14368 EOF
14369
14370                 cat >> confdefs.h <<\EOF
14371 #define WITH_SENDFILE 1
14372 EOF
14373
14374         else
14375                 echo "$ac_t""no" 1>&6;
14376         fi
14377         ;;
14378
14379         *)
14380         ;;
14381         esac
14382         ;;
14383   *)
14384     echo "$ac_t""no" 1>&6
14385     ;;
14386   esac 
14387 else
14388   echo "$ac_t""no" 1>&6
14389
14390 fi
14391
14392
14393
14394 #################################################
14395 # Check whether winbind is supported on this platform.  If so we need to
14396 # build and install client programs (WINBIND_TARGETS), sbin programs
14397 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
14398
14399 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
14400 echo "configure:14401: checking whether to build winbind" >&5
14401
14402 # Initially, the value of $host_os decides whether winbind is supported
14403
14404 case "$host_os" in
14405         *linux*|*irix*)
14406                 HAVE_WINBIND=yes
14407                 ;;
14408         *solaris*)
14409                 HAVE_WINBIND=yes
14410                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
14411                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
14412                 ;;
14413         *hpux11*)
14414                 HAVE_WINBIND=yes
14415                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
14416                 ;;
14417         *)
14418                 HAVE_WINBIND=no
14419                 winbind_no_reason=", unsupported on $host_os"
14420                 ;;
14421 esac
14422
14423 # Check the setting of --with-winbindd
14424
14425 # Check whether --with-winbind or --without-winbind was given.
14426 if test "${with_winbind+set}" = set; then
14427   withval="$with_winbind"
14428    
14429   case "$withval" in
14430         yes)
14431                 HAVE_WINBIND=yes
14432                 ;;
14433         no)
14434                 HAVE_WINBIND=no
14435                 winbind_reason=""
14436                 ;;
14437   esac 
14438 fi
14439
14440
14441 # We need unix domain sockets for winbind
14442
14443 if test x"$HAVE_WINBIND" = x"yes"; then
14444         if test x"$samba_cv_unixsocket" = x"no"; then
14445                 winbind_no_reason=", no unix domain socket support on $host_os"
14446                 HAVE_WINBIND=no
14447         fi
14448 fi
14449
14450 # Display test results
14451
14452 WINBIND_TARGETS=""
14453 WINBIND_STARGETS=""
14454 WINBIND_LTARGETS=""
14455 WINBIND_PAM_PROGS=""
14456
14457 if test x"$HAVE_WINBIND" = x"yes"; then
14458         echo "$ac_t""yes" 1>&6
14459         cat >> confdefs.h <<\EOF
14460 #define WITH_WINBIND 1
14461 EOF
14462
14463
14464         WINBIND_TARGETS="bin/wbinfo"
14465         WINBIND_STARGETS="bin/winbindd"
14466         if test x"$BLDSHARED" = x"true"; then
14467                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
14468                 if test x"$with_pam" = x"yes"; then
14469                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
14470                 fi
14471         fi
14472 else
14473         echo "$ac_t""no$winbind_no_reason" 1>&6
14474 fi
14475
14476
14477 # Substitution time!
14478
14479
14480
14481
14482
14483
14484
14485
14486 # Solaris has some extra fields in struct passwd that need to be
14487 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
14488 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
14489 # this. 
14490
14491 #AC_CHECK_MEMBER(struct passwd.pw_comment,
14492 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
14493 #               [#include <pwd.h>])
14494
14495 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
14496 echo "configure:14497: checking whether struct passwd has pw_comment" >&5
14497 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
14498   echo $ac_n "(cached) $ac_c" 1>&6
14499 else
14500   
14501     cat > conftest.$ac_ext <<EOF
14502 #line 14503 "configure"
14503 #include "confdefs.h"
14504 #include <pwd.h>
14505 int main() {
14506 struct passwd p; p.pw_comment;
14507 ; return 0; }
14508 EOF
14509 if { (eval echo configure:14510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14510   rm -rf conftest*
14511   samba_cv_passwd_pw_comment=yes
14512 else
14513   echo "configure: failed program was:" >&5
14514   cat conftest.$ac_ext >&5
14515   rm -rf conftest*
14516   samba_cv_passwd_pw_comment=no
14517 fi
14518 rm -f conftest*
14519 fi
14520
14521 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
14522 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
14523    cat >> confdefs.h <<\EOF
14524 #define HAVE_PASSWD_PW_COMMENT 1
14525 EOF
14526
14527 fi
14528
14529 #AC_CHECK_MEMBER(struct passwd.pw_age,
14530 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
14531 #               [#include <pwd.h>])
14532
14533 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
14534 echo "configure:14535: checking whether struct passwd has pw_age" >&5
14535 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
14536   echo $ac_n "(cached) $ac_c" 1>&6
14537 else
14538   
14539     cat > conftest.$ac_ext <<EOF
14540 #line 14541 "configure"
14541 #include "confdefs.h"
14542 #include <pwd.h>
14543 int main() {
14544 struct passwd p; p.pw_age;
14545 ; return 0; }
14546 EOF
14547 if { (eval echo configure:14548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14548   rm -rf conftest*
14549   samba_cv_passwd_pw_age=yes
14550 else
14551   echo "configure: failed program was:" >&5
14552   cat conftest.$ac_ext >&5
14553   rm -rf conftest*
14554   samba_cv_passwd_pw_age=no
14555 fi
14556 rm -f conftest*
14557 fi
14558
14559 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
14560 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
14561    cat >> confdefs.h <<\EOF
14562 #define HAVE_PASSWD_PW_AGE 1
14563 EOF
14564
14565 fi
14566
14567 #################################################
14568 # Check to see if we should use the included popt 
14569
14570 # Check whether --with-included-popt or --without-included-popt was given.
14571 if test "${with_included_popt+set}" = set; then
14572   withval="$with_included_popt"
14573    
14574   case "$withval" in
14575         yes)
14576                 INCLUDED_POPT=yes
14577                 ;;
14578         no)
14579                 INCLUDED_POPT=no
14580                 ;;
14581   esac 
14582 fi
14583
14584 if test x"$INCLUDED_POPT" != x"yes"; then
14585     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
14586 echo "configure:14587: checking for poptGetContext in -lpopt" >&5
14587 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
14588 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14589   echo $ac_n "(cached) $ac_c" 1>&6
14590 else
14591   ac_save_LIBS="$LIBS"
14592 LIBS="-lpopt  $LIBS"
14593 cat > conftest.$ac_ext <<EOF
14594 #line 14595 "configure"
14595 #include "confdefs.h"
14596 /* Override any gcc2 internal prototype to avoid an error.  */
14597 /* We use char because int might match the return type of a gcc2
14598     builtin and then its argument prototype would still apply.  */
14599 char poptGetContext();
14600
14601 int main() {
14602 poptGetContext()
14603 ; return 0; }
14604 EOF
14605 if { (eval echo configure:14606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14606   rm -rf conftest*
14607   eval "ac_cv_lib_$ac_lib_var=yes"
14608 else
14609   echo "configure: failed program was:" >&5
14610   cat conftest.$ac_ext >&5
14611   rm -rf conftest*
14612   eval "ac_cv_lib_$ac_lib_var=no"
14613 fi
14614 rm -f conftest*
14615 LIBS="$ac_save_LIBS"
14616
14617 fi
14618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14619   echo "$ac_t""yes" 1>&6
14620   INCLUDED_POPT=no
14621 else
14622   echo "$ac_t""no" 1>&6
14623 INCLUDED_POPT=yes
14624 fi
14625
14626 fi
14627
14628 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
14629 echo "configure:14630: checking whether to use included popt" >&5
14630 if test x"$INCLUDED_POPT" = x"yes"; then
14631     echo "$ac_t""yes" 1>&6
14632     BUILD_POPT='$(POPT_OBJS)'
14633     FLAGS1="-I$srcdir/popt"
14634 else
14635     echo "$ac_t""no" 1>&6
14636     LIBS="$LIBS -lpopt"
14637 fi
14638
14639
14640
14641 #################################################
14642 # Check if the user wants Python
14643
14644 # At the moment, you can use this to set which Python binary to link
14645 # against.  (Libraries built for Python2.2 can't be used by 2.1,
14646 # though they can coexist in different directories.)  In the future
14647 # this might make the Python stuff be built by default.
14648
14649 # Check whether --with-python or --without-python was given.
14650 if test "${with_python+set}" = set; then
14651   withval="$with_python"
14652    case "${withval-python}" in
14653   yes)
14654         PYTHON=python
14655         ;;
14656   *)
14657         PYTHON=${withval-python}
14658         ;;
14659   esac 
14660 fi
14661
14662
14663
14664 #################################################
14665 # do extra things if we are running insure
14666
14667 if test "${ac_cv_prog_CC}" = "insure"; then
14668         CPPFLAGS="$CPPFLAGS -D__INSURE__"
14669 fi
14670
14671 #################################################
14672 # final configure stuff
14673
14674 echo $ac_n "checking configure summary""... $ac_c" 1>&6
14675 echo "configure:14676: checking configure summary" >&5
14676 if test "$cross_compiling" = yes; then
14677   echo "configure: warning: cannot run when cross-compiling" 1>&2
14678 else
14679   cat > conftest.$ac_ext <<EOF
14680 #line 14681 "configure"
14681 #include "confdefs.h"
14682 #include "${srcdir-.}/tests/summary.c"
14683 EOF
14684 if { (eval echo configure:14685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14685 then
14686   echo "$ac_t""yes" 1>&6
14687 else
14688   echo "configure: failed program was:" >&5
14689   cat conftest.$ac_ext >&5
14690   rm -fr conftest*
14691   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
14692 fi
14693 rm -fr conftest*
14694 fi
14695
14696
14697 builddir=`pwd`
14698
14699
14700 # I added make files that are outside /source directory.
14701 # I know this is not a good solution, will work out a better
14702 # solution soon.                        --simo
14703 trap '' 1 2 15
14704 cat > confcache <<\EOF
14705 # This file is a shell script that caches the results of configure
14706 # tests run on this system so they can be shared between configure
14707 # scripts and configure runs.  It is not useful on other systems.
14708 # If it contains results you don't want to keep, you may remove or edit it.
14709 #
14710 # By default, configure uses ./config.cache as the cache file,
14711 # creating it if it does not exist already.  You can give configure
14712 # the --cache-file=FILE option to use a different cache file; that is
14713 # what configure does when it calls configure scripts in
14714 # subdirectories, so they share the cache.
14715 # Giving --cache-file=/dev/null disables caching, for debugging configure.
14716 # config.status only pays attention to the cache file if you give it the
14717 # --recheck option to rerun configure.
14718 #
14719 EOF
14720 # The following way of writing the cache mishandles newlines in values,
14721 # but we know of no workaround that is simple, portable, and efficient.
14722 # So, don't put newlines in cache variables' values.
14723 # Ultrix sh set writes to stderr and can't be redirected directly,
14724 # and sets the high bit in the cache file unless we assign to the vars.
14725 (set) 2>&1 |
14726   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14727   *ac_space=\ *)
14728     # `set' does not quote correctly, so add quotes (double-quote substitution
14729     # turns \\\\ into \\, and sed turns \\ into \).
14730     sed -n \
14731       -e "s/'/'\\\\''/g" \
14732       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14733     ;;
14734   *)
14735     # `set' quotes correctly as required by POSIX, so do not add quotes.
14736     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14737     ;;
14738   esac >> confcache
14739 if cmp -s $cache_file confcache; then
14740   :
14741 else
14742   if test -w $cache_file; then
14743     echo "updating cache $cache_file"
14744     cat confcache > $cache_file
14745   else
14746     echo "not updating unwritable cache $cache_file"
14747   fi
14748 fi
14749 rm -f confcache
14750
14751 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14752
14753 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14754 # Let make expand exec_prefix.
14755 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14756
14757 # Any assignment to VPATH causes Sun make to only execute
14758 # the first set of double-colon rules, so remove it if not needed.
14759 # If there is a colon in the path, we need to keep it.
14760 if test "x$srcdir" = x.; then
14761   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14762 fi
14763
14764 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14765
14766 DEFS=-DHAVE_CONFIG_H
14767
14768 # Without the "./", some shells look in PATH for config.status.
14769 : ${CONFIG_STATUS=./config.status}
14770
14771 echo creating $CONFIG_STATUS
14772 rm -f $CONFIG_STATUS
14773 cat > $CONFIG_STATUS <<EOF
14774 #! /bin/sh
14775 # Generated automatically by configure.
14776 # Run this file to recreate the current configuration.
14777 # This directory was configured as follows,
14778 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14779 #
14780 # $0 $ac_configure_args
14781 #
14782 # Compiler output produced by configure, useful for debugging
14783 # configure, is in ./config.log if it exists.
14784
14785 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14786 for ac_option
14787 do
14788   case "\$ac_option" in
14789   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14790     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14791     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14792   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14793     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14794     exit 0 ;;
14795   -help | --help | --hel | --he | --h)
14796     echo "\$ac_cs_usage"; exit 0 ;;
14797   *) echo "\$ac_cs_usage"; exit 1 ;;
14798   esac
14799 done
14800
14801 ac_given_srcdir=$srcdir
14802 ac_given_INSTALL="$INSTALL"
14803
14804 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/pdb/mysql/Makefile ../examples/pdb/xml/Makefile ../examples/sam/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14805 EOF
14806 cat >> $CONFIG_STATUS <<EOF
14807
14808 # Protect against being on the right side of a sed subst in config.status.
14809 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14810  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14811 $ac_vpsub
14812 $extrasub
14813 s%@SHELL@%$SHELL%g
14814 s%@CFLAGS@%$CFLAGS%g
14815 s%@CPPFLAGS@%$CPPFLAGS%g
14816 s%@CXXFLAGS@%$CXXFLAGS%g
14817 s%@FFLAGS@%$FFLAGS%g
14818 s%@DEFS@%$DEFS%g
14819 s%@LDFLAGS@%$LDFLAGS%g
14820 s%@LIBS@%$LIBS%g
14821 s%@exec_prefix@%$exec_prefix%g
14822 s%@prefix@%$prefix%g
14823 s%@program_transform_name@%$program_transform_name%g
14824 s%@bindir@%$bindir%g
14825 s%@sbindir@%$sbindir%g
14826 s%@libexecdir@%$libexecdir%g
14827 s%@datadir@%$datadir%g
14828 s%@sysconfdir@%$sysconfdir%g
14829 s%@sharedstatedir@%$sharedstatedir%g
14830 s%@localstatedir@%$localstatedir%g
14831 s%@libdir@%$libdir%g
14832 s%@includedir@%$includedir%g
14833 s%@oldincludedir@%$oldincludedir%g
14834 s%@infodir@%$infodir%g
14835 s%@mandir@%$mandir%g
14836 s%@configdir@%$configdir%g
14837 s%@lockdir@%$lockdir%g
14838 s%@piddir@%$piddir%g
14839 s%@logfilebase@%$logfilebase%g
14840 s%@privatedir@%$privatedir%g
14841 s%@swatdir@%$swatdir%g
14842 s%@RUNPROG@%$RUNPROG%g
14843 s%@MPROGS@%$MPROGS%g
14844 s%@LDSHFLAGS@%$LDSHFLAGS%g
14845 s%@SONAMEFLAG@%$SONAMEFLAG%g
14846 s%@SHLD@%$SHLD%g
14847 s%@HOST_OS@%$HOST_OS%g
14848 s%@PAM_MOD@%$PAM_MOD%g
14849 s%@WRAP@%$WRAP%g
14850 s%@WRAP32@%$WRAP32%g
14851 s%@WRAPPROG@%$WRAPPROG%g
14852 s%@PICFLAG@%$PICFLAG%g
14853 s%@PICSUFFIX@%$PICSUFFIX%g
14854 s%@POBAD_CC@%$POBAD_CC%g
14855 s%@SHLIBEXT@%$SHLIBEXT%g
14856 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14857 s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g
14858 s%@PRINTLIBS@%$PRINTLIBS%g
14859 s%@AUTHLIBS@%$AUTHLIBS%g
14860 s%@CC@%$CC%g
14861 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14862 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14863 s%@INSTALL_DATA@%$INSTALL_DATA%g
14864 s%@AWK@%$AWK%g
14865 s%@BROKEN_CC@%$BROKEN_CC%g
14866 s%@host@%$host%g
14867 s%@host_alias@%$host_alias%g
14868 s%@host_cpu@%$host_cpu%g
14869 s%@host_vendor@%$host_vendor%g
14870 s%@host_os@%$host_os%g
14871 s%@target@%$target%g
14872 s%@target_alias@%$target_alias%g
14873 s%@target_cpu@%$target_cpu%g
14874 s%@target_vendor@%$target_vendor%g
14875 s%@target_os@%$target_os%g
14876 s%@build@%$build%g
14877 s%@build_alias@%$build_alias%g
14878 s%@build_cpu@%$build_cpu%g
14879 s%@build_vendor@%$build_vendor%g
14880 s%@build_os@%$build_os%g
14881 s%@CPP@%$CPP%g
14882 s%@CUPS_CONFIG@%$CUPS_CONFIG%g
14883 s%@LIBOBJS@%$LIBOBJS%g
14884 s%@TERMLIBS@%$TERMLIBS%g
14885 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14886 s%@ROFF@%$ROFF%g
14887 s%@DYNEXP@%$DYNEXP%g
14888 s%@QUOTAOBJS@%$QUOTAOBJS%g
14889 s%@manlangs@%$manlangs%g
14890 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14891 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14892 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14893 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14894 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14895 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14896 s%@BUILD_POPT@%$BUILD_POPT%g
14897 s%@FLAGS1@%$FLAGS1%g
14898 s%@PYTHON@%$PYTHON%g
14899 s%@builddir@%$builddir%g
14900
14901 CEOF
14902 EOF
14903
14904 cat >> $CONFIG_STATUS <<\EOF
14905
14906 # Split the substitutions into bite-sized pieces for seds with
14907 # small command number limits, like on Digital OSF/1 and HP-UX.
14908 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14909 ac_file=1 # Number of current file.
14910 ac_beg=1 # First line for current file.
14911 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14912 ac_more_lines=:
14913 ac_sed_cmds=""
14914 while $ac_more_lines; do
14915   if test $ac_beg -gt 1; then
14916     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14917   else
14918     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14919   fi
14920   if test ! -s conftest.s$ac_file; then
14921     ac_more_lines=false
14922     rm -f conftest.s$ac_file
14923   else
14924     if test -z "$ac_sed_cmds"; then
14925       ac_sed_cmds="sed -f conftest.s$ac_file"
14926     else
14927       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14928     fi
14929     ac_file=`expr $ac_file + 1`
14930     ac_beg=$ac_end
14931     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14932   fi
14933 done
14934 if test -z "$ac_sed_cmds"; then
14935   ac_sed_cmds=cat
14936 fi
14937 EOF
14938
14939 cat >> $CONFIG_STATUS <<EOF
14940
14941 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/pdb/mysql/Makefile ../examples/pdb/xml/Makefile ../examples/sam/Makefile"}
14942 EOF
14943 cat >> $CONFIG_STATUS <<\EOF
14944 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14945   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14946   case "$ac_file" in
14947   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14948        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14949   *) ac_file_in="${ac_file}.in" ;;
14950   esac
14951
14952   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14953
14954   # Remove last slash and all that follows it.  Not all systems have dirname.
14955   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14956   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14957     # The file is in a subdirectory.
14958     test ! -d "$ac_dir" && mkdir "$ac_dir"
14959     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14960     # A "../" for each directory in $ac_dir_suffix.
14961     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14962   else
14963     ac_dir_suffix= ac_dots=
14964   fi
14965
14966   case "$ac_given_srcdir" in
14967   .)  srcdir=.
14968       if test -z "$ac_dots"; then top_srcdir=.
14969       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14970   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14971   *) # Relative path.
14972     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14973     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14974   esac
14975
14976   case "$ac_given_INSTALL" in
14977   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14978   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14979   esac
14980
14981   echo creating "$ac_file"
14982   rm -f "$ac_file"
14983   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14984   case "$ac_file" in
14985   *Makefile*) ac_comsub="1i\\
14986 # $configure_input" ;;
14987   *) ac_comsub= ;;
14988   esac
14989
14990   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14991   sed -e "$ac_comsub
14992 s%@configure_input@%$configure_input%g
14993 s%@srcdir@%$srcdir%g
14994 s%@top_srcdir@%$top_srcdir%g
14995 s%@INSTALL@%$INSTALL%g
14996 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14997 fi; done
14998 rm -f conftest.s*
14999
15000 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15001 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15002 #
15003 # ac_d sets the value in "#define NAME VALUE" lines.
15004 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15005 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15006 ac_dC='\3'
15007 ac_dD='%g'
15008 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15009 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15010 ac_uB='\([      ]\)%\1#\2define\3'
15011 ac_uC=' '
15012 ac_uD='\4%g'
15013 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15014 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15015 ac_eB='$%\1#\2define\3'
15016 ac_eC=' '
15017 ac_eD='%g'
15018
15019 if test "${CONFIG_HEADERS+set}" != set; then
15020 EOF
15021 cat >> $CONFIG_STATUS <<EOF
15022   CONFIG_HEADERS="include/config.h"
15023 EOF
15024 cat >> $CONFIG_STATUS <<\EOF
15025 fi
15026 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15027   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15028   case "$ac_file" in
15029   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15030        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15031   *) ac_file_in="${ac_file}.in" ;;
15032   esac
15033
15034   echo creating $ac_file
15035
15036   rm -f conftest.frag conftest.in conftest.out
15037   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15038   cat $ac_file_inputs > conftest.in
15039
15040 EOF
15041
15042 # Transform confdefs.h into a sed script conftest.vals that substitutes
15043 # the proper values into config.h.in to produce config.h.  And first:
15044 # Protect against being on the right side of a sed subst in config.status.
15045 # Protect against being in an unquoted here document in config.status.
15046 rm -f conftest.vals
15047 cat > conftest.hdr <<\EOF
15048 s/[\\&%]/\\&/g
15049 s%[\\$`]%\\&%g
15050 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15051 s%ac_d%ac_u%gp
15052 s%ac_u%ac_e%gp
15053 EOF
15054 sed -n -f conftest.hdr confdefs.h > conftest.vals
15055 rm -f conftest.hdr
15056
15057 # This sed command replaces #undef with comments.  This is necessary, for
15058 # example, in the case of _POSIX_SOURCE, which is predefined and required
15059 # on some systems where configure will not decide to define it.
15060 cat >> conftest.vals <<\EOF
15061 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15062 EOF
15063
15064 # Break up conftest.vals because some shells have a limit on
15065 # the size of here documents, and old seds have small limits too.
15066
15067 rm -f conftest.tail
15068 while :
15069 do
15070   ac_lines=`grep -c . conftest.vals`
15071   # grep -c gives empty output for an empty file on some AIX systems.
15072   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15073   # Write a limited-size here document to conftest.frag.
15074   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15075   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15076   echo 'CEOF
15077   sed -f conftest.frag conftest.in > conftest.out
15078   rm -f conftest.in
15079   mv conftest.out conftest.in
15080 ' >> $CONFIG_STATUS
15081   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15082   rm -f conftest.vals
15083   mv conftest.tail conftest.vals
15084 done
15085 rm -f conftest.vals
15086
15087 cat >> $CONFIG_STATUS <<\EOF
15088   rm -f conftest.frag conftest.h
15089   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15090   cat conftest.in >> conftest.h
15091   rm -f conftest.in
15092   if cmp -s $ac_file conftest.h 2>/dev/null; then
15093     echo "$ac_file is unchanged"
15094     rm -f conftest.h
15095   else
15096     # Remove last slash and all that follows it.  Not all systems have dirname.
15097       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15098       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15099       # The file is in a subdirectory.
15100       test ! -d "$ac_dir" && mkdir "$ac_dir"
15101     fi
15102     rm -f $ac_file
15103     mv conftest.h $ac_file
15104   fi
15105 fi; done
15106
15107 EOF
15108 cat >> $CONFIG_STATUS <<EOF
15109
15110 EOF
15111 cat >> $CONFIG_STATUS <<\EOF
15112
15113 exit 0
15114 EOF
15115 chmod +x $CONFIG_STATUS
15116 rm -fr confdefs* $ac_clean_files
15117 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
15118
15119
15120 #################################################
15121 # Print very concise instructions on building/use
15122 if test "x$enable_dmalloc" = xyes
15123 then
15124         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
15125         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
15126 fi