Fix Solaris sendfile detection. Add small fixes to sendfile code.
[ira/wip.git] / source3 / 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 # compile with optimization and without debugging by default
777 CFLAGS="-O ${CFLAGS}"
778
779 # Check whether --enable-debug or --disable-debug was given.
780 if test "${enable_debug+set}" = set; then
781   enableval="$enable_debug"
782   if eval "test x$enable_debug = xyes"; then
783         CFLAGS="${CFLAGS} -g"
784     fi
785 fi
786
787
788 # Check whether --enable-developer or --disable-developer was given.
789 if test "${enable_developer+set}" = set; then
790   enableval="$enable_developer"
791   if eval "test x$enable_developer = xyes"; then
792         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
793     fi
794 fi
795
796
797 # Check whether --enable-krb5developer or --disable-krb5developer was given.
798 if test "${enable_krb5developer+set}" = set; then
799   enableval="$enable_krb5developer"
800   if eval "test x$enable_krb5developer = xyes"; then
801         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
802     fi
803 fi
804
805
806 # Check whether --enable-dmalloc or --disable-dmalloc was given.
807 if test "${enable_dmalloc+set}" = set; then
808   enableval="$enable_dmalloc"
809   :
810 fi
811
812
813 if test "x$enable_dmalloc" = xyes
814 then
815         cat >> confdefs.h <<\EOF
816 #define ENABLE_DMALLOC 1
817 EOF
818
819         cat >> confdefs.h <<\EOF
820 #define DMALLOC_FUNC_CHECK 1
821 EOF
822
823         LIBS="$LIBS -ldmalloc"  
824 fi
825
826 # Extract the first word of "gcc", so it can be a program name with args.
827 set dummy gcc; ac_word=$2
828 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
829 echo "configure:830: checking for $ac_word" >&5
830 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
831   echo $ac_n "(cached) $ac_c" 1>&6
832 else
833   if test -n "$CC"; then
834   ac_cv_prog_CC="$CC" # Let the user override the test.
835 else
836   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
837   ac_dummy="$PATH"
838   for ac_dir in $ac_dummy; do
839     test -z "$ac_dir" && ac_dir=.
840     if test -f $ac_dir/$ac_word; then
841       ac_cv_prog_CC="gcc"
842       break
843     fi
844   done
845   IFS="$ac_save_ifs"
846 fi
847 fi
848 CC="$ac_cv_prog_CC"
849 if test -n "$CC"; then
850   echo "$ac_t""$CC" 1>&6
851 else
852   echo "$ac_t""no" 1>&6
853 fi
854
855 if test -z "$CC"; then
856   # Extract the first word of "cc", so it can be a program name with args.
857 set dummy cc; ac_word=$2
858 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
859 echo "configure:860: checking for $ac_word" >&5
860 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
861   echo $ac_n "(cached) $ac_c" 1>&6
862 else
863   if test -n "$CC"; then
864   ac_cv_prog_CC="$CC" # Let the user override the test.
865 else
866   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
867   ac_prog_rejected=no
868   ac_dummy="$PATH"
869   for ac_dir in $ac_dummy; do
870     test -z "$ac_dir" && ac_dir=.
871     if test -f $ac_dir/$ac_word; then
872       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
873         ac_prog_rejected=yes
874         continue
875       fi
876       ac_cv_prog_CC="cc"
877       break
878     fi
879   done
880   IFS="$ac_save_ifs"
881 if test $ac_prog_rejected = yes; then
882   # We found a bogon in the path, so make sure we never use it.
883   set dummy $ac_cv_prog_CC
884   shift
885   if test $# -gt 0; then
886     # We chose a different compiler from the bogus one.
887     # However, it has the same basename, so the bogon will be chosen
888     # first if we set CC to just the basename; use the full file name.
889     shift
890     set dummy "$ac_dir/$ac_word" "$@"
891     shift
892     ac_cv_prog_CC="$@"
893   fi
894 fi
895 fi
896 fi
897 CC="$ac_cv_prog_CC"
898 if test -n "$CC"; then
899   echo "$ac_t""$CC" 1>&6
900 else
901   echo "$ac_t""no" 1>&6
902 fi
903
904   if test -z "$CC"; then
905     case "`uname -s`" in
906     *win32* | *WIN32*)
907       # Extract the first word of "cl", so it can be a program name with args.
908 set dummy cl; ac_word=$2
909 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
910 echo "configure:911: checking for $ac_word" >&5
911 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
912   echo $ac_n "(cached) $ac_c" 1>&6
913 else
914   if test -n "$CC"; then
915   ac_cv_prog_CC="$CC" # Let the user override the test.
916 else
917   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
918   ac_dummy="$PATH"
919   for ac_dir in $ac_dummy; do
920     test -z "$ac_dir" && ac_dir=.
921     if test -f $ac_dir/$ac_word; then
922       ac_cv_prog_CC="cl"
923       break
924     fi
925   done
926   IFS="$ac_save_ifs"
927 fi
928 fi
929 CC="$ac_cv_prog_CC"
930 if test -n "$CC"; then
931   echo "$ac_t""$CC" 1>&6
932 else
933   echo "$ac_t""no" 1>&6
934 fi
935  ;;
936     esac
937   fi
938   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
939 fi
940
941 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
942 echo "configure:943: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
943
944 ac_ext=c
945 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
946 ac_cpp='$CPP $CPPFLAGS'
947 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
948 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
949 cross_compiling=$ac_cv_prog_cc_cross
950
951 cat > conftest.$ac_ext << EOF
952
953 #line 954 "configure"
954 #include "confdefs.h"
955
956 main(){return(0);}
957 EOF
958 if { (eval echo configure:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
959   ac_cv_prog_cc_works=yes
960   # If we can't run a trivial program, we are probably using a cross compiler.
961   if (./conftest; exit) 2>/dev/null; then
962     ac_cv_prog_cc_cross=no
963   else
964     ac_cv_prog_cc_cross=yes
965   fi
966 else
967   echo "configure: failed program was:" >&5
968   cat conftest.$ac_ext >&5
969   ac_cv_prog_cc_works=no
970 fi
971 rm -fr conftest*
972 ac_ext=c
973 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
974 ac_cpp='$CPP $CPPFLAGS'
975 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
976 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
977 cross_compiling=$ac_cv_prog_cc_cross
978
979 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
980 if test $ac_cv_prog_cc_works = no; then
981   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
982 fi
983 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
984 echo "configure:985: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
985 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
986 cross_compiling=$ac_cv_prog_cc_cross
987
988 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
989 echo "configure:990: checking whether we are using GNU C" >&5
990 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
991   echo $ac_n "(cached) $ac_c" 1>&6
992 else
993   cat > conftest.c <<EOF
994 #ifdef __GNUC__
995   yes;
996 #endif
997 EOF
998 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
999   ac_cv_prog_gcc=yes
1000 else
1001   ac_cv_prog_gcc=no
1002 fi
1003 fi
1004
1005 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1006
1007 if test $ac_cv_prog_gcc = yes; then
1008   GCC=yes
1009 else
1010   GCC=
1011 fi
1012
1013 ac_test_CFLAGS="${CFLAGS+set}"
1014 ac_save_CFLAGS="$CFLAGS"
1015 CFLAGS=
1016 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1017 echo "configure:1018: checking whether ${CC-cc} accepts -g" >&5
1018 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1019   echo $ac_n "(cached) $ac_c" 1>&6
1020 else
1021   echo 'void f(){}' > conftest.c
1022 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1023   ac_cv_prog_cc_g=yes
1024 else
1025   ac_cv_prog_cc_g=no
1026 fi
1027 rm -f conftest*
1028
1029 fi
1030
1031 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1032 if test "$ac_test_CFLAGS" = set; then
1033   CFLAGS="$ac_save_CFLAGS"
1034 elif test $ac_cv_prog_cc_g = yes; then
1035   if test "$GCC" = yes; then
1036     CFLAGS="-g -O2"
1037   else
1038     CFLAGS="-g"
1039   fi
1040 else
1041   if test "$GCC" = yes; then
1042     CFLAGS="-O2"
1043   else
1044     CFLAGS=
1045   fi
1046 fi
1047
1048 ac_aux_dir=
1049 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1050   if test -f $ac_dir/install-sh; then
1051     ac_aux_dir=$ac_dir
1052     ac_install_sh="$ac_aux_dir/install-sh -c"
1053     break
1054   elif test -f $ac_dir/install.sh; then
1055     ac_aux_dir=$ac_dir
1056     ac_install_sh="$ac_aux_dir/install.sh -c"
1057     break
1058   fi
1059 done
1060 if test -z "$ac_aux_dir"; then
1061   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1062 fi
1063 ac_config_guess=$ac_aux_dir/config.guess
1064 ac_config_sub=$ac_aux_dir/config.sub
1065 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1066
1067 # Find a good install program.  We prefer a C program (faster),
1068 # so one script is as good as another.  But avoid the broken or
1069 # incompatible versions:
1070 # SysV /etc/install, /usr/sbin/install
1071 # SunOS /usr/etc/install
1072 # IRIX /sbin/install
1073 # AIX /bin/install
1074 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1075 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1076 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1077 # ./install, which can be erroneously created by make from ./install.sh.
1078 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1079 echo "configure:1080: checking for a BSD compatible install" >&5
1080 if test -z "$INSTALL"; then
1081 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1082   echo $ac_n "(cached) $ac_c" 1>&6
1083 else
1084     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1085   for ac_dir in $PATH; do
1086     # Account for people who put trailing slashes in PATH elements.
1087     case "$ac_dir/" in
1088     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1089     *)
1090       # OSF1 and SCO ODT 3.0 have their own names for install.
1091       # Don't use installbsd from OSF since it installs stuff as root
1092       # by default.
1093       for ac_prog in ginstall scoinst install; do
1094         if test -f $ac_dir/$ac_prog; then
1095           if test $ac_prog = install &&
1096             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1097             # AIX install.  It has an incompatible calling convention.
1098             :
1099           else
1100             ac_cv_path_install="$ac_dir/$ac_prog -c"
1101             break 2
1102           fi
1103         fi
1104       done
1105       ;;
1106     esac
1107   done
1108   IFS="$ac_save_IFS"
1109
1110 fi
1111   if test "${ac_cv_path_install+set}" = set; then
1112     INSTALL="$ac_cv_path_install"
1113   else
1114     # As a last resort, use the slow shell script.  We don't cache a
1115     # path for INSTALL within a source directory, because that will
1116     # break other packages using the cache if that directory is
1117     # removed, or if the path is relative.
1118     INSTALL="$ac_install_sh"
1119   fi
1120 fi
1121 echo "$ac_t""$INSTALL" 1>&6
1122
1123 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1124 # It thinks the first close brace ends the variable substitution.
1125 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1126
1127 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1128
1129 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1130
1131 for ac_prog in gawk mawk nawk awk
1132 do
1133 # Extract the first word of "$ac_prog", so it can be a program name with args.
1134 set dummy $ac_prog; ac_word=$2
1135 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1136 echo "configure:1137: checking for $ac_word" >&5
1137 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1138   echo $ac_n "(cached) $ac_c" 1>&6
1139 else
1140   if test -n "$AWK"; then
1141   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1142 else
1143   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1144   ac_dummy="$PATH"
1145   for ac_dir in $ac_dummy; do
1146     test -z "$ac_dir" && ac_dir=.
1147     if test -f $ac_dir/$ac_word; then
1148       ac_cv_prog_AWK="$ac_prog"
1149       break
1150     fi
1151   done
1152   IFS="$ac_save_ifs"
1153 fi
1154 fi
1155 AWK="$ac_cv_prog_AWK"
1156 if test -n "$AWK"; then
1157   echo "$ac_t""$AWK" 1>&6
1158 else
1159   echo "$ac_t""no" 1>&6
1160 fi
1161
1162 test -n "$AWK" && break
1163 done
1164
1165
1166 LD=ld
1167 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1168 echo "configure:1169: checking if the linker ($LD) is GNU ld" >&5
1169 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1170   echo $ac_n "(cached) $ac_c" 1>&6
1171 else
1172   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1173 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1174   ac_cv_prog_gnu_ld=yes
1175 else
1176   ac_cv_prog_gnu_ld=no
1177 fi
1178 fi
1179
1180 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1181
1182
1183 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1184 echo "configure:1185: checking for POSIXized ISC" >&5
1185 if test -d /etc/conf/kconfig.d &&
1186   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1187 then
1188   echo "$ac_t""yes" 1>&6
1189   ISC=yes # If later tests want to check for ISC.
1190   cat >> confdefs.h <<\EOF
1191 #define _POSIX_SOURCE 1
1192 EOF
1193
1194   if test "$GCC" = yes; then
1195     CC="$CC -posix"
1196   else
1197     CC="$CC -Xp"
1198   fi
1199 else
1200   echo "$ac_t""no" 1>&6
1201   ISC=
1202 fi
1203
1204
1205 if test "x$CC" != xcc; then
1206   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1207 echo "configure:1208: checking whether $CC and cc understand -c and -o together" >&5
1208 else
1209   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1210 echo "configure:1211: checking whether cc understands -c and -o together" >&5
1211 fi
1212 set dummy $CC; ac_cc="`echo $2 |
1213                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1214 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1215   echo $ac_n "(cached) $ac_c" 1>&6
1216 else
1217   echo 'foo(){}' > conftest.c
1218 # Make sure it works both with $CC and with simple cc.
1219 # We do the test twice because some compilers refuse to overwrite an
1220 # existing .o file with -o, though they will create one.
1221 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1222 if { (eval echo configure:1223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1223    test -f conftest.o && { (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1224 then
1225   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1226   if test "x$CC" != xcc; then
1227     # Test first that cc exists at all.
1228     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1229       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1230       if { (eval echo configure:1231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1231          test -f conftest.o && { (eval echo configure:1232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1232       then
1233         # cc works too.
1234         :
1235       else
1236         # cc exists but doesn't like -o.
1237         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1238       fi
1239     fi
1240   fi
1241 else
1242   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1243 fi
1244 rm -f conftest*
1245
1246 fi
1247 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1248   echo "$ac_t""yes" 1>&6
1249 else
1250   echo "$ac_t""no" 1>&6
1251   cat >> confdefs.h <<\EOF
1252 #define NO_MINUS_C_MINUS_O 1
1253 EOF
1254
1255 fi
1256
1257 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1258       BROKEN_CC=
1259 else
1260       BROKEN_CC=#
1261 fi
1262
1263
1264 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1265 echo "configure:1266: checking that the C compiler understands volatile" >&5
1266 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1267   echo $ac_n "(cached) $ac_c" 1>&6
1268 else
1269   
1270     cat > conftest.$ac_ext <<EOF
1271 #line 1272 "configure"
1272 #include "confdefs.h"
1273 #include <sys/types.h>
1274 int main() {
1275 volatile int i = 0
1276 ; return 0; }
1277 EOF
1278 if { (eval echo configure:1279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1279   rm -rf conftest*
1280   samba_cv_volatile=yes
1281 else
1282   echo "configure: failed program was:" >&5
1283   cat conftest.$ac_ext >&5
1284   rm -rf conftest*
1285   samba_cv_volatile=no
1286 fi
1287 rm -f conftest*
1288 fi
1289
1290 echo "$ac_t""$samba_cv_volatile" 1>&6
1291 if test x"$samba_cv_volatile" = x"yes"; then
1292    cat >> confdefs.h <<\EOF
1293 #define HAVE_VOLATILE 1
1294 EOF
1295
1296 fi
1297
1298
1299
1300 # Do some error checking and defaulting for the host and target type.
1301 # The inputs are:
1302 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1303 #
1304 # The rules are:
1305 # 1. You are not allowed to specify --host, --target, and nonopt at the
1306 #    same time.
1307 # 2. Host defaults to nonopt.
1308 # 3. If nonopt is not specified, then host defaults to the current host,
1309 #    as determined by config.guess.
1310 # 4. Target and build default to nonopt.
1311 # 5. If nonopt is not specified, then target and build default to host.
1312
1313 # The aliases save the names the user supplied, while $host etc.
1314 # will get canonicalized.
1315 case $host---$target---$nonopt in
1316 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1317 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1318 esac
1319
1320
1321 # Make sure we can run config.sub.
1322 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1323 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1324 fi
1325
1326 echo $ac_n "checking host system type""... $ac_c" 1>&6
1327 echo "configure:1328: checking host system type" >&5
1328
1329 host_alias=$host
1330 case "$host_alias" in
1331 NONE)
1332   case $nonopt in
1333   NONE)
1334     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1335     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1336     fi ;;
1337   *) host_alias=$nonopt ;;
1338   esac ;;
1339 esac
1340
1341 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1342 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1343 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1344 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1345 echo "$ac_t""$host" 1>&6
1346
1347 echo $ac_n "checking target system type""... $ac_c" 1>&6
1348 echo "configure:1349: checking target system type" >&5
1349
1350 target_alias=$target
1351 case "$target_alias" in
1352 NONE)
1353   case $nonopt in
1354   NONE) target_alias=$host_alias ;;
1355   *) target_alias=$nonopt ;;
1356   esac ;;
1357 esac
1358
1359 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1360 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1361 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1362 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1363 echo "$ac_t""$target" 1>&6
1364
1365 echo $ac_n "checking build system type""... $ac_c" 1>&6
1366 echo "configure:1367: checking build system type" >&5
1367
1368 build_alias=$build
1369 case "$build_alias" in
1370 NONE)
1371   case $nonopt in
1372   NONE) build_alias=$host_alias ;;
1373   *) build_alias=$nonopt ;;
1374   esac ;;
1375 esac
1376
1377 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1378 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1379 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1380 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1381 echo "$ac_t""$build" 1>&6
1382
1383 test "$host_alias" != "$target_alias" &&
1384   test "$program_prefix$program_suffix$program_transform_name" = \
1385     NONENONEs,x,x, &&
1386   program_prefix=${target_alias}-
1387
1388
1389   case "$host_os" in
1390         *irix6*) cat >> confdefs.h <<\EOF
1391 #include <standards.h>
1392 EOF
1393
1394         ;;
1395 esac
1396
1397
1398     
1399     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1400 echo "configure:1401: checking config.cache system type" >&5
1401     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1402          test x"$ac_cv_host_system_type" != x"$host"; } ||
1403        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1404          test x"$ac_cv_build_system_type" != x"$build"; } ||
1405        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1406          test x"$ac_cv_target_system_type" != x"$target"; }; then
1407         echo "$ac_t""different" 1>&6
1408         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1409     else
1410         echo "$ac_t""same" 1>&6
1411     fi
1412     ac_cv_host_system_type="$host"
1413     ac_cv_build_system_type="$build"
1414     ac_cv_target_system_type="$target"
1415
1416
1417 DYNEXP=
1418
1419 #
1420 # Config CPPFLAG settings for strange OS's that must be set
1421 # before other tests.
1422 #
1423 case "$host_os" in
1424 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1425     *hpux*)
1426     
1427       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1428 echo "configure:1429: checking whether ${CC-cc} accepts -Ae" >&5
1429 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1430   echo $ac_n "(cached) $ac_c" 1>&6
1431 else
1432   echo 'void f(){}' > conftest.c
1433 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1434   ac_cv_prog_cc_Ae=yes
1435 else
1436   ac_cv_prog_cc_Ae=no
1437 fi
1438 rm -f conftest*
1439
1440 fi
1441
1442 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1443       # mmap on HPUX is completely broken...
1444       cat >> confdefs.h <<\EOF
1445 #define MMAP_BLACKLIST 1
1446 EOF
1447
1448       if test $ac_cv_prog_cc_Ae = yes; then
1449         CPPFLAGS="$CPPFLAGS -Ae"
1450       fi
1451 #
1452 # Defines needed for HPUX support.
1453 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1454 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1455 #
1456       case `uname -r` in
1457                         *9*|*10*)
1458                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1459                                 cat >> confdefs.h <<\EOF
1460 #define USE_BOTH_CRYPT_CALLS 1
1461 EOF
1462
1463                                 cat >> confdefs.h <<\EOF
1464 #define _HPUX_SOURCE 1
1465 EOF
1466
1467                                 cat >> confdefs.h <<\EOF
1468 #define _POSIX_SOURCE 1
1469 EOF
1470
1471                                 cat >> confdefs.h <<\EOF
1472 #define _ALIGNMENT_REQUIRED 1
1473 EOF
1474
1475                                 cat >> confdefs.h <<\EOF
1476 #define _MAX_ALIGNMENT 4
1477 EOF
1478
1479                                 ;;
1480                         *11*)
1481                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1482                                 cat >> confdefs.h <<\EOF
1483 #define USE_BOTH_CRYPT_CALLS 1
1484 EOF
1485
1486                                 cat >> confdefs.h <<\EOF
1487 #define _HPUX_SOURCE 1
1488 EOF
1489
1490                                 cat >> confdefs.h <<\EOF
1491 #define _POSIX_SOURCE 1
1492 EOF
1493
1494                                 cat >> confdefs.h <<\EOF
1495 #define _LARGEFILE64_SOURCE 1
1496 EOF
1497
1498                                 cat >> confdefs.h <<\EOF
1499 #define _ALIGNMENT_REQUIRED 1
1500 EOF
1501
1502                                 cat >> confdefs.h <<\EOF
1503 #define _MAX_ALIGNMENT 4
1504 EOF
1505
1506                                 ;;
1507       esac
1508       DYNEXP="-Wl,-E"
1509       ;;
1510
1511 #
1512 # CRAY Unicos has broken const handling
1513        *unicos*)
1514           echo "$ac_t""disabling const" 1>&6
1515           CPPFLAGS="$CPPFLAGS -Dconst="
1516           ;;
1517         
1518 #
1519 # AIX4.x doesn't even admit to having large
1520 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1521 #
1522     *aix4*)
1523           echo "$ac_t""enabling large file support" 1>&6
1524       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1525       cat >> confdefs.h <<\EOF
1526 #define _LARGE_FILES 1
1527 EOF
1528
1529       ;;    
1530 #
1531 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1532 # to the existance of large files..
1533 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1534 # recommendations on large file support, however it makes the
1535 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1536 # recommendation makes the compile fail on gcc2.7. JRA.
1537 #
1538         *solaris*)
1539                 case `uname -r` in
1540                         5.0*|5.1*|5.2*|5.3*|5.5*)
1541                                 echo "$ac_t""no large file support" 1>&6
1542                                 ;;
1543                         5.*)
1544                         echo "$ac_t""enabling large file support" 1>&6
1545                         if test "$ac_cv_prog_gcc" = yes; then
1546                                 ${CC-cc} -v >conftest.c 2>&1
1547                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1548                                 rm -fr conftest.c
1549                                 case "$ac_cv_gcc_compiler_version_number" in
1550                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1551                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1552                                                 cat >> confdefs.h <<\EOF
1553 #define _LARGEFILE64_SOURCE 1
1554 EOF
1555
1556                                                 ;;
1557                                         *)
1558                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1559                                                 cat >> confdefs.h <<\EOF
1560 #define _LARGEFILE64_SOURCE 1
1561 EOF
1562
1563                                                 cat >> confdefs.h <<\EOF
1564 #define _FILE_OFFSET_BITS 64
1565 EOF
1566
1567                                                 ;;
1568                                 esac
1569                         else
1570                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1571                                 cat >> confdefs.h <<\EOF
1572 #define _LARGEFILE64_SOURCE 1
1573 EOF
1574
1575                                 cat >> confdefs.h <<\EOF
1576 #define _FILE_OFFSET_BITS 64
1577 EOF
1578
1579                         fi
1580                         ;;
1581                 esac
1582                 ;;
1583 #
1584 # Tests needed for SINIX large file support.
1585 #
1586     *sysv4*)
1587       if test $host = mips-sni-sysv4 ; then
1588         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1589 echo "configure:1590: checking for LFS support" >&5
1590         old_CPPFLAGS="$CPPFLAGS"
1591         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1592         if test "$cross_compiling" = yes; then
1593   SINIX_LFS_SUPPORT=cross
1594 else
1595   cat > conftest.$ac_ext <<EOF
1596 #line 1597 "configure"
1597 #include "confdefs.h"
1598
1599 #include <unistd.h>
1600 main () {
1601 #if _LFS64_LARGEFILE == 1
1602 exit(0);
1603 #else
1604 exit(1);
1605 #endif
1606 }
1607 EOF
1608 if { (eval echo configure:1609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1609 then
1610   SINIX_LFS_SUPPORT=yes
1611 else
1612   echo "configure: failed program was:" >&5
1613   cat conftest.$ac_ext >&5
1614   rm -fr conftest*
1615   SINIX_LFS_SUPPORT=no
1616 fi
1617 rm -fr conftest*
1618 fi
1619
1620         CPPFLAGS="$old_CPPFLAGS"
1621         if test x$SINIX_LFS_SUPPORT = xyes ; then
1622           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1623           cat >> confdefs.h <<\EOF
1624 #define _LARGEFILE64_SOURCE 1
1625 EOF
1626
1627           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1628           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1629           LIBS="`getconf LFS64_LIBS` $LIBS"
1630         fi
1631       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1632       fi
1633     ;;
1634
1635 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1636 #
1637     *linux*)
1638         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1639 echo "configure:1640: checking for LFS support" >&5
1640         old_CPPFLAGS="$CPPFLAGS"
1641         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1642        if test "$cross_compiling" = yes; then
1643   LINUX_LFS_SUPPORT=cross
1644 else
1645   cat > conftest.$ac_ext <<EOF
1646 #line 1647 "configure"
1647 #include "confdefs.h"
1648
1649 #include <unistd.h>
1650 #include <sys/utsname.h>
1651 main() {
1652 #if _LFS64_LARGEFILE == 1
1653        struct utsname uts;
1654        char *release;
1655        int major, minor;
1656
1657        /* Ensure this is glibc 2.2 or higher */
1658 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1659        int libc_major = __GLIBC__;
1660        int libc_minor = __GLIBC_MINOR__;
1661
1662        if (libc_major < 2)
1663               exit(1);
1664        if (libc_minor < 2)
1665               exit(1);
1666 #endif
1667
1668        /* Ensure this is kernel 2.4 or higher */
1669
1670        uname(&uts);
1671        release = uts.release;
1672        major = atoi(strsep(&release, "."));
1673        minor = atoi(strsep(&release, "."));
1674
1675        if (major > 2 || (major == 2 && minor > 3))
1676                exit(0);
1677        exit(1);
1678 #else
1679        exit(1);
1680 #endif
1681 }
1682
1683 EOF
1684 if { (eval echo configure:1685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1685 then
1686   LINUX_LFS_SUPPORT=yes
1687 else
1688   echo "configure: failed program was:" >&5
1689   cat conftest.$ac_ext >&5
1690   rm -fr conftest*
1691   LINUX_LFS_SUPPORT=no
1692 fi
1693 rm -fr conftest*
1694 fi
1695
1696         CPPFLAGS="$old_CPPFLAGS"
1697         if test x$LINUX_LFS_SUPPORT = xyes ; then
1698           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1699           cat >> confdefs.h <<\EOF
1700 #define _LARGEFILE64_SOURCE 1
1701 EOF
1702
1703           cat >> confdefs.h <<\EOF
1704 #define _FILE_OFFSET_BITS 64
1705 EOF
1706
1707           cat >> confdefs.h <<\EOF
1708 #define _GNU_SOURCE 1
1709 EOF
1710
1711         fi
1712        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1713                 ;;
1714
1715     *hurd*)
1716         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1717 echo "configure:1718: checking for LFS support" >&5
1718         old_CPPFLAGS="$CPPFLAGS"
1719         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1720         if test "$cross_compiling" = yes; then
1721   GLIBC_LFS_SUPPORT=cross
1722 else
1723   cat > conftest.$ac_ext <<EOF
1724 #line 1725 "configure"
1725 #include "confdefs.h"
1726
1727 #include <unistd.h>
1728 main () {
1729 #if _LFS64_LARGEFILE == 1
1730 exit(0);
1731 #else
1732 exit(1);
1733 #endif
1734 }
1735 EOF
1736 if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1737 then
1738   GLIBC_LFS_SUPPORT=yes
1739 else
1740   echo "configure: failed program was:" >&5
1741   cat conftest.$ac_ext >&5
1742   rm -fr conftest*
1743   GLIBC_LFS_SUPPORT=no
1744 fi
1745 rm -fr conftest*
1746 fi
1747
1748         CPPFLAGS="$old_CPPFLAGS"
1749         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1750           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1751           cat >> confdefs.h <<\EOF
1752 #define _LARGEFILE64_SOURCE 1
1753 EOF
1754
1755           cat >> confdefs.h <<\EOF
1756 #define _GNU_SOURCE 1
1757 EOF
1758
1759         fi
1760       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1761     ;;
1762
1763 esac
1764
1765 echo $ac_n "checking for inline""... $ac_c" 1>&6
1766 echo "configure:1767: checking for inline" >&5
1767 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1768   echo $ac_n "(cached) $ac_c" 1>&6
1769 else
1770   ac_cv_c_inline=no
1771 for ac_kw in inline __inline__ __inline; do
1772   cat > conftest.$ac_ext <<EOF
1773 #line 1774 "configure"
1774 #include "confdefs.h"
1775
1776 int main() {
1777 } $ac_kw foo() {
1778 ; return 0; }
1779 EOF
1780 if { (eval echo configure:1781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1781   rm -rf conftest*
1782   ac_cv_c_inline=$ac_kw; break
1783 else
1784   echo "configure: failed program was:" >&5
1785   cat conftest.$ac_ext >&5
1786 fi
1787 rm -f conftest*
1788 done
1789
1790 fi
1791
1792 echo "$ac_t""$ac_cv_c_inline" 1>&6
1793 case "$ac_cv_c_inline" in
1794   inline | yes) ;;
1795   no) cat >> confdefs.h <<\EOF
1796 #define inline 
1797 EOF
1798  ;;
1799   *)  cat >> confdefs.h <<EOF
1800 #define inline $ac_cv_c_inline
1801 EOF
1802  ;;
1803 esac
1804
1805 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1806 echo "configure:1807: checking how to run the C preprocessor" >&5
1807 # On Suns, sometimes $CPP names a directory.
1808 if test -n "$CPP" && test -d "$CPP"; then
1809   CPP=
1810 fi
1811 if test -z "$CPP"; then
1812 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1813   echo $ac_n "(cached) $ac_c" 1>&6
1814 else
1815     # This must be in double quotes, not single quotes, because CPP may get
1816   # substituted into the Makefile and "${CC-cc}" will confuse make.
1817   CPP="${CC-cc} -E"
1818   # On the NeXT, cc -E runs the code through the compiler's parser,
1819   # not just through cpp.
1820   cat > conftest.$ac_ext <<EOF
1821 #line 1822 "configure"
1822 #include "confdefs.h"
1823 #include <assert.h>
1824 Syntax Error
1825 EOF
1826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1827 { (eval echo configure:1828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1829 if test -z "$ac_err"; then
1830   :
1831 else
1832   echo "$ac_err" >&5
1833   echo "configure: failed program was:" >&5
1834   cat conftest.$ac_ext >&5
1835   rm -rf conftest*
1836   CPP="${CC-cc} -E -traditional-cpp"
1837   cat > conftest.$ac_ext <<EOF
1838 #line 1839 "configure"
1839 #include "confdefs.h"
1840 #include <assert.h>
1841 Syntax Error
1842 EOF
1843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1844 { (eval echo configure:1845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1846 if test -z "$ac_err"; then
1847   :
1848 else
1849   echo "$ac_err" >&5
1850   echo "configure: failed program was:" >&5
1851   cat conftest.$ac_ext >&5
1852   rm -rf conftest*
1853   CPP="${CC-cc} -nologo -E"
1854   cat > conftest.$ac_ext <<EOF
1855 #line 1856 "configure"
1856 #include "confdefs.h"
1857 #include <assert.h>
1858 Syntax Error
1859 EOF
1860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1861 { (eval echo configure:1862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1863 if test -z "$ac_err"; then
1864   :
1865 else
1866   echo "$ac_err" >&5
1867   echo "configure: failed program was:" >&5
1868   cat conftest.$ac_ext >&5
1869   rm -rf conftest*
1870   CPP=/lib/cpp
1871 fi
1872 rm -f conftest*
1873 fi
1874 rm -f conftest*
1875 fi
1876 rm -f conftest*
1877   ac_cv_prog_CPP="$CPP"
1878 fi
1879   CPP="$ac_cv_prog_CPP"
1880 else
1881   ac_cv_prog_CPP="$CPP"
1882 fi
1883 echo "$ac_t""$CPP" 1>&6
1884
1885 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1886 echo "configure:1887: checking for ANSI C header files" >&5
1887 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1888   echo $ac_n "(cached) $ac_c" 1>&6
1889 else
1890   cat > conftest.$ac_ext <<EOF
1891 #line 1892 "configure"
1892 #include "confdefs.h"
1893 #include <stdlib.h>
1894 #include <stdarg.h>
1895 #include <string.h>
1896 #include <float.h>
1897 EOF
1898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1899 { (eval echo configure:1900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1901 if test -z "$ac_err"; then
1902   rm -rf conftest*
1903   ac_cv_header_stdc=yes
1904 else
1905   echo "$ac_err" >&5
1906   echo "configure: failed program was:" >&5
1907   cat conftest.$ac_ext >&5
1908   rm -rf conftest*
1909   ac_cv_header_stdc=no
1910 fi
1911 rm -f conftest*
1912
1913 if test $ac_cv_header_stdc = yes; then
1914   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1915 cat > conftest.$ac_ext <<EOF
1916 #line 1917 "configure"
1917 #include "confdefs.h"
1918 #include <string.h>
1919 EOF
1920 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1921   egrep "memchr" >/dev/null 2>&1; then
1922   :
1923 else
1924   rm -rf conftest*
1925   ac_cv_header_stdc=no
1926 fi
1927 rm -f conftest*
1928
1929 fi
1930
1931 if test $ac_cv_header_stdc = yes; then
1932   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1933 cat > conftest.$ac_ext <<EOF
1934 #line 1935 "configure"
1935 #include "confdefs.h"
1936 #include <stdlib.h>
1937 EOF
1938 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1939   egrep "free" >/dev/null 2>&1; then
1940   :
1941 else
1942   rm -rf conftest*
1943   ac_cv_header_stdc=no
1944 fi
1945 rm -f conftest*
1946
1947 fi
1948
1949 if test $ac_cv_header_stdc = yes; then
1950   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1951 if test "$cross_compiling" = yes; then
1952   :
1953 else
1954   cat > conftest.$ac_ext <<EOF
1955 #line 1956 "configure"
1956 #include "confdefs.h"
1957 #include <ctype.h>
1958 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1959 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1960 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1961 int main () { int i; for (i = 0; i < 256; i++)
1962 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1963 exit (0); }
1964
1965 EOF
1966 if { (eval echo configure:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1967 then
1968   :
1969 else
1970   echo "configure: failed program was:" >&5
1971   cat conftest.$ac_ext >&5
1972   rm -fr conftest*
1973   ac_cv_header_stdc=no
1974 fi
1975 rm -fr conftest*
1976 fi
1977
1978 fi
1979 fi
1980
1981 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1982 if test $ac_cv_header_stdc = yes; then
1983   cat >> confdefs.h <<\EOF
1984 #define STDC_HEADERS 1
1985 EOF
1986
1987 fi
1988
1989 ac_header_dirent=no
1990 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1991 do
1992 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1993 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1994 echo "configure:1995: checking for $ac_hdr that defines DIR" >&5
1995 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1996   echo $ac_n "(cached) $ac_c" 1>&6
1997 else
1998   cat > conftest.$ac_ext <<EOF
1999 #line 2000 "configure"
2000 #include "confdefs.h"
2001 #include <sys/types.h>
2002 #include <$ac_hdr>
2003 int main() {
2004 DIR *dirp = 0;
2005 ; return 0; }
2006 EOF
2007 if { (eval echo configure:2008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2008   rm -rf conftest*
2009   eval "ac_cv_header_dirent_$ac_safe=yes"
2010 else
2011   echo "configure: failed program was:" >&5
2012   cat conftest.$ac_ext >&5
2013   rm -rf conftest*
2014   eval "ac_cv_header_dirent_$ac_safe=no"
2015 fi
2016 rm -f conftest*
2017 fi
2018 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2019   echo "$ac_t""yes" 1>&6
2020     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2021   cat >> confdefs.h <<EOF
2022 #define $ac_tr_hdr 1
2023 EOF
2024  ac_header_dirent=$ac_hdr; break
2025 else
2026   echo "$ac_t""no" 1>&6
2027 fi
2028 done
2029 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2030 if test $ac_header_dirent = dirent.h; then
2031 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2032 echo "configure:2033: checking for opendir in -ldir" >&5
2033 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2034 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2035   echo $ac_n "(cached) $ac_c" 1>&6
2036 else
2037   ac_save_LIBS="$LIBS"
2038 LIBS="-ldir  $LIBS"
2039 cat > conftest.$ac_ext <<EOF
2040 #line 2041 "configure"
2041 #include "confdefs.h"
2042 /* Override any gcc2 internal prototype to avoid an error.  */
2043 /* We use char because int might match the return type of a gcc2
2044     builtin and then its argument prototype would still apply.  */
2045 char opendir();
2046
2047 int main() {
2048 opendir()
2049 ; return 0; }
2050 EOF
2051 if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2052   rm -rf conftest*
2053   eval "ac_cv_lib_$ac_lib_var=yes"
2054 else
2055   echo "configure: failed program was:" >&5
2056   cat conftest.$ac_ext >&5
2057   rm -rf conftest*
2058   eval "ac_cv_lib_$ac_lib_var=no"
2059 fi
2060 rm -f conftest*
2061 LIBS="$ac_save_LIBS"
2062
2063 fi
2064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2065   echo "$ac_t""yes" 1>&6
2066   LIBS="$LIBS -ldir"
2067 else
2068   echo "$ac_t""no" 1>&6
2069 fi
2070
2071 else
2072 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2073 echo "configure:2074: checking for opendir in -lx" >&5
2074 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2075 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2076   echo $ac_n "(cached) $ac_c" 1>&6
2077 else
2078   ac_save_LIBS="$LIBS"
2079 LIBS="-lx  $LIBS"
2080 cat > conftest.$ac_ext <<EOF
2081 #line 2082 "configure"
2082 #include "confdefs.h"
2083 /* Override any gcc2 internal prototype to avoid an error.  */
2084 /* We use char because int might match the return type of a gcc2
2085     builtin and then its argument prototype would still apply.  */
2086 char opendir();
2087
2088 int main() {
2089 opendir()
2090 ; return 0; }
2091 EOF
2092 if { (eval echo configure:2093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2093   rm -rf conftest*
2094   eval "ac_cv_lib_$ac_lib_var=yes"
2095 else
2096   echo "configure: failed program was:" >&5
2097   cat conftest.$ac_ext >&5
2098   rm -rf conftest*
2099   eval "ac_cv_lib_$ac_lib_var=no"
2100 fi
2101 rm -f conftest*
2102 LIBS="$ac_save_LIBS"
2103
2104 fi
2105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2106   echo "$ac_t""yes" 1>&6
2107   LIBS="$LIBS -lx"
2108 else
2109   echo "$ac_t""no" 1>&6
2110 fi
2111
2112 fi
2113
2114 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2115 echo "configure:2116: checking whether time.h and sys/time.h may both be included" >&5
2116 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2117   echo $ac_n "(cached) $ac_c" 1>&6
2118 else
2119   cat > conftest.$ac_ext <<EOF
2120 #line 2121 "configure"
2121 #include "confdefs.h"
2122 #include <sys/types.h>
2123 #include <sys/time.h>
2124 #include <time.h>
2125 int main() {
2126 struct tm *tp;
2127 ; return 0; }
2128 EOF
2129 if { (eval echo configure:2130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2130   rm -rf conftest*
2131   ac_cv_header_time=yes
2132 else
2133   echo "configure: failed program was:" >&5
2134   cat conftest.$ac_ext >&5
2135   rm -rf conftest*
2136   ac_cv_header_time=no
2137 fi
2138 rm -f conftest*
2139 fi
2140
2141 echo "$ac_t""$ac_cv_header_time" 1>&6
2142 if test $ac_cv_header_time = yes; then
2143   cat >> confdefs.h <<\EOF
2144 #define TIME_WITH_SYS_TIME 1
2145 EOF
2146
2147 fi
2148
2149 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2150 echo "configure:2151: checking for sys/wait.h that is POSIX.1 compatible" >&5
2151 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2152   echo $ac_n "(cached) $ac_c" 1>&6
2153 else
2154   cat > conftest.$ac_ext <<EOF
2155 #line 2156 "configure"
2156 #include "confdefs.h"
2157 #include <sys/types.h>
2158 #include <sys/wait.h>
2159 #ifndef WEXITSTATUS
2160 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2161 #endif
2162 #ifndef WIFEXITED
2163 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2164 #endif
2165 int main() {
2166 int s;
2167 wait (&s);
2168 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2169 ; return 0; }
2170 EOF
2171 if { (eval echo configure:2172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2172   rm -rf conftest*
2173   ac_cv_header_sys_wait_h=yes
2174 else
2175   echo "configure: failed program was:" >&5
2176   cat conftest.$ac_ext >&5
2177   rm -rf conftest*
2178   ac_cv_header_sys_wait_h=no
2179 fi
2180 rm -f conftest*
2181 fi
2182
2183 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2184 if test $ac_cv_header_sys_wait_h = yes; then
2185   cat >> confdefs.h <<\EOF
2186 #define HAVE_SYS_WAIT_H 1
2187 EOF
2188
2189 fi
2190
2191 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2192 do
2193 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2194 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2195 echo "configure:2196: checking for $ac_hdr" >&5
2196 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2197   echo $ac_n "(cached) $ac_c" 1>&6
2198 else
2199   cat > conftest.$ac_ext <<EOF
2200 #line 2201 "configure"
2201 #include "confdefs.h"
2202 #include <$ac_hdr>
2203 EOF
2204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2205 { (eval echo configure:2206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2207 if test -z "$ac_err"; then
2208   rm -rf conftest*
2209   eval "ac_cv_header_$ac_safe=yes"
2210 else
2211   echo "$ac_err" >&5
2212   echo "configure: failed program was:" >&5
2213   cat conftest.$ac_ext >&5
2214   rm -rf conftest*
2215   eval "ac_cv_header_$ac_safe=no"
2216 fi
2217 rm -f conftest*
2218 fi
2219 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2220   echo "$ac_t""yes" 1>&6
2221     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2222   cat >> confdefs.h <<EOF
2223 #define $ac_tr_hdr 1
2224 EOF
2225  
2226 else
2227   echo "$ac_t""no" 1>&6
2228 fi
2229 done
2230
2231 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2232 do
2233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2235 echo "configure:2236: checking for $ac_hdr" >&5
2236 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2237   echo $ac_n "(cached) $ac_c" 1>&6
2238 else
2239   cat > conftest.$ac_ext <<EOF
2240 #line 2241 "configure"
2241 #include "confdefs.h"
2242 #include <$ac_hdr>
2243 EOF
2244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2245 { (eval echo configure:2246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2247 if test -z "$ac_err"; then
2248   rm -rf conftest*
2249   eval "ac_cv_header_$ac_safe=yes"
2250 else
2251   echo "$ac_err" >&5
2252   echo "configure: failed program was:" >&5
2253   cat conftest.$ac_ext >&5
2254   rm -rf conftest*
2255   eval "ac_cv_header_$ac_safe=no"
2256 fi
2257 rm -f conftest*
2258 fi
2259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2260   echo "$ac_t""yes" 1>&6
2261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2262   cat >> confdefs.h <<EOF
2263 #define $ac_tr_hdr 1
2264 EOF
2265  
2266 else
2267   echo "$ac_t""no" 1>&6
2268 fi
2269 done
2270
2271 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2272 do
2273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2275 echo "configure:2276: checking for $ac_hdr" >&5
2276 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2277   echo $ac_n "(cached) $ac_c" 1>&6
2278 else
2279   cat > conftest.$ac_ext <<EOF
2280 #line 2281 "configure"
2281 #include "confdefs.h"
2282 #include <$ac_hdr>
2283 EOF
2284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2285 { (eval echo configure:2286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2287 if test -z "$ac_err"; then
2288   rm -rf conftest*
2289   eval "ac_cv_header_$ac_safe=yes"
2290 else
2291   echo "$ac_err" >&5
2292   echo "configure: failed program was:" >&5
2293   cat conftest.$ac_ext >&5
2294   rm -rf conftest*
2295   eval "ac_cv_header_$ac_safe=no"
2296 fi
2297 rm -f conftest*
2298 fi
2299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2300   echo "$ac_t""yes" 1>&6
2301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2302   cat >> confdefs.h <<EOF
2303 #define $ac_tr_hdr 1
2304 EOF
2305  
2306 else
2307   echo "$ac_t""no" 1>&6
2308 fi
2309 done
2310
2311 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2312 do
2313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2315 echo "configure:2316: checking for $ac_hdr" >&5
2316 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2317   echo $ac_n "(cached) $ac_c" 1>&6
2318 else
2319   cat > conftest.$ac_ext <<EOF
2320 #line 2321 "configure"
2321 #include "confdefs.h"
2322 #include <$ac_hdr>
2323 EOF
2324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2325 { (eval echo configure:2326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2327 if test -z "$ac_err"; then
2328   rm -rf conftest*
2329   eval "ac_cv_header_$ac_safe=yes"
2330 else
2331   echo "$ac_err" >&5
2332   echo "configure: failed program was:" >&5
2333   cat conftest.$ac_ext >&5
2334   rm -rf conftest*
2335   eval "ac_cv_header_$ac_safe=no"
2336 fi
2337 rm -f conftest*
2338 fi
2339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2340   echo "$ac_t""yes" 1>&6
2341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2342   cat >> confdefs.h <<EOF
2343 #define $ac_tr_hdr 1
2344 EOF
2345  
2346 else
2347   echo "$ac_t""no" 1>&6
2348 fi
2349 done
2350
2351 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
2352 do
2353 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2354 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2355 echo "configure:2356: checking for $ac_hdr" >&5
2356 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2357   echo $ac_n "(cached) $ac_c" 1>&6
2358 else
2359   cat > conftest.$ac_ext <<EOF
2360 #line 2361 "configure"
2361 #include "confdefs.h"
2362 #include <$ac_hdr>
2363 EOF
2364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2365 { (eval echo configure:2366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2367 if test -z "$ac_err"; then
2368   rm -rf conftest*
2369   eval "ac_cv_header_$ac_safe=yes"
2370 else
2371   echo "$ac_err" >&5
2372   echo "configure: failed program was:" >&5
2373   cat conftest.$ac_ext >&5
2374   rm -rf conftest*
2375   eval "ac_cv_header_$ac_safe=no"
2376 fi
2377 rm -f conftest*
2378 fi
2379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2380   echo "$ac_t""yes" 1>&6
2381     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2382   cat >> confdefs.h <<EOF
2383 #define $ac_tr_hdr 1
2384 EOF
2385  
2386 else
2387   echo "$ac_t""no" 1>&6
2388 fi
2389 done
2390
2391 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2392 do
2393 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2394 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2395 echo "configure:2396: checking for $ac_hdr" >&5
2396 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2397   echo $ac_n "(cached) $ac_c" 1>&6
2398 else
2399   cat > conftest.$ac_ext <<EOF
2400 #line 2401 "configure"
2401 #include "confdefs.h"
2402 #include <$ac_hdr>
2403 EOF
2404 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2405 { (eval echo configure:2406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2406 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2407 if test -z "$ac_err"; then
2408   rm -rf conftest*
2409   eval "ac_cv_header_$ac_safe=yes"
2410 else
2411   echo "$ac_err" >&5
2412   echo "configure: failed program was:" >&5
2413   cat conftest.$ac_ext >&5
2414   rm -rf conftest*
2415   eval "ac_cv_header_$ac_safe=no"
2416 fi
2417 rm -f conftest*
2418 fi
2419 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2420   echo "$ac_t""yes" 1>&6
2421     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2422   cat >> confdefs.h <<EOF
2423 #define $ac_tr_hdr 1
2424 EOF
2425  
2426 else
2427   echo "$ac_t""no" 1>&6
2428 fi
2429 done
2430
2431 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2432 do
2433 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2434 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2435 echo "configure:2436: checking for $ac_hdr" >&5
2436 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2437   echo $ac_n "(cached) $ac_c" 1>&6
2438 else
2439   cat > conftest.$ac_ext <<EOF
2440 #line 2441 "configure"
2441 #include "confdefs.h"
2442 #include <$ac_hdr>
2443 EOF
2444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2445 { (eval echo configure:2446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2447 if test -z "$ac_err"; then
2448   rm -rf conftest*
2449   eval "ac_cv_header_$ac_safe=yes"
2450 else
2451   echo "$ac_err" >&5
2452   echo "configure: failed program was:" >&5
2453   cat conftest.$ac_ext >&5
2454   rm -rf conftest*
2455   eval "ac_cv_header_$ac_safe=no"
2456 fi
2457 rm -f conftest*
2458 fi
2459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2460   echo "$ac_t""yes" 1>&6
2461     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2462   cat >> confdefs.h <<EOF
2463 #define $ac_tr_hdr 1
2464 EOF
2465  
2466 else
2467   echo "$ac_t""no" 1>&6
2468 fi
2469 done
2470
2471 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2472 do
2473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2474 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2475 echo "configure:2476: checking for $ac_hdr" >&5
2476 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2477   echo $ac_n "(cached) $ac_c" 1>&6
2478 else
2479   cat > conftest.$ac_ext <<EOF
2480 #line 2481 "configure"
2481 #include "confdefs.h"
2482 #include <$ac_hdr>
2483 EOF
2484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2485 { (eval echo configure:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2487 if test -z "$ac_err"; then
2488   rm -rf conftest*
2489   eval "ac_cv_header_$ac_safe=yes"
2490 else
2491   echo "$ac_err" >&5
2492   echo "configure: failed program was:" >&5
2493   cat conftest.$ac_ext >&5
2494   rm -rf conftest*
2495   eval "ac_cv_header_$ac_safe=no"
2496 fi
2497 rm -f conftest*
2498 fi
2499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2500   echo "$ac_t""yes" 1>&6
2501     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2502   cat >> confdefs.h <<EOF
2503 #define $ac_tr_hdr 1
2504 EOF
2505  
2506 else
2507   echo "$ac_t""no" 1>&6
2508 fi
2509 done
2510
2511 for ac_hdr in sys/syslog.h syslog.h
2512 do
2513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2515 echo "configure:2516: checking for $ac_hdr" >&5
2516 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2517   echo $ac_n "(cached) $ac_c" 1>&6
2518 else
2519   cat > conftest.$ac_ext <<EOF
2520 #line 2521 "configure"
2521 #include "confdefs.h"
2522 #include <$ac_hdr>
2523 EOF
2524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2525 { (eval echo configure:2526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2527 if test -z "$ac_err"; then
2528   rm -rf conftest*
2529   eval "ac_cv_header_$ac_safe=yes"
2530 else
2531   echo "$ac_err" >&5
2532   echo "configure: failed program was:" >&5
2533   cat conftest.$ac_ext >&5
2534   rm -rf conftest*
2535   eval "ac_cv_header_$ac_safe=no"
2536 fi
2537 rm -f conftest*
2538 fi
2539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2540   echo "$ac_t""yes" 1>&6
2541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2542   cat >> confdefs.h <<EOF
2543 #define $ac_tr_hdr 1
2544 EOF
2545  
2546 else
2547   echo "$ac_t""no" 1>&6
2548 fi
2549 done
2550
2551
2552 #
2553 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2554 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2555 #
2556 case "$host_os" in
2557     *hpux*)
2558                 cat > conftest.$ac_ext <<EOF
2559 #line 2560 "configure"
2560 #include "confdefs.h"
2561 #include <shadow.h>
2562 int main() {
2563 struct spwd testme
2564 ; return 0; }
2565 EOF
2566 if { (eval echo configure:2567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2567   rm -rf conftest*
2568   ac_cv_header_shadow_h=yes
2569 else
2570   echo "configure: failed program was:" >&5
2571   cat conftest.$ac_ext >&5
2572   rm -rf conftest*
2573   ac_cv_header_shadow_h=no
2574 fi
2575 rm -f conftest*
2576                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2577                    cat >> confdefs.h <<\EOF
2578 #define HAVE_SHADOW_H 1
2579 EOF
2580
2581                 fi
2582         ;;
2583 esac
2584 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2585 do
2586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2587 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2588 echo "configure:2589: checking for $ac_hdr" >&5
2589 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2590   echo $ac_n "(cached) $ac_c" 1>&6
2591 else
2592   cat > conftest.$ac_ext <<EOF
2593 #line 2594 "configure"
2594 #include "confdefs.h"
2595 #include <$ac_hdr>
2596 EOF
2597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2598 { (eval echo configure:2599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2600 if test -z "$ac_err"; then
2601   rm -rf conftest*
2602   eval "ac_cv_header_$ac_safe=yes"
2603 else
2604   echo "$ac_err" >&5
2605   echo "configure: failed program was:" >&5
2606   cat conftest.$ac_ext >&5
2607   rm -rf conftest*
2608   eval "ac_cv_header_$ac_safe=no"
2609 fi
2610 rm -f conftest*
2611 fi
2612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2613   echo "$ac_t""yes" 1>&6
2614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2615   cat >> confdefs.h <<EOF
2616 #define $ac_tr_hdr 1
2617 EOF
2618  
2619 else
2620   echo "$ac_t""no" 1>&6
2621 fi
2622 done
2623
2624 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2625 do
2626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2628 echo "configure:2629: checking for $ac_hdr" >&5
2629 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2630   echo $ac_n "(cached) $ac_c" 1>&6
2631 else
2632   cat > conftest.$ac_ext <<EOF
2633 #line 2634 "configure"
2634 #include "confdefs.h"
2635 #include <$ac_hdr>
2636 EOF
2637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2638 { (eval echo configure:2639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2640 if test -z "$ac_err"; then
2641   rm -rf conftest*
2642   eval "ac_cv_header_$ac_safe=yes"
2643 else
2644   echo "$ac_err" >&5
2645   echo "configure: failed program was:" >&5
2646   cat conftest.$ac_ext >&5
2647   rm -rf conftest*
2648   eval "ac_cv_header_$ac_safe=no"
2649 fi
2650 rm -f conftest*
2651 fi
2652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2653   echo "$ac_t""yes" 1>&6
2654     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2655   cat >> confdefs.h <<EOF
2656 #define $ac_tr_hdr 1
2657 EOF
2658  
2659 else
2660   echo "$ac_t""no" 1>&6
2661 fi
2662 done
2663
2664 for ac_hdr in stropts.h poll.h
2665 do
2666 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2667 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2668 echo "configure:2669: checking for $ac_hdr" >&5
2669 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2670   echo $ac_n "(cached) $ac_c" 1>&6
2671 else
2672   cat > conftest.$ac_ext <<EOF
2673 #line 2674 "configure"
2674 #include "confdefs.h"
2675 #include <$ac_hdr>
2676 EOF
2677 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2678 { (eval echo configure:2679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2679 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2680 if test -z "$ac_err"; then
2681   rm -rf conftest*
2682   eval "ac_cv_header_$ac_safe=yes"
2683 else
2684   echo "$ac_err" >&5
2685   echo "configure: failed program was:" >&5
2686   cat conftest.$ac_ext >&5
2687   rm -rf conftest*
2688   eval "ac_cv_header_$ac_safe=no"
2689 fi
2690 rm -f conftest*
2691 fi
2692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2693   echo "$ac_t""yes" 1>&6
2694     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2695   cat >> confdefs.h <<EOF
2696 #define $ac_tr_hdr 1
2697 EOF
2698  
2699 else
2700   echo "$ac_t""no" 1>&6
2701 fi
2702 done
2703
2704 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2705 do
2706 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2707 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2708 echo "configure:2709: checking for $ac_hdr" >&5
2709 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2710   echo $ac_n "(cached) $ac_c" 1>&6
2711 else
2712   cat > conftest.$ac_ext <<EOF
2713 #line 2714 "configure"
2714 #include "confdefs.h"
2715 #include <$ac_hdr>
2716 EOF
2717 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2718 { (eval echo configure:2719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2719 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2720 if test -z "$ac_err"; then
2721   rm -rf conftest*
2722   eval "ac_cv_header_$ac_safe=yes"
2723 else
2724   echo "$ac_err" >&5
2725   echo "configure: failed program was:" >&5
2726   cat conftest.$ac_ext >&5
2727   rm -rf conftest*
2728   eval "ac_cv_header_$ac_safe=no"
2729 fi
2730 rm -f conftest*
2731 fi
2732 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2733   echo "$ac_t""yes" 1>&6
2734     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2735   cat >> confdefs.h <<EOF
2736 #define $ac_tr_hdr 1
2737 EOF
2738  
2739 else
2740   echo "$ac_t""no" 1>&6
2741 fi
2742 done
2743
2744 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2745 do
2746 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2747 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2748 echo "configure:2749: checking for $ac_hdr" >&5
2749 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2750   echo $ac_n "(cached) $ac_c" 1>&6
2751 else
2752   cat > conftest.$ac_ext <<EOF
2753 #line 2754 "configure"
2754 #include "confdefs.h"
2755 #include <$ac_hdr>
2756 EOF
2757 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2758 { (eval echo configure:2759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2759 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2760 if test -z "$ac_err"; then
2761   rm -rf conftest*
2762   eval "ac_cv_header_$ac_safe=yes"
2763 else
2764   echo "$ac_err" >&5
2765   echo "configure: failed program was:" >&5
2766   cat conftest.$ac_ext >&5
2767   rm -rf conftest*
2768   eval "ac_cv_header_$ac_safe=no"
2769 fi
2770 rm -f conftest*
2771 fi
2772 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2773   echo "$ac_t""yes" 1>&6
2774     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2775   cat >> confdefs.h <<EOF
2776 #define $ac_tr_hdr 1
2777 EOF
2778  
2779 else
2780   echo "$ac_t""no" 1>&6
2781 fi
2782 done
2783
2784
2785 # For experimental utmp support (lastlog on some BSD-like systems)
2786 for ac_hdr in utmp.h utmpx.h lastlog.h
2787 do
2788 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2789 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2790 echo "configure:2791: checking for $ac_hdr" >&5
2791 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2792   echo $ac_n "(cached) $ac_c" 1>&6
2793 else
2794   cat > conftest.$ac_ext <<EOF
2795 #line 2796 "configure"
2796 #include "confdefs.h"
2797 #include <$ac_hdr>
2798 EOF
2799 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2800 { (eval echo configure:2801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2801 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2802 if test -z "$ac_err"; then
2803   rm -rf conftest*
2804   eval "ac_cv_header_$ac_safe=yes"
2805 else
2806   echo "$ac_err" >&5
2807   echo "configure: failed program was:" >&5
2808   cat conftest.$ac_ext >&5
2809   rm -rf conftest*
2810   eval "ac_cv_header_$ac_safe=no"
2811 fi
2812 rm -f conftest*
2813 fi
2814 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2815   echo "$ac_t""yes" 1>&6
2816     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2817   cat >> confdefs.h <<EOF
2818 #define $ac_tr_hdr 1
2819 EOF
2820  
2821 else
2822   echo "$ac_t""no" 1>&6
2823 fi
2824 done
2825
2826  
2827 # For quotas on Veritas VxFS filesystems
2828 for ac_hdr in sys/fs/vx_quota.h
2829 do
2830 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2831 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2832 echo "configure:2833: checking for $ac_hdr" >&5
2833 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2834   echo $ac_n "(cached) $ac_c" 1>&6
2835 else
2836   cat > conftest.$ac_ext <<EOF
2837 #line 2838 "configure"
2838 #include "confdefs.h"
2839 #include <$ac_hdr>
2840 EOF
2841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2842 { (eval echo configure:2843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2844 if test -z "$ac_err"; then
2845   rm -rf conftest*
2846   eval "ac_cv_header_$ac_safe=yes"
2847 else
2848   echo "$ac_err" >&5
2849   echo "configure: failed program was:" >&5
2850   cat conftest.$ac_ext >&5
2851   rm -rf conftest*
2852   eval "ac_cv_header_$ac_safe=no"
2853 fi
2854 rm -f conftest*
2855 fi
2856 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2857   echo "$ac_t""yes" 1>&6
2858     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2859   cat >> confdefs.h <<EOF
2860 #define $ac_tr_hdr 1
2861 EOF
2862  
2863 else
2864   echo "$ac_t""no" 1>&6
2865 fi
2866 done
2867
2868
2869 # For quotas on Linux XFS filesystems
2870 for ac_hdr in linux/xqm.h
2871 do
2872 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2873 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2874 echo "configure:2875: checking for $ac_hdr" >&5
2875 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2876   echo $ac_n "(cached) $ac_c" 1>&6
2877 else
2878   cat > conftest.$ac_ext <<EOF
2879 #line 2880 "configure"
2880 #include "confdefs.h"
2881 #include <$ac_hdr>
2882 EOF
2883 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2884 { (eval echo configure:2885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2885 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2886 if test -z "$ac_err"; then
2887   rm -rf conftest*
2888   eval "ac_cv_header_$ac_safe=yes"
2889 else
2890   echo "$ac_err" >&5
2891   echo "configure: failed program was:" >&5
2892   cat conftest.$ac_ext >&5
2893   rm -rf conftest*
2894   eval "ac_cv_header_$ac_safe=no"
2895 fi
2896 rm -f conftest*
2897 fi
2898 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2899   echo "$ac_t""yes" 1>&6
2900     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2901   cat >> confdefs.h <<EOF
2902 #define $ac_tr_hdr 1
2903 EOF
2904  
2905 else
2906   echo "$ac_t""no" 1>&6
2907 fi
2908 done
2909
2910
2911 echo $ac_n "checking size of int""... $ac_c" 1>&6
2912 echo "configure:2913: checking size of int" >&5
2913 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2914   echo $ac_n "(cached) $ac_c" 1>&6
2915 else
2916   if test "$cross_compiling" = yes; then
2917   ac_cv_sizeof_int=cross
2918 else
2919   cat > conftest.$ac_ext <<EOF
2920 #line 2921 "configure"
2921 #include "confdefs.h"
2922 #include <stdio.h>
2923 int main()
2924 {
2925   FILE *f=fopen("conftestval", "w");
2926   if (!f) return(1);
2927   fprintf(f, "%d\n", sizeof(int));
2928   return(0);
2929 }
2930 EOF
2931 if { (eval echo configure:2932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2932 then
2933   ac_cv_sizeof_int=`cat conftestval`
2934 else
2935   echo "configure: failed program was:" >&5
2936   cat conftest.$ac_ext >&5
2937   rm -fr conftest*
2938   ac_cv_sizeof_int=0
2939 fi
2940 rm -fr conftest*
2941 fi
2942
2943 fi
2944 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2945 cat >> confdefs.h <<EOF
2946 #define SIZEOF_INT $ac_cv_sizeof_int
2947 EOF
2948
2949
2950 echo $ac_n "checking size of long""... $ac_c" 1>&6
2951 echo "configure:2952: checking size of long" >&5
2952 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2953   echo $ac_n "(cached) $ac_c" 1>&6
2954 else
2955   if test "$cross_compiling" = yes; then
2956   ac_cv_sizeof_long=cross
2957 else
2958   cat > conftest.$ac_ext <<EOF
2959 #line 2960 "configure"
2960 #include "confdefs.h"
2961 #include <stdio.h>
2962 int main()
2963 {
2964   FILE *f=fopen("conftestval", "w");
2965   if (!f) return(1);
2966   fprintf(f, "%d\n", sizeof(long));
2967   return(0);
2968 }
2969 EOF
2970 if { (eval echo configure:2971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2971 then
2972   ac_cv_sizeof_long=`cat conftestval`
2973 else
2974   echo "configure: failed program was:" >&5
2975   cat conftest.$ac_ext >&5
2976   rm -fr conftest*
2977   ac_cv_sizeof_long=0
2978 fi
2979 rm -fr conftest*
2980 fi
2981
2982 fi
2983 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2984 cat >> confdefs.h <<EOF
2985 #define SIZEOF_LONG $ac_cv_sizeof_long
2986 EOF
2987
2988
2989 echo $ac_n "checking size of short""... $ac_c" 1>&6
2990 echo "configure:2991: checking size of short" >&5
2991 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2992   echo $ac_n "(cached) $ac_c" 1>&6
2993 else
2994   if test "$cross_compiling" = yes; then
2995   ac_cv_sizeof_short=cross
2996 else
2997   cat > conftest.$ac_ext <<EOF
2998 #line 2999 "configure"
2999 #include "confdefs.h"
3000 #include <stdio.h>
3001 int main()
3002 {
3003   FILE *f=fopen("conftestval", "w");
3004   if (!f) return(1);
3005   fprintf(f, "%d\n", sizeof(short));
3006   return(0);
3007 }
3008 EOF
3009 if { (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3010 then
3011   ac_cv_sizeof_short=`cat conftestval`
3012 else
3013   echo "configure: failed program was:" >&5
3014   cat conftest.$ac_ext >&5
3015   rm -fr conftest*
3016   ac_cv_sizeof_short=0
3017 fi
3018 rm -fr conftest*
3019 fi
3020
3021 fi
3022 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3023 cat >> confdefs.h <<EOF
3024 #define SIZEOF_SHORT $ac_cv_sizeof_short
3025 EOF
3026
3027
3028
3029 echo $ac_n "checking for working const""... $ac_c" 1>&6
3030 echo "configure:3031: checking for working const" >&5
3031 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3032   echo $ac_n "(cached) $ac_c" 1>&6
3033 else
3034   cat > conftest.$ac_ext <<EOF
3035 #line 3036 "configure"
3036 #include "confdefs.h"
3037
3038 int main() {
3039
3040 /* Ultrix mips cc rejects this.  */
3041 typedef int charset[2]; const charset x;
3042 /* SunOS 4.1.1 cc rejects this.  */
3043 char const *const *ccp;
3044 char **p;
3045 /* NEC SVR4.0.2 mips cc rejects this.  */
3046 struct point {int x, y;};
3047 static struct point const zero = {0,0};
3048 /* AIX XL C 1.02.0.0 rejects this.
3049    It does not let you subtract one const X* pointer from another in an arm
3050    of an if-expression whose if-part is not a constant expression */
3051 const char *g = "string";
3052 ccp = &g + (g ? g-g : 0);
3053 /* HPUX 7.0 cc rejects these. */
3054 ++ccp;
3055 p = (char**) ccp;
3056 ccp = (char const *const *) p;
3057 { /* SCO 3.2v4 cc rejects this.  */
3058   char *t;
3059   char const *s = 0 ? (char *) 0 : (char const *) 0;
3060
3061   *t++ = 0;
3062 }
3063 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3064   int x[] = {25, 17};
3065   const int *foo = &x[0];
3066   ++foo;
3067 }
3068 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3069   typedef const int *iptr;
3070   iptr p = 0;
3071   ++p;
3072 }
3073 { /* AIX XL C 1.02.0.0 rejects this saying
3074      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3075   struct s { int j; const int *ap[3]; };
3076   struct s *b; b->j = 5;
3077 }
3078 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3079   const int foo = 10;
3080 }
3081
3082 ; return 0; }
3083 EOF
3084 if { (eval echo configure:3085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3085   rm -rf conftest*
3086   ac_cv_c_const=yes
3087 else
3088   echo "configure: failed program was:" >&5
3089   cat conftest.$ac_ext >&5
3090   rm -rf conftest*
3091   ac_cv_c_const=no
3092 fi
3093 rm -f conftest*
3094 fi
3095
3096 echo "$ac_t""$ac_cv_c_const" 1>&6
3097 if test $ac_cv_c_const = no; then
3098   cat >> confdefs.h <<\EOF
3099 #define const 
3100 EOF
3101
3102 fi
3103
3104 echo $ac_n "checking for inline""... $ac_c" 1>&6
3105 echo "configure:3106: checking for inline" >&5
3106 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3107   echo $ac_n "(cached) $ac_c" 1>&6
3108 else
3109   ac_cv_c_inline=no
3110 for ac_kw in inline __inline__ __inline; do
3111   cat > conftest.$ac_ext <<EOF
3112 #line 3113 "configure"
3113 #include "confdefs.h"
3114
3115 int main() {
3116 } $ac_kw foo() {
3117 ; return 0; }
3118 EOF
3119 if { (eval echo configure:3120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3120   rm -rf conftest*
3121   ac_cv_c_inline=$ac_kw; break
3122 else
3123   echo "configure: failed program was:" >&5
3124   cat conftest.$ac_ext >&5
3125 fi
3126 rm -f conftest*
3127 done
3128
3129 fi
3130
3131 echo "$ac_t""$ac_cv_c_inline" 1>&6
3132 case "$ac_cv_c_inline" in
3133   inline | yes) ;;
3134   no) cat >> confdefs.h <<\EOF
3135 #define inline 
3136 EOF
3137  ;;
3138   *)  cat >> confdefs.h <<EOF
3139 #define inline $ac_cv_c_inline
3140 EOF
3141  ;;
3142 esac
3143
3144 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3145 echo "configure:3146: checking whether byte ordering is bigendian" >&5
3146 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3147   echo $ac_n "(cached) $ac_c" 1>&6
3148 else
3149   ac_cv_c_bigendian=unknown
3150 # See if sys/param.h defines the BYTE_ORDER macro.
3151 cat > conftest.$ac_ext <<EOF
3152 #line 3153 "configure"
3153 #include "confdefs.h"
3154 #include <sys/types.h>
3155 #include <sys/param.h>
3156 int main() {
3157
3158 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3159  bogus endian macros
3160 #endif
3161 ; return 0; }
3162 EOF
3163 if { (eval echo configure:3164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3164   rm -rf conftest*
3165   # It does; now see whether it defined to BIG_ENDIAN or not.
3166 cat > conftest.$ac_ext <<EOF
3167 #line 3168 "configure"
3168 #include "confdefs.h"
3169 #include <sys/types.h>
3170 #include <sys/param.h>
3171 int main() {
3172
3173 #if BYTE_ORDER != BIG_ENDIAN
3174  not big endian
3175 #endif
3176 ; return 0; }
3177 EOF
3178 if { (eval echo configure:3179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3179   rm -rf conftest*
3180   ac_cv_c_bigendian=yes
3181 else
3182   echo "configure: failed program was:" >&5
3183   cat conftest.$ac_ext >&5
3184   rm -rf conftest*
3185   ac_cv_c_bigendian=no
3186 fi
3187 rm -f conftest*
3188 else
3189   echo "configure: failed program was:" >&5
3190   cat conftest.$ac_ext >&5
3191 fi
3192 rm -f conftest*
3193 if test $ac_cv_c_bigendian = unknown; then
3194 if test "$cross_compiling" = yes; then
3195     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3196 else
3197   cat > conftest.$ac_ext <<EOF
3198 #line 3199 "configure"
3199 #include "confdefs.h"
3200 main () {
3201   /* Are we little or big endian?  From Harbison&Steele.  */
3202   union
3203   {
3204     long l;
3205     char c[sizeof (long)];
3206   } u;
3207   u.l = 1;
3208   exit (u.c[sizeof (long) - 1] == 1);
3209 }
3210 EOF
3211 if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3212 then
3213   ac_cv_c_bigendian=no
3214 else
3215   echo "configure: failed program was:" >&5
3216   cat conftest.$ac_ext >&5
3217   rm -fr conftest*
3218   ac_cv_c_bigendian=yes
3219 fi
3220 rm -fr conftest*
3221 fi
3222
3223 fi
3224 fi
3225
3226 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3227 if test $ac_cv_c_bigendian = yes; then
3228   cat >> confdefs.h <<\EOF
3229 #define WORDS_BIGENDIAN 1
3230 EOF
3231
3232 fi
3233
3234 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3235 echo "configure:3236: checking whether char is unsigned" >&5
3236 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3237   echo $ac_n "(cached) $ac_c" 1>&6
3238 else
3239   if test "$GCC" = yes; then
3240   # GCC predefines this symbol on systems where it applies.
3241 cat > conftest.$ac_ext <<EOF
3242 #line 3243 "configure"
3243 #include "confdefs.h"
3244 #ifdef __CHAR_UNSIGNED__
3245   yes
3246 #endif
3247
3248 EOF
3249 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3250   egrep "yes" >/dev/null 2>&1; then
3251   rm -rf conftest*
3252   ac_cv_c_char_unsigned=yes
3253 else
3254   rm -rf conftest*
3255   ac_cv_c_char_unsigned=no
3256 fi
3257 rm -f conftest*
3258
3259 else
3260 if test "$cross_compiling" = yes; then
3261     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3262 else
3263   cat > conftest.$ac_ext <<EOF
3264 #line 3265 "configure"
3265 #include "confdefs.h"
3266 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3267 #if !defined(__STDC__) || __STDC__ != 1
3268 #define volatile
3269 #endif
3270 main() {
3271   volatile char c = 255; exit(c < 0);
3272 }
3273 EOF
3274 if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3275 then
3276   ac_cv_c_char_unsigned=yes
3277 else
3278   echo "configure: failed program was:" >&5
3279   cat conftest.$ac_ext >&5
3280   rm -fr conftest*
3281   ac_cv_c_char_unsigned=no
3282 fi
3283 rm -fr conftest*
3284 fi
3285
3286 fi
3287 fi
3288
3289 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3290 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3291   cat >> confdefs.h <<\EOF
3292 #define __CHAR_UNSIGNED__ 1
3293 EOF
3294
3295 fi
3296
3297
3298 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3299 echo "configure:3300: checking return type of signal handlers" >&5
3300 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3301   echo $ac_n "(cached) $ac_c" 1>&6
3302 else
3303   cat > conftest.$ac_ext <<EOF
3304 #line 3305 "configure"
3305 #include "confdefs.h"
3306 #include <sys/types.h>
3307 #include <signal.h>
3308 #ifdef signal
3309 #undef signal
3310 #endif
3311 #ifdef __cplusplus
3312 extern "C" void (*signal (int, void (*)(int)))(int);
3313 #else
3314 void (*signal ()) ();
3315 #endif
3316
3317 int main() {
3318 int i;
3319 ; return 0; }
3320 EOF
3321 if { (eval echo configure:3322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3322   rm -rf conftest*
3323   ac_cv_type_signal=void
3324 else
3325   echo "configure: failed program was:" >&5
3326   cat conftest.$ac_ext >&5
3327   rm -rf conftest*
3328   ac_cv_type_signal=int
3329 fi
3330 rm -f conftest*
3331 fi
3332
3333 echo "$ac_t""$ac_cv_type_signal" 1>&6
3334 cat >> confdefs.h <<EOF
3335 #define RETSIGTYPE $ac_cv_type_signal
3336 EOF
3337
3338
3339 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3340 echo "configure:3341: checking for uid_t in sys/types.h" >&5
3341 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3342   echo $ac_n "(cached) $ac_c" 1>&6
3343 else
3344   cat > conftest.$ac_ext <<EOF
3345 #line 3346 "configure"
3346 #include "confdefs.h"
3347 #include <sys/types.h>
3348 EOF
3349 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3350   egrep "uid_t" >/dev/null 2>&1; then
3351   rm -rf conftest*
3352   ac_cv_type_uid_t=yes
3353 else
3354   rm -rf conftest*
3355   ac_cv_type_uid_t=no
3356 fi
3357 rm -f conftest*
3358
3359 fi
3360
3361 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3362 if test $ac_cv_type_uid_t = no; then
3363   cat >> confdefs.h <<\EOF
3364 #define uid_t int
3365 EOF
3366
3367   cat >> confdefs.h <<\EOF
3368 #define gid_t int
3369 EOF
3370
3371 fi
3372
3373 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3374 echo "configure:3375: checking for mode_t" >&5
3375 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3376   echo $ac_n "(cached) $ac_c" 1>&6
3377 else
3378   cat > conftest.$ac_ext <<EOF
3379 #line 3380 "configure"
3380 #include "confdefs.h"
3381 #include <sys/types.h>
3382 #if STDC_HEADERS
3383 #include <stdlib.h>
3384 #include <stddef.h>
3385 #endif
3386 EOF
3387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3388   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3389   rm -rf conftest*
3390   ac_cv_type_mode_t=yes
3391 else
3392   rm -rf conftest*
3393   ac_cv_type_mode_t=no
3394 fi
3395 rm -f conftest*
3396
3397 fi
3398 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3399 if test $ac_cv_type_mode_t = no; then
3400   cat >> confdefs.h <<\EOF
3401 #define mode_t int
3402 EOF
3403
3404 fi
3405
3406 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3407 echo "configure:3408: checking for off_t" >&5
3408 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3409   echo $ac_n "(cached) $ac_c" 1>&6
3410 else
3411   cat > conftest.$ac_ext <<EOF
3412 #line 3413 "configure"
3413 #include "confdefs.h"
3414 #include <sys/types.h>
3415 #if STDC_HEADERS
3416 #include <stdlib.h>
3417 #include <stddef.h>
3418 #endif
3419 EOF
3420 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3421   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3422   rm -rf conftest*
3423   ac_cv_type_off_t=yes
3424 else
3425   rm -rf conftest*
3426   ac_cv_type_off_t=no
3427 fi
3428 rm -f conftest*
3429
3430 fi
3431 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3432 if test $ac_cv_type_off_t = no; then
3433   cat >> confdefs.h <<\EOF
3434 #define off_t long
3435 EOF
3436
3437 fi
3438
3439 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3440 echo "configure:3441: checking for size_t" >&5
3441 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3442   echo $ac_n "(cached) $ac_c" 1>&6
3443 else
3444   cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3447 #include <sys/types.h>
3448 #if STDC_HEADERS
3449 #include <stdlib.h>
3450 #include <stddef.h>
3451 #endif
3452 EOF
3453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3454   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3455   rm -rf conftest*
3456   ac_cv_type_size_t=yes
3457 else
3458   rm -rf conftest*
3459   ac_cv_type_size_t=no
3460 fi
3461 rm -f conftest*
3462
3463 fi
3464 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3465 if test $ac_cv_type_size_t = no; then
3466   cat >> confdefs.h <<\EOF
3467 #define size_t unsigned
3468 EOF
3469
3470 fi
3471
3472 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3473 echo "configure:3474: checking for pid_t" >&5
3474 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3475   echo $ac_n "(cached) $ac_c" 1>&6
3476 else
3477   cat > conftest.$ac_ext <<EOF
3478 #line 3479 "configure"
3479 #include "confdefs.h"
3480 #include <sys/types.h>
3481 #if STDC_HEADERS
3482 #include <stdlib.h>
3483 #include <stddef.h>
3484 #endif
3485 EOF
3486 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3487   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3488   rm -rf conftest*
3489   ac_cv_type_pid_t=yes
3490 else
3491   rm -rf conftest*
3492   ac_cv_type_pid_t=no
3493 fi
3494 rm -f conftest*
3495
3496 fi
3497 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3498 if test $ac_cv_type_pid_t = no; then
3499   cat >> confdefs.h <<\EOF
3500 #define pid_t int
3501 EOF
3502
3503 fi
3504
3505 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3506 echo "configure:3507: checking for st_rdev in struct stat" >&5
3507 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3508   echo $ac_n "(cached) $ac_c" 1>&6
3509 else
3510   cat > conftest.$ac_ext <<EOF
3511 #line 3512 "configure"
3512 #include "confdefs.h"
3513 #include <sys/types.h>
3514 #include <sys/stat.h>
3515 int main() {
3516 struct stat s; s.st_rdev;
3517 ; return 0; }
3518 EOF
3519 if { (eval echo configure:3520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3520   rm -rf conftest*
3521   ac_cv_struct_st_rdev=yes
3522 else
3523   echo "configure: failed program was:" >&5
3524   cat conftest.$ac_ext >&5
3525   rm -rf conftest*
3526   ac_cv_struct_st_rdev=no
3527 fi
3528 rm -f conftest*
3529 fi
3530
3531 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3532 if test $ac_cv_struct_st_rdev = yes; then
3533   cat >> confdefs.h <<\EOF
3534 #define HAVE_ST_RDEV 1
3535 EOF
3536
3537 fi
3538
3539 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3540 echo "configure:3541: checking for d_off in dirent" >&5
3541 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3542   echo $ac_n "(cached) $ac_c" 1>&6
3543 else
3544   cat > conftest.$ac_ext <<EOF
3545 #line 3546 "configure"
3546 #include "confdefs.h"
3547
3548 #include <unistd.h>
3549 #include <sys/types.h>
3550 #include <dirent.h>
3551 int main() {
3552 struct dirent d; d.d_off;
3553 ; return 0; }
3554 EOF
3555 if { (eval echo configure:3556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3556   rm -rf conftest*
3557   ac_cv_dirent_d_off=yes
3558 else
3559   echo "configure: failed program was:" >&5
3560   cat conftest.$ac_ext >&5
3561   rm -rf conftest*
3562   ac_cv_dirent_d_off=no
3563 fi
3564 rm -f conftest*
3565 fi
3566
3567 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3568 if test $ac_cv_dirent_d_off = yes; then
3569   cat >> confdefs.h <<\EOF
3570 #define HAVE_DIRENT_D_OFF 1
3571 EOF
3572
3573 fi
3574
3575 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3576 echo "configure:3577: checking for ino_t" >&5
3577 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3578   echo $ac_n "(cached) $ac_c" 1>&6
3579 else
3580   cat > conftest.$ac_ext <<EOF
3581 #line 3582 "configure"
3582 #include "confdefs.h"
3583 #include <sys/types.h>
3584 #if STDC_HEADERS
3585 #include <stdlib.h>
3586 #include <stddef.h>
3587 #endif
3588 EOF
3589 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3590   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3591   rm -rf conftest*
3592   ac_cv_type_ino_t=yes
3593 else
3594   rm -rf conftest*
3595   ac_cv_type_ino_t=no
3596 fi
3597 rm -f conftest*
3598
3599 fi
3600 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3601 if test $ac_cv_type_ino_t = no; then
3602   cat >> confdefs.h <<\EOF
3603 #define ino_t unsigned
3604 EOF
3605
3606 fi
3607
3608 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3609 echo "configure:3610: checking for loff_t" >&5
3610 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3611   echo $ac_n "(cached) $ac_c" 1>&6
3612 else
3613   cat > conftest.$ac_ext <<EOF
3614 #line 3615 "configure"
3615 #include "confdefs.h"
3616 #include <sys/types.h>
3617 #if STDC_HEADERS
3618 #include <stdlib.h>
3619 #include <stddef.h>
3620 #endif
3621 EOF
3622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3623   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3624   rm -rf conftest*
3625   ac_cv_type_loff_t=yes
3626 else
3627   rm -rf conftest*
3628   ac_cv_type_loff_t=no
3629 fi
3630 rm -f conftest*
3631
3632 fi
3633 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3634 if test $ac_cv_type_loff_t = no; then
3635   cat >> confdefs.h <<\EOF
3636 #define loff_t off_t
3637 EOF
3638
3639 fi
3640
3641 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3642 echo "configure:3643: checking for offset_t" >&5
3643 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3644   echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646   cat > conftest.$ac_ext <<EOF
3647 #line 3648 "configure"
3648 #include "confdefs.h"
3649 #include <sys/types.h>
3650 #if STDC_HEADERS
3651 #include <stdlib.h>
3652 #include <stddef.h>
3653 #endif
3654 EOF
3655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3656   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3657   rm -rf conftest*
3658   ac_cv_type_offset_t=yes
3659 else
3660   rm -rf conftest*
3661   ac_cv_type_offset_t=no
3662 fi
3663 rm -f conftest*
3664
3665 fi
3666 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3667 if test $ac_cv_type_offset_t = no; then
3668   cat >> confdefs.h <<\EOF
3669 #define offset_t loff_t
3670 EOF
3671
3672 fi
3673
3674 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3675 echo "configure:3676: checking for ssize_t" >&5
3676 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3677   echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679   cat > conftest.$ac_ext <<EOF
3680 #line 3681 "configure"
3681 #include "confdefs.h"
3682 #include <sys/types.h>
3683 #if STDC_HEADERS
3684 #include <stdlib.h>
3685 #include <stddef.h>
3686 #endif
3687 EOF
3688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3689   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3690   rm -rf conftest*
3691   ac_cv_type_ssize_t=yes
3692 else
3693   rm -rf conftest*
3694   ac_cv_type_ssize_t=no
3695 fi
3696 rm -f conftest*
3697
3698 fi
3699 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3700 if test $ac_cv_type_ssize_t = no; then
3701   cat >> confdefs.h <<\EOF
3702 #define ssize_t int
3703 EOF
3704
3705 fi
3706
3707 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3708 echo "configure:3709: checking for wchar_t" >&5
3709 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3710   echo $ac_n "(cached) $ac_c" 1>&6
3711 else
3712   cat > conftest.$ac_ext <<EOF
3713 #line 3714 "configure"
3714 #include "confdefs.h"
3715 #include <sys/types.h>
3716 #if STDC_HEADERS
3717 #include <stdlib.h>
3718 #include <stddef.h>
3719 #endif
3720 EOF
3721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3722   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3723   rm -rf conftest*
3724   ac_cv_type_wchar_t=yes
3725 else
3726   rm -rf conftest*
3727   ac_cv_type_wchar_t=no
3728 fi
3729 rm -f conftest*
3730
3731 fi
3732 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3733 if test $ac_cv_type_wchar_t = no; then
3734   cat >> confdefs.h <<\EOF
3735 #define wchar_t unsigned short
3736 EOF
3737
3738 fi
3739
3740
3741 ############################################
3742 # for cups support we need libcups, and a handful of header files
3743
3744 # Check whether --enable-cups or --disable-cups was given.
3745 if test "${enable_cups+set}" = set; then
3746   enableval="$enable_cups"
3747   :
3748 fi
3749
3750
3751 if test x$enable_cups != xno; then
3752         # Extract the first word of "cups-config", so it can be a program name with args.
3753 set dummy cups-config; ac_word=$2
3754 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3755 echo "configure:3756: checking for $ac_word" >&5
3756 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
3757   echo $ac_n "(cached) $ac_c" 1>&6
3758 else
3759   case "$CUPS_CONFIG" in
3760   /*)
3761   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
3762   ;;
3763   ?:/*)                  
3764   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
3765   ;;
3766   *)
3767   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3768   ac_dummy="$PATH"
3769   for ac_dir in $ac_dummy; do 
3770     test -z "$ac_dir" && ac_dir=.
3771     if test -f $ac_dir/$ac_word; then
3772       ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
3773       break
3774     fi
3775   done
3776   IFS="$ac_save_ifs"
3777   ;;
3778 esac
3779 fi
3780 CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
3781 if test -n "$CUPS_CONFIG"; then
3782   echo "$ac_t""$CUPS_CONFIG" 1>&6
3783 else
3784   echo "$ac_t""no" 1>&6
3785 fi
3786
3787
3788         if test "x$CUPS_CONFIG" != x; then
3789                         cat >> confdefs.h <<\EOF
3790 #define HAVE_CUPS 1
3791 EOF
3792
3793                 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
3794                 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
3795                 PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`"
3796         fi
3797 fi
3798
3799 ############################################
3800 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3801 for ac_func in dlopen
3802 do
3803 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3804 echo "configure:3805: checking for $ac_func" >&5
3805 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3806   echo $ac_n "(cached) $ac_c" 1>&6
3807 else
3808   cat > conftest.$ac_ext <<EOF
3809 #line 3810 "configure"
3810 #include "confdefs.h"
3811 /* System header to define __stub macros and hopefully few prototypes,
3812     which can conflict with char $ac_func(); below.  */
3813 #include <assert.h>
3814 /* Override any gcc2 internal prototype to avoid an error.  */
3815 /* We use char because int might match the return type of a gcc2
3816     builtin and then its argument prototype would still apply.  */
3817 char $ac_func();
3818
3819 int main() {
3820
3821 /* The GNU C library defines this for functions which it implements
3822     to always fail with ENOSYS.  Some functions are actually named
3823     something starting with __ and the normal name is an alias.  */
3824 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3825 choke me
3826 #else
3827 $ac_func();
3828 #endif
3829
3830 ; return 0; }
3831 EOF
3832 if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3833   rm -rf conftest*
3834   eval "ac_cv_func_$ac_func=yes"
3835 else
3836   echo "configure: failed program was:" >&5
3837   cat conftest.$ac_ext >&5
3838   rm -rf conftest*
3839   eval "ac_cv_func_$ac_func=no"
3840 fi
3841 rm -f conftest*
3842 fi
3843
3844 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3845   echo "$ac_t""yes" 1>&6
3846     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3847   cat >> confdefs.h <<EOF
3848 #define $ac_tr_func 1
3849 EOF
3850  
3851 else
3852   echo "$ac_t""no" 1>&6
3853 fi
3854 done
3855
3856 if test x"$ac_cv_func_dlopen" = x"no"; then
3857     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3858 echo "configure:3859: checking for dlopen in -ldl" >&5
3859 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3860 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3861   echo $ac_n "(cached) $ac_c" 1>&6
3862 else
3863   ac_save_LIBS="$LIBS"
3864 LIBS="-ldl  $LIBS"
3865 cat > conftest.$ac_ext <<EOF
3866 #line 3867 "configure"
3867 #include "confdefs.h"
3868 /* Override any gcc2 internal prototype to avoid an error.  */
3869 /* We use char because int might match the return type of a gcc2
3870     builtin and then its argument prototype would still apply.  */
3871 char dlopen();
3872
3873 int main() {
3874 dlopen()
3875 ; return 0; }
3876 EOF
3877 if { (eval echo configure:3878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3878   rm -rf conftest*
3879   eval "ac_cv_lib_$ac_lib_var=yes"
3880 else
3881   echo "configure: failed program was:" >&5
3882   cat conftest.$ac_ext >&5
3883   rm -rf conftest*
3884   eval "ac_cv_lib_$ac_lib_var=no"
3885 fi
3886 rm -f conftest*
3887 LIBS="$ac_save_LIBS"
3888
3889 fi
3890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3891   echo "$ac_t""yes" 1>&6
3892   LIBS="$LIBS -ldl";
3893         cat >> confdefs.h <<\EOF
3894 #define HAVE_DLOPEN 1
3895 EOF
3896
3897 else
3898   echo "$ac_t""no" 1>&6
3899 fi
3900
3901 fi
3902 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3903
3904 ############################################
3905 # check if the compiler can do immediate structures
3906 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3907 echo "configure:3908: checking for immediate structures" >&5
3908 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3909   echo $ac_n "(cached) $ac_c" 1>&6
3910 else
3911   
3912     cat > conftest.$ac_ext <<EOF
3913 #line 3914 "configure"
3914 #include "confdefs.h"
3915
3916 #include <stdio.h>
3917 int main() {
3918
3919    typedef struct {unsigned x;} FOOBAR;
3920    #define X_FOOBAR(x) ((FOOBAR) { x })
3921    #define FOO_ONE X_FOOBAR(1)
3922    FOOBAR f = FOO_ONE;   
3923    static struct {
3924         FOOBAR y; 
3925         } f2[] = {
3926                 {FOO_ONE}
3927         };   
3928
3929 ; return 0; }
3930 EOF
3931 if { (eval echo configure:3932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3932   rm -rf conftest*
3933   samba_cv_immediate_structures=yes
3934 else
3935   echo "configure: failed program was:" >&5
3936   cat conftest.$ac_ext >&5
3937   rm -rf conftest*
3938   samba_cv_immediate_structures=no
3939 fi
3940 rm -f conftest*
3941 fi
3942
3943 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3944 if test x"$samba_cv_immediate_structures" = x"yes"; then
3945    cat >> confdefs.h <<\EOF
3946 #define HAVE_IMMEDIATE_STRUCTURES 1
3947 EOF
3948
3949 fi
3950
3951 ############################################
3952 # check for unix domain sockets
3953 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3954 echo "configure:3955: checking for unix domain sockets" >&5
3955 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3956   echo $ac_n "(cached) $ac_c" 1>&6
3957 else
3958   
3959     cat > conftest.$ac_ext <<EOF
3960 #line 3961 "configure"
3961 #include "confdefs.h"
3962
3963 #include <sys/types.h>
3964 #include <stdlib.h>
3965 #include <stddef.h>
3966 #include <sys/socket.h>
3967 #include <sys/un.h>
3968 int main() {
3969
3970   struct sockaddr_un sunaddr; 
3971   sunaddr.sun_family = AF_UNIX;
3972
3973 ; return 0; }
3974 EOF
3975 if { (eval echo configure:3976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3976   rm -rf conftest*
3977   samba_cv_unixsocket=yes
3978 else
3979   echo "configure: failed program was:" >&5
3980   cat conftest.$ac_ext >&5
3981   rm -rf conftest*
3982   samba_cv_unixsocket=no
3983 fi
3984 rm -f conftest*
3985 fi
3986
3987 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3988 if test x"$samba_cv_unixsocket" = x"yes"; then
3989    cat >> confdefs.h <<\EOF
3990 #define HAVE_UNIXSOCKET 1
3991 EOF
3992
3993 fi
3994
3995
3996 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3997 echo "configure:3998: checking for socklen_t type" >&5
3998 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3999   echo $ac_n "(cached) $ac_c" 1>&6
4000 else
4001   
4002     cat > conftest.$ac_ext <<EOF
4003 #line 4004 "configure"
4004 #include "confdefs.h"
4005
4006 #include <sys/types.h>
4007 #if STDC_HEADERS
4008 #include <stdlib.h>
4009 #include <stddef.h>
4010 #endif
4011 #include <sys/socket.h>
4012 int main() {
4013 socklen_t i = 0
4014 ; return 0; }
4015 EOF
4016 if { (eval echo configure:4017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4017   rm -rf conftest*
4018   samba_cv_socklen_t=yes
4019 else
4020   echo "configure: failed program was:" >&5
4021   cat conftest.$ac_ext >&5
4022   rm -rf conftest*
4023   samba_cv_socklen_t=no
4024 fi
4025 rm -f conftest*
4026 fi
4027
4028 echo "$ac_t""$samba_cv_socklen_t" 1>&6
4029 if test x"$samba_cv_socklen_t" = x"yes"; then
4030    cat >> confdefs.h <<\EOF
4031 #define HAVE_SOCKLEN_T_TYPE 1
4032 EOF
4033
4034 fi
4035
4036 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
4037 echo "configure:4038: checking for sig_atomic_t type" >&5
4038 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
4039   echo $ac_n "(cached) $ac_c" 1>&6
4040 else
4041   
4042     cat > conftest.$ac_ext <<EOF
4043 #line 4044 "configure"
4044 #include "confdefs.h"
4045
4046 #include <sys/types.h>
4047 #if STDC_HEADERS
4048 #include <stdlib.h>
4049 #include <stddef.h>
4050 #endif
4051 #include <signal.h>
4052 int main() {
4053 sig_atomic_t i = 0
4054 ; return 0; }
4055 EOF
4056 if { (eval echo configure:4057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4057   rm -rf conftest*
4058   samba_cv_sig_atomic_t=yes
4059 else
4060   echo "configure: failed program was:" >&5
4061   cat conftest.$ac_ext >&5
4062   rm -rf conftest*
4063   samba_cv_sig_atomic_t=no
4064 fi
4065 rm -f conftest*
4066 fi
4067
4068 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4069 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4070    cat >> confdefs.h <<\EOF
4071 #define HAVE_SIG_ATOMIC_T_TYPE 1
4072 EOF
4073
4074 fi
4075
4076 # stupid headers have the functions but no declaration. grrrr.
4077
4078  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4079 echo "configure:4080: checking for errno declaration" >&5
4080 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4081   echo $ac_n "(cached) $ac_c" 1>&6
4082 else
4083   
4084     cat > conftest.$ac_ext <<EOF
4085 #line 4086 "configure"
4086 #include "confdefs.h"
4087 #include <errno.h>
4088 int main() {
4089 int i = (int)errno
4090 ; return 0; }
4091 EOF
4092 if { (eval echo configure:4093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4093   rm -rf conftest*
4094   ac_cv_have_errno_decl=yes
4095 else
4096   echo "configure: failed program was:" >&5
4097   cat conftest.$ac_ext >&5
4098   rm -rf conftest*
4099   ac_cv_have_errno_decl=no
4100 fi
4101 rm -f conftest*
4102 fi
4103
4104 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4105  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4106     cat >> confdefs.h <<\EOF
4107 #define HAVE_ERRNO_DECL 1
4108 EOF
4109
4110  fi
4111
4112
4113  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4114 echo "configure:4115: checking for setresuid declaration" >&5
4115 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4116   echo $ac_n "(cached) $ac_c" 1>&6
4117 else
4118   
4119     cat > conftest.$ac_ext <<EOF
4120 #line 4121 "configure"
4121 #include "confdefs.h"
4122 #include <unistd.h>
4123 int main() {
4124 int i = (int)setresuid
4125 ; return 0; }
4126 EOF
4127 if { (eval echo configure:4128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4128   rm -rf conftest*
4129   ac_cv_have_setresuid_decl=yes
4130 else
4131   echo "configure: failed program was:" >&5
4132   cat conftest.$ac_ext >&5
4133   rm -rf conftest*
4134   ac_cv_have_setresuid_decl=no
4135 fi
4136 rm -f conftest*
4137 fi
4138
4139 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4140  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4141     cat >> confdefs.h <<\EOF
4142 #define HAVE_SETRESUID_DECL 1
4143 EOF
4144
4145  fi
4146
4147
4148  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4149 echo "configure:4150: checking for setresgid declaration" >&5
4150 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4151   echo $ac_n "(cached) $ac_c" 1>&6
4152 else
4153   
4154     cat > conftest.$ac_ext <<EOF
4155 #line 4156 "configure"
4156 #include "confdefs.h"
4157 #include <unistd.h>
4158 int main() {
4159 int i = (int)setresgid
4160 ; return 0; }
4161 EOF
4162 if { (eval echo configure:4163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4163   rm -rf conftest*
4164   ac_cv_have_setresgid_decl=yes
4165 else
4166   echo "configure: failed program was:" >&5
4167   cat conftest.$ac_ext >&5
4168   rm -rf conftest*
4169   ac_cv_have_setresgid_decl=no
4170 fi
4171 rm -f conftest*
4172 fi
4173
4174 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4175  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4176     cat >> confdefs.h <<\EOF
4177 #define HAVE_SETRESGID_DECL 1
4178 EOF
4179
4180  fi
4181
4182
4183  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4184 echo "configure:4185: checking for asprintf declaration" >&5
4185 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4186   echo $ac_n "(cached) $ac_c" 1>&6
4187 else
4188   
4189     cat > conftest.$ac_ext <<EOF
4190 #line 4191 "configure"
4191 #include "confdefs.h"
4192 #include <stdio.h>
4193 int main() {
4194 int i = (int)asprintf
4195 ; return 0; }
4196 EOF
4197 if { (eval echo configure:4198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4198   rm -rf conftest*
4199   ac_cv_have_asprintf_decl=yes
4200 else
4201   echo "configure: failed program was:" >&5
4202   cat conftest.$ac_ext >&5
4203   rm -rf conftest*
4204   ac_cv_have_asprintf_decl=no
4205 fi
4206 rm -f conftest*
4207 fi
4208
4209 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4210  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4211     cat >> confdefs.h <<\EOF
4212 #define HAVE_ASPRINTF_DECL 1
4213 EOF
4214
4215  fi
4216
4217
4218  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4219 echo "configure:4220: checking for vasprintf declaration" >&5
4220 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4221   echo $ac_n "(cached) $ac_c" 1>&6
4222 else
4223   
4224     cat > conftest.$ac_ext <<EOF
4225 #line 4226 "configure"
4226 #include "confdefs.h"
4227 #include <stdio.h>
4228 int main() {
4229 int i = (int)vasprintf
4230 ; return 0; }
4231 EOF
4232 if { (eval echo configure:4233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4233   rm -rf conftest*
4234   ac_cv_have_vasprintf_decl=yes
4235 else
4236   echo "configure: failed program was:" >&5
4237   cat conftest.$ac_ext >&5
4238   rm -rf conftest*
4239   ac_cv_have_vasprintf_decl=no
4240 fi
4241 rm -f conftest*
4242 fi
4243
4244 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4245  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4246     cat >> confdefs.h <<\EOF
4247 #define HAVE_VASPRINTF_DECL 1
4248 EOF
4249
4250  fi
4251
4252
4253  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4254 echo "configure:4255: checking for vsnprintf declaration" >&5
4255 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4256   echo $ac_n "(cached) $ac_c" 1>&6
4257 else
4258   
4259     cat > conftest.$ac_ext <<EOF
4260 #line 4261 "configure"
4261 #include "confdefs.h"
4262 #include <stdio.h>
4263 int main() {
4264 int i = (int)vsnprintf
4265 ; return 0; }
4266 EOF
4267 if { (eval echo configure:4268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4268   rm -rf conftest*
4269   ac_cv_have_vsnprintf_decl=yes
4270 else
4271   echo "configure: failed program was:" >&5
4272   cat conftest.$ac_ext >&5
4273   rm -rf conftest*
4274   ac_cv_have_vsnprintf_decl=no
4275 fi
4276 rm -f conftest*
4277 fi
4278
4279 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4280  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4281     cat >> confdefs.h <<\EOF
4282 #define HAVE_VSNPRINTF_DECL 1
4283 EOF
4284
4285  fi
4286
4287
4288  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4289 echo "configure:4290: checking for snprintf declaration" >&5
4290 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4291   echo $ac_n "(cached) $ac_c" 1>&6
4292 else
4293   
4294     cat > conftest.$ac_ext <<EOF
4295 #line 4296 "configure"
4296 #include "confdefs.h"
4297 #include <stdio.h>
4298 int main() {
4299 int i = (int)snprintf
4300 ; return 0; }
4301 EOF
4302 if { (eval echo configure:4303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4303   rm -rf conftest*
4304   ac_cv_have_snprintf_decl=yes
4305 else
4306   echo "configure: failed program was:" >&5
4307   cat conftest.$ac_ext >&5
4308   rm -rf conftest*
4309   ac_cv_have_snprintf_decl=no
4310 fi
4311 rm -f conftest*
4312 fi
4313
4314 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4315  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4316     cat >> confdefs.h <<\EOF
4317 #define HAVE_SNPRINTF_DECL 1
4318 EOF
4319
4320  fi
4321
4322
4323 # and glibc has setresuid under linux but the function does
4324 # nothing until kernel 2.1.44! very dumb.
4325 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4326 echo "configure:4327: checking for real setresuid" >&5
4327 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4328   echo $ac_n "(cached) $ac_c" 1>&6
4329 else
4330   
4331     if test "$cross_compiling" = yes; then
4332   samba_cv_have_setresuid=cross
4333 else
4334   cat > conftest.$ac_ext <<EOF
4335 #line 4336 "configure"
4336 #include "confdefs.h"
4337 #include <errno.h>
4338 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4339 EOF
4340 if { (eval echo configure:4341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4341 then
4342   samba_cv_have_setresuid=yes
4343 else
4344   echo "configure: failed program was:" >&5
4345   cat conftest.$ac_ext >&5
4346   rm -fr conftest*
4347   samba_cv_have_setresuid=no
4348 fi
4349 rm -fr conftest*
4350 fi
4351
4352 fi
4353
4354 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4355 if test x"$samba_cv_have_setresuid" = x"yes"; then
4356     cat >> confdefs.h <<\EOF
4357 #define HAVE_SETRESUID 1
4358 EOF
4359
4360 fi
4361
4362 # Do the same check for setresguid...
4363 #
4364 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4365 echo "configure:4366: checking for real setresgid" >&5
4366 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4367   echo $ac_n "(cached) $ac_c" 1>&6
4368 else
4369   
4370     if test "$cross_compiling" = yes; then
4371   samba_cv_have_setresgid=cross
4372 else
4373   cat > conftest.$ac_ext <<EOF
4374 #line 4375 "configure"
4375 #include "confdefs.h"
4376 #include <unistd.h>
4377 #include <errno.h>
4378 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4379 EOF
4380 if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4381 then
4382   samba_cv_have_setresgid=yes
4383 else
4384   echo "configure: failed program was:" >&5
4385   cat conftest.$ac_ext >&5
4386   rm -fr conftest*
4387   samba_cv_have_setresgid=no
4388 fi
4389 rm -fr conftest*
4390 fi
4391
4392 fi
4393
4394 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4395 if test x"$samba_cv_have_setresgid" = x"yes"; then
4396     cat >> confdefs.h <<\EOF
4397 #define HAVE_SETRESGID 1
4398 EOF
4399
4400 fi
4401
4402 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4403 echo "configure:4404: checking for 8-bit clean memcmp" >&5
4404 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4405   echo $ac_n "(cached) $ac_c" 1>&6
4406 else
4407   if test "$cross_compiling" = yes; then
4408   ac_cv_func_memcmp_clean=no
4409 else
4410   cat > conftest.$ac_ext <<EOF
4411 #line 4412 "configure"
4412 #include "confdefs.h"
4413
4414 main()
4415 {
4416   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4417   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4418 }
4419
4420 EOF
4421 if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4422 then
4423   ac_cv_func_memcmp_clean=yes
4424 else
4425   echo "configure: failed program was:" >&5
4426   cat conftest.$ac_ext >&5
4427   rm -fr conftest*
4428   ac_cv_func_memcmp_clean=no
4429 fi
4430 rm -fr conftest*
4431 fi
4432
4433 fi
4434
4435 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4436 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4437
4438
4439 ###############################################
4440 # test for where we get crypt() from
4441 for ac_func in crypt
4442 do
4443 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4444 echo "configure:4445: checking for $ac_func" >&5
4445 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4446   echo $ac_n "(cached) $ac_c" 1>&6
4447 else
4448   cat > conftest.$ac_ext <<EOF
4449 #line 4450 "configure"
4450 #include "confdefs.h"
4451 /* System header to define __stub macros and hopefully few prototypes,
4452     which can conflict with char $ac_func(); below.  */
4453 #include <assert.h>
4454 /* Override any gcc2 internal prototype to avoid an error.  */
4455 /* We use char because int might match the return type of a gcc2
4456     builtin and then its argument prototype would still apply.  */
4457 char $ac_func();
4458
4459 int main() {
4460
4461 /* The GNU C library defines this for functions which it implements
4462     to always fail with ENOSYS.  Some functions are actually named
4463     something starting with __ and the normal name is an alias.  */
4464 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4465 choke me
4466 #else
4467 $ac_func();
4468 #endif
4469
4470 ; return 0; }
4471 EOF
4472 if { (eval echo configure:4473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4473   rm -rf conftest*
4474   eval "ac_cv_func_$ac_func=yes"
4475 else
4476   echo "configure: failed program was:" >&5
4477   cat conftest.$ac_ext >&5
4478   rm -rf conftest*
4479   eval "ac_cv_func_$ac_func=no"
4480 fi
4481 rm -f conftest*
4482 fi
4483
4484 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4485   echo "$ac_t""yes" 1>&6
4486     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4487   cat >> confdefs.h <<EOF
4488 #define $ac_tr_func 1
4489 EOF
4490  
4491 else
4492   echo "$ac_t""no" 1>&6
4493 fi
4494 done
4495
4496 if test x"$ac_cv_func_crypt" = x"no"; then
4497     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4498 echo "configure:4499: checking for crypt in -lcrypt" >&5
4499 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4500 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4501   echo $ac_n "(cached) $ac_c" 1>&6
4502 else
4503   ac_save_LIBS="$LIBS"
4504 LIBS="-lcrypt  $LIBS"
4505 cat > conftest.$ac_ext <<EOF
4506 #line 4507 "configure"
4507 #include "confdefs.h"
4508 /* Override any gcc2 internal prototype to avoid an error.  */
4509 /* We use char because int might match the return type of a gcc2
4510     builtin and then its argument prototype would still apply.  */
4511 char crypt();
4512
4513 int main() {
4514 crypt()
4515 ; return 0; }
4516 EOF
4517 if { (eval echo configure:4518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4518   rm -rf conftest*
4519   eval "ac_cv_lib_$ac_lib_var=yes"
4520 else
4521   echo "configure: failed program was:" >&5
4522   cat conftest.$ac_ext >&5
4523   rm -rf conftest*
4524   eval "ac_cv_lib_$ac_lib_var=no"
4525 fi
4526 rm -f conftest*
4527 LIBS="$ac_save_LIBS"
4528
4529 fi
4530 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4531   echo "$ac_t""yes" 1>&6
4532   LIBS="$LIBS -lcrypt";
4533         cat >> confdefs.h <<\EOF
4534 #define HAVE_CRYPT 1
4535 EOF
4536
4537 else
4538   echo "$ac_t""no" 1>&6
4539 fi
4540
4541 fi
4542
4543
4544 ###############################################
4545 # Readline included by default unless explicitly asked not to
4546 test "${with_readline+set}" != "set" && with_readline=yes
4547
4548 # test for where we get readline() from
4549 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4550 echo "configure:4551: checking whether to use readline" >&5
4551 # Check whether --with-readline or --without-readline was given.
4552 if test "${with_readline+set}" = set; then
4553   withval="$with_readline"
4554     case "$with_readline" in
4555   yes)
4556     echo "$ac_t""yes" 1>&6
4557
4558     for ac_hdr in readline.h history.h readline/readline.h
4559 do
4560 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4561 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4562 echo "configure:4563: checking for $ac_hdr" >&5
4563 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4564   echo $ac_n "(cached) $ac_c" 1>&6
4565 else
4566   cat > conftest.$ac_ext <<EOF
4567 #line 4568 "configure"
4568 #include "confdefs.h"
4569 #include <$ac_hdr>
4570 EOF
4571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4572 { (eval echo configure:4573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4574 if test -z "$ac_err"; then
4575   rm -rf conftest*
4576   eval "ac_cv_header_$ac_safe=yes"
4577 else
4578   echo "$ac_err" >&5
4579   echo "configure: failed program was:" >&5
4580   cat conftest.$ac_ext >&5
4581   rm -rf conftest*
4582   eval "ac_cv_header_$ac_safe=no"
4583 fi
4584 rm -f conftest*
4585 fi
4586 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4587   echo "$ac_t""yes" 1>&6
4588     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4589   cat >> confdefs.h <<EOF
4590 #define $ac_tr_hdr 1
4591 EOF
4592  
4593 else
4594   echo "$ac_t""no" 1>&6
4595 fi
4596 done
4597
4598     for ac_hdr in readline/history.h
4599 do
4600 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4601 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4602 echo "configure:4603: checking for $ac_hdr" >&5
4603 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4604   echo $ac_n "(cached) $ac_c" 1>&6
4605 else
4606   cat > conftest.$ac_ext <<EOF
4607 #line 4608 "configure"
4608 #include "confdefs.h"
4609 #include <$ac_hdr>
4610 EOF
4611 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4612 { (eval echo configure:4613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4613 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4614 if test -z "$ac_err"; then
4615   rm -rf conftest*
4616   eval "ac_cv_header_$ac_safe=yes"
4617 else
4618   echo "$ac_err" >&5
4619   echo "configure: failed program was:" >&5
4620   cat conftest.$ac_ext >&5
4621   rm -rf conftest*
4622   eval "ac_cv_header_$ac_safe=no"
4623 fi
4624 rm -f conftest*
4625 fi
4626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4627   echo "$ac_t""yes" 1>&6
4628     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4629   cat >> confdefs.h <<EOF
4630 #define $ac_tr_hdr 1
4631 EOF
4632  
4633 else
4634   echo "$ac_t""no" 1>&6
4635 fi
4636 done
4637
4638
4639     for ac_hdr in readline.h readline/readline.h
4640 do
4641 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4642 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4643 echo "configure:4644: checking for $ac_hdr" >&5
4644 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4645   echo $ac_n "(cached) $ac_c" 1>&6
4646 else
4647   cat > conftest.$ac_ext <<EOF
4648 #line 4649 "configure"
4649 #include "confdefs.h"
4650 #include <$ac_hdr>
4651 EOF
4652 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4653 { (eval echo configure:4654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4654 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4655 if test -z "$ac_err"; then
4656   rm -rf conftest*
4657   eval "ac_cv_header_$ac_safe=yes"
4658 else
4659   echo "$ac_err" >&5
4660   echo "configure: failed program was:" >&5
4661   cat conftest.$ac_ext >&5
4662   rm -rf conftest*
4663   eval "ac_cv_header_$ac_safe=no"
4664 fi
4665 rm -f conftest*
4666 fi
4667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4668   echo "$ac_t""yes" 1>&6
4669     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4670   cat >> confdefs.h <<EOF
4671 #define $ac_tr_hdr 1
4672 EOF
4673  
4674       for termlib in ncurses curses termcap terminfo termlib; do
4675        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4676 echo "configure:4677: checking for tgetent in -l${termlib}" >&5
4677 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4678 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4679   echo $ac_n "(cached) $ac_c" 1>&6
4680 else
4681   ac_save_LIBS="$LIBS"
4682 LIBS="-l${termlib}  $LIBS"
4683 cat > conftest.$ac_ext <<EOF
4684 #line 4685 "configure"
4685 #include "confdefs.h"
4686 /* Override any gcc2 internal prototype to avoid an error.  */
4687 /* We use char because int might match the return type of a gcc2
4688     builtin and then its argument prototype would still apply.  */
4689 char tgetent();
4690
4691 int main() {
4692 tgetent()
4693 ; return 0; }
4694 EOF
4695 if { (eval echo configure:4696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4696   rm -rf conftest*
4697   eval "ac_cv_lib_$ac_lib_var=yes"
4698 else
4699   echo "configure: failed program was:" >&5
4700   cat conftest.$ac_ext >&5
4701   rm -rf conftest*
4702   eval "ac_cv_lib_$ac_lib_var=no"
4703 fi
4704 rm -f conftest*
4705 LIBS="$ac_save_LIBS"
4706
4707 fi
4708 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4709   echo "$ac_t""yes" 1>&6
4710   TERMLIBS="-l${termlib}"; break
4711 else
4712   echo "$ac_t""no" 1>&6
4713 fi
4714
4715       done
4716       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4717 echo "configure:4718: checking for rl_callback_handler_install in -lreadline" >&5
4718 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4719 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4720   echo $ac_n "(cached) $ac_c" 1>&6
4721 else
4722   ac_save_LIBS="$LIBS"
4723 LIBS="-lreadline $TERMLIBS $LIBS"
4724 cat > conftest.$ac_ext <<EOF
4725 #line 4726 "configure"
4726 #include "confdefs.h"
4727 /* Override any gcc2 internal prototype to avoid an error.  */
4728 /* We use char because int might match the return type of a gcc2
4729     builtin and then its argument prototype would still apply.  */
4730 char rl_callback_handler_install();
4731
4732 int main() {
4733 rl_callback_handler_install()
4734 ; return 0; }
4735 EOF
4736 if { (eval echo configure:4737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4737   rm -rf conftest*
4738   eval "ac_cv_lib_$ac_lib_var=yes"
4739 else
4740   echo "configure: failed program was:" >&5
4741   cat conftest.$ac_ext >&5
4742   rm -rf conftest*
4743   eval "ac_cv_lib_$ac_lib_var=no"
4744 fi
4745 rm -f conftest*
4746 LIBS="$ac_save_LIBS"
4747
4748 fi
4749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4750   echo "$ac_t""yes" 1>&6
4751   TERMLIBS="-lreadline $TERMLIBS"
4752        cat >> confdefs.h <<\EOF
4753 #define HAVE_LIBREADLINE 1
4754 EOF
4755
4756        break
4757 else
4758   echo "$ac_t""no" 1>&6
4759 TERMLIBS=
4760 fi
4761
4762 else
4763   echo "$ac_t""no" 1>&6
4764 fi
4765 done
4766
4767     ;;
4768   no)
4769     echo "$ac_t""no" 1>&6
4770     ;;
4771   *)
4772     echo "$ac_t""yes" 1>&6
4773
4774     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4775     # alternate readline path
4776     _ldflags=${LDFLAGS}
4777     _cppflags=${CPPFLAGS}
4778
4779     # Add additional search path
4780     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4781     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4782
4783     for ac_hdr in readline.h history.h readline/readline.h
4784 do
4785 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4786 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4787 echo "configure:4788: checking for $ac_hdr" >&5
4788 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4789   echo $ac_n "(cached) $ac_c" 1>&6
4790 else
4791   cat > conftest.$ac_ext <<EOF
4792 #line 4793 "configure"
4793 #include "confdefs.h"
4794 #include <$ac_hdr>
4795 EOF
4796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4797 { (eval echo configure:4798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4799 if test -z "$ac_err"; then
4800   rm -rf conftest*
4801   eval "ac_cv_header_$ac_safe=yes"
4802 else
4803   echo "$ac_err" >&5
4804   echo "configure: failed program was:" >&5
4805   cat conftest.$ac_ext >&5
4806   rm -rf conftest*
4807   eval "ac_cv_header_$ac_safe=no"
4808 fi
4809 rm -f conftest*
4810 fi
4811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4812   echo "$ac_t""yes" 1>&6
4813     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4814   cat >> confdefs.h <<EOF
4815 #define $ac_tr_hdr 1
4816 EOF
4817  
4818 else
4819   echo "$ac_t""no" 1>&6
4820 fi
4821 done
4822
4823     for ac_hdr in readline/history.h
4824 do
4825 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4826 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4827 echo "configure:4828: checking for $ac_hdr" >&5
4828 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4829   echo $ac_n "(cached) $ac_c" 1>&6
4830 else
4831   cat > conftest.$ac_ext <<EOF
4832 #line 4833 "configure"
4833 #include "confdefs.h"
4834 #include <$ac_hdr>
4835 EOF
4836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4837 { (eval echo configure:4838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4839 if test -z "$ac_err"; then
4840   rm -rf conftest*
4841   eval "ac_cv_header_$ac_safe=yes"
4842 else
4843   echo "$ac_err" >&5
4844   echo "configure: failed program was:" >&5
4845   cat conftest.$ac_ext >&5
4846   rm -rf conftest*
4847   eval "ac_cv_header_$ac_safe=no"
4848 fi
4849 rm -f conftest*
4850 fi
4851 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4852   echo "$ac_t""yes" 1>&6
4853     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4854   cat >> confdefs.h <<EOF
4855 #define $ac_tr_hdr 1
4856 EOF
4857  
4858 else
4859   echo "$ac_t""no" 1>&6
4860 fi
4861 done
4862
4863
4864     for ac_hdr in readline.h readline/readline.h
4865 do
4866 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4867 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4868 echo "configure:4869: checking for $ac_hdr" >&5
4869 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4870   echo $ac_n "(cached) $ac_c" 1>&6
4871 else
4872   cat > conftest.$ac_ext <<EOF
4873 #line 4874 "configure"
4874 #include "confdefs.h"
4875 #include <$ac_hdr>
4876 EOF
4877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4878 { (eval echo configure:4879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4880 if test -z "$ac_err"; then
4881   rm -rf conftest*
4882   eval "ac_cv_header_$ac_safe=yes"
4883 else
4884   echo "$ac_err" >&5
4885   echo "configure: failed program was:" >&5
4886   cat conftest.$ac_ext >&5
4887   rm -rf conftest*
4888   eval "ac_cv_header_$ac_safe=no"
4889 fi
4890 rm -f conftest*
4891 fi
4892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4893   echo "$ac_t""yes" 1>&6
4894     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4895   cat >> confdefs.h <<EOF
4896 #define $ac_tr_hdr 1
4897 EOF
4898  
4899       for termlib in ncurses curses termcap terminfo termlib; do
4900        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4901 echo "configure:4902: checking for tgetent in -l${termlib}" >&5
4902 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4903 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4904   echo $ac_n "(cached) $ac_c" 1>&6
4905 else
4906   ac_save_LIBS="$LIBS"
4907 LIBS="-l${termlib}  $LIBS"
4908 cat > conftest.$ac_ext <<EOF
4909 #line 4910 "configure"
4910 #include "confdefs.h"
4911 /* Override any gcc2 internal prototype to avoid an error.  */
4912 /* We use char because int might match the return type of a gcc2
4913     builtin and then its argument prototype would still apply.  */
4914 char tgetent();
4915
4916 int main() {
4917 tgetent()
4918 ; return 0; }
4919 EOF
4920 if { (eval echo configure:4921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4921   rm -rf conftest*
4922   eval "ac_cv_lib_$ac_lib_var=yes"
4923 else
4924   echo "configure: failed program was:" >&5
4925   cat conftest.$ac_ext >&5
4926   rm -rf conftest*
4927   eval "ac_cv_lib_$ac_lib_var=no"
4928 fi
4929 rm -f conftest*
4930 LIBS="$ac_save_LIBS"
4931
4932 fi
4933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4934   echo "$ac_t""yes" 1>&6
4935   TERMLIBS="-l${termlib}"; break
4936 else
4937   echo "$ac_t""no" 1>&6
4938 fi
4939
4940       done
4941       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4942 echo "configure:4943: checking for rl_callback_handler_install in -lreadline" >&5
4943 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4944 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4945   echo $ac_n "(cached) $ac_c" 1>&6
4946 else
4947   ac_save_LIBS="$LIBS"
4948 LIBS="-lreadline $TERMLIBS $LIBS"
4949 cat > conftest.$ac_ext <<EOF
4950 #line 4951 "configure"
4951 #include "confdefs.h"
4952 /* Override any gcc2 internal prototype to avoid an error.  */
4953 /* We use char because int might match the return type of a gcc2
4954     builtin and then its argument prototype would still apply.  */
4955 char rl_callback_handler_install();
4956
4957 int main() {
4958 rl_callback_handler_install()
4959 ; return 0; }
4960 EOF
4961 if { (eval echo configure:4962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4962   rm -rf conftest*
4963   eval "ac_cv_lib_$ac_lib_var=yes"
4964 else
4965   echo "configure: failed program was:" >&5
4966   cat conftest.$ac_ext >&5
4967   rm -rf conftest*
4968   eval "ac_cv_lib_$ac_lib_var=no"
4969 fi
4970 rm -f conftest*
4971 LIBS="$ac_save_LIBS"
4972
4973 fi
4974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4975   echo "$ac_t""yes" 1>&6
4976   TERMLDFLAGS="-L$with_readline/lib"
4977        TERMCPPFLAGS="-I$with_readline/include"
4978        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4979        TERMLIBS="-lreadline $TERMLIBS"
4980        cat >> confdefs.h <<\EOF
4981 #define HAVE_LIBREADLINE 1
4982 EOF
4983
4984        break
4985 else
4986   echo "$ac_t""no" 1>&6
4987 TERMLIBS= CPPFLAGS=$_cppflags
4988 fi
4989
4990 else
4991   echo "$ac_t""no" 1>&6
4992 fi
4993 done
4994
4995
4996     LDFLAGS=$_ldflags
4997     ;;
4998   esac
4999 else
5000   echo "$ac_t""no" 1>&6
5001
5002 fi
5003
5004
5005
5006
5007 # The readline API changed slightly from readline3 to readline4, so
5008 # code will generate warnings on one of them unless we have a few
5009 # special cases.
5010 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
5011 echo "configure:5012: checking for rl_completion_matches in -lreadline" >&5
5012 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
5013 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5014   echo $ac_n "(cached) $ac_c" 1>&6
5015 else
5016   ac_save_LIBS="$LIBS"
5017 LIBS="-lreadline $TERMLIBS $LIBS"
5018 cat > conftest.$ac_ext <<EOF
5019 #line 5020 "configure"
5020 #include "confdefs.h"
5021 /* Override any gcc2 internal prototype to avoid an error.  */
5022 /* We use char because int might match the return type of a gcc2
5023     builtin and then its argument prototype would still apply.  */
5024 char rl_completion_matches();
5025
5026 int main() {
5027 rl_completion_matches()
5028 ; return 0; }
5029 EOF
5030 if { (eval echo configure:5031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5031   rm -rf conftest*
5032   eval "ac_cv_lib_$ac_lib_var=yes"
5033 else
5034   echo "configure: failed program was:" >&5
5035   cat conftest.$ac_ext >&5
5036   rm -rf conftest*
5037   eval "ac_cv_lib_$ac_lib_var=no"
5038 fi
5039 rm -f conftest*
5040 LIBS="$ac_save_LIBS"
5041
5042 fi
5043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5044   echo "$ac_t""yes" 1>&6
5045   cat >> confdefs.h <<\EOF
5046 #define HAVE_NEW_LIBREADLINE 1
5047 EOF
5048
5049 else
5050   echo "$ac_t""no" 1>&6
5051 fi
5052
5053
5054 # The following test taken from the cvs sources
5055 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5056 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5057 # libsocket.so which has a bad implementation of gethostbyname (it
5058 # only looks in /etc/hosts), so we only look for -lsocket if we need
5059 # it.
5060 for ac_func in connect
5061 do
5062 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5063 echo "configure:5064: checking for $ac_func" >&5
5064 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5065   echo $ac_n "(cached) $ac_c" 1>&6
5066 else
5067   cat > conftest.$ac_ext <<EOF
5068 #line 5069 "configure"
5069 #include "confdefs.h"
5070 /* System header to define __stub macros and hopefully few prototypes,
5071     which can conflict with char $ac_func(); below.  */
5072 #include <assert.h>
5073 /* Override any gcc2 internal prototype to avoid an error.  */
5074 /* We use char because int might match the return type of a gcc2
5075     builtin and then its argument prototype would still apply.  */
5076 char $ac_func();
5077
5078 int main() {
5079
5080 /* The GNU C library defines this for functions which it implements
5081     to always fail with ENOSYS.  Some functions are actually named
5082     something starting with __ and the normal name is an alias.  */
5083 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5084 choke me
5085 #else
5086 $ac_func();
5087 #endif
5088
5089 ; return 0; }
5090 EOF
5091 if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5092   rm -rf conftest*
5093   eval "ac_cv_func_$ac_func=yes"
5094 else
5095   echo "configure: failed program was:" >&5
5096   cat conftest.$ac_ext >&5
5097   rm -rf conftest*
5098   eval "ac_cv_func_$ac_func=no"
5099 fi
5100 rm -f conftest*
5101 fi
5102
5103 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5104   echo "$ac_t""yes" 1>&6
5105     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5106   cat >> confdefs.h <<EOF
5107 #define $ac_tr_func 1
5108 EOF
5109  
5110 else
5111   echo "$ac_t""no" 1>&6
5112 fi
5113 done
5114
5115 if test x"$ac_cv_func_connect" = x"no"; then
5116     case "$LIBS" in
5117     *-lnsl*) ;;
5118     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5119 echo "configure:5120: checking for printf in -lnsl_s" >&5
5120 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5121 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5122   echo $ac_n "(cached) $ac_c" 1>&6
5123 else
5124   ac_save_LIBS="$LIBS"
5125 LIBS="-lnsl_s  $LIBS"
5126 cat > conftest.$ac_ext <<EOF
5127 #line 5128 "configure"
5128 #include "confdefs.h"
5129 /* Override any gcc2 internal prototype to avoid an error.  */
5130 /* We use char because int might match the return type of a gcc2
5131     builtin and then its argument prototype would still apply.  */
5132 char printf();
5133
5134 int main() {
5135 printf()
5136 ; return 0; }
5137 EOF
5138 if { (eval echo configure:5139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5139   rm -rf conftest*
5140   eval "ac_cv_lib_$ac_lib_var=yes"
5141 else
5142   echo "configure: failed program was:" >&5
5143   cat conftest.$ac_ext >&5
5144   rm -rf conftest*
5145   eval "ac_cv_lib_$ac_lib_var=no"
5146 fi
5147 rm -f conftest*
5148 LIBS="$ac_save_LIBS"
5149
5150 fi
5151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5152   echo "$ac_t""yes" 1>&6
5153     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5154     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5155   cat >> confdefs.h <<EOF
5156 #define $ac_tr_lib 1
5157 EOF
5158
5159   LIBS="-lnsl_s $LIBS"
5160
5161 else
5162   echo "$ac_t""no" 1>&6
5163 fi
5164  ;;
5165     esac
5166     case "$LIBS" in
5167     *-lnsl*) ;;
5168     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5169 echo "configure:5170: checking for printf in -lnsl" >&5
5170 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5171 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5172   echo $ac_n "(cached) $ac_c" 1>&6
5173 else
5174   ac_save_LIBS="$LIBS"
5175 LIBS="-lnsl  $LIBS"
5176 cat > conftest.$ac_ext <<EOF
5177 #line 5178 "configure"
5178 #include "confdefs.h"
5179 /* Override any gcc2 internal prototype to avoid an error.  */
5180 /* We use char because int might match the return type of a gcc2
5181     builtin and then its argument prototype would still apply.  */
5182 char printf();
5183
5184 int main() {
5185 printf()
5186 ; return 0; }
5187 EOF
5188 if { (eval echo configure:5189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5189   rm -rf conftest*
5190   eval "ac_cv_lib_$ac_lib_var=yes"
5191 else
5192   echo "configure: failed program was:" >&5
5193   cat conftest.$ac_ext >&5
5194   rm -rf conftest*
5195   eval "ac_cv_lib_$ac_lib_var=no"
5196 fi
5197 rm -f conftest*
5198 LIBS="$ac_save_LIBS"
5199
5200 fi
5201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5202   echo "$ac_t""yes" 1>&6
5203     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5204     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5205   cat >> confdefs.h <<EOF
5206 #define $ac_tr_lib 1
5207 EOF
5208
5209   LIBS="-lnsl $LIBS"
5210
5211 else
5212   echo "$ac_t""no" 1>&6
5213 fi
5214  ;;
5215     esac
5216     case "$LIBS" in
5217     *-lsocket*) ;;
5218     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5219 echo "configure:5220: checking for connect in -lsocket" >&5
5220 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5221 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5222   echo $ac_n "(cached) $ac_c" 1>&6
5223 else
5224   ac_save_LIBS="$LIBS"
5225 LIBS="-lsocket  $LIBS"
5226 cat > conftest.$ac_ext <<EOF
5227 #line 5228 "configure"
5228 #include "confdefs.h"
5229 /* Override any gcc2 internal prototype to avoid an error.  */
5230 /* We use char because int might match the return type of a gcc2
5231     builtin and then its argument prototype would still apply.  */
5232 char connect();
5233
5234 int main() {
5235 connect()
5236 ; return 0; }
5237 EOF
5238 if { (eval echo configure:5239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5239   rm -rf conftest*
5240   eval "ac_cv_lib_$ac_lib_var=yes"
5241 else
5242   echo "configure: failed program was:" >&5
5243   cat conftest.$ac_ext >&5
5244   rm -rf conftest*
5245   eval "ac_cv_lib_$ac_lib_var=no"
5246 fi
5247 rm -f conftest*
5248 LIBS="$ac_save_LIBS"
5249
5250 fi
5251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5252   echo "$ac_t""yes" 1>&6
5253     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5254     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5255   cat >> confdefs.h <<EOF
5256 #define $ac_tr_lib 1
5257 EOF
5258
5259   LIBS="-lsocket $LIBS"
5260
5261 else
5262   echo "$ac_t""no" 1>&6
5263 fi
5264  ;;
5265     esac
5266     case "$LIBS" in
5267     *-linet*) ;;
5268     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5269 echo "configure:5270: checking for connect in -linet" >&5
5270 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5271 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5272   echo $ac_n "(cached) $ac_c" 1>&6
5273 else
5274   ac_save_LIBS="$LIBS"
5275 LIBS="-linet  $LIBS"
5276 cat > conftest.$ac_ext <<EOF
5277 #line 5278 "configure"
5278 #include "confdefs.h"
5279 /* Override any gcc2 internal prototype to avoid an error.  */
5280 /* We use char because int might match the return type of a gcc2
5281     builtin and then its argument prototype would still apply.  */
5282 char connect();
5283
5284 int main() {
5285 connect()
5286 ; return 0; }
5287 EOF
5288 if { (eval echo configure:5289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5289   rm -rf conftest*
5290   eval "ac_cv_lib_$ac_lib_var=yes"
5291 else
5292   echo "configure: failed program was:" >&5
5293   cat conftest.$ac_ext >&5
5294   rm -rf conftest*
5295   eval "ac_cv_lib_$ac_lib_var=no"
5296 fi
5297 rm -f conftest*
5298 LIBS="$ac_save_LIBS"
5299
5300 fi
5301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5302   echo "$ac_t""yes" 1>&6
5303     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5304     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5305   cat >> confdefs.h <<EOF
5306 #define $ac_tr_lib 1
5307 EOF
5308
5309   LIBS="-linet $LIBS"
5310
5311 else
5312   echo "$ac_t""no" 1>&6
5313 fi
5314  ;;
5315     esac
5316             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5317        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5318         # ac_cv_func_connect=yes
5319         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5320         cat >> confdefs.h <<\EOF
5321 #define HAVE_CONNECT 1
5322 EOF
5323
5324     fi
5325 fi
5326
5327 ###############################################
5328 # test for where we get get_yp_default_domain() from
5329 for ac_func in yp_get_default_domain
5330 do
5331 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5332 echo "configure:5333: checking for $ac_func" >&5
5333 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5334   echo $ac_n "(cached) $ac_c" 1>&6
5335 else
5336   cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339 /* System header to define __stub macros and hopefully few prototypes,
5340     which can conflict with char $ac_func(); below.  */
5341 #include <assert.h>
5342 /* Override any gcc2 internal prototype to avoid an error.  */
5343 /* We use char because int might match the return type of a gcc2
5344     builtin and then its argument prototype would still apply.  */
5345 char $ac_func();
5346
5347 int main() {
5348
5349 /* The GNU C library defines this for functions which it implements
5350     to always fail with ENOSYS.  Some functions are actually named
5351     something starting with __ and the normal name is an alias.  */
5352 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5353 choke me
5354 #else
5355 $ac_func();
5356 #endif
5357
5358 ; return 0; }
5359 EOF
5360 if { (eval echo configure:5361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5361   rm -rf conftest*
5362   eval "ac_cv_func_$ac_func=yes"
5363 else
5364   echo "configure: failed program was:" >&5
5365   cat conftest.$ac_ext >&5
5366   rm -rf conftest*
5367   eval "ac_cv_func_$ac_func=no"
5368 fi
5369 rm -f conftest*
5370 fi
5371
5372 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5373   echo "$ac_t""yes" 1>&6
5374     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5375   cat >> confdefs.h <<EOF
5376 #define $ac_tr_func 1
5377 EOF
5378  
5379 else
5380   echo "$ac_t""no" 1>&6
5381 fi
5382 done
5383
5384 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5385         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5386 echo "configure:5387: checking for yp_get_default_domain in -lnsl" >&5
5387 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5388 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5389   echo $ac_n "(cached) $ac_c" 1>&6
5390 else
5391   ac_save_LIBS="$LIBS"
5392 LIBS="-lnsl  $LIBS"
5393 cat > conftest.$ac_ext <<EOF
5394 #line 5395 "configure"
5395 #include "confdefs.h"
5396 /* Override any gcc2 internal prototype to avoid an error.  */
5397 /* We use char because int might match the return type of a gcc2
5398     builtin and then its argument prototype would still apply.  */
5399 char yp_get_default_domain();
5400
5401 int main() {
5402 yp_get_default_domain()
5403 ; return 0; }
5404 EOF
5405 if { (eval echo configure:5406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5406   rm -rf conftest*
5407   eval "ac_cv_lib_$ac_lib_var=yes"
5408 else
5409   echo "configure: failed program was:" >&5
5410   cat conftest.$ac_ext >&5
5411   rm -rf conftest*
5412   eval "ac_cv_lib_$ac_lib_var=no"
5413 fi
5414 rm -f conftest*
5415 LIBS="$ac_save_LIBS"
5416
5417 fi
5418 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5419   echo "$ac_t""yes" 1>&6
5420   LIBS="$LIBS -lnsl";
5421         cat >> confdefs.h <<\EOF
5422 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5423 EOF
5424
5425 else
5426   echo "$ac_t""no" 1>&6
5427 fi
5428  
5429 fi
5430
5431 # Check if we have execl, if not we need to compile smbrun.
5432 for ac_func in execl
5433 do
5434 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5435 echo "configure:5436: checking for $ac_func" >&5
5436 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5437   echo $ac_n "(cached) $ac_c" 1>&6
5438 else
5439   cat > conftest.$ac_ext <<EOF
5440 #line 5441 "configure"
5441 #include "confdefs.h"
5442 /* System header to define __stub macros and hopefully few prototypes,
5443     which can conflict with char $ac_func(); below.  */
5444 #include <assert.h>
5445 /* Override any gcc2 internal prototype to avoid an error.  */
5446 /* We use char because int might match the return type of a gcc2
5447     builtin and then its argument prototype would still apply.  */
5448 char $ac_func();
5449
5450 int main() {
5451
5452 /* The GNU C library defines this for functions which it implements
5453     to always fail with ENOSYS.  Some functions are actually named
5454     something starting with __ and the normal name is an alias.  */
5455 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5456 choke me
5457 #else
5458 $ac_func();
5459 #endif
5460
5461 ; return 0; }
5462 EOF
5463 if { (eval echo configure:5464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5464   rm -rf conftest*
5465   eval "ac_cv_func_$ac_func=yes"
5466 else
5467   echo "configure: failed program was:" >&5
5468   cat conftest.$ac_ext >&5
5469   rm -rf conftest*
5470   eval "ac_cv_func_$ac_func=no"
5471 fi
5472 rm -f conftest*
5473 fi
5474
5475 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5476   echo "$ac_t""yes" 1>&6
5477     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5478   cat >> confdefs.h <<EOF
5479 #define $ac_tr_func 1
5480 EOF
5481  
5482 else
5483   echo "$ac_t""no" 1>&6
5484 fi
5485 done
5486
5487 if test x"$ac_cv_func_execl" = x"no"; then
5488     RUNPROG="bin/smbrun"
5489 else
5490     RUNPROG=""
5491 fi
5492
5493 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5494 do
5495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5496 echo "configure:5497: checking for $ac_func" >&5
5497 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5498   echo $ac_n "(cached) $ac_c" 1>&6
5499 else
5500   cat > conftest.$ac_ext <<EOF
5501 #line 5502 "configure"
5502 #include "confdefs.h"
5503 /* System header to define __stub macros and hopefully few prototypes,
5504     which can conflict with char $ac_func(); below.  */
5505 #include <assert.h>
5506 /* Override any gcc2 internal prototype to avoid an error.  */
5507 /* We use char because int might match the return type of a gcc2
5508     builtin and then its argument prototype would still apply.  */
5509 char $ac_func();
5510
5511 int main() {
5512
5513 /* The GNU C library defines this for functions which it implements
5514     to always fail with ENOSYS.  Some functions are actually named
5515     something starting with __ and the normal name is an alias.  */
5516 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5517 choke me
5518 #else
5519 $ac_func();
5520 #endif
5521
5522 ; return 0; }
5523 EOF
5524 if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5525   rm -rf conftest*
5526   eval "ac_cv_func_$ac_func=yes"
5527 else
5528   echo "configure: failed program was:" >&5
5529   cat conftest.$ac_ext >&5
5530   rm -rf conftest*
5531   eval "ac_cv_func_$ac_func=no"
5532 fi
5533 rm -f conftest*
5534 fi
5535
5536 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5537   echo "$ac_t""yes" 1>&6
5538     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5539   cat >> confdefs.h <<EOF
5540 #define $ac_tr_func 1
5541 EOF
5542  
5543 else
5544   echo "$ac_t""no" 1>&6
5545 fi
5546 done
5547
5548 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5549 do
5550 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5551 echo "configure:5552: checking for $ac_func" >&5
5552 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5553   echo $ac_n "(cached) $ac_c" 1>&6
5554 else
5555   cat > conftest.$ac_ext <<EOF
5556 #line 5557 "configure"
5557 #include "confdefs.h"
5558 /* System header to define __stub macros and hopefully few prototypes,
5559     which can conflict with char $ac_func(); below.  */
5560 #include <assert.h>
5561 /* Override any gcc2 internal prototype to avoid an error.  */
5562 /* We use char because int might match the return type of a gcc2
5563     builtin and then its argument prototype would still apply.  */
5564 char $ac_func();
5565
5566 int main() {
5567
5568 /* The GNU C library defines this for functions which it implements
5569     to always fail with ENOSYS.  Some functions are actually named
5570     something starting with __ and the normal name is an alias.  */
5571 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5572 choke me
5573 #else
5574 $ac_func();
5575 #endif
5576
5577 ; return 0; }
5578 EOF
5579 if { (eval echo configure:5580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5580   rm -rf conftest*
5581   eval "ac_cv_func_$ac_func=yes"
5582 else
5583   echo "configure: failed program was:" >&5
5584   cat conftest.$ac_ext >&5
5585   rm -rf conftest*
5586   eval "ac_cv_func_$ac_func=no"
5587 fi
5588 rm -f conftest*
5589 fi
5590
5591 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5592   echo "$ac_t""yes" 1>&6
5593     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5594   cat >> confdefs.h <<EOF
5595 #define $ac_tr_func 1
5596 EOF
5597  
5598 else
5599   echo "$ac_t""no" 1>&6
5600 fi
5601 done
5602
5603 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5604 do
5605 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5606 echo "configure:5607: checking for $ac_func" >&5
5607 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5608   echo $ac_n "(cached) $ac_c" 1>&6
5609 else
5610   cat > conftest.$ac_ext <<EOF
5611 #line 5612 "configure"
5612 #include "confdefs.h"
5613 /* System header to define __stub macros and hopefully few prototypes,
5614     which can conflict with char $ac_func(); below.  */
5615 #include <assert.h>
5616 /* Override any gcc2 internal prototype to avoid an error.  */
5617 /* We use char because int might match the return type of a gcc2
5618     builtin and then its argument prototype would still apply.  */
5619 char $ac_func();
5620
5621 int main() {
5622
5623 /* The GNU C library defines this for functions which it implements
5624     to always fail with ENOSYS.  Some functions are actually named
5625     something starting with __ and the normal name is an alias.  */
5626 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5627 choke me
5628 #else
5629 $ac_func();
5630 #endif
5631
5632 ; return 0; }
5633 EOF
5634 if { (eval echo configure:5635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5635   rm -rf conftest*
5636   eval "ac_cv_func_$ac_func=yes"
5637 else
5638   echo "configure: failed program was:" >&5
5639   cat conftest.$ac_ext >&5
5640   rm -rf conftest*
5641   eval "ac_cv_func_$ac_func=no"
5642 fi
5643 rm -f conftest*
5644 fi
5645
5646 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5647   echo "$ac_t""yes" 1>&6
5648     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5649   cat >> confdefs.h <<EOF
5650 #define $ac_tr_func 1
5651 EOF
5652  
5653 else
5654   echo "$ac_t""no" 1>&6
5655 fi
5656 done
5657
5658 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5659 do
5660 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5661 echo "configure:5662: checking for $ac_func" >&5
5662 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5663   echo $ac_n "(cached) $ac_c" 1>&6
5664 else
5665   cat > conftest.$ac_ext <<EOF
5666 #line 5667 "configure"
5667 #include "confdefs.h"
5668 /* System header to define __stub macros and hopefully few prototypes,
5669     which can conflict with char $ac_func(); below.  */
5670 #include <assert.h>
5671 /* Override any gcc2 internal prototype to avoid an error.  */
5672 /* We use char because int might match the return type of a gcc2
5673     builtin and then its argument prototype would still apply.  */
5674 char $ac_func();
5675
5676 int main() {
5677
5678 /* The GNU C library defines this for functions which it implements
5679     to always fail with ENOSYS.  Some functions are actually named
5680     something starting with __ and the normal name is an alias.  */
5681 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5682 choke me
5683 #else
5684 $ac_func();
5685 #endif
5686
5687 ; return 0; }
5688 EOF
5689 if { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5690   rm -rf conftest*
5691   eval "ac_cv_func_$ac_func=yes"
5692 else
5693   echo "configure: failed program was:" >&5
5694   cat conftest.$ac_ext >&5
5695   rm -rf conftest*
5696   eval "ac_cv_func_$ac_func=no"
5697 fi
5698 rm -f conftest*
5699 fi
5700
5701 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5702   echo "$ac_t""yes" 1>&6
5703     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5704   cat >> confdefs.h <<EOF
5705 #define $ac_tr_func 1
5706 EOF
5707  
5708 else
5709   echo "$ac_t""no" 1>&6
5710 fi
5711 done
5712
5713 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5714 do
5715 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5716 echo "configure:5717: checking for $ac_func" >&5
5717 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5718   echo $ac_n "(cached) $ac_c" 1>&6
5719 else
5720   cat > conftest.$ac_ext <<EOF
5721 #line 5722 "configure"
5722 #include "confdefs.h"
5723 /* System header to define __stub macros and hopefully few prototypes,
5724     which can conflict with char $ac_func(); below.  */
5725 #include <assert.h>
5726 /* Override any gcc2 internal prototype to avoid an error.  */
5727 /* We use char because int might match the return type of a gcc2
5728     builtin and then its argument prototype would still apply.  */
5729 char $ac_func();
5730
5731 int main() {
5732
5733 /* The GNU C library defines this for functions which it implements
5734     to always fail with ENOSYS.  Some functions are actually named
5735     something starting with __ and the normal name is an alias.  */
5736 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5737 choke me
5738 #else
5739 $ac_func();
5740 #endif
5741
5742 ; return 0; }
5743 EOF
5744 if { (eval echo configure:5745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5745   rm -rf conftest*
5746   eval "ac_cv_func_$ac_func=yes"
5747 else
5748   echo "configure: failed program was:" >&5
5749   cat conftest.$ac_ext >&5
5750   rm -rf conftest*
5751   eval "ac_cv_func_$ac_func=no"
5752 fi
5753 rm -f conftest*
5754 fi
5755
5756 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5757   echo "$ac_t""yes" 1>&6
5758     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5759   cat >> confdefs.h <<EOF
5760 #define $ac_tr_func 1
5761 EOF
5762  
5763 else
5764   echo "$ac_t""no" 1>&6
5765 fi
5766 done
5767
5768 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5769 do
5770 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5771 echo "configure:5772: checking for $ac_func" >&5
5772 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5773   echo $ac_n "(cached) $ac_c" 1>&6
5774 else
5775   cat > conftest.$ac_ext <<EOF
5776 #line 5777 "configure"
5777 #include "confdefs.h"
5778 /* System header to define __stub macros and hopefully few prototypes,
5779     which can conflict with char $ac_func(); below.  */
5780 #include <assert.h>
5781 /* Override any gcc2 internal prototype to avoid an error.  */
5782 /* We use char because int might match the return type of a gcc2
5783     builtin and then its argument prototype would still apply.  */
5784 char $ac_func();
5785
5786 int main() {
5787
5788 /* The GNU C library defines this for functions which it implements
5789     to always fail with ENOSYS.  Some functions are actually named
5790     something starting with __ and the normal name is an alias.  */
5791 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5792 choke me
5793 #else
5794 $ac_func();
5795 #endif
5796
5797 ; return 0; }
5798 EOF
5799 if { (eval echo configure:5800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5800   rm -rf conftest*
5801   eval "ac_cv_func_$ac_func=yes"
5802 else
5803   echo "configure: failed program was:" >&5
5804   cat conftest.$ac_ext >&5
5805   rm -rf conftest*
5806   eval "ac_cv_func_$ac_func=no"
5807 fi
5808 rm -f conftest*
5809 fi
5810
5811 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5812   echo "$ac_t""yes" 1>&6
5813     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5814   cat >> confdefs.h <<EOF
5815 #define $ac_tr_func 1
5816 EOF
5817  
5818 else
5819   echo "$ac_t""no" 1>&6
5820 fi
5821 done
5822
5823 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5824 do
5825 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5826 echo "configure:5827: checking for $ac_func" >&5
5827 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5828   echo $ac_n "(cached) $ac_c" 1>&6
5829 else
5830   cat > conftest.$ac_ext <<EOF
5831 #line 5832 "configure"
5832 #include "confdefs.h"
5833 /* System header to define __stub macros and hopefully few prototypes,
5834     which can conflict with char $ac_func(); below.  */
5835 #include <assert.h>
5836 /* Override any gcc2 internal prototype to avoid an error.  */
5837 /* We use char because int might match the return type of a gcc2
5838     builtin and then its argument prototype would still apply.  */
5839 char $ac_func();
5840
5841 int main() {
5842
5843 /* The GNU C library defines this for functions which it implements
5844     to always fail with ENOSYS.  Some functions are actually named
5845     something starting with __ and the normal name is an alias.  */
5846 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5847 choke me
5848 #else
5849 $ac_func();
5850 #endif
5851
5852 ; return 0; }
5853 EOF
5854 if { (eval echo configure:5855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5855   rm -rf conftest*
5856   eval "ac_cv_func_$ac_func=yes"
5857 else
5858   echo "configure: failed program was:" >&5
5859   cat conftest.$ac_ext >&5
5860   rm -rf conftest*
5861   eval "ac_cv_func_$ac_func=no"
5862 fi
5863 rm -f conftest*
5864 fi
5865
5866 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5867   echo "$ac_t""yes" 1>&6
5868     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5869   cat >> confdefs.h <<EOF
5870 #define $ac_tr_func 1
5871 EOF
5872  
5873 else
5874   echo "$ac_t""no" 1>&6
5875 fi
5876 done
5877
5878 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5879 do
5880 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5881 echo "configure:5882: checking for $ac_func" >&5
5882 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5883   echo $ac_n "(cached) $ac_c" 1>&6
5884 else
5885   cat > conftest.$ac_ext <<EOF
5886 #line 5887 "configure"
5887 #include "confdefs.h"
5888 /* System header to define __stub macros and hopefully few prototypes,
5889     which can conflict with char $ac_func(); below.  */
5890 #include <assert.h>
5891 /* Override any gcc2 internal prototype to avoid an error.  */
5892 /* We use char because int might match the return type of a gcc2
5893     builtin and then its argument prototype would still apply.  */
5894 char $ac_func();
5895
5896 int main() {
5897
5898 /* The GNU C library defines this for functions which it implements
5899     to always fail with ENOSYS.  Some functions are actually named
5900     something starting with __ and the normal name is an alias.  */
5901 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5902 choke me
5903 #else
5904 $ac_func();
5905 #endif
5906
5907 ; return 0; }
5908 EOF
5909 if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5910   rm -rf conftest*
5911   eval "ac_cv_func_$ac_func=yes"
5912 else
5913   echo "configure: failed program was:" >&5
5914   cat conftest.$ac_ext >&5
5915   rm -rf conftest*
5916   eval "ac_cv_func_$ac_func=no"
5917 fi
5918 rm -f conftest*
5919 fi
5920
5921 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5922   echo "$ac_t""yes" 1>&6
5923     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5924   cat >> confdefs.h <<EOF
5925 #define $ac_tr_func 1
5926 EOF
5927  
5928 else
5929   echo "$ac_t""no" 1>&6
5930 fi
5931 done
5932
5933 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5934 do
5935 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5936 echo "configure:5937: checking for $ac_func" >&5
5937 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5938   echo $ac_n "(cached) $ac_c" 1>&6
5939 else
5940   cat > conftest.$ac_ext <<EOF
5941 #line 5942 "configure"
5942 #include "confdefs.h"
5943 /* System header to define __stub macros and hopefully few prototypes,
5944     which can conflict with char $ac_func(); below.  */
5945 #include <assert.h>
5946 /* Override any gcc2 internal prototype to avoid an error.  */
5947 /* We use char because int might match the return type of a gcc2
5948     builtin and then its argument prototype would still apply.  */
5949 char $ac_func();
5950
5951 int main() {
5952
5953 /* The GNU C library defines this for functions which it implements
5954     to always fail with ENOSYS.  Some functions are actually named
5955     something starting with __ and the normal name is an alias.  */
5956 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5957 choke me
5958 #else
5959 $ac_func();
5960 #endif
5961
5962 ; return 0; }
5963 EOF
5964 if { (eval echo configure:5965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5965   rm -rf conftest*
5966   eval "ac_cv_func_$ac_func=yes"
5967 else
5968   echo "configure: failed program was:" >&5
5969   cat conftest.$ac_ext >&5
5970   rm -rf conftest*
5971   eval "ac_cv_func_$ac_func=no"
5972 fi
5973 rm -f conftest*
5974 fi
5975
5976 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5977   echo "$ac_t""yes" 1>&6
5978     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5979   cat >> confdefs.h <<EOF
5980 #define $ac_tr_func 1
5981 EOF
5982  
5983 else
5984   echo "$ac_t""no" 1>&6
5985 fi
5986 done
5987
5988 for ac_func in syslog vsyslog getgrouplist
5989 do
5990 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5991 echo "configure:5992: checking for $ac_func" >&5
5992 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5993   echo $ac_n "(cached) $ac_c" 1>&6
5994 else
5995   cat > conftest.$ac_ext <<EOF
5996 #line 5997 "configure"
5997 #include "confdefs.h"
5998 /* System header to define __stub macros and hopefully few prototypes,
5999     which can conflict with char $ac_func(); below.  */
6000 #include <assert.h>
6001 /* Override any gcc2 internal prototype to avoid an error.  */
6002 /* We use char because int might match the return type of a gcc2
6003     builtin and then its argument prototype would still apply.  */
6004 char $ac_func();
6005
6006 int main() {
6007
6008 /* The GNU C library defines this for functions which it implements
6009     to always fail with ENOSYS.  Some functions are actually named
6010     something starting with __ and the normal name is an alias.  */
6011 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6012 choke me
6013 #else
6014 $ac_func();
6015 #endif
6016
6017 ; return 0; }
6018 EOF
6019 if { (eval echo configure:6020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6020   rm -rf conftest*
6021   eval "ac_cv_func_$ac_func=yes"
6022 else
6023   echo "configure: failed program was:" >&5
6024   cat conftest.$ac_ext >&5
6025   rm -rf conftest*
6026   eval "ac_cv_func_$ac_func=no"
6027 fi
6028 rm -f conftest*
6029 fi
6030
6031 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6032   echo "$ac_t""yes" 1>&6
6033     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6034   cat >> confdefs.h <<EOF
6035 #define $ac_tr_func 1
6036 EOF
6037  
6038 else
6039   echo "$ac_t""no" 1>&6
6040 fi
6041 done
6042
6043 # setbuffer is needed for smbtorture
6044 for ac_func in setbuffer
6045 do
6046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6047 echo "configure:6048: checking for $ac_func" >&5
6048 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6049   echo $ac_n "(cached) $ac_c" 1>&6
6050 else
6051   cat > conftest.$ac_ext <<EOF
6052 #line 6053 "configure"
6053 #include "confdefs.h"
6054 /* System header to define __stub macros and hopefully few prototypes,
6055     which can conflict with char $ac_func(); below.  */
6056 #include <assert.h>
6057 /* Override any gcc2 internal prototype to avoid an error.  */
6058 /* We use char because int might match the return type of a gcc2
6059     builtin and then its argument prototype would still apply.  */
6060 char $ac_func();
6061
6062 int main() {
6063
6064 /* The GNU C library defines this for functions which it implements
6065     to always fail with ENOSYS.  Some functions are actually named
6066     something starting with __ and the normal name is an alias.  */
6067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6068 choke me
6069 #else
6070 $ac_func();
6071 #endif
6072
6073 ; return 0; }
6074 EOF
6075 if { (eval echo configure:6076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6076   rm -rf conftest*
6077   eval "ac_cv_func_$ac_func=yes"
6078 else
6079   echo "configure: failed program was:" >&5
6080   cat conftest.$ac_ext >&5
6081   rm -rf conftest*
6082   eval "ac_cv_func_$ac_func=no"
6083 fi
6084 rm -f conftest*
6085 fi
6086
6087 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6088   echo "$ac_t""yes" 1>&6
6089     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6090   cat >> confdefs.h <<EOF
6091 #define $ac_tr_func 1
6092 EOF
6093  
6094 else
6095   echo "$ac_t""no" 1>&6
6096 fi
6097 done
6098
6099
6100 # syscall() is needed for smbwrapper.
6101 for ac_func in syscall
6102 do
6103 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6104 echo "configure:6105: checking for $ac_func" >&5
6105 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6106   echo $ac_n "(cached) $ac_c" 1>&6
6107 else
6108   cat > conftest.$ac_ext <<EOF
6109 #line 6110 "configure"
6110 #include "confdefs.h"
6111 /* System header to define __stub macros and hopefully few prototypes,
6112     which can conflict with char $ac_func(); below.  */
6113 #include <assert.h>
6114 /* Override any gcc2 internal prototype to avoid an error.  */
6115 /* We use char because int might match the return type of a gcc2
6116     builtin and then its argument prototype would still apply.  */
6117 char $ac_func();
6118
6119 int main() {
6120
6121 /* The GNU C library defines this for functions which it implements
6122     to always fail with ENOSYS.  Some functions are actually named
6123     something starting with __ and the normal name is an alias.  */
6124 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6125 choke me
6126 #else
6127 $ac_func();
6128 #endif
6129
6130 ; return 0; }
6131 EOF
6132 if { (eval echo configure:6133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6133   rm -rf conftest*
6134   eval "ac_cv_func_$ac_func=yes"
6135 else
6136   echo "configure: failed program was:" >&5
6137   cat conftest.$ac_ext >&5
6138   rm -rf conftest*
6139   eval "ac_cv_func_$ac_func=no"
6140 fi
6141 rm -f conftest*
6142 fi
6143
6144 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6145   echo "$ac_t""yes" 1>&6
6146     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6147   cat >> confdefs.h <<EOF
6148 #define $ac_tr_func 1
6149 EOF
6150  
6151 else
6152   echo "$ac_t""no" 1>&6
6153 fi
6154 done
6155
6156
6157 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6158 do
6159 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6160 echo "configure:6161: checking for $ac_func" >&5
6161 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6162   echo $ac_n "(cached) $ac_c" 1>&6
6163 else
6164   cat > conftest.$ac_ext <<EOF
6165 #line 6166 "configure"
6166 #include "confdefs.h"
6167 /* System header to define __stub macros and hopefully few prototypes,
6168     which can conflict with char $ac_func(); below.  */
6169 #include <assert.h>
6170 /* Override any gcc2 internal prototype to avoid an error.  */
6171 /* We use char because int might match the return type of a gcc2
6172     builtin and then its argument prototype would still apply.  */
6173 char $ac_func();
6174
6175 int main() {
6176
6177 /* The GNU C library defines this for functions which it implements
6178     to always fail with ENOSYS.  Some functions are actually named
6179     something starting with __ and the normal name is an alias.  */
6180 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6181 choke me
6182 #else
6183 $ac_func();
6184 #endif
6185
6186 ; return 0; }
6187 EOF
6188 if { (eval echo configure:6189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6189   rm -rf conftest*
6190   eval "ac_cv_func_$ac_func=yes"
6191 else
6192   echo "configure: failed program was:" >&5
6193   cat conftest.$ac_ext >&5
6194   rm -rf conftest*
6195   eval "ac_cv_func_$ac_func=no"
6196 fi
6197 rm -f conftest*
6198 fi
6199
6200 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6201   echo "$ac_t""yes" 1>&6
6202     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6203   cat >> confdefs.h <<EOF
6204 #define $ac_tr_func 1
6205 EOF
6206  
6207 else
6208   echo "$ac_t""no" 1>&6
6209 fi
6210 done
6211
6212 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6213 do
6214 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6215 echo "configure:6216: checking for $ac_func" >&5
6216 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6217   echo $ac_n "(cached) $ac_c" 1>&6
6218 else
6219   cat > conftest.$ac_ext <<EOF
6220 #line 6221 "configure"
6221 #include "confdefs.h"
6222 /* System header to define __stub macros and hopefully few prototypes,
6223     which can conflict with char $ac_func(); below.  */
6224 #include <assert.h>
6225 /* Override any gcc2 internal prototype to avoid an error.  */
6226 /* We use char because int might match the return type of a gcc2
6227     builtin and then its argument prototype would still apply.  */
6228 char $ac_func();
6229
6230 int main() {
6231
6232 /* The GNU C library defines this for functions which it implements
6233     to always fail with ENOSYS.  Some functions are actually named
6234     something starting with __ and the normal name is an alias.  */
6235 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6236 choke me
6237 #else
6238 $ac_func();
6239 #endif
6240
6241 ; return 0; }
6242 EOF
6243 if { (eval echo configure:6244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6244   rm -rf conftest*
6245   eval "ac_cv_func_$ac_func=yes"
6246 else
6247   echo "configure: failed program was:" >&5
6248   cat conftest.$ac_ext >&5
6249   rm -rf conftest*
6250   eval "ac_cv_func_$ac_func=no"
6251 fi
6252 rm -f conftest*
6253 fi
6254
6255 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6256   echo "$ac_t""yes" 1>&6
6257     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6258   cat >> confdefs.h <<EOF
6259 #define $ac_tr_func 1
6260 EOF
6261  
6262 else
6263   echo "$ac_t""no" 1>&6
6264 fi
6265 done
6266
6267 for ac_func in __getcwd _getcwd
6268 do
6269 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6270 echo "configure:6271: checking for $ac_func" >&5
6271 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6272   echo $ac_n "(cached) $ac_c" 1>&6
6273 else
6274   cat > conftest.$ac_ext <<EOF
6275 #line 6276 "configure"
6276 #include "confdefs.h"
6277 /* System header to define __stub macros and hopefully few prototypes,
6278     which can conflict with char $ac_func(); below.  */
6279 #include <assert.h>
6280 /* Override any gcc2 internal prototype to avoid an error.  */
6281 /* We use char because int might match the return type of a gcc2
6282     builtin and then its argument prototype would still apply.  */
6283 char $ac_func();
6284
6285 int main() {
6286
6287 /* The GNU C library defines this for functions which it implements
6288     to always fail with ENOSYS.  Some functions are actually named
6289     something starting with __ and the normal name is an alias.  */
6290 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6291 choke me
6292 #else
6293 $ac_func();
6294 #endif
6295
6296 ; return 0; }
6297 EOF
6298 if { (eval echo configure:6299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6299   rm -rf conftest*
6300   eval "ac_cv_func_$ac_func=yes"
6301 else
6302   echo "configure: failed program was:" >&5
6303   cat conftest.$ac_ext >&5
6304   rm -rf conftest*
6305   eval "ac_cv_func_$ac_func=no"
6306 fi
6307 rm -f conftest*
6308 fi
6309
6310 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6311   echo "$ac_t""yes" 1>&6
6312     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6313   cat >> confdefs.h <<EOF
6314 #define $ac_tr_func 1
6315 EOF
6316  
6317 else
6318   echo "$ac_t""no" 1>&6
6319 fi
6320 done
6321
6322 for ac_func in __xstat __fxstat __lxstat
6323 do
6324 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6325 echo "configure:6326: checking for $ac_func" >&5
6326 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6327   echo $ac_n "(cached) $ac_c" 1>&6
6328 else
6329   cat > conftest.$ac_ext <<EOF
6330 #line 6331 "configure"
6331 #include "confdefs.h"
6332 /* System header to define __stub macros and hopefully few prototypes,
6333     which can conflict with char $ac_func(); below.  */
6334 #include <assert.h>
6335 /* Override any gcc2 internal prototype to avoid an error.  */
6336 /* We use char because int might match the return type of a gcc2
6337     builtin and then its argument prototype would still apply.  */
6338 char $ac_func();
6339
6340 int main() {
6341
6342 /* The GNU C library defines this for functions which it implements
6343     to always fail with ENOSYS.  Some functions are actually named
6344     something starting with __ and the normal name is an alias.  */
6345 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6346 choke me
6347 #else
6348 $ac_func();
6349 #endif
6350
6351 ; return 0; }
6352 EOF
6353 if { (eval echo configure:6354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6354   rm -rf conftest*
6355   eval "ac_cv_func_$ac_func=yes"
6356 else
6357   echo "configure: failed program was:" >&5
6358   cat conftest.$ac_ext >&5
6359   rm -rf conftest*
6360   eval "ac_cv_func_$ac_func=no"
6361 fi
6362 rm -f conftest*
6363 fi
6364
6365 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6366   echo "$ac_t""yes" 1>&6
6367     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6368   cat >> confdefs.h <<EOF
6369 #define $ac_tr_func 1
6370 EOF
6371  
6372 else
6373   echo "$ac_t""no" 1>&6
6374 fi
6375 done
6376
6377 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6378 do
6379 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6380 echo "configure:6381: checking for $ac_func" >&5
6381 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6382   echo $ac_n "(cached) $ac_c" 1>&6
6383 else
6384   cat > conftest.$ac_ext <<EOF
6385 #line 6386 "configure"
6386 #include "confdefs.h"
6387 /* System header to define __stub macros and hopefully few prototypes,
6388     which can conflict with char $ac_func(); below.  */
6389 #include <assert.h>
6390 /* Override any gcc2 internal prototype to avoid an error.  */
6391 /* We use char because int might match the return type of a gcc2
6392     builtin and then its argument prototype would still apply.  */
6393 char $ac_func();
6394
6395 int main() {
6396
6397 /* The GNU C library defines this for functions which it implements
6398     to always fail with ENOSYS.  Some functions are actually named
6399     something starting with __ and the normal name is an alias.  */
6400 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6401 choke me
6402 #else
6403 $ac_func();
6404 #endif
6405
6406 ; return 0; }
6407 EOF
6408 if { (eval echo configure:6409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6409   rm -rf conftest*
6410   eval "ac_cv_func_$ac_func=yes"
6411 else
6412   echo "configure: failed program was:" >&5
6413   cat conftest.$ac_ext >&5
6414   rm -rf conftest*
6415   eval "ac_cv_func_$ac_func=no"
6416 fi
6417 rm -f conftest*
6418 fi
6419
6420 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6421   echo "$ac_t""yes" 1>&6
6422     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6423   cat >> confdefs.h <<EOF
6424 #define $ac_tr_func 1
6425 EOF
6426  
6427 else
6428   echo "$ac_t""no" 1>&6
6429 fi
6430 done
6431
6432 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6433 do
6434 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6435 echo "configure:6436: checking for $ac_func" >&5
6436 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6437   echo $ac_n "(cached) $ac_c" 1>&6
6438 else
6439   cat > conftest.$ac_ext <<EOF
6440 #line 6441 "configure"
6441 #include "confdefs.h"
6442 /* System header to define __stub macros and hopefully few prototypes,
6443     which can conflict with char $ac_func(); below.  */
6444 #include <assert.h>
6445 /* Override any gcc2 internal prototype to avoid an error.  */
6446 /* We use char because int might match the return type of a gcc2
6447     builtin and then its argument prototype would still apply.  */
6448 char $ac_func();
6449
6450 int main() {
6451
6452 /* The GNU C library defines this for functions which it implements
6453     to always fail with ENOSYS.  Some functions are actually named
6454     something starting with __ and the normal name is an alias.  */
6455 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6456 choke me
6457 #else
6458 $ac_func();
6459 #endif
6460
6461 ; return 0; }
6462 EOF
6463 if { (eval echo configure:6464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6464   rm -rf conftest*
6465   eval "ac_cv_func_$ac_func=yes"
6466 else
6467   echo "configure: failed program was:" >&5
6468   cat conftest.$ac_ext >&5
6469   rm -rf conftest*
6470   eval "ac_cv_func_$ac_func=no"
6471 fi
6472 rm -f conftest*
6473 fi
6474
6475 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6476   echo "$ac_t""yes" 1>&6
6477     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6478   cat >> confdefs.h <<EOF
6479 #define $ac_tr_func 1
6480 EOF
6481  
6482 else
6483   echo "$ac_t""no" 1>&6
6484 fi
6485 done
6486
6487 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6488 do
6489 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6490 echo "configure:6491: checking for $ac_func" >&5
6491 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6492   echo $ac_n "(cached) $ac_c" 1>&6
6493 else
6494   cat > conftest.$ac_ext <<EOF
6495 #line 6496 "configure"
6496 #include "confdefs.h"
6497 /* System header to define __stub macros and hopefully few prototypes,
6498     which can conflict with char $ac_func(); below.  */
6499 #include <assert.h>
6500 /* Override any gcc2 internal prototype to avoid an error.  */
6501 /* We use char because int might match the return type of a gcc2
6502     builtin and then its argument prototype would still apply.  */
6503 char $ac_func();
6504
6505 int main() {
6506
6507 /* The GNU C library defines this for functions which it implements
6508     to always fail with ENOSYS.  Some functions are actually named
6509     something starting with __ and the normal name is an alias.  */
6510 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6511 choke me
6512 #else
6513 $ac_func();
6514 #endif
6515
6516 ; return 0; }
6517 EOF
6518 if { (eval echo configure:6519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6519   rm -rf conftest*
6520   eval "ac_cv_func_$ac_func=yes"
6521 else
6522   echo "configure: failed program was:" >&5
6523   cat conftest.$ac_ext >&5
6524   rm -rf conftest*
6525   eval "ac_cv_func_$ac_func=no"
6526 fi
6527 rm -f conftest*
6528 fi
6529
6530 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6531   echo "$ac_t""yes" 1>&6
6532     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6533   cat >> confdefs.h <<EOF
6534 #define $ac_tr_func 1
6535 EOF
6536  
6537 else
6538   echo "$ac_t""no" 1>&6
6539 fi
6540 done
6541
6542 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6543 do
6544 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6545 echo "configure:6546: checking for $ac_func" >&5
6546 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6547   echo $ac_n "(cached) $ac_c" 1>&6
6548 else
6549   cat > conftest.$ac_ext <<EOF
6550 #line 6551 "configure"
6551 #include "confdefs.h"
6552 /* System header to define __stub macros and hopefully few prototypes,
6553     which can conflict with char $ac_func(); below.  */
6554 #include <assert.h>
6555 /* Override any gcc2 internal prototype to avoid an error.  */
6556 /* We use char because int might match the return type of a gcc2
6557     builtin and then its argument prototype would still apply.  */
6558 char $ac_func();
6559
6560 int main() {
6561
6562 /* The GNU C library defines this for functions which it implements
6563     to always fail with ENOSYS.  Some functions are actually named
6564     something starting with __ and the normal name is an alias.  */
6565 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6566 choke me
6567 #else
6568 $ac_func();
6569 #endif
6570
6571 ; return 0; }
6572 EOF
6573 if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6574   rm -rf conftest*
6575   eval "ac_cv_func_$ac_func=yes"
6576 else
6577   echo "configure: failed program was:" >&5
6578   cat conftest.$ac_ext >&5
6579   rm -rf conftest*
6580   eval "ac_cv_func_$ac_func=no"
6581 fi
6582 rm -f conftest*
6583 fi
6584
6585 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6586   echo "$ac_t""yes" 1>&6
6587     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6588   cat >> confdefs.h <<EOF
6589 #define $ac_tr_func 1
6590 EOF
6591  
6592 else
6593   echo "$ac_t""no" 1>&6
6594 fi
6595 done
6596
6597 for ac_func in _write __write _fork __fork
6598 do
6599 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6600 echo "configure:6601: checking for $ac_func" >&5
6601 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6602   echo $ac_n "(cached) $ac_c" 1>&6
6603 else
6604   cat > conftest.$ac_ext <<EOF
6605 #line 6606 "configure"
6606 #include "confdefs.h"
6607 /* System header to define __stub macros and hopefully few prototypes,
6608     which can conflict with char $ac_func(); below.  */
6609 #include <assert.h>
6610 /* Override any gcc2 internal prototype to avoid an error.  */
6611 /* We use char because int might match the return type of a gcc2
6612     builtin and then its argument prototype would still apply.  */
6613 char $ac_func();
6614
6615 int main() {
6616
6617 /* The GNU C library defines this for functions which it implements
6618     to always fail with ENOSYS.  Some functions are actually named
6619     something starting with __ and the normal name is an alias.  */
6620 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6621 choke me
6622 #else
6623 $ac_func();
6624 #endif
6625
6626 ; return 0; }
6627 EOF
6628 if { (eval echo configure:6629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6629   rm -rf conftest*
6630   eval "ac_cv_func_$ac_func=yes"
6631 else
6632   echo "configure: failed program was:" >&5
6633   cat conftest.$ac_ext >&5
6634   rm -rf conftest*
6635   eval "ac_cv_func_$ac_func=no"
6636 fi
6637 rm -f conftest*
6638 fi
6639
6640 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6641   echo "$ac_t""yes" 1>&6
6642     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6643   cat >> confdefs.h <<EOF
6644 #define $ac_tr_func 1
6645 EOF
6646  
6647 else
6648   echo "$ac_t""no" 1>&6
6649 fi
6650 done
6651
6652 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6653 do
6654 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6655 echo "configure:6656: checking for $ac_func" >&5
6656 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6657   echo $ac_n "(cached) $ac_c" 1>&6
6658 else
6659   cat > conftest.$ac_ext <<EOF
6660 #line 6661 "configure"
6661 #include "confdefs.h"
6662 /* System header to define __stub macros and hopefully few prototypes,
6663     which can conflict with char $ac_func(); below.  */
6664 #include <assert.h>
6665 /* Override any gcc2 internal prototype to avoid an error.  */
6666 /* We use char because int might match the return type of a gcc2
6667     builtin and then its argument prototype would still apply.  */
6668 char $ac_func();
6669
6670 int main() {
6671
6672 /* The GNU C library defines this for functions which it implements
6673     to always fail with ENOSYS.  Some functions are actually named
6674     something starting with __ and the normal name is an alias.  */
6675 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6676 choke me
6677 #else
6678 $ac_func();
6679 #endif
6680
6681 ; return 0; }
6682 EOF
6683 if { (eval echo configure:6684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6684   rm -rf conftest*
6685   eval "ac_cv_func_$ac_func=yes"
6686 else
6687   echo "configure: failed program was:" >&5
6688   cat conftest.$ac_ext >&5
6689   rm -rf conftest*
6690   eval "ac_cv_func_$ac_func=no"
6691 fi
6692 rm -f conftest*
6693 fi
6694
6695 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6696   echo "$ac_t""yes" 1>&6
6697     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6698   cat >> confdefs.h <<EOF
6699 #define $ac_tr_func 1
6700 EOF
6701  
6702 else
6703   echo "$ac_t""no" 1>&6
6704 fi
6705 done
6706
6707 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6708 do
6709 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6710 echo "configure:6711: checking for $ac_func" >&5
6711 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6712   echo $ac_n "(cached) $ac_c" 1>&6
6713 else
6714   cat > conftest.$ac_ext <<EOF
6715 #line 6716 "configure"
6716 #include "confdefs.h"
6717 /* System header to define __stub macros and hopefully few prototypes,
6718     which can conflict with char $ac_func(); below.  */
6719 #include <assert.h>
6720 /* Override any gcc2 internal prototype to avoid an error.  */
6721 /* We use char because int might match the return type of a gcc2
6722     builtin and then its argument prototype would still apply.  */
6723 char $ac_func();
6724
6725 int main() {
6726
6727 /* The GNU C library defines this for functions which it implements
6728     to always fail with ENOSYS.  Some functions are actually named
6729     something starting with __ and the normal name is an alias.  */
6730 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6731 choke me
6732 #else
6733 $ac_func();
6734 #endif
6735
6736 ; return 0; }
6737 EOF
6738 if { (eval echo configure:6739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6739   rm -rf conftest*
6740   eval "ac_cv_func_$ac_func=yes"
6741 else
6742   echo "configure: failed program was:" >&5
6743   cat conftest.$ac_ext >&5
6744   rm -rf conftest*
6745   eval "ac_cv_func_$ac_func=no"
6746 fi
6747 rm -f conftest*
6748 fi
6749
6750 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6751   echo "$ac_t""yes" 1>&6
6752     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6753   cat >> confdefs.h <<EOF
6754 #define $ac_tr_func 1
6755 EOF
6756  
6757 else
6758   echo "$ac_t""no" 1>&6
6759 fi
6760 done
6761
6762 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6763 do
6764 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6765 echo "configure:6766: checking for $ac_func" >&5
6766 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6767   echo $ac_n "(cached) $ac_c" 1>&6
6768 else
6769   cat > conftest.$ac_ext <<EOF
6770 #line 6771 "configure"
6771 #include "confdefs.h"
6772 /* System header to define __stub macros and hopefully few prototypes,
6773     which can conflict with char $ac_func(); below.  */
6774 #include <assert.h>
6775 /* Override any gcc2 internal prototype to avoid an error.  */
6776 /* We use char because int might match the return type of a gcc2
6777     builtin and then its argument prototype would still apply.  */
6778 char $ac_func();
6779
6780 int main() {
6781
6782 /* The GNU C library defines this for functions which it implements
6783     to always fail with ENOSYS.  Some functions are actually named
6784     something starting with __ and the normal name is an alias.  */
6785 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6786 choke me
6787 #else
6788 $ac_func();
6789 #endif
6790
6791 ; return 0; }
6792 EOF
6793 if { (eval echo configure:6794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6794   rm -rf conftest*
6795   eval "ac_cv_func_$ac_func=yes"
6796 else
6797   echo "configure: failed program was:" >&5
6798   cat conftest.$ac_ext >&5
6799   rm -rf conftest*
6800   eval "ac_cv_func_$ac_func=no"
6801 fi
6802 rm -f conftest*
6803 fi
6804
6805 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6806   echo "$ac_t""yes" 1>&6
6807     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6808   cat >> confdefs.h <<EOF
6809 #define $ac_tr_func 1
6810 EOF
6811  
6812 else
6813   echo "$ac_t""no" 1>&6
6814 fi
6815 done
6816
6817 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6818 do
6819 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6820 echo "configure:6821: checking for $ac_func" >&5
6821 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6822   echo $ac_n "(cached) $ac_c" 1>&6
6823 else
6824   cat > conftest.$ac_ext <<EOF
6825 #line 6826 "configure"
6826 #include "confdefs.h"
6827 /* System header to define __stub macros and hopefully few prototypes,
6828     which can conflict with char $ac_func(); below.  */
6829 #include <assert.h>
6830 /* Override any gcc2 internal prototype to avoid an error.  */
6831 /* We use char because int might match the return type of a gcc2
6832     builtin and then its argument prototype would still apply.  */
6833 char $ac_func();
6834
6835 int main() {
6836
6837 /* The GNU C library defines this for functions which it implements
6838     to always fail with ENOSYS.  Some functions are actually named
6839     something starting with __ and the normal name is an alias.  */
6840 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6841 choke me
6842 #else
6843 $ac_func();
6844 #endif
6845
6846 ; return 0; }
6847 EOF
6848 if { (eval echo configure:6849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6849   rm -rf conftest*
6850   eval "ac_cv_func_$ac_func=yes"
6851 else
6852   echo "configure: failed program was:" >&5
6853   cat conftest.$ac_ext >&5
6854   rm -rf conftest*
6855   eval "ac_cv_func_$ac_func=no"
6856 fi
6857 rm -f conftest*
6858 fi
6859
6860 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6861   echo "$ac_t""yes" 1>&6
6862     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6863   cat >> confdefs.h <<EOF
6864 #define $ac_tr_func 1
6865 EOF
6866  
6867 else
6868   echo "$ac_t""no" 1>&6
6869 fi
6870 done
6871
6872 for ac_func in open64 _open64 __open64 creat64
6873 do
6874 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6875 echo "configure:6876: checking for $ac_func" >&5
6876 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6877   echo $ac_n "(cached) $ac_c" 1>&6
6878 else
6879   cat > conftest.$ac_ext <<EOF
6880 #line 6881 "configure"
6881 #include "confdefs.h"
6882 /* System header to define __stub macros and hopefully few prototypes,
6883     which can conflict with char $ac_func(); below.  */
6884 #include <assert.h>
6885 /* Override any gcc2 internal prototype to avoid an error.  */
6886 /* We use char because int might match the return type of a gcc2
6887     builtin and then its argument prototype would still apply.  */
6888 char $ac_func();
6889
6890 int main() {
6891
6892 /* The GNU C library defines this for functions which it implements
6893     to always fail with ENOSYS.  Some functions are actually named
6894     something starting with __ and the normal name is an alias.  */
6895 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6896 choke me
6897 #else
6898 $ac_func();
6899 #endif
6900
6901 ; return 0; }
6902 EOF
6903 if { (eval echo configure:6904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6904   rm -rf conftest*
6905   eval "ac_cv_func_$ac_func=yes"
6906 else
6907   echo "configure: failed program was:" >&5
6908   cat conftest.$ac_ext >&5
6909   rm -rf conftest*
6910   eval "ac_cv_func_$ac_func=no"
6911 fi
6912 rm -f conftest*
6913 fi
6914
6915 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6916   echo "$ac_t""yes" 1>&6
6917     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6918   cat >> confdefs.h <<EOF
6919 #define $ac_tr_func 1
6920 EOF
6921  
6922 else
6923   echo "$ac_t""no" 1>&6
6924 fi
6925 done
6926
6927
6928 #
6929 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6930 #
6931
6932 if test x$ac_cv_func_stat64 = xno ; then
6933   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6934 echo "configure:6935: checking for stat64 in <sys/stat.h>" >&5
6935   cat > conftest.$ac_ext <<EOF
6936 #line 6937 "configure"
6937 #include "confdefs.h"
6938
6939 #if defined(HAVE_UNISTD_H)
6940 #include <unistd.h>
6941 #endif
6942 #include <sys/stat.h>
6943
6944 int main() {
6945 struct stat64 st64; exit(stat64(".",&st64));
6946 ; return 0; }
6947 EOF
6948 if { (eval echo configure:6949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6949   rm -rf conftest*
6950   ac_cv_func_stat64=yes
6951 else
6952   echo "configure: failed program was:" >&5
6953   cat conftest.$ac_ext >&5
6954 fi
6955 rm -f conftest*
6956   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6957   if test x$ac_cv_func_stat64 = xyes ; then
6958     cat >> confdefs.h <<\EOF
6959 #define HAVE_STAT64 1
6960 EOF
6961
6962   fi
6963 fi
6964
6965 if test x$ac_cv_func_lstat64 = xno ; then
6966   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6967 echo "configure:6968: checking for lstat64 in <sys/stat.h>" >&5
6968   cat > conftest.$ac_ext <<EOF
6969 #line 6970 "configure"
6970 #include "confdefs.h"
6971
6972 #if defined(HAVE_UNISTD_H)
6973 #include <unistd.h>
6974 #endif
6975 #include <sys/stat.h>
6976
6977 int main() {
6978 struct stat64 st64; exit(lstat64(".",&st64));
6979 ; return 0; }
6980 EOF
6981 if { (eval echo configure:6982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6982   rm -rf conftest*
6983   ac_cv_func_lstat64=yes
6984 else
6985   echo "configure: failed program was:" >&5
6986   cat conftest.$ac_ext >&5
6987 fi
6988 rm -f conftest*
6989   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6990   if test x$ac_cv_func_lstat64 = xyes ; then
6991     cat >> confdefs.h <<\EOF
6992 #define HAVE_LSTAT64 1
6993 EOF
6994
6995   fi
6996 fi
6997
6998 if test x$ac_cv_func_fstat64 = xno ; then
6999   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
7000 echo "configure:7001: checking for fstat64 in <sys/stat.h>" >&5
7001   cat > conftest.$ac_ext <<EOF
7002 #line 7003 "configure"
7003 #include "confdefs.h"
7004
7005 #if defined(HAVE_UNISTD_H)
7006 #include <unistd.h>
7007 #endif
7008 #include <sys/stat.h>
7009
7010 int main() {
7011 struct stat64 st64; exit(fstat64(0,&st64));
7012 ; return 0; }
7013 EOF
7014 if { (eval echo configure:7015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7015   rm -rf conftest*
7016   ac_cv_func_fstat64=yes
7017 else
7018   echo "configure: failed program was:" >&5
7019   cat conftest.$ac_ext >&5
7020 fi
7021 rm -f conftest*
7022   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
7023   if test x$ac_cv_func_fstat64 = xyes ; then
7024     cat >> confdefs.h <<\EOF
7025 #define HAVE_FSTAT64 1
7026 EOF
7027
7028   fi
7029 fi
7030
7031 #####################################
7032 # we might need the resolv library on some systems
7033 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
7034 echo "configure:7035: checking for dn_expand in -lresolv" >&5
7035 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
7036 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7037   echo $ac_n "(cached) $ac_c" 1>&6
7038 else
7039   ac_save_LIBS="$LIBS"
7040 LIBS="-lresolv  $LIBS"
7041 cat > conftest.$ac_ext <<EOF
7042 #line 7043 "configure"
7043 #include "confdefs.h"
7044 /* Override any gcc2 internal prototype to avoid an error.  */
7045 /* We use char because int might match the return type of a gcc2
7046     builtin and then its argument prototype would still apply.  */
7047 char dn_expand();
7048
7049 int main() {
7050 dn_expand()
7051 ; return 0; }
7052 EOF
7053 if { (eval echo configure:7054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7054   rm -rf conftest*
7055   eval "ac_cv_lib_$ac_lib_var=yes"
7056 else
7057   echo "configure: failed program was:" >&5
7058   cat conftest.$ac_ext >&5
7059   rm -rf conftest*
7060   eval "ac_cv_lib_$ac_lib_var=no"
7061 fi
7062 rm -f conftest*
7063 LIBS="$ac_save_LIBS"
7064
7065 fi
7066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7067   echo "$ac_t""yes" 1>&6
7068     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7069     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7070   cat >> confdefs.h <<EOF
7071 #define $ac_tr_lib 1
7072 EOF
7073
7074   LIBS="-lresolv $LIBS"
7075
7076 else
7077   echo "$ac_t""no" 1>&6
7078 fi
7079
7080
7081 #
7082 # Check for the functions putprpwnam, set_auth_parameters,
7083 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7084 # Needed for OSF1 and HPUX.
7085 #
7086
7087 case "$LIBS" in
7088   *-lsecurity*) for ac_func in putprpwnam
7089 do
7090 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7091 echo "configure:7092: checking for $ac_func" >&5
7092 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7093   echo $ac_n "(cached) $ac_c" 1>&6
7094 else
7095   cat > conftest.$ac_ext <<EOF
7096 #line 7097 "configure"
7097 #include "confdefs.h"
7098 /* System header to define __stub macros and hopefully few prototypes,
7099     which can conflict with char $ac_func(); below.  */
7100 #include <assert.h>
7101 /* Override any gcc2 internal prototype to avoid an error.  */
7102 /* We use char because int might match the return type of a gcc2
7103     builtin and then its argument prototype would still apply.  */
7104 char $ac_func();
7105
7106 int main() {
7107
7108 /* The GNU C library defines this for functions which it implements
7109     to always fail with ENOSYS.  Some functions are actually named
7110     something starting with __ and the normal name is an alias.  */
7111 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7112 choke me
7113 #else
7114 $ac_func();
7115 #endif
7116
7117 ; return 0; }
7118 EOF
7119 if { (eval echo configure:7120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7120   rm -rf conftest*
7121   eval "ac_cv_func_$ac_func=yes"
7122 else
7123   echo "configure: failed program was:" >&5
7124   cat conftest.$ac_ext >&5
7125   rm -rf conftest*
7126   eval "ac_cv_func_$ac_func=no"
7127 fi
7128 rm -f conftest*
7129 fi
7130
7131 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7132   echo "$ac_t""yes" 1>&6
7133     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7134   cat >> confdefs.h <<EOF
7135 #define $ac_tr_func 1
7136 EOF
7137  
7138 else
7139   echo "$ac_t""no" 1>&6
7140 fi
7141 done
7142  ;;
7143   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7144 echo "configure:7145: checking for putprpwnam in -lsecurity" >&5
7145 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7146 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7147   echo $ac_n "(cached) $ac_c" 1>&6
7148 else
7149   ac_save_LIBS="$LIBS"
7150 LIBS="-lsecurity  $LIBS"
7151 cat > conftest.$ac_ext <<EOF
7152 #line 7153 "configure"
7153 #include "confdefs.h"
7154 /* Override any gcc2 internal prototype to avoid an error.  */
7155 /* We use char because int might match the return type of a gcc2
7156     builtin and then its argument prototype would still apply.  */
7157 char putprpwnam();
7158
7159 int main() {
7160 putprpwnam()
7161 ; return 0; }
7162 EOF
7163 if { (eval echo configure:7164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7164   rm -rf conftest*
7165   eval "ac_cv_lib_$ac_lib_var=yes"
7166 else
7167   echo "configure: failed program was:" >&5
7168   cat conftest.$ac_ext >&5
7169   rm -rf conftest*
7170   eval "ac_cv_lib_$ac_lib_var=no"
7171 fi
7172 rm -f conftest*
7173 LIBS="$ac_save_LIBS"
7174
7175 fi
7176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7177   echo "$ac_t""yes" 1>&6
7178     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7179     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7180   cat >> confdefs.h <<EOF
7181 #define $ac_tr_lib 1
7182 EOF
7183
7184   LIBS="-lsecurity $LIBS"
7185
7186 else
7187   echo "$ac_t""no" 1>&6
7188 fi
7189  
7190      for ac_func in putprpwnam
7191 do
7192 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7193 echo "configure:7194: checking for $ac_func" >&5
7194 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7195   echo $ac_n "(cached) $ac_c" 1>&6
7196 else
7197   cat > conftest.$ac_ext <<EOF
7198 #line 7199 "configure"
7199 #include "confdefs.h"
7200 /* System header to define __stub macros and hopefully few prototypes,
7201     which can conflict with char $ac_func(); below.  */
7202 #include <assert.h>
7203 /* Override any gcc2 internal prototype to avoid an error.  */
7204 /* We use char because int might match the return type of a gcc2
7205     builtin and then its argument prototype would still apply.  */
7206 char $ac_func();
7207
7208 int main() {
7209
7210 /* The GNU C library defines this for functions which it implements
7211     to always fail with ENOSYS.  Some functions are actually named
7212     something starting with __ and the normal name is an alias.  */
7213 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7214 choke me
7215 #else
7216 $ac_func();
7217 #endif
7218
7219 ; return 0; }
7220 EOF
7221 if { (eval echo configure:7222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7222   rm -rf conftest*
7223   eval "ac_cv_func_$ac_func=yes"
7224 else
7225   echo "configure: failed program was:" >&5
7226   cat conftest.$ac_ext >&5
7227   rm -rf conftest*
7228   eval "ac_cv_func_$ac_func=no"
7229 fi
7230 rm -f conftest*
7231 fi
7232
7233 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7234   echo "$ac_t""yes" 1>&6
7235     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7236   cat >> confdefs.h <<EOF
7237 #define $ac_tr_func 1
7238 EOF
7239  
7240 else
7241   echo "$ac_t""no" 1>&6
7242 fi
7243 done
7244
7245   ;;
7246   esac
7247
7248 case "$LIBS" in
7249   *-lsec*) for ac_func in putprpwnam
7250 do
7251 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7252 echo "configure:7253: checking for $ac_func" >&5
7253 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7254   echo $ac_n "(cached) $ac_c" 1>&6
7255 else
7256   cat > conftest.$ac_ext <<EOF
7257 #line 7258 "configure"
7258 #include "confdefs.h"
7259 /* System header to define __stub macros and hopefully few prototypes,
7260     which can conflict with char $ac_func(); below.  */
7261 #include <assert.h>
7262 /* Override any gcc2 internal prototype to avoid an error.  */
7263 /* We use char because int might match the return type of a gcc2
7264     builtin and then its argument prototype would still apply.  */
7265 char $ac_func();
7266
7267 int main() {
7268
7269 /* The GNU C library defines this for functions which it implements
7270     to always fail with ENOSYS.  Some functions are actually named
7271     something starting with __ and the normal name is an alias.  */
7272 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7273 choke me
7274 #else
7275 $ac_func();
7276 #endif
7277
7278 ; return 0; }
7279 EOF
7280 if { (eval echo configure:7281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7281   rm -rf conftest*
7282   eval "ac_cv_func_$ac_func=yes"
7283 else
7284   echo "configure: failed program was:" >&5
7285   cat conftest.$ac_ext >&5
7286   rm -rf conftest*
7287   eval "ac_cv_func_$ac_func=no"
7288 fi
7289 rm -f conftest*
7290 fi
7291
7292 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7293   echo "$ac_t""yes" 1>&6
7294     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7295   cat >> confdefs.h <<EOF
7296 #define $ac_tr_func 1
7297 EOF
7298  
7299 else
7300   echo "$ac_t""no" 1>&6
7301 fi
7302 done
7303  ;;
7304   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7305 echo "configure:7306: checking for putprpwnam in -lsec" >&5
7306 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7307 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7308   echo $ac_n "(cached) $ac_c" 1>&6
7309 else
7310   ac_save_LIBS="$LIBS"
7311 LIBS="-lsec  $LIBS"
7312 cat > conftest.$ac_ext <<EOF
7313 #line 7314 "configure"
7314 #include "confdefs.h"
7315 /* Override any gcc2 internal prototype to avoid an error.  */
7316 /* We use char because int might match the return type of a gcc2
7317     builtin and then its argument prototype would still apply.  */
7318 char putprpwnam();
7319
7320 int main() {
7321 putprpwnam()
7322 ; return 0; }
7323 EOF
7324 if { (eval echo configure:7325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7325   rm -rf conftest*
7326   eval "ac_cv_lib_$ac_lib_var=yes"
7327 else
7328   echo "configure: failed program was:" >&5
7329   cat conftest.$ac_ext >&5
7330   rm -rf conftest*
7331   eval "ac_cv_lib_$ac_lib_var=no"
7332 fi
7333 rm -f conftest*
7334 LIBS="$ac_save_LIBS"
7335
7336 fi
7337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7338   echo "$ac_t""yes" 1>&6
7339     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7340     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7341   cat >> confdefs.h <<EOF
7342 #define $ac_tr_lib 1
7343 EOF
7344
7345   LIBS="-lsec $LIBS"
7346
7347 else
7348   echo "$ac_t""no" 1>&6
7349 fi
7350  
7351      for ac_func in putprpwnam
7352 do
7353 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7354 echo "configure:7355: checking for $ac_func" >&5
7355 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7356   echo $ac_n "(cached) $ac_c" 1>&6
7357 else
7358   cat > conftest.$ac_ext <<EOF
7359 #line 7360 "configure"
7360 #include "confdefs.h"
7361 /* System header to define __stub macros and hopefully few prototypes,
7362     which can conflict with char $ac_func(); below.  */
7363 #include <assert.h>
7364 /* Override any gcc2 internal prototype to avoid an error.  */
7365 /* We use char because int might match the return type of a gcc2
7366     builtin and then its argument prototype would still apply.  */
7367 char $ac_func();
7368
7369 int main() {
7370
7371 /* The GNU C library defines this for functions which it implements
7372     to always fail with ENOSYS.  Some functions are actually named
7373     something starting with __ and the normal name is an alias.  */
7374 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7375 choke me
7376 #else
7377 $ac_func();
7378 #endif
7379
7380 ; return 0; }
7381 EOF
7382 if { (eval echo configure:7383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7383   rm -rf conftest*
7384   eval "ac_cv_func_$ac_func=yes"
7385 else
7386   echo "configure: failed program was:" >&5
7387   cat conftest.$ac_ext >&5
7388   rm -rf conftest*
7389   eval "ac_cv_func_$ac_func=no"
7390 fi
7391 rm -f conftest*
7392 fi
7393
7394 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7395   echo "$ac_t""yes" 1>&6
7396     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7397   cat >> confdefs.h <<EOF
7398 #define $ac_tr_func 1
7399 EOF
7400  
7401 else
7402   echo "$ac_t""no" 1>&6
7403 fi
7404 done
7405
7406   ;;
7407   esac
7408
7409
7410 case "$LIBS" in
7411   *-lsecurity*) for ac_func in set_auth_parameters
7412 do
7413 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7414 echo "configure:7415: checking for $ac_func" >&5
7415 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7416   echo $ac_n "(cached) $ac_c" 1>&6
7417 else
7418   cat > conftest.$ac_ext <<EOF
7419 #line 7420 "configure"
7420 #include "confdefs.h"
7421 /* System header to define __stub macros and hopefully few prototypes,
7422     which can conflict with char $ac_func(); below.  */
7423 #include <assert.h>
7424 /* Override any gcc2 internal prototype to avoid an error.  */
7425 /* We use char because int might match the return type of a gcc2
7426     builtin and then its argument prototype would still apply.  */
7427 char $ac_func();
7428
7429 int main() {
7430
7431 /* The GNU C library defines this for functions which it implements
7432     to always fail with ENOSYS.  Some functions are actually named
7433     something starting with __ and the normal name is an alias.  */
7434 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7435 choke me
7436 #else
7437 $ac_func();
7438 #endif
7439
7440 ; return 0; }
7441 EOF
7442 if { (eval echo configure:7443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7443   rm -rf conftest*
7444   eval "ac_cv_func_$ac_func=yes"
7445 else
7446   echo "configure: failed program was:" >&5
7447   cat conftest.$ac_ext >&5
7448   rm -rf conftest*
7449   eval "ac_cv_func_$ac_func=no"
7450 fi
7451 rm -f conftest*
7452 fi
7453
7454 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7455   echo "$ac_t""yes" 1>&6
7456     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7457   cat >> confdefs.h <<EOF
7458 #define $ac_tr_func 1
7459 EOF
7460  
7461 else
7462   echo "$ac_t""no" 1>&6
7463 fi
7464 done
7465  ;;
7466   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7467 echo "configure:7468: checking for set_auth_parameters in -lsecurity" >&5
7468 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7469 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7470   echo $ac_n "(cached) $ac_c" 1>&6
7471 else
7472   ac_save_LIBS="$LIBS"
7473 LIBS="-lsecurity  $LIBS"
7474 cat > conftest.$ac_ext <<EOF
7475 #line 7476 "configure"
7476 #include "confdefs.h"
7477 /* Override any gcc2 internal prototype to avoid an error.  */
7478 /* We use char because int might match the return type of a gcc2
7479     builtin and then its argument prototype would still apply.  */
7480 char set_auth_parameters();
7481
7482 int main() {
7483 set_auth_parameters()
7484 ; return 0; }
7485 EOF
7486 if { (eval echo configure:7487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7487   rm -rf conftest*
7488   eval "ac_cv_lib_$ac_lib_var=yes"
7489 else
7490   echo "configure: failed program was:" >&5
7491   cat conftest.$ac_ext >&5
7492   rm -rf conftest*
7493   eval "ac_cv_lib_$ac_lib_var=no"
7494 fi
7495 rm -f conftest*
7496 LIBS="$ac_save_LIBS"
7497
7498 fi
7499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7500   echo "$ac_t""yes" 1>&6
7501     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7502     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7503   cat >> confdefs.h <<EOF
7504 #define $ac_tr_lib 1
7505 EOF
7506
7507   LIBS="-lsecurity $LIBS"
7508
7509 else
7510   echo "$ac_t""no" 1>&6
7511 fi
7512  
7513      for ac_func in set_auth_parameters
7514 do
7515 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7516 echo "configure:7517: checking for $ac_func" >&5
7517 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7518   echo $ac_n "(cached) $ac_c" 1>&6
7519 else
7520   cat > conftest.$ac_ext <<EOF
7521 #line 7522 "configure"
7522 #include "confdefs.h"
7523 /* System header to define __stub macros and hopefully few prototypes,
7524     which can conflict with char $ac_func(); below.  */
7525 #include <assert.h>
7526 /* Override any gcc2 internal prototype to avoid an error.  */
7527 /* We use char because int might match the return type of a gcc2
7528     builtin and then its argument prototype would still apply.  */
7529 char $ac_func();
7530
7531 int main() {
7532
7533 /* The GNU C library defines this for functions which it implements
7534     to always fail with ENOSYS.  Some functions are actually named
7535     something starting with __ and the normal name is an alias.  */
7536 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7537 choke me
7538 #else
7539 $ac_func();
7540 #endif
7541
7542 ; return 0; }
7543 EOF
7544 if { (eval echo configure:7545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7545   rm -rf conftest*
7546   eval "ac_cv_func_$ac_func=yes"
7547 else
7548   echo "configure: failed program was:" >&5
7549   cat conftest.$ac_ext >&5
7550   rm -rf conftest*
7551   eval "ac_cv_func_$ac_func=no"
7552 fi
7553 rm -f conftest*
7554 fi
7555
7556 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7557   echo "$ac_t""yes" 1>&6
7558     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7559   cat >> confdefs.h <<EOF
7560 #define $ac_tr_func 1
7561 EOF
7562  
7563 else
7564   echo "$ac_t""no" 1>&6
7565 fi
7566 done
7567
7568   ;;
7569   esac
7570
7571 case "$LIBS" in
7572   *-lsec*) for ac_func in set_auth_parameters
7573 do
7574 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7575 echo "configure:7576: checking for $ac_func" >&5
7576 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7577   echo $ac_n "(cached) $ac_c" 1>&6
7578 else
7579   cat > conftest.$ac_ext <<EOF
7580 #line 7581 "configure"
7581 #include "confdefs.h"
7582 /* System header to define __stub macros and hopefully few prototypes,
7583     which can conflict with char $ac_func(); below.  */
7584 #include <assert.h>
7585 /* Override any gcc2 internal prototype to avoid an error.  */
7586 /* We use char because int might match the return type of a gcc2
7587     builtin and then its argument prototype would still apply.  */
7588 char $ac_func();
7589
7590 int main() {
7591
7592 /* The GNU C library defines this for functions which it implements
7593     to always fail with ENOSYS.  Some functions are actually named
7594     something starting with __ and the normal name is an alias.  */
7595 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7596 choke me
7597 #else
7598 $ac_func();
7599 #endif
7600
7601 ; return 0; }
7602 EOF
7603 if { (eval echo configure:7604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7604   rm -rf conftest*
7605   eval "ac_cv_func_$ac_func=yes"
7606 else
7607   echo "configure: failed program was:" >&5
7608   cat conftest.$ac_ext >&5
7609   rm -rf conftest*
7610   eval "ac_cv_func_$ac_func=no"
7611 fi
7612 rm -f conftest*
7613 fi
7614
7615 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7616   echo "$ac_t""yes" 1>&6
7617     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7618   cat >> confdefs.h <<EOF
7619 #define $ac_tr_func 1
7620 EOF
7621  
7622 else
7623   echo "$ac_t""no" 1>&6
7624 fi
7625 done
7626  ;;
7627   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7628 echo "configure:7629: checking for set_auth_parameters in -lsec" >&5
7629 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7630 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7631   echo $ac_n "(cached) $ac_c" 1>&6
7632 else
7633   ac_save_LIBS="$LIBS"
7634 LIBS="-lsec  $LIBS"
7635 cat > conftest.$ac_ext <<EOF
7636 #line 7637 "configure"
7637 #include "confdefs.h"
7638 /* Override any gcc2 internal prototype to avoid an error.  */
7639 /* We use char because int might match the return type of a gcc2
7640     builtin and then its argument prototype would still apply.  */
7641 char set_auth_parameters();
7642
7643 int main() {
7644 set_auth_parameters()
7645 ; return 0; }
7646 EOF
7647 if { (eval echo configure:7648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7648   rm -rf conftest*
7649   eval "ac_cv_lib_$ac_lib_var=yes"
7650 else
7651   echo "configure: failed program was:" >&5
7652   cat conftest.$ac_ext >&5
7653   rm -rf conftest*
7654   eval "ac_cv_lib_$ac_lib_var=no"
7655 fi
7656 rm -f conftest*
7657 LIBS="$ac_save_LIBS"
7658
7659 fi
7660 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7661   echo "$ac_t""yes" 1>&6
7662     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7663     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7664   cat >> confdefs.h <<EOF
7665 #define $ac_tr_lib 1
7666 EOF
7667
7668   LIBS="-lsec $LIBS"
7669
7670 else
7671   echo "$ac_t""no" 1>&6
7672 fi
7673  
7674      for ac_func in set_auth_parameters
7675 do
7676 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7677 echo "configure:7678: checking for $ac_func" >&5
7678 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7679   echo $ac_n "(cached) $ac_c" 1>&6
7680 else
7681   cat > conftest.$ac_ext <<EOF
7682 #line 7683 "configure"
7683 #include "confdefs.h"
7684 /* System header to define __stub macros and hopefully few prototypes,
7685     which can conflict with char $ac_func(); below.  */
7686 #include <assert.h>
7687 /* Override any gcc2 internal prototype to avoid an error.  */
7688 /* We use char because int might match the return type of a gcc2
7689     builtin and then its argument prototype would still apply.  */
7690 char $ac_func();
7691
7692 int main() {
7693
7694 /* The GNU C library defines this for functions which it implements
7695     to always fail with ENOSYS.  Some functions are actually named
7696     something starting with __ and the normal name is an alias.  */
7697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7698 choke me
7699 #else
7700 $ac_func();
7701 #endif
7702
7703 ; return 0; }
7704 EOF
7705 if { (eval echo configure:7706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7706   rm -rf conftest*
7707   eval "ac_cv_func_$ac_func=yes"
7708 else
7709   echo "configure: failed program was:" >&5
7710   cat conftest.$ac_ext >&5
7711   rm -rf conftest*
7712   eval "ac_cv_func_$ac_func=no"
7713 fi
7714 rm -f conftest*
7715 fi
7716
7717 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7718   echo "$ac_t""yes" 1>&6
7719     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7720   cat >> confdefs.h <<EOF
7721 #define $ac_tr_func 1
7722 EOF
7723  
7724 else
7725   echo "$ac_t""no" 1>&6
7726 fi
7727 done
7728
7729   ;;
7730   esac
7731
7732
7733 # UnixWare 7.x has its getspnam in -lgen
7734 case "$LIBS" in
7735   *-lgen*) for ac_func in getspnam
7736 do
7737 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7738 echo "configure:7739: checking for $ac_func" >&5
7739 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7740   echo $ac_n "(cached) $ac_c" 1>&6
7741 else
7742   cat > conftest.$ac_ext <<EOF
7743 #line 7744 "configure"
7744 #include "confdefs.h"
7745 /* System header to define __stub macros and hopefully few prototypes,
7746     which can conflict with char $ac_func(); below.  */
7747 #include <assert.h>
7748 /* Override any gcc2 internal prototype to avoid an error.  */
7749 /* We use char because int might match the return type of a gcc2
7750     builtin and then its argument prototype would still apply.  */
7751 char $ac_func();
7752
7753 int main() {
7754
7755 /* The GNU C library defines this for functions which it implements
7756     to always fail with ENOSYS.  Some functions are actually named
7757     something starting with __ and the normal name is an alias.  */
7758 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7759 choke me
7760 #else
7761 $ac_func();
7762 #endif
7763
7764 ; return 0; }
7765 EOF
7766 if { (eval echo configure:7767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7767   rm -rf conftest*
7768   eval "ac_cv_func_$ac_func=yes"
7769 else
7770   echo "configure: failed program was:" >&5
7771   cat conftest.$ac_ext >&5
7772   rm -rf conftest*
7773   eval "ac_cv_func_$ac_func=no"
7774 fi
7775 rm -f conftest*
7776 fi
7777
7778 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7779   echo "$ac_t""yes" 1>&6
7780     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7781   cat >> confdefs.h <<EOF
7782 #define $ac_tr_func 1
7783 EOF
7784  
7785 else
7786   echo "$ac_t""no" 1>&6
7787 fi
7788 done
7789  ;;
7790   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7791 echo "configure:7792: checking for getspnam in -lgen" >&5
7792 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7793 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7794   echo $ac_n "(cached) $ac_c" 1>&6
7795 else
7796   ac_save_LIBS="$LIBS"
7797 LIBS="-lgen  $LIBS"
7798 cat > conftest.$ac_ext <<EOF
7799 #line 7800 "configure"
7800 #include "confdefs.h"
7801 /* Override any gcc2 internal prototype to avoid an error.  */
7802 /* We use char because int might match the return type of a gcc2
7803     builtin and then its argument prototype would still apply.  */
7804 char getspnam();
7805
7806 int main() {
7807 getspnam()
7808 ; return 0; }
7809 EOF
7810 if { (eval echo configure:7811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7811   rm -rf conftest*
7812   eval "ac_cv_lib_$ac_lib_var=yes"
7813 else
7814   echo "configure: failed program was:" >&5
7815   cat conftest.$ac_ext >&5
7816   rm -rf conftest*
7817   eval "ac_cv_lib_$ac_lib_var=no"
7818 fi
7819 rm -f conftest*
7820 LIBS="$ac_save_LIBS"
7821
7822 fi
7823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7824   echo "$ac_t""yes" 1>&6
7825     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7826     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7827   cat >> confdefs.h <<EOF
7828 #define $ac_tr_lib 1
7829 EOF
7830
7831   LIBS="-lgen $LIBS"
7832
7833 else
7834   echo "$ac_t""no" 1>&6
7835 fi
7836  
7837      for ac_func in getspnam
7838 do
7839 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7840 echo "configure:7841: checking for $ac_func" >&5
7841 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7842   echo $ac_n "(cached) $ac_c" 1>&6
7843 else
7844   cat > conftest.$ac_ext <<EOF
7845 #line 7846 "configure"
7846 #include "confdefs.h"
7847 /* System header to define __stub macros and hopefully few prototypes,
7848     which can conflict with char $ac_func(); below.  */
7849 #include <assert.h>
7850 /* Override any gcc2 internal prototype to avoid an error.  */
7851 /* We use char because int might match the return type of a gcc2
7852     builtin and then its argument prototype would still apply.  */
7853 char $ac_func();
7854
7855 int main() {
7856
7857 /* The GNU C library defines this for functions which it implements
7858     to always fail with ENOSYS.  Some functions are actually named
7859     something starting with __ and the normal name is an alias.  */
7860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7861 choke me
7862 #else
7863 $ac_func();
7864 #endif
7865
7866 ; return 0; }
7867 EOF
7868 if { (eval echo configure:7869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7869   rm -rf conftest*
7870   eval "ac_cv_func_$ac_func=yes"
7871 else
7872   echo "configure: failed program was:" >&5
7873   cat conftest.$ac_ext >&5
7874   rm -rf conftest*
7875   eval "ac_cv_func_$ac_func=no"
7876 fi
7877 rm -f conftest*
7878 fi
7879
7880 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7881   echo "$ac_t""yes" 1>&6
7882     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7883   cat >> confdefs.h <<EOF
7884 #define $ac_tr_func 1
7885 EOF
7886  
7887 else
7888   echo "$ac_t""no" 1>&6
7889 fi
7890 done
7891
7892   ;;
7893   esac
7894
7895
7896 case "$LIBS" in
7897   *-lsecurity*) for ac_func in getspnam
7898 do
7899 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7900 echo "configure:7901: checking for $ac_func" >&5
7901 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7902   echo $ac_n "(cached) $ac_c" 1>&6
7903 else
7904   cat > conftest.$ac_ext <<EOF
7905 #line 7906 "configure"
7906 #include "confdefs.h"
7907 /* System header to define __stub macros and hopefully few prototypes,
7908     which can conflict with char $ac_func(); below.  */
7909 #include <assert.h>
7910 /* Override any gcc2 internal prototype to avoid an error.  */
7911 /* We use char because int might match the return type of a gcc2
7912     builtin and then its argument prototype would still apply.  */
7913 char $ac_func();
7914
7915 int main() {
7916
7917 /* The GNU C library defines this for functions which it implements
7918     to always fail with ENOSYS.  Some functions are actually named
7919     something starting with __ and the normal name is an alias.  */
7920 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7921 choke me
7922 #else
7923 $ac_func();
7924 #endif
7925
7926 ; return 0; }
7927 EOF
7928 if { (eval echo configure:7929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7929   rm -rf conftest*
7930   eval "ac_cv_func_$ac_func=yes"
7931 else
7932   echo "configure: failed program was:" >&5
7933   cat conftest.$ac_ext >&5
7934   rm -rf conftest*
7935   eval "ac_cv_func_$ac_func=no"
7936 fi
7937 rm -f conftest*
7938 fi
7939
7940 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7941   echo "$ac_t""yes" 1>&6
7942     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7943   cat >> confdefs.h <<EOF
7944 #define $ac_tr_func 1
7945 EOF
7946  
7947 else
7948   echo "$ac_t""no" 1>&6
7949 fi
7950 done
7951  ;;
7952   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7953 echo "configure:7954: checking for getspnam in -lsecurity" >&5
7954 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7955 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7956   echo $ac_n "(cached) $ac_c" 1>&6
7957 else
7958   ac_save_LIBS="$LIBS"
7959 LIBS="-lsecurity  $LIBS"
7960 cat > conftest.$ac_ext <<EOF
7961 #line 7962 "configure"
7962 #include "confdefs.h"
7963 /* Override any gcc2 internal prototype to avoid an error.  */
7964 /* We use char because int might match the return type of a gcc2
7965     builtin and then its argument prototype would still apply.  */
7966 char getspnam();
7967
7968 int main() {
7969 getspnam()
7970 ; return 0; }
7971 EOF
7972 if { (eval echo configure:7973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7973   rm -rf conftest*
7974   eval "ac_cv_lib_$ac_lib_var=yes"
7975 else
7976   echo "configure: failed program was:" >&5
7977   cat conftest.$ac_ext >&5
7978   rm -rf conftest*
7979   eval "ac_cv_lib_$ac_lib_var=no"
7980 fi
7981 rm -f conftest*
7982 LIBS="$ac_save_LIBS"
7983
7984 fi
7985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7986   echo "$ac_t""yes" 1>&6
7987     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7988     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7989   cat >> confdefs.h <<EOF
7990 #define $ac_tr_lib 1
7991 EOF
7992
7993   LIBS="-lsecurity $LIBS"
7994
7995 else
7996   echo "$ac_t""no" 1>&6
7997 fi
7998  
7999      for ac_func in getspnam
8000 do
8001 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8002 echo "configure:8003: checking for $ac_func" >&5
8003 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8004   echo $ac_n "(cached) $ac_c" 1>&6
8005 else
8006   cat > conftest.$ac_ext <<EOF
8007 #line 8008 "configure"
8008 #include "confdefs.h"
8009 /* System header to define __stub macros and hopefully few prototypes,
8010     which can conflict with char $ac_func(); below.  */
8011 #include <assert.h>
8012 /* Override any gcc2 internal prototype to avoid an error.  */
8013 /* We use char because int might match the return type of a gcc2
8014     builtin and then its argument prototype would still apply.  */
8015 char $ac_func();
8016
8017 int main() {
8018
8019 /* The GNU C library defines this for functions which it implements
8020     to always fail with ENOSYS.  Some functions are actually named
8021     something starting with __ and the normal name is an alias.  */
8022 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8023 choke me
8024 #else
8025 $ac_func();
8026 #endif
8027
8028 ; return 0; }
8029 EOF
8030 if { (eval echo configure:8031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8031   rm -rf conftest*
8032   eval "ac_cv_func_$ac_func=yes"
8033 else
8034   echo "configure: failed program was:" >&5
8035   cat conftest.$ac_ext >&5
8036   rm -rf conftest*
8037   eval "ac_cv_func_$ac_func=no"
8038 fi
8039 rm -f conftest*
8040 fi
8041
8042 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8043   echo "$ac_t""yes" 1>&6
8044     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8045   cat >> confdefs.h <<EOF
8046 #define $ac_tr_func 1
8047 EOF
8048  
8049 else
8050   echo "$ac_t""no" 1>&6
8051 fi
8052 done
8053
8054   ;;
8055   esac
8056
8057 case "$LIBS" in
8058   *-lsec*) for ac_func in getspnam
8059 do
8060 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8061 echo "configure:8062: checking for $ac_func" >&5
8062 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8063   echo $ac_n "(cached) $ac_c" 1>&6
8064 else
8065   cat > conftest.$ac_ext <<EOF
8066 #line 8067 "configure"
8067 #include "confdefs.h"
8068 /* System header to define __stub macros and hopefully few prototypes,
8069     which can conflict with char $ac_func(); below.  */
8070 #include <assert.h>
8071 /* Override any gcc2 internal prototype to avoid an error.  */
8072 /* We use char because int might match the return type of a gcc2
8073     builtin and then its argument prototype would still apply.  */
8074 char $ac_func();
8075
8076 int main() {
8077
8078 /* The GNU C library defines this for functions which it implements
8079     to always fail with ENOSYS.  Some functions are actually named
8080     something starting with __ and the normal name is an alias.  */
8081 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8082 choke me
8083 #else
8084 $ac_func();
8085 #endif
8086
8087 ; return 0; }
8088 EOF
8089 if { (eval echo configure:8090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8090   rm -rf conftest*
8091   eval "ac_cv_func_$ac_func=yes"
8092 else
8093   echo "configure: failed program was:" >&5
8094   cat conftest.$ac_ext >&5
8095   rm -rf conftest*
8096   eval "ac_cv_func_$ac_func=no"
8097 fi
8098 rm -f conftest*
8099 fi
8100
8101 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8102   echo "$ac_t""yes" 1>&6
8103     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8104   cat >> confdefs.h <<EOF
8105 #define $ac_tr_func 1
8106 EOF
8107  
8108 else
8109   echo "$ac_t""no" 1>&6
8110 fi
8111 done
8112  ;;
8113   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8114 echo "configure:8115: checking for getspnam in -lsec" >&5
8115 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8116 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8117   echo $ac_n "(cached) $ac_c" 1>&6
8118 else
8119   ac_save_LIBS="$LIBS"
8120 LIBS="-lsec  $LIBS"
8121 cat > conftest.$ac_ext <<EOF
8122 #line 8123 "configure"
8123 #include "confdefs.h"
8124 /* Override any gcc2 internal prototype to avoid an error.  */
8125 /* We use char because int might match the return type of a gcc2
8126     builtin and then its argument prototype would still apply.  */
8127 char getspnam();
8128
8129 int main() {
8130 getspnam()
8131 ; return 0; }
8132 EOF
8133 if { (eval echo configure:8134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8134   rm -rf conftest*
8135   eval "ac_cv_lib_$ac_lib_var=yes"
8136 else
8137   echo "configure: failed program was:" >&5
8138   cat conftest.$ac_ext >&5
8139   rm -rf conftest*
8140   eval "ac_cv_lib_$ac_lib_var=no"
8141 fi
8142 rm -f conftest*
8143 LIBS="$ac_save_LIBS"
8144
8145 fi
8146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8147   echo "$ac_t""yes" 1>&6
8148     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8149     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8150   cat >> confdefs.h <<EOF
8151 #define $ac_tr_lib 1
8152 EOF
8153
8154   LIBS="-lsec $LIBS"
8155
8156 else
8157   echo "$ac_t""no" 1>&6
8158 fi
8159  
8160      for ac_func in getspnam
8161 do
8162 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8163 echo "configure:8164: checking for $ac_func" >&5
8164 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8165   echo $ac_n "(cached) $ac_c" 1>&6
8166 else
8167   cat > conftest.$ac_ext <<EOF
8168 #line 8169 "configure"
8169 #include "confdefs.h"
8170 /* System header to define __stub macros and hopefully few prototypes,
8171     which can conflict with char $ac_func(); below.  */
8172 #include <assert.h>
8173 /* Override any gcc2 internal prototype to avoid an error.  */
8174 /* We use char because int might match the return type of a gcc2
8175     builtin and then its argument prototype would still apply.  */
8176 char $ac_func();
8177
8178 int main() {
8179
8180 /* The GNU C library defines this for functions which it implements
8181     to always fail with ENOSYS.  Some functions are actually named
8182     something starting with __ and the normal name is an alias.  */
8183 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8184 choke me
8185 #else
8186 $ac_func();
8187 #endif
8188
8189 ; return 0; }
8190 EOF
8191 if { (eval echo configure:8192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8192   rm -rf conftest*
8193   eval "ac_cv_func_$ac_func=yes"
8194 else
8195   echo "configure: failed program was:" >&5
8196   cat conftest.$ac_ext >&5
8197   rm -rf conftest*
8198   eval "ac_cv_func_$ac_func=no"
8199 fi
8200 rm -f conftest*
8201 fi
8202
8203 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8204   echo "$ac_t""yes" 1>&6
8205     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8206   cat >> confdefs.h <<EOF
8207 #define $ac_tr_func 1
8208 EOF
8209  
8210 else
8211   echo "$ac_t""no" 1>&6
8212 fi
8213 done
8214
8215   ;;
8216   esac
8217
8218
8219 case "$LIBS" in
8220   *-lsecurity*) for ac_func in bigcrypt
8221 do
8222 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8223 echo "configure:8224: checking for $ac_func" >&5
8224 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8225   echo $ac_n "(cached) $ac_c" 1>&6
8226 else
8227   cat > conftest.$ac_ext <<EOF
8228 #line 8229 "configure"
8229 #include "confdefs.h"
8230 /* System header to define __stub macros and hopefully few prototypes,
8231     which can conflict with char $ac_func(); below.  */
8232 #include <assert.h>
8233 /* Override any gcc2 internal prototype to avoid an error.  */
8234 /* We use char because int might match the return type of a gcc2
8235     builtin and then its argument prototype would still apply.  */
8236 char $ac_func();
8237
8238 int main() {
8239
8240 /* The GNU C library defines this for functions which it implements
8241     to always fail with ENOSYS.  Some functions are actually named
8242     something starting with __ and the normal name is an alias.  */
8243 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8244 choke me
8245 #else
8246 $ac_func();
8247 #endif
8248
8249 ; return 0; }
8250 EOF
8251 if { (eval echo configure:8252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8252   rm -rf conftest*
8253   eval "ac_cv_func_$ac_func=yes"
8254 else
8255   echo "configure: failed program was:" >&5
8256   cat conftest.$ac_ext >&5
8257   rm -rf conftest*
8258   eval "ac_cv_func_$ac_func=no"
8259 fi
8260 rm -f conftest*
8261 fi
8262
8263 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8264   echo "$ac_t""yes" 1>&6
8265     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8266   cat >> confdefs.h <<EOF
8267 #define $ac_tr_func 1
8268 EOF
8269  
8270 else
8271   echo "$ac_t""no" 1>&6
8272 fi
8273 done
8274  ;;
8275   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8276 echo "configure:8277: checking for bigcrypt in -lsecurity" >&5
8277 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8278 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8279   echo $ac_n "(cached) $ac_c" 1>&6
8280 else
8281   ac_save_LIBS="$LIBS"
8282 LIBS="-lsecurity  $LIBS"
8283 cat > conftest.$ac_ext <<EOF
8284 #line 8285 "configure"
8285 #include "confdefs.h"
8286 /* Override any gcc2 internal prototype to avoid an error.  */
8287 /* We use char because int might match the return type of a gcc2
8288     builtin and then its argument prototype would still apply.  */
8289 char bigcrypt();
8290
8291 int main() {
8292 bigcrypt()
8293 ; return 0; }
8294 EOF
8295 if { (eval echo configure:8296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8296   rm -rf conftest*
8297   eval "ac_cv_lib_$ac_lib_var=yes"
8298 else
8299   echo "configure: failed program was:" >&5
8300   cat conftest.$ac_ext >&5
8301   rm -rf conftest*
8302   eval "ac_cv_lib_$ac_lib_var=no"
8303 fi
8304 rm -f conftest*
8305 LIBS="$ac_save_LIBS"
8306
8307 fi
8308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8309   echo "$ac_t""yes" 1>&6
8310     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8311     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8312   cat >> confdefs.h <<EOF
8313 #define $ac_tr_lib 1
8314 EOF
8315
8316   LIBS="-lsecurity $LIBS"
8317
8318 else
8319   echo "$ac_t""no" 1>&6
8320 fi
8321  
8322      for ac_func in bigcrypt
8323 do
8324 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8325 echo "configure:8326: checking for $ac_func" >&5
8326 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8327   echo $ac_n "(cached) $ac_c" 1>&6
8328 else
8329   cat > conftest.$ac_ext <<EOF
8330 #line 8331 "configure"
8331 #include "confdefs.h"
8332 /* System header to define __stub macros and hopefully few prototypes,
8333     which can conflict with char $ac_func(); below.  */
8334 #include <assert.h>
8335 /* Override any gcc2 internal prototype to avoid an error.  */
8336 /* We use char because int might match the return type of a gcc2
8337     builtin and then its argument prototype would still apply.  */
8338 char $ac_func();
8339
8340 int main() {
8341
8342 /* The GNU C library defines this for functions which it implements
8343     to always fail with ENOSYS.  Some functions are actually named
8344     something starting with __ and the normal name is an alias.  */
8345 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8346 choke me
8347 #else
8348 $ac_func();
8349 #endif
8350
8351 ; return 0; }
8352 EOF
8353 if { (eval echo configure:8354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8354   rm -rf conftest*
8355   eval "ac_cv_func_$ac_func=yes"
8356 else
8357   echo "configure: failed program was:" >&5
8358   cat conftest.$ac_ext >&5
8359   rm -rf conftest*
8360   eval "ac_cv_func_$ac_func=no"
8361 fi
8362 rm -f conftest*
8363 fi
8364
8365 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8366   echo "$ac_t""yes" 1>&6
8367     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8368   cat >> confdefs.h <<EOF
8369 #define $ac_tr_func 1
8370 EOF
8371  
8372 else
8373   echo "$ac_t""no" 1>&6
8374 fi
8375 done
8376
8377   ;;
8378   esac
8379
8380 case "$LIBS" in
8381   *-lsec*) for ac_func in bigcrypt
8382 do
8383 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8384 echo "configure:8385: checking for $ac_func" >&5
8385 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8386   echo $ac_n "(cached) $ac_c" 1>&6
8387 else
8388   cat > conftest.$ac_ext <<EOF
8389 #line 8390 "configure"
8390 #include "confdefs.h"
8391 /* System header to define __stub macros and hopefully few prototypes,
8392     which can conflict with char $ac_func(); below.  */
8393 #include <assert.h>
8394 /* Override any gcc2 internal prototype to avoid an error.  */
8395 /* We use char because int might match the return type of a gcc2
8396     builtin and then its argument prototype would still apply.  */
8397 char $ac_func();
8398
8399 int main() {
8400
8401 /* The GNU C library defines this for functions which it implements
8402     to always fail with ENOSYS.  Some functions are actually named
8403     something starting with __ and the normal name is an alias.  */
8404 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8405 choke me
8406 #else
8407 $ac_func();
8408 #endif
8409
8410 ; return 0; }
8411 EOF
8412 if { (eval echo configure:8413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8413   rm -rf conftest*
8414   eval "ac_cv_func_$ac_func=yes"
8415 else
8416   echo "configure: failed program was:" >&5
8417   cat conftest.$ac_ext >&5
8418   rm -rf conftest*
8419   eval "ac_cv_func_$ac_func=no"
8420 fi
8421 rm -f conftest*
8422 fi
8423
8424 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8425   echo "$ac_t""yes" 1>&6
8426     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8427   cat >> confdefs.h <<EOF
8428 #define $ac_tr_func 1
8429 EOF
8430  
8431 else
8432   echo "$ac_t""no" 1>&6
8433 fi
8434 done
8435  ;;
8436   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8437 echo "configure:8438: checking for bigcrypt in -lsec" >&5
8438 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8439 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8440   echo $ac_n "(cached) $ac_c" 1>&6
8441 else
8442   ac_save_LIBS="$LIBS"
8443 LIBS="-lsec  $LIBS"
8444 cat > conftest.$ac_ext <<EOF
8445 #line 8446 "configure"
8446 #include "confdefs.h"
8447 /* Override any gcc2 internal prototype to avoid an error.  */
8448 /* We use char because int might match the return type of a gcc2
8449     builtin and then its argument prototype would still apply.  */
8450 char bigcrypt();
8451
8452 int main() {
8453 bigcrypt()
8454 ; return 0; }
8455 EOF
8456 if { (eval echo configure:8457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8457   rm -rf conftest*
8458   eval "ac_cv_lib_$ac_lib_var=yes"
8459 else
8460   echo "configure: failed program was:" >&5
8461   cat conftest.$ac_ext >&5
8462   rm -rf conftest*
8463   eval "ac_cv_lib_$ac_lib_var=no"
8464 fi
8465 rm -f conftest*
8466 LIBS="$ac_save_LIBS"
8467
8468 fi
8469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8470   echo "$ac_t""yes" 1>&6
8471     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8472     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8473   cat >> confdefs.h <<EOF
8474 #define $ac_tr_lib 1
8475 EOF
8476
8477   LIBS="-lsec $LIBS"
8478
8479 else
8480   echo "$ac_t""no" 1>&6
8481 fi
8482  
8483      for ac_func in bigcrypt
8484 do
8485 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8486 echo "configure:8487: checking for $ac_func" >&5
8487 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8488   echo $ac_n "(cached) $ac_c" 1>&6
8489 else
8490   cat > conftest.$ac_ext <<EOF
8491 #line 8492 "configure"
8492 #include "confdefs.h"
8493 /* System header to define __stub macros and hopefully few prototypes,
8494     which can conflict with char $ac_func(); below.  */
8495 #include <assert.h>
8496 /* Override any gcc2 internal prototype to avoid an error.  */
8497 /* We use char because int might match the return type of a gcc2
8498     builtin and then its argument prototype would still apply.  */
8499 char $ac_func();
8500
8501 int main() {
8502
8503 /* The GNU C library defines this for functions which it implements
8504     to always fail with ENOSYS.  Some functions are actually named
8505     something starting with __ and the normal name is an alias.  */
8506 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8507 choke me
8508 #else
8509 $ac_func();
8510 #endif
8511
8512 ; return 0; }
8513 EOF
8514 if { (eval echo configure:8515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8515   rm -rf conftest*
8516   eval "ac_cv_func_$ac_func=yes"
8517 else
8518   echo "configure: failed program was:" >&5
8519   cat conftest.$ac_ext >&5
8520   rm -rf conftest*
8521   eval "ac_cv_func_$ac_func=no"
8522 fi
8523 rm -f conftest*
8524 fi
8525
8526 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8527   echo "$ac_t""yes" 1>&6
8528     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8529   cat >> confdefs.h <<EOF
8530 #define $ac_tr_func 1
8531 EOF
8532  
8533 else
8534   echo "$ac_t""no" 1>&6
8535 fi
8536 done
8537
8538   ;;
8539   esac
8540
8541
8542 case "$LIBS" in
8543   *-lsecurity*) for ac_func in getprpwnam
8544 do
8545 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8546 echo "configure:8547: checking for $ac_func" >&5
8547 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8548   echo $ac_n "(cached) $ac_c" 1>&6
8549 else
8550   cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8553 /* System header to define __stub macros and hopefully few prototypes,
8554     which can conflict with char $ac_func(); below.  */
8555 #include <assert.h>
8556 /* Override any gcc2 internal prototype to avoid an error.  */
8557 /* We use char because int might match the return type of a gcc2
8558     builtin and then its argument prototype would still apply.  */
8559 char $ac_func();
8560
8561 int main() {
8562
8563 /* The GNU C library defines this for functions which it implements
8564     to always fail with ENOSYS.  Some functions are actually named
8565     something starting with __ and the normal name is an alias.  */
8566 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8567 choke me
8568 #else
8569 $ac_func();
8570 #endif
8571
8572 ; return 0; }
8573 EOF
8574 if { (eval echo configure:8575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8575   rm -rf conftest*
8576   eval "ac_cv_func_$ac_func=yes"
8577 else
8578   echo "configure: failed program was:" >&5
8579   cat conftest.$ac_ext >&5
8580   rm -rf conftest*
8581   eval "ac_cv_func_$ac_func=no"
8582 fi
8583 rm -f conftest*
8584 fi
8585
8586 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8587   echo "$ac_t""yes" 1>&6
8588     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8589   cat >> confdefs.h <<EOF
8590 #define $ac_tr_func 1
8591 EOF
8592  
8593 else
8594   echo "$ac_t""no" 1>&6
8595 fi
8596 done
8597  ;;
8598   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8599 echo "configure:8600: checking for getprpwnam in -lsecurity" >&5
8600 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8601 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8602   echo $ac_n "(cached) $ac_c" 1>&6
8603 else
8604   ac_save_LIBS="$LIBS"
8605 LIBS="-lsecurity  $LIBS"
8606 cat > conftest.$ac_ext <<EOF
8607 #line 8608 "configure"
8608 #include "confdefs.h"
8609 /* Override any gcc2 internal prototype to avoid an error.  */
8610 /* We use char because int might match the return type of a gcc2
8611     builtin and then its argument prototype would still apply.  */
8612 char getprpwnam();
8613
8614 int main() {
8615 getprpwnam()
8616 ; return 0; }
8617 EOF
8618 if { (eval echo configure:8619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8619   rm -rf conftest*
8620   eval "ac_cv_lib_$ac_lib_var=yes"
8621 else
8622   echo "configure: failed program was:" >&5
8623   cat conftest.$ac_ext >&5
8624   rm -rf conftest*
8625   eval "ac_cv_lib_$ac_lib_var=no"
8626 fi
8627 rm -f conftest*
8628 LIBS="$ac_save_LIBS"
8629
8630 fi
8631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8632   echo "$ac_t""yes" 1>&6
8633     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8634     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8635   cat >> confdefs.h <<EOF
8636 #define $ac_tr_lib 1
8637 EOF
8638
8639   LIBS="-lsecurity $LIBS"
8640
8641 else
8642   echo "$ac_t""no" 1>&6
8643 fi
8644  
8645      for ac_func in getprpwnam
8646 do
8647 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8648 echo "configure:8649: checking for $ac_func" >&5
8649 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8650   echo $ac_n "(cached) $ac_c" 1>&6
8651 else
8652   cat > conftest.$ac_ext <<EOF
8653 #line 8654 "configure"
8654 #include "confdefs.h"
8655 /* System header to define __stub macros and hopefully few prototypes,
8656     which can conflict with char $ac_func(); below.  */
8657 #include <assert.h>
8658 /* Override any gcc2 internal prototype to avoid an error.  */
8659 /* We use char because int might match the return type of a gcc2
8660     builtin and then its argument prototype would still apply.  */
8661 char $ac_func();
8662
8663 int main() {
8664
8665 /* The GNU C library defines this for functions which it implements
8666     to always fail with ENOSYS.  Some functions are actually named
8667     something starting with __ and the normal name is an alias.  */
8668 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8669 choke me
8670 #else
8671 $ac_func();
8672 #endif
8673
8674 ; return 0; }
8675 EOF
8676 if { (eval echo configure:8677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8677   rm -rf conftest*
8678   eval "ac_cv_func_$ac_func=yes"
8679 else
8680   echo "configure: failed program was:" >&5
8681   cat conftest.$ac_ext >&5
8682   rm -rf conftest*
8683   eval "ac_cv_func_$ac_func=no"
8684 fi
8685 rm -f conftest*
8686 fi
8687
8688 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8689   echo "$ac_t""yes" 1>&6
8690     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8691   cat >> confdefs.h <<EOF
8692 #define $ac_tr_func 1
8693 EOF
8694  
8695 else
8696   echo "$ac_t""no" 1>&6
8697 fi
8698 done
8699
8700   ;;
8701   esac
8702
8703 case "$LIBS" in
8704   *-lsec*) for ac_func in getprpwnam
8705 do
8706 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8707 echo "configure:8708: checking for $ac_func" >&5
8708 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8709   echo $ac_n "(cached) $ac_c" 1>&6
8710 else
8711   cat > conftest.$ac_ext <<EOF
8712 #line 8713 "configure"
8713 #include "confdefs.h"
8714 /* System header to define __stub macros and hopefully few prototypes,
8715     which can conflict with char $ac_func(); below.  */
8716 #include <assert.h>
8717 /* Override any gcc2 internal prototype to avoid an error.  */
8718 /* We use char because int might match the return type of a gcc2
8719     builtin and then its argument prototype would still apply.  */
8720 char $ac_func();
8721
8722 int main() {
8723
8724 /* The GNU C library defines this for functions which it implements
8725     to always fail with ENOSYS.  Some functions are actually named
8726     something starting with __ and the normal name is an alias.  */
8727 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8728 choke me
8729 #else
8730 $ac_func();
8731 #endif
8732
8733 ; return 0; }
8734 EOF
8735 if { (eval echo configure:8736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8736   rm -rf conftest*
8737   eval "ac_cv_func_$ac_func=yes"
8738 else
8739   echo "configure: failed program was:" >&5
8740   cat conftest.$ac_ext >&5
8741   rm -rf conftest*
8742   eval "ac_cv_func_$ac_func=no"
8743 fi
8744 rm -f conftest*
8745 fi
8746
8747 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8748   echo "$ac_t""yes" 1>&6
8749     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8750   cat >> confdefs.h <<EOF
8751 #define $ac_tr_func 1
8752 EOF
8753  
8754 else
8755   echo "$ac_t""no" 1>&6
8756 fi
8757 done
8758  ;;
8759   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8760 echo "configure:8761: checking for getprpwnam in -lsec" >&5
8761 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8762 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8763   echo $ac_n "(cached) $ac_c" 1>&6
8764 else
8765   ac_save_LIBS="$LIBS"
8766 LIBS="-lsec  $LIBS"
8767 cat > conftest.$ac_ext <<EOF
8768 #line 8769 "configure"
8769 #include "confdefs.h"
8770 /* Override any gcc2 internal prototype to avoid an error.  */
8771 /* We use char because int might match the return type of a gcc2
8772     builtin and then its argument prototype would still apply.  */
8773 char getprpwnam();
8774
8775 int main() {
8776 getprpwnam()
8777 ; return 0; }
8778 EOF
8779 if { (eval echo configure:8780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8780   rm -rf conftest*
8781   eval "ac_cv_lib_$ac_lib_var=yes"
8782 else
8783   echo "configure: failed program was:" >&5
8784   cat conftest.$ac_ext >&5
8785   rm -rf conftest*
8786   eval "ac_cv_lib_$ac_lib_var=no"
8787 fi
8788 rm -f conftest*
8789 LIBS="$ac_save_LIBS"
8790
8791 fi
8792 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8793   echo "$ac_t""yes" 1>&6
8794     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8795     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8796   cat >> confdefs.h <<EOF
8797 #define $ac_tr_lib 1
8798 EOF
8799
8800   LIBS="-lsec $LIBS"
8801
8802 else
8803   echo "$ac_t""no" 1>&6
8804 fi
8805  
8806      for ac_func in getprpwnam
8807 do
8808 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8809 echo "configure:8810: checking for $ac_func" >&5
8810 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8811   echo $ac_n "(cached) $ac_c" 1>&6
8812 else
8813   cat > conftest.$ac_ext <<EOF
8814 #line 8815 "configure"
8815 #include "confdefs.h"
8816 /* System header to define __stub macros and hopefully few prototypes,
8817     which can conflict with char $ac_func(); below.  */
8818 #include <assert.h>
8819 /* Override any gcc2 internal prototype to avoid an error.  */
8820 /* We use char because int might match the return type of a gcc2
8821     builtin and then its argument prototype would still apply.  */
8822 char $ac_func();
8823
8824 int main() {
8825
8826 /* The GNU C library defines this for functions which it implements
8827     to always fail with ENOSYS.  Some functions are actually named
8828     something starting with __ and the normal name is an alias.  */
8829 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8830 choke me
8831 #else
8832 $ac_func();
8833 #endif
8834
8835 ; return 0; }
8836 EOF
8837 if { (eval echo configure:8838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8838   rm -rf conftest*
8839   eval "ac_cv_func_$ac_func=yes"
8840 else
8841   echo "configure: failed program was:" >&5
8842   cat conftest.$ac_ext >&5
8843   rm -rf conftest*
8844   eval "ac_cv_func_$ac_func=no"
8845 fi
8846 rm -f conftest*
8847 fi
8848
8849 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8850   echo "$ac_t""yes" 1>&6
8851     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8852   cat >> confdefs.h <<EOF
8853 #define $ac_tr_func 1
8854 EOF
8855  
8856 else
8857   echo "$ac_t""no" 1>&6
8858 fi
8859 done
8860
8861   ;;
8862   esac
8863
8864
8865 # this bit needs to be modified for each OS that is suported by
8866 # smbwrapper. You need to specify how to created a shared library and
8867 # how to compile C code to produce PIC object files
8868
8869 # these are the defaults, good for lots of systems
8870 HOST_OS="$host_os"
8871 LDSHFLAGS="-shared"
8872 SONAMEFLAG="#"
8873 SHLD="\${CC}"
8874 PICFLAG=""
8875 PICSUFFIX="po"
8876 POBAD_CC="#"
8877 SHLIBEXT="so"
8878 # Assume non-shared by default and override below
8879 BLDSHARED="false"
8880 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8881 echo "configure:8882: checking ability to build shared libraries" >&5
8882
8883 # and these are for particular systems
8884 case "$host_os" in
8885                 *linux*)   cat >> confdefs.h <<\EOF
8886 #define LINUX 1
8887 EOF
8888
8889                         BLDSHARED="true"
8890                         LDSHFLAGS="-shared" 
8891                         DYNEXP="-Wl,--export-dynamic"
8892                         PICFLAG="-fPIC"
8893                         SONAMEFLAG="-Wl,-soname="
8894                         cat >> confdefs.h <<\EOF
8895 #define STAT_ST_BLOCKSIZE 512
8896 EOF
8897
8898                 ;;
8899                 *solaris*) cat >> confdefs.h <<\EOF
8900 #define SUNOS5 1
8901 EOF
8902
8903                         BLDSHARED="true"
8904                         LDSHFLAGS="-G"
8905                         SONAMEFLAG="-h "
8906                         if test "${GCC}" = "yes"; then
8907                                 PICFLAG="-fPIC"
8908                                 if test "${ac_cv_prog_gnu_ld}" = "yes"; then
8909                                         DYNEXP="-Wl,-E"
8910                                 fi
8911                         else
8912                                 PICFLAG="-KPIC"
8913                                 ## ${CFLAGS} added for building 64-bit shared 
8914                                 ## libs using Sun's Compiler
8915                                 LDSHFLAGS="-G \${CFLAGS}"
8916                                 POBAD_CC=""
8917                                 PICSUFFIX="po.o"
8918                         fi
8919                         cat >> confdefs.h <<\EOF
8920 #define STAT_ST_BLOCKSIZE 512
8921 EOF
8922
8923                 ;;
8924                 *sunos*) cat >> confdefs.h <<\EOF
8925 #define SUNOS4 1
8926 EOF
8927
8928                         BLDSHARED="true"
8929                         LDSHFLAGS="-G"
8930                         SONAMEFLAG="-Wl,-h,"
8931                         PICFLAG="-KPIC"   # Is this correct for SunOS
8932                 ;;
8933                 *freebsd*)  BLDSHARED="true"
8934                         LDSHFLAGS="-shared"
8935                         DYNEXP="-Wl,--export-dynamic"
8936                         SONAMEFLAG="-Wl,-soname,"
8937                         PICFLAG="-fPIC -DPIC"
8938                         cat >> confdefs.h <<\EOF
8939 #define STAT_ST_BLOCKSIZE 512
8940 EOF
8941
8942                 ;;
8943                 *openbsd*)  BLDSHARED="true"
8944                         LDSHFLAGS="-shared"
8945                         DYNEXP="-Wl,-Bdynamic"
8946                         SONAMEFLAG="-Wl,-soname,"
8947                         PICFLAG="-fPIC"
8948                         cat >> confdefs.h <<\EOF
8949 #define STAT_ST_BLOCKSIZE 512
8950 EOF
8951
8952                 ;;
8953                 *irix*) cat >> confdefs.h <<\EOF
8954 #define IRIX 1
8955 EOF
8956
8957                         case "$host_os" in
8958                         *irix6*) cat >> confdefs.h <<\EOF
8959 #define IRIX6 1
8960 EOF
8961
8962                         ;;
8963                         esac
8964                         ATTEMPT_WRAP32_BUILD=yes
8965                         BLDSHARED="true"
8966                         LDSHFLAGS="-set_version sgi1.0 -shared"
8967                         SONAMEFLAG="-soname "
8968                         SHLD="\${LD}"
8969                         if test "${GCC}" = "yes"; then
8970                                 PICFLAG="-fPIC"
8971                         else 
8972                                 PICFLAG="-KPIC"
8973                         fi
8974                         cat >> confdefs.h <<\EOF
8975 #define STAT_ST_BLOCKSIZE 512
8976 EOF
8977
8978                 ;;
8979                 *aix*) cat >> confdefs.h <<\EOF
8980 #define AIX 1
8981 EOF
8982
8983                         BLDSHARED="true"
8984                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8985                         DYNEXP="-Wl,-brtl,-bexpall"
8986                         PICFLAG="-O2"
8987                         if test "${GCC}" != "yes"; then
8988                                 ## for funky AIX compiler using strncpy()
8989                                 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
8990                         fi
8991
8992                         cat >> confdefs.h <<\EOF
8993 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8994 EOF
8995
8996                 ;;
8997                 *hpux*) cat >> confdefs.h <<\EOF
8998 #define HPUX 1
8999 EOF
9000
9001                         SHLIBEXT="sl"
9002                         # Use special PIC flags for the native HP-UX compiler.
9003                         if test $ac_cv_prog_cc_Ae = yes; then
9004                                 BLDSHARED="true"
9005                                 SHLD="/usr/bin/ld"
9006                                 LDSHFLAGS="-B symbolic -b -z"
9007                                 SONAMEFLAG="+h "
9008                                 PICFLAG="+z"
9009                         fi
9010                         DYNEXP="-Wl,-E"
9011                         cat >> confdefs.h <<\EOF
9012 #define STAT_ST_BLOCKSIZE 8192
9013 EOF
9014
9015                 ;;
9016                 *qnx*) cat >> confdefs.h <<\EOF
9017 #define QNX 1
9018 EOF
9019 ;;
9020                 *osf*) cat >> confdefs.h <<\EOF
9021 #define OSF1 1
9022 EOF
9023
9024                         BLDSHARED="true"
9025                         LDSHFLAGS="-shared"
9026                         SONAMEFLAG="-Wl,-soname,"
9027                         PICFLAG="-fPIC"
9028                 ;;
9029                 *sco*) cat >> confdefs.h <<\EOF
9030 #define SCO 1
9031 EOF
9032 ;;
9033                 *unixware*) cat >> confdefs.h <<\EOF
9034 #define UNIXWARE 1
9035 EOF
9036
9037                         BLDSHARED="true"
9038                         LDSHFLAGS="-shared"
9039                         SONAMEFLAG="-Wl,-soname,"
9040                         PICFLAG="-KPIC"
9041                 ;;
9042                 *next2*) cat >> confdefs.h <<\EOF
9043 #define NEXT2 1
9044 EOF
9045 ;;
9046                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
9047 set dummy groff; ac_word=$2
9048 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9049 echo "configure:9050: checking for $ac_word" >&5
9050 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
9051   echo $ac_n "(cached) $ac_c" 1>&6
9052 else
9053   if test -n "$ROFF"; then
9054   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
9055 else
9056   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
9057   ac_dummy="$PATH"
9058   for ac_dir in $ac_dummy; do
9059     test -z "$ac_dir" && ac_dir=.
9060     if test -f $ac_dir/$ac_word; then
9061       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9062       break
9063     fi
9064   done
9065   IFS="$ac_save_ifs"
9066 fi
9067 fi
9068 ROFF="$ac_cv_prog_ROFF"
9069 if test -n "$ROFF"; then
9070   echo "$ac_t""$ROFF" 1>&6
9071 else
9072   echo "$ac_t""no" 1>&6
9073 fi
9074 ;;
9075                 *sysv4*)
9076                         case "$host" in
9077                                 *-univel-*)     if  test "$GCC" != yes ; then
9078                                                 cat >> confdefs.h <<\EOF
9079 #define HAVE_MEMSET 1
9080 EOF
9081
9082                                         fi
9083                                         LDSHFLAGS="-G"
9084                                         DYNEXP="-Bexport"
9085                                 ;;
9086                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
9087 #define RELIANTUNIX 1
9088 EOF
9089 ;;
9090                         esac
9091                 ;;
9092
9093                 *sysv5*)
9094                         if  test "$GCC" != yes ; then
9095                                 cat >> confdefs.h <<\EOF
9096 #define HAVE_MEMSET 1
9097 EOF
9098
9099                         fi
9100                         LDSHFLAGS="-G"
9101                 ;;
9102 esac
9103
9104 echo "$ac_t""$BLDSHARED" 1>&6
9105 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9106 echo "configure:9107: checking linker flags for shared libraries" >&5
9107 echo "$ac_t""$LDSHFLAGS" 1>&6
9108 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9109 echo "configure:9110: checking compiler flags for position-independent code" >&5
9110 echo "$ac_t""$PICFLAGS" 1>&6
9111
9112 #######################################################
9113 # test whether building a shared library actually works
9114 if test $BLDSHARED = true; then
9115 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9116 echo "configure:9117: checking whether building shared libraries actually works" >&5
9117 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9118   echo $ac_n "(cached) $ac_c" 1>&6
9119 else
9120   
9121    ac_cv_shlib_works=no
9122    # try building a trivial shared library
9123    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9124      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9125      ac_cv_shlib_works=yes
9126    rm -f shlib.so shlib.po
9127
9128 fi
9129
9130 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9131 if test $ac_cv_shlib_works = no; then
9132    BLDSHARED=false
9133 fi
9134 fi
9135
9136
9137 # this updates our target list if we can build shared libs
9138 if test $BLDSHARED = true; then
9139    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9140 else
9141    LIBSMBCLIENT_SHARED=
9142 fi
9143
9144 ################
9145
9146 echo $ac_n "checking for long long""... $ac_c" 1>&6
9147 echo "configure:9148: checking for long long" >&5
9148 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9149   echo $ac_n "(cached) $ac_c" 1>&6
9150 else
9151   
9152 if test "$cross_compiling" = yes; then
9153   samba_cv_have_longlong=cross
9154 else
9155   cat > conftest.$ac_ext <<EOF
9156 #line 9157 "configure"
9157 #include "confdefs.h"
9158 #include <stdio.h>
9159 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9160 EOF
9161 if { (eval echo configure:9162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9162 then
9163   samba_cv_have_longlong=yes
9164 else
9165   echo "configure: failed program was:" >&5
9166   cat conftest.$ac_ext >&5
9167   rm -fr conftest*
9168   samba_cv_have_longlong=no
9169 fi
9170 rm -fr conftest*
9171 fi
9172
9173 fi
9174
9175 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9176 if test x"$samba_cv_have_longlong" = x"yes"; then
9177     cat >> confdefs.h <<\EOF
9178 #define HAVE_LONGLONG 1
9179 EOF
9180
9181 fi
9182
9183 #
9184 # Check if the compiler supports the LL prefix on long long integers.
9185 # AIX needs this.
9186
9187 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9188 echo "configure:9189: checking for LL suffix on long long integers" >&5
9189 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9190   echo $ac_n "(cached) $ac_c" 1>&6
9191 else
9192   
9193     cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9196 #include <stdio.h>
9197 int main() {
9198 long long i = 0x8000000000LL
9199 ; return 0; }
9200 EOF
9201 if { (eval echo configure:9202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9202   rm -rf conftest*
9203   samba_cv_compiler_supports_ll=yes
9204 else
9205   echo "configure: failed program was:" >&5
9206   cat conftest.$ac_ext >&5
9207   rm -rf conftest*
9208   samba_cv_compiler_supports_ll=no
9209 fi
9210 rm -f conftest*
9211 fi
9212
9213 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9214 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9215    cat >> confdefs.h <<\EOF
9216 #define COMPILER_SUPPORTS_LL 1
9217 EOF
9218
9219 fi
9220
9221   
9222 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9223 echo "configure:9224: checking for 64 bit off_t" >&5
9224 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9225   echo $ac_n "(cached) $ac_c" 1>&6
9226 else
9227   
9228 if test "$cross_compiling" = yes; then
9229   samba_cv_SIZEOF_OFF_T=cross
9230 else
9231   cat > conftest.$ac_ext <<EOF
9232 #line 9233 "configure"
9233 #include "confdefs.h"
9234 #include <stdio.h>
9235 #include <sys/stat.h>
9236 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9237 EOF
9238 if { (eval echo configure:9239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9239 then
9240   samba_cv_SIZEOF_OFF_T=yes
9241 else
9242   echo "configure: failed program was:" >&5
9243   cat conftest.$ac_ext >&5
9244   rm -fr conftest*
9245   samba_cv_SIZEOF_OFF_T=no
9246 fi
9247 rm -fr conftest*
9248 fi
9249
9250 fi
9251
9252 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9253 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9254     cat >> confdefs.h <<\EOF
9255 #define SIZEOF_OFF_T 8
9256 EOF
9257
9258 fi
9259
9260 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9261 echo "configure:9262: checking for off64_t" >&5
9262 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9263   echo $ac_n "(cached) $ac_c" 1>&6
9264 else
9265   
9266 if test "$cross_compiling" = yes; then
9267   samba_cv_HAVE_OFF64_T=cross
9268 else
9269   cat > conftest.$ac_ext <<EOF
9270 #line 9271 "configure"
9271 #include "confdefs.h"
9272
9273 #if defined(HAVE_UNISTD_H)
9274 #include <unistd.h>
9275 #endif
9276 #include <stdio.h>
9277 #include <sys/stat.h>
9278 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9279 EOF
9280 if { (eval echo configure:9281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9281 then
9282   samba_cv_HAVE_OFF64_T=yes
9283 else
9284   echo "configure: failed program was:" >&5
9285   cat conftest.$ac_ext >&5
9286   rm -fr conftest*
9287   samba_cv_HAVE_OFF64_T=no
9288 fi
9289 rm -fr conftest*
9290 fi
9291
9292 fi
9293
9294 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9295 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9296     cat >> confdefs.h <<\EOF
9297 #define HAVE_OFF64_T 1
9298 EOF
9299
9300 fi
9301
9302 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9303 echo "configure:9304: checking for 64 bit ino_t" >&5
9304 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9305   echo $ac_n "(cached) $ac_c" 1>&6
9306 else
9307   
9308 if test "$cross_compiling" = yes; then
9309   samba_cv_SIZEOF_INO_T=cross
9310 else
9311   cat > conftest.$ac_ext <<EOF
9312 #line 9313 "configure"
9313 #include "confdefs.h"
9314 #include <stdio.h>
9315 #include <sys/stat.h>
9316 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9317 EOF
9318 if { (eval echo configure:9319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9319 then
9320   samba_cv_SIZEOF_INO_T=yes
9321 else
9322   echo "configure: failed program was:" >&5
9323   cat conftest.$ac_ext >&5
9324   rm -fr conftest*
9325   samba_cv_SIZEOF_INO_T=no
9326 fi
9327 rm -fr conftest*
9328 fi
9329
9330 fi
9331
9332 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9333 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9334     cat >> confdefs.h <<\EOF
9335 #define SIZEOF_INO_T 8
9336 EOF
9337
9338 fi
9339
9340 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9341 echo "configure:9342: checking for ino64_t" >&5
9342 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9343   echo $ac_n "(cached) $ac_c" 1>&6
9344 else
9345   
9346 if test "$cross_compiling" = yes; then
9347   samba_cv_HAVE_INO64_T=cross
9348 else
9349   cat > conftest.$ac_ext <<EOF
9350 #line 9351 "configure"
9351 #include "confdefs.h"
9352
9353 #if defined(HAVE_UNISTD_H)
9354 #include <unistd.h>
9355 #endif
9356 #include <stdio.h>
9357 #include <sys/stat.h>
9358 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9359 EOF
9360 if { (eval echo configure:9361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9361 then
9362   samba_cv_HAVE_INO64_T=yes
9363 else
9364   echo "configure: failed program was:" >&5
9365   cat conftest.$ac_ext >&5
9366   rm -fr conftest*
9367   samba_cv_HAVE_INO64_T=no
9368 fi
9369 rm -fr conftest*
9370 fi
9371
9372 fi
9373
9374 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9375 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9376     cat >> confdefs.h <<\EOF
9377 #define HAVE_INO64_T 1
9378 EOF
9379
9380 fi
9381
9382 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9383 echo "configure:9384: checking for dev64_t" >&5
9384 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9385   echo $ac_n "(cached) $ac_c" 1>&6
9386 else
9387   
9388 if test "$cross_compiling" = yes; then
9389   samba_cv_HAVE_DEV64_T=cross
9390 else
9391   cat > conftest.$ac_ext <<EOF
9392 #line 9393 "configure"
9393 #include "confdefs.h"
9394
9395 #if defined(HAVE_UNISTD_H)
9396 #include <unistd.h>
9397 #endif
9398 #include <stdio.h>
9399 #include <sys/stat.h>
9400 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9401 EOF
9402 if { (eval echo configure:9403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9403 then
9404   samba_cv_HAVE_DEV64_T=yes
9405 else
9406   echo "configure: failed program was:" >&5
9407   cat conftest.$ac_ext >&5
9408   rm -fr conftest*
9409   samba_cv_HAVE_DEV64_T=no
9410 fi
9411 rm -fr conftest*
9412 fi
9413
9414 fi
9415
9416 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9417 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9418     cat >> confdefs.h <<\EOF
9419 #define HAVE_DEV64_T 1
9420 EOF
9421
9422 fi
9423
9424 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9425 echo "configure:9426: checking for struct dirent64" >&5
9426 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9427   echo $ac_n "(cached) $ac_c" 1>&6
9428 else
9429   
9430 cat > conftest.$ac_ext <<EOF
9431 #line 9432 "configure"
9432 #include "confdefs.h"
9433
9434 #if defined(HAVE_UNISTD_H)
9435 #include <unistd.h>
9436 #endif
9437 #include <sys/types.h>
9438 #include <dirent.h>
9439 int main() {
9440 struct dirent64 de;
9441 ; return 0; }
9442 EOF
9443 if { (eval echo configure:9444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9444   rm -rf conftest*
9445   samba_cv_HAVE_STRUCT_DIRENT64=yes
9446 else
9447   echo "configure: failed program was:" >&5
9448   cat conftest.$ac_ext >&5
9449   rm -rf conftest*
9450   samba_cv_HAVE_STRUCT_DIRENT64=no
9451 fi
9452 rm -f conftest*
9453 fi
9454
9455 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9456 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
9457     cat >> confdefs.h <<\EOF
9458 #define HAVE_STRUCT_DIRENT64 1
9459 EOF
9460
9461 fi
9462
9463 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9464 echo "configure:9465: checking for major macro" >&5
9465 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9466   echo $ac_n "(cached) $ac_c" 1>&6
9467 else
9468   
9469 if test "$cross_compiling" = yes; then
9470   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9471 else
9472   cat > conftest.$ac_ext <<EOF
9473 #line 9474 "configure"
9474 #include "confdefs.h"
9475
9476 #if defined(HAVE_UNISTD_H)
9477 #include <unistd.h>
9478 #endif
9479 #include <sys/types.h>
9480 main() { dev_t dev; int i = major(dev); return 0; }
9481 EOF
9482 if { (eval echo configure:9483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9483 then
9484   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9485 else
9486   echo "configure: failed program was:" >&5
9487   cat conftest.$ac_ext >&5
9488   rm -fr conftest*
9489   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9490 fi
9491 rm -fr conftest*
9492 fi
9493
9494 fi
9495
9496 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9497 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9498     cat >> confdefs.h <<\EOF
9499 #define HAVE_DEVICE_MAJOR_FN 1
9500 EOF
9501
9502 fi
9503
9504 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9505 echo "configure:9506: checking for minor macro" >&5
9506 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9507   echo $ac_n "(cached) $ac_c" 1>&6
9508 else
9509   
9510 if test "$cross_compiling" = yes; then
9511   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9512 else
9513   cat > conftest.$ac_ext <<EOF
9514 #line 9515 "configure"
9515 #include "confdefs.h"
9516
9517 #if defined(HAVE_UNISTD_H)
9518 #include <unistd.h>
9519 #endif
9520 #include <sys/types.h>
9521 main() { dev_t dev; int i = minor(dev); return 0; }
9522 EOF
9523 if { (eval echo configure:9524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9524 then
9525   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9526 else
9527   echo "configure: failed program was:" >&5
9528   cat conftest.$ac_ext >&5
9529   rm -fr conftest*
9530   samba_cv_HAVE_DEVICE_MINOR_FN=no
9531 fi
9532 rm -fr conftest*
9533 fi
9534
9535 fi
9536
9537 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9538 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9539     cat >> confdefs.h <<\EOF
9540 #define HAVE_DEVICE_MINOR_FN 1
9541 EOF
9542
9543 fi
9544
9545 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9546 echo "configure:9547: checking for unsigned char" >&5
9547 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9548   echo $ac_n "(cached) $ac_c" 1>&6
9549 else
9550   
9551 if test "$cross_compiling" = yes; then
9552   samba_cv_HAVE_UNSIGNED_CHAR=cross
9553 else
9554   cat > conftest.$ac_ext <<EOF
9555 #line 9556 "configure"
9556 #include "confdefs.h"
9557 #include <stdio.h>
9558 main() { char c; c=250; exit((c > 0)?0:1); }
9559 EOF
9560 if { (eval echo configure:9561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9561 then
9562   samba_cv_HAVE_UNSIGNED_CHAR=yes
9563 else
9564   echo "configure: failed program was:" >&5
9565   cat conftest.$ac_ext >&5
9566   rm -fr conftest*
9567   samba_cv_HAVE_UNSIGNED_CHAR=no
9568 fi
9569 rm -fr conftest*
9570 fi
9571
9572 fi
9573
9574 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9575 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9576     cat >> confdefs.h <<\EOF
9577 #define HAVE_UNSIGNED_CHAR 1
9578 EOF
9579
9580 fi
9581
9582 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9583 echo "configure:9584: checking for sin_len in sock" >&5
9584 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9585   echo $ac_n "(cached) $ac_c" 1>&6
9586 else
9587   
9588 cat > conftest.$ac_ext <<EOF
9589 #line 9590 "configure"
9590 #include "confdefs.h"
9591 #include <sys/types.h>
9592 #include <sys/socket.h>
9593 #include <netinet/in.h>
9594 int main() {
9595 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9596 ; return 0; }
9597 EOF
9598 if { (eval echo configure:9599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9599   rm -rf conftest*
9600   samba_cv_HAVE_SOCK_SIN_LEN=yes
9601 else
9602   echo "configure: failed program was:" >&5
9603   cat conftest.$ac_ext >&5
9604   rm -rf conftest*
9605   samba_cv_HAVE_SOCK_SIN_LEN=no
9606 fi
9607 rm -f conftest*
9608 fi
9609
9610 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9611 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9612     cat >> confdefs.h <<\EOF
9613 #define HAVE_SOCK_SIN_LEN 1
9614 EOF
9615
9616 fi
9617
9618 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9619 echo "configure:9620: checking whether seekdir returns void" >&5
9620 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9621   echo $ac_n "(cached) $ac_c" 1>&6
9622 else
9623   
9624 cat > conftest.$ac_ext <<EOF
9625 #line 9626 "configure"
9626 #include "confdefs.h"
9627 #include <sys/types.h>
9628 #include <dirent.h>
9629 void seekdir(DIR *d, long loc) { return; }
9630 int main() {
9631 return 0;
9632 ; return 0; }
9633 EOF
9634 if { (eval echo configure:9635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9635   rm -rf conftest*
9636   samba_cv_SEEKDIR_RETURNS_VOID=yes
9637 else
9638   echo "configure: failed program was:" >&5
9639   cat conftest.$ac_ext >&5
9640   rm -rf conftest*
9641   samba_cv_SEEKDIR_RETURNS_VOID=no
9642 fi
9643 rm -f conftest*
9644 fi
9645
9646 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9647 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9648     cat >> confdefs.h <<\EOF
9649 #define SEEKDIR_RETURNS_VOID 1
9650 EOF
9651
9652 fi
9653
9654 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9655 echo "configure:9656: checking for __FILE__ macro" >&5
9656 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9657   echo $ac_n "(cached) $ac_c" 1>&6
9658 else
9659   
9660 cat > conftest.$ac_ext <<EOF
9661 #line 9662 "configure"
9662 #include "confdefs.h"
9663 #include <stdio.h>
9664 int main() {
9665 printf("%s\n", __FILE__);
9666 ; return 0; }
9667 EOF
9668 if { (eval echo configure:9669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9669   rm -rf conftest*
9670   samba_cv_HAVE_FILE_MACRO=yes
9671 else
9672   echo "configure: failed program was:" >&5
9673   cat conftest.$ac_ext >&5
9674   rm -rf conftest*
9675   samba_cv_HAVE_FILE_MACRO=no
9676 fi
9677 rm -f conftest*
9678 fi
9679
9680 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9681 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9682     cat >> confdefs.h <<\EOF
9683 #define HAVE_FILE_MACRO 1
9684 EOF
9685
9686 fi
9687
9688 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9689 echo "configure:9690: checking for __FUNCTION__ macro" >&5
9690 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9691   echo $ac_n "(cached) $ac_c" 1>&6
9692 else
9693   
9694 cat > conftest.$ac_ext <<EOF
9695 #line 9696 "configure"
9696 #include "confdefs.h"
9697 #include <stdio.h>
9698 int main() {
9699 printf("%s\n", __FUNCTION__);
9700 ; return 0; }
9701 EOF
9702 if { (eval echo configure:9703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9703   rm -rf conftest*
9704   samba_cv_HAVE_FUNCTION_MACRO=yes
9705 else
9706   echo "configure: failed program was:" >&5
9707   cat conftest.$ac_ext >&5
9708   rm -rf conftest*
9709   samba_cv_HAVE_FUNCTION_MACRO=no
9710 fi
9711 rm -f conftest*
9712 fi
9713
9714 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9715 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9716     cat >> confdefs.h <<\EOF
9717 #define HAVE_FUNCTION_MACRO 1
9718 EOF
9719
9720 fi
9721
9722 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9723 echo "configure:9724: checking if gettimeofday takes tz argument" >&5
9724 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9725   echo $ac_n "(cached) $ac_c" 1>&6
9726 else
9727   
9728 if test "$cross_compiling" = yes; then
9729   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9730 else
9731   cat > conftest.$ac_ext <<EOF
9732 #line 9733 "configure"
9733 #include "confdefs.h"
9734
9735 #include <sys/time.h>
9736 #include <unistd.h>
9737 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9738 EOF
9739 if { (eval echo configure:9740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9740 then
9741   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9742 else
9743   echo "configure: failed program was:" >&5
9744   cat conftest.$ac_ext >&5
9745   rm -fr conftest*
9746   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9747 fi
9748 rm -fr conftest*
9749 fi
9750
9751 fi
9752
9753 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9754 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9755     cat >> confdefs.h <<\EOF
9756 #define HAVE_GETTIMEOFDAY_TZ 1
9757 EOF
9758
9759 fi
9760
9761 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9762 echo "configure:9763: checking for __va_copy" >&5
9763 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9764   echo $ac_n "(cached) $ac_c" 1>&6
9765 else
9766   
9767 cat > conftest.$ac_ext <<EOF
9768 #line 9769 "configure"
9769 #include "confdefs.h"
9770 #include <stdarg.h>
9771 va_list ap1,ap2;
9772 int main() {
9773 __va_copy(ap1,ap2);
9774 ; return 0; }
9775 EOF
9776 if { (eval echo configure:9777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9777   rm -rf conftest*
9778   samba_cv_HAVE_VA_COPY=yes
9779 else
9780   echo "configure: failed program was:" >&5
9781   cat conftest.$ac_ext >&5
9782   rm -rf conftest*
9783   samba_cv_HAVE_VA_COPY=no
9784 fi
9785 rm -f conftest*
9786 fi
9787
9788 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9789 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9790     cat >> confdefs.h <<\EOF
9791 #define HAVE_VA_COPY 1
9792 EOF
9793
9794 fi
9795
9796 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9797 echo "configure:9798: checking for C99 vsnprintf" >&5
9798 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9799   echo $ac_n "(cached) $ac_c" 1>&6
9800 else
9801   
9802 if test "$cross_compiling" = yes; then
9803   samba_cv_HAVE_C99_VSNPRINTF=cross
9804 else
9805   cat > conftest.$ac_ext <<EOF
9806 #line 9807 "configure"
9807 #include "confdefs.h"
9808
9809 #include <sys/types.h>
9810 #include <stdarg.h>
9811 void foo(const char *format, ...) { 
9812        va_list ap;
9813        int len;
9814        char buf[5];
9815
9816        va_start(ap, format);
9817        len = vsnprintf(buf, 0, format, ap);
9818        va_end(ap);
9819        if (len != 5) exit(1);
9820
9821        va_start(ap, format);
9822        len = vsnprintf(0, 0, format, ap);
9823        va_end(ap);
9824        if (len != 5) exit(1);
9825
9826        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9827
9828        exit(0);
9829 }
9830 main() { foo("hello"); }
9831
9832 EOF
9833 if { (eval echo configure:9834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9834 then
9835   samba_cv_HAVE_C99_VSNPRINTF=yes
9836 else
9837   echo "configure: failed program was:" >&5
9838   cat conftest.$ac_ext >&5
9839   rm -fr conftest*
9840   samba_cv_HAVE_C99_VSNPRINTF=no
9841 fi
9842 rm -fr conftest*
9843 fi
9844
9845 fi
9846
9847 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9848 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9849     cat >> confdefs.h <<\EOF
9850 #define HAVE_C99_VSNPRINTF 1
9851 EOF
9852
9853 fi
9854
9855 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9856 echo "configure:9857: checking for broken readdir" >&5
9857 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9858   echo $ac_n "(cached) $ac_c" 1>&6
9859 else
9860   
9861 if test "$cross_compiling" = yes; then
9862   samba_cv_HAVE_BROKEN_READDIR=cross
9863 else
9864   cat > conftest.$ac_ext <<EOF
9865 #line 9866 "configure"
9866 #include "confdefs.h"
9867 #include <sys/types.h>
9868 #include <dirent.h>
9869 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9870 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9871 di->d_name[0] == 0) exit(0); exit(1);} 
9872 EOF
9873 if { (eval echo configure:9874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9874 then
9875   samba_cv_HAVE_BROKEN_READDIR=yes
9876 else
9877   echo "configure: failed program was:" >&5
9878   cat conftest.$ac_ext >&5
9879   rm -fr conftest*
9880   samba_cv_HAVE_BROKEN_READDIR=no
9881 fi
9882 rm -fr conftest*
9883 fi
9884
9885 fi
9886
9887 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9888 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9889     cat >> confdefs.h <<\EOF
9890 #define HAVE_BROKEN_READDIR 1
9891 EOF
9892
9893 fi
9894
9895 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9896 echo "configure:9897: checking for utimbuf" >&5
9897 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9898   echo $ac_n "(cached) $ac_c" 1>&6
9899 else
9900   
9901 cat > conftest.$ac_ext <<EOF
9902 #line 9903 "configure"
9903 #include "confdefs.h"
9904 #include <sys/types.h>
9905 #include <utime.h>
9906 int main() {
9907 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9908 ; return 0; }
9909 EOF
9910 if { (eval echo configure:9911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9911   rm -rf conftest*
9912   samba_cv_HAVE_UTIMBUF=yes
9913 else
9914   echo "configure: failed program was:" >&5
9915   cat conftest.$ac_ext >&5
9916   rm -rf conftest*
9917   samba_cv_HAVE_UTIMBUF=no
9918 fi
9919 rm -f conftest*
9920 fi
9921
9922 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9923 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9924     cat >> confdefs.h <<\EOF
9925 #define HAVE_UTIMBUF 1
9926 EOF
9927
9928 fi
9929
9930
9931 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9932 do
9933 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9934 echo "configure:9935: checking for $ac_func" >&5
9935 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9936   echo $ac_n "(cached) $ac_c" 1>&6
9937 else
9938   cat > conftest.$ac_ext <<EOF
9939 #line 9940 "configure"
9940 #include "confdefs.h"
9941 /* System header to define __stub macros and hopefully few prototypes,
9942     which can conflict with char $ac_func(); below.  */
9943 #include <assert.h>
9944 /* Override any gcc2 internal prototype to avoid an error.  */
9945 /* We use char because int might match the return type of a gcc2
9946     builtin and then its argument prototype would still apply.  */
9947 char $ac_func();
9948
9949 int main() {
9950
9951 /* The GNU C library defines this for functions which it implements
9952     to always fail with ENOSYS.  Some functions are actually named
9953     something starting with __ and the normal name is an alias.  */
9954 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9955 choke me
9956 #else
9957 $ac_func();
9958 #endif
9959
9960 ; return 0; }
9961 EOF
9962 if { (eval echo configure:9963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9963   rm -rf conftest*
9964   eval "ac_cv_func_$ac_func=yes"
9965 else
9966   echo "configure: failed program was:" >&5
9967   cat conftest.$ac_ext >&5
9968   rm -rf conftest*
9969   eval "ac_cv_func_$ac_func=no"
9970 fi
9971 rm -f conftest*
9972 fi
9973
9974 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9975   echo "$ac_t""yes" 1>&6
9976     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9977   cat >> confdefs.h <<EOF
9978 #define $ac_tr_func 1
9979 EOF
9980  
9981 else
9982   echo "$ac_t""no" 1>&6
9983 fi
9984 done
9985
9986
9987 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9988 echo "configure:9989: checking for ut_name in utmp" >&5
9989 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9990   echo $ac_n "(cached) $ac_c" 1>&6
9991 else
9992   
9993 cat > conftest.$ac_ext <<EOF
9994 #line 9995 "configure"
9995 #include "confdefs.h"
9996 #include <sys/types.h>
9997 #include <utmp.h>
9998 int main() {
9999 struct utmp ut;  ut.ut_name[0] = 'a';
10000 ; return 0; }
10001 EOF
10002 if { (eval echo configure:10003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10003   rm -rf conftest*
10004   samba_cv_HAVE_UT_UT_NAME=yes
10005 else
10006   echo "configure: failed program was:" >&5
10007   cat conftest.$ac_ext >&5
10008   rm -rf conftest*
10009   samba_cv_HAVE_UT_UT_NAME=no
10010 fi
10011 rm -f conftest*
10012 fi
10013
10014 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
10015 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
10016     cat >> confdefs.h <<\EOF
10017 #define HAVE_UT_UT_NAME 1
10018 EOF
10019
10020 fi 
10021
10022 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
10023 echo "configure:10024: checking for ut_user in utmp" >&5
10024 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
10025   echo $ac_n "(cached) $ac_c" 1>&6
10026 else
10027   
10028 cat > conftest.$ac_ext <<EOF
10029 #line 10030 "configure"
10030 #include "confdefs.h"
10031 #include <sys/types.h>
10032 #include <utmp.h>
10033 int main() {
10034 struct utmp ut;  ut.ut_user[0] = 'a';
10035 ; return 0; }
10036 EOF
10037 if { (eval echo configure:10038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10038   rm -rf conftest*
10039   samba_cv_HAVE_UT_UT_USER=yes
10040 else
10041   echo "configure: failed program was:" >&5
10042   cat conftest.$ac_ext >&5
10043   rm -rf conftest*
10044   samba_cv_HAVE_UT_UT_USER=no
10045 fi
10046 rm -f conftest*
10047 fi
10048
10049 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
10050 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
10051     cat >> confdefs.h <<\EOF
10052 #define HAVE_UT_UT_USER 1
10053 EOF
10054
10055 fi 
10056
10057 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10058 echo "configure:10059: checking for ut_id in utmp" >&5
10059 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10060   echo $ac_n "(cached) $ac_c" 1>&6
10061 else
10062   
10063 cat > conftest.$ac_ext <<EOF
10064 #line 10065 "configure"
10065 #include "confdefs.h"
10066 #include <sys/types.h>
10067 #include <utmp.h>
10068 int main() {
10069 struct utmp ut;  ut.ut_id[0] = 'a';
10070 ; return 0; }
10071 EOF
10072 if { (eval echo configure:10073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10073   rm -rf conftest*
10074   samba_cv_HAVE_UT_UT_ID=yes
10075 else
10076   echo "configure: failed program was:" >&5
10077   cat conftest.$ac_ext >&5
10078   rm -rf conftest*
10079   samba_cv_HAVE_UT_UT_ID=no
10080 fi
10081 rm -f conftest*
10082 fi
10083
10084 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10085 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10086     cat >> confdefs.h <<\EOF
10087 #define HAVE_UT_UT_ID 1
10088 EOF
10089
10090 fi 
10091
10092 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10093 echo "configure:10094: checking for ut_host in utmp" >&5
10094 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10095   echo $ac_n "(cached) $ac_c" 1>&6
10096 else
10097   
10098 cat > conftest.$ac_ext <<EOF
10099 #line 10100 "configure"
10100 #include "confdefs.h"
10101 #include <sys/types.h>
10102 #include <utmp.h>
10103 int main() {
10104 struct utmp ut;  ut.ut_host[0] = 'a';
10105 ; return 0; }
10106 EOF
10107 if { (eval echo configure:10108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10108   rm -rf conftest*
10109   samba_cv_HAVE_UT_UT_HOST=yes
10110 else
10111   echo "configure: failed program was:" >&5
10112   cat conftest.$ac_ext >&5
10113   rm -rf conftest*
10114   samba_cv_HAVE_UT_UT_HOST=no
10115 fi
10116 rm -f conftest*
10117 fi
10118
10119 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10120 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10121     cat >> confdefs.h <<\EOF
10122 #define HAVE_UT_UT_HOST 1
10123 EOF
10124
10125 fi 
10126
10127 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10128 echo "configure:10129: checking for ut_time in utmp" >&5
10129 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10130   echo $ac_n "(cached) $ac_c" 1>&6
10131 else
10132   
10133 cat > conftest.$ac_ext <<EOF
10134 #line 10135 "configure"
10135 #include "confdefs.h"
10136 #include <sys/types.h>
10137 #include <utmp.h>
10138 int main() {
10139 struct utmp ut;  time_t t; ut.ut_time = t;
10140 ; return 0; }
10141 EOF
10142 if { (eval echo configure:10143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10143   rm -rf conftest*
10144   samba_cv_HAVE_UT_UT_TIME=yes
10145 else
10146   echo "configure: failed program was:" >&5
10147   cat conftest.$ac_ext >&5
10148   rm -rf conftest*
10149   samba_cv_HAVE_UT_UT_TIME=no
10150 fi
10151 rm -f conftest*
10152 fi
10153
10154 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10155 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10156     cat >> confdefs.h <<\EOF
10157 #define HAVE_UT_UT_TIME 1
10158 EOF
10159
10160 fi 
10161
10162 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10163 echo "configure:10164: checking for ut_tv in utmp" >&5
10164 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10165   echo $ac_n "(cached) $ac_c" 1>&6
10166 else
10167   
10168 cat > conftest.$ac_ext <<EOF
10169 #line 10170 "configure"
10170 #include "confdefs.h"
10171 #include <sys/types.h>
10172 #include <utmp.h>
10173 int main() {
10174 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10175 ; return 0; }
10176 EOF
10177 if { (eval echo configure:10178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10178   rm -rf conftest*
10179   samba_cv_HAVE_UT_UT_TV=yes
10180 else
10181   echo "configure: failed program was:" >&5
10182   cat conftest.$ac_ext >&5
10183   rm -rf conftest*
10184   samba_cv_HAVE_UT_UT_TV=no
10185 fi
10186 rm -f conftest*
10187 fi
10188
10189 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10190 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10191     cat >> confdefs.h <<\EOF
10192 #define HAVE_UT_UT_TV 1
10193 EOF
10194
10195 fi 
10196
10197 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10198 echo "configure:10199: checking for ut_type in utmp" >&5
10199 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10200   echo $ac_n "(cached) $ac_c" 1>&6
10201 else
10202   
10203 cat > conftest.$ac_ext <<EOF
10204 #line 10205 "configure"
10205 #include "confdefs.h"
10206 #include <sys/types.h>
10207 #include <utmp.h>
10208 int main() {
10209 struct utmp ut;  ut.ut_type = 0;
10210 ; return 0; }
10211 EOF
10212 if { (eval echo configure:10213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10213   rm -rf conftest*
10214   samba_cv_HAVE_UT_UT_TYPE=yes
10215 else
10216   echo "configure: failed program was:" >&5
10217   cat conftest.$ac_ext >&5
10218   rm -rf conftest*
10219   samba_cv_HAVE_UT_UT_TYPE=no
10220 fi
10221 rm -f conftest*
10222 fi
10223
10224 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10225 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10226     cat >> confdefs.h <<\EOF
10227 #define HAVE_UT_UT_TYPE 1
10228 EOF
10229
10230 fi 
10231
10232 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10233 echo "configure:10234: checking for ut_pid in utmp" >&5
10234 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10235   echo $ac_n "(cached) $ac_c" 1>&6
10236 else
10237   
10238 cat > conftest.$ac_ext <<EOF
10239 #line 10240 "configure"
10240 #include "confdefs.h"
10241 #include <sys/types.h>
10242 #include <utmp.h>
10243 int main() {
10244 struct utmp ut;  ut.ut_pid = 0;
10245 ; return 0; }
10246 EOF
10247 if { (eval echo configure:10248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10248   rm -rf conftest*
10249   samba_cv_HAVE_UT_UT_PID=yes
10250 else
10251   echo "configure: failed program was:" >&5
10252   cat conftest.$ac_ext >&5
10253   rm -rf conftest*
10254   samba_cv_HAVE_UT_UT_PID=no
10255 fi
10256 rm -f conftest*
10257 fi
10258
10259 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10260 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10261     cat >> confdefs.h <<\EOF
10262 #define HAVE_UT_UT_PID 1
10263 EOF
10264
10265 fi 
10266
10267 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10268 echo "configure:10269: checking for ut_exit in utmp" >&5
10269 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10270   echo $ac_n "(cached) $ac_c" 1>&6
10271 else
10272   
10273 cat > conftest.$ac_ext <<EOF
10274 #line 10275 "configure"
10275 #include "confdefs.h"
10276 #include <sys/types.h>
10277 #include <utmp.h>
10278 int main() {
10279 struct utmp ut;  ut.ut_exit.e_exit = 0;
10280 ; return 0; }
10281 EOF
10282 if { (eval echo configure:10283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10283   rm -rf conftest*
10284   samba_cv_HAVE_UT_UT_EXIT=yes
10285 else
10286   echo "configure: failed program was:" >&5
10287   cat conftest.$ac_ext >&5
10288   rm -rf conftest*
10289   samba_cv_HAVE_UT_UT_EXIT=no
10290 fi
10291 rm -f conftest*
10292 fi
10293
10294 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10295 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10296     cat >> confdefs.h <<\EOF
10297 #define HAVE_UT_UT_EXIT 1
10298 EOF
10299
10300 fi 
10301
10302 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10303 echo "configure:10304: checking for ut_addr in utmp" >&5
10304 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10305   echo $ac_n "(cached) $ac_c" 1>&6
10306 else
10307   
10308 cat > conftest.$ac_ext <<EOF
10309 #line 10310 "configure"
10310 #include "confdefs.h"
10311 #include <sys/types.h>
10312 #include <utmp.h>
10313 int main() {
10314 struct utmp ut;  ut.ut_addr = 0;
10315 ; return 0; }
10316 EOF
10317 if { (eval echo configure:10318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10318   rm -rf conftest*
10319   samba_cv_HAVE_UT_UT_ADDR=yes
10320 else
10321   echo "configure: failed program was:" >&5
10322   cat conftest.$ac_ext >&5
10323   rm -rf conftest*
10324   samba_cv_HAVE_UT_UT_ADDR=no
10325 fi
10326 rm -f conftest*
10327 fi
10328
10329 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10330 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10331     cat >> confdefs.h <<\EOF
10332 #define HAVE_UT_UT_ADDR 1
10333 EOF
10334
10335 fi 
10336
10337 if test x$ac_cv_func_pututline = xyes ; then
10338   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10339 echo "configure:10340: checking whether pututline returns pointer" >&5
10340 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10341   echo $ac_n "(cached) $ac_c" 1>&6
10342 else
10343   
10344   cat > conftest.$ac_ext <<EOF
10345 #line 10346 "configure"
10346 #include "confdefs.h"
10347 #include <sys/types.h>
10348 #include <utmp.h>
10349 int main() {
10350 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10351 ; return 0; }
10352 EOF
10353 if { (eval echo configure:10354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10354   rm -rf conftest*
10355   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10356 else
10357   echo "configure: failed program was:" >&5
10358   cat conftest.$ac_ext >&5
10359   rm -rf conftest*
10360   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10361 fi
10362 rm -f conftest*
10363 fi
10364
10365 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10366   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10367       cat >> confdefs.h <<\EOF
10368 #define PUTUTLINE_RETURNS_UTMP 1
10369 EOF
10370
10371   fi
10372 fi
10373
10374 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10375 echo "configure:10376: checking for ut_syslen in utmpx" >&5
10376 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10377   echo $ac_n "(cached) $ac_c" 1>&6
10378 else
10379   
10380 cat > conftest.$ac_ext <<EOF
10381 #line 10382 "configure"
10382 #include "confdefs.h"
10383 #include <sys/types.h>
10384 #include <utmpx.h>
10385 int main() {
10386 struct utmpx ux;  ux.ut_syslen = 0;
10387 ; return 0; }
10388 EOF
10389 if { (eval echo configure:10390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10390   rm -rf conftest*
10391   samba_cv_HAVE_UX_UT_SYSLEN=yes
10392 else
10393   echo "configure: failed program was:" >&5
10394   cat conftest.$ac_ext >&5
10395   rm -rf conftest*
10396   samba_cv_HAVE_UX_UT_SYSLEN=no
10397 fi
10398 rm -f conftest*
10399 fi
10400
10401 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10402 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10403     cat >> confdefs.h <<\EOF
10404 #define HAVE_UX_UT_SYSLEN 1
10405 EOF
10406
10407 fi 
10408
10409
10410 #################################################
10411 # check for libiconv support
10412 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10413 echo "configure:10414: checking whether to use libiconv" >&5
10414 # Check whether --with-libiconv or --without-libiconv was given.
10415 if test "${with_libiconv+set}" = set; then
10416   withval="$with_libiconv"
10417    case "$withval" in
10418   no)
10419     echo "$ac_t""no" 1>&6
10420     ;;
10421   *)
10422     echo "$ac_t""yes" 1>&6
10423     CFLAGS="$CFLAGS -I$withval/include"
10424     LDFLAGS="$LDFLAGS -L$withval/lib"
10425     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10426 echo "configure:10427: checking for iconv_open in -liconv" >&5
10427 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10428 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10429   echo $ac_n "(cached) $ac_c" 1>&6
10430 else
10431   ac_save_LIBS="$LIBS"
10432 LIBS="-liconv  $LIBS"
10433 cat > conftest.$ac_ext <<EOF
10434 #line 10435 "configure"
10435 #include "confdefs.h"
10436 /* Override any gcc2 internal prototype to avoid an error.  */
10437 /* We use char because int might match the return type of a gcc2
10438     builtin and then its argument prototype would still apply.  */
10439 char iconv_open();
10440
10441 int main() {
10442 iconv_open()
10443 ; return 0; }
10444 EOF
10445 if { (eval echo configure:10446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10446   rm -rf conftest*
10447   eval "ac_cv_lib_$ac_lib_var=yes"
10448 else
10449   echo "configure: failed program was:" >&5
10450   cat conftest.$ac_ext >&5
10451   rm -rf conftest*
10452   eval "ac_cv_lib_$ac_lib_var=no"
10453 fi
10454 rm -f conftest*
10455 LIBS="$ac_save_LIBS"
10456
10457 fi
10458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10459   echo "$ac_t""yes" 1>&6
10460     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10461     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10462   cat >> confdefs.h <<EOF
10463 #define $ac_tr_lib 1
10464 EOF
10465
10466   LIBS="-liconv $LIBS"
10467
10468 else
10469   echo "$ac_t""no" 1>&6
10470 fi
10471
10472     cat >> confdefs.h <<EOF
10473 #define WITH_LIBICONV "${withval}"
10474 EOF
10475
10476     ;;
10477   esac 
10478 else
10479   echo "$ac_t""no" 1>&6
10480
10481 fi
10482
10483
10484
10485 ############
10486 # check for iconv in libc
10487 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10488 echo "configure:10489: checking for working iconv" >&5
10489 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10490   echo $ac_n "(cached) $ac_c" 1>&6
10491 else
10492   
10493 if test "$cross_compiling" = yes; then
10494   samba_cv_HAVE_NATIVE_ICONV=cross
10495 else
10496   cat > conftest.$ac_ext <<EOF
10497 #line 10498 "configure"
10498 #include "confdefs.h"
10499
10500 #include <iconv.h>
10501 main() {
10502        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10503        if (cd == 0 || cd == (iconv_t)-1) return -1;
10504        return 0;
10505 }
10506
10507 EOF
10508 if { (eval echo configure:10509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10509 then
10510   samba_cv_HAVE_NATIVE_ICONV=yes
10511 else
10512   echo "configure: failed program was:" >&5
10513   cat conftest.$ac_ext >&5
10514   rm -fr conftest*
10515   samba_cv_HAVE_NATIVE_ICONV=no
10516 fi
10517 rm -fr conftest*
10518 fi
10519
10520 fi
10521
10522 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10523 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10524     cat >> confdefs.h <<\EOF
10525 #define HAVE_NATIVE_ICONV 1
10526 EOF
10527
10528 fi
10529
10530
10531 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10532 echo "configure:10533: checking for Linux kernel oplocks" >&5
10533 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10534   echo $ac_n "(cached) $ac_c" 1>&6
10535 else
10536   
10537 if test "$cross_compiling" = yes; then
10538   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10539 else
10540   cat > conftest.$ac_ext <<EOF
10541 #line 10542 "configure"
10542 #include "confdefs.h"
10543
10544 #include <sys/types.h>
10545 #include <fcntl.h>
10546 #ifndef F_GETLEASE
10547 #define F_GETLEASE      1025
10548 #endif
10549 main() {
10550        int fd = open("/dev/null", O_RDONLY);
10551        return fcntl(fd, F_GETLEASE, 0) == -1;
10552 }
10553
10554 EOF
10555 if { (eval echo configure:10556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10556 then
10557   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10558 else
10559   echo "configure: failed program was:" >&5
10560   cat conftest.$ac_ext >&5
10561   rm -fr conftest*
10562   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10563 fi
10564 rm -fr conftest*
10565 fi
10566
10567 fi
10568
10569 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10570 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10571     cat >> confdefs.h <<\EOF
10572 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10573 EOF
10574
10575 fi
10576
10577 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10578 echo "configure:10579: checking for kernel change notify support" >&5
10579 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10580   echo $ac_n "(cached) $ac_c" 1>&6
10581 else
10582   
10583 if test "$cross_compiling" = yes; then
10584   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10585 else
10586   cat > conftest.$ac_ext <<EOF
10587 #line 10588 "configure"
10588 #include "confdefs.h"
10589
10590 #include <sys/types.h>
10591 #include <fcntl.h>
10592 #include <signal.h>
10593 #ifndef F_NOTIFY
10594 #define F_NOTIFY 1026
10595 #endif
10596 main() {
10597         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10598 }
10599
10600 EOF
10601 if { (eval echo configure:10602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10602 then
10603   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10604 else
10605   echo "configure: failed program was:" >&5
10606   cat conftest.$ac_ext >&5
10607   rm -fr conftest*
10608   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10609 fi
10610 rm -fr conftest*
10611 fi
10612
10613 fi
10614
10615 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10616 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10617     cat >> confdefs.h <<\EOF
10618 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10619 EOF
10620
10621 fi
10622
10623 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10624 echo "configure:10625: checking for kernel share modes" >&5
10625 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10626   echo $ac_n "(cached) $ac_c" 1>&6
10627 else
10628   
10629 if test "$cross_compiling" = yes; then
10630   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10631 else
10632   cat > conftest.$ac_ext <<EOF
10633 #line 10634 "configure"
10634 #include "confdefs.h"
10635
10636 #include <sys/types.h>
10637 #include <fcntl.h>
10638 #include <signal.h>
10639 #include <sys/file.h>
10640 #ifndef LOCK_MAND
10641 #define LOCK_MAND       32
10642 #define LOCK_READ       64
10643 #endif
10644 main() {
10645         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10646 }
10647
10648 EOF
10649 if { (eval echo configure:10650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10650 then
10651   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10652 else
10653   echo "configure: failed program was:" >&5
10654   cat conftest.$ac_ext >&5
10655   rm -fr conftest*
10656   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10657 fi
10658 rm -fr conftest*
10659 fi
10660
10661 fi
10662
10663 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10664 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10665     cat >> confdefs.h <<\EOF
10666 #define HAVE_KERNEL_SHARE_MODES 1
10667 EOF
10668
10669 fi
10670
10671
10672
10673
10674 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10675 echo "configure:10676: checking for IRIX kernel oplock type definitions" >&5
10676 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10677   echo $ac_n "(cached) $ac_c" 1>&6
10678 else
10679   
10680 cat > conftest.$ac_ext <<EOF
10681 #line 10682 "configure"
10682 #include "confdefs.h"
10683 #include <sys/types.h>
10684 #include <fcntl.h>
10685 int main() {
10686 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10687 ; return 0; }
10688 EOF
10689 if { (eval echo configure:10690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10690   rm -rf conftest*
10691   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10692 else
10693   echo "configure: failed program was:" >&5
10694   cat conftest.$ac_ext >&5
10695   rm -rf conftest*
10696   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10697 fi
10698 rm -f conftest*
10699 fi
10700
10701 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10702 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10703     cat >> confdefs.h <<\EOF
10704 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10705 EOF
10706
10707 fi
10708
10709 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10710 echo "configure:10711: checking for irix specific capabilities" >&5
10711 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10712   echo $ac_n "(cached) $ac_c" 1>&6
10713 else
10714   
10715 if test "$cross_compiling" = yes; then
10716   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10717 else
10718   cat > conftest.$ac_ext <<EOF
10719 #line 10720 "configure"
10720 #include "confdefs.h"
10721 #include <sys/types.h>
10722 #include <sys/capability.h>
10723 main() {
10724  cap_t cap;
10725  if ((cap = cap_get_proc()) == NULL)
10726    exit(1);
10727  cap->cap_effective |= CAP_NETWORK_MGT;
10728  cap->cap_inheritable |= CAP_NETWORK_MGT;
10729  cap_set_proc(cap);
10730  exit(0);
10731 }
10732
10733 EOF
10734 if { (eval echo configure:10735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10735 then
10736   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10737 else
10738   echo "configure: failed program was:" >&5
10739   cat conftest.$ac_ext >&5
10740   rm -fr conftest*
10741   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10742 fi
10743 rm -fr conftest*
10744 fi
10745
10746 fi
10747
10748 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10749 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10750     cat >> confdefs.h <<\EOF
10751 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10752 EOF
10753
10754 fi
10755
10756 #
10757 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10758 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10759 #
10760
10761 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10762 echo "configure:10763: checking for int16 typedef included by rpc/rpc.h" >&5
10763 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10764   echo $ac_n "(cached) $ac_c" 1>&6
10765 else
10766   
10767 cat > conftest.$ac_ext <<EOF
10768 #line 10769 "configure"
10769 #include "confdefs.h"
10770 #include <sys/types.h>
10771 #if defined(HAVE_RPC_RPC_H)
10772 #include <rpc/rpc.h>
10773 #endif
10774 int main() {
10775 int16 testvar;
10776 ; return 0; }
10777 EOF
10778 if { (eval echo configure:10779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10779   rm -rf conftest*
10780   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10781 else
10782   echo "configure: failed program was:" >&5
10783   cat conftest.$ac_ext >&5
10784   rm -rf conftest*
10785   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10786 fi
10787 rm -f conftest*
10788 fi
10789
10790 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10791 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10792     cat >> confdefs.h <<\EOF
10793 #define HAVE_INT16_FROM_RPC_RPC_H 1
10794 EOF
10795
10796 fi
10797
10798 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10799 echo "configure:10800: checking for uint16 typedef included by rpc/rpc.h" >&5
10800 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10801   echo $ac_n "(cached) $ac_c" 1>&6
10802 else
10803   
10804 cat > conftest.$ac_ext <<EOF
10805 #line 10806 "configure"
10806 #include "confdefs.h"
10807 #include <sys/types.h>
10808 #if defined(HAVE_RPC_RPC_H)
10809 #include <rpc/rpc.h>
10810 #endif
10811 int main() {
10812 uint16 testvar;
10813 ; return 0; }
10814 EOF
10815 if { (eval echo configure:10816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10816   rm -rf conftest*
10817   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10818 else
10819   echo "configure: failed program was:" >&5
10820   cat conftest.$ac_ext >&5
10821   rm -rf conftest*
10822   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10823 fi
10824 rm -f conftest*
10825 fi
10826
10827 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10828 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10829     cat >> confdefs.h <<\EOF
10830 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10831 EOF
10832
10833 fi
10834
10835 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10836 echo "configure:10837: checking for int32 typedef included by rpc/rpc.h" >&5
10837 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10838   echo $ac_n "(cached) $ac_c" 1>&6
10839 else
10840   
10841 cat > conftest.$ac_ext <<EOF
10842 #line 10843 "configure"
10843 #include "confdefs.h"
10844 #include <sys/types.h>
10845 #if defined(HAVE_RPC_RPC_H)
10846 #include <rpc/rpc.h>
10847 #endif
10848 int main() {
10849 int32 testvar;
10850 ; return 0; }
10851 EOF
10852 if { (eval echo configure:10853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10853   rm -rf conftest*
10854   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10855 else
10856   echo "configure: failed program was:" >&5
10857   cat conftest.$ac_ext >&5
10858   rm -rf conftest*
10859   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10860 fi
10861 rm -f conftest*
10862 fi
10863
10864 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10865 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10866     cat >> confdefs.h <<\EOF
10867 #define HAVE_INT32_FROM_RPC_RPC_H 1
10868 EOF
10869
10870 fi
10871
10872 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10873 echo "configure:10874: checking for uint32 typedef included by rpc/rpc.h" >&5
10874 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10875   echo $ac_n "(cached) $ac_c" 1>&6
10876 else
10877   
10878 cat > conftest.$ac_ext <<EOF
10879 #line 10880 "configure"
10880 #include "confdefs.h"
10881 #include <sys/types.h>
10882 #if defined(HAVE_RPC_RPC_H)
10883 #include <rpc/rpc.h>
10884 #endif
10885 int main() {
10886 uint32 testvar;
10887 ; return 0; }
10888 EOF
10889 if { (eval echo configure:10890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10890   rm -rf conftest*
10891   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10892 else
10893   echo "configure: failed program was:" >&5
10894   cat conftest.$ac_ext >&5
10895   rm -rf conftest*
10896   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10897 fi
10898 rm -f conftest*
10899 fi
10900
10901 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10902 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10903     cat >> confdefs.h <<\EOF
10904 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10905 EOF
10906
10907 fi
10908
10909
10910 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10911 echo "configure:10912: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10912 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10913   echo $ac_n "(cached) $ac_c" 1>&6
10914 else
10915   
10916 cat > conftest.$ac_ext <<EOF
10917 #line 10918 "configure"
10918 #include "confdefs.h"
10919 #include <sys/types.h>
10920 #ifdef HAVE_SYS_SECURITY_H
10921 #include <sys/security.h>
10922 #include <prot.h>
10923 #endif  /* HAVE_SYS_SECURITY_H */
10924 #if defined(HAVE_RPC_RPC_H)
10925 #include <rpc/rpc.h>
10926 #endif
10927 int main() {
10928 int testvar;
10929 ; return 0; }
10930 EOF
10931 if { (eval echo configure:10932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10932   rm -rf conftest*
10933   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10934 else
10935   echo "configure: failed program was:" >&5
10936   cat conftest.$ac_ext >&5
10937   rm -rf conftest*
10938   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10939 fi
10940 rm -f conftest*
10941 fi
10942
10943 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10944 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10945     cat >> confdefs.h <<\EOF
10946 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10947 EOF
10948
10949 fi
10950
10951 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10952 echo "configure:10953: checking for test routines" >&5
10953 if test "$cross_compiling" = yes; then
10954   echo "configure: warning: cannot run when cross-compiling" 1>&2
10955 else
10956   cat > conftest.$ac_ext <<EOF
10957 #line 10958 "configure"
10958 #include "confdefs.h"
10959 #include "${srcdir-.}/tests/trivial.c"
10960 EOF
10961 if { (eval echo configure:10962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10962 then
10963   echo "$ac_t""yes" 1>&6
10964 else
10965   echo "configure: failed program was:" >&5
10966   cat conftest.$ac_ext >&5
10967   rm -fr conftest*
10968   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10969 fi
10970 rm -fr conftest*
10971 fi
10972
10973
10974 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10975 echo "configure:10976: checking for ftruncate extend" >&5
10976 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10977   echo $ac_n "(cached) $ac_c" 1>&6
10978 else
10979   
10980 if test "$cross_compiling" = yes; then
10981   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10982 else
10983   cat > conftest.$ac_ext <<EOF
10984 #line 10985 "configure"
10985 #include "confdefs.h"
10986 #include "${srcdir-.}/tests/ftruncate.c"
10987 EOF
10988 if { (eval echo configure:10989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10989 then
10990   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10991 else
10992   echo "configure: failed program was:" >&5
10993   cat conftest.$ac_ext >&5
10994   rm -fr conftest*
10995   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10996 fi
10997 rm -fr conftest*
10998 fi
10999
11000 fi
11001
11002 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
11003 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
11004     cat >> confdefs.h <<\EOF
11005 #define HAVE_FTRUNCATE_EXTEND 1
11006 EOF
11007
11008 fi
11009
11010 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
11011 echo "configure:11012: checking for AF_LOCAL socket support" >&5
11012 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
11013   echo $ac_n "(cached) $ac_c" 1>&6
11014 else
11015   
11016 if test "$cross_compiling" = yes; then
11017   samba_cv_HAVE_WORKING_AF_LOCAL=cross
11018 else
11019   cat > conftest.$ac_ext <<EOF
11020 #line 11021 "configure"
11021 #include "confdefs.h"
11022 #include "${srcdir-.}/tests/unixsock.c"
11023 EOF
11024 if { (eval echo configure:11025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11025 then
11026   samba_cv_HAVE_WORKING_AF_LOCAL=yes
11027 else
11028   echo "configure: failed program was:" >&5
11029   cat conftest.$ac_ext >&5
11030   rm -fr conftest*
11031   samba_cv_HAVE_WORKING_AF_LOCAL=no
11032 fi
11033 rm -fr conftest*
11034 fi
11035
11036 fi
11037
11038 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
11039 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
11040 then
11041     cat >> confdefs.h <<\EOF
11042 #define HAVE_WORKING_AF_LOCAL 1
11043 EOF
11044
11045 fi
11046
11047 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
11048 echo "configure:11049: checking for broken getgroups" >&5
11049 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
11050   echo $ac_n "(cached) $ac_c" 1>&6
11051 else
11052   
11053 if test "$cross_compiling" = yes; then
11054   samba_cv_HAVE_BROKEN_GETGROUPS=cross
11055 else
11056   cat > conftest.$ac_ext <<EOF
11057 #line 11058 "configure"
11058 #include "confdefs.h"
11059 #include "${srcdir-.}/tests/getgroups.c"
11060 EOF
11061 if { (eval echo configure:11062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11062 then
11063   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11064 else
11065   echo "configure: failed program was:" >&5
11066   cat conftest.$ac_ext >&5
11067   rm -fr conftest*
11068   samba_cv_HAVE_BROKEN_GETGROUPS=no
11069 fi
11070 rm -fr conftest*
11071 fi
11072
11073 fi
11074
11075 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11076 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11077     cat >> confdefs.h <<\EOF
11078 #define HAVE_BROKEN_GETGROUPS 1
11079 EOF
11080
11081 fi
11082
11083 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11084 echo "configure:11085: checking whether getpass should be replaced" >&5
11085 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11086   echo $ac_n "(cached) $ac_c" 1>&6
11087 else
11088   
11089 SAVE_CPPFLAGS="$CPPFLAGS"
11090 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt  -I${srcdir-.}/smbwrapper"
11091 cat > conftest.$ac_ext <<EOF
11092 #line 11093 "configure"
11093 #include "confdefs.h"
11094
11095 #define REPLACE_GETPASS 1
11096 #define NO_CONFIG_H 1
11097 #define main dont_declare_main
11098 #include "${srcdir-.}/lib/getsmbpass.c"
11099 #undef main
11100
11101 int main() {
11102
11103 ; return 0; }
11104 EOF
11105 if { (eval echo configure:11106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11106   rm -rf conftest*
11107   samba_cv_REPLACE_GETPASS=yes
11108 else
11109   echo "configure: failed program was:" >&5
11110   cat conftest.$ac_ext >&5
11111   rm -rf conftest*
11112   samba_cv_REPLACE_GETPASS=no
11113 fi
11114 rm -f conftest*
11115 CPPFLAGS="$SAVE_CPPFLAGS"
11116
11117 fi
11118
11119 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11120 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11121         cat >> confdefs.h <<\EOF
11122 #define REPLACE_GETPASS 1
11123 EOF
11124
11125 fi
11126
11127 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11128 echo "configure:11129: checking for broken inet_ntoa" >&5
11129 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11130   echo $ac_n "(cached) $ac_c" 1>&6
11131 else
11132   
11133 if test "$cross_compiling" = yes; then
11134   samba_cv_REPLACE_INET_NTOA=cross
11135 else
11136   cat > conftest.$ac_ext <<EOF
11137 #line 11138 "configure"
11138 #include "confdefs.h"
11139
11140 #include <stdio.h>
11141 #include <sys/types.h>
11142 #include <netinet/in.h>
11143 #ifdef HAVE_ARPA_INET_H
11144 #include <arpa/inet.h>
11145 #endif
11146 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11147 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11148     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11149 exit(1);}
11150 EOF
11151 if { (eval echo configure:11152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11152 then
11153   samba_cv_REPLACE_INET_NTOA=yes
11154 else
11155   echo "configure: failed program was:" >&5
11156   cat conftest.$ac_ext >&5
11157   rm -fr conftest*
11158   samba_cv_REPLACE_INET_NTOA=no
11159 fi
11160 rm -fr conftest*
11161 fi
11162
11163 fi
11164
11165 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11166 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11167     cat >> confdefs.h <<\EOF
11168 #define REPLACE_INET_NTOA 1
11169 EOF
11170
11171 fi
11172
11173 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11174 echo "configure:11175: checking for secure mkstemp" >&5
11175 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11176   echo $ac_n "(cached) $ac_c" 1>&6
11177 else
11178   
11179 if test "$cross_compiling" = yes; then
11180   samba_cv_HAVE_SECURE_MKSTEMP=cross
11181 else
11182   cat > conftest.$ac_ext <<EOF
11183 #line 11184 "configure"
11184 #include "confdefs.h"
11185 #include <stdlib.h>
11186 #include <sys/types.h>
11187 #include <sys/stat.h>
11188 #include <unistd.h>
11189 main() { 
11190   struct stat st;
11191   char tpl[20]="/tmp/test.XXXXXX"; 
11192   int fd = mkstemp(tpl); 
11193   if (fd == -1) exit(1);
11194   unlink(tpl);
11195   if (fstat(fd, &st) != 0) exit(1);
11196   if ((st.st_mode & 0777) != 0600) exit(1);
11197   exit(0);
11198 }
11199 EOF
11200 if { (eval echo configure:11201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11201 then
11202   samba_cv_HAVE_SECURE_MKSTEMP=yes
11203 else
11204   echo "configure: failed program was:" >&5
11205   cat conftest.$ac_ext >&5
11206   rm -fr conftest*
11207   samba_cv_HAVE_SECURE_MKSTEMP=no
11208 fi
11209 rm -fr conftest*
11210 fi
11211
11212 fi
11213
11214 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11215 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11216     cat >> confdefs.h <<\EOF
11217 #define HAVE_SECURE_MKSTEMP 1
11218 EOF
11219
11220 fi
11221
11222 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11223 echo "configure:11224: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11224 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11225   echo $ac_n "(cached) $ac_c" 1>&6
11226 else
11227   
11228 if test "$cross_compiling" = yes; then
11229   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11230 else
11231   cat > conftest.$ac_ext <<EOF
11232 #line 11233 "configure"
11233 #include "confdefs.h"
11234 #include <unistd.h>
11235 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11236 EOF
11237 if { (eval echo configure:11238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11238 then
11239   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11240 else
11241   echo "configure: failed program was:" >&5
11242   cat conftest.$ac_ext >&5
11243   rm -fr conftest*
11244   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11245 fi
11246 rm -fr conftest*
11247 fi
11248
11249 fi
11250
11251 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11252 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11253     cat >> confdefs.h <<\EOF
11254 #define SYSCONF_SC_NGROUPS_MAX 1
11255 EOF
11256
11257 fi
11258
11259 echo $ac_n "checking for root""... $ac_c" 1>&6
11260 echo "configure:11261: checking for root" >&5
11261 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11262   echo $ac_n "(cached) $ac_c" 1>&6
11263 else
11264   
11265 if test "$cross_compiling" = yes; then
11266   samba_cv_HAVE_ROOT=cross
11267 else
11268   cat > conftest.$ac_ext <<EOF
11269 #line 11270 "configure"
11270 #include "confdefs.h"
11271 main() { exit(getuid() != 0); }
11272 EOF
11273 if { (eval echo configure:11274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11274 then
11275   samba_cv_HAVE_ROOT=yes
11276 else
11277   echo "configure: failed program was:" >&5
11278   cat conftest.$ac_ext >&5
11279   rm -fr conftest*
11280   samba_cv_HAVE_ROOT=no
11281 fi
11282 rm -fr conftest*
11283 fi
11284
11285 fi
11286
11287 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11288 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11289     cat >> confdefs.h <<\EOF
11290 #define HAVE_ROOT 1
11291 EOF
11292
11293 else
11294     echo "configure: warning: running as non-root will disable some tests" 1>&2
11295 fi
11296
11297 ##################
11298 # look for a method of finding the list of network interfaces
11299 iface=no;
11300 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11301 echo "configure:11302: checking for iface AIX" >&5
11302 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11303   echo $ac_n "(cached) $ac_c" 1>&6
11304 else
11305   
11306 if test "$cross_compiling" = yes; then
11307   samba_cv_HAVE_IFACE_AIX=cross
11308 else
11309   cat > conftest.$ac_ext <<EOF
11310 #line 11311 "configure"
11311 #include "confdefs.h"
11312
11313 #define HAVE_IFACE_AIX 1
11314 #define AUTOCONF_TEST 1
11315 #include "confdefs.h"
11316 #include "${srcdir-.}/lib/interfaces.c"
11317 EOF
11318 if { (eval echo configure:11319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11319 then
11320   samba_cv_HAVE_IFACE_AIX=yes
11321 else
11322   echo "configure: failed program was:" >&5
11323   cat conftest.$ac_ext >&5
11324   rm -fr conftest*
11325   samba_cv_HAVE_IFACE_AIX=no
11326 fi
11327 rm -fr conftest*
11328 fi
11329
11330 fi
11331
11332 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11333 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11334     iface=yes;cat >> confdefs.h <<\EOF
11335 #define HAVE_IFACE_AIX 1
11336 EOF
11337
11338 fi
11339
11340 if test $iface = no; then
11341 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11342 echo "configure:11343: checking for iface ifconf" >&5
11343 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11344   echo $ac_n "(cached) $ac_c" 1>&6
11345 else
11346   
11347 if test "$cross_compiling" = yes; then
11348   samba_cv_HAVE_IFACE_IFCONF=cross
11349 else
11350   cat > conftest.$ac_ext <<EOF
11351 #line 11352 "configure"
11352 #include "confdefs.h"
11353
11354 #define HAVE_IFACE_IFCONF 1
11355 #define AUTOCONF_TEST 1
11356 #include "confdefs.h"
11357 #include "${srcdir-.}/lib/interfaces.c"
11358 EOF
11359 if { (eval echo configure:11360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11360 then
11361   samba_cv_HAVE_IFACE_IFCONF=yes
11362 else
11363   echo "configure: failed program was:" >&5
11364   cat conftest.$ac_ext >&5
11365   rm -fr conftest*
11366   samba_cv_HAVE_IFACE_IFCONF=no
11367 fi
11368 rm -fr conftest*
11369 fi
11370
11371 fi
11372
11373 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11374 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11375     iface=yes;cat >> confdefs.h <<\EOF
11376 #define HAVE_IFACE_IFCONF 1
11377 EOF
11378
11379 fi
11380 fi
11381
11382 if test $iface = no; then
11383 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11384 echo "configure:11385: checking for iface ifreq" >&5
11385 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11386   echo $ac_n "(cached) $ac_c" 1>&6
11387 else
11388   
11389 if test "$cross_compiling" = yes; then
11390   samba_cv_HAVE_IFACE_IFREQ=cross
11391 else
11392   cat > conftest.$ac_ext <<EOF
11393 #line 11394 "configure"
11394 #include "confdefs.h"
11395
11396 #define HAVE_IFACE_IFREQ 1
11397 #define AUTOCONF_TEST 1
11398 #include "confdefs.h"
11399 #include "${srcdir-.}/lib/interfaces.c"
11400 EOF
11401 if { (eval echo configure:11402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11402 then
11403   samba_cv_HAVE_IFACE_IFREQ=yes
11404 else
11405   echo "configure: failed program was:" >&5
11406   cat conftest.$ac_ext >&5
11407   rm -fr conftest*
11408   samba_cv_HAVE_IFACE_IFREQ=no
11409 fi
11410 rm -fr conftest*
11411 fi
11412
11413 fi
11414
11415 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11416 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11417     iface=yes;cat >> confdefs.h <<\EOF
11418 #define HAVE_IFACE_IFREQ 1
11419 EOF
11420
11421 fi
11422 fi
11423
11424
11425 ################################################
11426 # look for a method of setting the effective uid
11427 seteuid=no;
11428 if test $seteuid = no; then
11429 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11430 echo "configure:11431: checking for setresuid" >&5
11431 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11432   echo $ac_n "(cached) $ac_c" 1>&6
11433 else
11434   
11435 if test "$cross_compiling" = yes; then
11436   samba_cv_USE_SETRESUID=cross
11437 else
11438   cat > conftest.$ac_ext <<EOF
11439 #line 11440 "configure"
11440 #include "confdefs.h"
11441
11442 #define AUTOCONF_TEST 1
11443 #define USE_SETRESUID 1
11444 #include "confdefs.h"
11445 #include "${srcdir-.}/lib/util_sec.c"
11446 EOF
11447 if { (eval echo configure:11448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11448 then
11449   samba_cv_USE_SETRESUID=yes
11450 else
11451   echo "configure: failed program was:" >&5
11452   cat conftest.$ac_ext >&5
11453   rm -fr conftest*
11454   samba_cv_USE_SETRESUID=no
11455 fi
11456 rm -fr conftest*
11457 fi
11458
11459 fi
11460
11461 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11462 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11463     seteuid=yes;cat >> confdefs.h <<\EOF
11464 #define USE_SETRESUID 1
11465 EOF
11466
11467 fi
11468 fi
11469
11470
11471 if test $seteuid = no; then
11472 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11473 echo "configure:11474: checking for setreuid" >&5
11474 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11475   echo $ac_n "(cached) $ac_c" 1>&6
11476 else
11477   
11478 if test "$cross_compiling" = yes; then
11479   samba_cv_USE_SETREUID=cross
11480 else
11481   cat > conftest.$ac_ext <<EOF
11482 #line 11483 "configure"
11483 #include "confdefs.h"
11484
11485 #define AUTOCONF_TEST 1
11486 #define USE_SETREUID 1
11487 #include "confdefs.h"
11488 #include "${srcdir-.}/lib/util_sec.c"
11489 EOF
11490 if { (eval echo configure:11491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11491 then
11492   samba_cv_USE_SETREUID=yes
11493 else
11494   echo "configure: failed program was:" >&5
11495   cat conftest.$ac_ext >&5
11496   rm -fr conftest*
11497   samba_cv_USE_SETREUID=no
11498 fi
11499 rm -fr conftest*
11500 fi
11501
11502 fi
11503
11504 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11505 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11506     seteuid=yes;cat >> confdefs.h <<\EOF
11507 #define USE_SETREUID 1
11508 EOF
11509
11510 fi
11511 fi
11512
11513 if test $seteuid = no; then
11514 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11515 echo "configure:11516: checking for seteuid" >&5
11516 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11517   echo $ac_n "(cached) $ac_c" 1>&6
11518 else
11519   
11520 if test "$cross_compiling" = yes; then
11521   samba_cv_USE_SETEUID=cross
11522 else
11523   cat > conftest.$ac_ext <<EOF
11524 #line 11525 "configure"
11525 #include "confdefs.h"
11526
11527 #define AUTOCONF_TEST 1
11528 #define USE_SETEUID 1
11529 #include "confdefs.h"
11530 #include "${srcdir-.}/lib/util_sec.c"
11531 EOF
11532 if { (eval echo configure:11533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11533 then
11534   samba_cv_USE_SETEUID=yes
11535 else
11536   echo "configure: failed program was:" >&5
11537   cat conftest.$ac_ext >&5
11538   rm -fr conftest*
11539   samba_cv_USE_SETEUID=no
11540 fi
11541 rm -fr conftest*
11542 fi
11543
11544 fi
11545
11546 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11547 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11548     seteuid=yes;cat >> confdefs.h <<\EOF
11549 #define USE_SETEUID 1
11550 EOF
11551
11552 fi
11553 fi
11554
11555 if test $seteuid = no; then
11556 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11557 echo "configure:11558: checking for setuidx" >&5
11558 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11559   echo $ac_n "(cached) $ac_c" 1>&6
11560 else
11561   
11562 if test "$cross_compiling" = yes; then
11563   samba_cv_USE_SETUIDX=cross
11564 else
11565   cat > conftest.$ac_ext <<EOF
11566 #line 11567 "configure"
11567 #include "confdefs.h"
11568
11569 #define AUTOCONF_TEST 1
11570 #define USE_SETUIDX 1
11571 #include "confdefs.h"
11572 #include "${srcdir-.}/lib/util_sec.c"
11573 EOF
11574 if { (eval echo configure:11575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11575 then
11576   samba_cv_USE_SETUIDX=yes
11577 else
11578   echo "configure: failed program was:" >&5
11579   cat conftest.$ac_ext >&5
11580   rm -fr conftest*
11581   samba_cv_USE_SETUIDX=no
11582 fi
11583 rm -fr conftest*
11584 fi
11585
11586 fi
11587
11588 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11589 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11590     seteuid=yes;cat >> confdefs.h <<\EOF
11591 #define USE_SETUIDX 1
11592 EOF
11593
11594 fi
11595 fi
11596
11597
11598 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11599 echo "configure:11600: checking for working mmap" >&5
11600 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11601   echo $ac_n "(cached) $ac_c" 1>&6
11602 else
11603   
11604 if test "$cross_compiling" = yes; then
11605   samba_cv_HAVE_MMAP=cross
11606 else
11607   cat > conftest.$ac_ext <<EOF
11608 #line 11609 "configure"
11609 #include "confdefs.h"
11610 #include "${srcdir-.}/tests/shared_mmap.c"
11611 EOF
11612 if { (eval echo configure:11613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11613 then
11614   samba_cv_HAVE_MMAP=yes
11615 else
11616   echo "configure: failed program was:" >&5
11617   cat conftest.$ac_ext >&5
11618   rm -fr conftest*
11619   samba_cv_HAVE_MMAP=no
11620 fi
11621 rm -fr conftest*
11622 fi
11623
11624 fi
11625
11626 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11627 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11628     cat >> confdefs.h <<\EOF
11629 #define HAVE_MMAP 1
11630 EOF
11631
11632 fi
11633
11634 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11635 echo "configure:11636: checking for ftruncate needs root" >&5
11636 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11637   echo $ac_n "(cached) $ac_c" 1>&6
11638 else
11639   
11640 if test "$cross_compiling" = yes; then
11641   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11642 else
11643   cat > conftest.$ac_ext <<EOF
11644 #line 11645 "configure"
11645 #include "confdefs.h"
11646 #include "${srcdir-.}/tests/ftruncroot.c"
11647 EOF
11648 if { (eval echo configure:11649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11649 then
11650   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11651 else
11652   echo "configure: failed program was:" >&5
11653   cat conftest.$ac_ext >&5
11654   rm -fr conftest*
11655   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11656 fi
11657 rm -fr conftest*
11658 fi
11659
11660 fi
11661
11662 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11663 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11664     cat >> confdefs.h <<\EOF
11665 #define FTRUNCATE_NEEDS_ROOT 1
11666 EOF
11667
11668 fi
11669
11670 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11671 echo "configure:11672: checking for fcntl locking" >&5
11672 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11673   echo $ac_n "(cached) $ac_c" 1>&6
11674 else
11675   
11676 if test "$cross_compiling" = yes; then
11677   samba_cv_HAVE_FCNTL_LOCK=cross
11678 else
11679   cat > conftest.$ac_ext <<EOF
11680 #line 11681 "configure"
11681 #include "confdefs.h"
11682 #include "${srcdir-.}/tests/fcntl_lock.c"
11683 EOF
11684 if { (eval echo configure:11685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11685 then
11686   samba_cv_HAVE_FCNTL_LOCK=yes
11687 else
11688   echo "configure: failed program was:" >&5
11689   cat conftest.$ac_ext >&5
11690   rm -fr conftest*
11691   samba_cv_HAVE_FCNTL_LOCK=no
11692 fi
11693 rm -fr conftest*
11694 fi
11695
11696 fi
11697
11698 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11699 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11700     cat >> confdefs.h <<\EOF
11701 #define HAVE_FCNTL_LOCK 1
11702 EOF
11703
11704 fi
11705
11706 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11707 echo "configure:11708: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11708 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11709   echo $ac_n "(cached) $ac_c" 1>&6
11710 else
11711   
11712 if test "$cross_compiling" = yes; then
11713   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11714 else
11715   cat > conftest.$ac_ext <<EOF
11716 #line 11717 "configure"
11717 #include "confdefs.h"
11718 #include "${srcdir-.}/tests/fcntl_lock64.c"
11719 EOF
11720 if { (eval echo configure:11721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11721 then
11722   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11723 else
11724   echo "configure: failed program was:" >&5
11725   cat conftest.$ac_ext >&5
11726   rm -fr conftest*
11727   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11728 fi
11729 rm -fr conftest*
11730 fi
11731
11732 fi
11733
11734 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11735 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11736     cat >> confdefs.h <<\EOF
11737 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11738 EOF
11739
11740
11741 else
11742
11743
11744   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11745 echo "configure:11746: checking for 64 bit fcntl locking" >&5
11746 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11747   echo $ac_n "(cached) $ac_c" 1>&6
11748 else
11749   
11750   if test "$cross_compiling" = yes; then
11751   samba_cv_HAVE_STRUCT_FLOCK64=cross
11752 else
11753   cat > conftest.$ac_ext <<EOF
11754 #line 11755 "configure"
11755 #include "confdefs.h"
11756
11757 #if defined(HAVE_UNISTD_H)
11758 #include <unistd.h>
11759 #endif
11760 #include <stdio.h>
11761 #include <stdlib.h>
11762
11763 #ifdef HAVE_FCNTL_H
11764 #include <fcntl.h>
11765 #endif
11766
11767 #ifdef HAVE_SYS_FCNTL_H
11768 #include <sys/fcntl.h>
11769 #endif
11770 main() { struct flock64 fl64;
11771 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11772 exit(0);
11773 #else
11774 exit(1);
11775 #endif
11776 }
11777 EOF
11778 if { (eval echo configure:11779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11779 then
11780   samba_cv_HAVE_STRUCT_FLOCK64=yes
11781 else
11782   echo "configure: failed program was:" >&5
11783   cat conftest.$ac_ext >&5
11784   rm -fr conftest*
11785   samba_cv_HAVE_STRUCT_FLOCK64=no
11786 fi
11787 rm -fr conftest*
11788 fi
11789
11790 fi
11791
11792 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11793
11794   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11795       cat >> confdefs.h <<\EOF
11796 #define HAVE_STRUCT_FLOCK64 1
11797 EOF
11798
11799   fi
11800 fi
11801
11802 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11803 echo "configure:11804: checking for st_blocks in struct stat" >&5
11804 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11805   echo $ac_n "(cached) $ac_c" 1>&6
11806 else
11807   
11808 cat > conftest.$ac_ext <<EOF
11809 #line 11810 "configure"
11810 #include "confdefs.h"
11811 #include <sys/types.h>
11812 #include <sys/stat.h>
11813 #include <unistd.h>
11814 int main() {
11815 struct stat st;  st.st_blocks = 0;
11816 ; return 0; }
11817 EOF
11818 if { (eval echo configure:11819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11819   rm -rf conftest*
11820   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11821 else
11822   echo "configure: failed program was:" >&5
11823   cat conftest.$ac_ext >&5
11824   rm -rf conftest*
11825   samba_cv_HAVE_STAT_ST_BLOCKS=no
11826 fi
11827 rm -f conftest*
11828 fi
11829
11830 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11831 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11832     cat >> confdefs.h <<\EOF
11833 #define HAVE_STAT_ST_BLOCKS 1
11834 EOF
11835
11836 fi 
11837
11838 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
11839 echo "configure:11840: checking for st_blksize in struct stat" >&5
11840 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLKSIZE'+set}'`\" = set"; then
11841   echo $ac_n "(cached) $ac_c" 1>&6
11842 else
11843   
11844 cat > conftest.$ac_ext <<EOF
11845 #line 11846 "configure"
11846 #include "confdefs.h"
11847 #include <sys/types.h>
11848 #include <sys/stat.h>
11849 #include <unistd.h>
11850 int main() {
11851 struct stat st;  st.st_blksize = 0;
11852 ; return 0; }
11853 EOF
11854 if { (eval echo configure:11855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11855   rm -rf conftest*
11856   samba_cv_HAVE_STAT_ST_BLKSIZE=yes
11857 else
11858   echo "configure: failed program was:" >&5
11859   cat conftest.$ac_ext >&5
11860   rm -rf conftest*
11861   samba_cv_HAVE_STAT_ST_BLKSIZE=no
11862 fi
11863 rm -f conftest*
11864 fi
11865
11866 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLKSIZE" 1>&6
11867 if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then
11868     cat >> confdefs.h <<\EOF
11869 #define HAVE_STAT_ST_BLKSIZE 1
11870 EOF
11871
11872 fi
11873
11874 case "$host_os" in
11875 *linux*)
11876 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11877 echo "configure:11878: checking for broken RedHat 7.2 system header files" >&5
11878 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11879   echo $ac_n "(cached) $ac_c" 1>&6
11880 else
11881   
11882 cat > conftest.$ac_ext <<EOF
11883 #line 11884 "configure"
11884 #include "confdefs.h"
11885
11886 #ifdef HAVE_SYS_VFS_H
11887 #include <sys/vfs.h>
11888 #endif
11889 #ifdef HAVE_SYS_CAPABILITY_H
11890 #include <sys/capability.h>
11891 #endif
11892
11893 int main() {
11894 int i;
11895 ; return 0; }
11896 EOF
11897 if { (eval echo configure:11898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11898   rm -rf conftest*
11899   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11900 else
11901   echo "configure: failed program was:" >&5
11902   cat conftest.$ac_ext >&5
11903   rm -rf conftest*
11904   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11905 fi
11906 rm -f conftest*
11907 fi
11908
11909 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11910 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11911    cat >> confdefs.h <<\EOF
11912 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11913 EOF
11914
11915 fi
11916 ;;
11917 esac
11918
11919 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11920 echo "configure:11921: checking for broken nisplus include files" >&5
11921 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11922   echo $ac_n "(cached) $ac_c" 1>&6
11923 else
11924   
11925 cat > conftest.$ac_ext <<EOF
11926 #line 11927 "configure"
11927 #include "confdefs.h"
11928 #include <sys/acl.h>
11929 #if defined(HAVE_RPCSVC_NIS_H)
11930 #include <rpcsvc/nis.h>
11931 #endif
11932 int main() {
11933 int i;
11934 ; return 0; }
11935 EOF
11936 if { (eval echo configure:11937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11937   rm -rf conftest*
11938   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11939 else
11940   echo "configure: failed program was:" >&5
11941   cat conftest.$ac_ext >&5
11942   rm -rf conftest*
11943   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11944 fi
11945 rm -f conftest*
11946 fi
11947
11948 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11949 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11950     cat >> confdefs.h <<\EOF
11951 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11952 EOF
11953
11954 fi
11955
11956
11957 #################################################
11958 # check for smbwrapper support
11959 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11960 echo "configure:11961: checking whether to use smbwrapper" >&5
11961 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11962 if test "${with_smbwrapper+set}" = set; then
11963   withval="$with_smbwrapper"
11964    case "$withval" in
11965   yes)
11966     echo "$ac_t""yes" 1>&6
11967     cat >> confdefs.h <<\EOF
11968 #define WITH_SMBWRAPPER 1
11969 EOF
11970
11971         WRAPPROG="bin/smbsh"
11972         WRAP="bin/smbwrapper.$SHLIBEXT"
11973
11974         if test x$ATTEMPT_WRAP32_BUILD = x; then
11975                 WRAP32=""
11976         else
11977                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11978         fi
11979
11980 # Conditions under which smbwrapper should not be built.
11981
11982         if test x$PICFLAG = x; then
11983            echo No support for PIC code - disabling smbwrapper and smbsh
11984            WRAPPROG=""
11985            WRAP=""
11986            WRAP32=""
11987         elif test x$ac_cv_func_syscall = xno; then
11988            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11989            WRAPPROG=""
11990            WRAP=""
11991            WRAP32=""
11992         fi
11993     ;;
11994   *)
11995     echo "$ac_t""no" 1>&6
11996     ;;
11997   esac 
11998 else
11999   echo "$ac_t""no" 1>&6
12000
12001 fi
12002
12003
12004 #################################################
12005 # check for AFS clear-text auth support
12006 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
12007 echo "configure:12008: checking whether to use AFS clear-text auth" >&5
12008 # Check whether --with-afs or --without-afs was given.
12009 if test "${with_afs+set}" = set; then
12010   withval="$with_afs"
12011    case "$withval" in
12012   yes)
12013     echo "$ac_t""yes" 1>&6
12014     cat >> confdefs.h <<\EOF
12015 #define WITH_AFS 1
12016 EOF
12017
12018     ;;
12019   *)
12020     echo "$ac_t""no" 1>&6
12021     ;;
12022   esac 
12023 else
12024   echo "$ac_t""no" 1>&6
12025
12026 fi
12027
12028
12029
12030 #################################################
12031 # check for the DFS clear-text auth system
12032 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
12033 echo "configure:12034: checking whether to use DFS clear-text auth" >&5
12034 # Check whether --with-dfs or --without-dfs was given.
12035 if test "${with_dfs+set}" = set; then
12036   withval="$with_dfs"
12037    case "$withval" in
12038   yes)
12039     echo "$ac_t""yes" 1>&6
12040     cat >> confdefs.h <<\EOF
12041 #define WITH_DFS 1
12042 EOF
12043
12044     ;;
12045   *)
12046     echo "$ac_t""no" 1>&6
12047     ;;
12048   esac 
12049 else
12050   echo "$ac_t""no" 1>&6
12051
12052 fi
12053
12054
12055 #################################################
12056 # active directory support
12057
12058 with_ads_support=yes
12059 echo $ac_n "checking whether to use Active Directory""... $ac_c" 1>&6
12060 echo "configure:12061: checking whether to use Active Directory" >&5
12061
12062 # Check whether --with-ads or --without-ads was given.
12063 if test "${with_ads+set}" = set; then
12064   withval="$with_ads"
12065    case "$withval" in
12066     no)
12067         with_ads_support=no
12068         ;;
12069   esac 
12070 fi
12071
12072
12073 if test x"$with_ads_support" = x"yes"; then
12074    cat >> confdefs.h <<\EOF
12075 #define WITH_ADS 1
12076 EOF
12077
12078 fi
12079
12080 echo "$ac_t""$with_ads_support" 1>&6
12081
12082 FOUND_KRB5=no
12083 if test x"$with_ads_support" = x"yes"; then
12084
12085   #################################################
12086   # check for location of Kerberos 5 install
12087   echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
12088 echo "configure:12089: checking for kerberos 5 install path" >&5
12089   # Check whether --with-krb5 or --without-krb5 was given.
12090 if test "${with_krb5+set}" = set; then
12091   withval="$with_krb5"
12092    case "$withval" in
12093     no)
12094       echo "$ac_t""no" 1>&6
12095       ;;
12096     *)
12097       echo "$ac_t""yes" 1>&6
12098       LIBS="$LIBS -lkrb5"
12099       CFLAGS="$CFLAGS -I$withval/include"
12100       CPPFLAGS="$CPPFLAGS -I$withval/include"
12101       LDFLAGS="$LDFLAGS -L$withval/lib"
12102       FOUND_KRB5=yes
12103       ;;
12104     esac 
12105 else
12106   echo "$ac_t""no" 1>&6
12107   
12108 fi
12109
12110
12111
12112 if test x$FOUND_KRB5 = x"no"; then
12113 #################################################
12114 # see if this box has the RedHat location for kerberos
12115 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
12116 echo "configure:12117: checking for /usr/kerberos" >&5
12117 if test -d /usr/kerberos; then
12118     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
12119     CFLAGS="$CFLAGS -I/usr/kerberos/include"
12120     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
12121     echo "$ac_t""yes" 1>&6
12122 else
12123     echo "$ac_t""no" 1>&6
12124 fi
12125 fi
12126
12127
12128   # now check for krb5.h. Some systems have the libraries without the headers!
12129   # note that this check is done here to allow for different kerberos
12130   # include paths
12131   for ac_hdr in krb5.h
12132 do
12133 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12134 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12135 echo "configure:12136: checking for $ac_hdr" >&5
12136 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12137   echo $ac_n "(cached) $ac_c" 1>&6
12138 else
12139   cat > conftest.$ac_ext <<EOF
12140 #line 12141 "configure"
12141 #include "confdefs.h"
12142 #include <$ac_hdr>
12143 EOF
12144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12145 { (eval echo configure:12146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12147 if test -z "$ac_err"; then
12148   rm -rf conftest*
12149   eval "ac_cv_header_$ac_safe=yes"
12150 else
12151   echo "$ac_err" >&5
12152   echo "configure: failed program was:" >&5
12153   cat conftest.$ac_ext >&5
12154   rm -rf conftest*
12155   eval "ac_cv_header_$ac_safe=no"
12156 fi
12157 rm -f conftest*
12158 fi
12159 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12160   echo "$ac_t""yes" 1>&6
12161     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12162   cat >> confdefs.h <<EOF
12163 #define $ac_tr_hdr 1
12164 EOF
12165  
12166 else
12167   echo "$ac_t""no" 1>&6
12168 fi
12169 done
12170
12171
12172   # now check for gssapi headers.  This is also done here to allow for
12173   # different kerberos include paths
12174   for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12175 do
12176 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12177 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12178 echo "configure:12179: checking for $ac_hdr" >&5
12179 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12180   echo $ac_n "(cached) $ac_c" 1>&6
12181 else
12182   cat > conftest.$ac_ext <<EOF
12183 #line 12184 "configure"
12184 #include "confdefs.h"
12185 #include <$ac_hdr>
12186 EOF
12187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12188 { (eval echo configure:12189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12190 if test -z "$ac_err"; then
12191   rm -rf conftest*
12192   eval "ac_cv_header_$ac_safe=yes"
12193 else
12194   echo "$ac_err" >&5
12195   echo "configure: failed program was:" >&5
12196   cat conftest.$ac_ext >&5
12197   rm -rf conftest*
12198   eval "ac_cv_header_$ac_safe=no"
12199 fi
12200 rm -f conftest*
12201 fi
12202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12203   echo "$ac_t""yes" 1>&6
12204     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12205   cat >> confdefs.h <<EOF
12206 #define $ac_tr_hdr 1
12207 EOF
12208  
12209 else
12210   echo "$ac_t""no" 1>&6
12211 fi
12212 done
12213
12214
12215   ##################################################################
12216   # we might need the k5crypto and com_err libraries on some systems
12217   echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12218 echo "configure:12219: checking for _et_list in -lcom_err" >&5
12219 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12220 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12221   echo $ac_n "(cached) $ac_c" 1>&6
12222 else
12223   ac_save_LIBS="$LIBS"
12224 LIBS="-lcom_err  $LIBS"
12225 cat > conftest.$ac_ext <<EOF
12226 #line 12227 "configure"
12227 #include "confdefs.h"
12228 /* Override any gcc2 internal prototype to avoid an error.  */
12229 /* We use char because int might match the return type of a gcc2
12230     builtin and then its argument prototype would still apply.  */
12231 char _et_list();
12232
12233 int main() {
12234 _et_list()
12235 ; return 0; }
12236 EOF
12237 if { (eval echo configure:12238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12238   rm -rf conftest*
12239   eval "ac_cv_lib_$ac_lib_var=yes"
12240 else
12241   echo "configure: failed program was:" >&5
12242   cat conftest.$ac_ext >&5
12243   rm -rf conftest*
12244   eval "ac_cv_lib_$ac_lib_var=no"
12245 fi
12246 rm -f conftest*
12247 LIBS="$ac_save_LIBS"
12248
12249 fi
12250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12251   echo "$ac_t""yes" 1>&6
12252   LIBS="$LIBS -lcom_err"
12253 else
12254   echo "$ac_t""no" 1>&6
12255 fi
12256
12257   echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12258 echo "configure:12259: checking for krb5_encrypt_data in -lk5crypto" >&5
12259 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12260 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12261   echo $ac_n "(cached) $ac_c" 1>&6
12262 else
12263   ac_save_LIBS="$LIBS"
12264 LIBS="-lk5crypto  $LIBS"
12265 cat > conftest.$ac_ext <<EOF
12266 #line 12267 "configure"
12267 #include "confdefs.h"
12268 /* Override any gcc2 internal prototype to avoid an error.  */
12269 /* We use char because int might match the return type of a gcc2
12270     builtin and then its argument prototype would still apply.  */
12271 char krb5_encrypt_data();
12272
12273 int main() {
12274 krb5_encrypt_data()
12275 ; return 0; }
12276 EOF
12277 if { (eval echo configure:12278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12278   rm -rf conftest*
12279   eval "ac_cv_lib_$ac_lib_var=yes"
12280 else
12281   echo "configure: failed program was:" >&5
12282   cat conftest.$ac_ext >&5
12283   rm -rf conftest*
12284   eval "ac_cv_lib_$ac_lib_var=no"
12285 fi
12286 rm -f conftest*
12287 LIBS="$ac_save_LIBS"
12288
12289 fi
12290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12291   echo "$ac_t""yes" 1>&6
12292   LIBS="$LIBS -lk5crypto"
12293 else
12294   echo "$ac_t""no" 1>&6
12295 fi
12296
12297
12298   ########################################################
12299   # now see if we can find the krb5 libs in standard paths
12300   # or as specified above
12301   echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12302 echo "configure:12303: checking for krb5_mk_req_extended in -lkrb5" >&5
12303 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12304 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12305   echo $ac_n "(cached) $ac_c" 1>&6
12306 else
12307   ac_save_LIBS="$LIBS"
12308 LIBS="-lkrb5  $LIBS"
12309 cat > conftest.$ac_ext <<EOF
12310 #line 12311 "configure"
12311 #include "confdefs.h"
12312 /* Override any gcc2 internal prototype to avoid an error.  */
12313 /* We use char because int might match the return type of a gcc2
12314     builtin and then its argument prototype would still apply.  */
12315 char krb5_mk_req_extended();
12316
12317 int main() {
12318 krb5_mk_req_extended()
12319 ; return 0; }
12320 EOF
12321 if { (eval echo configure:12322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12322   rm -rf conftest*
12323   eval "ac_cv_lib_$ac_lib_var=yes"
12324 else
12325   echo "configure: failed program was:" >&5
12326   cat conftest.$ac_ext >&5
12327   rm -rf conftest*
12328   eval "ac_cv_lib_$ac_lib_var=no"
12329 fi
12330 rm -f conftest*
12331 LIBS="$ac_save_LIBS"
12332
12333 fi
12334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12335   echo "$ac_t""yes" 1>&6
12336   LIBS="$LIBS -lkrb5";
12337         cat >> confdefs.h <<\EOF
12338 #define HAVE_KRB5 1
12339 EOF
12340
12341 else
12342   echo "$ac_t""no" 1>&6
12343 fi
12344
12345
12346   ########################################################
12347   # now see if we can find the gssapi libs in standard paths
12348   echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12349 echo "configure:12350: checking for gss_display_status in -lgssapi_krb5" >&5
12350 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12351 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12352   echo $ac_n "(cached) $ac_c" 1>&6
12353 else
12354   ac_save_LIBS="$LIBS"
12355 LIBS="-lgssapi_krb5  $LIBS"
12356 cat > conftest.$ac_ext <<EOF
12357 #line 12358 "configure"
12358 #include "confdefs.h"
12359 /* Override any gcc2 internal prototype to avoid an error.  */
12360 /* We use char because int might match the return type of a gcc2
12361     builtin and then its argument prototype would still apply.  */
12362 char gss_display_status();
12363
12364 int main() {
12365 gss_display_status()
12366 ; return 0; }
12367 EOF
12368 if { (eval echo configure:12369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12369   rm -rf conftest*
12370   eval "ac_cv_lib_$ac_lib_var=yes"
12371 else
12372   echo "configure: failed program was:" >&5
12373   cat conftest.$ac_ext >&5
12374   rm -rf conftest*
12375   eval "ac_cv_lib_$ac_lib_var=no"
12376 fi
12377 rm -f conftest*
12378 LIBS="$ac_save_LIBS"
12379
12380 fi
12381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12382   echo "$ac_t""yes" 1>&6
12383   LIBS="$LIBS -lgssapi_krb5";
12384         cat >> confdefs.h <<\EOF
12385 #define HAVE_GSSAPI 1
12386 EOF
12387
12388 else
12389   echo "$ac_t""no" 1>&6
12390 fi
12391
12392 fi
12393
12394 ########################################################
12395 # Compile with LDAP support?
12396
12397 with_ldap_support=yes
12398 echo $ac_n "checking whether to use LDAP""... $ac_c" 1>&6
12399 echo "configure:12400: checking whether to use LDAP" >&5
12400
12401 # Check whether --with-ldap or --without-ldap was given.
12402 if test "${with_ldap+set}" = set; then
12403   withval="$with_ldap"
12404    case "$withval" in
12405     no)
12406         with_ldap_support=no
12407         ;;
12408   esac 
12409 fi
12410
12411
12412 echo "$ac_t""$with_ldap_support" 1>&6
12413
12414 if test x"$with_ldap_support" = x"yes"; then
12415
12416   ##################################################################
12417   # we might need the lber lib on some systems. To avoid link errors
12418   # this test must be before the libldap test
12419   echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12420 echo "configure:12421: checking for ber_scanf in -llber" >&5
12421 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12422 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12423   echo $ac_n "(cached) $ac_c" 1>&6
12424 else
12425   ac_save_LIBS="$LIBS"
12426 LIBS="-llber  $LIBS"
12427 cat > conftest.$ac_ext <<EOF
12428 #line 12429 "configure"
12429 #include "confdefs.h"
12430 /* Override any gcc2 internal prototype to avoid an error.  */
12431 /* We use char because int might match the return type of a gcc2
12432     builtin and then its argument prototype would still apply.  */
12433 char ber_scanf();
12434
12435 int main() {
12436 ber_scanf()
12437 ; return 0; }
12438 EOF
12439 if { (eval echo configure:12440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12440   rm -rf conftest*
12441   eval "ac_cv_lib_$ac_lib_var=yes"
12442 else
12443   echo "configure: failed program was:" >&5
12444   cat conftest.$ac_ext >&5
12445   rm -rf conftest*
12446   eval "ac_cv_lib_$ac_lib_var=no"
12447 fi
12448 rm -f conftest*
12449 LIBS="$ac_save_LIBS"
12450
12451 fi
12452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12453   echo "$ac_t""yes" 1>&6
12454   LIBS="$LIBS -llber"
12455 else
12456   echo "$ac_t""no" 1>&6
12457 fi
12458
12459
12460   ########################################################
12461   # now see if we can find the ldap libs in standard paths
12462   if test x$have_ldap != xyes; then
12463   echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12464 echo "configure:12465: checking for ldap_domain2hostlist in -lldap" >&5
12465 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12466 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12467   echo $ac_n "(cached) $ac_c" 1>&6
12468 else
12469   ac_save_LIBS="$LIBS"
12470 LIBS="-lldap  $LIBS"
12471 cat > conftest.$ac_ext <<EOF
12472 #line 12473 "configure"
12473 #include "confdefs.h"
12474 /* Override any gcc2 internal prototype to avoid an error.  */
12475 /* We use char because int might match the return type of a gcc2
12476     builtin and then its argument prototype would still apply.  */
12477 char ldap_domain2hostlist();
12478
12479 int main() {
12480 ldap_domain2hostlist()
12481 ; return 0; }
12482 EOF
12483 if { (eval echo configure:12484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12484   rm -rf conftest*
12485   eval "ac_cv_lib_$ac_lib_var=yes"
12486 else
12487   echo "configure: failed program was:" >&5
12488   cat conftest.$ac_ext >&5
12489   rm -rf conftest*
12490   eval "ac_cv_lib_$ac_lib_var=no"
12491 fi
12492 rm -f conftest*
12493 LIBS="$ac_save_LIBS"
12494
12495 fi
12496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12497   echo "$ac_t""yes" 1>&6
12498   LIBS="$LIBS -lldap";
12499         cat >> confdefs.h <<\EOF
12500 #define HAVE_LDAP 1
12501 EOF
12502
12503 else
12504   echo "$ac_t""no" 1>&6
12505 fi
12506
12507
12508         ########################################################
12509         # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
12510         # Check found in pam_ldap 145.
12511         for ac_func in ldap_set_rebind_proc
12512 do
12513 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12514 echo "configure:12515: checking for $ac_func" >&5
12515 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12516   echo $ac_n "(cached) $ac_c" 1>&6
12517 else
12518   cat > conftest.$ac_ext <<EOF
12519 #line 12520 "configure"
12520 #include "confdefs.h"
12521 /* System header to define __stub macros and hopefully few prototypes,
12522     which can conflict with char $ac_func(); below.  */
12523 #include <assert.h>
12524 /* Override any gcc2 internal prototype to avoid an error.  */
12525 /* We use char because int might match the return type of a gcc2
12526     builtin and then its argument prototype would still apply.  */
12527 char $ac_func();
12528
12529 int main() {
12530
12531 /* The GNU C library defines this for functions which it implements
12532     to always fail with ENOSYS.  Some functions are actually named
12533     something starting with __ and the normal name is an alias.  */
12534 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12535 choke me
12536 #else
12537 $ac_func();
12538 #endif
12539
12540 ; return 0; }
12541 EOF
12542 if { (eval echo configure:12543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12543   rm -rf conftest*
12544   eval "ac_cv_func_$ac_func=yes"
12545 else
12546   echo "configure: failed program was:" >&5
12547   cat conftest.$ac_ext >&5
12548   rm -rf conftest*
12549   eval "ac_cv_func_$ac_func=no"
12550 fi
12551 rm -f conftest*
12552 fi
12553
12554 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12555   echo "$ac_t""yes" 1>&6
12556     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12557   cat >> confdefs.h <<EOF
12558 #define $ac_tr_func 1
12559 EOF
12560  
12561 else
12562   echo "$ac_t""no" 1>&6
12563 fi
12564 done
12565
12566         echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6
12567 echo "configure:12568: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
12568 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then
12569   echo $ac_n "(cached) $ac_c" 1>&6
12570 else
12571   
12572         cat > conftest.$ac_ext <<EOF
12573 #line 12574 "configure"
12574 #include "confdefs.h"
12575
12576         #include <lber.h>
12577         #include <ldap.h>
12578 int main() {
12579 ldap_set_rebind_proc(0, 0, 0);
12580 ; return 0; }
12581 EOF
12582 if { (eval echo configure:12583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12583   rm -rf conftest*
12584   pam_ldap_cv_ldap_set_rebind_proc=3
12585 else
12586   echo "configure: failed program was:" >&5
12587   cat conftest.$ac_ext >&5
12588   rm -rf conftest*
12589   pam_ldap_cv_ldap_set_rebind_proc=2
12590 fi
12591 rm -f conftest* 
12592 fi
12593
12594 echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6
12595         cat >> confdefs.h <<EOF
12596 #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc
12597 EOF
12598
12599   fi
12600 fi
12601
12602 #################################################
12603 # check for automount support
12604 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12605 echo "configure:12606: checking whether to use AUTOMOUNT" >&5
12606 # Check whether --with-automount or --without-automount was given.
12607 if test "${with_automount+set}" = set; then
12608   withval="$with_automount"
12609    case "$withval" in
12610   yes)
12611     echo "$ac_t""yes" 1>&6
12612     cat >> confdefs.h <<\EOF
12613 #define WITH_AUTOMOUNT 1
12614 EOF
12615
12616     ;;
12617   *)
12618     echo "$ac_t""no" 1>&6
12619     ;;
12620   esac 
12621 else
12622   echo "$ac_t""no" 1>&6
12623
12624 fi
12625
12626
12627 #################################################
12628 # check for smbmount support
12629 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12630 echo "configure:12631: checking whether to use SMBMOUNT" >&5
12631 # Check whether --with-smbmount or --without-smbmount was given.
12632 if test "${with_smbmount+set}" = set; then
12633   withval="$with_smbmount"
12634    case "$withval" in
12635   yes)
12636         case "$host_os" in
12637         *linux*)
12638                 echo "$ac_t""yes" 1>&6
12639                 cat >> confdefs.h <<\EOF
12640 #define WITH_SMBMOUNT 1
12641 EOF
12642
12643                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12644                 ;;
12645         *)
12646                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12647                 ;;
12648         esac
12649     ;;
12650   *)
12651     echo "$ac_t""no" 1>&6
12652     MPROGS=
12653     ;;
12654   esac 
12655 else
12656   echo "$ac_t""no" 1>&6
12657   MPROGS=
12658
12659 fi
12660
12661
12662
12663 #################################################
12664 # check for a PAM clear-text auth, accounts, password and session support
12665 with_pam_for_crypt=no
12666 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12667 echo "configure:12668: checking whether to use PAM" >&5
12668 # Check whether --with-pam or --without-pam was given.
12669 if test "${with_pam+set}" = set; then
12670   withval="$with_pam"
12671    case "$withval" in
12672   yes)
12673     echo "$ac_t""yes" 1>&6
12674     cat >> confdefs.h <<\EOF
12675 #define WITH_PAM 1
12676 EOF
12677
12678     LIBS="$LIBS -lpam"
12679     with_pam_for_crypt=yes
12680     ;;
12681   *)
12682     echo "$ac_t""no" 1>&6
12683     ;;
12684   esac 
12685 else
12686   echo "$ac_t""no" 1>&6
12687
12688 fi
12689
12690
12691 # we can't build a pam module if we don't have pam.
12692 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12693 echo "configure:12694: checking for pam_get_data in -lpam" >&5
12694 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12695 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12696   echo $ac_n "(cached) $ac_c" 1>&6
12697 else
12698   ac_save_LIBS="$LIBS"
12699 LIBS="-lpam  $LIBS"
12700 cat > conftest.$ac_ext <<EOF
12701 #line 12702 "configure"
12702 #include "confdefs.h"
12703 /* Override any gcc2 internal prototype to avoid an error.  */
12704 /* We use char because int might match the return type of a gcc2
12705     builtin and then its argument prototype would still apply.  */
12706 char pam_get_data();
12707
12708 int main() {
12709 pam_get_data()
12710 ; return 0; }
12711 EOF
12712 if { (eval echo configure:12713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12713   rm -rf conftest*
12714   eval "ac_cv_lib_$ac_lib_var=yes"
12715 else
12716   echo "configure: failed program was:" >&5
12717   cat conftest.$ac_ext >&5
12718   rm -rf conftest*
12719   eval "ac_cv_lib_$ac_lib_var=no"
12720 fi
12721 rm -f conftest*
12722 LIBS="$ac_save_LIBS"
12723
12724 fi
12725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12726   echo "$ac_t""yes" 1>&6
12727   cat >> confdefs.h <<\EOF
12728 #define HAVE_LIBPAM 1
12729 EOF
12730
12731 else
12732   echo "$ac_t""no" 1>&6
12733 fi
12734
12735
12736 #################################################
12737 # check for pam_smbpass support
12738 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12739 echo "configure:12740: checking whether to use pam_smbpass" >&5
12740 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12741 if test "${with_pam_smbpass+set}" = set; then
12742   withval="$with_pam_smbpass"
12743    case "$withval" in
12744   yes)
12745     echo "$ac_t""yes" 1>&6
12746
12747 # Conditions under which pam_smbpass should not be built.
12748
12749        if test x$PICFLAG = x; then
12750           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12751           PAM_MOD=""
12752        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12753           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12754           PAM_MOD=""
12755        else
12756           PAM_MOD="bin/pam_smbpass.so"
12757        fi
12758     ;;
12759   *)
12760     echo "$ac_t""no" 1>&6
12761     ;;
12762   esac 
12763 else
12764   echo "$ac_t""no" 1>&6
12765
12766 fi
12767
12768
12769
12770 ###############################################
12771 # test for where we get crypt() from, but only
12772 # if not using PAM
12773 if test x"$with_pam_for_crypt" = x"no"; then
12774 for ac_func in crypt
12775 do
12776 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12777 echo "configure:12778: checking for $ac_func" >&5
12778 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12779   echo $ac_n "(cached) $ac_c" 1>&6
12780 else
12781   cat > conftest.$ac_ext <<EOF
12782 #line 12783 "configure"
12783 #include "confdefs.h"
12784 /* System header to define __stub macros and hopefully few prototypes,
12785     which can conflict with char $ac_func(); below.  */
12786 #include <assert.h>
12787 /* Override any gcc2 internal prototype to avoid an error.  */
12788 /* We use char because int might match the return type of a gcc2
12789     builtin and then its argument prototype would still apply.  */
12790 char $ac_func();
12791
12792 int main() {
12793
12794 /* The GNU C library defines this for functions which it implements
12795     to always fail with ENOSYS.  Some functions are actually named
12796     something starting with __ and the normal name is an alias.  */
12797 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12798 choke me
12799 #else
12800 $ac_func();
12801 #endif
12802
12803 ; return 0; }
12804 EOF
12805 if { (eval echo configure:12806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12806   rm -rf conftest*
12807   eval "ac_cv_func_$ac_func=yes"
12808 else
12809   echo "configure: failed program was:" >&5
12810   cat conftest.$ac_ext >&5
12811   rm -rf conftest*
12812   eval "ac_cv_func_$ac_func=no"
12813 fi
12814 rm -f conftest*
12815 fi
12816
12817 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12818   echo "$ac_t""yes" 1>&6
12819     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12820   cat >> confdefs.h <<EOF
12821 #define $ac_tr_func 1
12822 EOF
12823  
12824 else
12825   echo "$ac_t""no" 1>&6
12826 fi
12827 done
12828
12829 if test x"$ac_cv_func_crypt" = x"no"; then
12830     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12831 echo "configure:12832: checking for crypt in -lcrypt" >&5
12832 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12833 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12834   echo $ac_n "(cached) $ac_c" 1>&6
12835 else
12836   ac_save_LIBS="$LIBS"
12837 LIBS="-lcrypt  $LIBS"
12838 cat > conftest.$ac_ext <<EOF
12839 #line 12840 "configure"
12840 #include "confdefs.h"
12841 /* Override any gcc2 internal prototype to avoid an error.  */
12842 /* We use char because int might match the return type of a gcc2
12843     builtin and then its argument prototype would still apply.  */
12844 char crypt();
12845
12846 int main() {
12847 crypt()
12848 ; return 0; }
12849 EOF
12850 if { (eval echo configure:12851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12851   rm -rf conftest*
12852   eval "ac_cv_lib_$ac_lib_var=yes"
12853 else
12854   echo "configure: failed program was:" >&5
12855   cat conftest.$ac_ext >&5
12856   rm -rf conftest*
12857   eval "ac_cv_lib_$ac_lib_var=no"
12858 fi
12859 rm -f conftest*
12860 LIBS="$ac_save_LIBS"
12861
12862 fi
12863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12864   echo "$ac_t""yes" 1>&6
12865   LIBS="$LIBS -lcrypt";
12866         cat >> confdefs.h <<\EOF
12867 #define HAVE_CRYPT 1
12868 EOF
12869
12870 else
12871   echo "$ac_t""no" 1>&6
12872 fi
12873
12874 fi
12875 fi
12876
12877 ##
12878 ## moved after the check for -lcrypt in order to
12879 ## ensure that the necessary libraries are included
12880 ## check checking for truncated salt.  Wrapped by the
12881 ## $with_pam_for_crypt variable as above   --jerry
12882 ##
12883 if test $with_pam_for_crypt = no; then
12884 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12885 echo "configure:12886: checking for a crypt that needs truncated salt" >&5
12886 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12887   echo $ac_n "(cached) $ac_c" 1>&6
12888 else
12889   
12890 if test "$cross_compiling" = yes; then
12891   samba_cv_HAVE_TRUNCATED_SALT=cross
12892 else
12893   cat > conftest.$ac_ext <<EOF
12894 #line 12895 "configure"
12895 #include "confdefs.h"
12896 #include "${srcdir-.}/tests/crypttest.c"
12897 EOF
12898 if { (eval echo configure:12899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12899 then
12900   samba_cv_HAVE_TRUNCATED_SALT=no
12901 else
12902   echo "configure: failed program was:" >&5
12903   cat conftest.$ac_ext >&5
12904   rm -fr conftest*
12905   samba_cv_HAVE_TRUNCATED_SALT=yes
12906 fi
12907 rm -fr conftest*
12908 fi
12909
12910 fi
12911
12912 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12913 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12914         cat >> confdefs.h <<\EOF
12915 #define HAVE_TRUNCATED_SALT 1
12916 EOF
12917
12918 fi
12919 fi
12920
12921 # New experimental SAM system
12922
12923 echo $ac_n "checking whether to build the new (experimental) SAM database""... $ac_c" 1>&6
12924 echo "configure:12925: checking whether to build the new (experimental) SAM database" >&5
12925 # Check whether --with-sam or --without-sam was given.
12926 if test "${with_sam+set}" = set; then
12927   withval="$with_sam"
12928    case "$withval" in
12929   yes)
12930     echo "$ac_t""yes" 1>&6
12931     cat >> confdefs.h <<\EOF
12932 #define WITH_SAM 1
12933 EOF
12934
12935     ;;
12936   *)
12937     echo "$ac_t""no" 1>&6
12938     ;;
12939   esac 
12940 else
12941   echo "$ac_t""no" 1>&6
12942
12943 fi
12944
12945
12946
12947 ########################################################################################
12948 ##
12949 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12950 ##
12951 ########################################################################################
12952
12953 #################################################
12954 # check for a LDAP password database configuration backwards compatibility
12955 echo $ac_n "checking whether to use LDAP SAM 2.2 compatible configuration""... $ac_c" 1>&6
12956 echo "configure:12957: checking whether to use LDAP SAM 2.2 compatible configuration" >&5
12957 # Check whether --with-ldapsam or --without-ldapsam was given.
12958 if test "${with_ldapsam+set}" = set; then
12959   withval="$with_ldapsam"
12960    case "$withval" in
12961   yes)
12962     echo "$ac_t""yes" 1>&6
12963     cat >> confdefs.h <<\EOF
12964 #define WITH_LDAP_SAMCONFIG 1
12965 EOF
12966
12967     ;;
12968   *)
12969     echo "$ac_t""no" 1>&6
12970     ;;
12971   esac 
12972 else
12973   echo "$ac_t""no" 1>&6
12974
12975 fi
12976
12977
12978 #################################################
12979 # check for a TDB password database
12980 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12981 echo "configure:12982: checking whether to use TDB SAM database" >&5
12982 # Check whether --with-tdbsam or --without-tdbsam was given.
12983 if test "${with_tdbsam+set}" = set; then
12984   withval="$with_tdbsam"
12985    case "$withval" in
12986   yes)
12987     echo "$ac_t""yes" 1>&6
12988     cat >> confdefs.h <<\EOF
12989 #define WITH_TDB_SAM 1
12990 EOF
12991
12992     ;;
12993   *)
12994     echo "$ac_t""no" 1>&6
12995     ;;
12996   esac 
12997 else
12998   echo "$ac_t""no" 1>&6
12999
13000 fi
13001
13002
13003 #################################################
13004 # check for a NISPLUS password database
13005 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
13006 echo "configure:13007: checking whether to use NISPLUS SAM database" >&5
13007 # Check whether --with-nisplussam or --without-nisplussam was given.
13008 if test "${with_nisplussam+set}" = set; then
13009   withval="$with_nisplussam"
13010    case "$withval" in
13011   yes)
13012     echo "$ac_t""yes" 1>&6
13013     cat >> confdefs.h <<\EOF
13014 #define WITH_NISPLUS_SAM 1
13015 EOF
13016
13017     ;;
13018   *)
13019     echo "$ac_t""no" 1>&6
13020     ;;
13021   esac 
13022 else
13023   echo "$ac_t""no" 1>&6
13024
13025 fi
13026
13027
13028 ########################################################################################
13029 ##
13030 ## END OF TESTS FOR SAM BACKENDS.  
13031 ##
13032 ########################################################################################
13033
13034 #################################################
13035 # check for a NISPLUS_HOME support 
13036 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
13037 echo "configure:13038: checking whether to use NISPLUS_HOME" >&5
13038 # Check whether --with-nisplus-home or --without-nisplus-home was given.
13039 if test "${with_nisplus_home+set}" = set; then
13040   withval="$with_nisplus_home"
13041    case "$withval" in
13042   yes)
13043     echo "$ac_t""yes" 1>&6
13044     cat >> confdefs.h <<\EOF
13045 #define WITH_NISPLUS_HOME 1
13046 EOF
13047
13048     ;;
13049   *)
13050     echo "$ac_t""no" 1>&6
13051     ;;
13052   esac 
13053 else
13054   echo "$ac_t""no" 1>&6
13055
13056 fi
13057
13058
13059 #################################################
13060 # check for syslog logging
13061 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
13062 echo "configure:13063: checking whether to use syslog logging" >&5
13063 # Check whether --with-syslog or --without-syslog was given.
13064 if test "${with_syslog+set}" = set; then
13065   withval="$with_syslog"
13066    case "$withval" in
13067   yes)
13068     echo "$ac_t""yes" 1>&6
13069     cat >> confdefs.h <<\EOF
13070 #define WITH_SYSLOG 1
13071 EOF
13072
13073     ;;
13074   *)
13075     echo "$ac_t""no" 1>&6
13076     ;;
13077   esac 
13078 else
13079   echo "$ac_t""no" 1>&6
13080
13081 fi
13082
13083
13084 #################################################
13085 # check for a shared memory profiling support
13086 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
13087 echo "configure:13088: checking whether to use profiling" >&5
13088 # Check whether --with-profiling-data or --without-profiling-data was given.
13089 if test "${with_profiling_data+set}" = set; then
13090   withval="$with_profiling_data"
13091    case "$withval" in
13092   yes)
13093     echo "$ac_t""yes" 1>&6
13094     cat >> confdefs.h <<\EOF
13095 #define WITH_PROFILE 1
13096 EOF
13097
13098     ;;
13099   *)
13100     echo "$ac_t""no" 1>&6
13101     ;;
13102   esac 
13103 else
13104   echo "$ac_t""no" 1>&6
13105
13106 fi
13107
13108
13109
13110 #################################################
13111 # check for experimental disk-quotas support
13112 QUOTAOBJS=smbd/noquotas.o
13113
13114 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
13115 echo "configure:13116: checking whether to support disk-quotas" >&5
13116 # Check whether --with-quotas or --without-quotas was given.
13117 if test "${with_quotas+set}" = set; then
13118   withval="$with_quotas"
13119    case "$withval" in
13120   yes)
13121     echo "$ac_t""yes" 1>&6
13122     case "$host_os" in
13123       *linux*)
13124         # Check for kernel 2.4.x quota braindamage...
13125         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
13126 echo "configure:13127: checking for linux 2.4.x quota braindamage.." >&5
13127 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
13128   echo $ac_n "(cached) $ac_c" 1>&6
13129 else
13130   
13131         cat > conftest.$ac_ext <<EOF
13132 #line 13133 "configure"
13133 #include "confdefs.h"
13134 #include <stdio.h>
13135 #include <sys/types.h>
13136 #include <asm/types.h>
13137 #include <linux/quota.h>
13138 #include <mntent.h>
13139 #include <linux/unistd.h>
13140 int main() {
13141 struct mem_dqblk D;
13142 ; return 0; }
13143 EOF
13144 if { (eval echo configure:13145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13145   rm -rf conftest*
13146   samba_cv_linux_2_4_quota_braindamage=yes
13147 else
13148   echo "configure: failed program was:" >&5
13149   cat conftest.$ac_ext >&5
13150   rm -rf conftest*
13151   samba_cv_linux_2_4_quota_braindamage=no
13152 fi
13153 rm -f conftest*
13154 fi
13155
13156 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
13157 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
13158         cat >> confdefs.h <<\EOF
13159 #define LINUX_QUOTAS_2 1
13160 EOF
13161
13162 else
13163         cat >> confdefs.h <<\EOF
13164 #define LINUX_QUOTAS_1 1
13165 EOF
13166
13167 fi
13168         ;;
13169       *)
13170         ;;
13171     esac
13172     QUOTAOBJS=smbd/quotas.o
13173     cat >> confdefs.h <<\EOF
13174 #define WITH_QUOTAS 1
13175 EOF
13176
13177     ;;
13178   *)
13179     echo "$ac_t""no" 1>&6
13180     ;;
13181   esac 
13182 else
13183   echo "$ac_t""no" 1>&6
13184
13185 fi
13186
13187
13188
13189 #################################################
13190 # check for experimental utmp accounting
13191
13192 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
13193 echo "configure:13194: checking whether to support utmp accounting" >&5
13194 # Check whether --with-utmp or --without-utmp was given.
13195 if test "${with_utmp+set}" = set; then
13196   withval="$with_utmp"
13197    case "$withval" in
13198   yes)
13199     echo "$ac_t""yes" 1>&6
13200     cat >> confdefs.h <<\EOF
13201 #define WITH_UTMP 1
13202 EOF
13203
13204     ;;
13205   *)
13206     echo "$ac_t""no" 1>&6
13207     ;;
13208   esac 
13209 else
13210   echo "$ac_t""no" 1>&6
13211
13212 fi
13213
13214
13215 #################################################
13216 # choose native language(s) of man pages
13217 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13218 echo "configure:13219: checking chosen man pages' language(s)" >&5
13219 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13220 if test "${with_manpages_langs+set}" = set; then
13221   withval="$with_manpages_langs"
13222    case "$withval" in
13223   yes|no)
13224     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13225     manlangs="en"
13226   ;;
13227   *)
13228     manlangs="$withval"
13229   ;;
13230   esac
13231
13232   echo "$ac_t""$manlangs" 1>&6
13233   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13234   
13235 else
13236   manlangs="en"
13237   echo "$ac_t""$manlangs" 1>&6
13238   
13239
13240 fi
13241
13242
13243 #################################################
13244 # should we build libsmbclient?
13245
13246 LIBSMBCLIENT_SHARED=
13247 LIBSMBCLIENT=
13248 echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
13249 echo "configure:13250: checking whether to build the libsmbclient shared library" >&5
13250 # Check whether --with-libsmbclient or --without-libsmbclient was given.
13251 if test "${with_libsmbclient+set}" = set; then
13252   withval="$with_libsmbclient"
13253    case "$withval" in
13254   no) 
13255      echo "$ac_t""no" 1>&6
13256      ;;
13257   *)
13258      if test $BLDSHARED = true; then
13259         LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
13260         LIBSMBCLIENT=libsmbclient
13261         echo "$ac_t""yes" 1>&6
13262      else
13263         echo "$ac_t""no shared library support" 1>&6
13264      fi
13265      ;;
13266   esac 
13267 else
13268   echo "$ac_t""yes" 1>&6
13269
13270 fi
13271
13272
13273
13274 #################################################
13275 # these tests are taken from the GNU fileutils package
13276 echo "checking how to get filesystem space usage" 1>&6
13277 echo "configure:13278: checking how to get filesystem space usage" >&5
13278 space=no
13279
13280 # Test for statvfs64.
13281 if test $space = no; then
13282   # SVR4
13283   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13284 echo "configure:13285: checking statvfs64 function (SVR4)" >&5
13285 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13286   echo $ac_n "(cached) $ac_c" 1>&6
13287 else
13288   if test "$cross_compiling" = yes; then
13289   fu_cv_sys_stat_statvfs64=cross
13290 else
13291   cat > conftest.$ac_ext <<EOF
13292 #line 13293 "configure"
13293 #include "confdefs.h"
13294
13295 #if defined(HAVE_UNISTD_H)
13296 #include <unistd.h>
13297 #endif
13298 #include <sys/types.h>
13299 #include <sys/statvfs.h>
13300   main ()
13301   {
13302     struct statvfs64 fsd;
13303     exit (statvfs64 (".", &fsd));
13304   }
13305 EOF
13306 if { (eval echo configure:13307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13307 then
13308   fu_cv_sys_stat_statvfs64=yes
13309 else
13310   echo "configure: failed program was:" >&5
13311   cat conftest.$ac_ext >&5
13312   rm -fr conftest*
13313   fu_cv_sys_stat_statvfs64=no
13314 fi
13315 rm -fr conftest*
13316 fi
13317
13318 fi
13319
13320 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13321   if test $fu_cv_sys_stat_statvfs64 = yes; then
13322     space=yes
13323     cat >> confdefs.h <<\EOF
13324 #define STAT_STATVFS64 1
13325 EOF
13326
13327   fi
13328 fi
13329
13330 # Perform only the link test since it seems there are no variants of the
13331 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13332 # because that got a false positive on SCO OSR5.  Adding the declaration
13333 # of a `struct statvfs' causes this test to fail (as it should) on such
13334 # systems.  That system is reported to work fine with STAT_STATFS4 which
13335 # is what it gets when this test fails.
13336 if test $space = no; then
13337   # SVR4
13338   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13339 echo "configure:13340: checking statvfs function (SVR4)" >&5
13340 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13341   echo $ac_n "(cached) $ac_c" 1>&6
13342 else
13343   cat > conftest.$ac_ext <<EOF
13344 #line 13345 "configure"
13345 #include "confdefs.h"
13346 #include <sys/types.h>
13347 #include <sys/statvfs.h>
13348 int main() {
13349 struct statvfs fsd; statvfs (0, &fsd);
13350 ; return 0; }
13351 EOF
13352 if { (eval echo configure:13353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13353   rm -rf conftest*
13354   fu_cv_sys_stat_statvfs=yes
13355 else
13356   echo "configure: failed program was:" >&5
13357   cat conftest.$ac_ext >&5
13358   rm -rf conftest*
13359   fu_cv_sys_stat_statvfs=no
13360 fi
13361 rm -f conftest*
13362 fi
13363
13364 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13365   if test $fu_cv_sys_stat_statvfs = yes; then
13366     space=yes
13367     cat >> confdefs.h <<\EOF
13368 #define STAT_STATVFS 1
13369 EOF
13370
13371   fi
13372 fi
13373
13374 if test $space = no; then
13375   # DEC Alpha running OSF/1
13376   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13377 echo "configure:13378: checking for 3-argument statfs function (DEC OSF/1)" >&5
13378   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13379   echo $ac_n "(cached) $ac_c" 1>&6
13380 else
13381   if test "$cross_compiling" = yes; then
13382   fu_cv_sys_stat_statfs3_osf1=no
13383 else
13384   cat > conftest.$ac_ext <<EOF
13385 #line 13386 "configure"
13386 #include "confdefs.h"
13387
13388 #include <sys/param.h>
13389 #include <sys/types.h>
13390 #include <sys/mount.h>
13391   main ()
13392   {
13393     struct statfs fsd;
13394     fsd.f_fsize = 0;
13395     exit (statfs (".", &fsd, sizeof (struct statfs)));
13396   }
13397 EOF
13398 if { (eval echo configure:13399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13399 then
13400   fu_cv_sys_stat_statfs3_osf1=yes
13401 else
13402   echo "configure: failed program was:" >&5
13403   cat conftest.$ac_ext >&5
13404   rm -fr conftest*
13405   fu_cv_sys_stat_statfs3_osf1=no
13406 fi
13407 rm -fr conftest*
13408 fi
13409
13410 fi
13411
13412   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13413   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13414     space=yes
13415     cat >> confdefs.h <<\EOF
13416 #define STAT_STATFS3_OSF1 1
13417 EOF
13418
13419   fi
13420 fi
13421
13422 if test $space = no; then
13423 # AIX
13424   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13425 echo "configure:13426: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13426   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13427   echo $ac_n "(cached) $ac_c" 1>&6
13428 else
13429   if test "$cross_compiling" = yes; then
13430   fu_cv_sys_stat_statfs2_bsize=no
13431 else
13432   cat > conftest.$ac_ext <<EOF
13433 #line 13434 "configure"
13434 #include "confdefs.h"
13435
13436 #ifdef HAVE_SYS_PARAM_H
13437 #include <sys/param.h>
13438 #endif
13439 #ifdef HAVE_SYS_MOUNT_H
13440 #include <sys/mount.h>
13441 #endif
13442 #ifdef HAVE_SYS_VFS_H
13443 #include <sys/vfs.h>
13444 #endif
13445   main ()
13446   {
13447   struct statfs fsd;
13448   fsd.f_bsize = 0;
13449   exit (statfs (".", &fsd));
13450   }
13451 EOF
13452 if { (eval echo configure:13453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13453 then
13454   fu_cv_sys_stat_statfs2_bsize=yes
13455 else
13456   echo "configure: failed program was:" >&5
13457   cat conftest.$ac_ext >&5
13458   rm -fr conftest*
13459   fu_cv_sys_stat_statfs2_bsize=no
13460 fi
13461 rm -fr conftest*
13462 fi
13463
13464 fi
13465
13466   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13467   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13468     space=yes
13469     cat >> confdefs.h <<\EOF
13470 #define STAT_STATFS2_BSIZE 1
13471 EOF
13472
13473   fi
13474 fi
13475
13476 if test $space = no; then
13477 # SVR3
13478   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13479 echo "configure:13480: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13480   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13481   echo $ac_n "(cached) $ac_c" 1>&6
13482 else
13483   if test "$cross_compiling" = yes; then
13484   fu_cv_sys_stat_statfs4=no
13485 else
13486   cat > conftest.$ac_ext <<EOF
13487 #line 13488 "configure"
13488 #include "confdefs.h"
13489 #include <sys/types.h>
13490 #include <sys/statfs.h>
13491   main ()
13492   {
13493   struct statfs fsd;
13494   exit (statfs (".", &fsd, sizeof fsd, 0));
13495   }
13496 EOF
13497 if { (eval echo configure:13498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13498 then
13499   fu_cv_sys_stat_statfs4=yes
13500 else
13501   echo "configure: failed program was:" >&5
13502   cat conftest.$ac_ext >&5
13503   rm -fr conftest*
13504   fu_cv_sys_stat_statfs4=no
13505 fi
13506 rm -fr conftest*
13507 fi
13508
13509 fi
13510
13511   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13512   if test $fu_cv_sys_stat_statfs4 = yes; then
13513     space=yes
13514     cat >> confdefs.h <<\EOF
13515 #define STAT_STATFS4 1
13516 EOF
13517
13518   fi
13519 fi
13520
13521 if test $space = no; then
13522 # 4.4BSD and NetBSD
13523   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13524 echo "configure:13525: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13525   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13526   echo $ac_n "(cached) $ac_c" 1>&6
13527 else
13528   if test "$cross_compiling" = yes; then
13529   fu_cv_sys_stat_statfs2_fsize=no
13530 else
13531   cat > conftest.$ac_ext <<EOF
13532 #line 13533 "configure"
13533 #include "confdefs.h"
13534 #include <sys/types.h>
13535 #ifdef HAVE_SYS_PARAM_H
13536 #include <sys/param.h>
13537 #endif
13538 #ifdef HAVE_SYS_MOUNT_H
13539 #include <sys/mount.h>
13540 #endif
13541   main ()
13542   {
13543   struct statfs fsd;
13544   fsd.f_fsize = 0;
13545   exit (statfs (".", &fsd));
13546   }
13547 EOF
13548 if { (eval echo configure:13549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13549 then
13550   fu_cv_sys_stat_statfs2_fsize=yes
13551 else
13552   echo "configure: failed program was:" >&5
13553   cat conftest.$ac_ext >&5
13554   rm -fr conftest*
13555   fu_cv_sys_stat_statfs2_fsize=no
13556 fi
13557 rm -fr conftest*
13558 fi
13559
13560 fi
13561
13562   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13563   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13564     space=yes
13565     cat >> confdefs.h <<\EOF
13566 #define STAT_STATFS2_FSIZE 1
13567 EOF
13568
13569   fi
13570 fi
13571
13572 if test $space = no; then
13573   # Ultrix
13574   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13575 echo "configure:13576: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13576   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13577   echo $ac_n "(cached) $ac_c" 1>&6
13578 else
13579   if test "$cross_compiling" = yes; then
13580   fu_cv_sys_stat_fs_data=no
13581 else
13582   cat > conftest.$ac_ext <<EOF
13583 #line 13584 "configure"
13584 #include "confdefs.h"
13585 #include <sys/types.h>
13586 #ifdef HAVE_SYS_PARAM_H
13587 #include <sys/param.h>
13588 #endif
13589 #ifdef HAVE_SYS_MOUNT_H
13590 #include <sys/mount.h>
13591 #endif
13592 #ifdef HAVE_SYS_FS_TYPES_H
13593 #include <sys/fs_types.h>
13594 #endif
13595   main ()
13596   {
13597   struct fs_data fsd;
13598   /* Ultrix's statfs returns 1 for success,
13599      0 for not mounted, -1 for failure.  */
13600   exit (statfs (".", &fsd) != 1);
13601   }
13602 EOF
13603 if { (eval echo configure:13604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13604 then
13605   fu_cv_sys_stat_fs_data=yes
13606 else
13607   echo "configure: failed program was:" >&5
13608   cat conftest.$ac_ext >&5
13609   rm -fr conftest*
13610   fu_cv_sys_stat_fs_data=no
13611 fi
13612 rm -fr conftest*
13613 fi
13614
13615 fi
13616
13617   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13618   if test $fu_cv_sys_stat_fs_data = yes; then
13619     space=yes
13620     cat >> confdefs.h <<\EOF
13621 #define STAT_STATFS2_FS_DATA 1
13622 EOF
13623
13624   fi
13625 fi
13626
13627 #
13628 # As a gating factor for large file support, in order to
13629 # use <4GB files we must have the following minimal support
13630 # available.
13631 # long long, and a 64 bit off_t or off64_t.
13632 # If we don't have all of these then disable large
13633 # file support.
13634 #
13635 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13636 echo "configure:13637: checking if large file support can be enabled" >&5
13637 cat > conftest.$ac_ext <<EOF
13638 #line 13639 "configure"
13639 #include "confdefs.h"
13640
13641 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13642 #include <sys/types.h>
13643 #else
13644 __COMPILE_ERROR_
13645 #endif
13646
13647 int main() {
13648 int i
13649 ; return 0; }
13650 EOF
13651 if { (eval echo configure:13652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13652   rm -rf conftest*
13653   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13654 else
13655   echo "configure: failed program was:" >&5
13656   cat conftest.$ac_ext >&5
13657   rm -rf conftest*
13658   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13659 fi
13660 rm -f conftest*
13661 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13662     cat >> confdefs.h <<\EOF
13663 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13664 EOF
13665
13666 fi
13667 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13668
13669 # Check whether --with-spinlocks or --without-spinlocks was given.
13670 if test "${with_spinlocks+set}" = set; then
13671   withval="$with_spinlocks"
13672   :
13673 fi
13674
13675 if test "x$with_spinlocks" = "xyes"; then
13676     cat >> confdefs.h <<\EOF
13677 #define USE_SPINLOCKS 1
13678 EOF
13679
13680
13681     case "$host_cpu" in
13682         sparc)
13683             cat >> confdefs.h <<\EOF
13684 #define SPARC_SPINLOCKS 1
13685 EOF
13686
13687             ;;
13688
13689         i386|i486|i586|i686)
13690             cat >> confdefs.h <<\EOF
13691 #define INTEL_SPINLOCKS 1
13692 EOF
13693
13694             ;;
13695
13696         mips)
13697             cat >> confdefs.h <<\EOF
13698 #define MIPS_SPINLOCKS 1
13699 EOF
13700
13701             ;;
13702
13703         powerpc)
13704             cat >> confdefs.h <<\EOF
13705 #define POWERPC_SPINLOCKS 1
13706 EOF
13707
13708             ;;
13709     esac
13710 fi
13711
13712 #################################################
13713 # check for ACL support
13714
13715 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13716 echo "configure:13717: checking whether to support ACLs" >&5
13717 # Check whether --with-acl-support or --without-acl-support was given.
13718 if test "${with_acl_support+set}" = set; then
13719   withval="$with_acl_support"
13720    case "$withval" in
13721   yes)
13722
13723         case "$host_os" in
13724         *sysv5*)
13725                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13726                 cat >> confdefs.h <<\EOF
13727 #define HAVE_UNIXWARE_ACLS 1
13728 EOF
13729
13730                 ;;
13731         *solaris*)
13732                 echo "$ac_t""Using solaris ACLs" 1>&6
13733                 cat >> confdefs.h <<\EOF
13734 #define HAVE_SOLARIS_ACLS 1
13735 EOF
13736
13737                 ;;
13738         *hpux*)
13739                 echo "$ac_t""Using HPUX ACLs" 1>&6
13740                 cat >> confdefs.h <<\EOF
13741 #define HAVE_HPUX_ACLS 1
13742 EOF
13743
13744                 ;;
13745         *irix*)
13746                 echo "$ac_t""Using IRIX ACLs" 1>&6
13747                 cat >> confdefs.h <<\EOF
13748 #define HAVE_IRIX_ACLS 1
13749 EOF
13750
13751                 ;;
13752         *aix*)
13753                 echo "$ac_t""Using AIX ACLs" 1>&6
13754                 cat >> confdefs.h <<\EOF
13755 #define HAVE_AIX_ACLS 1
13756 EOF
13757
13758                 ;;
13759         *osf*)
13760                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13761                 cat >> confdefs.h <<\EOF
13762 #define HAVE_TRU64_ACLS 1
13763 EOF
13764
13765                 LIBS="$LIBS -lpacl"
13766                 ;;
13767         *)
13768                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13769 echo "configure:13770: checking for acl_get_file in -lacl" >&5
13770 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13771 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13772   echo $ac_n "(cached) $ac_c" 1>&6
13773 else
13774   ac_save_LIBS="$LIBS"
13775 LIBS="-lacl  $LIBS"
13776 cat > conftest.$ac_ext <<EOF
13777 #line 13778 "configure"
13778 #include "confdefs.h"
13779 /* Override any gcc2 internal prototype to avoid an error.  */
13780 /* We use char because int might match the return type of a gcc2
13781     builtin and then its argument prototype would still apply.  */
13782 char acl_get_file();
13783
13784 int main() {
13785 acl_get_file()
13786 ; return 0; }
13787 EOF
13788 if { (eval echo configure:13789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13789   rm -rf conftest*
13790   eval "ac_cv_lib_$ac_lib_var=yes"
13791 else
13792   echo "configure: failed program was:" >&5
13793   cat conftest.$ac_ext >&5
13794   rm -rf conftest*
13795   eval "ac_cv_lib_$ac_lib_var=no"
13796 fi
13797 rm -f conftest*
13798 LIBS="$ac_save_LIBS"
13799
13800 fi
13801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13802   echo "$ac_t""yes" 1>&6
13803     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13804     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13805   cat >> confdefs.h <<EOF
13806 #define $ac_tr_lib 1
13807 EOF
13808
13809   LIBS="-lacl $LIBS"
13810
13811 else
13812   echo "$ac_t""no" 1>&6
13813 fi
13814
13815                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13816 echo "configure:13817: checking for ACL support" >&5
13817 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13818   echo $ac_n "(cached) $ac_c" 1>&6
13819 else
13820   
13821                 cat > conftest.$ac_ext <<EOF
13822 #line 13823 "configure"
13823 #include "confdefs.h"
13824 #include <sys/types.h>
13825 #include <sys/acl.h>
13826 int main() {
13827  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13828 ; return 0; }
13829 EOF
13830 if { (eval echo configure:13831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13831   rm -rf conftest*
13832   samba_cv_HAVE_POSIX_ACLS=yes
13833 else
13834   echo "configure: failed program was:" >&5
13835   cat conftest.$ac_ext >&5
13836   rm -rf conftest*
13837   samba_cv_HAVE_POSIX_ACLS=no
13838 fi
13839 rm -f conftest*
13840 fi
13841
13842 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13843                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13844                                 echo "$ac_t""Using posix ACLs" 1>&6
13845                                 cat >> confdefs.h <<\EOF
13846 #define HAVE_POSIX_ACLS 1
13847 EOF
13848
13849                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13850 echo "configure:13851: checking for acl_get_perm_np" >&5
13851 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13852   echo $ac_n "(cached) $ac_c" 1>&6
13853 else
13854   
13855                                 cat > conftest.$ac_ext <<EOF
13856 #line 13857 "configure"
13857 #include "confdefs.h"
13858 #include <sys/types.h>
13859 #include <sys/acl.h>
13860 int main() {
13861  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13862 ; return 0; }
13863 EOF
13864 if { (eval echo configure:13865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13865   rm -rf conftest*
13866   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13867 else
13868   echo "configure: failed program was:" >&5
13869   cat conftest.$ac_ext >&5
13870   rm -rf conftest*
13871   samba_cv_HAVE_ACL_GET_PERM_NP=no
13872 fi
13873 rm -f conftest*
13874 fi
13875
13876 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13877                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13878                                         cat >> confdefs.h <<\EOF
13879 #define HAVE_ACL_GET_PERM_NP 1
13880 EOF
13881
13882                                 fi
13883                         fi
13884             ;;
13885         esac
13886         ;;
13887   *)
13888     echo "$ac_t""no" 1>&6
13889     cat >> confdefs.h <<\EOF
13890 #define HAVE_NO_ACLS 1
13891 EOF
13892
13893     ;;
13894   esac 
13895 else
13896   cat >> confdefs.h <<\EOF
13897 #define HAVE_NO_ACLS 1
13898 EOF
13899
13900   echo "$ac_t""no" 1>&6
13901
13902 fi
13903
13904
13905 #################################################
13906 # check for sendfile support
13907
13908 echo $ac_n "checking whether to check for support sendfile""... $ac_c" 1>&6
13909 echo "configure:13910: checking whether to check for support sendfile" >&5
13910 # Check whether --with-sendfile-support or --without-sendfile-support was given.
13911 if test "${with_sendfile_support+set}" = set; then
13912   withval="$with_sendfile_support"
13913    case "$withval" in
13914   yes)
13915
13916         echo "$ac_t""yes" 1>&6;
13917
13918         case "$host_os" in
13919         *linux*)
13920                 echo $ac_n "checking for linux sendfile64 support""... $ac_c" 1>&6
13921 echo "configure:13922: checking for linux sendfile64 support" >&5
13922 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then
13923   echo $ac_n "(cached) $ac_c" 1>&6
13924 else
13925   
13926                 cat > conftest.$ac_ext <<EOF
13927 #line 13928 "configure"
13928 #include "confdefs.h"
13929 #include <sys/sendfile.h>
13930 int main() {
13931 \
13932 int tofd, fromfd;
13933 off64_t offset;
13934 size_t total;
13935 ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total);
13936
13937 ; return 0; }
13938 EOF
13939 if { (eval echo configure:13940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13940   rm -rf conftest*
13941   samba_cv_HAVE_SENDFILE64=yes
13942 else
13943   echo "configure: failed program was:" >&5
13944   cat conftest.$ac_ext >&5
13945   rm -rf conftest*
13946   samba_cv_HAVE_SENDFILE64=no
13947 fi
13948 rm -f conftest*
13949 fi
13950
13951 echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6
13952
13953                 echo $ac_n "checking for linux sendfile support""... $ac_c" 1>&6
13954 echo "configure:13955: checking for linux sendfile support" >&5
13955 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
13956   echo $ac_n "(cached) $ac_c" 1>&6
13957 else
13958   
13959                 cat > conftest.$ac_ext <<EOF
13960 #line 13961 "configure"
13961 #include "confdefs.h"
13962 #include <sys/sendfile.h>
13963 int main() {
13964 \
13965 int tofd, fromfd;
13966 off_t offset;
13967 size_t total;
13968 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
13969
13970 ; return 0; }
13971 EOF
13972 if { (eval echo configure:13973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13973   rm -rf conftest*
13974   samba_cv_HAVE_SENDFILE=yes
13975 else
13976   echo "configure: failed program was:" >&5
13977   cat conftest.$ac_ext >&5
13978   rm -rf conftest*
13979   samba_cv_HAVE_SENDFILE=no
13980 fi
13981 rm -f conftest*
13982 fi
13983
13984 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
13985
13986 # Try and cope with broken Linux sendfile....
13987                 echo $ac_n "checking for broken linux sendfile support""... $ac_c" 1>&6
13988 echo "configure:13989: checking for broken linux sendfile support" >&5
13989 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_LINUX_SENDFILE'+set}'`\" = set"; then
13990   echo $ac_n "(cached) $ac_c" 1>&6
13991 else
13992   
13993                 cat > conftest.$ac_ext <<EOF
13994 #line 13995 "configure"
13995 #include "confdefs.h"
13996 \
13997 #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
13998 #undef _FILE_OFFSET_BITS
13999 #endif
14000 #include <sys/sendfile.h>
14001 int main() {
14002 \
14003 int tofd, fromfd;
14004 off_t offset;
14005 size_t total;
14006 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
14007
14008 ; return 0; }
14009 EOF
14010 if { (eval echo configure:14011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14011   rm -rf conftest*
14012   samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes
14013 else
14014   echo "configure: failed program was:" >&5
14015   cat conftest.$ac_ext >&5
14016   rm -rf conftest*
14017   samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no
14018 fi
14019 rm -f conftest*
14020 fi
14021
14022 echo "$ac_t""$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" 1>&6
14023
14024         if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
14025                 cat >> confdefs.h <<\EOF
14026 #define HAVE_SENDFILE64 1
14027 EOF
14028
14029                 cat >> confdefs.h <<\EOF
14030 #define LINUX_SENDFILE_API 1
14031 EOF
14032
14033                 cat >> confdefs.h <<\EOF
14034 #define WITH_SENDFILE 1
14035 EOF
14036
14037         elif test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
14038                 cat >> confdefs.h <<\EOF
14039 #define HAVE_SENDFILE 1
14040 EOF
14041
14042                 cat >> confdefs.h <<\EOF
14043 #define LINUX_SENDFILE_API 1
14044 EOF
14045
14046                 cat >> confdefs.h <<\EOF
14047 #define WITH_SENDFILE 1
14048 EOF
14049
14050         elif test x"$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then
14051                 cat >> confdefs.h <<\EOF
14052 #define LINUX_BROKEN_SENDFILE_API 1
14053 EOF
14054
14055                 cat >> confdefs.h <<\EOF
14056 #define WITH_SENDFILE 1
14057 EOF
14058
14059         else
14060                 echo "$ac_t""no" 1>&6;
14061         fi
14062
14063         ;;
14064         *freebsd*)
14065                 echo $ac_n "checking for freebsd sendfile support""... $ac_c" 1>&6
14066 echo "configure:14067: checking for freebsd sendfile support" >&5
14067 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
14068   echo $ac_n "(cached) $ac_c" 1>&6
14069 else
14070   
14071                 cat > conftest.$ac_ext <<EOF
14072 #line 14073 "configure"
14073 #include "confdefs.h"
14074 \
14075 #include <sys/types.h>
14076 #include <sys/socket.h>
14077 #include <sys/uio.h>
14078 int main() {
14079 \
14080         int fromfd, tofd;
14081         off_t offset, nwritten;
14082         struct sf_hdtr hdr;
14083         struct iovec hdtrl;
14084         hdr->headers = &hdtrl;
14085         hdr->hdr_cnt = 1;
14086         hdr->trailers = NULL;
14087         hdr->trl_cnt = 0;
14088         hdtrl.iov_base = NULL;
14089         hdtrl.iov_len = 0;
14090         int ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
14091
14092 ; return 0; }
14093 EOF
14094 if { (eval echo configure:14095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14095   rm -rf conftest*
14096   samba_cv_HAVE_SENDFILE=yes
14097 else
14098   echo "configure: failed program was:" >&5
14099   cat conftest.$ac_ext >&5
14100   rm -rf conftest*
14101   samba_cv_HAVE_SENDFILE=no
14102 fi
14103 rm -f conftest*
14104 fi
14105
14106 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
14107
14108         if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
14109                 cat >> confdefs.h <<\EOF
14110 #define HAVE_SENDFILE 1
14111 EOF
14112
14113                 cat >> confdefs.h <<\EOF
14114 #define FREEBSD_SENDFILE_API 1
14115 EOF
14116
14117                 cat >> confdefs.h <<\EOF
14118 #define WITH_SENDFILE 1
14119 EOF
14120
14121         else
14122                 echo "$ac_t""no" 1>&6;
14123         fi
14124         ;;
14125
14126         *hpux*)
14127                 echo $ac_n "checking for hpux sendfile64 support""... $ac_c" 1>&6
14128 echo "configure:14129: checking for hpux sendfile64 support" >&5
14129 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then
14130   echo $ac_n "(cached) $ac_c" 1>&6
14131 else
14132   
14133                 cat > conftest.$ac_ext <<EOF
14134 #line 14135 "configure"
14135 #include "confdefs.h"
14136 \
14137 #include <sys/socket.h>
14138 #include <sys/uio.h>
14139 int main() {
14140 \
14141         int fromfd, tofd;
14142         size_t total=0;
14143         struct iovec hdtrl[2];
14144         ssize_t nwritten;
14145         off64_t offset;
14146
14147         hdtrl[0].iov_base = 0;
14148         hdtrl[0].iov_len = 0;
14149
14150         nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0);
14151
14152 ; return 0; }
14153 EOF
14154 if { (eval echo configure:14155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14155   rm -rf conftest*
14156   samba_cv_HAVE_SENDFILE64=yes
14157 else
14158   echo "configure: failed program was:" >&5
14159   cat conftest.$ac_ext >&5
14160   rm -rf conftest*
14161   samba_cv_HAVE_SENDFILE64=no
14162 fi
14163 rm -f conftest*
14164 fi
14165
14166 echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6
14167         if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then
14168                 cat >> confdefs.h <<\EOF
14169 #define HAVE_SENDFILE64 1
14170 EOF
14171
14172                 cat >> confdefs.h <<\EOF
14173 #define HPUX_SENDFILE_API 1
14174 EOF
14175
14176                 cat >> confdefs.h <<\EOF
14177 #define WITH_SENDFILE 1
14178 EOF
14179
14180         else
14181                 echo "$ac_t""no" 1>&6;
14182         fi
14183
14184                 echo $ac_n "checking for hpux sendfile support""... $ac_c" 1>&6
14185 echo "configure:14186: checking for hpux sendfile support" >&5
14186 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then
14187   echo $ac_n "(cached) $ac_c" 1>&6
14188 else
14189   
14190                 cat > conftest.$ac_ext <<EOF
14191 #line 14192 "configure"
14192 #include "confdefs.h"
14193 \
14194 #include <sys/socket.h>
14195 #include <sys/uio.h>
14196 int main() {
14197 \
14198         int fromfd, tofd;
14199         size_t total=0;
14200         struct iovec hdtrl[2];
14201         ssize_t nwritten;
14202         off_t offset;
14203
14204         hdtrl[0].iov_base = 0;
14205         hdtrl[0].iov_len = 0;
14206
14207         nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0);
14208
14209 ; return 0; }
14210 EOF
14211 if { (eval echo configure:14212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14212   rm -rf conftest*
14213   samba_cv_HAVE_SENDFILE=yes
14214 else
14215   echo "configure: failed program was:" >&5
14216   cat conftest.$ac_ext >&5
14217   rm -rf conftest*
14218   samba_cv_HAVE_SENDFILE=no
14219 fi
14220 rm -f conftest*
14221 fi
14222
14223 echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6
14224         if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then
14225                 cat >> confdefs.h <<\EOF
14226 #define HAVE_SENDFILE 1
14227 EOF
14228
14229                 cat >> confdefs.h <<\EOF
14230 #define HPUX_SENDFILE_API 1
14231 EOF
14232
14233                 cat >> confdefs.h <<\EOF
14234 #define WITH_SENDFILE 1
14235 EOF
14236
14237         else
14238                 echo "$ac_t""no" 1>&6;
14239         fi
14240         ;;
14241
14242         *solaris*)
14243                 LIBS="$LIBS -lsendfile"
14244                 echo $ac_n "checking for solaris sendfilev64 support""... $ac_c" 1>&6
14245 echo "configure:14246: checking for solaris sendfilev64 support" >&5
14246 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV64'+set}'`\" = set"; then
14247   echo $ac_n "(cached) $ac_c" 1>&6
14248 else
14249   
14250                 cat > conftest.$ac_ext <<EOF
14251 #line 14252 "configure"
14252 #include "confdefs.h"
14253 \
14254 #include <sys/sendfile.h>
14255 int main() {
14256 \
14257         int sfvcnt;
14258         size_t xferred;
14259         struct sendfilevec vec[2];
14260         ssize_t nwritten;
14261         int tofd;
14262
14263         sfvcnt = 2;
14264
14265         vec[0].sfv_fd = SFV_FD_SELF;
14266         vec[0].sfv_flag = 0;
14267         vec[0].sfv_off = 0;
14268         vec[0].sfv_len = 0;
14269
14270         vec[1].sfv_fd = 0;
14271         vec[1].sfv_flag = 0;
14272         vec[1].sfv_off = 0;
14273         vec[1].sfv_len = 0;
14274         nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred);
14275
14276 ; return 0; }
14277 EOF
14278 if { (eval echo configure:14279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14279   rm -rf conftest*
14280   samba_cv_HAVE_SENDFILEV64=yes
14281 else
14282   echo "configure: failed program was:" >&5
14283   cat conftest.$ac_ext >&5
14284   rm -rf conftest*
14285   samba_cv_HAVE_SENDFILEV64=no
14286 fi
14287 rm -f conftest*
14288 fi
14289
14290 echo "$ac_t""$samba_cv_HAVE_SENDFILEV64" 1>&6
14291
14292         if test x"$samba_cv_HAVE_SENDFILEV64" = x"yes"; then
14293                 cat >> confdefs.h <<\EOF
14294 #define HAVE_SENDFILEV64 1
14295 EOF
14296
14297                 cat >> confdefs.h <<\EOF
14298 #define SOLARIS_SENDFILE_API 1
14299 EOF
14300
14301                 cat >> confdefs.h <<\EOF
14302 #define WITH_SENDFILE 1
14303 EOF
14304
14305         else
14306                 echo "$ac_t""no" 1>&6;
14307         fi
14308
14309                 echo $ac_n "checking for solaris sendfilev support""... $ac_c" 1>&6
14310 echo "configure:14311: checking for solaris sendfilev support" >&5
14311 if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV'+set}'`\" = set"; then
14312   echo $ac_n "(cached) $ac_c" 1>&6
14313 else
14314   
14315                 cat > conftest.$ac_ext <<EOF
14316 #line 14317 "configure"
14317 #include "confdefs.h"
14318 \
14319 #include <sys/sendfile.h>
14320 int main() {
14321 \
14322         int sfvcnt;
14323         size_t xferred;
14324         struct sendfilevec vec[2];
14325         ssize_t nwritten;
14326         int tofd;
14327
14328         sfvcnt = 2;
14329
14330         vec[0].sfv_fd = SFV_FD_SELF;
14331         vec[0].sfv_flag = 0;
14332         vec[0].sfv_off = 0;
14333         vec[0].sfv_len = 0;
14334
14335         vec[1].sfv_fd = 0;
14336         vec[1].sfv_flag = 0;
14337         vec[1].sfv_off = 0;
14338         vec[1].sfv_len = 0;
14339         nwritten = sendfilev(tofd, vec, sfvcnt, &xferred);
14340
14341 ; return 0; }
14342 EOF
14343 if { (eval echo configure:14344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14344   rm -rf conftest*
14345   samba_cv_HAVE_SENDFILEV=yes
14346 else
14347   echo "configure: failed program was:" >&5
14348   cat conftest.$ac_ext >&5
14349   rm -rf conftest*
14350   samba_cv_HAVE_SENDFILEV=no
14351 fi
14352 rm -f conftest*
14353 fi
14354
14355 echo "$ac_t""$samba_cv_HAVE_SENDFILEV" 1>&6
14356
14357         if test x"$samba_cv_HAVE_SENDFILEV" = x"yes"; then
14358                 cat >> confdefs.h <<\EOF
14359 #define HAVE_SENDFILEV 1
14360 EOF
14361
14362                 cat >> confdefs.h <<\EOF
14363 #define SOLARIS_SENDFILE_API 1
14364 EOF
14365
14366                 cat >> confdefs.h <<\EOF
14367 #define WITH_SENDFILE 1
14368 EOF
14369
14370         else
14371                 echo "$ac_t""no" 1>&6;
14372         fi
14373         ;;
14374
14375         *)
14376         ;;
14377         esac
14378         ;;
14379   *)
14380     echo "$ac_t""no" 1>&6
14381     ;;
14382   esac 
14383 else
14384   echo "$ac_t""no" 1>&6
14385
14386 fi
14387
14388
14389
14390 #################################################
14391 # Check whether winbind is supported on this platform.  If so we need to
14392 # build and install client programs (WINBIND_TARGETS), sbin programs
14393 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
14394
14395 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
14396 echo "configure:14397: checking whether to build winbind" >&5
14397
14398 # Initially, the value of $host_os decides whether winbind is supported
14399
14400 case "$host_os" in
14401         *linux*|*irix*)
14402                 HAVE_WINBIND=yes
14403                 ;;
14404         *solaris*)
14405                 HAVE_WINBIND=yes
14406                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
14407                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
14408                 ;;
14409         *hpux11*)
14410                 HAVE_WINBIND=yes
14411                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
14412                 ;;
14413         *)
14414                 HAVE_WINBIND=no
14415                 winbind_no_reason=", unsupported on $host_os"
14416                 ;;
14417 esac
14418
14419 # Check the setting of --with-winbindd
14420
14421 # Check whether --with-winbind or --without-winbind was given.
14422 if test "${with_winbind+set}" = set; then
14423   withval="$with_winbind"
14424    
14425   case "$withval" in
14426         yes)
14427                 HAVE_WINBIND=yes
14428                 ;;
14429         no)
14430                 HAVE_WINBIND=no
14431                 winbind_reason=""
14432                 ;;
14433   esac 
14434 fi
14435
14436
14437 # We need unix domain sockets for winbind
14438
14439 if test x"$HAVE_WINBIND" = x"yes"; then
14440         if test x"$samba_cv_unixsocket" = x"no"; then
14441                 winbind_no_reason=", no unix domain socket support on $host_os"
14442                 HAVE_WINBIND=no
14443         fi
14444 fi
14445
14446 # Display test results
14447
14448 WINBIND_TARGETS=""
14449 WINBIND_STARGETS=""
14450 WINBIND_LTARGETS=""
14451 WINBIND_PAM_PROGS=""
14452
14453 if test x"$HAVE_WINBIND" = x"yes"; then
14454         echo "$ac_t""yes" 1>&6
14455         cat >> confdefs.h <<\EOF
14456 #define WITH_WINBIND 1
14457 EOF
14458
14459
14460         WINBIND_TARGETS="bin/wbinfo"
14461         WINBIND_STARGETS="bin/winbindd"
14462         if test x"$BLDSHARED" = x"true"; then
14463                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
14464                 if test x"$with_pam" = x"yes"; then
14465                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
14466                 fi
14467         fi
14468 else
14469         echo "$ac_t""no$winbind_no_reason" 1>&6
14470 fi
14471
14472
14473 # Substitution time!
14474
14475
14476
14477
14478
14479
14480
14481
14482 # Solaris has some extra fields in struct passwd that need to be
14483 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
14484 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
14485 # this. 
14486
14487 #AC_CHECK_MEMBER(struct passwd.pw_comment,
14488 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
14489 #               [#include <pwd.h>])
14490
14491 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
14492 echo "configure:14493: checking whether struct passwd has pw_comment" >&5
14493 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
14494   echo $ac_n "(cached) $ac_c" 1>&6
14495 else
14496   
14497     cat > conftest.$ac_ext <<EOF
14498 #line 14499 "configure"
14499 #include "confdefs.h"
14500 #include <pwd.h>
14501 int main() {
14502 struct passwd p; p.pw_comment;
14503 ; return 0; }
14504 EOF
14505 if { (eval echo configure:14506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14506   rm -rf conftest*
14507   samba_cv_passwd_pw_comment=yes
14508 else
14509   echo "configure: failed program was:" >&5
14510   cat conftest.$ac_ext >&5
14511   rm -rf conftest*
14512   samba_cv_passwd_pw_comment=no
14513 fi
14514 rm -f conftest*
14515 fi
14516
14517 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
14518 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
14519    cat >> confdefs.h <<\EOF
14520 #define HAVE_PASSWD_PW_COMMENT 1
14521 EOF
14522
14523 fi
14524
14525 #AC_CHECK_MEMBER(struct passwd.pw_age,
14526 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
14527 #               [#include <pwd.h>])
14528
14529 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
14530 echo "configure:14531: checking whether struct passwd has pw_age" >&5
14531 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
14532   echo $ac_n "(cached) $ac_c" 1>&6
14533 else
14534   
14535     cat > conftest.$ac_ext <<EOF
14536 #line 14537 "configure"
14537 #include "confdefs.h"
14538 #include <pwd.h>
14539 int main() {
14540 struct passwd p; p.pw_age;
14541 ; return 0; }
14542 EOF
14543 if { (eval echo configure:14544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14544   rm -rf conftest*
14545   samba_cv_passwd_pw_age=yes
14546 else
14547   echo "configure: failed program was:" >&5
14548   cat conftest.$ac_ext >&5
14549   rm -rf conftest*
14550   samba_cv_passwd_pw_age=no
14551 fi
14552 rm -f conftest*
14553 fi
14554
14555 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
14556 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
14557    cat >> confdefs.h <<\EOF
14558 #define HAVE_PASSWD_PW_AGE 1
14559 EOF
14560
14561 fi
14562
14563 #################################################
14564 # Check to see if we should use the included popt 
14565
14566 # Check whether --with-included-popt or --without-included-popt was given.
14567 if test "${with_included_popt+set}" = set; then
14568   withval="$with_included_popt"
14569    
14570   case "$withval" in
14571         yes)
14572                 INCLUDED_POPT=yes
14573                 ;;
14574         no)
14575                 INCLUDED_POPT=no
14576                 ;;
14577   esac 
14578 fi
14579
14580 if test x"$INCLUDED_POPT" != x"yes"; then
14581     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
14582 echo "configure:14583: checking for poptGetContext in -lpopt" >&5
14583 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
14584 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
14585   echo $ac_n "(cached) $ac_c" 1>&6
14586 else
14587   ac_save_LIBS="$LIBS"
14588 LIBS="-lpopt  $LIBS"
14589 cat > conftest.$ac_ext <<EOF
14590 #line 14591 "configure"
14591 #include "confdefs.h"
14592 /* Override any gcc2 internal prototype to avoid an error.  */
14593 /* We use char because int might match the return type of a gcc2
14594     builtin and then its argument prototype would still apply.  */
14595 char poptGetContext();
14596
14597 int main() {
14598 poptGetContext()
14599 ; return 0; }
14600 EOF
14601 if { (eval echo configure:14602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14602   rm -rf conftest*
14603   eval "ac_cv_lib_$ac_lib_var=yes"
14604 else
14605   echo "configure: failed program was:" >&5
14606   cat conftest.$ac_ext >&5
14607   rm -rf conftest*
14608   eval "ac_cv_lib_$ac_lib_var=no"
14609 fi
14610 rm -f conftest*
14611 LIBS="$ac_save_LIBS"
14612
14613 fi
14614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14615   echo "$ac_t""yes" 1>&6
14616   INCLUDED_POPT=no
14617 else
14618   echo "$ac_t""no" 1>&6
14619 INCLUDED_POPT=yes
14620 fi
14621
14622 fi
14623
14624 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
14625 echo "configure:14626: checking whether to use included popt" >&5
14626 if test x"$INCLUDED_POPT" = x"yes"; then
14627     echo "$ac_t""yes" 1>&6
14628     BUILD_POPT='$(POPT_OBJS)'
14629     FLAGS1="-I$srcdir/popt"
14630 else
14631     echo "$ac_t""no" 1>&6
14632     LIBS="$LIBS -lpopt"
14633 fi
14634
14635
14636
14637 #################################################
14638 # Check if the user wants Python
14639
14640 # At the moment, you can use this to set which Python binary to link
14641 # against.  (Libraries built for Python2.2 can't be used by 2.1,
14642 # though they can coexist in different directories.)  In the future
14643 # this might make the Python stuff be built by default.
14644
14645 # Check whether --with-python or --without-python was given.
14646 if test "${with_python+set}" = set; then
14647   withval="$with_python"
14648    case "${withval-python}" in
14649   yes)
14650         PYTHON=python
14651         ;;
14652   *)
14653         PYTHON=${withval-python}
14654         ;;
14655   esac 
14656 fi
14657
14658
14659
14660 #################################################
14661 # do extra things if we are running insure
14662
14663 if test "${ac_cv_prog_CC}" = "insure"; then
14664         CPPFLAGS="$CPPFLAGS -D__INSURE__"
14665 fi
14666
14667 #################################################
14668 # final configure stuff
14669
14670 echo $ac_n "checking configure summary""... $ac_c" 1>&6
14671 echo "configure:14672: checking configure summary" >&5
14672 if test "$cross_compiling" = yes; then
14673   echo "configure: warning: cannot run when cross-compiling" 1>&2
14674 else
14675   cat > conftest.$ac_ext <<EOF
14676 #line 14677 "configure"
14677 #include "confdefs.h"
14678 #include "${srcdir-.}/tests/summary.c"
14679 EOF
14680 if { (eval echo configure:14681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14681 then
14682   echo "$ac_t""yes" 1>&6
14683 else
14684   echo "configure: failed program was:" >&5
14685   cat conftest.$ac_ext >&5
14686   rm -fr conftest*
14687   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
14688 fi
14689 rm -fr conftest*
14690 fi
14691
14692
14693 builddir=`pwd`
14694
14695
14696 # I added make files that are outside /source directory.
14697 # I know this is not a good solution, will work out a better
14698 # solution soon.                        --simo
14699 trap '' 1 2 15
14700 cat > confcache <<\EOF
14701 # This file is a shell script that caches the results of configure
14702 # tests run on this system so they can be shared between configure
14703 # scripts and configure runs.  It is not useful on other systems.
14704 # If it contains results you don't want to keep, you may remove or edit it.
14705 #
14706 # By default, configure uses ./config.cache as the cache file,
14707 # creating it if it does not exist already.  You can give configure
14708 # the --cache-file=FILE option to use a different cache file; that is
14709 # what configure does when it calls configure scripts in
14710 # subdirectories, so they share the cache.
14711 # Giving --cache-file=/dev/null disables caching, for debugging configure.
14712 # config.status only pays attention to the cache file if you give it the
14713 # --recheck option to rerun configure.
14714 #
14715 EOF
14716 # The following way of writing the cache mishandles newlines in values,
14717 # but we know of no workaround that is simple, portable, and efficient.
14718 # So, don't put newlines in cache variables' values.
14719 # Ultrix sh set writes to stderr and can't be redirected directly,
14720 # and sets the high bit in the cache file unless we assign to the vars.
14721 (set) 2>&1 |
14722   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14723   *ac_space=\ *)
14724     # `set' does not quote correctly, so add quotes (double-quote substitution
14725     # turns \\\\ into \\, and sed turns \\ into \).
14726     sed -n \
14727       -e "s/'/'\\\\''/g" \
14728       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14729     ;;
14730   *)
14731     # `set' quotes correctly as required by POSIX, so do not add quotes.
14732     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14733     ;;
14734   esac >> confcache
14735 if cmp -s $cache_file confcache; then
14736   :
14737 else
14738   if test -w $cache_file; then
14739     echo "updating cache $cache_file"
14740     cat confcache > $cache_file
14741   else
14742     echo "not updating unwritable cache $cache_file"
14743   fi
14744 fi
14745 rm -f confcache
14746
14747 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14748
14749 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14750 # Let make expand exec_prefix.
14751 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14752
14753 # Any assignment to VPATH causes Sun make to only execute
14754 # the first set of double-colon rules, so remove it if not needed.
14755 # If there is a colon in the path, we need to keep it.
14756 if test "x$srcdir" = x.; then
14757   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14758 fi
14759
14760 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14761
14762 DEFS=-DHAVE_CONFIG_H
14763
14764 # Without the "./", some shells look in PATH for config.status.
14765 : ${CONFIG_STATUS=./config.status}
14766
14767 echo creating $CONFIG_STATUS
14768 rm -f $CONFIG_STATUS
14769 cat > $CONFIG_STATUS <<EOF
14770 #! /bin/sh
14771 # Generated automatically by configure.
14772 # Run this file to recreate the current configuration.
14773 # This directory was configured as follows,
14774 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14775 #
14776 # $0 $ac_configure_args
14777 #
14778 # Compiler output produced by configure, useful for debugging
14779 # configure, is in ./config.log if it exists.
14780
14781 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14782 for ac_option
14783 do
14784   case "\$ac_option" in
14785   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14786     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14787     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14788   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14789     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14790     exit 0 ;;
14791   -help | --help | --hel | --he | --h)
14792     echo "\$ac_cs_usage"; exit 0 ;;
14793   *) echo "\$ac_cs_usage"; exit 1 ;;
14794   esac
14795 done
14796
14797 ac_given_srcdir=$srcdir
14798 ac_given_INSTALL="$INSTALL"
14799
14800 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
14801 EOF
14802 cat >> $CONFIG_STATUS <<EOF
14803
14804 # Protect against being on the right side of a sed subst in config.status.
14805 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14806  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14807 $ac_vpsub
14808 $extrasub
14809 s%@SHELL@%$SHELL%g
14810 s%@CFLAGS@%$CFLAGS%g
14811 s%@CPPFLAGS@%$CPPFLAGS%g
14812 s%@CXXFLAGS@%$CXXFLAGS%g
14813 s%@FFLAGS@%$FFLAGS%g
14814 s%@DEFS@%$DEFS%g
14815 s%@LDFLAGS@%$LDFLAGS%g
14816 s%@LIBS@%$LIBS%g
14817 s%@exec_prefix@%$exec_prefix%g
14818 s%@prefix@%$prefix%g
14819 s%@program_transform_name@%$program_transform_name%g
14820 s%@bindir@%$bindir%g
14821 s%@sbindir@%$sbindir%g
14822 s%@libexecdir@%$libexecdir%g
14823 s%@datadir@%$datadir%g
14824 s%@sysconfdir@%$sysconfdir%g
14825 s%@sharedstatedir@%$sharedstatedir%g
14826 s%@localstatedir@%$localstatedir%g
14827 s%@libdir@%$libdir%g
14828 s%@includedir@%$includedir%g
14829 s%@oldincludedir@%$oldincludedir%g
14830 s%@infodir@%$infodir%g
14831 s%@mandir@%$mandir%g
14832 s%@configdir@%$configdir%g
14833 s%@lockdir@%$lockdir%g
14834 s%@piddir@%$piddir%g
14835 s%@logfilebase@%$logfilebase%g
14836 s%@privatedir@%$privatedir%g
14837 s%@swatdir@%$swatdir%g
14838 s%@RUNPROG@%$RUNPROG%g
14839 s%@MPROGS@%$MPROGS%g
14840 s%@LDSHFLAGS@%$LDSHFLAGS%g
14841 s%@SONAMEFLAG@%$SONAMEFLAG%g
14842 s%@SHLD@%$SHLD%g
14843 s%@HOST_OS@%$HOST_OS%g
14844 s%@PAM_MOD@%$PAM_MOD%g
14845 s%@WRAP@%$WRAP%g
14846 s%@WRAP32@%$WRAP32%g
14847 s%@WRAPPROG@%$WRAPPROG%g
14848 s%@PICFLAG@%$PICFLAG%g
14849 s%@PICSUFFIX@%$PICSUFFIX%g
14850 s%@POBAD_CC@%$POBAD_CC%g
14851 s%@SHLIBEXT@%$SHLIBEXT%g
14852 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14853 s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g
14854 s%@PRINTLIBS@%$PRINTLIBS%g
14855 s%@CC@%$CC%g
14856 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14857 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14858 s%@INSTALL_DATA@%$INSTALL_DATA%g
14859 s%@AWK@%$AWK%g
14860 s%@BROKEN_CC@%$BROKEN_CC%g
14861 s%@host@%$host%g
14862 s%@host_alias@%$host_alias%g
14863 s%@host_cpu@%$host_cpu%g
14864 s%@host_vendor@%$host_vendor%g
14865 s%@host_os@%$host_os%g
14866 s%@target@%$target%g
14867 s%@target_alias@%$target_alias%g
14868 s%@target_cpu@%$target_cpu%g
14869 s%@target_vendor@%$target_vendor%g
14870 s%@target_os@%$target_os%g
14871 s%@build@%$build%g
14872 s%@build_alias@%$build_alias%g
14873 s%@build_cpu@%$build_cpu%g
14874 s%@build_vendor@%$build_vendor%g
14875 s%@build_os@%$build_os%g
14876 s%@CPP@%$CPP%g
14877 s%@CUPS_CONFIG@%$CUPS_CONFIG%g
14878 s%@LIBOBJS@%$LIBOBJS%g
14879 s%@TERMLIBS@%$TERMLIBS%g
14880 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14881 s%@ROFF@%$ROFF%g
14882 s%@DYNEXP@%$DYNEXP%g
14883 s%@QUOTAOBJS@%$QUOTAOBJS%g
14884 s%@manlangs@%$manlangs%g
14885 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14886 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14887 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14888 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14889 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14890 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14891 s%@BUILD_POPT@%$BUILD_POPT%g
14892 s%@FLAGS1@%$FLAGS1%g
14893 s%@PYTHON@%$PYTHON%g
14894 s%@builddir@%$builddir%g
14895
14896 CEOF
14897 EOF
14898
14899 cat >> $CONFIG_STATUS <<\EOF
14900
14901 # Split the substitutions into bite-sized pieces for seds with
14902 # small command number limits, like on Digital OSF/1 and HP-UX.
14903 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14904 ac_file=1 # Number of current file.
14905 ac_beg=1 # First line for current file.
14906 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14907 ac_more_lines=:
14908 ac_sed_cmds=""
14909 while $ac_more_lines; do
14910   if test $ac_beg -gt 1; then
14911     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14912   else
14913     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14914   fi
14915   if test ! -s conftest.s$ac_file; then
14916     ac_more_lines=false
14917     rm -f conftest.s$ac_file
14918   else
14919     if test -z "$ac_sed_cmds"; then
14920       ac_sed_cmds="sed -f conftest.s$ac_file"
14921     else
14922       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14923     fi
14924     ac_file=`expr $ac_file + 1`
14925     ac_beg=$ac_end
14926     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14927   fi
14928 done
14929 if test -z "$ac_sed_cmds"; then
14930   ac_sed_cmds=cat
14931 fi
14932 EOF
14933
14934 cat >> $CONFIG_STATUS <<EOF
14935
14936 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/pdb/mysql/Makefile ../examples/pdb/xml/Makefile ../examples/sam/Makefile"}
14937 EOF
14938 cat >> $CONFIG_STATUS <<\EOF
14939 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14940   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14941   case "$ac_file" in
14942   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14943        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14944   *) ac_file_in="${ac_file}.in" ;;
14945   esac
14946
14947   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14948
14949   # Remove last slash and all that follows it.  Not all systems have dirname.
14950   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14951   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14952     # The file is in a subdirectory.
14953     test ! -d "$ac_dir" && mkdir "$ac_dir"
14954     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14955     # A "../" for each directory in $ac_dir_suffix.
14956     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14957   else
14958     ac_dir_suffix= ac_dots=
14959   fi
14960
14961   case "$ac_given_srcdir" in
14962   .)  srcdir=.
14963       if test -z "$ac_dots"; then top_srcdir=.
14964       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14965   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14966   *) # Relative path.
14967     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14968     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14969   esac
14970
14971   case "$ac_given_INSTALL" in
14972   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14973   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14974   esac
14975
14976   echo creating "$ac_file"
14977   rm -f "$ac_file"
14978   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14979   case "$ac_file" in
14980   *Makefile*) ac_comsub="1i\\
14981 # $configure_input" ;;
14982   *) ac_comsub= ;;
14983   esac
14984
14985   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14986   sed -e "$ac_comsub
14987 s%@configure_input@%$configure_input%g
14988 s%@srcdir@%$srcdir%g
14989 s%@top_srcdir@%$top_srcdir%g
14990 s%@INSTALL@%$INSTALL%g
14991 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14992 fi; done
14993 rm -f conftest.s*
14994
14995 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14996 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14997 #
14998 # ac_d sets the value in "#define NAME VALUE" lines.
14999 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15000 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15001 ac_dC='\3'
15002 ac_dD='%g'
15003 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15004 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15005 ac_uB='\([      ]\)%\1#\2define\3'
15006 ac_uC=' '
15007 ac_uD='\4%g'
15008 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15009 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15010 ac_eB='$%\1#\2define\3'
15011 ac_eC=' '
15012 ac_eD='%g'
15013
15014 if test "${CONFIG_HEADERS+set}" != set; then
15015 EOF
15016 cat >> $CONFIG_STATUS <<EOF
15017   CONFIG_HEADERS="include/config.h"
15018 EOF
15019 cat >> $CONFIG_STATUS <<\EOF
15020 fi
15021 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15022   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15023   case "$ac_file" in
15024   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15025        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15026   *) ac_file_in="${ac_file}.in" ;;
15027   esac
15028
15029   echo creating $ac_file
15030
15031   rm -f conftest.frag conftest.in conftest.out
15032   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15033   cat $ac_file_inputs > conftest.in
15034
15035 EOF
15036
15037 # Transform confdefs.h into a sed script conftest.vals that substitutes
15038 # the proper values into config.h.in to produce config.h.  And first:
15039 # Protect against being on the right side of a sed subst in config.status.
15040 # Protect against being in an unquoted here document in config.status.
15041 rm -f conftest.vals
15042 cat > conftest.hdr <<\EOF
15043 s/[\\&%]/\\&/g
15044 s%[\\$`]%\\&%g
15045 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15046 s%ac_d%ac_u%gp
15047 s%ac_u%ac_e%gp
15048 EOF
15049 sed -n -f conftest.hdr confdefs.h > conftest.vals
15050 rm -f conftest.hdr
15051
15052 # This sed command replaces #undef with comments.  This is necessary, for
15053 # example, in the case of _POSIX_SOURCE, which is predefined and required
15054 # on some systems where configure will not decide to define it.
15055 cat >> conftest.vals <<\EOF
15056 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15057 EOF
15058
15059 # Break up conftest.vals because some shells have a limit on
15060 # the size of here documents, and old seds have small limits too.
15061
15062 rm -f conftest.tail
15063 while :
15064 do
15065   ac_lines=`grep -c . conftest.vals`
15066   # grep -c gives empty output for an empty file on some AIX systems.
15067   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15068   # Write a limited-size here document to conftest.frag.
15069   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15070   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15071   echo 'CEOF
15072   sed -f conftest.frag conftest.in > conftest.out
15073   rm -f conftest.in
15074   mv conftest.out conftest.in
15075 ' >> $CONFIG_STATUS
15076   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15077   rm -f conftest.vals
15078   mv conftest.tail conftest.vals
15079 done
15080 rm -f conftest.vals
15081
15082 cat >> $CONFIG_STATUS <<\EOF
15083   rm -f conftest.frag conftest.h
15084   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15085   cat conftest.in >> conftest.h
15086   rm -f conftest.in
15087   if cmp -s $ac_file conftest.h 2>/dev/null; then
15088     echo "$ac_file is unchanged"
15089     rm -f conftest.h
15090   else
15091     # Remove last slash and all that follows it.  Not all systems have dirname.
15092       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15093       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15094       # The file is in a subdirectory.
15095       test ! -d "$ac_dir" && mkdir "$ac_dir"
15096     fi
15097     rm -f $ac_file
15098     mv conftest.h $ac_file
15099   fi
15100 fi; done
15101
15102 EOF
15103 cat >> $CONFIG_STATUS <<EOF
15104
15105 EOF
15106 cat >> $CONFIG_STATUS <<\EOF
15107
15108 exit 0
15109 EOF
15110 chmod +x $CONFIG_STATUS
15111 rm -fr confdefs* $ac_clean_files
15112 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
15113
15114
15115 #################################################
15116 # Print very concise instructions on building/use
15117 if test "x$enable_dmalloc" = xyes
15118 then
15119         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
15120         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
15121 fi