Patch from Steve Langasek <vorlon@netexpress.net> to split up our -l
[sfrench/samba-autobuild/.git] / source / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --with-fhs              Use FHS-compliant paths (default=no)"
17 ac_help="$ac_help
18   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
19 ac_help="$ac_help
20   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
21 ac_help="$ac_help
22   --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)"
23 ac_help="$ac_help
24   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
25 ac_help="$ac_help
26   --with-configdir=DIR    Where to put configuration files (\$libdir)"
27 ac_help="$ac_help
28   --with-logfilebase=DIR  Where to put log files (\$(VARDIR))"
29 ac_help="$ac_help
30   --enable-debug          Turn on compiler debugging information (default=no)"
31 ac_help="$ac_help
32   --enable-developer      Turn on developer warnings and debugging (default=no)"
33 ac_help="$ac_help
34   --enable-krb5developer  Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)"
35 ac_help="$ac_help
36   --enable-dmalloc        Enable heap debugging [default=no]"
37 ac_help="$ac_help
38   --enable-cups           Turn on CUPS support (default=auto)"
39 ac_help="$ac_help
40   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
41 ac_help="$ac_help
42   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
43 ac_help="$ac_help
44   --with-smbwrapper       Include SMB wrapper support (default=no) "
45 ac_help="$ac_help
46   --with-afs              Include AFS clear-text auth support (default=no) "
47 ac_help="$ac_help
48   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
49 ac_help="$ac_help
50   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
51 ac_help="$ac_help
52   --with-automount        Include AUTOMOUNT support (default=no)"
53 ac_help="$ac_help
54   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
55 ac_help="$ac_help
56   --with-pam              Include PAM support (default=no)"
57 ac_help="$ac_help
58   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
59 ac_help="$ac_help
60   --with-tdbsam           Include experimental TDB SAM support (default=no)"
61 ac_help="$ac_help
62   --with-nisplussam       Include NISPLUS SAM support (default=no)"
63 ac_help="$ac_help
64   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
65 ac_help="$ac_help
66   --with-syslog           Include experimental SYSLOG support (default=no)"
67 ac_help="$ac_help
68   --with-profiling-data   Include gathering source code profile information (default=no)"
69 ac_help="$ac_help
70   --with-quotas           Include experimental disk-quota support (default=no)"
71 ac_help="$ac_help
72   --with-utmp             Include experimental utmp accounting (default=no)"
73 ac_help="$ac_help
74   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
75 ac_help="$ac_help
76   --with-libsmbclient     Build the libsmbclient shared library (default=yes)"
77 ac_help="$ac_help
78   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
79 ac_help="$ac_help
80   --with-acl-support      Include ACL support (default=no)"
81 ac_help="$ac_help
82   --with-winbind          Build winbind (default, if supported by OS)"
83 ac_help="$ac_help
84   --with-included-popt    use bundled popt library, not from system"
85
86 # Initialize some variables set by options.
87 # The variables have the same names as the options, with
88 # dashes changed to underlines.
89 build=NONE
90 cache_file=./config.cache
91 exec_prefix=NONE
92 host=NONE
93 no_create=
94 nonopt=NONE
95 no_recursion=
96 prefix=NONE
97 program_prefix=NONE
98 program_suffix=NONE
99 program_transform_name=s,x,x,
100 silent=
101 site=
102 srcdir=
103 target=NONE
104 verbose=
105 x_includes=NONE
106 x_libraries=NONE
107 bindir='${exec_prefix}/bin'
108 sbindir='${exec_prefix}/sbin'
109 libexecdir='${exec_prefix}/libexec'
110 datadir='${prefix}/share'
111 sysconfdir='${prefix}/etc'
112 sharedstatedir='${prefix}/com'
113 localstatedir='${prefix}/var'
114 libdir='${exec_prefix}/lib'
115 includedir='${prefix}/include'
116 oldincludedir='/usr/include'
117 infodir='${prefix}/info'
118 mandir='${prefix}/man'
119
120 # Initialize some other variables.
121 subdirs=
122 MFLAGS= MAKEFLAGS=
123 SHELL=${CONFIG_SHELL-/bin/sh}
124 # Maximum number of lines to put in a shell here document.
125 ac_max_here_lines=12
126
127 ac_prev=
128 for ac_option
129 do
130
131   # If the previous option needs an argument, assign it.
132   if test -n "$ac_prev"; then
133     eval "$ac_prev=\$ac_option"
134     ac_prev=
135     continue
136   fi
137
138   case "$ac_option" in
139   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
140   *) ac_optarg= ;;
141   esac
142
143   # Accept the important Cygnus configure options, so we can diagnose typos.
144
145   case "$ac_option" in
146
147   -bindir | --bindir | --bindi | --bind | --bin | --bi)
148     ac_prev=bindir ;;
149   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
150     bindir="$ac_optarg" ;;
151
152   -build | --build | --buil | --bui | --bu)
153     ac_prev=build ;;
154   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
155     build="$ac_optarg" ;;
156
157   -cache-file | --cache-file | --cache-fil | --cache-fi \
158   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
159     ac_prev=cache_file ;;
160   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
161   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
162     cache_file="$ac_optarg" ;;
163
164   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
165     ac_prev=datadir ;;
166   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
167   | --da=*)
168     datadir="$ac_optarg" ;;
169
170   -disable-* | --disable-*)
171     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
172     # Reject names that are not valid shell variable names.
173     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
174       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
175     fi
176     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
177     eval "enable_${ac_feature}=no" ;;
178
179   -enable-* | --enable-*)
180     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
181     # Reject names that are not valid shell variable names.
182     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
183       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
184     fi
185     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
186     case "$ac_option" in
187       *=*) ;;
188       *) ac_optarg=yes ;;
189     esac
190     eval "enable_${ac_feature}='$ac_optarg'" ;;
191
192   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
193   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
194   | --exec | --exe | --ex)
195     ac_prev=exec_prefix ;;
196   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
197   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
198   | --exec=* | --exe=* | --ex=*)
199     exec_prefix="$ac_optarg" ;;
200
201   -gas | --gas | --ga | --g)
202     # Obsolete; use --with-gas.
203     with_gas=yes ;;
204
205   -help | --help | --hel | --he)
206     # Omit some internal or obsolete options to make the list less imposing.
207     # This message is too long to be a string in the A/UX 3.1 sh.
208     cat << EOF
209 Usage: configure [options] [host]
210 Options: [defaults in brackets after descriptions]
211 Configuration:
212   --cache-file=FILE       cache test results in FILE
213   --help                  print this message
214   --no-create             do not create output files
215   --quiet, --silent       do not print \`checking...' messages
216   --version               print the version of autoconf that created configure
217 Directory and file names:
218   --prefix=PREFIX         install architecture-independent files in PREFIX
219                           [$ac_default_prefix]
220   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
221                           [same as prefix]
222   --bindir=DIR            user executables in DIR [EPREFIX/bin]
223   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
224   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
225   --datadir=DIR           read-only architecture-independent data in DIR
226                           [PREFIX/share]
227   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
228   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
229                           [PREFIX/com]
230   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
231   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
232   --includedir=DIR        C header files in DIR [PREFIX/include]
233   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
234   --infodir=DIR           info documentation in DIR [PREFIX/info]
235   --mandir=DIR            man documentation in DIR [PREFIX/man]
236   --srcdir=DIR            find the sources in DIR [configure dir or ..]
237   --program-prefix=PREFIX prepend PREFIX to installed program names
238   --program-suffix=SUFFIX append SUFFIX to installed program names
239   --program-transform-name=PROGRAM
240                           run sed PROGRAM on installed program names
241 EOF
242     cat << EOF
243 Host type:
244   --build=BUILD           configure for building on BUILD [BUILD=HOST]
245   --host=HOST             configure for HOST [guessed]
246   --target=TARGET         configure for TARGET [TARGET=HOST]
247 Features and packages:
248   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
249   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
250   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
251   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
252   --x-includes=DIR        X include files are in DIR
253   --x-libraries=DIR       X library files are in DIR
254 EOF
255     if test -n "$ac_help"; then
256       echo "--enable and --with options recognized:$ac_help"
257     fi
258     exit 0 ;;
259
260   -host | --host | --hos | --ho)
261     ac_prev=host ;;
262   -host=* | --host=* | --hos=* | --ho=*)
263     host="$ac_optarg" ;;
264
265   -includedir | --includedir | --includedi | --included | --include \
266   | --includ | --inclu | --incl | --inc)
267     ac_prev=includedir ;;
268   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
269   | --includ=* | --inclu=* | --incl=* | --inc=*)
270     includedir="$ac_optarg" ;;
271
272   -infodir | --infodir | --infodi | --infod | --info | --inf)
273     ac_prev=infodir ;;
274   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
275     infodir="$ac_optarg" ;;
276
277   -libdir | --libdir | --libdi | --libd)
278     ac_prev=libdir ;;
279   -libdir=* | --libdir=* | --libdi=* | --libd=*)
280     libdir="$ac_optarg" ;;
281
282   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
283   | --libexe | --libex | --libe)
284     ac_prev=libexecdir ;;
285   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
286   | --libexe=* | --libex=* | --libe=*)
287     libexecdir="$ac_optarg" ;;
288
289   -localstatedir | --localstatedir | --localstatedi | --localstated \
290   | --localstate | --localstat | --localsta | --localst \
291   | --locals | --local | --loca | --loc | --lo)
292     ac_prev=localstatedir ;;
293   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
294   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
295   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
296     localstatedir="$ac_optarg" ;;
297
298   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
299     ac_prev=mandir ;;
300   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
301     mandir="$ac_optarg" ;;
302
303   -nfp | --nfp | --nf)
304     # Obsolete; use --without-fp.
305     with_fp=no ;;
306
307   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
308   | --no-cr | --no-c)
309     no_create=yes ;;
310
311   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
312   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
313     no_recursion=yes ;;
314
315   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
316   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
317   | --oldin | --oldi | --old | --ol | --o)
318     ac_prev=oldincludedir ;;
319   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
320   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
321   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
322     oldincludedir="$ac_optarg" ;;
323
324   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
325     ac_prev=prefix ;;
326   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
327     prefix="$ac_optarg" ;;
328
329   -program-prefix | --program-prefix | --program-prefi | --program-pref \
330   | --program-pre | --program-pr | --program-p)
331     ac_prev=program_prefix ;;
332   -program-prefix=* | --program-prefix=* | --program-prefi=* \
333   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
334     program_prefix="$ac_optarg" ;;
335
336   -program-suffix | --program-suffix | --program-suffi | --program-suff \
337   | --program-suf | --program-su | --program-s)
338     ac_prev=program_suffix ;;
339   -program-suffix=* | --program-suffix=* | --program-suffi=* \
340   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
341     program_suffix="$ac_optarg" ;;
342
343   -program-transform-name | --program-transform-name \
344   | --program-transform-nam | --program-transform-na \
345   | --program-transform-n | --program-transform- \
346   | --program-transform | --program-transfor \
347   | --program-transfo | --program-transf \
348   | --program-trans | --program-tran \
349   | --progr-tra | --program-tr | --program-t)
350     ac_prev=program_transform_name ;;
351   -program-transform-name=* | --program-transform-name=* \
352   | --program-transform-nam=* | --program-transform-na=* \
353   | --program-transform-n=* | --program-transform-=* \
354   | --program-transform=* | --program-transfor=* \
355   | --program-transfo=* | --program-transf=* \
356   | --program-trans=* | --program-tran=* \
357   | --progr-tra=* | --program-tr=* | --program-t=*)
358     program_transform_name="$ac_optarg" ;;
359
360   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
361   | -silent | --silent | --silen | --sile | --sil)
362     silent=yes ;;
363
364   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
365     ac_prev=sbindir ;;
366   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
367   | --sbi=* | --sb=*)
368     sbindir="$ac_optarg" ;;
369
370   -sharedstatedir | --sharedstatedir | --sharedstatedi \
371   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
372   | --sharedst | --shareds | --shared | --share | --shar \
373   | --sha | --sh)
374     ac_prev=sharedstatedir ;;
375   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
376   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
377   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
378   | --sha=* | --sh=*)
379     sharedstatedir="$ac_optarg" ;;
380
381   -site | --site | --sit)
382     ac_prev=site ;;
383   -site=* | --site=* | --sit=*)
384     site="$ac_optarg" ;;
385
386   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
387     ac_prev=srcdir ;;
388   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
389     srcdir="$ac_optarg" ;;
390
391   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
392   | --syscon | --sysco | --sysc | --sys | --sy)
393     ac_prev=sysconfdir ;;
394   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
395   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
396     sysconfdir="$ac_optarg" ;;
397
398   -target | --target | --targe | --targ | --tar | --ta | --t)
399     ac_prev=target ;;
400   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
401     target="$ac_optarg" ;;
402
403   -v | -verbose | --verbose | --verbos | --verbo | --verb)
404     verbose=yes ;;
405
406   -version | --version | --versio | --versi | --vers)
407     echo "configure generated by autoconf version 2.13"
408     exit 0 ;;
409
410   -with-* | --with-*)
411     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
412     # Reject names that are not valid shell variable names.
413     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
414       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415     fi
416     ac_package=`echo $ac_package| sed 's/-/_/g'`
417     case "$ac_option" in
418       *=*) ;;
419       *) ac_optarg=yes ;;
420     esac
421     eval "with_${ac_package}='$ac_optarg'" ;;
422
423   -without-* | --without-*)
424     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
425     # Reject names that are not valid shell variable names.
426     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
427       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
428     fi
429     ac_package=`echo $ac_package| sed 's/-/_/g'`
430     eval "with_${ac_package}=no" ;;
431
432   --x)
433     # Obsolete; use --with-x.
434     with_x=yes ;;
435
436   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
437   | --x-incl | --x-inc | --x-in | --x-i)
438     ac_prev=x_includes ;;
439   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
440   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
441     x_includes="$ac_optarg" ;;
442
443   -x-libraries | --x-libraries | --x-librarie | --x-librari \
444   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
445     ac_prev=x_libraries ;;
446   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
447   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
448     x_libraries="$ac_optarg" ;;
449
450   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
451     ;;
452
453   *)
454     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
455       echo "configure: warning: $ac_option: invalid host type" 1>&2
456     fi
457     if test "x$nonopt" != xNONE; then
458       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
459     fi
460     nonopt="$ac_option"
461     ;;
462
463   esac
464 done
465
466 if test -n "$ac_prev"; then
467   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
468 fi
469
470 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
471
472 # File descriptor usage:
473 # 0 standard input
474 # 1 file creation
475 # 2 errors and warnings
476 # 3 some systems may open it to /dev/tty
477 # 4 used on the Kubota Titan
478 # 6 checking for... messages and results
479 # 5 compiler messages saved in config.log
480 if test "$silent" = yes; then
481   exec 6>/dev/null
482 else
483   exec 6>&1
484 fi
485 exec 5>./config.log
486
487 echo "\
488 This file contains any messages produced by compilers while
489 running configure, to aid debugging if configure makes a mistake.
490 " 1>&5
491
492 # Strip out --no-create and --no-recursion so they do not pile up.
493 # Also quote any args containing shell metacharacters.
494 ac_configure_args=
495 for ac_arg
496 do
497   case "$ac_arg" in
498   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
499   | --no-cr | --no-c) ;;
500   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
501   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
502   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
503   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
504   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
505   esac
506 done
507
508 # NLS nuisances.
509 # Only set these to C if already set.  These must not be set unconditionally
510 # because not all systems understand e.g. LANG=C (notably SCO).
511 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
512 # Non-C LC_CTYPE values break the ctype check.
513 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
514 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
515 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
516 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
517
518 # confdefs.h avoids OS command line length limits that DEFS can exceed.
519 rm -rf conftest* confdefs.h
520 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
521 echo > confdefs.h
522
523 # A filename unique to this package, relative to the directory that
524 # configure is in, which we can look for to find out if srcdir is correct.
525 ac_unique_file=include/includes.h
526
527 # Find the source files, if location was not specified.
528 if test -z "$srcdir"; then
529   ac_srcdir_defaulted=yes
530   # Try the directory containing this script, then its parent.
531   ac_prog=$0
532   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
533   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
534   srcdir=$ac_confdir
535   if test ! -r $srcdir/$ac_unique_file; then
536     srcdir=..
537   fi
538 else
539   ac_srcdir_defaulted=no
540 fi
541 if test ! -r $srcdir/$ac_unique_file; then
542   if test "$ac_srcdir_defaulted" = yes; then
543     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
544   else
545     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
546   fi
547 fi
548 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
549
550 # Prefer explicitly selected file to automatically selected ones.
551 if test -z "$CONFIG_SITE"; then
552   if test "x$prefix" != xNONE; then
553     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
554   else
555     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
556   fi
557 fi
558 for ac_site_file in $CONFIG_SITE; do
559   if test -r "$ac_site_file"; then
560     echo "loading site script $ac_site_file"
561     . "$ac_site_file"
562   fi
563 done
564
565 if test -r "$cache_file"; then
566   echo "loading cache $cache_file"
567   . $cache_file
568 else
569   echo "creating cache $cache_file"
570   > $cache_file
571 fi
572
573 ac_ext=c
574 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
575 ac_cpp='$CPP $CPPFLAGS'
576 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
577 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
578 cross_compiling=$ac_cv_prog_cc_cross
579
580 ac_exeext=
581 ac_objext=o
582 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
583   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
584   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
585     ac_n= ac_c='
586 ' ac_t='        '
587   else
588     ac_n=-n ac_c= ac_t=
589   fi
590 else
591   ac_n= ac_c='\c' ac_t=
592 fi
593
594
595
596
597 #################################################
598 # Directory handling stuff to support both the
599 # legacy SAMBA directories and FHS compliant
600 # ones...
601
602
603 # Check whether --with-fhs or --without-fhs was given.
604 if test "${with_fhs+set}" = set; then
605   withval="$with_fhs"
606   configdir="${sysconfdir}/samba"
607     lockdir="\${VARDIR}/cache/samba"
608     piddir="\$(VARDIR)/run/samba"
609     logfilebase="\${VARDIR}/log/samba"
610     privatedir="\${CONFIGDIR}/private"
611     swatdir="\${DATADIR}/samba/swat"
612 else
613   configdir="\$(LIBDIR)"
614     logfilebase="\$(VARDIR)"
615     lockdir="\${VARDIR}/locks"
616     piddir="\$(VARDIR)/locks"
617     privatedir="\${prefix}/private"
618     swatdir="\${prefix}/swat"
619 fi
620
621
622 #################################################
623 # set private directory location
624 # Check whether --with-privatedir or --without-privatedir was given.
625 if test "${with_privatedir+set}" = set; then
626   withval="$with_privatedir"
627    case "$withval" in
628   yes|no)
629   #
630   # Just in case anybody calls it without argument
631   #
632     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
633   ;;
634   * )
635     privatedir="$withval"
636     ;;
637   esac
638 fi
639
640
641 #################################################
642 # set lock directory location
643 # Check whether --with-lockdir or --without-lockdir was given.
644 if test "${with_lockdir+set}" = set; then
645   withval="$with_lockdir"
646    case "$withval" in
647   yes|no)
648   #
649   # Just in case anybody calls it without argument
650   #
651     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
652   ;;
653   * )
654     lockdir="$withval"
655     ;;
656   esac
657 fi
658
659
660 #################################################
661 # set pid directory location
662 # Check whether --with-piddir or --without-piddir was given.
663 if test "${with_piddir+set}" = set; then
664   withval="$with_piddir"
665    case "$withval" in
666   yes|no)
667   #
668   # Just in case anybody calls it without argument
669   #
670     echo "configure: warning: --with-piddir called without argument - will use default" 1>&2
671   ;;
672   * )
673     piddir="$withval"
674     ;;
675   esac
676 fi
677
678
679 #################################################
680 # set SWAT directory location
681 # Check whether --with-swatdir or --without-swatdir was given.
682 if test "${with_swatdir+set}" = set; then
683   withval="$with_swatdir"
684    case "$withval" in
685   yes|no)
686   #
687   # Just in case anybody does it
688   #
689     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
690   ;;
691   * )
692     swatdir="$withval"
693     ;;
694   esac
695 fi
696
697
698 #################################################
699 # set configuration directory location
700 # Check whether --with-configdir or --without-configdir was given.
701 if test "${with_configdir+set}" = set; then
702   withval="$with_configdir"
703    case "$withval" in
704   yes|no)
705   #
706   # Just in case anybody does it
707   #
708     echo "configure: warning: --with-configdir called without argument - will use default" 1>&2
709   ;;
710   * )
711     configdir="$withval"
712     ;;
713   esac
714 fi
715
716
717 #################################################
718 # set log directory location
719 # Check whether --with-logfilebase or --without-logfilebase was given.
720 if test "${with_logfilebase+set}" = set; then
721   withval="$with_logfilebase"
722    case "$withval" in
723   yes|no)
724   #
725   # Just in case anybody does it
726   #
727     echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
728   ;;
729   * )
730     logfilebase="$withval"
731     ;;
732   esac
733 fi
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765 # compile with optimization and without debugging by default
766 CFLAGS="-O ${CFLAGS}"
767
768 # Check whether --enable-debug or --disable-debug was given.
769 if test "${enable_debug+set}" = set; then
770   enableval="$enable_debug"
771   if eval "test x$enable_debug = xyes"; then
772         CFLAGS="${CFLAGS} -g"
773     fi
774 fi
775
776
777 # Check whether --enable-developer or --disable-developer was given.
778 if test "${enable_developer+set}" = set; then
779   enableval="$enable_developer"
780   if eval "test x$enable_developer = xyes"; then
781         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
782     fi
783 fi
784
785
786 # Check whether --enable-krb5developer or --disable-krb5developer was given.
787 if test "${enable_krb5developer+set}" = set; then
788   enableval="$enable_krb5developer"
789   if eval "test x$enable_krb5developer = xyes"; then
790         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
791     fi
792 fi
793
794
795 # Check whether --enable-dmalloc or --disable-dmalloc was given.
796 if test "${enable_dmalloc+set}" = set; then
797   enableval="$enable_dmalloc"
798   :
799 fi
800
801
802 if test "x$enable_dmalloc" = xyes
803 then
804         cat >> confdefs.h <<\EOF
805 #define ENABLE_DMALLOC 1
806 EOF
807
808         cat >> confdefs.h <<\EOF
809 #define DMALLOC_FUNC_CHECK 1
810 EOF
811
812         LIBS="$LIBS -ldmalloc"  
813 fi
814
815 # Extract the first word of "gcc", so it can be a program name with args.
816 set dummy gcc; ac_word=$2
817 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
818 echo "configure:819: checking for $ac_word" >&5
819 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
820   echo $ac_n "(cached) $ac_c" 1>&6
821 else
822   if test -n "$CC"; then
823   ac_cv_prog_CC="$CC" # Let the user override the test.
824 else
825   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
826   ac_dummy="$PATH"
827   for ac_dir in $ac_dummy; do
828     test -z "$ac_dir" && ac_dir=.
829     if test -f $ac_dir/$ac_word; then
830       ac_cv_prog_CC="gcc"
831       break
832     fi
833   done
834   IFS="$ac_save_ifs"
835 fi
836 fi
837 CC="$ac_cv_prog_CC"
838 if test -n "$CC"; then
839   echo "$ac_t""$CC" 1>&6
840 else
841   echo "$ac_t""no" 1>&6
842 fi
843
844 if test -z "$CC"; then
845   # Extract the first word of "cc", so it can be a program name with args.
846 set dummy cc; ac_word=$2
847 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
848 echo "configure:849: checking for $ac_word" >&5
849 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
850   echo $ac_n "(cached) $ac_c" 1>&6
851 else
852   if test -n "$CC"; then
853   ac_cv_prog_CC="$CC" # Let the user override the test.
854 else
855   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
856   ac_prog_rejected=no
857   ac_dummy="$PATH"
858   for ac_dir in $ac_dummy; do
859     test -z "$ac_dir" && ac_dir=.
860     if test -f $ac_dir/$ac_word; then
861       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
862         ac_prog_rejected=yes
863         continue
864       fi
865       ac_cv_prog_CC="cc"
866       break
867     fi
868   done
869   IFS="$ac_save_ifs"
870 if test $ac_prog_rejected = yes; then
871   # We found a bogon in the path, so make sure we never use it.
872   set dummy $ac_cv_prog_CC
873   shift
874   if test $# -gt 0; then
875     # We chose a different compiler from the bogus one.
876     # However, it has the same basename, so the bogon will be chosen
877     # first if we set CC to just the basename; use the full file name.
878     shift
879     set dummy "$ac_dir/$ac_word" "$@"
880     shift
881     ac_cv_prog_CC="$@"
882   fi
883 fi
884 fi
885 fi
886 CC="$ac_cv_prog_CC"
887 if test -n "$CC"; then
888   echo "$ac_t""$CC" 1>&6
889 else
890   echo "$ac_t""no" 1>&6
891 fi
892
893   if test -z "$CC"; then
894     case "`uname -s`" in
895     *win32* | *WIN32*)
896       # Extract the first word of "cl", so it can be a program name with args.
897 set dummy cl; ac_word=$2
898 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
899 echo "configure:900: checking for $ac_word" >&5
900 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
901   echo $ac_n "(cached) $ac_c" 1>&6
902 else
903   if test -n "$CC"; then
904   ac_cv_prog_CC="$CC" # Let the user override the test.
905 else
906   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
907   ac_dummy="$PATH"
908   for ac_dir in $ac_dummy; do
909     test -z "$ac_dir" && ac_dir=.
910     if test -f $ac_dir/$ac_word; then
911       ac_cv_prog_CC="cl"
912       break
913     fi
914   done
915   IFS="$ac_save_ifs"
916 fi
917 fi
918 CC="$ac_cv_prog_CC"
919 if test -n "$CC"; then
920   echo "$ac_t""$CC" 1>&6
921 else
922   echo "$ac_t""no" 1>&6
923 fi
924  ;;
925     esac
926   fi
927   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
928 fi
929
930 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
931 echo "configure:932: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
932
933 ac_ext=c
934 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
935 ac_cpp='$CPP $CPPFLAGS'
936 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
937 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
938 cross_compiling=$ac_cv_prog_cc_cross
939
940 cat > conftest.$ac_ext << EOF
941
942 #line 943 "configure"
943 #include "confdefs.h"
944
945 main(){return(0);}
946 EOF
947 if { (eval echo configure:948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
948   ac_cv_prog_cc_works=yes
949   # If we can't run a trivial program, we are probably using a cross compiler.
950   if (./conftest; exit) 2>/dev/null; then
951     ac_cv_prog_cc_cross=no
952   else
953     ac_cv_prog_cc_cross=yes
954   fi
955 else
956   echo "configure: failed program was:" >&5
957   cat conftest.$ac_ext >&5
958   ac_cv_prog_cc_works=no
959 fi
960 rm -fr conftest*
961 ac_ext=c
962 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
963 ac_cpp='$CPP $CPPFLAGS'
964 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
965 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
966 cross_compiling=$ac_cv_prog_cc_cross
967
968 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
969 if test $ac_cv_prog_cc_works = no; then
970   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
971 fi
972 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
973 echo "configure:974: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
974 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
975 cross_compiling=$ac_cv_prog_cc_cross
976
977 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
978 echo "configure:979: checking whether we are using GNU C" >&5
979 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
980   echo $ac_n "(cached) $ac_c" 1>&6
981 else
982   cat > conftest.c <<EOF
983 #ifdef __GNUC__
984   yes;
985 #endif
986 EOF
987 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
988   ac_cv_prog_gcc=yes
989 else
990   ac_cv_prog_gcc=no
991 fi
992 fi
993
994 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
995
996 if test $ac_cv_prog_gcc = yes; then
997   GCC=yes
998 else
999   GCC=
1000 fi
1001
1002 ac_test_CFLAGS="${CFLAGS+set}"
1003 ac_save_CFLAGS="$CFLAGS"
1004 CFLAGS=
1005 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1006 echo "configure:1007: checking whether ${CC-cc} accepts -g" >&5
1007 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1008   echo $ac_n "(cached) $ac_c" 1>&6
1009 else
1010   echo 'void f(){}' > conftest.c
1011 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1012   ac_cv_prog_cc_g=yes
1013 else
1014   ac_cv_prog_cc_g=no
1015 fi
1016 rm -f conftest*
1017
1018 fi
1019
1020 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1021 if test "$ac_test_CFLAGS" = set; then
1022   CFLAGS="$ac_save_CFLAGS"
1023 elif test $ac_cv_prog_cc_g = yes; then
1024   if test "$GCC" = yes; then
1025     CFLAGS="-g -O2"
1026   else
1027     CFLAGS="-g"
1028   fi
1029 else
1030   if test "$GCC" = yes; then
1031     CFLAGS="-O2"
1032   else
1033     CFLAGS=
1034   fi
1035 fi
1036
1037 ac_aux_dir=
1038 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1039   if test -f $ac_dir/install-sh; then
1040     ac_aux_dir=$ac_dir
1041     ac_install_sh="$ac_aux_dir/install-sh -c"
1042     break
1043   elif test -f $ac_dir/install.sh; then
1044     ac_aux_dir=$ac_dir
1045     ac_install_sh="$ac_aux_dir/install.sh -c"
1046     break
1047   fi
1048 done
1049 if test -z "$ac_aux_dir"; then
1050   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1051 fi
1052 ac_config_guess=$ac_aux_dir/config.guess
1053 ac_config_sub=$ac_aux_dir/config.sub
1054 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1055
1056 # Find a good install program.  We prefer a C program (faster),
1057 # so one script is as good as another.  But avoid the broken or
1058 # incompatible versions:
1059 # SysV /etc/install, /usr/sbin/install
1060 # SunOS /usr/etc/install
1061 # IRIX /sbin/install
1062 # AIX /bin/install
1063 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1064 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1065 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1066 # ./install, which can be erroneously created by make from ./install.sh.
1067 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1068 echo "configure:1069: checking for a BSD compatible install" >&5
1069 if test -z "$INSTALL"; then
1070 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1071   echo $ac_n "(cached) $ac_c" 1>&6
1072 else
1073     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1074   for ac_dir in $PATH; do
1075     # Account for people who put trailing slashes in PATH elements.
1076     case "$ac_dir/" in
1077     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1078     *)
1079       # OSF1 and SCO ODT 3.0 have their own names for install.
1080       # Don't use installbsd from OSF since it installs stuff as root
1081       # by default.
1082       for ac_prog in ginstall scoinst install; do
1083         if test -f $ac_dir/$ac_prog; then
1084           if test $ac_prog = install &&
1085             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1086             # AIX install.  It has an incompatible calling convention.
1087             :
1088           else
1089             ac_cv_path_install="$ac_dir/$ac_prog -c"
1090             break 2
1091           fi
1092         fi
1093       done
1094       ;;
1095     esac
1096   done
1097   IFS="$ac_save_IFS"
1098
1099 fi
1100   if test "${ac_cv_path_install+set}" = set; then
1101     INSTALL="$ac_cv_path_install"
1102   else
1103     # As a last resort, use the slow shell script.  We don't cache a
1104     # path for INSTALL within a source directory, because that will
1105     # break other packages using the cache if that directory is
1106     # removed, or if the path is relative.
1107     INSTALL="$ac_install_sh"
1108   fi
1109 fi
1110 echo "$ac_t""$INSTALL" 1>&6
1111
1112 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1113 # It thinks the first close brace ends the variable substitution.
1114 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1115
1116 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1117
1118 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1119
1120 for ac_prog in gawk mawk nawk awk
1121 do
1122 # Extract the first word of "$ac_prog", so it can be a program name with args.
1123 set dummy $ac_prog; ac_word=$2
1124 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1125 echo "configure:1126: checking for $ac_word" >&5
1126 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1127   echo $ac_n "(cached) $ac_c" 1>&6
1128 else
1129   if test -n "$AWK"; then
1130   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1131 else
1132   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1133   ac_dummy="$PATH"
1134   for ac_dir in $ac_dummy; do
1135     test -z "$ac_dir" && ac_dir=.
1136     if test -f $ac_dir/$ac_word; then
1137       ac_cv_prog_AWK="$ac_prog"
1138       break
1139     fi
1140   done
1141   IFS="$ac_save_ifs"
1142 fi
1143 fi
1144 AWK="$ac_cv_prog_AWK"
1145 if test -n "$AWK"; then
1146   echo "$ac_t""$AWK" 1>&6
1147 else
1148   echo "$ac_t""no" 1>&6
1149 fi
1150
1151 test -n "$AWK" && break
1152 done
1153
1154
1155 LD=ld
1156 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1157 echo "configure:1158: checking if the linker ($LD) is GNU ld" >&5
1158 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1159   echo $ac_n "(cached) $ac_c" 1>&6
1160 else
1161   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1162 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1163   ac_cv_prog_gnu_ld=yes
1164 else
1165   ac_cv_prog_gnu_ld=no
1166 fi
1167 fi
1168
1169 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1170
1171
1172 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1173 echo "configure:1174: checking for POSIXized ISC" >&5
1174 if test -d /etc/conf/kconfig.d &&
1175   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1176 then
1177   echo "$ac_t""yes" 1>&6
1178   ISC=yes # If later tests want to check for ISC.
1179   cat >> confdefs.h <<\EOF
1180 #define _POSIX_SOURCE 1
1181 EOF
1182
1183   if test "$GCC" = yes; then
1184     CC="$CC -posix"
1185   else
1186     CC="$CC -Xp"
1187   fi
1188 else
1189   echo "$ac_t""no" 1>&6
1190   ISC=
1191 fi
1192
1193
1194 if test "x$CC" != xcc; then
1195   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1196 echo "configure:1197: checking whether $CC and cc understand -c and -o together" >&5
1197 else
1198   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1199 echo "configure:1200: checking whether cc understands -c and -o together" >&5
1200 fi
1201 set dummy $CC; ac_cc="`echo $2 |
1202                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1203 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1204   echo $ac_n "(cached) $ac_c" 1>&6
1205 else
1206   echo 'foo(){}' > conftest.c
1207 # Make sure it works both with $CC and with simple cc.
1208 # We do the test twice because some compilers refuse to overwrite an
1209 # existing .o file with -o, though they will create one.
1210 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1211 if { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1212    test -f conftest.o && { (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1213 then
1214   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1215   if test "x$CC" != xcc; then
1216     # Test first that cc exists at all.
1217     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1218       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1219       if { (eval echo configure:1220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1220          test -f conftest.o && { (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1221       then
1222         # cc works too.
1223         :
1224       else
1225         # cc exists but doesn't like -o.
1226         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1227       fi
1228     fi
1229   fi
1230 else
1231   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1232 fi
1233 rm -f conftest*
1234
1235 fi
1236 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1237   echo "$ac_t""yes" 1>&6
1238 else
1239   echo "$ac_t""no" 1>&6
1240   cat >> confdefs.h <<\EOF
1241 #define NO_MINUS_C_MINUS_O 1
1242 EOF
1243
1244 fi
1245
1246 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1247       BROKEN_CC=
1248 else
1249       BROKEN_CC=#
1250 fi
1251
1252
1253 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1254 echo "configure:1255: checking that the C compiler understands volatile" >&5
1255 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1256   echo $ac_n "(cached) $ac_c" 1>&6
1257 else
1258   
1259     cat > conftest.$ac_ext <<EOF
1260 #line 1261 "configure"
1261 #include "confdefs.h"
1262 #include <sys/types.h>
1263 int main() {
1264 volatile int i = 0
1265 ; return 0; }
1266 EOF
1267 if { (eval echo configure:1268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1268   rm -rf conftest*
1269   samba_cv_volatile=yes
1270 else
1271   echo "configure: failed program was:" >&5
1272   cat conftest.$ac_ext >&5
1273   rm -rf conftest*
1274   samba_cv_volatile=no
1275 fi
1276 rm -f conftest*
1277 fi
1278
1279 echo "$ac_t""$samba_cv_volatile" 1>&6
1280 if test x"$samba_cv_volatile" = x"yes"; then
1281    cat >> confdefs.h <<\EOF
1282 #define HAVE_VOLATILE 1
1283 EOF
1284
1285 fi
1286
1287
1288
1289 # Do some error checking and defaulting for the host and target type.
1290 # The inputs are:
1291 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1292 #
1293 # The rules are:
1294 # 1. You are not allowed to specify --host, --target, and nonopt at the
1295 #    same time.
1296 # 2. Host defaults to nonopt.
1297 # 3. If nonopt is not specified, then host defaults to the current host,
1298 #    as determined by config.guess.
1299 # 4. Target and build default to nonopt.
1300 # 5. If nonopt is not specified, then target and build default to host.
1301
1302 # The aliases save the names the user supplied, while $host etc.
1303 # will get canonicalized.
1304 case $host---$target---$nonopt in
1305 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1306 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1307 esac
1308
1309
1310 # Make sure we can run config.sub.
1311 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1312 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1313 fi
1314
1315 echo $ac_n "checking host system type""... $ac_c" 1>&6
1316 echo "configure:1317: checking host system type" >&5
1317
1318 host_alias=$host
1319 case "$host_alias" in
1320 NONE)
1321   case $nonopt in
1322   NONE)
1323     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1324     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1325     fi ;;
1326   *) host_alias=$nonopt ;;
1327   esac ;;
1328 esac
1329
1330 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1331 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1332 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1333 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1334 echo "$ac_t""$host" 1>&6
1335
1336 echo $ac_n "checking target system type""... $ac_c" 1>&6
1337 echo "configure:1338: checking target system type" >&5
1338
1339 target_alias=$target
1340 case "$target_alias" in
1341 NONE)
1342   case $nonopt in
1343   NONE) target_alias=$host_alias ;;
1344   *) target_alias=$nonopt ;;
1345   esac ;;
1346 esac
1347
1348 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1349 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1350 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1351 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1352 echo "$ac_t""$target" 1>&6
1353
1354 echo $ac_n "checking build system type""... $ac_c" 1>&6
1355 echo "configure:1356: checking build system type" >&5
1356
1357 build_alias=$build
1358 case "$build_alias" in
1359 NONE)
1360   case $nonopt in
1361   NONE) build_alias=$host_alias ;;
1362   *) build_alias=$nonopt ;;
1363   esac ;;
1364 esac
1365
1366 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1367 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1368 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1369 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1370 echo "$ac_t""$build" 1>&6
1371
1372 test "$host_alias" != "$target_alias" &&
1373   test "$program_prefix$program_suffix$program_transform_name" = \
1374     NONENONEs,x,x, &&
1375   program_prefix=${target_alias}-
1376
1377
1378   case "$host_os" in
1379         *irix6*) cat >> confdefs.h <<\EOF
1380 #include <standards.h>
1381 EOF
1382
1383         ;;
1384 esac
1385
1386
1387     
1388     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1389 echo "configure:1390: checking config.cache system type" >&5
1390     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1391          test x"$ac_cv_host_system_type" != x"$host"; } ||
1392        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1393          test x"$ac_cv_build_system_type" != x"$build"; } ||
1394        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1395          test x"$ac_cv_target_system_type" != x"$target"; }; then
1396         echo "$ac_t""different" 1>&6
1397         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1398     else
1399         echo "$ac_t""same" 1>&6
1400     fi
1401     ac_cv_host_system_type="$host"
1402     ac_cv_build_system_type="$build"
1403     ac_cv_target_system_type="$target"
1404
1405
1406 DYNEXP=
1407
1408 #
1409 # Config CPPFLAG settings for strange OS's that must be set
1410 # before other tests.
1411 #
1412 case "$host_os" in
1413 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1414     *hpux*)
1415     
1416       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1417 echo "configure:1418: checking whether ${CC-cc} accepts -Ae" >&5
1418 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1419   echo $ac_n "(cached) $ac_c" 1>&6
1420 else
1421   echo 'void f(){}' > conftest.c
1422 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1423   ac_cv_prog_cc_Ae=yes
1424 else
1425   ac_cv_prog_cc_Ae=no
1426 fi
1427 rm -f conftest*
1428
1429 fi
1430
1431 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1432       # mmap on HPUX is completely broken...
1433       cat >> confdefs.h <<\EOF
1434 #define MMAP_BLACKLIST 1
1435 EOF
1436
1437       if test $ac_cv_prog_cc_Ae = yes; then
1438         CPPFLAGS="$CPPFLAGS -Ae"
1439       fi
1440 #
1441 # Defines needed for HPUX support.
1442 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1443 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1444 #
1445       case `uname -r` in
1446                         *9*|*10*)
1447                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1448                                 cat >> confdefs.h <<\EOF
1449 #define USE_BOTH_CRYPT_CALLS 1
1450 EOF
1451
1452                                 cat >> confdefs.h <<\EOF
1453 #define _HPUX_SOURCE 1
1454 EOF
1455
1456                                 cat >> confdefs.h <<\EOF
1457 #define _POSIX_SOURCE 1
1458 EOF
1459
1460                                 cat >> confdefs.h <<\EOF
1461 #define _ALIGNMENT_REQUIRED 1
1462 EOF
1463
1464                                 cat >> confdefs.h <<\EOF
1465 #define _MAX_ALIGNMENT 4
1466 EOF
1467
1468                                 ;;
1469                         *11*)
1470                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1471                                 cat >> confdefs.h <<\EOF
1472 #define USE_BOTH_CRYPT_CALLS 1
1473 EOF
1474
1475                                 cat >> confdefs.h <<\EOF
1476 #define _HPUX_SOURCE 1
1477 EOF
1478
1479                                 cat >> confdefs.h <<\EOF
1480 #define _POSIX_SOURCE 1
1481 EOF
1482
1483                                 cat >> confdefs.h <<\EOF
1484 #define _LARGEFILE64_SOURCE 1
1485 EOF
1486
1487                                 cat >> confdefs.h <<\EOF
1488 #define _ALIGNMENT_REQUIRED 1
1489 EOF
1490
1491                                 cat >> confdefs.h <<\EOF
1492 #define _MAX_ALIGNMENT 4
1493 EOF
1494
1495                                 ;;
1496       esac
1497       DYNEXP="-Wl,-E"
1498       ;;
1499
1500 #
1501 # CRAY Unicos has broken const handling
1502        *unicos*)
1503           echo "$ac_t""disabling const" 1>&6
1504           CPPFLAGS="$CPPFLAGS -Dconst="
1505           ;;
1506         
1507 #
1508 # AIX4.x doesn't even admit to having large
1509 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1510 #
1511     *aix4*)
1512           echo "$ac_t""enabling large file support" 1>&6
1513       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1514       cat >> confdefs.h <<\EOF
1515 #define _LARGE_FILES 1
1516 EOF
1517
1518       ;;    
1519 #
1520 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1521 # to the existance of large files..
1522 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1523 # recommendations on large file support, however it makes the
1524 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1525 # recommendation makes the compile fail on gcc2.7. JRA.
1526 #
1527         *solaris*)
1528                 case `uname -r` in
1529                         5.0*|5.1*|5.2*|5.3*|5.5*)
1530                                 echo "$ac_t""no large file support" 1>&6
1531                                 ;;
1532                         5.*)
1533                         echo "$ac_t""enabling large file support" 1>&6
1534                         if test "$ac_cv_prog_gcc" = yes; then
1535                                 ${CC-cc} -v >conftest.c 2>&1
1536                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1537                                 rm -fr conftest.c
1538                                 case "$ac_cv_gcc_compiler_version_number" in
1539                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1540                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1541                                                 cat >> confdefs.h <<\EOF
1542 #define _LARGEFILE64_SOURCE 1
1543 EOF
1544
1545                                                 ;;
1546                                         *)
1547                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1548                                                 cat >> confdefs.h <<\EOF
1549 #define _LARGEFILE64_SOURCE 1
1550 EOF
1551
1552                                                 cat >> confdefs.h <<\EOF
1553 #define _FILE_OFFSET_BITS 64
1554 EOF
1555
1556                                                 ;;
1557                                 esac
1558                         else
1559                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1560                                 cat >> confdefs.h <<\EOF
1561 #define _LARGEFILE64_SOURCE 1
1562 EOF
1563
1564                                 cat >> confdefs.h <<\EOF
1565 #define _FILE_OFFSET_BITS 64
1566 EOF
1567
1568                         fi
1569                         ;;
1570                 esac
1571                 ;;
1572 #
1573 # Tests needed for SINIX large file support.
1574 #
1575     *sysv4*)
1576       if test $host = mips-sni-sysv4 ; then
1577         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1578 echo "configure:1579: checking for LFS support" >&5
1579         old_CPPFLAGS="$CPPFLAGS"
1580         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1581         if test "$cross_compiling" = yes; then
1582   SINIX_LFS_SUPPORT=cross
1583 else
1584   cat > conftest.$ac_ext <<EOF
1585 #line 1586 "configure"
1586 #include "confdefs.h"
1587
1588 #include <unistd.h>
1589 main () {
1590 #if _LFS64_LARGEFILE == 1
1591 exit(0);
1592 #else
1593 exit(1);
1594 #endif
1595 }
1596 EOF
1597 if { (eval echo configure:1598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1598 then
1599   SINIX_LFS_SUPPORT=yes
1600 else
1601   echo "configure: failed program was:" >&5
1602   cat conftest.$ac_ext >&5
1603   rm -fr conftest*
1604   SINIX_LFS_SUPPORT=no
1605 fi
1606 rm -fr conftest*
1607 fi
1608
1609         CPPFLAGS="$old_CPPFLAGS"
1610         if test x$SINIX_LFS_SUPPORT = xyes ; then
1611           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1612           cat >> confdefs.h <<\EOF
1613 #define _LARGEFILE64_SOURCE 1
1614 EOF
1615
1616           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1617           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1618           LIBS="`getconf LFS64_LIBS` $LIBS"
1619         fi
1620       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1621       fi
1622     ;;
1623
1624 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1625 #
1626     *linux*)
1627         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1628 echo "configure:1629: checking for LFS support" >&5
1629         old_CPPFLAGS="$CPPFLAGS"
1630         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1631        if test "$cross_compiling" = yes; then
1632   LINUX_LFS_SUPPORT=cross
1633 else
1634   cat > conftest.$ac_ext <<EOF
1635 #line 1636 "configure"
1636 #include "confdefs.h"
1637
1638 #include <unistd.h>
1639 #include <sys/utsname.h>
1640 main() {
1641 #if _LFS64_LARGEFILE == 1
1642        struct utsname uts;
1643        char *release;
1644        int major, minor;
1645
1646        /* Ensure this is glibc 2.2 or higher */
1647 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1648        int libc_major = __GLIBC__;
1649        int libc_minor = __GLIBC_MINOR__;
1650
1651        if (libc_major < 2)
1652               exit(1);
1653        if (libc_minor < 2)
1654               exit(1);
1655 #endif
1656
1657        /* Ensure this is kernel 2.4 or higher */
1658
1659        uname(&uts);
1660        release = uts.release;
1661        major = atoi(strsep(&release, "."));
1662        minor = atoi(strsep(&release, "."));
1663
1664        if (major > 2 || (major == 2 && minor > 3))
1665                exit(0);
1666        exit(1);
1667 #else
1668        exit(1);
1669 #endif
1670 }
1671
1672 EOF
1673 if { (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1674 then
1675   LINUX_LFS_SUPPORT=yes
1676 else
1677   echo "configure: failed program was:" >&5
1678   cat conftest.$ac_ext >&5
1679   rm -fr conftest*
1680   LINUX_LFS_SUPPORT=no
1681 fi
1682 rm -fr conftest*
1683 fi
1684
1685         CPPFLAGS="$old_CPPFLAGS"
1686         if test x$LINUX_LFS_SUPPORT = xyes ; then
1687           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1688           cat >> confdefs.h <<\EOF
1689 #define _LARGEFILE64_SOURCE 1
1690 EOF
1691
1692           cat >> confdefs.h <<\EOF
1693 #define _FILE_OFFSET_BITS 64
1694 EOF
1695
1696           cat >> confdefs.h <<\EOF
1697 #define _GNU_SOURCE 1
1698 EOF
1699
1700         fi
1701        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1702                 ;;
1703
1704     *hurd*)
1705         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1706 echo "configure:1707: checking for LFS support" >&5
1707         old_CPPFLAGS="$CPPFLAGS"
1708         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1709         if test "$cross_compiling" = yes; then
1710   GLIBC_LFS_SUPPORT=cross
1711 else
1712   cat > conftest.$ac_ext <<EOF
1713 #line 1714 "configure"
1714 #include "confdefs.h"
1715
1716 #include <unistd.h>
1717 main () {
1718 #if _LFS64_LARGEFILE == 1
1719 exit(0);
1720 #else
1721 exit(1);
1722 #endif
1723 }
1724 EOF
1725 if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1726 then
1727   GLIBC_LFS_SUPPORT=yes
1728 else
1729   echo "configure: failed program was:" >&5
1730   cat conftest.$ac_ext >&5
1731   rm -fr conftest*
1732   GLIBC_LFS_SUPPORT=no
1733 fi
1734 rm -fr conftest*
1735 fi
1736
1737         CPPFLAGS="$old_CPPFLAGS"
1738         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1739           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1740           cat >> confdefs.h <<\EOF
1741 #define _LARGEFILE64_SOURCE 1
1742 EOF
1743
1744           cat >> confdefs.h <<\EOF
1745 #define _GNU_SOURCE 1
1746 EOF
1747
1748         fi
1749       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1750     ;;
1751
1752 esac
1753
1754 echo $ac_n "checking for inline""... $ac_c" 1>&6
1755 echo "configure:1756: checking for inline" >&5
1756 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1757   echo $ac_n "(cached) $ac_c" 1>&6
1758 else
1759   ac_cv_c_inline=no
1760 for ac_kw in inline __inline__ __inline; do
1761   cat > conftest.$ac_ext <<EOF
1762 #line 1763 "configure"
1763 #include "confdefs.h"
1764
1765 int main() {
1766 } $ac_kw foo() {
1767 ; return 0; }
1768 EOF
1769 if { (eval echo configure:1770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1770   rm -rf conftest*
1771   ac_cv_c_inline=$ac_kw; break
1772 else
1773   echo "configure: failed program was:" >&5
1774   cat conftest.$ac_ext >&5
1775 fi
1776 rm -f conftest*
1777 done
1778
1779 fi
1780
1781 echo "$ac_t""$ac_cv_c_inline" 1>&6
1782 case "$ac_cv_c_inline" in
1783   inline | yes) ;;
1784   no) cat >> confdefs.h <<\EOF
1785 #define inline 
1786 EOF
1787  ;;
1788   *)  cat >> confdefs.h <<EOF
1789 #define inline $ac_cv_c_inline
1790 EOF
1791  ;;
1792 esac
1793
1794 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1795 echo "configure:1796: checking how to run the C preprocessor" >&5
1796 # On Suns, sometimes $CPP names a directory.
1797 if test -n "$CPP" && test -d "$CPP"; then
1798   CPP=
1799 fi
1800 if test -z "$CPP"; then
1801 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1802   echo $ac_n "(cached) $ac_c" 1>&6
1803 else
1804     # This must be in double quotes, not single quotes, because CPP may get
1805   # substituted into the Makefile and "${CC-cc}" will confuse make.
1806   CPP="${CC-cc} -E"
1807   # On the NeXT, cc -E runs the code through the compiler's parser,
1808   # not just through cpp.
1809   cat > conftest.$ac_ext <<EOF
1810 #line 1811 "configure"
1811 #include "confdefs.h"
1812 #include <assert.h>
1813 Syntax Error
1814 EOF
1815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1816 { (eval echo configure:1817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1818 if test -z "$ac_err"; then
1819   :
1820 else
1821   echo "$ac_err" >&5
1822   echo "configure: failed program was:" >&5
1823   cat conftest.$ac_ext >&5
1824   rm -rf conftest*
1825   CPP="${CC-cc} -E -traditional-cpp"
1826   cat > conftest.$ac_ext <<EOF
1827 #line 1828 "configure"
1828 #include "confdefs.h"
1829 #include <assert.h>
1830 Syntax Error
1831 EOF
1832 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1833 { (eval echo configure:1834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1834 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1835 if test -z "$ac_err"; then
1836   :
1837 else
1838   echo "$ac_err" >&5
1839   echo "configure: failed program was:" >&5
1840   cat conftest.$ac_ext >&5
1841   rm -rf conftest*
1842   CPP="${CC-cc} -nologo -E"
1843   cat > conftest.$ac_ext <<EOF
1844 #line 1845 "configure"
1845 #include "confdefs.h"
1846 #include <assert.h>
1847 Syntax Error
1848 EOF
1849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1850 { (eval echo configure:1851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1852 if test -z "$ac_err"; then
1853   :
1854 else
1855   echo "$ac_err" >&5
1856   echo "configure: failed program was:" >&5
1857   cat conftest.$ac_ext >&5
1858   rm -rf conftest*
1859   CPP=/lib/cpp
1860 fi
1861 rm -f conftest*
1862 fi
1863 rm -f conftest*
1864 fi
1865 rm -f conftest*
1866   ac_cv_prog_CPP="$CPP"
1867 fi
1868   CPP="$ac_cv_prog_CPP"
1869 else
1870   ac_cv_prog_CPP="$CPP"
1871 fi
1872 echo "$ac_t""$CPP" 1>&6
1873
1874 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1875 echo "configure:1876: checking for ANSI C header files" >&5
1876 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1877   echo $ac_n "(cached) $ac_c" 1>&6
1878 else
1879   cat > conftest.$ac_ext <<EOF
1880 #line 1881 "configure"
1881 #include "confdefs.h"
1882 #include <stdlib.h>
1883 #include <stdarg.h>
1884 #include <string.h>
1885 #include <float.h>
1886 EOF
1887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1888 { (eval echo configure:1889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1890 if test -z "$ac_err"; then
1891   rm -rf conftest*
1892   ac_cv_header_stdc=yes
1893 else
1894   echo "$ac_err" >&5
1895   echo "configure: failed program was:" >&5
1896   cat conftest.$ac_ext >&5
1897   rm -rf conftest*
1898   ac_cv_header_stdc=no
1899 fi
1900 rm -f conftest*
1901
1902 if test $ac_cv_header_stdc = yes; then
1903   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1904 cat > conftest.$ac_ext <<EOF
1905 #line 1906 "configure"
1906 #include "confdefs.h"
1907 #include <string.h>
1908 EOF
1909 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1910   egrep "memchr" >/dev/null 2>&1; then
1911   :
1912 else
1913   rm -rf conftest*
1914   ac_cv_header_stdc=no
1915 fi
1916 rm -f conftest*
1917
1918 fi
1919
1920 if test $ac_cv_header_stdc = yes; then
1921   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1922 cat > conftest.$ac_ext <<EOF
1923 #line 1924 "configure"
1924 #include "confdefs.h"
1925 #include <stdlib.h>
1926 EOF
1927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1928   egrep "free" >/dev/null 2>&1; then
1929   :
1930 else
1931   rm -rf conftest*
1932   ac_cv_header_stdc=no
1933 fi
1934 rm -f conftest*
1935
1936 fi
1937
1938 if test $ac_cv_header_stdc = yes; then
1939   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1940 if test "$cross_compiling" = yes; then
1941   :
1942 else
1943   cat > conftest.$ac_ext <<EOF
1944 #line 1945 "configure"
1945 #include "confdefs.h"
1946 #include <ctype.h>
1947 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1948 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1949 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1950 int main () { int i; for (i = 0; i < 256; i++)
1951 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1952 exit (0); }
1953
1954 EOF
1955 if { (eval echo configure:1956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1956 then
1957   :
1958 else
1959   echo "configure: failed program was:" >&5
1960   cat conftest.$ac_ext >&5
1961   rm -fr conftest*
1962   ac_cv_header_stdc=no
1963 fi
1964 rm -fr conftest*
1965 fi
1966
1967 fi
1968 fi
1969
1970 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1971 if test $ac_cv_header_stdc = yes; then
1972   cat >> confdefs.h <<\EOF
1973 #define STDC_HEADERS 1
1974 EOF
1975
1976 fi
1977
1978 ac_header_dirent=no
1979 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1980 do
1981 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1982 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1983 echo "configure:1984: checking for $ac_hdr that defines DIR" >&5
1984 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1985   echo $ac_n "(cached) $ac_c" 1>&6
1986 else
1987   cat > conftest.$ac_ext <<EOF
1988 #line 1989 "configure"
1989 #include "confdefs.h"
1990 #include <sys/types.h>
1991 #include <$ac_hdr>
1992 int main() {
1993 DIR *dirp = 0;
1994 ; return 0; }
1995 EOF
1996 if { (eval echo configure:1997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1997   rm -rf conftest*
1998   eval "ac_cv_header_dirent_$ac_safe=yes"
1999 else
2000   echo "configure: failed program was:" >&5
2001   cat conftest.$ac_ext >&5
2002   rm -rf conftest*
2003   eval "ac_cv_header_dirent_$ac_safe=no"
2004 fi
2005 rm -f conftest*
2006 fi
2007 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2008   echo "$ac_t""yes" 1>&6
2009     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2010   cat >> confdefs.h <<EOF
2011 #define $ac_tr_hdr 1
2012 EOF
2013  ac_header_dirent=$ac_hdr; break
2014 else
2015   echo "$ac_t""no" 1>&6
2016 fi
2017 done
2018 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2019 if test $ac_header_dirent = dirent.h; then
2020 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2021 echo "configure:2022: checking for opendir in -ldir" >&5
2022 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2023 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2024   echo $ac_n "(cached) $ac_c" 1>&6
2025 else
2026   ac_save_LIBS="$LIBS"
2027 LIBS="-ldir  $LIBS"
2028 cat > conftest.$ac_ext <<EOF
2029 #line 2030 "configure"
2030 #include "confdefs.h"
2031 /* Override any gcc2 internal prototype to avoid an error.  */
2032 /* We use char because int might match the return type of a gcc2
2033     builtin and then its argument prototype would still apply.  */
2034 char opendir();
2035
2036 int main() {
2037 opendir()
2038 ; return 0; }
2039 EOF
2040 if { (eval echo configure:2041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2041   rm -rf conftest*
2042   eval "ac_cv_lib_$ac_lib_var=yes"
2043 else
2044   echo "configure: failed program was:" >&5
2045   cat conftest.$ac_ext >&5
2046   rm -rf conftest*
2047   eval "ac_cv_lib_$ac_lib_var=no"
2048 fi
2049 rm -f conftest*
2050 LIBS="$ac_save_LIBS"
2051
2052 fi
2053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2054   echo "$ac_t""yes" 1>&6
2055   LIBS="$LIBS -ldir"
2056 else
2057   echo "$ac_t""no" 1>&6
2058 fi
2059
2060 else
2061 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2062 echo "configure:2063: checking for opendir in -lx" >&5
2063 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2064 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2065   echo $ac_n "(cached) $ac_c" 1>&6
2066 else
2067   ac_save_LIBS="$LIBS"
2068 LIBS="-lx  $LIBS"
2069 cat > conftest.$ac_ext <<EOF
2070 #line 2071 "configure"
2071 #include "confdefs.h"
2072 /* Override any gcc2 internal prototype to avoid an error.  */
2073 /* We use char because int might match the return type of a gcc2
2074     builtin and then its argument prototype would still apply.  */
2075 char opendir();
2076
2077 int main() {
2078 opendir()
2079 ; return 0; }
2080 EOF
2081 if { (eval echo configure:2082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2082   rm -rf conftest*
2083   eval "ac_cv_lib_$ac_lib_var=yes"
2084 else
2085   echo "configure: failed program was:" >&5
2086   cat conftest.$ac_ext >&5
2087   rm -rf conftest*
2088   eval "ac_cv_lib_$ac_lib_var=no"
2089 fi
2090 rm -f conftest*
2091 LIBS="$ac_save_LIBS"
2092
2093 fi
2094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2095   echo "$ac_t""yes" 1>&6
2096   LIBS="$LIBS -lx"
2097 else
2098   echo "$ac_t""no" 1>&6
2099 fi
2100
2101 fi
2102
2103 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2104 echo "configure:2105: checking whether time.h and sys/time.h may both be included" >&5
2105 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2106   echo $ac_n "(cached) $ac_c" 1>&6
2107 else
2108   cat > conftest.$ac_ext <<EOF
2109 #line 2110 "configure"
2110 #include "confdefs.h"
2111 #include <sys/types.h>
2112 #include <sys/time.h>
2113 #include <time.h>
2114 int main() {
2115 struct tm *tp;
2116 ; return 0; }
2117 EOF
2118 if { (eval echo configure:2119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2119   rm -rf conftest*
2120   ac_cv_header_time=yes
2121 else
2122   echo "configure: failed program was:" >&5
2123   cat conftest.$ac_ext >&5
2124   rm -rf conftest*
2125   ac_cv_header_time=no
2126 fi
2127 rm -f conftest*
2128 fi
2129
2130 echo "$ac_t""$ac_cv_header_time" 1>&6
2131 if test $ac_cv_header_time = yes; then
2132   cat >> confdefs.h <<\EOF
2133 #define TIME_WITH_SYS_TIME 1
2134 EOF
2135
2136 fi
2137
2138 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2139 echo "configure:2140: checking for sys/wait.h that is POSIX.1 compatible" >&5
2140 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2141   echo $ac_n "(cached) $ac_c" 1>&6
2142 else
2143   cat > conftest.$ac_ext <<EOF
2144 #line 2145 "configure"
2145 #include "confdefs.h"
2146 #include <sys/types.h>
2147 #include <sys/wait.h>
2148 #ifndef WEXITSTATUS
2149 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2150 #endif
2151 #ifndef WIFEXITED
2152 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2153 #endif
2154 int main() {
2155 int s;
2156 wait (&s);
2157 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2158 ; return 0; }
2159 EOF
2160 if { (eval echo configure:2161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2161   rm -rf conftest*
2162   ac_cv_header_sys_wait_h=yes
2163 else
2164   echo "configure: failed program was:" >&5
2165   cat conftest.$ac_ext >&5
2166   rm -rf conftest*
2167   ac_cv_header_sys_wait_h=no
2168 fi
2169 rm -f conftest*
2170 fi
2171
2172 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2173 if test $ac_cv_header_sys_wait_h = yes; then
2174   cat >> confdefs.h <<\EOF
2175 #define HAVE_SYS_WAIT_H 1
2176 EOF
2177
2178 fi
2179
2180 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2181 do
2182 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2183 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2184 echo "configure:2185: checking for $ac_hdr" >&5
2185 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2186   echo $ac_n "(cached) $ac_c" 1>&6
2187 else
2188   cat > conftest.$ac_ext <<EOF
2189 #line 2190 "configure"
2190 #include "confdefs.h"
2191 #include <$ac_hdr>
2192 EOF
2193 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2194 { (eval echo configure:2195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2195 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2196 if test -z "$ac_err"; then
2197   rm -rf conftest*
2198   eval "ac_cv_header_$ac_safe=yes"
2199 else
2200   echo "$ac_err" >&5
2201   echo "configure: failed program was:" >&5
2202   cat conftest.$ac_ext >&5
2203   rm -rf conftest*
2204   eval "ac_cv_header_$ac_safe=no"
2205 fi
2206 rm -f conftest*
2207 fi
2208 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2209   echo "$ac_t""yes" 1>&6
2210     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2211   cat >> confdefs.h <<EOF
2212 #define $ac_tr_hdr 1
2213 EOF
2214  
2215 else
2216   echo "$ac_t""no" 1>&6
2217 fi
2218 done
2219
2220 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2221 do
2222 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2223 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2224 echo "configure:2225: checking for $ac_hdr" >&5
2225 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2226   echo $ac_n "(cached) $ac_c" 1>&6
2227 else
2228   cat > conftest.$ac_ext <<EOF
2229 #line 2230 "configure"
2230 #include "confdefs.h"
2231 #include <$ac_hdr>
2232 EOF
2233 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2234 { (eval echo configure:2235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2235 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2236 if test -z "$ac_err"; then
2237   rm -rf conftest*
2238   eval "ac_cv_header_$ac_safe=yes"
2239 else
2240   echo "$ac_err" >&5
2241   echo "configure: failed program was:" >&5
2242   cat conftest.$ac_ext >&5
2243   rm -rf conftest*
2244   eval "ac_cv_header_$ac_safe=no"
2245 fi
2246 rm -f conftest*
2247 fi
2248 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2249   echo "$ac_t""yes" 1>&6
2250     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2251   cat >> confdefs.h <<EOF
2252 #define $ac_tr_hdr 1
2253 EOF
2254  
2255 else
2256   echo "$ac_t""no" 1>&6
2257 fi
2258 done
2259
2260 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2261 do
2262 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2263 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2264 echo "configure:2265: checking for $ac_hdr" >&5
2265 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2266   echo $ac_n "(cached) $ac_c" 1>&6
2267 else
2268   cat > conftest.$ac_ext <<EOF
2269 #line 2270 "configure"
2270 #include "confdefs.h"
2271 #include <$ac_hdr>
2272 EOF
2273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2274 { (eval echo configure:2275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2276 if test -z "$ac_err"; then
2277   rm -rf conftest*
2278   eval "ac_cv_header_$ac_safe=yes"
2279 else
2280   echo "$ac_err" >&5
2281   echo "configure: failed program was:" >&5
2282   cat conftest.$ac_ext >&5
2283   rm -rf conftest*
2284   eval "ac_cv_header_$ac_safe=no"
2285 fi
2286 rm -f conftest*
2287 fi
2288 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2289   echo "$ac_t""yes" 1>&6
2290     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2291   cat >> confdefs.h <<EOF
2292 #define $ac_tr_hdr 1
2293 EOF
2294  
2295 else
2296   echo "$ac_t""no" 1>&6
2297 fi
2298 done
2299
2300 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2301 do
2302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2304 echo "configure:2305: checking for $ac_hdr" >&5
2305 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2306   echo $ac_n "(cached) $ac_c" 1>&6
2307 else
2308   cat > conftest.$ac_ext <<EOF
2309 #line 2310 "configure"
2310 #include "confdefs.h"
2311 #include <$ac_hdr>
2312 EOF
2313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2314 { (eval echo configure:2315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2316 if test -z "$ac_err"; then
2317   rm -rf conftest*
2318   eval "ac_cv_header_$ac_safe=yes"
2319 else
2320   echo "$ac_err" >&5
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -rf conftest*
2324   eval "ac_cv_header_$ac_safe=no"
2325 fi
2326 rm -f conftest*
2327 fi
2328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2329   echo "$ac_t""yes" 1>&6
2330     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2331   cat >> confdefs.h <<EOF
2332 #define $ac_tr_hdr 1
2333 EOF
2334  
2335 else
2336   echo "$ac_t""no" 1>&6
2337 fi
2338 done
2339
2340 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
2341 do
2342 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2343 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2344 echo "configure:2345: checking for $ac_hdr" >&5
2345 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2346   echo $ac_n "(cached) $ac_c" 1>&6
2347 else
2348   cat > conftest.$ac_ext <<EOF
2349 #line 2350 "configure"
2350 #include "confdefs.h"
2351 #include <$ac_hdr>
2352 EOF
2353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2354 { (eval echo configure:2355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2356 if test -z "$ac_err"; then
2357   rm -rf conftest*
2358   eval "ac_cv_header_$ac_safe=yes"
2359 else
2360   echo "$ac_err" >&5
2361   echo "configure: failed program was:" >&5
2362   cat conftest.$ac_ext >&5
2363   rm -rf conftest*
2364   eval "ac_cv_header_$ac_safe=no"
2365 fi
2366 rm -f conftest*
2367 fi
2368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2369   echo "$ac_t""yes" 1>&6
2370     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2371   cat >> confdefs.h <<EOF
2372 #define $ac_tr_hdr 1
2373 EOF
2374  
2375 else
2376   echo "$ac_t""no" 1>&6
2377 fi
2378 done
2379
2380 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2381 do
2382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2384 echo "configure:2385: checking for $ac_hdr" >&5
2385 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2386   echo $ac_n "(cached) $ac_c" 1>&6
2387 else
2388   cat > conftest.$ac_ext <<EOF
2389 #line 2390 "configure"
2390 #include "confdefs.h"
2391 #include <$ac_hdr>
2392 EOF
2393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2394 { (eval echo configure:2395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2396 if test -z "$ac_err"; then
2397   rm -rf conftest*
2398   eval "ac_cv_header_$ac_safe=yes"
2399 else
2400   echo "$ac_err" >&5
2401   echo "configure: failed program was:" >&5
2402   cat conftest.$ac_ext >&5
2403   rm -rf conftest*
2404   eval "ac_cv_header_$ac_safe=no"
2405 fi
2406 rm -f conftest*
2407 fi
2408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2409   echo "$ac_t""yes" 1>&6
2410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2411   cat >> confdefs.h <<EOF
2412 #define $ac_tr_hdr 1
2413 EOF
2414  
2415 else
2416   echo "$ac_t""no" 1>&6
2417 fi
2418 done
2419
2420 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2421 do
2422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2424 echo "configure:2425: checking for $ac_hdr" >&5
2425 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2426   echo $ac_n "(cached) $ac_c" 1>&6
2427 else
2428   cat > conftest.$ac_ext <<EOF
2429 #line 2430 "configure"
2430 #include "confdefs.h"
2431 #include <$ac_hdr>
2432 EOF
2433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2434 { (eval echo configure:2435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2436 if test -z "$ac_err"; then
2437   rm -rf conftest*
2438   eval "ac_cv_header_$ac_safe=yes"
2439 else
2440   echo "$ac_err" >&5
2441   echo "configure: failed program was:" >&5
2442   cat conftest.$ac_ext >&5
2443   rm -rf conftest*
2444   eval "ac_cv_header_$ac_safe=no"
2445 fi
2446 rm -f conftest*
2447 fi
2448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2449   echo "$ac_t""yes" 1>&6
2450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2451   cat >> confdefs.h <<EOF
2452 #define $ac_tr_hdr 1
2453 EOF
2454  
2455 else
2456   echo "$ac_t""no" 1>&6
2457 fi
2458 done
2459
2460 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2461 do
2462 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2463 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2464 echo "configure:2465: checking for $ac_hdr" >&5
2465 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2466   echo $ac_n "(cached) $ac_c" 1>&6
2467 else
2468   cat > conftest.$ac_ext <<EOF
2469 #line 2470 "configure"
2470 #include "confdefs.h"
2471 #include <$ac_hdr>
2472 EOF
2473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2474 { (eval echo configure:2475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2475 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2476 if test -z "$ac_err"; then
2477   rm -rf conftest*
2478   eval "ac_cv_header_$ac_safe=yes"
2479 else
2480   echo "$ac_err" >&5
2481   echo "configure: failed program was:" >&5
2482   cat conftest.$ac_ext >&5
2483   rm -rf conftest*
2484   eval "ac_cv_header_$ac_safe=no"
2485 fi
2486 rm -f conftest*
2487 fi
2488 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2489   echo "$ac_t""yes" 1>&6
2490     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2491   cat >> confdefs.h <<EOF
2492 #define $ac_tr_hdr 1
2493 EOF
2494  
2495 else
2496   echo "$ac_t""no" 1>&6
2497 fi
2498 done
2499
2500
2501 #
2502 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2503 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2504 #
2505 case "$host_os" in
2506     *hpux*)
2507                 cat > conftest.$ac_ext <<EOF
2508 #line 2509 "configure"
2509 #include "confdefs.h"
2510 #include <shadow.h>
2511 int main() {
2512 struct spwd testme
2513 ; return 0; }
2514 EOF
2515 if { (eval echo configure:2516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2516   rm -rf conftest*
2517   ac_cv_header_shadow_h=yes
2518 else
2519   echo "configure: failed program was:" >&5
2520   cat conftest.$ac_ext >&5
2521   rm -rf conftest*
2522   ac_cv_header_shadow_h=no
2523 fi
2524 rm -f conftest*
2525                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2526                    cat >> confdefs.h <<\EOF
2527 #define HAVE_SHADOW_H 1
2528 EOF
2529
2530                 fi
2531         ;;
2532 esac
2533 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2534 do
2535 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2536 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2537 echo "configure:2538: checking for $ac_hdr" >&5
2538 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2539   echo $ac_n "(cached) $ac_c" 1>&6
2540 else
2541   cat > conftest.$ac_ext <<EOF
2542 #line 2543 "configure"
2543 #include "confdefs.h"
2544 #include <$ac_hdr>
2545 EOF
2546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2547 { (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2549 if test -z "$ac_err"; then
2550   rm -rf conftest*
2551   eval "ac_cv_header_$ac_safe=yes"
2552 else
2553   echo "$ac_err" >&5
2554   echo "configure: failed program was:" >&5
2555   cat conftest.$ac_ext >&5
2556   rm -rf conftest*
2557   eval "ac_cv_header_$ac_safe=no"
2558 fi
2559 rm -f conftest*
2560 fi
2561 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2562   echo "$ac_t""yes" 1>&6
2563     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2564   cat >> confdefs.h <<EOF
2565 #define $ac_tr_hdr 1
2566 EOF
2567  
2568 else
2569   echo "$ac_t""no" 1>&6
2570 fi
2571 done
2572
2573 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2574 do
2575 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2576 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2577 echo "configure:2578: checking for $ac_hdr" >&5
2578 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2579   echo $ac_n "(cached) $ac_c" 1>&6
2580 else
2581   cat > conftest.$ac_ext <<EOF
2582 #line 2583 "configure"
2583 #include "confdefs.h"
2584 #include <$ac_hdr>
2585 EOF
2586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2587 { (eval echo configure:2588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2589 if test -z "$ac_err"; then
2590   rm -rf conftest*
2591   eval "ac_cv_header_$ac_safe=yes"
2592 else
2593   echo "$ac_err" >&5
2594   echo "configure: failed program was:" >&5
2595   cat conftest.$ac_ext >&5
2596   rm -rf conftest*
2597   eval "ac_cv_header_$ac_safe=no"
2598 fi
2599 rm -f conftest*
2600 fi
2601 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2602   echo "$ac_t""yes" 1>&6
2603     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2604   cat >> confdefs.h <<EOF
2605 #define $ac_tr_hdr 1
2606 EOF
2607  
2608 else
2609   echo "$ac_t""no" 1>&6
2610 fi
2611 done
2612
2613 for ac_hdr in stropts.h poll.h
2614 do
2615 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2616 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2617 echo "configure:2618: checking for $ac_hdr" >&5
2618 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2619   echo $ac_n "(cached) $ac_c" 1>&6
2620 else
2621   cat > conftest.$ac_ext <<EOF
2622 #line 2623 "configure"
2623 #include "confdefs.h"
2624 #include <$ac_hdr>
2625 EOF
2626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2627 { (eval echo configure:2628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2629 if test -z "$ac_err"; then
2630   rm -rf conftest*
2631   eval "ac_cv_header_$ac_safe=yes"
2632 else
2633   echo "$ac_err" >&5
2634   echo "configure: failed program was:" >&5
2635   cat conftest.$ac_ext >&5
2636   rm -rf conftest*
2637   eval "ac_cv_header_$ac_safe=no"
2638 fi
2639 rm -f conftest*
2640 fi
2641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2642   echo "$ac_t""yes" 1>&6
2643     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2644   cat >> confdefs.h <<EOF
2645 #define $ac_tr_hdr 1
2646 EOF
2647  
2648 else
2649   echo "$ac_t""no" 1>&6
2650 fi
2651 done
2652
2653 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2654 do
2655 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2656 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2657 echo "configure:2658: checking for $ac_hdr" >&5
2658 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2659   echo $ac_n "(cached) $ac_c" 1>&6
2660 else
2661   cat > conftest.$ac_ext <<EOF
2662 #line 2663 "configure"
2663 #include "confdefs.h"
2664 #include <$ac_hdr>
2665 EOF
2666 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2667 { (eval echo configure:2668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2668 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2669 if test -z "$ac_err"; then
2670   rm -rf conftest*
2671   eval "ac_cv_header_$ac_safe=yes"
2672 else
2673   echo "$ac_err" >&5
2674   echo "configure: failed program was:" >&5
2675   cat conftest.$ac_ext >&5
2676   rm -rf conftest*
2677   eval "ac_cv_header_$ac_safe=no"
2678 fi
2679 rm -f conftest*
2680 fi
2681 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2682   echo "$ac_t""yes" 1>&6
2683     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2684   cat >> confdefs.h <<EOF
2685 #define $ac_tr_hdr 1
2686 EOF
2687  
2688 else
2689   echo "$ac_t""no" 1>&6
2690 fi
2691 done
2692
2693 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2694 do
2695 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2696 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2697 echo "configure:2698: checking for $ac_hdr" >&5
2698 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2699   echo $ac_n "(cached) $ac_c" 1>&6
2700 else
2701   cat > conftest.$ac_ext <<EOF
2702 #line 2703 "configure"
2703 #include "confdefs.h"
2704 #include <$ac_hdr>
2705 EOF
2706 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2707 { (eval echo configure:2708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2708 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2709 if test -z "$ac_err"; then
2710   rm -rf conftest*
2711   eval "ac_cv_header_$ac_safe=yes"
2712 else
2713   echo "$ac_err" >&5
2714   echo "configure: failed program was:" >&5
2715   cat conftest.$ac_ext >&5
2716   rm -rf conftest*
2717   eval "ac_cv_header_$ac_safe=no"
2718 fi
2719 rm -f conftest*
2720 fi
2721 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2722   echo "$ac_t""yes" 1>&6
2723     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2724   cat >> confdefs.h <<EOF
2725 #define $ac_tr_hdr 1
2726 EOF
2727  
2728 else
2729   echo "$ac_t""no" 1>&6
2730 fi
2731 done
2732
2733
2734 # For experimental utmp support (lastlog on some BSD-like systems)
2735 for ac_hdr in utmp.h utmpx.h lastlog.h
2736 do
2737 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2738 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2739 echo "configure:2740: checking for $ac_hdr" >&5
2740 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2741   echo $ac_n "(cached) $ac_c" 1>&6
2742 else
2743   cat > conftest.$ac_ext <<EOF
2744 #line 2745 "configure"
2745 #include "confdefs.h"
2746 #include <$ac_hdr>
2747 EOF
2748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2749 { (eval echo configure:2750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2751 if test -z "$ac_err"; then
2752   rm -rf conftest*
2753   eval "ac_cv_header_$ac_safe=yes"
2754 else
2755   echo "$ac_err" >&5
2756   echo "configure: failed program was:" >&5
2757   cat conftest.$ac_ext >&5
2758   rm -rf conftest*
2759   eval "ac_cv_header_$ac_safe=no"
2760 fi
2761 rm -f conftest*
2762 fi
2763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2764   echo "$ac_t""yes" 1>&6
2765     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2766   cat >> confdefs.h <<EOF
2767 #define $ac_tr_hdr 1
2768 EOF
2769  
2770 else
2771   echo "$ac_t""no" 1>&6
2772 fi
2773 done
2774
2775  
2776 # For quotas on Veritas VxFS filesystems
2777 for ac_hdr in sys/fs/vx_quota.h
2778 do
2779 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2780 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2781 echo "configure:2782: checking for $ac_hdr" >&5
2782 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2783   echo $ac_n "(cached) $ac_c" 1>&6
2784 else
2785   cat > conftest.$ac_ext <<EOF
2786 #line 2787 "configure"
2787 #include "confdefs.h"
2788 #include <$ac_hdr>
2789 EOF
2790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2791 { (eval echo configure:2792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2793 if test -z "$ac_err"; then
2794   rm -rf conftest*
2795   eval "ac_cv_header_$ac_safe=yes"
2796 else
2797   echo "$ac_err" >&5
2798   echo "configure: failed program was:" >&5
2799   cat conftest.$ac_ext >&5
2800   rm -rf conftest*
2801   eval "ac_cv_header_$ac_safe=no"
2802 fi
2803 rm -f conftest*
2804 fi
2805 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2806   echo "$ac_t""yes" 1>&6
2807     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2808   cat >> confdefs.h <<EOF
2809 #define $ac_tr_hdr 1
2810 EOF
2811  
2812 else
2813   echo "$ac_t""no" 1>&6
2814 fi
2815 done
2816
2817
2818 # For quotas on Linux XFS filesystems
2819 for ac_hdr in linux/xqm.h
2820 do
2821 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2822 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2823 echo "configure:2824: checking for $ac_hdr" >&5
2824 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2825   echo $ac_n "(cached) $ac_c" 1>&6
2826 else
2827   cat > conftest.$ac_ext <<EOF
2828 #line 2829 "configure"
2829 #include "confdefs.h"
2830 #include <$ac_hdr>
2831 EOF
2832 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2833 { (eval echo configure:2834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2834 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2835 if test -z "$ac_err"; then
2836   rm -rf conftest*
2837   eval "ac_cv_header_$ac_safe=yes"
2838 else
2839   echo "$ac_err" >&5
2840   echo "configure: failed program was:" >&5
2841   cat conftest.$ac_ext >&5
2842   rm -rf conftest*
2843   eval "ac_cv_header_$ac_safe=no"
2844 fi
2845 rm -f conftest*
2846 fi
2847 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2848   echo "$ac_t""yes" 1>&6
2849     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2850   cat >> confdefs.h <<EOF
2851 #define $ac_tr_hdr 1
2852 EOF
2853  
2854 else
2855   echo "$ac_t""no" 1>&6
2856 fi
2857 done
2858
2859
2860 echo $ac_n "checking size of int""... $ac_c" 1>&6
2861 echo "configure:2862: checking size of int" >&5
2862 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2863   echo $ac_n "(cached) $ac_c" 1>&6
2864 else
2865   if test "$cross_compiling" = yes; then
2866   ac_cv_sizeof_int=cross
2867 else
2868   cat > conftest.$ac_ext <<EOF
2869 #line 2870 "configure"
2870 #include "confdefs.h"
2871 #include <stdio.h>
2872 int main()
2873 {
2874   FILE *f=fopen("conftestval", "w");
2875   if (!f) return(1);
2876   fprintf(f, "%d\n", sizeof(int));
2877   return(0);
2878 }
2879 EOF
2880 if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2881 then
2882   ac_cv_sizeof_int=`cat conftestval`
2883 else
2884   echo "configure: failed program was:" >&5
2885   cat conftest.$ac_ext >&5
2886   rm -fr conftest*
2887   ac_cv_sizeof_int=0
2888 fi
2889 rm -fr conftest*
2890 fi
2891
2892 fi
2893 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2894 cat >> confdefs.h <<EOF
2895 #define SIZEOF_INT $ac_cv_sizeof_int
2896 EOF
2897
2898
2899 echo $ac_n "checking size of long""... $ac_c" 1>&6
2900 echo "configure:2901: checking size of long" >&5
2901 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2902   echo $ac_n "(cached) $ac_c" 1>&6
2903 else
2904   if test "$cross_compiling" = yes; then
2905   ac_cv_sizeof_long=cross
2906 else
2907   cat > conftest.$ac_ext <<EOF
2908 #line 2909 "configure"
2909 #include "confdefs.h"
2910 #include <stdio.h>
2911 int main()
2912 {
2913   FILE *f=fopen("conftestval", "w");
2914   if (!f) return(1);
2915   fprintf(f, "%d\n", sizeof(long));
2916   return(0);
2917 }
2918 EOF
2919 if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2920 then
2921   ac_cv_sizeof_long=`cat conftestval`
2922 else
2923   echo "configure: failed program was:" >&5
2924   cat conftest.$ac_ext >&5
2925   rm -fr conftest*
2926   ac_cv_sizeof_long=0
2927 fi
2928 rm -fr conftest*
2929 fi
2930
2931 fi
2932 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2933 cat >> confdefs.h <<EOF
2934 #define SIZEOF_LONG $ac_cv_sizeof_long
2935 EOF
2936
2937
2938 echo $ac_n "checking size of short""... $ac_c" 1>&6
2939 echo "configure:2940: checking size of short" >&5
2940 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2941   echo $ac_n "(cached) $ac_c" 1>&6
2942 else
2943   if test "$cross_compiling" = yes; then
2944   ac_cv_sizeof_short=cross
2945 else
2946   cat > conftest.$ac_ext <<EOF
2947 #line 2948 "configure"
2948 #include "confdefs.h"
2949 #include <stdio.h>
2950 int main()
2951 {
2952   FILE *f=fopen("conftestval", "w");
2953   if (!f) return(1);
2954   fprintf(f, "%d\n", sizeof(short));
2955   return(0);
2956 }
2957 EOF
2958 if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2959 then
2960   ac_cv_sizeof_short=`cat conftestval`
2961 else
2962   echo "configure: failed program was:" >&5
2963   cat conftest.$ac_ext >&5
2964   rm -fr conftest*
2965   ac_cv_sizeof_short=0
2966 fi
2967 rm -fr conftest*
2968 fi
2969
2970 fi
2971 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2972 cat >> confdefs.h <<EOF
2973 #define SIZEOF_SHORT $ac_cv_sizeof_short
2974 EOF
2975
2976
2977
2978 echo $ac_n "checking for working const""... $ac_c" 1>&6
2979 echo "configure:2980: checking for working const" >&5
2980 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2981   echo $ac_n "(cached) $ac_c" 1>&6
2982 else
2983   cat > conftest.$ac_ext <<EOF
2984 #line 2985 "configure"
2985 #include "confdefs.h"
2986
2987 int main() {
2988
2989 /* Ultrix mips cc rejects this.  */
2990 typedef int charset[2]; const charset x;
2991 /* SunOS 4.1.1 cc rejects this.  */
2992 char const *const *ccp;
2993 char **p;
2994 /* NEC SVR4.0.2 mips cc rejects this.  */
2995 struct point {int x, y;};
2996 static struct point const zero = {0,0};
2997 /* AIX XL C 1.02.0.0 rejects this.
2998    It does not let you subtract one const X* pointer from another in an arm
2999    of an if-expression whose if-part is not a constant expression */
3000 const char *g = "string";
3001 ccp = &g + (g ? g-g : 0);
3002 /* HPUX 7.0 cc rejects these. */
3003 ++ccp;
3004 p = (char**) ccp;
3005 ccp = (char const *const *) p;
3006 { /* SCO 3.2v4 cc rejects this.  */
3007   char *t;
3008   char const *s = 0 ? (char *) 0 : (char const *) 0;
3009
3010   *t++ = 0;
3011 }
3012 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3013   int x[] = {25, 17};
3014   const int *foo = &x[0];
3015   ++foo;
3016 }
3017 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3018   typedef const int *iptr;
3019   iptr p = 0;
3020   ++p;
3021 }
3022 { /* AIX XL C 1.02.0.0 rejects this saying
3023      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3024   struct s { int j; const int *ap[3]; };
3025   struct s *b; b->j = 5;
3026 }
3027 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3028   const int foo = 10;
3029 }
3030
3031 ; return 0; }
3032 EOF
3033 if { (eval echo configure:3034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3034   rm -rf conftest*
3035   ac_cv_c_const=yes
3036 else
3037   echo "configure: failed program was:" >&5
3038   cat conftest.$ac_ext >&5
3039   rm -rf conftest*
3040   ac_cv_c_const=no
3041 fi
3042 rm -f conftest*
3043 fi
3044
3045 echo "$ac_t""$ac_cv_c_const" 1>&6
3046 if test $ac_cv_c_const = no; then
3047   cat >> confdefs.h <<\EOF
3048 #define const 
3049 EOF
3050
3051 fi
3052
3053 echo $ac_n "checking for inline""... $ac_c" 1>&6
3054 echo "configure:3055: checking for inline" >&5
3055 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3056   echo $ac_n "(cached) $ac_c" 1>&6
3057 else
3058   ac_cv_c_inline=no
3059 for ac_kw in inline __inline__ __inline; do
3060   cat > conftest.$ac_ext <<EOF
3061 #line 3062 "configure"
3062 #include "confdefs.h"
3063
3064 int main() {
3065 } $ac_kw foo() {
3066 ; return 0; }
3067 EOF
3068 if { (eval echo configure:3069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3069   rm -rf conftest*
3070   ac_cv_c_inline=$ac_kw; break
3071 else
3072   echo "configure: failed program was:" >&5
3073   cat conftest.$ac_ext >&5
3074 fi
3075 rm -f conftest*
3076 done
3077
3078 fi
3079
3080 echo "$ac_t""$ac_cv_c_inline" 1>&6
3081 case "$ac_cv_c_inline" in
3082   inline | yes) ;;
3083   no) cat >> confdefs.h <<\EOF
3084 #define inline 
3085 EOF
3086  ;;
3087   *)  cat >> confdefs.h <<EOF
3088 #define inline $ac_cv_c_inline
3089 EOF
3090  ;;
3091 esac
3092
3093 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3094 echo "configure:3095: checking whether byte ordering is bigendian" >&5
3095 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3096   echo $ac_n "(cached) $ac_c" 1>&6
3097 else
3098   ac_cv_c_bigendian=unknown
3099 # See if sys/param.h defines the BYTE_ORDER macro.
3100 cat > conftest.$ac_ext <<EOF
3101 #line 3102 "configure"
3102 #include "confdefs.h"
3103 #include <sys/types.h>
3104 #include <sys/param.h>
3105 int main() {
3106
3107 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3108  bogus endian macros
3109 #endif
3110 ; return 0; }
3111 EOF
3112 if { (eval echo configure:3113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3113   rm -rf conftest*
3114   # It does; now see whether it defined to BIG_ENDIAN or not.
3115 cat > conftest.$ac_ext <<EOF
3116 #line 3117 "configure"
3117 #include "confdefs.h"
3118 #include <sys/types.h>
3119 #include <sys/param.h>
3120 int main() {
3121
3122 #if BYTE_ORDER != BIG_ENDIAN
3123  not big endian
3124 #endif
3125 ; return 0; }
3126 EOF
3127 if { (eval echo configure:3128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3128   rm -rf conftest*
3129   ac_cv_c_bigendian=yes
3130 else
3131   echo "configure: failed program was:" >&5
3132   cat conftest.$ac_ext >&5
3133   rm -rf conftest*
3134   ac_cv_c_bigendian=no
3135 fi
3136 rm -f conftest*
3137 else
3138   echo "configure: failed program was:" >&5
3139   cat conftest.$ac_ext >&5
3140 fi
3141 rm -f conftest*
3142 if test $ac_cv_c_bigendian = unknown; then
3143 if test "$cross_compiling" = yes; then
3144     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3145 else
3146   cat > conftest.$ac_ext <<EOF
3147 #line 3148 "configure"
3148 #include "confdefs.h"
3149 main () {
3150   /* Are we little or big endian?  From Harbison&Steele.  */
3151   union
3152   {
3153     long l;
3154     char c[sizeof (long)];
3155   } u;
3156   u.l = 1;
3157   exit (u.c[sizeof (long) - 1] == 1);
3158 }
3159 EOF
3160 if { (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3161 then
3162   ac_cv_c_bigendian=no
3163 else
3164   echo "configure: failed program was:" >&5
3165   cat conftest.$ac_ext >&5
3166   rm -fr conftest*
3167   ac_cv_c_bigendian=yes
3168 fi
3169 rm -fr conftest*
3170 fi
3171
3172 fi
3173 fi
3174
3175 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3176 if test $ac_cv_c_bigendian = yes; then
3177   cat >> confdefs.h <<\EOF
3178 #define WORDS_BIGENDIAN 1
3179 EOF
3180
3181 fi
3182
3183 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3184 echo "configure:3185: checking whether char is unsigned" >&5
3185 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3186   echo $ac_n "(cached) $ac_c" 1>&6
3187 else
3188   if test "$GCC" = yes; then
3189   # GCC predefines this symbol on systems where it applies.
3190 cat > conftest.$ac_ext <<EOF
3191 #line 3192 "configure"
3192 #include "confdefs.h"
3193 #ifdef __CHAR_UNSIGNED__
3194   yes
3195 #endif
3196
3197 EOF
3198 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3199   egrep "yes" >/dev/null 2>&1; then
3200   rm -rf conftest*
3201   ac_cv_c_char_unsigned=yes
3202 else
3203   rm -rf conftest*
3204   ac_cv_c_char_unsigned=no
3205 fi
3206 rm -f conftest*
3207
3208 else
3209 if test "$cross_compiling" = yes; then
3210     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3211 else
3212   cat > conftest.$ac_ext <<EOF
3213 #line 3214 "configure"
3214 #include "confdefs.h"
3215 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3216 #if !defined(__STDC__) || __STDC__ != 1
3217 #define volatile
3218 #endif
3219 main() {
3220   volatile char c = 255; exit(c < 0);
3221 }
3222 EOF
3223 if { (eval echo configure:3224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3224 then
3225   ac_cv_c_char_unsigned=yes
3226 else
3227   echo "configure: failed program was:" >&5
3228   cat conftest.$ac_ext >&5
3229   rm -fr conftest*
3230   ac_cv_c_char_unsigned=no
3231 fi
3232 rm -fr conftest*
3233 fi
3234
3235 fi
3236 fi
3237
3238 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3239 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3240   cat >> confdefs.h <<\EOF
3241 #define __CHAR_UNSIGNED__ 1
3242 EOF
3243
3244 fi
3245
3246
3247 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3248 echo "configure:3249: checking return type of signal handlers" >&5
3249 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3250   echo $ac_n "(cached) $ac_c" 1>&6
3251 else
3252   cat > conftest.$ac_ext <<EOF
3253 #line 3254 "configure"
3254 #include "confdefs.h"
3255 #include <sys/types.h>
3256 #include <signal.h>
3257 #ifdef signal
3258 #undef signal
3259 #endif
3260 #ifdef __cplusplus
3261 extern "C" void (*signal (int, void (*)(int)))(int);
3262 #else
3263 void (*signal ()) ();
3264 #endif
3265
3266 int main() {
3267 int i;
3268 ; return 0; }
3269 EOF
3270 if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3271   rm -rf conftest*
3272   ac_cv_type_signal=void
3273 else
3274   echo "configure: failed program was:" >&5
3275   cat conftest.$ac_ext >&5
3276   rm -rf conftest*
3277   ac_cv_type_signal=int
3278 fi
3279 rm -f conftest*
3280 fi
3281
3282 echo "$ac_t""$ac_cv_type_signal" 1>&6
3283 cat >> confdefs.h <<EOF
3284 #define RETSIGTYPE $ac_cv_type_signal
3285 EOF
3286
3287
3288 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3289 echo "configure:3290: checking for uid_t in sys/types.h" >&5
3290 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3291   echo $ac_n "(cached) $ac_c" 1>&6
3292 else
3293   cat > conftest.$ac_ext <<EOF
3294 #line 3295 "configure"
3295 #include "confdefs.h"
3296 #include <sys/types.h>
3297 EOF
3298 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3299   egrep "uid_t" >/dev/null 2>&1; then
3300   rm -rf conftest*
3301   ac_cv_type_uid_t=yes
3302 else
3303   rm -rf conftest*
3304   ac_cv_type_uid_t=no
3305 fi
3306 rm -f conftest*
3307
3308 fi
3309
3310 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3311 if test $ac_cv_type_uid_t = no; then
3312   cat >> confdefs.h <<\EOF
3313 #define uid_t int
3314 EOF
3315
3316   cat >> confdefs.h <<\EOF
3317 #define gid_t int
3318 EOF
3319
3320 fi
3321
3322 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3323 echo "configure:3324: checking for mode_t" >&5
3324 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3325   echo $ac_n "(cached) $ac_c" 1>&6
3326 else
3327   cat > conftest.$ac_ext <<EOF
3328 #line 3329 "configure"
3329 #include "confdefs.h"
3330 #include <sys/types.h>
3331 #if STDC_HEADERS
3332 #include <stdlib.h>
3333 #include <stddef.h>
3334 #endif
3335 EOF
3336 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3337   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3338   rm -rf conftest*
3339   ac_cv_type_mode_t=yes
3340 else
3341   rm -rf conftest*
3342   ac_cv_type_mode_t=no
3343 fi
3344 rm -f conftest*
3345
3346 fi
3347 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3348 if test $ac_cv_type_mode_t = no; then
3349   cat >> confdefs.h <<\EOF
3350 #define mode_t int
3351 EOF
3352
3353 fi
3354
3355 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3356 echo "configure:3357: checking for off_t" >&5
3357 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3358   echo $ac_n "(cached) $ac_c" 1>&6
3359 else
3360   cat > conftest.$ac_ext <<EOF
3361 #line 3362 "configure"
3362 #include "confdefs.h"
3363 #include <sys/types.h>
3364 #if STDC_HEADERS
3365 #include <stdlib.h>
3366 #include <stddef.h>
3367 #endif
3368 EOF
3369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3370   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3371   rm -rf conftest*
3372   ac_cv_type_off_t=yes
3373 else
3374   rm -rf conftest*
3375   ac_cv_type_off_t=no
3376 fi
3377 rm -f conftest*
3378
3379 fi
3380 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3381 if test $ac_cv_type_off_t = no; then
3382   cat >> confdefs.h <<\EOF
3383 #define off_t long
3384 EOF
3385
3386 fi
3387
3388 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3389 echo "configure:3390: checking for size_t" >&5
3390 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3391   echo $ac_n "(cached) $ac_c" 1>&6
3392 else
3393   cat > conftest.$ac_ext <<EOF
3394 #line 3395 "configure"
3395 #include "confdefs.h"
3396 #include <sys/types.h>
3397 #if STDC_HEADERS
3398 #include <stdlib.h>
3399 #include <stddef.h>
3400 #endif
3401 EOF
3402 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3403   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3404   rm -rf conftest*
3405   ac_cv_type_size_t=yes
3406 else
3407   rm -rf conftest*
3408   ac_cv_type_size_t=no
3409 fi
3410 rm -f conftest*
3411
3412 fi
3413 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3414 if test $ac_cv_type_size_t = no; then
3415   cat >> confdefs.h <<\EOF
3416 #define size_t unsigned
3417 EOF
3418
3419 fi
3420
3421 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3422 echo "configure:3423: checking for pid_t" >&5
3423 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3424   echo $ac_n "(cached) $ac_c" 1>&6
3425 else
3426   cat > conftest.$ac_ext <<EOF
3427 #line 3428 "configure"
3428 #include "confdefs.h"
3429 #include <sys/types.h>
3430 #if STDC_HEADERS
3431 #include <stdlib.h>
3432 #include <stddef.h>
3433 #endif
3434 EOF
3435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3436   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3437   rm -rf conftest*
3438   ac_cv_type_pid_t=yes
3439 else
3440   rm -rf conftest*
3441   ac_cv_type_pid_t=no
3442 fi
3443 rm -f conftest*
3444
3445 fi
3446 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3447 if test $ac_cv_type_pid_t = no; then
3448   cat >> confdefs.h <<\EOF
3449 #define pid_t int
3450 EOF
3451
3452 fi
3453
3454 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3455 echo "configure:3456: checking for st_rdev in struct stat" >&5
3456 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3457   echo $ac_n "(cached) $ac_c" 1>&6
3458 else
3459   cat > conftest.$ac_ext <<EOF
3460 #line 3461 "configure"
3461 #include "confdefs.h"
3462 #include <sys/types.h>
3463 #include <sys/stat.h>
3464 int main() {
3465 struct stat s; s.st_rdev;
3466 ; return 0; }
3467 EOF
3468 if { (eval echo configure:3469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3469   rm -rf conftest*
3470   ac_cv_struct_st_rdev=yes
3471 else
3472   echo "configure: failed program was:" >&5
3473   cat conftest.$ac_ext >&5
3474   rm -rf conftest*
3475   ac_cv_struct_st_rdev=no
3476 fi
3477 rm -f conftest*
3478 fi
3479
3480 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3481 if test $ac_cv_struct_st_rdev = yes; then
3482   cat >> confdefs.h <<\EOF
3483 #define HAVE_ST_RDEV 1
3484 EOF
3485
3486 fi
3487
3488 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3489 echo "configure:3490: checking for d_off in dirent" >&5
3490 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3491   echo $ac_n "(cached) $ac_c" 1>&6
3492 else
3493   cat > conftest.$ac_ext <<EOF
3494 #line 3495 "configure"
3495 #include "confdefs.h"
3496
3497 #include <unistd.h>
3498 #include <sys/types.h>
3499 #include <dirent.h>
3500 int main() {
3501 struct dirent d; d.d_off;
3502 ; return 0; }
3503 EOF
3504 if { (eval echo configure:3505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3505   rm -rf conftest*
3506   ac_cv_dirent_d_off=yes
3507 else
3508   echo "configure: failed program was:" >&5
3509   cat conftest.$ac_ext >&5
3510   rm -rf conftest*
3511   ac_cv_dirent_d_off=no
3512 fi
3513 rm -f conftest*
3514 fi
3515
3516 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3517 if test $ac_cv_dirent_d_off = yes; then
3518   cat >> confdefs.h <<\EOF
3519 #define HAVE_DIRENT_D_OFF 1
3520 EOF
3521
3522 fi
3523
3524 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3525 echo "configure:3526: checking for ino_t" >&5
3526 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   cat > conftest.$ac_ext <<EOF
3530 #line 3531 "configure"
3531 #include "confdefs.h"
3532 #include <sys/types.h>
3533 #if STDC_HEADERS
3534 #include <stdlib.h>
3535 #include <stddef.h>
3536 #endif
3537 EOF
3538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3539   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3540   rm -rf conftest*
3541   ac_cv_type_ino_t=yes
3542 else
3543   rm -rf conftest*
3544   ac_cv_type_ino_t=no
3545 fi
3546 rm -f conftest*
3547
3548 fi
3549 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3550 if test $ac_cv_type_ino_t = no; then
3551   cat >> confdefs.h <<\EOF
3552 #define ino_t unsigned
3553 EOF
3554
3555 fi
3556
3557 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3558 echo "configure:3559: checking for loff_t" >&5
3559 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3560   echo $ac_n "(cached) $ac_c" 1>&6
3561 else
3562   cat > conftest.$ac_ext <<EOF
3563 #line 3564 "configure"
3564 #include "confdefs.h"
3565 #include <sys/types.h>
3566 #if STDC_HEADERS
3567 #include <stdlib.h>
3568 #include <stddef.h>
3569 #endif
3570 EOF
3571 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3572   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3573   rm -rf conftest*
3574   ac_cv_type_loff_t=yes
3575 else
3576   rm -rf conftest*
3577   ac_cv_type_loff_t=no
3578 fi
3579 rm -f conftest*
3580
3581 fi
3582 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3583 if test $ac_cv_type_loff_t = no; then
3584   cat >> confdefs.h <<\EOF
3585 #define loff_t off_t
3586 EOF
3587
3588 fi
3589
3590 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3591 echo "configure:3592: checking for offset_t" >&5
3592 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3593   echo $ac_n "(cached) $ac_c" 1>&6
3594 else
3595   cat > conftest.$ac_ext <<EOF
3596 #line 3597 "configure"
3597 #include "confdefs.h"
3598 #include <sys/types.h>
3599 #if STDC_HEADERS
3600 #include <stdlib.h>
3601 #include <stddef.h>
3602 #endif
3603 EOF
3604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3605   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3606   rm -rf conftest*
3607   ac_cv_type_offset_t=yes
3608 else
3609   rm -rf conftest*
3610   ac_cv_type_offset_t=no
3611 fi
3612 rm -f conftest*
3613
3614 fi
3615 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3616 if test $ac_cv_type_offset_t = no; then
3617   cat >> confdefs.h <<\EOF
3618 #define offset_t loff_t
3619 EOF
3620
3621 fi
3622
3623 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3624 echo "configure:3625: checking for ssize_t" >&5
3625 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3626   echo $ac_n "(cached) $ac_c" 1>&6
3627 else
3628   cat > conftest.$ac_ext <<EOF
3629 #line 3630 "configure"
3630 #include "confdefs.h"
3631 #include <sys/types.h>
3632 #if STDC_HEADERS
3633 #include <stdlib.h>
3634 #include <stddef.h>
3635 #endif
3636 EOF
3637 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3638   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3639   rm -rf conftest*
3640   ac_cv_type_ssize_t=yes
3641 else
3642   rm -rf conftest*
3643   ac_cv_type_ssize_t=no
3644 fi
3645 rm -f conftest*
3646
3647 fi
3648 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3649 if test $ac_cv_type_ssize_t = no; then
3650   cat >> confdefs.h <<\EOF
3651 #define ssize_t int
3652 EOF
3653
3654 fi
3655
3656 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3657 echo "configure:3658: checking for wchar_t" >&5
3658 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3659   echo $ac_n "(cached) $ac_c" 1>&6
3660 else
3661   cat > conftest.$ac_ext <<EOF
3662 #line 3663 "configure"
3663 #include "confdefs.h"
3664 #include <sys/types.h>
3665 #if STDC_HEADERS
3666 #include <stdlib.h>
3667 #include <stddef.h>
3668 #endif
3669 EOF
3670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3671   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3672   rm -rf conftest*
3673   ac_cv_type_wchar_t=yes
3674 else
3675   rm -rf conftest*
3676   ac_cv_type_wchar_t=no
3677 fi
3678 rm -f conftest*
3679
3680 fi
3681 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3682 if test $ac_cv_type_wchar_t = no; then
3683   cat >> confdefs.h <<\EOF
3684 #define wchar_t unsigned short
3685 EOF
3686
3687 fi
3688
3689
3690 ############################################
3691 # for cups support we need libcups, and a handful of header files
3692
3693 # Check whether --enable-cups or --disable-cups was given.
3694 if test "${enable_cups+set}" = set; then
3695   enableval="$enable_cups"
3696   :
3697 fi
3698
3699
3700 if test x$enable_cups != xno; then
3701         # Extract the first word of "cups-config", so it can be a program name with args.
3702 set dummy cups-config; ac_word=$2
3703 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3704 echo "configure:3705: checking for $ac_word" >&5
3705 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
3706   echo $ac_n "(cached) $ac_c" 1>&6
3707 else
3708   case "$CUPS_CONFIG" in
3709   /*)
3710   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
3711   ;;
3712   ?:/*)                  
3713   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
3714   ;;
3715   *)
3716   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3717   ac_dummy="$PATH"
3718   for ac_dir in $ac_dummy; do 
3719     test -z "$ac_dir" && ac_dir=.
3720     if test -f $ac_dir/$ac_word; then
3721       ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
3722       break
3723     fi
3724   done
3725   IFS="$ac_save_ifs"
3726   ;;
3727 esac
3728 fi
3729 CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
3730 if test -n "$CUPS_CONFIG"; then
3731   echo "$ac_t""$CUPS_CONFIG" 1>&6
3732 else
3733   echo "$ac_t""no" 1>&6
3734 fi
3735
3736
3737         if test "x$CUPS_CONFIG" != x; then
3738                         cat >> confdefs.h <<\EOF
3739 #define HAVE_CUPS 1
3740 EOF
3741
3742                 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
3743                 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
3744                 PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`"
3745         fi
3746 fi
3747
3748 ############################################
3749 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3750 for ac_func in dlopen
3751 do
3752 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3753 echo "configure:3754: checking for $ac_func" >&5
3754 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3755   echo $ac_n "(cached) $ac_c" 1>&6
3756 else
3757   cat > conftest.$ac_ext <<EOF
3758 #line 3759 "configure"
3759 #include "confdefs.h"
3760 /* System header to define __stub macros and hopefully few prototypes,
3761     which can conflict with char $ac_func(); below.  */
3762 #include <assert.h>
3763 /* Override any gcc2 internal prototype to avoid an error.  */
3764 /* We use char because int might match the return type of a gcc2
3765     builtin and then its argument prototype would still apply.  */
3766 char $ac_func();
3767
3768 int main() {
3769
3770 /* The GNU C library defines this for functions which it implements
3771     to always fail with ENOSYS.  Some functions are actually named
3772     something starting with __ and the normal name is an alias.  */
3773 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3774 choke me
3775 #else
3776 $ac_func();
3777 #endif
3778
3779 ; return 0; }
3780 EOF
3781 if { (eval echo configure:3782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3782   rm -rf conftest*
3783   eval "ac_cv_func_$ac_func=yes"
3784 else
3785   echo "configure: failed program was:" >&5
3786   cat conftest.$ac_ext >&5
3787   rm -rf conftest*
3788   eval "ac_cv_func_$ac_func=no"
3789 fi
3790 rm -f conftest*
3791 fi
3792
3793 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3794   echo "$ac_t""yes" 1>&6
3795     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3796   cat >> confdefs.h <<EOF
3797 #define $ac_tr_func 1
3798 EOF
3799  
3800 else
3801   echo "$ac_t""no" 1>&6
3802 fi
3803 done
3804
3805 if test x"$ac_cv_func_dlopen" = x"no"; then
3806     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3807 echo "configure:3808: checking for dlopen in -ldl" >&5
3808 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3809 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3810   echo $ac_n "(cached) $ac_c" 1>&6
3811 else
3812   ac_save_LIBS="$LIBS"
3813 LIBS="-ldl  $LIBS"
3814 cat > conftest.$ac_ext <<EOF
3815 #line 3816 "configure"
3816 #include "confdefs.h"
3817 /* Override any gcc2 internal prototype to avoid an error.  */
3818 /* We use char because int might match the return type of a gcc2
3819     builtin and then its argument prototype would still apply.  */
3820 char dlopen();
3821
3822 int main() {
3823 dlopen()
3824 ; return 0; }
3825 EOF
3826 if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3827   rm -rf conftest*
3828   eval "ac_cv_lib_$ac_lib_var=yes"
3829 else
3830   echo "configure: failed program was:" >&5
3831   cat conftest.$ac_ext >&5
3832   rm -rf conftest*
3833   eval "ac_cv_lib_$ac_lib_var=no"
3834 fi
3835 rm -f conftest*
3836 LIBS="$ac_save_LIBS"
3837
3838 fi
3839 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3840   echo "$ac_t""yes" 1>&6
3841   SMBDLIBS="$SMBDLIBS -ldl";
3842         cat >> confdefs.h <<\EOF
3843 #define HAVE_DLOPEN 1
3844 EOF
3845
3846 else
3847   echo "$ac_t""no" 1>&6
3848 fi
3849
3850 fi
3851 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3852
3853 ############################################
3854 # check if the compiler can do immediate structures
3855 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3856 echo "configure:3857: checking for immediate structures" >&5
3857 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3858   echo $ac_n "(cached) $ac_c" 1>&6
3859 else
3860   
3861     cat > conftest.$ac_ext <<EOF
3862 #line 3863 "configure"
3863 #include "confdefs.h"
3864
3865 #include <stdio.h>
3866 int main() {
3867
3868    typedef struct {unsigned x;} FOOBAR;
3869    #define X_FOOBAR(x) ((FOOBAR) { x })
3870    #define FOO_ONE X_FOOBAR(1)
3871    FOOBAR f = FOO_ONE;   
3872    static struct {
3873         FOOBAR y; 
3874         } f2[] = {
3875                 {FOO_ONE}
3876         };   
3877
3878 ; return 0; }
3879 EOF
3880 if { (eval echo configure:3881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3881   rm -rf conftest*
3882   samba_cv_immediate_structures=yes
3883 else
3884   echo "configure: failed program was:" >&5
3885   cat conftest.$ac_ext >&5
3886   rm -rf conftest*
3887   samba_cv_immediate_structures=no
3888 fi
3889 rm -f conftest*
3890 fi
3891
3892 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3893 if test x"$samba_cv_immediate_structures" = x"yes"; then
3894    cat >> confdefs.h <<\EOF
3895 #define HAVE_IMMEDIATE_STRUCTURES 1
3896 EOF
3897
3898 fi
3899
3900 ############################################
3901 # check for unix domain sockets
3902 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3903 echo "configure:3904: checking for unix domain sockets" >&5
3904 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3905   echo $ac_n "(cached) $ac_c" 1>&6
3906 else
3907   
3908     cat > conftest.$ac_ext <<EOF
3909 #line 3910 "configure"
3910 #include "confdefs.h"
3911
3912 #include <sys/types.h>
3913 #include <stdlib.h>
3914 #include <stddef.h>
3915 #include <sys/socket.h>
3916 #include <sys/un.h>
3917 int main() {
3918
3919   struct sockaddr_un sunaddr; 
3920   sunaddr.sun_family = AF_UNIX;
3921
3922 ; return 0; }
3923 EOF
3924 if { (eval echo configure:3925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3925   rm -rf conftest*
3926   samba_cv_unixsocket=yes
3927 else
3928   echo "configure: failed program was:" >&5
3929   cat conftest.$ac_ext >&5
3930   rm -rf conftest*
3931   samba_cv_unixsocket=no
3932 fi
3933 rm -f conftest*
3934 fi
3935
3936 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3937 if test x"$samba_cv_unixsocket" = x"yes"; then
3938    cat >> confdefs.h <<\EOF
3939 #define HAVE_UNIXSOCKET 1
3940 EOF
3941
3942 fi
3943
3944
3945 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3946 echo "configure:3947: checking for socklen_t type" >&5
3947 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3948   echo $ac_n "(cached) $ac_c" 1>&6
3949 else
3950   
3951     cat > conftest.$ac_ext <<EOF
3952 #line 3953 "configure"
3953 #include "confdefs.h"
3954
3955 #include <sys/types.h>
3956 #if STDC_HEADERS
3957 #include <stdlib.h>
3958 #include <stddef.h>
3959 #endif
3960 #include <sys/socket.h>
3961 int main() {
3962 socklen_t i = 0
3963 ; return 0; }
3964 EOF
3965 if { (eval echo configure:3966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3966   rm -rf conftest*
3967   samba_cv_socklen_t=yes
3968 else
3969   echo "configure: failed program was:" >&5
3970   cat conftest.$ac_ext >&5
3971   rm -rf conftest*
3972   samba_cv_socklen_t=no
3973 fi
3974 rm -f conftest*
3975 fi
3976
3977 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3978 if test x"$samba_cv_socklen_t" = x"yes"; then
3979    cat >> confdefs.h <<\EOF
3980 #define HAVE_SOCKLEN_T_TYPE 1
3981 EOF
3982
3983 fi
3984
3985 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3986 echo "configure:3987: checking for sig_atomic_t type" >&5
3987 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3988   echo $ac_n "(cached) $ac_c" 1>&6
3989 else
3990   
3991     cat > conftest.$ac_ext <<EOF
3992 #line 3993 "configure"
3993 #include "confdefs.h"
3994
3995 #include <sys/types.h>
3996 #if STDC_HEADERS
3997 #include <stdlib.h>
3998 #include <stddef.h>
3999 #endif
4000 #include <signal.h>
4001 int main() {
4002 sig_atomic_t i = 0
4003 ; return 0; }
4004 EOF
4005 if { (eval echo configure:4006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4006   rm -rf conftest*
4007   samba_cv_sig_atomic_t=yes
4008 else
4009   echo "configure: failed program was:" >&5
4010   cat conftest.$ac_ext >&5
4011   rm -rf conftest*
4012   samba_cv_sig_atomic_t=no
4013 fi
4014 rm -f conftest*
4015 fi
4016
4017 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4018 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4019    cat >> confdefs.h <<\EOF
4020 #define HAVE_SIG_ATOMIC_T_TYPE 1
4021 EOF
4022
4023 fi
4024
4025 # stupid headers have the functions but no declaration. grrrr.
4026
4027  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4028 echo "configure:4029: checking for errno declaration" >&5
4029 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4030   echo $ac_n "(cached) $ac_c" 1>&6
4031 else
4032   
4033     cat > conftest.$ac_ext <<EOF
4034 #line 4035 "configure"
4035 #include "confdefs.h"
4036 #include <errno.h>
4037 int main() {
4038 int i = (int)errno
4039 ; return 0; }
4040 EOF
4041 if { (eval echo configure:4042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4042   rm -rf conftest*
4043   ac_cv_have_errno_decl=yes
4044 else
4045   echo "configure: failed program was:" >&5
4046   cat conftest.$ac_ext >&5
4047   rm -rf conftest*
4048   ac_cv_have_errno_decl=no
4049 fi
4050 rm -f conftest*
4051 fi
4052
4053 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4054  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4055     cat >> confdefs.h <<\EOF
4056 #define HAVE_ERRNO_DECL 1
4057 EOF
4058
4059  fi
4060
4061
4062  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4063 echo "configure:4064: checking for setresuid declaration" >&5
4064 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4065   echo $ac_n "(cached) $ac_c" 1>&6
4066 else
4067   
4068     cat > conftest.$ac_ext <<EOF
4069 #line 4070 "configure"
4070 #include "confdefs.h"
4071 #include <unistd.h>
4072 int main() {
4073 int i = (int)setresuid
4074 ; return 0; }
4075 EOF
4076 if { (eval echo configure:4077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4077   rm -rf conftest*
4078   ac_cv_have_setresuid_decl=yes
4079 else
4080   echo "configure: failed program was:" >&5
4081   cat conftest.$ac_ext >&5
4082   rm -rf conftest*
4083   ac_cv_have_setresuid_decl=no
4084 fi
4085 rm -f conftest*
4086 fi
4087
4088 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4089  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4090     cat >> confdefs.h <<\EOF
4091 #define HAVE_SETRESUID_DECL 1
4092 EOF
4093
4094  fi
4095
4096
4097  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4098 echo "configure:4099: checking for setresgid declaration" >&5
4099 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4100   echo $ac_n "(cached) $ac_c" 1>&6
4101 else
4102   
4103     cat > conftest.$ac_ext <<EOF
4104 #line 4105 "configure"
4105 #include "confdefs.h"
4106 #include <unistd.h>
4107 int main() {
4108 int i = (int)setresgid
4109 ; return 0; }
4110 EOF
4111 if { (eval echo configure:4112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4112   rm -rf conftest*
4113   ac_cv_have_setresgid_decl=yes
4114 else
4115   echo "configure: failed program was:" >&5
4116   cat conftest.$ac_ext >&5
4117   rm -rf conftest*
4118   ac_cv_have_setresgid_decl=no
4119 fi
4120 rm -f conftest*
4121 fi
4122
4123 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4124  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4125     cat >> confdefs.h <<\EOF
4126 #define HAVE_SETRESGID_DECL 1
4127 EOF
4128
4129  fi
4130
4131
4132  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4133 echo "configure:4134: checking for asprintf declaration" >&5
4134 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4135   echo $ac_n "(cached) $ac_c" 1>&6
4136 else
4137   
4138     cat > conftest.$ac_ext <<EOF
4139 #line 4140 "configure"
4140 #include "confdefs.h"
4141 #include <stdio.h>
4142 int main() {
4143 int i = (int)asprintf
4144 ; return 0; }
4145 EOF
4146 if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4147   rm -rf conftest*
4148   ac_cv_have_asprintf_decl=yes
4149 else
4150   echo "configure: failed program was:" >&5
4151   cat conftest.$ac_ext >&5
4152   rm -rf conftest*
4153   ac_cv_have_asprintf_decl=no
4154 fi
4155 rm -f conftest*
4156 fi
4157
4158 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4159  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4160     cat >> confdefs.h <<\EOF
4161 #define HAVE_ASPRINTF_DECL 1
4162 EOF
4163
4164  fi
4165
4166
4167  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4168 echo "configure:4169: checking for vasprintf declaration" >&5
4169 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4170   echo $ac_n "(cached) $ac_c" 1>&6
4171 else
4172   
4173     cat > conftest.$ac_ext <<EOF
4174 #line 4175 "configure"
4175 #include "confdefs.h"
4176 #include <stdio.h>
4177 int main() {
4178 int i = (int)vasprintf
4179 ; return 0; }
4180 EOF
4181 if { (eval echo configure:4182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4182   rm -rf conftest*
4183   ac_cv_have_vasprintf_decl=yes
4184 else
4185   echo "configure: failed program was:" >&5
4186   cat conftest.$ac_ext >&5
4187   rm -rf conftest*
4188   ac_cv_have_vasprintf_decl=no
4189 fi
4190 rm -f conftest*
4191 fi
4192
4193 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4194  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4195     cat >> confdefs.h <<\EOF
4196 #define HAVE_VASPRINTF_DECL 1
4197 EOF
4198
4199  fi
4200
4201
4202  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4203 echo "configure:4204: checking for vsnprintf declaration" >&5
4204 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4205   echo $ac_n "(cached) $ac_c" 1>&6
4206 else
4207   
4208     cat > conftest.$ac_ext <<EOF
4209 #line 4210 "configure"
4210 #include "confdefs.h"
4211 #include <stdio.h>
4212 int main() {
4213 int i = (int)vsnprintf
4214 ; return 0; }
4215 EOF
4216 if { (eval echo configure:4217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4217   rm -rf conftest*
4218   ac_cv_have_vsnprintf_decl=yes
4219 else
4220   echo "configure: failed program was:" >&5
4221   cat conftest.$ac_ext >&5
4222   rm -rf conftest*
4223   ac_cv_have_vsnprintf_decl=no
4224 fi
4225 rm -f conftest*
4226 fi
4227
4228 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4229  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4230     cat >> confdefs.h <<\EOF
4231 #define HAVE_VSNPRINTF_DECL 1
4232 EOF
4233
4234  fi
4235
4236
4237  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4238 echo "configure:4239: checking for snprintf declaration" >&5
4239 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4240   echo $ac_n "(cached) $ac_c" 1>&6
4241 else
4242   
4243     cat > conftest.$ac_ext <<EOF
4244 #line 4245 "configure"
4245 #include "confdefs.h"
4246 #include <stdio.h>
4247 int main() {
4248 int i = (int)snprintf
4249 ; return 0; }
4250 EOF
4251 if { (eval echo configure:4252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4252   rm -rf conftest*
4253   ac_cv_have_snprintf_decl=yes
4254 else
4255   echo "configure: failed program was:" >&5
4256   cat conftest.$ac_ext >&5
4257   rm -rf conftest*
4258   ac_cv_have_snprintf_decl=no
4259 fi
4260 rm -f conftest*
4261 fi
4262
4263 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4264  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4265     cat >> confdefs.h <<\EOF
4266 #define HAVE_SNPRINTF_DECL 1
4267 EOF
4268
4269  fi
4270
4271
4272 # and glibc has setresuid under linux but the function does
4273 # nothing until kernel 2.1.44! very dumb.
4274 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4275 echo "configure:4276: checking for real setresuid" >&5
4276 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4277   echo $ac_n "(cached) $ac_c" 1>&6
4278 else
4279   
4280     if test "$cross_compiling" = yes; then
4281   samba_cv_have_setresuid=cross
4282 else
4283   cat > conftest.$ac_ext <<EOF
4284 #line 4285 "configure"
4285 #include "confdefs.h"
4286 #include <errno.h>
4287 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4288 EOF
4289 if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4290 then
4291   samba_cv_have_setresuid=yes
4292 else
4293   echo "configure: failed program was:" >&5
4294   cat conftest.$ac_ext >&5
4295   rm -fr conftest*
4296   samba_cv_have_setresuid=no
4297 fi
4298 rm -fr conftest*
4299 fi
4300
4301 fi
4302
4303 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4304 if test x"$samba_cv_have_setresuid" = x"yes"; then
4305     cat >> confdefs.h <<\EOF
4306 #define HAVE_SETRESUID 1
4307 EOF
4308
4309 fi
4310
4311 # Do the same check for setresguid...
4312 #
4313 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4314 echo "configure:4315: checking for real setresgid" >&5
4315 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4316   echo $ac_n "(cached) $ac_c" 1>&6
4317 else
4318   
4319     if test "$cross_compiling" = yes; then
4320   samba_cv_have_setresgid=cross
4321 else
4322   cat > conftest.$ac_ext <<EOF
4323 #line 4324 "configure"
4324 #include "confdefs.h"
4325 #include <unistd.h>
4326 #include <errno.h>
4327 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4328 EOF
4329 if { (eval echo configure:4330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4330 then
4331   samba_cv_have_setresgid=yes
4332 else
4333   echo "configure: failed program was:" >&5
4334   cat conftest.$ac_ext >&5
4335   rm -fr conftest*
4336   samba_cv_have_setresgid=no
4337 fi
4338 rm -fr conftest*
4339 fi
4340
4341 fi
4342
4343 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4344 if test x"$samba_cv_have_setresgid" = x"yes"; then
4345     cat >> confdefs.h <<\EOF
4346 #define HAVE_SETRESGID 1
4347 EOF
4348
4349 fi
4350
4351 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4352 echo "configure:4353: checking for 8-bit clean memcmp" >&5
4353 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4354   echo $ac_n "(cached) $ac_c" 1>&6
4355 else
4356   if test "$cross_compiling" = yes; then
4357   ac_cv_func_memcmp_clean=no
4358 else
4359   cat > conftest.$ac_ext <<EOF
4360 #line 4361 "configure"
4361 #include "confdefs.h"
4362
4363 main()
4364 {
4365   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4366   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4367 }
4368
4369 EOF
4370 if { (eval echo configure:4371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4371 then
4372   ac_cv_func_memcmp_clean=yes
4373 else
4374   echo "configure: failed program was:" >&5
4375   cat conftest.$ac_ext >&5
4376   rm -fr conftest*
4377   ac_cv_func_memcmp_clean=no
4378 fi
4379 rm -fr conftest*
4380 fi
4381
4382 fi
4383
4384 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4385 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4386
4387
4388 ###############################################
4389 # test for where we get crypt() from
4390 for ac_func in crypt
4391 do
4392 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4393 echo "configure:4394: checking for $ac_func" >&5
4394 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4395   echo $ac_n "(cached) $ac_c" 1>&6
4396 else
4397   cat > conftest.$ac_ext <<EOF
4398 #line 4399 "configure"
4399 #include "confdefs.h"
4400 /* System header to define __stub macros and hopefully few prototypes,
4401     which can conflict with char $ac_func(); below.  */
4402 #include <assert.h>
4403 /* Override any gcc2 internal prototype to avoid an error.  */
4404 /* We use char because int might match the return type of a gcc2
4405     builtin and then its argument prototype would still apply.  */
4406 char $ac_func();
4407
4408 int main() {
4409
4410 /* The GNU C library defines this for functions which it implements
4411     to always fail with ENOSYS.  Some functions are actually named
4412     something starting with __ and the normal name is an alias.  */
4413 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4414 choke me
4415 #else
4416 $ac_func();
4417 #endif
4418
4419 ; return 0; }
4420 EOF
4421 if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4422   rm -rf conftest*
4423   eval "ac_cv_func_$ac_func=yes"
4424 else
4425   echo "configure: failed program was:" >&5
4426   cat conftest.$ac_ext >&5
4427   rm -rf conftest*
4428   eval "ac_cv_func_$ac_func=no"
4429 fi
4430 rm -f conftest*
4431 fi
4432
4433 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4434   echo "$ac_t""yes" 1>&6
4435     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4436   cat >> confdefs.h <<EOF
4437 #define $ac_tr_func 1
4438 EOF
4439  
4440 else
4441   echo "$ac_t""no" 1>&6
4442 fi
4443 done
4444
4445 if test x"$ac_cv_func_crypt" = x"no"; then
4446     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4447 echo "configure:4448: checking for crypt in -lcrypt" >&5
4448 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4449 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4450   echo $ac_n "(cached) $ac_c" 1>&6
4451 else
4452   ac_save_LIBS="$LIBS"
4453 LIBS="-lcrypt  $LIBS"
4454 cat > conftest.$ac_ext <<EOF
4455 #line 4456 "configure"
4456 #include "confdefs.h"
4457 /* Override any gcc2 internal prototype to avoid an error.  */
4458 /* We use char because int might match the return type of a gcc2
4459     builtin and then its argument prototype would still apply.  */
4460 char crypt();
4461
4462 int main() {
4463 crypt()
4464 ; return 0; }
4465 EOF
4466 if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4467   rm -rf conftest*
4468   eval "ac_cv_lib_$ac_lib_var=yes"
4469 else
4470   echo "configure: failed program was:" >&5
4471   cat conftest.$ac_ext >&5
4472   rm -rf conftest*
4473   eval "ac_cv_lib_$ac_lib_var=no"
4474 fi
4475 rm -f conftest*
4476 LIBS="$ac_save_LIBS"
4477
4478 fi
4479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4480   echo "$ac_t""yes" 1>&6
4481   SMBDLIBS="$SMBDLIBS -lcrypt";
4482         cat >> confdefs.h <<\EOF
4483 #define HAVE_CRYPT 1
4484 EOF
4485
4486 else
4487   echo "$ac_t""no" 1>&6
4488 fi
4489
4490 fi
4491
4492
4493 ###############################################
4494 # Readline included by default unless explicitly asked not to
4495 test "${with_readline+set}" != "set" && with_readline=yes
4496
4497 # test for where we get readline() from
4498 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4499 echo "configure:4500: checking whether to use readline" >&5
4500 # Check whether --with-readline or --without-readline was given.
4501 if test "${with_readline+set}" = set; then
4502   withval="$with_readline"
4503     case "$with_readline" in
4504   yes)
4505     echo "$ac_t""yes" 1>&6
4506
4507     for ac_hdr in readline.h history.h readline/readline.h
4508 do
4509 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4510 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4511 echo "configure:4512: checking for $ac_hdr" >&5
4512 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4513   echo $ac_n "(cached) $ac_c" 1>&6
4514 else
4515   cat > conftest.$ac_ext <<EOF
4516 #line 4517 "configure"
4517 #include "confdefs.h"
4518 #include <$ac_hdr>
4519 EOF
4520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4521 { (eval echo configure:4522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4523 if test -z "$ac_err"; then
4524   rm -rf conftest*
4525   eval "ac_cv_header_$ac_safe=yes"
4526 else
4527   echo "$ac_err" >&5
4528   echo "configure: failed program was:" >&5
4529   cat conftest.$ac_ext >&5
4530   rm -rf conftest*
4531   eval "ac_cv_header_$ac_safe=no"
4532 fi
4533 rm -f conftest*
4534 fi
4535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4536   echo "$ac_t""yes" 1>&6
4537     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4538   cat >> confdefs.h <<EOF
4539 #define $ac_tr_hdr 1
4540 EOF
4541  
4542 else
4543   echo "$ac_t""no" 1>&6
4544 fi
4545 done
4546
4547     for ac_hdr in readline/history.h
4548 do
4549 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4550 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4551 echo "configure:4552: checking for $ac_hdr" >&5
4552 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4553   echo $ac_n "(cached) $ac_c" 1>&6
4554 else
4555   cat > conftest.$ac_ext <<EOF
4556 #line 4557 "configure"
4557 #include "confdefs.h"
4558 #include <$ac_hdr>
4559 EOF
4560 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4561 { (eval echo configure:4562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4562 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4563 if test -z "$ac_err"; then
4564   rm -rf conftest*
4565   eval "ac_cv_header_$ac_safe=yes"
4566 else
4567   echo "$ac_err" >&5
4568   echo "configure: failed program was:" >&5
4569   cat conftest.$ac_ext >&5
4570   rm -rf conftest*
4571   eval "ac_cv_header_$ac_safe=no"
4572 fi
4573 rm -f conftest*
4574 fi
4575 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4576   echo "$ac_t""yes" 1>&6
4577     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4578   cat >> confdefs.h <<EOF
4579 #define $ac_tr_hdr 1
4580 EOF
4581  
4582 else
4583   echo "$ac_t""no" 1>&6
4584 fi
4585 done
4586
4587
4588     for ac_hdr in readline.h readline/readline.h
4589 do
4590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4592 echo "configure:4593: checking for $ac_hdr" >&5
4593 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4594   echo $ac_n "(cached) $ac_c" 1>&6
4595 else
4596   cat > conftest.$ac_ext <<EOF
4597 #line 4598 "configure"
4598 #include "confdefs.h"
4599 #include <$ac_hdr>
4600 EOF
4601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4602 { (eval echo configure:4603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4604 if test -z "$ac_err"; then
4605   rm -rf conftest*
4606   eval "ac_cv_header_$ac_safe=yes"
4607 else
4608   echo "$ac_err" >&5
4609   echo "configure: failed program was:" >&5
4610   cat conftest.$ac_ext >&5
4611   rm -rf conftest*
4612   eval "ac_cv_header_$ac_safe=no"
4613 fi
4614 rm -f conftest*
4615 fi
4616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4617   echo "$ac_t""yes" 1>&6
4618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4619   cat >> confdefs.h <<EOF
4620 #define $ac_tr_hdr 1
4621 EOF
4622  
4623       for termlib in ncurses curses termcap terminfo termlib; do
4624        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4625 echo "configure:4626: checking for tgetent in -l${termlib}" >&5
4626 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4627 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4628   echo $ac_n "(cached) $ac_c" 1>&6
4629 else
4630   ac_save_LIBS="$LIBS"
4631 LIBS="-l${termlib}  $LIBS"
4632 cat > conftest.$ac_ext <<EOF
4633 #line 4634 "configure"
4634 #include "confdefs.h"
4635 /* Override any gcc2 internal prototype to avoid an error.  */
4636 /* We use char because int might match the return type of a gcc2
4637     builtin and then its argument prototype would still apply.  */
4638 char tgetent();
4639
4640 int main() {
4641 tgetent()
4642 ; return 0; }
4643 EOF
4644 if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4645   rm -rf conftest*
4646   eval "ac_cv_lib_$ac_lib_var=yes"
4647 else
4648   echo "configure: failed program was:" >&5
4649   cat conftest.$ac_ext >&5
4650   rm -rf conftest*
4651   eval "ac_cv_lib_$ac_lib_var=no"
4652 fi
4653 rm -f conftest*
4654 LIBS="$ac_save_LIBS"
4655
4656 fi
4657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4658   echo "$ac_t""yes" 1>&6
4659   TERMLIBS="-l${termlib}"; break
4660 else
4661   echo "$ac_t""no" 1>&6
4662 fi
4663
4664       done
4665       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4666 echo "configure:4667: checking for rl_callback_handler_install in -lreadline" >&5
4667 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4668 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4669   echo $ac_n "(cached) $ac_c" 1>&6
4670 else
4671   ac_save_LIBS="$LIBS"
4672 LIBS="-lreadline $TERMLIBS $LIBS"
4673 cat > conftest.$ac_ext <<EOF
4674 #line 4675 "configure"
4675 #include "confdefs.h"
4676 /* Override any gcc2 internal prototype to avoid an error.  */
4677 /* We use char because int might match the return type of a gcc2
4678     builtin and then its argument prototype would still apply.  */
4679 char rl_callback_handler_install();
4680
4681 int main() {
4682 rl_callback_handler_install()
4683 ; return 0; }
4684 EOF
4685 if { (eval echo configure:4686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4686   rm -rf conftest*
4687   eval "ac_cv_lib_$ac_lib_var=yes"
4688 else
4689   echo "configure: failed program was:" >&5
4690   cat conftest.$ac_ext >&5
4691   rm -rf conftest*
4692   eval "ac_cv_lib_$ac_lib_var=no"
4693 fi
4694 rm -f conftest*
4695 LIBS="$ac_save_LIBS"
4696
4697 fi
4698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4699   echo "$ac_t""yes" 1>&6
4700   TERMLIBS="-lreadline $TERMLIBS"
4701        cat >> confdefs.h <<\EOF
4702 #define HAVE_LIBREADLINE 1
4703 EOF
4704
4705        break
4706 else
4707   echo "$ac_t""no" 1>&6
4708 TERMLIBS=
4709 fi
4710
4711 else
4712   echo "$ac_t""no" 1>&6
4713 fi
4714 done
4715
4716     ;;
4717   no)
4718     echo "$ac_t""no" 1>&6
4719     ;;
4720   *)
4721     echo "$ac_t""yes" 1>&6
4722
4723     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4724     # alternate readline path
4725     _ldflags=${LDFLAGS}
4726     _cppflags=${CPPFLAGS}
4727
4728     # Add additional search path
4729     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4730     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4731
4732     for ac_hdr in readline.h history.h readline/readline.h
4733 do
4734 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4735 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4736 echo "configure:4737: checking for $ac_hdr" >&5
4737 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4738   echo $ac_n "(cached) $ac_c" 1>&6
4739 else
4740   cat > conftest.$ac_ext <<EOF
4741 #line 4742 "configure"
4742 #include "confdefs.h"
4743 #include <$ac_hdr>
4744 EOF
4745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4746 { (eval echo configure:4747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4748 if test -z "$ac_err"; then
4749   rm -rf conftest*
4750   eval "ac_cv_header_$ac_safe=yes"
4751 else
4752   echo "$ac_err" >&5
4753   echo "configure: failed program was:" >&5
4754   cat conftest.$ac_ext >&5
4755   rm -rf conftest*
4756   eval "ac_cv_header_$ac_safe=no"
4757 fi
4758 rm -f conftest*
4759 fi
4760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4761   echo "$ac_t""yes" 1>&6
4762     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4763   cat >> confdefs.h <<EOF
4764 #define $ac_tr_hdr 1
4765 EOF
4766  
4767 else
4768   echo "$ac_t""no" 1>&6
4769 fi
4770 done
4771
4772     for ac_hdr in readline/history.h
4773 do
4774 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4775 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4776 echo "configure:4777: checking for $ac_hdr" >&5
4777 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4778   echo $ac_n "(cached) $ac_c" 1>&6
4779 else
4780   cat > conftest.$ac_ext <<EOF
4781 #line 4782 "configure"
4782 #include "confdefs.h"
4783 #include <$ac_hdr>
4784 EOF
4785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4786 { (eval echo configure:4787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4788 if test -z "$ac_err"; then
4789   rm -rf conftest*
4790   eval "ac_cv_header_$ac_safe=yes"
4791 else
4792   echo "$ac_err" >&5
4793   echo "configure: failed program was:" >&5
4794   cat conftest.$ac_ext >&5
4795   rm -rf conftest*
4796   eval "ac_cv_header_$ac_safe=no"
4797 fi
4798 rm -f conftest*
4799 fi
4800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4801   echo "$ac_t""yes" 1>&6
4802     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4803   cat >> confdefs.h <<EOF
4804 #define $ac_tr_hdr 1
4805 EOF
4806  
4807 else
4808   echo "$ac_t""no" 1>&6
4809 fi
4810 done
4811
4812
4813     for ac_hdr in readline.h readline/readline.h
4814 do
4815 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4816 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4817 echo "configure:4818: checking for $ac_hdr" >&5
4818 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4819   echo $ac_n "(cached) $ac_c" 1>&6
4820 else
4821   cat > conftest.$ac_ext <<EOF
4822 #line 4823 "configure"
4823 #include "confdefs.h"
4824 #include <$ac_hdr>
4825 EOF
4826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4827 { (eval echo configure:4828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4829 if test -z "$ac_err"; then
4830   rm -rf conftest*
4831   eval "ac_cv_header_$ac_safe=yes"
4832 else
4833   echo "$ac_err" >&5
4834   echo "configure: failed program was:" >&5
4835   cat conftest.$ac_ext >&5
4836   rm -rf conftest*
4837   eval "ac_cv_header_$ac_safe=no"
4838 fi
4839 rm -f conftest*
4840 fi
4841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4842   echo "$ac_t""yes" 1>&6
4843     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4844   cat >> confdefs.h <<EOF
4845 #define $ac_tr_hdr 1
4846 EOF
4847  
4848       for termlib in ncurses curses termcap terminfo termlib; do
4849        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4850 echo "configure:4851: checking for tgetent in -l${termlib}" >&5
4851 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4852 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4853   echo $ac_n "(cached) $ac_c" 1>&6
4854 else
4855   ac_save_LIBS="$LIBS"
4856 LIBS="-l${termlib}  $LIBS"
4857 cat > conftest.$ac_ext <<EOF
4858 #line 4859 "configure"
4859 #include "confdefs.h"
4860 /* Override any gcc2 internal prototype to avoid an error.  */
4861 /* We use char because int might match the return type of a gcc2
4862     builtin and then its argument prototype would still apply.  */
4863 char tgetent();
4864
4865 int main() {
4866 tgetent()
4867 ; return 0; }
4868 EOF
4869 if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4870   rm -rf conftest*
4871   eval "ac_cv_lib_$ac_lib_var=yes"
4872 else
4873   echo "configure: failed program was:" >&5
4874   cat conftest.$ac_ext >&5
4875   rm -rf conftest*
4876   eval "ac_cv_lib_$ac_lib_var=no"
4877 fi
4878 rm -f conftest*
4879 LIBS="$ac_save_LIBS"
4880
4881 fi
4882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4883   echo "$ac_t""yes" 1>&6
4884   TERMLIBS="-l${termlib}"; break
4885 else
4886   echo "$ac_t""no" 1>&6
4887 fi
4888
4889       done
4890       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4891 echo "configure:4892: checking for rl_callback_handler_install in -lreadline" >&5
4892 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4893 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4894   echo $ac_n "(cached) $ac_c" 1>&6
4895 else
4896   ac_save_LIBS="$LIBS"
4897 LIBS="-lreadline $TERMLIBS $LIBS"
4898 cat > conftest.$ac_ext <<EOF
4899 #line 4900 "configure"
4900 #include "confdefs.h"
4901 /* Override any gcc2 internal prototype to avoid an error.  */
4902 /* We use char because int might match the return type of a gcc2
4903     builtin and then its argument prototype would still apply.  */
4904 char rl_callback_handler_install();
4905
4906 int main() {
4907 rl_callback_handler_install()
4908 ; return 0; }
4909 EOF
4910 if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4911   rm -rf conftest*
4912   eval "ac_cv_lib_$ac_lib_var=yes"
4913 else
4914   echo "configure: failed program was:" >&5
4915   cat conftest.$ac_ext >&5
4916   rm -rf conftest*
4917   eval "ac_cv_lib_$ac_lib_var=no"
4918 fi
4919 rm -f conftest*
4920 LIBS="$ac_save_LIBS"
4921
4922 fi
4923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4924   echo "$ac_t""yes" 1>&6
4925   TERMLDFLAGS="-L$with_readline/lib"
4926        TERMCPPFLAGS="-I$with_readline/include"
4927        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4928        TERMLIBS="-lreadline $TERMLIBS"
4929        cat >> confdefs.h <<\EOF
4930 #define HAVE_LIBREADLINE 1
4931 EOF
4932
4933        break
4934 else
4935   echo "$ac_t""no" 1>&6
4936 TERMLIBS= CPPFLAGS=$_cppflags
4937 fi
4938
4939 else
4940   echo "$ac_t""no" 1>&6
4941 fi
4942 done
4943
4944
4945     LDFLAGS=$_ldflags
4946     ;;
4947   esac
4948 else
4949   echo "$ac_t""no" 1>&6
4950
4951 fi
4952
4953
4954
4955
4956 # The readline API changed slightly from readline3 to readline4, so
4957 # code will generate warnings on one of them unless we have a few
4958 # special cases.
4959 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4960 echo "configure:4961: checking for rl_completion_matches in -lreadline" >&5
4961 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4962 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4963   echo $ac_n "(cached) $ac_c" 1>&6
4964 else
4965   ac_save_LIBS="$LIBS"
4966 LIBS="-lreadline $TERMLIBS $LIBS"
4967 cat > conftest.$ac_ext <<EOF
4968 #line 4969 "configure"
4969 #include "confdefs.h"
4970 /* Override any gcc2 internal prototype to avoid an error.  */
4971 /* We use char because int might match the return type of a gcc2
4972     builtin and then its argument prototype would still apply.  */
4973 char rl_completion_matches();
4974
4975 int main() {
4976 rl_completion_matches()
4977 ; return 0; }
4978 EOF
4979 if { (eval echo configure:4980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4980   rm -rf conftest*
4981   eval "ac_cv_lib_$ac_lib_var=yes"
4982 else
4983   echo "configure: failed program was:" >&5
4984   cat conftest.$ac_ext >&5
4985   rm -rf conftest*
4986   eval "ac_cv_lib_$ac_lib_var=no"
4987 fi
4988 rm -f conftest*
4989 LIBS="$ac_save_LIBS"
4990
4991 fi
4992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4993   echo "$ac_t""yes" 1>&6
4994   cat >> confdefs.h <<\EOF
4995 #define HAVE_NEW_LIBREADLINE 1
4996 EOF
4997
4998 else
4999   echo "$ac_t""no" 1>&6
5000 fi
5001
5002
5003 # The following test taken from the cvs sources
5004 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5005 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5006 # libsocket.so which has a bad implementation of gethostbyname (it
5007 # only looks in /etc/hosts), so we only look for -lsocket if we need
5008 # it.
5009 for ac_func in connect
5010 do
5011 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5012 echo "configure:5013: checking for $ac_func" >&5
5013 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5014   echo $ac_n "(cached) $ac_c" 1>&6
5015 else
5016   cat > conftest.$ac_ext <<EOF
5017 #line 5018 "configure"
5018 #include "confdefs.h"
5019 /* System header to define __stub macros and hopefully few prototypes,
5020     which can conflict with char $ac_func(); below.  */
5021 #include <assert.h>
5022 /* Override any gcc2 internal prototype to avoid an error.  */
5023 /* We use char because int might match the return type of a gcc2
5024     builtin and then its argument prototype would still apply.  */
5025 char $ac_func();
5026
5027 int main() {
5028
5029 /* The GNU C library defines this for functions which it implements
5030     to always fail with ENOSYS.  Some functions are actually named
5031     something starting with __ and the normal name is an alias.  */
5032 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5033 choke me
5034 #else
5035 $ac_func();
5036 #endif
5037
5038 ; return 0; }
5039 EOF
5040 if { (eval echo configure:5041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5041   rm -rf conftest*
5042   eval "ac_cv_func_$ac_func=yes"
5043 else
5044   echo "configure: failed program was:" >&5
5045   cat conftest.$ac_ext >&5
5046   rm -rf conftest*
5047   eval "ac_cv_func_$ac_func=no"
5048 fi
5049 rm -f conftest*
5050 fi
5051
5052 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5053   echo "$ac_t""yes" 1>&6
5054     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5055   cat >> confdefs.h <<EOF
5056 #define $ac_tr_func 1
5057 EOF
5058  
5059 else
5060   echo "$ac_t""no" 1>&6
5061 fi
5062 done
5063
5064 if test x"$ac_cv_func_connect" = x"no"; then
5065     case "$LIBS" in
5066     *-lnsl*) ;;
5067     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5068 echo "configure:5069: checking for printf in -lnsl_s" >&5
5069 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5070 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5071   echo $ac_n "(cached) $ac_c" 1>&6
5072 else
5073   ac_save_LIBS="$LIBS"
5074 LIBS="-lnsl_s  $LIBS"
5075 cat > conftest.$ac_ext <<EOF
5076 #line 5077 "configure"
5077 #include "confdefs.h"
5078 /* Override any gcc2 internal prototype to avoid an error.  */
5079 /* We use char because int might match the return type of a gcc2
5080     builtin and then its argument prototype would still apply.  */
5081 char printf();
5082
5083 int main() {
5084 printf()
5085 ; return 0; }
5086 EOF
5087 if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5088   rm -rf conftest*
5089   eval "ac_cv_lib_$ac_lib_var=yes"
5090 else
5091   echo "configure: failed program was:" >&5
5092   cat conftest.$ac_ext >&5
5093   rm -rf conftest*
5094   eval "ac_cv_lib_$ac_lib_var=no"
5095 fi
5096 rm -f conftest*
5097 LIBS="$ac_save_LIBS"
5098
5099 fi
5100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5101   echo "$ac_t""yes" 1>&6
5102     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5103     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5104   cat >> confdefs.h <<EOF
5105 #define $ac_tr_lib 1
5106 EOF
5107
5108   LIBS="-lnsl_s $LIBS"
5109
5110 else
5111   echo "$ac_t""no" 1>&6
5112 fi
5113  ;;
5114     esac
5115     case "$LIBS" in
5116     *-lnsl*) ;;
5117     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5118 echo "configure:5119: checking for printf in -lnsl" >&5
5119 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5120 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5121   echo $ac_n "(cached) $ac_c" 1>&6
5122 else
5123   ac_save_LIBS="$LIBS"
5124 LIBS="-lnsl  $LIBS"
5125 cat > conftest.$ac_ext <<EOF
5126 #line 5127 "configure"
5127 #include "confdefs.h"
5128 /* Override any gcc2 internal prototype to avoid an error.  */
5129 /* We use char because int might match the return type of a gcc2
5130     builtin and then its argument prototype would still apply.  */
5131 char printf();
5132
5133 int main() {
5134 printf()
5135 ; return 0; }
5136 EOF
5137 if { (eval echo configure:5138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5138   rm -rf conftest*
5139   eval "ac_cv_lib_$ac_lib_var=yes"
5140 else
5141   echo "configure: failed program was:" >&5
5142   cat conftest.$ac_ext >&5
5143   rm -rf conftest*
5144   eval "ac_cv_lib_$ac_lib_var=no"
5145 fi
5146 rm -f conftest*
5147 LIBS="$ac_save_LIBS"
5148
5149 fi
5150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5151   echo "$ac_t""yes" 1>&6
5152     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5153     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5154   cat >> confdefs.h <<EOF
5155 #define $ac_tr_lib 1
5156 EOF
5157
5158   LIBS="-lnsl $LIBS"
5159
5160 else
5161   echo "$ac_t""no" 1>&6
5162 fi
5163  ;;
5164     esac
5165     case "$LIBS" in
5166     *-lsocket*) ;;
5167     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5168 echo "configure:5169: checking for connect in -lsocket" >&5
5169 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5170 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5171   echo $ac_n "(cached) $ac_c" 1>&6
5172 else
5173   ac_save_LIBS="$LIBS"
5174 LIBS="-lsocket  $LIBS"
5175 cat > conftest.$ac_ext <<EOF
5176 #line 5177 "configure"
5177 #include "confdefs.h"
5178 /* Override any gcc2 internal prototype to avoid an error.  */
5179 /* We use char because int might match the return type of a gcc2
5180     builtin and then its argument prototype would still apply.  */
5181 char connect();
5182
5183 int main() {
5184 connect()
5185 ; return 0; }
5186 EOF
5187 if { (eval echo configure:5188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5188   rm -rf conftest*
5189   eval "ac_cv_lib_$ac_lib_var=yes"
5190 else
5191   echo "configure: failed program was:" >&5
5192   cat conftest.$ac_ext >&5
5193   rm -rf conftest*
5194   eval "ac_cv_lib_$ac_lib_var=no"
5195 fi
5196 rm -f conftest*
5197 LIBS="$ac_save_LIBS"
5198
5199 fi
5200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5201   echo "$ac_t""yes" 1>&6
5202     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5203     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5204   cat >> confdefs.h <<EOF
5205 #define $ac_tr_lib 1
5206 EOF
5207
5208   LIBS="-lsocket $LIBS"
5209
5210 else
5211   echo "$ac_t""no" 1>&6
5212 fi
5213  ;;
5214     esac
5215     case "$LIBS" in
5216     *-linet*) ;;
5217     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5218 echo "configure:5219: checking for connect in -linet" >&5
5219 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5220 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5221   echo $ac_n "(cached) $ac_c" 1>&6
5222 else
5223   ac_save_LIBS="$LIBS"
5224 LIBS="-linet  $LIBS"
5225 cat > conftest.$ac_ext <<EOF
5226 #line 5227 "configure"
5227 #include "confdefs.h"
5228 /* Override any gcc2 internal prototype to avoid an error.  */
5229 /* We use char because int might match the return type of a gcc2
5230     builtin and then its argument prototype would still apply.  */
5231 char connect();
5232
5233 int main() {
5234 connect()
5235 ; return 0; }
5236 EOF
5237 if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5238   rm -rf conftest*
5239   eval "ac_cv_lib_$ac_lib_var=yes"
5240 else
5241   echo "configure: failed program was:" >&5
5242   cat conftest.$ac_ext >&5
5243   rm -rf conftest*
5244   eval "ac_cv_lib_$ac_lib_var=no"
5245 fi
5246 rm -f conftest*
5247 LIBS="$ac_save_LIBS"
5248
5249 fi
5250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5251   echo "$ac_t""yes" 1>&6
5252     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5253     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5254   cat >> confdefs.h <<EOF
5255 #define $ac_tr_lib 1
5256 EOF
5257
5258   LIBS="-linet $LIBS"
5259
5260 else
5261   echo "$ac_t""no" 1>&6
5262 fi
5263  ;;
5264     esac
5265             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5266        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5267         # ac_cv_func_connect=yes
5268         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5269         cat >> confdefs.h <<\EOF
5270 #define HAVE_CONNECT 1
5271 EOF
5272
5273     fi
5274 fi
5275
5276 ###############################################
5277 # test for where we get get_yp_default_domain() from
5278 for ac_func in yp_get_default_domain
5279 do
5280 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5281 echo "configure:5282: checking for $ac_func" >&5
5282 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5283   echo $ac_n "(cached) $ac_c" 1>&6
5284 else
5285   cat > conftest.$ac_ext <<EOF
5286 #line 5287 "configure"
5287 #include "confdefs.h"
5288 /* System header to define __stub macros and hopefully few prototypes,
5289     which can conflict with char $ac_func(); below.  */
5290 #include <assert.h>
5291 /* Override any gcc2 internal prototype to avoid an error.  */
5292 /* We use char because int might match the return type of a gcc2
5293     builtin and then its argument prototype would still apply.  */
5294 char $ac_func();
5295
5296 int main() {
5297
5298 /* The GNU C library defines this for functions which it implements
5299     to always fail with ENOSYS.  Some functions are actually named
5300     something starting with __ and the normal name is an alias.  */
5301 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5302 choke me
5303 #else
5304 $ac_func();
5305 #endif
5306
5307 ; return 0; }
5308 EOF
5309 if { (eval echo configure:5310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5310   rm -rf conftest*
5311   eval "ac_cv_func_$ac_func=yes"
5312 else
5313   echo "configure: failed program was:" >&5
5314   cat conftest.$ac_ext >&5
5315   rm -rf conftest*
5316   eval "ac_cv_func_$ac_func=no"
5317 fi
5318 rm -f conftest*
5319 fi
5320
5321 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5322   echo "$ac_t""yes" 1>&6
5323     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5324   cat >> confdefs.h <<EOF
5325 #define $ac_tr_func 1
5326 EOF
5327  
5328 else
5329   echo "$ac_t""no" 1>&6
5330 fi
5331 done
5332
5333 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5334         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5335 echo "configure:5336: checking for yp_get_default_domain in -lnsl" >&5
5336 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5337 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5338   echo $ac_n "(cached) $ac_c" 1>&6
5339 else
5340   ac_save_LIBS="$LIBS"
5341 LIBS="-lnsl  $LIBS"
5342 cat > conftest.$ac_ext <<EOF
5343 #line 5344 "configure"
5344 #include "confdefs.h"
5345 /* Override any gcc2 internal prototype to avoid an error.  */
5346 /* We use char because int might match the return type of a gcc2
5347     builtin and then its argument prototype would still apply.  */
5348 char yp_get_default_domain();
5349
5350 int main() {
5351 yp_get_default_domain()
5352 ; return 0; }
5353 EOF
5354 if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5355   rm -rf conftest*
5356   eval "ac_cv_lib_$ac_lib_var=yes"
5357 else
5358   echo "configure: failed program was:" >&5
5359   cat conftest.$ac_ext >&5
5360   rm -rf conftest*
5361   eval "ac_cv_lib_$ac_lib_var=no"
5362 fi
5363 rm -f conftest*
5364 LIBS="$ac_save_LIBS"
5365
5366 fi
5367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5368   echo "$ac_t""yes" 1>&6
5369   LIBS="$LIBS -lnsl";
5370         cat >> confdefs.h <<\EOF
5371 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5372 EOF
5373
5374 else
5375   echo "$ac_t""no" 1>&6
5376 fi
5377  
5378 fi
5379
5380 # Check if we have execl, if not we need to compile smbrun.
5381 for ac_func in execl
5382 do
5383 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5384 echo "configure:5385: checking for $ac_func" >&5
5385 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5386   echo $ac_n "(cached) $ac_c" 1>&6
5387 else
5388   cat > conftest.$ac_ext <<EOF
5389 #line 5390 "configure"
5390 #include "confdefs.h"
5391 /* System header to define __stub macros and hopefully few prototypes,
5392     which can conflict with char $ac_func(); below.  */
5393 #include <assert.h>
5394 /* Override any gcc2 internal prototype to avoid an error.  */
5395 /* We use char because int might match the return type of a gcc2
5396     builtin and then its argument prototype would still apply.  */
5397 char $ac_func();
5398
5399 int main() {
5400
5401 /* The GNU C library defines this for functions which it implements
5402     to always fail with ENOSYS.  Some functions are actually named
5403     something starting with __ and the normal name is an alias.  */
5404 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5405 choke me
5406 #else
5407 $ac_func();
5408 #endif
5409
5410 ; return 0; }
5411 EOF
5412 if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5413   rm -rf conftest*
5414   eval "ac_cv_func_$ac_func=yes"
5415 else
5416   echo "configure: failed program was:" >&5
5417   cat conftest.$ac_ext >&5
5418   rm -rf conftest*
5419   eval "ac_cv_func_$ac_func=no"
5420 fi
5421 rm -f conftest*
5422 fi
5423
5424 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5425   echo "$ac_t""yes" 1>&6
5426     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5427   cat >> confdefs.h <<EOF
5428 #define $ac_tr_func 1
5429 EOF
5430  
5431 else
5432   echo "$ac_t""no" 1>&6
5433 fi
5434 done
5435
5436 if test x"$ac_cv_func_execl" = x"no"; then
5437     RUNPROG="bin/smbrun"
5438 else
5439     RUNPROG=""
5440 fi
5441
5442 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5443 do
5444 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5445 echo "configure:5446: checking for $ac_func" >&5
5446 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5447   echo $ac_n "(cached) $ac_c" 1>&6
5448 else
5449   cat > conftest.$ac_ext <<EOF
5450 #line 5451 "configure"
5451 #include "confdefs.h"
5452 /* System header to define __stub macros and hopefully few prototypes,
5453     which can conflict with char $ac_func(); below.  */
5454 #include <assert.h>
5455 /* Override any gcc2 internal prototype to avoid an error.  */
5456 /* We use char because int might match the return type of a gcc2
5457     builtin and then its argument prototype would still apply.  */
5458 char $ac_func();
5459
5460 int main() {
5461
5462 /* The GNU C library defines this for functions which it implements
5463     to always fail with ENOSYS.  Some functions are actually named
5464     something starting with __ and the normal name is an alias.  */
5465 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5466 choke me
5467 #else
5468 $ac_func();
5469 #endif
5470
5471 ; return 0; }
5472 EOF
5473 if { (eval echo configure:5474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5474   rm -rf conftest*
5475   eval "ac_cv_func_$ac_func=yes"
5476 else
5477   echo "configure: failed program was:" >&5
5478   cat conftest.$ac_ext >&5
5479   rm -rf conftest*
5480   eval "ac_cv_func_$ac_func=no"
5481 fi
5482 rm -f conftest*
5483 fi
5484
5485 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5486   echo "$ac_t""yes" 1>&6
5487     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5488   cat >> confdefs.h <<EOF
5489 #define $ac_tr_func 1
5490 EOF
5491  
5492 else
5493   echo "$ac_t""no" 1>&6
5494 fi
5495 done
5496
5497 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5498 do
5499 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5500 echo "configure:5501: checking for $ac_func" >&5
5501 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5502   echo $ac_n "(cached) $ac_c" 1>&6
5503 else
5504   cat > conftest.$ac_ext <<EOF
5505 #line 5506 "configure"
5506 #include "confdefs.h"
5507 /* System header to define __stub macros and hopefully few prototypes,
5508     which can conflict with char $ac_func(); below.  */
5509 #include <assert.h>
5510 /* Override any gcc2 internal prototype to avoid an error.  */
5511 /* We use char because int might match the return type of a gcc2
5512     builtin and then its argument prototype would still apply.  */
5513 char $ac_func();
5514
5515 int main() {
5516
5517 /* The GNU C library defines this for functions which it implements
5518     to always fail with ENOSYS.  Some functions are actually named
5519     something starting with __ and the normal name is an alias.  */
5520 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5521 choke me
5522 #else
5523 $ac_func();
5524 #endif
5525
5526 ; return 0; }
5527 EOF
5528 if { (eval echo configure:5529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5529   rm -rf conftest*
5530   eval "ac_cv_func_$ac_func=yes"
5531 else
5532   echo "configure: failed program was:" >&5
5533   cat conftest.$ac_ext >&5
5534   rm -rf conftest*
5535   eval "ac_cv_func_$ac_func=no"
5536 fi
5537 rm -f conftest*
5538 fi
5539
5540 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5541   echo "$ac_t""yes" 1>&6
5542     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5543   cat >> confdefs.h <<EOF
5544 #define $ac_tr_func 1
5545 EOF
5546  
5547 else
5548   echo "$ac_t""no" 1>&6
5549 fi
5550 done
5551
5552 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5553 do
5554 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5555 echo "configure:5556: checking for $ac_func" >&5
5556 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5557   echo $ac_n "(cached) $ac_c" 1>&6
5558 else
5559   cat > conftest.$ac_ext <<EOF
5560 #line 5561 "configure"
5561 #include "confdefs.h"
5562 /* System header to define __stub macros and hopefully few prototypes,
5563     which can conflict with char $ac_func(); below.  */
5564 #include <assert.h>
5565 /* Override any gcc2 internal prototype to avoid an error.  */
5566 /* We use char because int might match the return type of a gcc2
5567     builtin and then its argument prototype would still apply.  */
5568 char $ac_func();
5569
5570 int main() {
5571
5572 /* The GNU C library defines this for functions which it implements
5573     to always fail with ENOSYS.  Some functions are actually named
5574     something starting with __ and the normal name is an alias.  */
5575 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5576 choke me
5577 #else
5578 $ac_func();
5579 #endif
5580
5581 ; return 0; }
5582 EOF
5583 if { (eval echo configure:5584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5584   rm -rf conftest*
5585   eval "ac_cv_func_$ac_func=yes"
5586 else
5587   echo "configure: failed program was:" >&5
5588   cat conftest.$ac_ext >&5
5589   rm -rf conftest*
5590   eval "ac_cv_func_$ac_func=no"
5591 fi
5592 rm -f conftest*
5593 fi
5594
5595 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5596   echo "$ac_t""yes" 1>&6
5597     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5598   cat >> confdefs.h <<EOF
5599 #define $ac_tr_func 1
5600 EOF
5601  
5602 else
5603   echo "$ac_t""no" 1>&6
5604 fi
5605 done
5606
5607 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5608 do
5609 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5610 echo "configure:5611: checking for $ac_func" >&5
5611 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5612   echo $ac_n "(cached) $ac_c" 1>&6
5613 else
5614   cat > conftest.$ac_ext <<EOF
5615 #line 5616 "configure"
5616 #include "confdefs.h"
5617 /* System header to define __stub macros and hopefully few prototypes,
5618     which can conflict with char $ac_func(); below.  */
5619 #include <assert.h>
5620 /* Override any gcc2 internal prototype to avoid an error.  */
5621 /* We use char because int might match the return type of a gcc2
5622     builtin and then its argument prototype would still apply.  */
5623 char $ac_func();
5624
5625 int main() {
5626
5627 /* The GNU C library defines this for functions which it implements
5628     to always fail with ENOSYS.  Some functions are actually named
5629     something starting with __ and the normal name is an alias.  */
5630 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5631 choke me
5632 #else
5633 $ac_func();
5634 #endif
5635
5636 ; return 0; }
5637 EOF
5638 if { (eval echo configure:5639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5639   rm -rf conftest*
5640   eval "ac_cv_func_$ac_func=yes"
5641 else
5642   echo "configure: failed program was:" >&5
5643   cat conftest.$ac_ext >&5
5644   rm -rf conftest*
5645   eval "ac_cv_func_$ac_func=no"
5646 fi
5647 rm -f conftest*
5648 fi
5649
5650 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5651   echo "$ac_t""yes" 1>&6
5652     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5653   cat >> confdefs.h <<EOF
5654 #define $ac_tr_func 1
5655 EOF
5656  
5657 else
5658   echo "$ac_t""no" 1>&6
5659 fi
5660 done
5661
5662 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5663 do
5664 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5665 echo "configure:5666: checking for $ac_func" >&5
5666 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5667   echo $ac_n "(cached) $ac_c" 1>&6
5668 else
5669   cat > conftest.$ac_ext <<EOF
5670 #line 5671 "configure"
5671 #include "confdefs.h"
5672 /* System header to define __stub macros and hopefully few prototypes,
5673     which can conflict with char $ac_func(); below.  */
5674 #include <assert.h>
5675 /* Override any gcc2 internal prototype to avoid an error.  */
5676 /* We use char because int might match the return type of a gcc2
5677     builtin and then its argument prototype would still apply.  */
5678 char $ac_func();
5679
5680 int main() {
5681
5682 /* The GNU C library defines this for functions which it implements
5683     to always fail with ENOSYS.  Some functions are actually named
5684     something starting with __ and the normal name is an alias.  */
5685 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5686 choke me
5687 #else
5688 $ac_func();
5689 #endif
5690
5691 ; return 0; }
5692 EOF
5693 if { (eval echo configure:5694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5694   rm -rf conftest*
5695   eval "ac_cv_func_$ac_func=yes"
5696 else
5697   echo "configure: failed program was:" >&5
5698   cat conftest.$ac_ext >&5
5699   rm -rf conftest*
5700   eval "ac_cv_func_$ac_func=no"
5701 fi
5702 rm -f conftest*
5703 fi
5704
5705 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5706   echo "$ac_t""yes" 1>&6
5707     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5708   cat >> confdefs.h <<EOF
5709 #define $ac_tr_func 1
5710 EOF
5711  
5712 else
5713   echo "$ac_t""no" 1>&6
5714 fi
5715 done
5716
5717 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5718 do
5719 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5720 echo "configure:5721: checking for $ac_func" >&5
5721 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5722   echo $ac_n "(cached) $ac_c" 1>&6
5723 else
5724   cat > conftest.$ac_ext <<EOF
5725 #line 5726 "configure"
5726 #include "confdefs.h"
5727 /* System header to define __stub macros and hopefully few prototypes,
5728     which can conflict with char $ac_func(); below.  */
5729 #include <assert.h>
5730 /* Override any gcc2 internal prototype to avoid an error.  */
5731 /* We use char because int might match the return type of a gcc2
5732     builtin and then its argument prototype would still apply.  */
5733 char $ac_func();
5734
5735 int main() {
5736
5737 /* The GNU C library defines this for functions which it implements
5738     to always fail with ENOSYS.  Some functions are actually named
5739     something starting with __ and the normal name is an alias.  */
5740 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5741 choke me
5742 #else
5743 $ac_func();
5744 #endif
5745
5746 ; return 0; }
5747 EOF
5748 if { (eval echo configure:5749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5749   rm -rf conftest*
5750   eval "ac_cv_func_$ac_func=yes"
5751 else
5752   echo "configure: failed program was:" >&5
5753   cat conftest.$ac_ext >&5
5754   rm -rf conftest*
5755   eval "ac_cv_func_$ac_func=no"
5756 fi
5757 rm -f conftest*
5758 fi
5759
5760 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5761   echo "$ac_t""yes" 1>&6
5762     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5763   cat >> confdefs.h <<EOF
5764 #define $ac_tr_func 1
5765 EOF
5766  
5767 else
5768   echo "$ac_t""no" 1>&6
5769 fi
5770 done
5771
5772 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5773 do
5774 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5775 echo "configure:5776: checking for $ac_func" >&5
5776 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5777   echo $ac_n "(cached) $ac_c" 1>&6
5778 else
5779   cat > conftest.$ac_ext <<EOF
5780 #line 5781 "configure"
5781 #include "confdefs.h"
5782 /* System header to define __stub macros and hopefully few prototypes,
5783     which can conflict with char $ac_func(); below.  */
5784 #include <assert.h>
5785 /* Override any gcc2 internal prototype to avoid an error.  */
5786 /* We use char because int might match the return type of a gcc2
5787     builtin and then its argument prototype would still apply.  */
5788 char $ac_func();
5789
5790 int main() {
5791
5792 /* The GNU C library defines this for functions which it implements
5793     to always fail with ENOSYS.  Some functions are actually named
5794     something starting with __ and the normal name is an alias.  */
5795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5796 choke me
5797 #else
5798 $ac_func();
5799 #endif
5800
5801 ; return 0; }
5802 EOF
5803 if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5804   rm -rf conftest*
5805   eval "ac_cv_func_$ac_func=yes"
5806 else
5807   echo "configure: failed program was:" >&5
5808   cat conftest.$ac_ext >&5
5809   rm -rf conftest*
5810   eval "ac_cv_func_$ac_func=no"
5811 fi
5812 rm -f conftest*
5813 fi
5814
5815 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5816   echo "$ac_t""yes" 1>&6
5817     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5818   cat >> confdefs.h <<EOF
5819 #define $ac_tr_func 1
5820 EOF
5821  
5822 else
5823   echo "$ac_t""no" 1>&6
5824 fi
5825 done
5826
5827 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5828 do
5829 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5830 echo "configure:5831: checking for $ac_func" >&5
5831 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5832   echo $ac_n "(cached) $ac_c" 1>&6
5833 else
5834   cat > conftest.$ac_ext <<EOF
5835 #line 5836 "configure"
5836 #include "confdefs.h"
5837 /* System header to define __stub macros and hopefully few prototypes,
5838     which can conflict with char $ac_func(); below.  */
5839 #include <assert.h>
5840 /* Override any gcc2 internal prototype to avoid an error.  */
5841 /* We use char because int might match the return type of a gcc2
5842     builtin and then its argument prototype would still apply.  */
5843 char $ac_func();
5844
5845 int main() {
5846
5847 /* The GNU C library defines this for functions which it implements
5848     to always fail with ENOSYS.  Some functions are actually named
5849     something starting with __ and the normal name is an alias.  */
5850 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5851 choke me
5852 #else
5853 $ac_func();
5854 #endif
5855
5856 ; return 0; }
5857 EOF
5858 if { (eval echo configure:5859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5859   rm -rf conftest*
5860   eval "ac_cv_func_$ac_func=yes"
5861 else
5862   echo "configure: failed program was:" >&5
5863   cat conftest.$ac_ext >&5
5864   rm -rf conftest*
5865   eval "ac_cv_func_$ac_func=no"
5866 fi
5867 rm -f conftest*
5868 fi
5869
5870 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5871   echo "$ac_t""yes" 1>&6
5872     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5873   cat >> confdefs.h <<EOF
5874 #define $ac_tr_func 1
5875 EOF
5876  
5877 else
5878   echo "$ac_t""no" 1>&6
5879 fi
5880 done
5881
5882 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5883 do
5884 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5885 echo "configure:5886: checking for $ac_func" >&5
5886 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5887   echo $ac_n "(cached) $ac_c" 1>&6
5888 else
5889   cat > conftest.$ac_ext <<EOF
5890 #line 5891 "configure"
5891 #include "confdefs.h"
5892 /* System header to define __stub macros and hopefully few prototypes,
5893     which can conflict with char $ac_func(); below.  */
5894 #include <assert.h>
5895 /* Override any gcc2 internal prototype to avoid an error.  */
5896 /* We use char because int might match the return type of a gcc2
5897     builtin and then its argument prototype would still apply.  */
5898 char $ac_func();
5899
5900 int main() {
5901
5902 /* The GNU C library defines this for functions which it implements
5903     to always fail with ENOSYS.  Some functions are actually named
5904     something starting with __ and the normal name is an alias.  */
5905 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5906 choke me
5907 #else
5908 $ac_func();
5909 #endif
5910
5911 ; return 0; }
5912 EOF
5913 if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5914   rm -rf conftest*
5915   eval "ac_cv_func_$ac_func=yes"
5916 else
5917   echo "configure: failed program was:" >&5
5918   cat conftest.$ac_ext >&5
5919   rm -rf conftest*
5920   eval "ac_cv_func_$ac_func=no"
5921 fi
5922 rm -f conftest*
5923 fi
5924
5925 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5926   echo "$ac_t""yes" 1>&6
5927     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5928   cat >> confdefs.h <<EOF
5929 #define $ac_tr_func 1
5930 EOF
5931  
5932 else
5933   echo "$ac_t""no" 1>&6
5934 fi
5935 done
5936
5937 for ac_func in syslog vsyslog getgrouplist
5938 do
5939 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5940 echo "configure:5941: checking for $ac_func" >&5
5941 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5942   echo $ac_n "(cached) $ac_c" 1>&6
5943 else
5944   cat > conftest.$ac_ext <<EOF
5945 #line 5946 "configure"
5946 #include "confdefs.h"
5947 /* System header to define __stub macros and hopefully few prototypes,
5948     which can conflict with char $ac_func(); below.  */
5949 #include <assert.h>
5950 /* Override any gcc2 internal prototype to avoid an error.  */
5951 /* We use char because int might match the return type of a gcc2
5952     builtin and then its argument prototype would still apply.  */
5953 char $ac_func();
5954
5955 int main() {
5956
5957 /* The GNU C library defines this for functions which it implements
5958     to always fail with ENOSYS.  Some functions are actually named
5959     something starting with __ and the normal name is an alias.  */
5960 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5961 choke me
5962 #else
5963 $ac_func();
5964 #endif
5965
5966 ; return 0; }
5967 EOF
5968 if { (eval echo configure:5969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5969   rm -rf conftest*
5970   eval "ac_cv_func_$ac_func=yes"
5971 else
5972   echo "configure: failed program was:" >&5
5973   cat conftest.$ac_ext >&5
5974   rm -rf conftest*
5975   eval "ac_cv_func_$ac_func=no"
5976 fi
5977 rm -f conftest*
5978 fi
5979
5980 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5981   echo "$ac_t""yes" 1>&6
5982     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5983   cat >> confdefs.h <<EOF
5984 #define $ac_tr_func 1
5985 EOF
5986  
5987 else
5988   echo "$ac_t""no" 1>&6
5989 fi
5990 done
5991
5992 # setbuffer is needed for smbtorture
5993 for ac_func in setbuffer
5994 do
5995 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5996 echo "configure:5997: checking for $ac_func" >&5
5997 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5998   echo $ac_n "(cached) $ac_c" 1>&6
5999 else
6000   cat > conftest.$ac_ext <<EOF
6001 #line 6002 "configure"
6002 #include "confdefs.h"
6003 /* System header to define __stub macros and hopefully few prototypes,
6004     which can conflict with char $ac_func(); below.  */
6005 #include <assert.h>
6006 /* Override any gcc2 internal prototype to avoid an error.  */
6007 /* We use char because int might match the return type of a gcc2
6008     builtin and then its argument prototype would still apply.  */
6009 char $ac_func();
6010
6011 int main() {
6012
6013 /* The GNU C library defines this for functions which it implements
6014     to always fail with ENOSYS.  Some functions are actually named
6015     something starting with __ and the normal name is an alias.  */
6016 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6017 choke me
6018 #else
6019 $ac_func();
6020 #endif
6021
6022 ; return 0; }
6023 EOF
6024 if { (eval echo configure:6025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6025   rm -rf conftest*
6026   eval "ac_cv_func_$ac_func=yes"
6027 else
6028   echo "configure: failed program was:" >&5
6029   cat conftest.$ac_ext >&5
6030   rm -rf conftest*
6031   eval "ac_cv_func_$ac_func=no"
6032 fi
6033 rm -f conftest*
6034 fi
6035
6036 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6037   echo "$ac_t""yes" 1>&6
6038     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6039   cat >> confdefs.h <<EOF
6040 #define $ac_tr_func 1
6041 EOF
6042  
6043 else
6044   echo "$ac_t""no" 1>&6
6045 fi
6046 done
6047
6048
6049 # syscall() is needed for smbwrapper.
6050 for ac_func in syscall
6051 do
6052 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6053 echo "configure:6054: checking for $ac_func" >&5
6054 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6055   echo $ac_n "(cached) $ac_c" 1>&6
6056 else
6057   cat > conftest.$ac_ext <<EOF
6058 #line 6059 "configure"
6059 #include "confdefs.h"
6060 /* System header to define __stub macros and hopefully few prototypes,
6061     which can conflict with char $ac_func(); below.  */
6062 #include <assert.h>
6063 /* Override any gcc2 internal prototype to avoid an error.  */
6064 /* We use char because int might match the return type of a gcc2
6065     builtin and then its argument prototype would still apply.  */
6066 char $ac_func();
6067
6068 int main() {
6069
6070 /* The GNU C library defines this for functions which it implements
6071     to always fail with ENOSYS.  Some functions are actually named
6072     something starting with __ and the normal name is an alias.  */
6073 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6074 choke me
6075 #else
6076 $ac_func();
6077 #endif
6078
6079 ; return 0; }
6080 EOF
6081 if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6082   rm -rf conftest*
6083   eval "ac_cv_func_$ac_func=yes"
6084 else
6085   echo "configure: failed program was:" >&5
6086   cat conftest.$ac_ext >&5
6087   rm -rf conftest*
6088   eval "ac_cv_func_$ac_func=no"
6089 fi
6090 rm -f conftest*
6091 fi
6092
6093 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6094   echo "$ac_t""yes" 1>&6
6095     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6096   cat >> confdefs.h <<EOF
6097 #define $ac_tr_func 1
6098 EOF
6099  
6100 else
6101   echo "$ac_t""no" 1>&6
6102 fi
6103 done
6104
6105
6106 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6107 do
6108 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6109 echo "configure:6110: checking for $ac_func" >&5
6110 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6111   echo $ac_n "(cached) $ac_c" 1>&6
6112 else
6113   cat > conftest.$ac_ext <<EOF
6114 #line 6115 "configure"
6115 #include "confdefs.h"
6116 /* System header to define __stub macros and hopefully few prototypes,
6117     which can conflict with char $ac_func(); below.  */
6118 #include <assert.h>
6119 /* Override any gcc2 internal prototype to avoid an error.  */
6120 /* We use char because int might match the return type of a gcc2
6121     builtin and then its argument prototype would still apply.  */
6122 char $ac_func();
6123
6124 int main() {
6125
6126 /* The GNU C library defines this for functions which it implements
6127     to always fail with ENOSYS.  Some functions are actually named
6128     something starting with __ and the normal name is an alias.  */
6129 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6130 choke me
6131 #else
6132 $ac_func();
6133 #endif
6134
6135 ; return 0; }
6136 EOF
6137 if { (eval echo configure:6138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6138   rm -rf conftest*
6139   eval "ac_cv_func_$ac_func=yes"
6140 else
6141   echo "configure: failed program was:" >&5
6142   cat conftest.$ac_ext >&5
6143   rm -rf conftest*
6144   eval "ac_cv_func_$ac_func=no"
6145 fi
6146 rm -f conftest*
6147 fi
6148
6149 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6150   echo "$ac_t""yes" 1>&6
6151     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6152   cat >> confdefs.h <<EOF
6153 #define $ac_tr_func 1
6154 EOF
6155  
6156 else
6157   echo "$ac_t""no" 1>&6
6158 fi
6159 done
6160
6161 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6162 do
6163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6164 echo "configure:6165: checking for $ac_func" >&5
6165 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6166   echo $ac_n "(cached) $ac_c" 1>&6
6167 else
6168   cat > conftest.$ac_ext <<EOF
6169 #line 6170 "configure"
6170 #include "confdefs.h"
6171 /* System header to define __stub macros and hopefully few prototypes,
6172     which can conflict with char $ac_func(); below.  */
6173 #include <assert.h>
6174 /* Override any gcc2 internal prototype to avoid an error.  */
6175 /* We use char because int might match the return type of a gcc2
6176     builtin and then its argument prototype would still apply.  */
6177 char $ac_func();
6178
6179 int main() {
6180
6181 /* The GNU C library defines this for functions which it implements
6182     to always fail with ENOSYS.  Some functions are actually named
6183     something starting with __ and the normal name is an alias.  */
6184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6185 choke me
6186 #else
6187 $ac_func();
6188 #endif
6189
6190 ; return 0; }
6191 EOF
6192 if { (eval echo configure:6193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6193   rm -rf conftest*
6194   eval "ac_cv_func_$ac_func=yes"
6195 else
6196   echo "configure: failed program was:" >&5
6197   cat conftest.$ac_ext >&5
6198   rm -rf conftest*
6199   eval "ac_cv_func_$ac_func=no"
6200 fi
6201 rm -f conftest*
6202 fi
6203
6204 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6205   echo "$ac_t""yes" 1>&6
6206     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6207   cat >> confdefs.h <<EOF
6208 #define $ac_tr_func 1
6209 EOF
6210  
6211 else
6212   echo "$ac_t""no" 1>&6
6213 fi
6214 done
6215
6216 for ac_func in __getcwd _getcwd
6217 do
6218 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6219 echo "configure:6220: checking for $ac_func" >&5
6220 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6221   echo $ac_n "(cached) $ac_c" 1>&6
6222 else
6223   cat > conftest.$ac_ext <<EOF
6224 #line 6225 "configure"
6225 #include "confdefs.h"
6226 /* System header to define __stub macros and hopefully few prototypes,
6227     which can conflict with char $ac_func(); below.  */
6228 #include <assert.h>
6229 /* Override any gcc2 internal prototype to avoid an error.  */
6230 /* We use char because int might match the return type of a gcc2
6231     builtin and then its argument prototype would still apply.  */
6232 char $ac_func();
6233
6234 int main() {
6235
6236 /* The GNU C library defines this for functions which it implements
6237     to always fail with ENOSYS.  Some functions are actually named
6238     something starting with __ and the normal name is an alias.  */
6239 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6240 choke me
6241 #else
6242 $ac_func();
6243 #endif
6244
6245 ; return 0; }
6246 EOF
6247 if { (eval echo configure:6248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6248   rm -rf conftest*
6249   eval "ac_cv_func_$ac_func=yes"
6250 else
6251   echo "configure: failed program was:" >&5
6252   cat conftest.$ac_ext >&5
6253   rm -rf conftest*
6254   eval "ac_cv_func_$ac_func=no"
6255 fi
6256 rm -f conftest*
6257 fi
6258
6259 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6260   echo "$ac_t""yes" 1>&6
6261     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6262   cat >> confdefs.h <<EOF
6263 #define $ac_tr_func 1
6264 EOF
6265  
6266 else
6267   echo "$ac_t""no" 1>&6
6268 fi
6269 done
6270
6271 for ac_func in __xstat __fxstat __lxstat
6272 do
6273 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6274 echo "configure:6275: checking for $ac_func" >&5
6275 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6276   echo $ac_n "(cached) $ac_c" 1>&6
6277 else
6278   cat > conftest.$ac_ext <<EOF
6279 #line 6280 "configure"
6280 #include "confdefs.h"
6281 /* System header to define __stub macros and hopefully few prototypes,
6282     which can conflict with char $ac_func(); below.  */
6283 #include <assert.h>
6284 /* Override any gcc2 internal prototype to avoid an error.  */
6285 /* We use char because int might match the return type of a gcc2
6286     builtin and then its argument prototype would still apply.  */
6287 char $ac_func();
6288
6289 int main() {
6290
6291 /* The GNU C library defines this for functions which it implements
6292     to always fail with ENOSYS.  Some functions are actually named
6293     something starting with __ and the normal name is an alias.  */
6294 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6295 choke me
6296 #else
6297 $ac_func();
6298 #endif
6299
6300 ; return 0; }
6301 EOF
6302 if { (eval echo configure:6303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6303   rm -rf conftest*
6304   eval "ac_cv_func_$ac_func=yes"
6305 else
6306   echo "configure: failed program was:" >&5
6307   cat conftest.$ac_ext >&5
6308   rm -rf conftest*
6309   eval "ac_cv_func_$ac_func=no"
6310 fi
6311 rm -f conftest*
6312 fi
6313
6314 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6315   echo "$ac_t""yes" 1>&6
6316     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6317   cat >> confdefs.h <<EOF
6318 #define $ac_tr_func 1
6319 EOF
6320  
6321 else
6322   echo "$ac_t""no" 1>&6
6323 fi
6324 done
6325
6326 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6327 do
6328 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6329 echo "configure:6330: checking for $ac_func" >&5
6330 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6331   echo $ac_n "(cached) $ac_c" 1>&6
6332 else
6333   cat > conftest.$ac_ext <<EOF
6334 #line 6335 "configure"
6335 #include "confdefs.h"
6336 /* System header to define __stub macros and hopefully few prototypes,
6337     which can conflict with char $ac_func(); below.  */
6338 #include <assert.h>
6339 /* Override any gcc2 internal prototype to avoid an error.  */
6340 /* We use char because int might match the return type of a gcc2
6341     builtin and then its argument prototype would still apply.  */
6342 char $ac_func();
6343
6344 int main() {
6345
6346 /* The GNU C library defines this for functions which it implements
6347     to always fail with ENOSYS.  Some functions are actually named
6348     something starting with __ and the normal name is an alias.  */
6349 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6350 choke me
6351 #else
6352 $ac_func();
6353 #endif
6354
6355 ; return 0; }
6356 EOF
6357 if { (eval echo configure:6358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6358   rm -rf conftest*
6359   eval "ac_cv_func_$ac_func=yes"
6360 else
6361   echo "configure: failed program was:" >&5
6362   cat conftest.$ac_ext >&5
6363   rm -rf conftest*
6364   eval "ac_cv_func_$ac_func=no"
6365 fi
6366 rm -f conftest*
6367 fi
6368
6369 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6370   echo "$ac_t""yes" 1>&6
6371     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6372   cat >> confdefs.h <<EOF
6373 #define $ac_tr_func 1
6374 EOF
6375  
6376 else
6377   echo "$ac_t""no" 1>&6
6378 fi
6379 done
6380
6381 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6382 do
6383 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6384 echo "configure:6385: checking for $ac_func" >&5
6385 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6386   echo $ac_n "(cached) $ac_c" 1>&6
6387 else
6388   cat > conftest.$ac_ext <<EOF
6389 #line 6390 "configure"
6390 #include "confdefs.h"
6391 /* System header to define __stub macros and hopefully few prototypes,
6392     which can conflict with char $ac_func(); below.  */
6393 #include <assert.h>
6394 /* Override any gcc2 internal prototype to avoid an error.  */
6395 /* We use char because int might match the return type of a gcc2
6396     builtin and then its argument prototype would still apply.  */
6397 char $ac_func();
6398
6399 int main() {
6400
6401 /* The GNU C library defines this for functions which it implements
6402     to always fail with ENOSYS.  Some functions are actually named
6403     something starting with __ and the normal name is an alias.  */
6404 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6405 choke me
6406 #else
6407 $ac_func();
6408 #endif
6409
6410 ; return 0; }
6411 EOF
6412 if { (eval echo configure:6413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6413   rm -rf conftest*
6414   eval "ac_cv_func_$ac_func=yes"
6415 else
6416   echo "configure: failed program was:" >&5
6417   cat conftest.$ac_ext >&5
6418   rm -rf conftest*
6419   eval "ac_cv_func_$ac_func=no"
6420 fi
6421 rm -f conftest*
6422 fi
6423
6424 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6425   echo "$ac_t""yes" 1>&6
6426     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6427   cat >> confdefs.h <<EOF
6428 #define $ac_tr_func 1
6429 EOF
6430  
6431 else
6432   echo "$ac_t""no" 1>&6
6433 fi
6434 done
6435
6436 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6437 do
6438 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6439 echo "configure:6440: checking for $ac_func" >&5
6440 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6441   echo $ac_n "(cached) $ac_c" 1>&6
6442 else
6443   cat > conftest.$ac_ext <<EOF
6444 #line 6445 "configure"
6445 #include "confdefs.h"
6446 /* System header to define __stub macros and hopefully few prototypes,
6447     which can conflict with char $ac_func(); below.  */
6448 #include <assert.h>
6449 /* Override any gcc2 internal prototype to avoid an error.  */
6450 /* We use char because int might match the return type of a gcc2
6451     builtin and then its argument prototype would still apply.  */
6452 char $ac_func();
6453
6454 int main() {
6455
6456 /* The GNU C library defines this for functions which it implements
6457     to always fail with ENOSYS.  Some functions are actually named
6458     something starting with __ and the normal name is an alias.  */
6459 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6460 choke me
6461 #else
6462 $ac_func();
6463 #endif
6464
6465 ; return 0; }
6466 EOF
6467 if { (eval echo configure:6468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6468   rm -rf conftest*
6469   eval "ac_cv_func_$ac_func=yes"
6470 else
6471   echo "configure: failed program was:" >&5
6472   cat conftest.$ac_ext >&5
6473   rm -rf conftest*
6474   eval "ac_cv_func_$ac_func=no"
6475 fi
6476 rm -f conftest*
6477 fi
6478
6479 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6480   echo "$ac_t""yes" 1>&6
6481     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6482   cat >> confdefs.h <<EOF
6483 #define $ac_tr_func 1
6484 EOF
6485  
6486 else
6487   echo "$ac_t""no" 1>&6
6488 fi
6489 done
6490
6491 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6492 do
6493 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6494 echo "configure:6495: checking for $ac_func" >&5
6495 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6496   echo $ac_n "(cached) $ac_c" 1>&6
6497 else
6498   cat > conftest.$ac_ext <<EOF
6499 #line 6500 "configure"
6500 #include "confdefs.h"
6501 /* System header to define __stub macros and hopefully few prototypes,
6502     which can conflict with char $ac_func(); below.  */
6503 #include <assert.h>
6504 /* Override any gcc2 internal prototype to avoid an error.  */
6505 /* We use char because int might match the return type of a gcc2
6506     builtin and then its argument prototype would still apply.  */
6507 char $ac_func();
6508
6509 int main() {
6510
6511 /* The GNU C library defines this for functions which it implements
6512     to always fail with ENOSYS.  Some functions are actually named
6513     something starting with __ and the normal name is an alias.  */
6514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6515 choke me
6516 #else
6517 $ac_func();
6518 #endif
6519
6520 ; return 0; }
6521 EOF
6522 if { (eval echo configure:6523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6523   rm -rf conftest*
6524   eval "ac_cv_func_$ac_func=yes"
6525 else
6526   echo "configure: failed program was:" >&5
6527   cat conftest.$ac_ext >&5
6528   rm -rf conftest*
6529   eval "ac_cv_func_$ac_func=no"
6530 fi
6531 rm -f conftest*
6532 fi
6533
6534 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6535   echo "$ac_t""yes" 1>&6
6536     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6537   cat >> confdefs.h <<EOF
6538 #define $ac_tr_func 1
6539 EOF
6540  
6541 else
6542   echo "$ac_t""no" 1>&6
6543 fi
6544 done
6545
6546 for ac_func in _write __write _fork __fork
6547 do
6548 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6549 echo "configure:6550: checking for $ac_func" >&5
6550 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6551   echo $ac_n "(cached) $ac_c" 1>&6
6552 else
6553   cat > conftest.$ac_ext <<EOF
6554 #line 6555 "configure"
6555 #include "confdefs.h"
6556 /* System header to define __stub macros and hopefully few prototypes,
6557     which can conflict with char $ac_func(); below.  */
6558 #include <assert.h>
6559 /* Override any gcc2 internal prototype to avoid an error.  */
6560 /* We use char because int might match the return type of a gcc2
6561     builtin and then its argument prototype would still apply.  */
6562 char $ac_func();
6563
6564 int main() {
6565
6566 /* The GNU C library defines this for functions which it implements
6567     to always fail with ENOSYS.  Some functions are actually named
6568     something starting with __ and the normal name is an alias.  */
6569 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6570 choke me
6571 #else
6572 $ac_func();
6573 #endif
6574
6575 ; return 0; }
6576 EOF
6577 if { (eval echo configure:6578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6578   rm -rf conftest*
6579   eval "ac_cv_func_$ac_func=yes"
6580 else
6581   echo "configure: failed program was:" >&5
6582   cat conftest.$ac_ext >&5
6583   rm -rf conftest*
6584   eval "ac_cv_func_$ac_func=no"
6585 fi
6586 rm -f conftest*
6587 fi
6588
6589 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6590   echo "$ac_t""yes" 1>&6
6591     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6592   cat >> confdefs.h <<EOF
6593 #define $ac_tr_func 1
6594 EOF
6595  
6596 else
6597   echo "$ac_t""no" 1>&6
6598 fi
6599 done
6600
6601 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6602 do
6603 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6604 echo "configure:6605: checking for $ac_func" >&5
6605 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6606   echo $ac_n "(cached) $ac_c" 1>&6
6607 else
6608   cat > conftest.$ac_ext <<EOF
6609 #line 6610 "configure"
6610 #include "confdefs.h"
6611 /* System header to define __stub macros and hopefully few prototypes,
6612     which can conflict with char $ac_func(); below.  */
6613 #include <assert.h>
6614 /* Override any gcc2 internal prototype to avoid an error.  */
6615 /* We use char because int might match the return type of a gcc2
6616     builtin and then its argument prototype would still apply.  */
6617 char $ac_func();
6618
6619 int main() {
6620
6621 /* The GNU C library defines this for functions which it implements
6622     to always fail with ENOSYS.  Some functions are actually named
6623     something starting with __ and the normal name is an alias.  */
6624 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6625 choke me
6626 #else
6627 $ac_func();
6628 #endif
6629
6630 ; return 0; }
6631 EOF
6632 if { (eval echo configure:6633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6633   rm -rf conftest*
6634   eval "ac_cv_func_$ac_func=yes"
6635 else
6636   echo "configure: failed program was:" >&5
6637   cat conftest.$ac_ext >&5
6638   rm -rf conftest*
6639   eval "ac_cv_func_$ac_func=no"
6640 fi
6641 rm -f conftest*
6642 fi
6643
6644 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6645   echo "$ac_t""yes" 1>&6
6646     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6647   cat >> confdefs.h <<EOF
6648 #define $ac_tr_func 1
6649 EOF
6650  
6651 else
6652   echo "$ac_t""no" 1>&6
6653 fi
6654 done
6655
6656 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6657 do
6658 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6659 echo "configure:6660: checking for $ac_func" >&5
6660 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6661   echo $ac_n "(cached) $ac_c" 1>&6
6662 else
6663   cat > conftest.$ac_ext <<EOF
6664 #line 6665 "configure"
6665 #include "confdefs.h"
6666 /* System header to define __stub macros and hopefully few prototypes,
6667     which can conflict with char $ac_func(); below.  */
6668 #include <assert.h>
6669 /* Override any gcc2 internal prototype to avoid an error.  */
6670 /* We use char because int might match the return type of a gcc2
6671     builtin and then its argument prototype would still apply.  */
6672 char $ac_func();
6673
6674 int main() {
6675
6676 /* The GNU C library defines this for functions which it implements
6677     to always fail with ENOSYS.  Some functions are actually named
6678     something starting with __ and the normal name is an alias.  */
6679 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6680 choke me
6681 #else
6682 $ac_func();
6683 #endif
6684
6685 ; return 0; }
6686 EOF
6687 if { (eval echo configure:6688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6688   rm -rf conftest*
6689   eval "ac_cv_func_$ac_func=yes"
6690 else
6691   echo "configure: failed program was:" >&5
6692   cat conftest.$ac_ext >&5
6693   rm -rf conftest*
6694   eval "ac_cv_func_$ac_func=no"
6695 fi
6696 rm -f conftest*
6697 fi
6698
6699 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6700   echo "$ac_t""yes" 1>&6
6701     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6702   cat >> confdefs.h <<EOF
6703 #define $ac_tr_func 1
6704 EOF
6705  
6706 else
6707   echo "$ac_t""no" 1>&6
6708 fi
6709 done
6710
6711 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6712 do
6713 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6714 echo "configure:6715: checking for $ac_func" >&5
6715 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6716   echo $ac_n "(cached) $ac_c" 1>&6
6717 else
6718   cat > conftest.$ac_ext <<EOF
6719 #line 6720 "configure"
6720 #include "confdefs.h"
6721 /* System header to define __stub macros and hopefully few prototypes,
6722     which can conflict with char $ac_func(); below.  */
6723 #include <assert.h>
6724 /* Override any gcc2 internal prototype to avoid an error.  */
6725 /* We use char because int might match the return type of a gcc2
6726     builtin and then its argument prototype would still apply.  */
6727 char $ac_func();
6728
6729 int main() {
6730
6731 /* The GNU C library defines this for functions which it implements
6732     to always fail with ENOSYS.  Some functions are actually named
6733     something starting with __ and the normal name is an alias.  */
6734 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6735 choke me
6736 #else
6737 $ac_func();
6738 #endif
6739
6740 ; return 0; }
6741 EOF
6742 if { (eval echo configure:6743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6743   rm -rf conftest*
6744   eval "ac_cv_func_$ac_func=yes"
6745 else
6746   echo "configure: failed program was:" >&5
6747   cat conftest.$ac_ext >&5
6748   rm -rf conftest*
6749   eval "ac_cv_func_$ac_func=no"
6750 fi
6751 rm -f conftest*
6752 fi
6753
6754 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6755   echo "$ac_t""yes" 1>&6
6756     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6757   cat >> confdefs.h <<EOF
6758 #define $ac_tr_func 1
6759 EOF
6760  
6761 else
6762   echo "$ac_t""no" 1>&6
6763 fi
6764 done
6765
6766 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6767 do
6768 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6769 echo "configure:6770: checking for $ac_func" >&5
6770 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6771   echo $ac_n "(cached) $ac_c" 1>&6
6772 else
6773   cat > conftest.$ac_ext <<EOF
6774 #line 6775 "configure"
6775 #include "confdefs.h"
6776 /* System header to define __stub macros and hopefully few prototypes,
6777     which can conflict with char $ac_func(); below.  */
6778 #include <assert.h>
6779 /* Override any gcc2 internal prototype to avoid an error.  */
6780 /* We use char because int might match the return type of a gcc2
6781     builtin and then its argument prototype would still apply.  */
6782 char $ac_func();
6783
6784 int main() {
6785
6786 /* The GNU C library defines this for functions which it implements
6787     to always fail with ENOSYS.  Some functions are actually named
6788     something starting with __ and the normal name is an alias.  */
6789 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6790 choke me
6791 #else
6792 $ac_func();
6793 #endif
6794
6795 ; return 0; }
6796 EOF
6797 if { (eval echo configure:6798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6798   rm -rf conftest*
6799   eval "ac_cv_func_$ac_func=yes"
6800 else
6801   echo "configure: failed program was:" >&5
6802   cat conftest.$ac_ext >&5
6803   rm -rf conftest*
6804   eval "ac_cv_func_$ac_func=no"
6805 fi
6806 rm -f conftest*
6807 fi
6808
6809 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6810   echo "$ac_t""yes" 1>&6
6811     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6812   cat >> confdefs.h <<EOF
6813 #define $ac_tr_func 1
6814 EOF
6815  
6816 else
6817   echo "$ac_t""no" 1>&6
6818 fi
6819 done
6820
6821 for ac_func in open64 _open64 __open64 creat64
6822 do
6823 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6824 echo "configure:6825: checking for $ac_func" >&5
6825 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6826   echo $ac_n "(cached) $ac_c" 1>&6
6827 else
6828   cat > conftest.$ac_ext <<EOF
6829 #line 6830 "configure"
6830 #include "confdefs.h"
6831 /* System header to define __stub macros and hopefully few prototypes,
6832     which can conflict with char $ac_func(); below.  */
6833 #include <assert.h>
6834 /* Override any gcc2 internal prototype to avoid an error.  */
6835 /* We use char because int might match the return type of a gcc2
6836     builtin and then its argument prototype would still apply.  */
6837 char $ac_func();
6838
6839 int main() {
6840
6841 /* The GNU C library defines this for functions which it implements
6842     to always fail with ENOSYS.  Some functions are actually named
6843     something starting with __ and the normal name is an alias.  */
6844 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6845 choke me
6846 #else
6847 $ac_func();
6848 #endif
6849
6850 ; return 0; }
6851 EOF
6852 if { (eval echo configure:6853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6853   rm -rf conftest*
6854   eval "ac_cv_func_$ac_func=yes"
6855 else
6856   echo "configure: failed program was:" >&5
6857   cat conftest.$ac_ext >&5
6858   rm -rf conftest*
6859   eval "ac_cv_func_$ac_func=no"
6860 fi
6861 rm -f conftest*
6862 fi
6863
6864 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6865   echo "$ac_t""yes" 1>&6
6866     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6867   cat >> confdefs.h <<EOF
6868 #define $ac_tr_func 1
6869 EOF
6870  
6871 else
6872   echo "$ac_t""no" 1>&6
6873 fi
6874 done
6875
6876
6877 #
6878 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6879 #
6880
6881 if test x$ac_cv_func_stat64 = xno ; then
6882   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6883 echo "configure:6884: checking for stat64 in <sys/stat.h>" >&5
6884   cat > conftest.$ac_ext <<EOF
6885 #line 6886 "configure"
6886 #include "confdefs.h"
6887
6888 #if defined(HAVE_UNISTD_H)
6889 #include <unistd.h>
6890 #endif
6891 #include <sys/stat.h>
6892
6893 int main() {
6894 struct stat64 st64; exit(stat64(".",&st64));
6895 ; return 0; }
6896 EOF
6897 if { (eval echo configure:6898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6898   rm -rf conftest*
6899   ac_cv_func_stat64=yes
6900 else
6901   echo "configure: failed program was:" >&5
6902   cat conftest.$ac_ext >&5
6903 fi
6904 rm -f conftest*
6905   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6906   if test x$ac_cv_func_stat64 = xyes ; then
6907     cat >> confdefs.h <<\EOF
6908 #define HAVE_STAT64 1
6909 EOF
6910
6911   fi
6912 fi
6913
6914 if test x$ac_cv_func_lstat64 = xno ; then
6915   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6916 echo "configure:6917: checking for lstat64 in <sys/stat.h>" >&5
6917   cat > conftest.$ac_ext <<EOF
6918 #line 6919 "configure"
6919 #include "confdefs.h"
6920
6921 #if defined(HAVE_UNISTD_H)
6922 #include <unistd.h>
6923 #endif
6924 #include <sys/stat.h>
6925
6926 int main() {
6927 struct stat64 st64; exit(lstat64(".",&st64));
6928 ; return 0; }
6929 EOF
6930 if { (eval echo configure:6931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6931   rm -rf conftest*
6932   ac_cv_func_lstat64=yes
6933 else
6934   echo "configure: failed program was:" >&5
6935   cat conftest.$ac_ext >&5
6936 fi
6937 rm -f conftest*
6938   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6939   if test x$ac_cv_func_lstat64 = xyes ; then
6940     cat >> confdefs.h <<\EOF
6941 #define HAVE_LSTAT64 1
6942 EOF
6943
6944   fi
6945 fi
6946
6947 if test x$ac_cv_func_fstat64 = xno ; then
6948   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6949 echo "configure:6950: checking for fstat64 in <sys/stat.h>" >&5
6950   cat > conftest.$ac_ext <<EOF
6951 #line 6952 "configure"
6952 #include "confdefs.h"
6953
6954 #if defined(HAVE_UNISTD_H)
6955 #include <unistd.h>
6956 #endif
6957 #include <sys/stat.h>
6958
6959 int main() {
6960 struct stat64 st64; exit(fstat64(0,&st64));
6961 ; return 0; }
6962 EOF
6963 if { (eval echo configure:6964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6964   rm -rf conftest*
6965   ac_cv_func_fstat64=yes
6966 else
6967   echo "configure: failed program was:" >&5
6968   cat conftest.$ac_ext >&5
6969 fi
6970 rm -f conftest*
6971   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6972   if test x$ac_cv_func_fstat64 = xyes ; then
6973     cat >> confdefs.h <<\EOF
6974 #define HAVE_FSTAT64 1
6975 EOF
6976
6977   fi
6978 fi
6979
6980 #####################################
6981 # we might need the resolv library on some systems
6982 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6983 echo "configure:6984: checking for dn_expand in -lresolv" >&5
6984 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6985 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6986   echo $ac_n "(cached) $ac_c" 1>&6
6987 else
6988   ac_save_LIBS="$LIBS"
6989 LIBS="-lresolv  $LIBS"
6990 cat > conftest.$ac_ext <<EOF
6991 #line 6992 "configure"
6992 #include "confdefs.h"
6993 /* Override any gcc2 internal prototype to avoid an error.  */
6994 /* We use char because int might match the return type of a gcc2
6995     builtin and then its argument prototype would still apply.  */
6996 char dn_expand();
6997
6998 int main() {
6999 dn_expand()
7000 ; return 0; }
7001 EOF
7002 if { (eval echo configure:7003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7003   rm -rf conftest*
7004   eval "ac_cv_lib_$ac_lib_var=yes"
7005 else
7006   echo "configure: failed program was:" >&5
7007   cat conftest.$ac_ext >&5
7008   rm -rf conftest*
7009   eval "ac_cv_lib_$ac_lib_var=no"
7010 fi
7011 rm -f conftest*
7012 LIBS="$ac_save_LIBS"
7013
7014 fi
7015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7016   echo "$ac_t""yes" 1>&6
7017     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7018     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7019   cat >> confdefs.h <<EOF
7020 #define $ac_tr_lib 1
7021 EOF
7022
7023   LIBS="-lresolv $LIBS"
7024
7025 else
7026   echo "$ac_t""no" 1>&6
7027 fi
7028
7029
7030 #
7031 # Check for the functions putprpwnam, set_auth_parameters,
7032 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7033 # Needed for OSF1 and HPUX.
7034 #
7035
7036 case "$LIBS" in
7037   *-lsecurity*) for ac_func in putprpwnam
7038 do
7039 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7040 echo "configure:7041: checking for $ac_func" >&5
7041 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7042   echo $ac_n "(cached) $ac_c" 1>&6
7043 else
7044   cat > conftest.$ac_ext <<EOF
7045 #line 7046 "configure"
7046 #include "confdefs.h"
7047 /* System header to define __stub macros and hopefully few prototypes,
7048     which can conflict with char $ac_func(); below.  */
7049 #include <assert.h>
7050 /* Override any gcc2 internal prototype to avoid an error.  */
7051 /* We use char because int might match the return type of a gcc2
7052     builtin and then its argument prototype would still apply.  */
7053 char $ac_func();
7054
7055 int main() {
7056
7057 /* The GNU C library defines this for functions which it implements
7058     to always fail with ENOSYS.  Some functions are actually named
7059     something starting with __ and the normal name is an alias.  */
7060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7061 choke me
7062 #else
7063 $ac_func();
7064 #endif
7065
7066 ; return 0; }
7067 EOF
7068 if { (eval echo configure:7069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7069   rm -rf conftest*
7070   eval "ac_cv_func_$ac_func=yes"
7071 else
7072   echo "configure: failed program was:" >&5
7073   cat conftest.$ac_ext >&5
7074   rm -rf conftest*
7075   eval "ac_cv_func_$ac_func=no"
7076 fi
7077 rm -f conftest*
7078 fi
7079
7080 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7081   echo "$ac_t""yes" 1>&6
7082     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7083   cat >> confdefs.h <<EOF
7084 #define $ac_tr_func 1
7085 EOF
7086  
7087 else
7088   echo "$ac_t""no" 1>&6
7089 fi
7090 done
7091  ;;
7092   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7093 echo "configure:7094: checking for putprpwnam in -lsecurity" >&5
7094 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7095 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7096   echo $ac_n "(cached) $ac_c" 1>&6
7097 else
7098   ac_save_LIBS="$LIBS"
7099 LIBS="-lsecurity  $LIBS"
7100 cat > conftest.$ac_ext <<EOF
7101 #line 7102 "configure"
7102 #include "confdefs.h"
7103 /* Override any gcc2 internal prototype to avoid an error.  */
7104 /* We use char because int might match the return type of a gcc2
7105     builtin and then its argument prototype would still apply.  */
7106 char putprpwnam();
7107
7108 int main() {
7109 putprpwnam()
7110 ; return 0; }
7111 EOF
7112 if { (eval echo configure:7113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7113   rm -rf conftest*
7114   eval "ac_cv_lib_$ac_lib_var=yes"
7115 else
7116   echo "configure: failed program was:" >&5
7117   cat conftest.$ac_ext >&5
7118   rm -rf conftest*
7119   eval "ac_cv_lib_$ac_lib_var=no"
7120 fi
7121 rm -f conftest*
7122 LIBS="$ac_save_LIBS"
7123
7124 fi
7125 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7126   echo "$ac_t""yes" 1>&6
7127     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7128     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7129   cat >> confdefs.h <<EOF
7130 #define $ac_tr_lib 1
7131 EOF
7132
7133   LIBS="-lsecurity $LIBS"
7134
7135 else
7136   echo "$ac_t""no" 1>&6
7137 fi
7138  
7139      for ac_func in putprpwnam
7140 do
7141 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7142 echo "configure:7143: checking for $ac_func" >&5
7143 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7144   echo $ac_n "(cached) $ac_c" 1>&6
7145 else
7146   cat > conftest.$ac_ext <<EOF
7147 #line 7148 "configure"
7148 #include "confdefs.h"
7149 /* System header to define __stub macros and hopefully few prototypes,
7150     which can conflict with char $ac_func(); below.  */
7151 #include <assert.h>
7152 /* Override any gcc2 internal prototype to avoid an error.  */
7153 /* We use char because int might match the return type of a gcc2
7154     builtin and then its argument prototype would still apply.  */
7155 char $ac_func();
7156
7157 int main() {
7158
7159 /* The GNU C library defines this for functions which it implements
7160     to always fail with ENOSYS.  Some functions are actually named
7161     something starting with __ and the normal name is an alias.  */
7162 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7163 choke me
7164 #else
7165 $ac_func();
7166 #endif
7167
7168 ; return 0; }
7169 EOF
7170 if { (eval echo configure:7171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7171   rm -rf conftest*
7172   eval "ac_cv_func_$ac_func=yes"
7173 else
7174   echo "configure: failed program was:" >&5
7175   cat conftest.$ac_ext >&5
7176   rm -rf conftest*
7177   eval "ac_cv_func_$ac_func=no"
7178 fi
7179 rm -f conftest*
7180 fi
7181
7182 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7183   echo "$ac_t""yes" 1>&6
7184     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7185   cat >> confdefs.h <<EOF
7186 #define $ac_tr_func 1
7187 EOF
7188  
7189 else
7190   echo "$ac_t""no" 1>&6
7191 fi
7192 done
7193
7194   ;;
7195   esac
7196
7197 case "$LIBS" in
7198   *-lsec*) for ac_func in putprpwnam
7199 do
7200 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7201 echo "configure:7202: checking for $ac_func" >&5
7202 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7203   echo $ac_n "(cached) $ac_c" 1>&6
7204 else
7205   cat > conftest.$ac_ext <<EOF
7206 #line 7207 "configure"
7207 #include "confdefs.h"
7208 /* System header to define __stub macros and hopefully few prototypes,
7209     which can conflict with char $ac_func(); below.  */
7210 #include <assert.h>
7211 /* Override any gcc2 internal prototype to avoid an error.  */
7212 /* We use char because int might match the return type of a gcc2
7213     builtin and then its argument prototype would still apply.  */
7214 char $ac_func();
7215
7216 int main() {
7217
7218 /* The GNU C library defines this for functions which it implements
7219     to always fail with ENOSYS.  Some functions are actually named
7220     something starting with __ and the normal name is an alias.  */
7221 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7222 choke me
7223 #else
7224 $ac_func();
7225 #endif
7226
7227 ; return 0; }
7228 EOF
7229 if { (eval echo configure:7230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7230   rm -rf conftest*
7231   eval "ac_cv_func_$ac_func=yes"
7232 else
7233   echo "configure: failed program was:" >&5
7234   cat conftest.$ac_ext >&5
7235   rm -rf conftest*
7236   eval "ac_cv_func_$ac_func=no"
7237 fi
7238 rm -f conftest*
7239 fi
7240
7241 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7242   echo "$ac_t""yes" 1>&6
7243     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7244   cat >> confdefs.h <<EOF
7245 #define $ac_tr_func 1
7246 EOF
7247  
7248 else
7249   echo "$ac_t""no" 1>&6
7250 fi
7251 done
7252  ;;
7253   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7254 echo "configure:7255: checking for putprpwnam in -lsec" >&5
7255 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7256 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7257   echo $ac_n "(cached) $ac_c" 1>&6
7258 else
7259   ac_save_LIBS="$LIBS"
7260 LIBS="-lsec  $LIBS"
7261 cat > conftest.$ac_ext <<EOF
7262 #line 7263 "configure"
7263 #include "confdefs.h"
7264 /* Override any gcc2 internal prototype to avoid an error.  */
7265 /* We use char because int might match the return type of a gcc2
7266     builtin and then its argument prototype would still apply.  */
7267 char putprpwnam();
7268
7269 int main() {
7270 putprpwnam()
7271 ; return 0; }
7272 EOF
7273 if { (eval echo configure:7274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7274   rm -rf conftest*
7275   eval "ac_cv_lib_$ac_lib_var=yes"
7276 else
7277   echo "configure: failed program was:" >&5
7278   cat conftest.$ac_ext >&5
7279   rm -rf conftest*
7280   eval "ac_cv_lib_$ac_lib_var=no"
7281 fi
7282 rm -f conftest*
7283 LIBS="$ac_save_LIBS"
7284
7285 fi
7286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7287   echo "$ac_t""yes" 1>&6
7288     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7289     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7290   cat >> confdefs.h <<EOF
7291 #define $ac_tr_lib 1
7292 EOF
7293
7294   LIBS="-lsec $LIBS"
7295
7296 else
7297   echo "$ac_t""no" 1>&6
7298 fi
7299  
7300      for ac_func in putprpwnam
7301 do
7302 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7303 echo "configure:7304: checking for $ac_func" >&5
7304 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7305   echo $ac_n "(cached) $ac_c" 1>&6
7306 else
7307   cat > conftest.$ac_ext <<EOF
7308 #line 7309 "configure"
7309 #include "confdefs.h"
7310 /* System header to define __stub macros and hopefully few prototypes,
7311     which can conflict with char $ac_func(); below.  */
7312 #include <assert.h>
7313 /* Override any gcc2 internal prototype to avoid an error.  */
7314 /* We use char because int might match the return type of a gcc2
7315     builtin and then its argument prototype would still apply.  */
7316 char $ac_func();
7317
7318 int main() {
7319
7320 /* The GNU C library defines this for functions which it implements
7321     to always fail with ENOSYS.  Some functions are actually named
7322     something starting with __ and the normal name is an alias.  */
7323 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7324 choke me
7325 #else
7326 $ac_func();
7327 #endif
7328
7329 ; return 0; }
7330 EOF
7331 if { (eval echo configure:7332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7332   rm -rf conftest*
7333   eval "ac_cv_func_$ac_func=yes"
7334 else
7335   echo "configure: failed program was:" >&5
7336   cat conftest.$ac_ext >&5
7337   rm -rf conftest*
7338   eval "ac_cv_func_$ac_func=no"
7339 fi
7340 rm -f conftest*
7341 fi
7342
7343 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7344   echo "$ac_t""yes" 1>&6
7345     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7346   cat >> confdefs.h <<EOF
7347 #define $ac_tr_func 1
7348 EOF
7349  
7350 else
7351   echo "$ac_t""no" 1>&6
7352 fi
7353 done
7354
7355   ;;
7356   esac
7357
7358
7359 case "$LIBS" in
7360   *-lsecurity*) for ac_func in set_auth_parameters
7361 do
7362 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7363 echo "configure:7364: checking for $ac_func" >&5
7364 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7365   echo $ac_n "(cached) $ac_c" 1>&6
7366 else
7367   cat > conftest.$ac_ext <<EOF
7368 #line 7369 "configure"
7369 #include "confdefs.h"
7370 /* System header to define __stub macros and hopefully few prototypes,
7371     which can conflict with char $ac_func(); below.  */
7372 #include <assert.h>
7373 /* Override any gcc2 internal prototype to avoid an error.  */
7374 /* We use char because int might match the return type of a gcc2
7375     builtin and then its argument prototype would still apply.  */
7376 char $ac_func();
7377
7378 int main() {
7379
7380 /* The GNU C library defines this for functions which it implements
7381     to always fail with ENOSYS.  Some functions are actually named
7382     something starting with __ and the normal name is an alias.  */
7383 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7384 choke me
7385 #else
7386 $ac_func();
7387 #endif
7388
7389 ; return 0; }
7390 EOF
7391 if { (eval echo configure:7392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7392   rm -rf conftest*
7393   eval "ac_cv_func_$ac_func=yes"
7394 else
7395   echo "configure: failed program was:" >&5
7396   cat conftest.$ac_ext >&5
7397   rm -rf conftest*
7398   eval "ac_cv_func_$ac_func=no"
7399 fi
7400 rm -f conftest*
7401 fi
7402
7403 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7404   echo "$ac_t""yes" 1>&6
7405     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7406   cat >> confdefs.h <<EOF
7407 #define $ac_tr_func 1
7408 EOF
7409  
7410 else
7411   echo "$ac_t""no" 1>&6
7412 fi
7413 done
7414  ;;
7415   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7416 echo "configure:7417: checking for set_auth_parameters in -lsecurity" >&5
7417 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7418 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7419   echo $ac_n "(cached) $ac_c" 1>&6
7420 else
7421   ac_save_LIBS="$LIBS"
7422 LIBS="-lsecurity  $LIBS"
7423 cat > conftest.$ac_ext <<EOF
7424 #line 7425 "configure"
7425 #include "confdefs.h"
7426 /* Override any gcc2 internal prototype to avoid an error.  */
7427 /* We use char because int might match the return type of a gcc2
7428     builtin and then its argument prototype would still apply.  */
7429 char set_auth_parameters();
7430
7431 int main() {
7432 set_auth_parameters()
7433 ; return 0; }
7434 EOF
7435 if { (eval echo configure:7436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7436   rm -rf conftest*
7437   eval "ac_cv_lib_$ac_lib_var=yes"
7438 else
7439   echo "configure: failed program was:" >&5
7440   cat conftest.$ac_ext >&5
7441   rm -rf conftest*
7442   eval "ac_cv_lib_$ac_lib_var=no"
7443 fi
7444 rm -f conftest*
7445 LIBS="$ac_save_LIBS"
7446
7447 fi
7448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7449   echo "$ac_t""yes" 1>&6
7450     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7451     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7452   cat >> confdefs.h <<EOF
7453 #define $ac_tr_lib 1
7454 EOF
7455
7456   LIBS="-lsecurity $LIBS"
7457
7458 else
7459   echo "$ac_t""no" 1>&6
7460 fi
7461  
7462      for ac_func in set_auth_parameters
7463 do
7464 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7465 echo "configure:7466: checking for $ac_func" >&5
7466 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7467   echo $ac_n "(cached) $ac_c" 1>&6
7468 else
7469   cat > conftest.$ac_ext <<EOF
7470 #line 7471 "configure"
7471 #include "confdefs.h"
7472 /* System header to define __stub macros and hopefully few prototypes,
7473     which can conflict with char $ac_func(); below.  */
7474 #include <assert.h>
7475 /* Override any gcc2 internal prototype to avoid an error.  */
7476 /* We use char because int might match the return type of a gcc2
7477     builtin and then its argument prototype would still apply.  */
7478 char $ac_func();
7479
7480 int main() {
7481
7482 /* The GNU C library defines this for functions which it implements
7483     to always fail with ENOSYS.  Some functions are actually named
7484     something starting with __ and the normal name is an alias.  */
7485 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7486 choke me
7487 #else
7488 $ac_func();
7489 #endif
7490
7491 ; return 0; }
7492 EOF
7493 if { (eval echo configure:7494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7494   rm -rf conftest*
7495   eval "ac_cv_func_$ac_func=yes"
7496 else
7497   echo "configure: failed program was:" >&5
7498   cat conftest.$ac_ext >&5
7499   rm -rf conftest*
7500   eval "ac_cv_func_$ac_func=no"
7501 fi
7502 rm -f conftest*
7503 fi
7504
7505 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7506   echo "$ac_t""yes" 1>&6
7507     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7508   cat >> confdefs.h <<EOF
7509 #define $ac_tr_func 1
7510 EOF
7511  
7512 else
7513   echo "$ac_t""no" 1>&6
7514 fi
7515 done
7516
7517   ;;
7518   esac
7519
7520 case "$LIBS" in
7521   *-lsec*) for ac_func in set_auth_parameters
7522 do
7523 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7524 echo "configure:7525: checking for $ac_func" >&5
7525 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7526   echo $ac_n "(cached) $ac_c" 1>&6
7527 else
7528   cat > conftest.$ac_ext <<EOF
7529 #line 7530 "configure"
7530 #include "confdefs.h"
7531 /* System header to define __stub macros and hopefully few prototypes,
7532     which can conflict with char $ac_func(); below.  */
7533 #include <assert.h>
7534 /* Override any gcc2 internal prototype to avoid an error.  */
7535 /* We use char because int might match the return type of a gcc2
7536     builtin and then its argument prototype would still apply.  */
7537 char $ac_func();
7538
7539 int main() {
7540
7541 /* The GNU C library defines this for functions which it implements
7542     to always fail with ENOSYS.  Some functions are actually named
7543     something starting with __ and the normal name is an alias.  */
7544 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7545 choke me
7546 #else
7547 $ac_func();
7548 #endif
7549
7550 ; return 0; }
7551 EOF
7552 if { (eval echo configure:7553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7553   rm -rf conftest*
7554   eval "ac_cv_func_$ac_func=yes"
7555 else
7556   echo "configure: failed program was:" >&5
7557   cat conftest.$ac_ext >&5
7558   rm -rf conftest*
7559   eval "ac_cv_func_$ac_func=no"
7560 fi
7561 rm -f conftest*
7562 fi
7563
7564 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7565   echo "$ac_t""yes" 1>&6
7566     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7567   cat >> confdefs.h <<EOF
7568 #define $ac_tr_func 1
7569 EOF
7570  
7571 else
7572   echo "$ac_t""no" 1>&6
7573 fi
7574 done
7575  ;;
7576   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7577 echo "configure:7578: checking for set_auth_parameters in -lsec" >&5
7578 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7579 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7580   echo $ac_n "(cached) $ac_c" 1>&6
7581 else
7582   ac_save_LIBS="$LIBS"
7583 LIBS="-lsec  $LIBS"
7584 cat > conftest.$ac_ext <<EOF
7585 #line 7586 "configure"
7586 #include "confdefs.h"
7587 /* Override any gcc2 internal prototype to avoid an error.  */
7588 /* We use char because int might match the return type of a gcc2
7589     builtin and then its argument prototype would still apply.  */
7590 char set_auth_parameters();
7591
7592 int main() {
7593 set_auth_parameters()
7594 ; return 0; }
7595 EOF
7596 if { (eval echo configure:7597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7597   rm -rf conftest*
7598   eval "ac_cv_lib_$ac_lib_var=yes"
7599 else
7600   echo "configure: failed program was:" >&5
7601   cat conftest.$ac_ext >&5
7602   rm -rf conftest*
7603   eval "ac_cv_lib_$ac_lib_var=no"
7604 fi
7605 rm -f conftest*
7606 LIBS="$ac_save_LIBS"
7607
7608 fi
7609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7610   echo "$ac_t""yes" 1>&6
7611     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7612     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7613   cat >> confdefs.h <<EOF
7614 #define $ac_tr_lib 1
7615 EOF
7616
7617   LIBS="-lsec $LIBS"
7618
7619 else
7620   echo "$ac_t""no" 1>&6
7621 fi
7622  
7623      for ac_func in set_auth_parameters
7624 do
7625 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7626 echo "configure:7627: checking for $ac_func" >&5
7627 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7628   echo $ac_n "(cached) $ac_c" 1>&6
7629 else
7630   cat > conftest.$ac_ext <<EOF
7631 #line 7632 "configure"
7632 #include "confdefs.h"
7633 /* System header to define __stub macros and hopefully few prototypes,
7634     which can conflict with char $ac_func(); below.  */
7635 #include <assert.h>
7636 /* Override any gcc2 internal prototype to avoid an error.  */
7637 /* We use char because int might match the return type of a gcc2
7638     builtin and then its argument prototype would still apply.  */
7639 char $ac_func();
7640
7641 int main() {
7642
7643 /* The GNU C library defines this for functions which it implements
7644     to always fail with ENOSYS.  Some functions are actually named
7645     something starting with __ and the normal name is an alias.  */
7646 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7647 choke me
7648 #else
7649 $ac_func();
7650 #endif
7651
7652 ; return 0; }
7653 EOF
7654 if { (eval echo configure:7655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7655   rm -rf conftest*
7656   eval "ac_cv_func_$ac_func=yes"
7657 else
7658   echo "configure: failed program was:" >&5
7659   cat conftest.$ac_ext >&5
7660   rm -rf conftest*
7661   eval "ac_cv_func_$ac_func=no"
7662 fi
7663 rm -f conftest*
7664 fi
7665
7666 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7667   echo "$ac_t""yes" 1>&6
7668     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7669   cat >> confdefs.h <<EOF
7670 #define $ac_tr_func 1
7671 EOF
7672  
7673 else
7674   echo "$ac_t""no" 1>&6
7675 fi
7676 done
7677
7678   ;;
7679   esac
7680
7681
7682 # UnixWare 7.x has its getspnam in -lgen
7683 case "$LIBS" in
7684   *-lgen*) for ac_func in getspnam
7685 do
7686 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7687 echo "configure:7688: checking for $ac_func" >&5
7688 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7689   echo $ac_n "(cached) $ac_c" 1>&6
7690 else
7691   cat > conftest.$ac_ext <<EOF
7692 #line 7693 "configure"
7693 #include "confdefs.h"
7694 /* System header to define __stub macros and hopefully few prototypes,
7695     which can conflict with char $ac_func(); below.  */
7696 #include <assert.h>
7697 /* Override any gcc2 internal prototype to avoid an error.  */
7698 /* We use char because int might match the return type of a gcc2
7699     builtin and then its argument prototype would still apply.  */
7700 char $ac_func();
7701
7702 int main() {
7703
7704 /* The GNU C library defines this for functions which it implements
7705     to always fail with ENOSYS.  Some functions are actually named
7706     something starting with __ and the normal name is an alias.  */
7707 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7708 choke me
7709 #else
7710 $ac_func();
7711 #endif
7712
7713 ; return 0; }
7714 EOF
7715 if { (eval echo configure:7716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7716   rm -rf conftest*
7717   eval "ac_cv_func_$ac_func=yes"
7718 else
7719   echo "configure: failed program was:" >&5
7720   cat conftest.$ac_ext >&5
7721   rm -rf conftest*
7722   eval "ac_cv_func_$ac_func=no"
7723 fi
7724 rm -f conftest*
7725 fi
7726
7727 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7728   echo "$ac_t""yes" 1>&6
7729     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7730   cat >> confdefs.h <<EOF
7731 #define $ac_tr_func 1
7732 EOF
7733  
7734 else
7735   echo "$ac_t""no" 1>&6
7736 fi
7737 done
7738  ;;
7739   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7740 echo "configure:7741: checking for getspnam in -lgen" >&5
7741 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7742 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7743   echo $ac_n "(cached) $ac_c" 1>&6
7744 else
7745   ac_save_LIBS="$LIBS"
7746 LIBS="-lgen  $LIBS"
7747 cat > conftest.$ac_ext <<EOF
7748 #line 7749 "configure"
7749 #include "confdefs.h"
7750 /* Override any gcc2 internal prototype to avoid an error.  */
7751 /* We use char because int might match the return type of a gcc2
7752     builtin and then its argument prototype would still apply.  */
7753 char getspnam();
7754
7755 int main() {
7756 getspnam()
7757 ; return 0; }
7758 EOF
7759 if { (eval echo configure:7760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7760   rm -rf conftest*
7761   eval "ac_cv_lib_$ac_lib_var=yes"
7762 else
7763   echo "configure: failed program was:" >&5
7764   cat conftest.$ac_ext >&5
7765   rm -rf conftest*
7766   eval "ac_cv_lib_$ac_lib_var=no"
7767 fi
7768 rm -f conftest*
7769 LIBS="$ac_save_LIBS"
7770
7771 fi
7772 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7773   echo "$ac_t""yes" 1>&6
7774     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7775     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7776   cat >> confdefs.h <<EOF
7777 #define $ac_tr_lib 1
7778 EOF
7779
7780   LIBS="-lgen $LIBS"
7781
7782 else
7783   echo "$ac_t""no" 1>&6
7784 fi
7785  
7786      for ac_func in getspnam
7787 do
7788 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7789 echo "configure:7790: checking for $ac_func" >&5
7790 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7791   echo $ac_n "(cached) $ac_c" 1>&6
7792 else
7793   cat > conftest.$ac_ext <<EOF
7794 #line 7795 "configure"
7795 #include "confdefs.h"
7796 /* System header to define __stub macros and hopefully few prototypes,
7797     which can conflict with char $ac_func(); below.  */
7798 #include <assert.h>
7799 /* Override any gcc2 internal prototype to avoid an error.  */
7800 /* We use char because int might match the return type of a gcc2
7801     builtin and then its argument prototype would still apply.  */
7802 char $ac_func();
7803
7804 int main() {
7805
7806 /* The GNU C library defines this for functions which it implements
7807     to always fail with ENOSYS.  Some functions are actually named
7808     something starting with __ and the normal name is an alias.  */
7809 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7810 choke me
7811 #else
7812 $ac_func();
7813 #endif
7814
7815 ; return 0; }
7816 EOF
7817 if { (eval echo configure:7818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7818   rm -rf conftest*
7819   eval "ac_cv_func_$ac_func=yes"
7820 else
7821   echo "configure: failed program was:" >&5
7822   cat conftest.$ac_ext >&5
7823   rm -rf conftest*
7824   eval "ac_cv_func_$ac_func=no"
7825 fi
7826 rm -f conftest*
7827 fi
7828
7829 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7830   echo "$ac_t""yes" 1>&6
7831     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7832   cat >> confdefs.h <<EOF
7833 #define $ac_tr_func 1
7834 EOF
7835  
7836 else
7837   echo "$ac_t""no" 1>&6
7838 fi
7839 done
7840
7841   ;;
7842   esac
7843
7844
7845 case "$LIBS" in
7846   *-lsecurity*) for ac_func in getspnam
7847 do
7848 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7849 echo "configure:7850: checking for $ac_func" >&5
7850 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7851   echo $ac_n "(cached) $ac_c" 1>&6
7852 else
7853   cat > conftest.$ac_ext <<EOF
7854 #line 7855 "configure"
7855 #include "confdefs.h"
7856 /* System header to define __stub macros and hopefully few prototypes,
7857     which can conflict with char $ac_func(); below.  */
7858 #include <assert.h>
7859 /* Override any gcc2 internal prototype to avoid an error.  */
7860 /* We use char because int might match the return type of a gcc2
7861     builtin and then its argument prototype would still apply.  */
7862 char $ac_func();
7863
7864 int main() {
7865
7866 /* The GNU C library defines this for functions which it implements
7867     to always fail with ENOSYS.  Some functions are actually named
7868     something starting with __ and the normal name is an alias.  */
7869 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7870 choke me
7871 #else
7872 $ac_func();
7873 #endif
7874
7875 ; return 0; }
7876 EOF
7877 if { (eval echo configure:7878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7878   rm -rf conftest*
7879   eval "ac_cv_func_$ac_func=yes"
7880 else
7881   echo "configure: failed program was:" >&5
7882   cat conftest.$ac_ext >&5
7883   rm -rf conftest*
7884   eval "ac_cv_func_$ac_func=no"
7885 fi
7886 rm -f conftest*
7887 fi
7888
7889 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7890   echo "$ac_t""yes" 1>&6
7891     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7892   cat >> confdefs.h <<EOF
7893 #define $ac_tr_func 1
7894 EOF
7895  
7896 else
7897   echo "$ac_t""no" 1>&6
7898 fi
7899 done
7900  ;;
7901   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7902 echo "configure:7903: checking for getspnam in -lsecurity" >&5
7903 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7904 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7905   echo $ac_n "(cached) $ac_c" 1>&6
7906 else
7907   ac_save_LIBS="$LIBS"
7908 LIBS="-lsecurity  $LIBS"
7909 cat > conftest.$ac_ext <<EOF
7910 #line 7911 "configure"
7911 #include "confdefs.h"
7912 /* Override any gcc2 internal prototype to avoid an error.  */
7913 /* We use char because int might match the return type of a gcc2
7914     builtin and then its argument prototype would still apply.  */
7915 char getspnam();
7916
7917 int main() {
7918 getspnam()
7919 ; return 0; }
7920 EOF
7921 if { (eval echo configure:7922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7922   rm -rf conftest*
7923   eval "ac_cv_lib_$ac_lib_var=yes"
7924 else
7925   echo "configure: failed program was:" >&5
7926   cat conftest.$ac_ext >&5
7927   rm -rf conftest*
7928   eval "ac_cv_lib_$ac_lib_var=no"
7929 fi
7930 rm -f conftest*
7931 LIBS="$ac_save_LIBS"
7932
7933 fi
7934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7935   echo "$ac_t""yes" 1>&6
7936     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7937     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7938   cat >> confdefs.h <<EOF
7939 #define $ac_tr_lib 1
7940 EOF
7941
7942   LIBS="-lsecurity $LIBS"
7943
7944 else
7945   echo "$ac_t""no" 1>&6
7946 fi
7947  
7948      for ac_func in getspnam
7949 do
7950 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7951 echo "configure:7952: checking for $ac_func" >&5
7952 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7953   echo $ac_n "(cached) $ac_c" 1>&6
7954 else
7955   cat > conftest.$ac_ext <<EOF
7956 #line 7957 "configure"
7957 #include "confdefs.h"
7958 /* System header to define __stub macros and hopefully few prototypes,
7959     which can conflict with char $ac_func(); below.  */
7960 #include <assert.h>
7961 /* Override any gcc2 internal prototype to avoid an error.  */
7962 /* We use char because int might match the return type of a gcc2
7963     builtin and then its argument prototype would still apply.  */
7964 char $ac_func();
7965
7966 int main() {
7967
7968 /* The GNU C library defines this for functions which it implements
7969     to always fail with ENOSYS.  Some functions are actually named
7970     something starting with __ and the normal name is an alias.  */
7971 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7972 choke me
7973 #else
7974 $ac_func();
7975 #endif
7976
7977 ; return 0; }
7978 EOF
7979 if { (eval echo configure:7980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7980   rm -rf conftest*
7981   eval "ac_cv_func_$ac_func=yes"
7982 else
7983   echo "configure: failed program was:" >&5
7984   cat conftest.$ac_ext >&5
7985   rm -rf conftest*
7986   eval "ac_cv_func_$ac_func=no"
7987 fi
7988 rm -f conftest*
7989 fi
7990
7991 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7992   echo "$ac_t""yes" 1>&6
7993     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7994   cat >> confdefs.h <<EOF
7995 #define $ac_tr_func 1
7996 EOF
7997  
7998 else
7999   echo "$ac_t""no" 1>&6
8000 fi
8001 done
8002
8003   ;;
8004   esac
8005
8006 case "$LIBS" in
8007   *-lsec*) for ac_func in getspnam
8008 do
8009 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8010 echo "configure:8011: checking for $ac_func" >&5
8011 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8012   echo $ac_n "(cached) $ac_c" 1>&6
8013 else
8014   cat > conftest.$ac_ext <<EOF
8015 #line 8016 "configure"
8016 #include "confdefs.h"
8017 /* System header to define __stub macros and hopefully few prototypes,
8018     which can conflict with char $ac_func(); below.  */
8019 #include <assert.h>
8020 /* Override any gcc2 internal prototype to avoid an error.  */
8021 /* We use char because int might match the return type of a gcc2
8022     builtin and then its argument prototype would still apply.  */
8023 char $ac_func();
8024
8025 int main() {
8026
8027 /* The GNU C library defines this for functions which it implements
8028     to always fail with ENOSYS.  Some functions are actually named
8029     something starting with __ and the normal name is an alias.  */
8030 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8031 choke me
8032 #else
8033 $ac_func();
8034 #endif
8035
8036 ; return 0; }
8037 EOF
8038 if { (eval echo configure:8039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8039   rm -rf conftest*
8040   eval "ac_cv_func_$ac_func=yes"
8041 else
8042   echo "configure: failed program was:" >&5
8043   cat conftest.$ac_ext >&5
8044   rm -rf conftest*
8045   eval "ac_cv_func_$ac_func=no"
8046 fi
8047 rm -f conftest*
8048 fi
8049
8050 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8051   echo "$ac_t""yes" 1>&6
8052     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8053   cat >> confdefs.h <<EOF
8054 #define $ac_tr_func 1
8055 EOF
8056  
8057 else
8058   echo "$ac_t""no" 1>&6
8059 fi
8060 done
8061  ;;
8062   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8063 echo "configure:8064: checking for getspnam in -lsec" >&5
8064 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8065 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8066   echo $ac_n "(cached) $ac_c" 1>&6
8067 else
8068   ac_save_LIBS="$LIBS"
8069 LIBS="-lsec  $LIBS"
8070 cat > conftest.$ac_ext <<EOF
8071 #line 8072 "configure"
8072 #include "confdefs.h"
8073 /* Override any gcc2 internal prototype to avoid an error.  */
8074 /* We use char because int might match the return type of a gcc2
8075     builtin and then its argument prototype would still apply.  */
8076 char getspnam();
8077
8078 int main() {
8079 getspnam()
8080 ; return 0; }
8081 EOF
8082 if { (eval echo configure:8083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8083   rm -rf conftest*
8084   eval "ac_cv_lib_$ac_lib_var=yes"
8085 else
8086   echo "configure: failed program was:" >&5
8087   cat conftest.$ac_ext >&5
8088   rm -rf conftest*
8089   eval "ac_cv_lib_$ac_lib_var=no"
8090 fi
8091 rm -f conftest*
8092 LIBS="$ac_save_LIBS"
8093
8094 fi
8095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8096   echo "$ac_t""yes" 1>&6
8097     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8098     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8099   cat >> confdefs.h <<EOF
8100 #define $ac_tr_lib 1
8101 EOF
8102
8103   LIBS="-lsec $LIBS"
8104
8105 else
8106   echo "$ac_t""no" 1>&6
8107 fi
8108  
8109      for ac_func in getspnam
8110 do
8111 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8112 echo "configure:8113: checking for $ac_func" >&5
8113 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8114   echo $ac_n "(cached) $ac_c" 1>&6
8115 else
8116   cat > conftest.$ac_ext <<EOF
8117 #line 8118 "configure"
8118 #include "confdefs.h"
8119 /* System header to define __stub macros and hopefully few prototypes,
8120     which can conflict with char $ac_func(); below.  */
8121 #include <assert.h>
8122 /* Override any gcc2 internal prototype to avoid an error.  */
8123 /* We use char because int might match the return type of a gcc2
8124     builtin and then its argument prototype would still apply.  */
8125 char $ac_func();
8126
8127 int main() {
8128
8129 /* The GNU C library defines this for functions which it implements
8130     to always fail with ENOSYS.  Some functions are actually named
8131     something starting with __ and the normal name is an alias.  */
8132 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8133 choke me
8134 #else
8135 $ac_func();
8136 #endif
8137
8138 ; return 0; }
8139 EOF
8140 if { (eval echo configure:8141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8141   rm -rf conftest*
8142   eval "ac_cv_func_$ac_func=yes"
8143 else
8144   echo "configure: failed program was:" >&5
8145   cat conftest.$ac_ext >&5
8146   rm -rf conftest*
8147   eval "ac_cv_func_$ac_func=no"
8148 fi
8149 rm -f conftest*
8150 fi
8151
8152 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8153   echo "$ac_t""yes" 1>&6
8154     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8155   cat >> confdefs.h <<EOF
8156 #define $ac_tr_func 1
8157 EOF
8158  
8159 else
8160   echo "$ac_t""no" 1>&6
8161 fi
8162 done
8163
8164   ;;
8165   esac
8166
8167
8168 case "$LIBS" in
8169   *-lsecurity*) for ac_func in bigcrypt
8170 do
8171 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8172 echo "configure:8173: checking for $ac_func" >&5
8173 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8174   echo $ac_n "(cached) $ac_c" 1>&6
8175 else
8176   cat > conftest.$ac_ext <<EOF
8177 #line 8178 "configure"
8178 #include "confdefs.h"
8179 /* System header to define __stub macros and hopefully few prototypes,
8180     which can conflict with char $ac_func(); below.  */
8181 #include <assert.h>
8182 /* Override any gcc2 internal prototype to avoid an error.  */
8183 /* We use char because int might match the return type of a gcc2
8184     builtin and then its argument prototype would still apply.  */
8185 char $ac_func();
8186
8187 int main() {
8188
8189 /* The GNU C library defines this for functions which it implements
8190     to always fail with ENOSYS.  Some functions are actually named
8191     something starting with __ and the normal name is an alias.  */
8192 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8193 choke me
8194 #else
8195 $ac_func();
8196 #endif
8197
8198 ; return 0; }
8199 EOF
8200 if { (eval echo configure:8201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8201   rm -rf conftest*
8202   eval "ac_cv_func_$ac_func=yes"
8203 else
8204   echo "configure: failed program was:" >&5
8205   cat conftest.$ac_ext >&5
8206   rm -rf conftest*
8207   eval "ac_cv_func_$ac_func=no"
8208 fi
8209 rm -f conftest*
8210 fi
8211
8212 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8213   echo "$ac_t""yes" 1>&6
8214     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8215   cat >> confdefs.h <<EOF
8216 #define $ac_tr_func 1
8217 EOF
8218  
8219 else
8220   echo "$ac_t""no" 1>&6
8221 fi
8222 done
8223  ;;
8224   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8225 echo "configure:8226: checking for bigcrypt in -lsecurity" >&5
8226 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8227 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8228   echo $ac_n "(cached) $ac_c" 1>&6
8229 else
8230   ac_save_LIBS="$LIBS"
8231 LIBS="-lsecurity  $LIBS"
8232 cat > conftest.$ac_ext <<EOF
8233 #line 8234 "configure"
8234 #include "confdefs.h"
8235 /* Override any gcc2 internal prototype to avoid an error.  */
8236 /* We use char because int might match the return type of a gcc2
8237     builtin and then its argument prototype would still apply.  */
8238 char bigcrypt();
8239
8240 int main() {
8241 bigcrypt()
8242 ; return 0; }
8243 EOF
8244 if { (eval echo configure:8245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8245   rm -rf conftest*
8246   eval "ac_cv_lib_$ac_lib_var=yes"
8247 else
8248   echo "configure: failed program was:" >&5
8249   cat conftest.$ac_ext >&5
8250   rm -rf conftest*
8251   eval "ac_cv_lib_$ac_lib_var=no"
8252 fi
8253 rm -f conftest*
8254 LIBS="$ac_save_LIBS"
8255
8256 fi
8257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8258   echo "$ac_t""yes" 1>&6
8259     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8260     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8261   cat >> confdefs.h <<EOF
8262 #define $ac_tr_lib 1
8263 EOF
8264
8265   LIBS="-lsecurity $LIBS"
8266
8267 else
8268   echo "$ac_t""no" 1>&6
8269 fi
8270  
8271      for ac_func in bigcrypt
8272 do
8273 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8274 echo "configure:8275: checking for $ac_func" >&5
8275 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8276   echo $ac_n "(cached) $ac_c" 1>&6
8277 else
8278   cat > conftest.$ac_ext <<EOF
8279 #line 8280 "configure"
8280 #include "confdefs.h"
8281 /* System header to define __stub macros and hopefully few prototypes,
8282     which can conflict with char $ac_func(); below.  */
8283 #include <assert.h>
8284 /* Override any gcc2 internal prototype to avoid an error.  */
8285 /* We use char because int might match the return type of a gcc2
8286     builtin and then its argument prototype would still apply.  */
8287 char $ac_func();
8288
8289 int main() {
8290
8291 /* The GNU C library defines this for functions which it implements
8292     to always fail with ENOSYS.  Some functions are actually named
8293     something starting with __ and the normal name is an alias.  */
8294 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8295 choke me
8296 #else
8297 $ac_func();
8298 #endif
8299
8300 ; return 0; }
8301 EOF
8302 if { (eval echo configure:8303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8303   rm -rf conftest*
8304   eval "ac_cv_func_$ac_func=yes"
8305 else
8306   echo "configure: failed program was:" >&5
8307   cat conftest.$ac_ext >&5
8308   rm -rf conftest*
8309   eval "ac_cv_func_$ac_func=no"
8310 fi
8311 rm -f conftest*
8312 fi
8313
8314 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8315   echo "$ac_t""yes" 1>&6
8316     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8317   cat >> confdefs.h <<EOF
8318 #define $ac_tr_func 1
8319 EOF
8320  
8321 else
8322   echo "$ac_t""no" 1>&6
8323 fi
8324 done
8325
8326   ;;
8327   esac
8328
8329 case "$LIBS" in
8330   *-lsec*) for ac_func in bigcrypt
8331 do
8332 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8333 echo "configure:8334: checking for $ac_func" >&5
8334 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8335   echo $ac_n "(cached) $ac_c" 1>&6
8336 else
8337   cat > conftest.$ac_ext <<EOF
8338 #line 8339 "configure"
8339 #include "confdefs.h"
8340 /* System header to define __stub macros and hopefully few prototypes,
8341     which can conflict with char $ac_func(); below.  */
8342 #include <assert.h>
8343 /* Override any gcc2 internal prototype to avoid an error.  */
8344 /* We use char because int might match the return type of a gcc2
8345     builtin and then its argument prototype would still apply.  */
8346 char $ac_func();
8347
8348 int main() {
8349
8350 /* The GNU C library defines this for functions which it implements
8351     to always fail with ENOSYS.  Some functions are actually named
8352     something starting with __ and the normal name is an alias.  */
8353 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8354 choke me
8355 #else
8356 $ac_func();
8357 #endif
8358
8359 ; return 0; }
8360 EOF
8361 if { (eval echo configure:8362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8362   rm -rf conftest*
8363   eval "ac_cv_func_$ac_func=yes"
8364 else
8365   echo "configure: failed program was:" >&5
8366   cat conftest.$ac_ext >&5
8367   rm -rf conftest*
8368   eval "ac_cv_func_$ac_func=no"
8369 fi
8370 rm -f conftest*
8371 fi
8372
8373 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8374   echo "$ac_t""yes" 1>&6
8375     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8376   cat >> confdefs.h <<EOF
8377 #define $ac_tr_func 1
8378 EOF
8379  
8380 else
8381   echo "$ac_t""no" 1>&6
8382 fi
8383 done
8384  ;;
8385   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8386 echo "configure:8387: checking for bigcrypt in -lsec" >&5
8387 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8388 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8389   echo $ac_n "(cached) $ac_c" 1>&6
8390 else
8391   ac_save_LIBS="$LIBS"
8392 LIBS="-lsec  $LIBS"
8393 cat > conftest.$ac_ext <<EOF
8394 #line 8395 "configure"
8395 #include "confdefs.h"
8396 /* Override any gcc2 internal prototype to avoid an error.  */
8397 /* We use char because int might match the return type of a gcc2
8398     builtin and then its argument prototype would still apply.  */
8399 char bigcrypt();
8400
8401 int main() {
8402 bigcrypt()
8403 ; return 0; }
8404 EOF
8405 if { (eval echo configure:8406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8406   rm -rf conftest*
8407   eval "ac_cv_lib_$ac_lib_var=yes"
8408 else
8409   echo "configure: failed program was:" >&5
8410   cat conftest.$ac_ext >&5
8411   rm -rf conftest*
8412   eval "ac_cv_lib_$ac_lib_var=no"
8413 fi
8414 rm -f conftest*
8415 LIBS="$ac_save_LIBS"
8416
8417 fi
8418 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8419   echo "$ac_t""yes" 1>&6
8420     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8421     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8422   cat >> confdefs.h <<EOF
8423 #define $ac_tr_lib 1
8424 EOF
8425
8426   LIBS="-lsec $LIBS"
8427
8428 else
8429   echo "$ac_t""no" 1>&6
8430 fi
8431  
8432      for ac_func in bigcrypt
8433 do
8434 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8435 echo "configure:8436: checking for $ac_func" >&5
8436 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8437   echo $ac_n "(cached) $ac_c" 1>&6
8438 else
8439   cat > conftest.$ac_ext <<EOF
8440 #line 8441 "configure"
8441 #include "confdefs.h"
8442 /* System header to define __stub macros and hopefully few prototypes,
8443     which can conflict with char $ac_func(); below.  */
8444 #include <assert.h>
8445 /* Override any gcc2 internal prototype to avoid an error.  */
8446 /* We use char because int might match the return type of a gcc2
8447     builtin and then its argument prototype would still apply.  */
8448 char $ac_func();
8449
8450 int main() {
8451
8452 /* The GNU C library defines this for functions which it implements
8453     to always fail with ENOSYS.  Some functions are actually named
8454     something starting with __ and the normal name is an alias.  */
8455 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8456 choke me
8457 #else
8458 $ac_func();
8459 #endif
8460
8461 ; return 0; }
8462 EOF
8463 if { (eval echo configure:8464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8464   rm -rf conftest*
8465   eval "ac_cv_func_$ac_func=yes"
8466 else
8467   echo "configure: failed program was:" >&5
8468   cat conftest.$ac_ext >&5
8469   rm -rf conftest*
8470   eval "ac_cv_func_$ac_func=no"
8471 fi
8472 rm -f conftest*
8473 fi
8474
8475 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8476   echo "$ac_t""yes" 1>&6
8477     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8478   cat >> confdefs.h <<EOF
8479 #define $ac_tr_func 1
8480 EOF
8481  
8482 else
8483   echo "$ac_t""no" 1>&6
8484 fi
8485 done
8486
8487   ;;
8488   esac
8489
8490
8491 case "$LIBS" in
8492   *-lsecurity*) for ac_func in getprpwnam
8493 do
8494 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8495 echo "configure:8496: checking for $ac_func" >&5
8496 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8497   echo $ac_n "(cached) $ac_c" 1>&6
8498 else
8499   cat > conftest.$ac_ext <<EOF
8500 #line 8501 "configure"
8501 #include "confdefs.h"
8502 /* System header to define __stub macros and hopefully few prototypes,
8503     which can conflict with char $ac_func(); below.  */
8504 #include <assert.h>
8505 /* Override any gcc2 internal prototype to avoid an error.  */
8506 /* We use char because int might match the return type of a gcc2
8507     builtin and then its argument prototype would still apply.  */
8508 char $ac_func();
8509
8510 int main() {
8511
8512 /* The GNU C library defines this for functions which it implements
8513     to always fail with ENOSYS.  Some functions are actually named
8514     something starting with __ and the normal name is an alias.  */
8515 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8516 choke me
8517 #else
8518 $ac_func();
8519 #endif
8520
8521 ; return 0; }
8522 EOF
8523 if { (eval echo configure:8524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8524   rm -rf conftest*
8525   eval "ac_cv_func_$ac_func=yes"
8526 else
8527   echo "configure: failed program was:" >&5
8528   cat conftest.$ac_ext >&5
8529   rm -rf conftest*
8530   eval "ac_cv_func_$ac_func=no"
8531 fi
8532 rm -f conftest*
8533 fi
8534
8535 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8536   echo "$ac_t""yes" 1>&6
8537     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8538   cat >> confdefs.h <<EOF
8539 #define $ac_tr_func 1
8540 EOF
8541  
8542 else
8543   echo "$ac_t""no" 1>&6
8544 fi
8545 done
8546  ;;
8547   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8548 echo "configure:8549: checking for getprpwnam in -lsecurity" >&5
8549 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8550 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8551   echo $ac_n "(cached) $ac_c" 1>&6
8552 else
8553   ac_save_LIBS="$LIBS"
8554 LIBS="-lsecurity  $LIBS"
8555 cat > conftest.$ac_ext <<EOF
8556 #line 8557 "configure"
8557 #include "confdefs.h"
8558 /* Override any gcc2 internal prototype to avoid an error.  */
8559 /* We use char because int might match the return type of a gcc2
8560     builtin and then its argument prototype would still apply.  */
8561 char getprpwnam();
8562
8563 int main() {
8564 getprpwnam()
8565 ; return 0; }
8566 EOF
8567 if { (eval echo configure:8568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8568   rm -rf conftest*
8569   eval "ac_cv_lib_$ac_lib_var=yes"
8570 else
8571   echo "configure: failed program was:" >&5
8572   cat conftest.$ac_ext >&5
8573   rm -rf conftest*
8574   eval "ac_cv_lib_$ac_lib_var=no"
8575 fi
8576 rm -f conftest*
8577 LIBS="$ac_save_LIBS"
8578
8579 fi
8580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8581   echo "$ac_t""yes" 1>&6
8582     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8583     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8584   cat >> confdefs.h <<EOF
8585 #define $ac_tr_lib 1
8586 EOF
8587
8588   LIBS="-lsecurity $LIBS"
8589
8590 else
8591   echo "$ac_t""no" 1>&6
8592 fi
8593  
8594      for ac_func in getprpwnam
8595 do
8596 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8597 echo "configure:8598: checking for $ac_func" >&5
8598 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8599   echo $ac_n "(cached) $ac_c" 1>&6
8600 else
8601   cat > conftest.$ac_ext <<EOF
8602 #line 8603 "configure"
8603 #include "confdefs.h"
8604 /* System header to define __stub macros and hopefully few prototypes,
8605     which can conflict with char $ac_func(); below.  */
8606 #include <assert.h>
8607 /* Override any gcc2 internal prototype to avoid an error.  */
8608 /* We use char because int might match the return type of a gcc2
8609     builtin and then its argument prototype would still apply.  */
8610 char $ac_func();
8611
8612 int main() {
8613
8614 /* The GNU C library defines this for functions which it implements
8615     to always fail with ENOSYS.  Some functions are actually named
8616     something starting with __ and the normal name is an alias.  */
8617 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8618 choke me
8619 #else
8620 $ac_func();
8621 #endif
8622
8623 ; return 0; }
8624 EOF
8625 if { (eval echo configure:8626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8626   rm -rf conftest*
8627   eval "ac_cv_func_$ac_func=yes"
8628 else
8629   echo "configure: failed program was:" >&5
8630   cat conftest.$ac_ext >&5
8631   rm -rf conftest*
8632   eval "ac_cv_func_$ac_func=no"
8633 fi
8634 rm -f conftest*
8635 fi
8636
8637 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8638   echo "$ac_t""yes" 1>&6
8639     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8640   cat >> confdefs.h <<EOF
8641 #define $ac_tr_func 1
8642 EOF
8643  
8644 else
8645   echo "$ac_t""no" 1>&6
8646 fi
8647 done
8648
8649   ;;
8650   esac
8651
8652 case "$LIBS" in
8653   *-lsec*) for ac_func in getprpwnam
8654 do
8655 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8656 echo "configure:8657: checking for $ac_func" >&5
8657 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8658   echo $ac_n "(cached) $ac_c" 1>&6
8659 else
8660   cat > conftest.$ac_ext <<EOF
8661 #line 8662 "configure"
8662 #include "confdefs.h"
8663 /* System header to define __stub macros and hopefully few prototypes,
8664     which can conflict with char $ac_func(); below.  */
8665 #include <assert.h>
8666 /* Override any gcc2 internal prototype to avoid an error.  */
8667 /* We use char because int might match the return type of a gcc2
8668     builtin and then its argument prototype would still apply.  */
8669 char $ac_func();
8670
8671 int main() {
8672
8673 /* The GNU C library defines this for functions which it implements
8674     to always fail with ENOSYS.  Some functions are actually named
8675     something starting with __ and the normal name is an alias.  */
8676 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8677 choke me
8678 #else
8679 $ac_func();
8680 #endif
8681
8682 ; return 0; }
8683 EOF
8684 if { (eval echo configure:8685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8685   rm -rf conftest*
8686   eval "ac_cv_func_$ac_func=yes"
8687 else
8688   echo "configure: failed program was:" >&5
8689   cat conftest.$ac_ext >&5
8690   rm -rf conftest*
8691   eval "ac_cv_func_$ac_func=no"
8692 fi
8693 rm -f conftest*
8694 fi
8695
8696 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8697   echo "$ac_t""yes" 1>&6
8698     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8699   cat >> confdefs.h <<EOF
8700 #define $ac_tr_func 1
8701 EOF
8702  
8703 else
8704   echo "$ac_t""no" 1>&6
8705 fi
8706 done
8707  ;;
8708   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8709 echo "configure:8710: checking for getprpwnam in -lsec" >&5
8710 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8711 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8712   echo $ac_n "(cached) $ac_c" 1>&6
8713 else
8714   ac_save_LIBS="$LIBS"
8715 LIBS="-lsec  $LIBS"
8716 cat > conftest.$ac_ext <<EOF
8717 #line 8718 "configure"
8718 #include "confdefs.h"
8719 /* Override any gcc2 internal prototype to avoid an error.  */
8720 /* We use char because int might match the return type of a gcc2
8721     builtin and then its argument prototype would still apply.  */
8722 char getprpwnam();
8723
8724 int main() {
8725 getprpwnam()
8726 ; return 0; }
8727 EOF
8728 if { (eval echo configure:8729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8729   rm -rf conftest*
8730   eval "ac_cv_lib_$ac_lib_var=yes"
8731 else
8732   echo "configure: failed program was:" >&5
8733   cat conftest.$ac_ext >&5
8734   rm -rf conftest*
8735   eval "ac_cv_lib_$ac_lib_var=no"
8736 fi
8737 rm -f conftest*
8738 LIBS="$ac_save_LIBS"
8739
8740 fi
8741 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8742   echo "$ac_t""yes" 1>&6
8743     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8744     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8745   cat >> confdefs.h <<EOF
8746 #define $ac_tr_lib 1
8747 EOF
8748
8749   LIBS="-lsec $LIBS"
8750
8751 else
8752   echo "$ac_t""no" 1>&6
8753 fi
8754  
8755      for ac_func in getprpwnam
8756 do
8757 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8758 echo "configure:8759: checking for $ac_func" >&5
8759 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8760   echo $ac_n "(cached) $ac_c" 1>&6
8761 else
8762   cat > conftest.$ac_ext <<EOF
8763 #line 8764 "configure"
8764 #include "confdefs.h"
8765 /* System header to define __stub macros and hopefully few prototypes,
8766     which can conflict with char $ac_func(); below.  */
8767 #include <assert.h>
8768 /* Override any gcc2 internal prototype to avoid an error.  */
8769 /* We use char because int might match the return type of a gcc2
8770     builtin and then its argument prototype would still apply.  */
8771 char $ac_func();
8772
8773 int main() {
8774
8775 /* The GNU C library defines this for functions which it implements
8776     to always fail with ENOSYS.  Some functions are actually named
8777     something starting with __ and the normal name is an alias.  */
8778 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8779 choke me
8780 #else
8781 $ac_func();
8782 #endif
8783
8784 ; return 0; }
8785 EOF
8786 if { (eval echo configure:8787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8787   rm -rf conftest*
8788   eval "ac_cv_func_$ac_func=yes"
8789 else
8790   echo "configure: failed program was:" >&5
8791   cat conftest.$ac_ext >&5
8792   rm -rf conftest*
8793   eval "ac_cv_func_$ac_func=no"
8794 fi
8795 rm -f conftest*
8796 fi
8797
8798 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8799   echo "$ac_t""yes" 1>&6
8800     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8801   cat >> confdefs.h <<EOF
8802 #define $ac_tr_func 1
8803 EOF
8804  
8805 else
8806   echo "$ac_t""no" 1>&6
8807 fi
8808 done
8809
8810   ;;
8811   esac
8812
8813
8814 # this bit needs to be modified for each OS that is suported by
8815 # smbwrapper. You need to specify how to created a shared library and
8816 # how to compile C code to produce PIC object files
8817
8818 # these are the defaults, good for lots of systems
8819 HOST_OS="$host_os"
8820 LDSHFLAGS="-shared"
8821 SONAMEFLAG="#"
8822 SHLD="\${CC}"
8823 PICFLAG=""
8824 PICSUFFIX="po"
8825 POBAD_CC="#"
8826 SHLIBEXT="so"
8827 # Assume non-shared by default and override below
8828 BLDSHARED="false"
8829 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8830 echo "configure:8831: checking ability to build shared libraries" >&5
8831
8832 # and these are for particular systems
8833 case "$host_os" in
8834                 *linux*)   cat >> confdefs.h <<\EOF
8835 #define LINUX 1
8836 EOF
8837
8838                         BLDSHARED="true"
8839                         LDSHFLAGS="-shared" 
8840                         DYNEXP="-Wl,--export-dynamic"
8841                         PICFLAG="-fPIC"
8842                         SONAMEFLAG="-Wl,-soname="
8843                         cat >> confdefs.h <<\EOF
8844 #define STAT_ST_BLOCKSIZE 512
8845 EOF
8846
8847                 ;;
8848                 *solaris*) cat >> confdefs.h <<\EOF
8849 #define SUNOS5 1
8850 EOF
8851
8852                         BLDSHARED="true"
8853                         LDSHFLAGS="-G"
8854                         SONAMEFLAG="-h "
8855                         if test "${GCC}" = "yes"; then
8856                                 PICFLAG="-fPIC"
8857                                 if test "${ac_cv_prog_gnu_ld}" = "yes"; then
8858                                         DYNEXP="-Wl,-E"
8859                                 fi
8860                         else
8861                                 PICFLAG="-KPIC"
8862                                 ## ${CFLAGS} added for building 64-bit shared 
8863                                 ## libs using Sun's Compiler
8864                                 LDSHFLAGS="-G \${CFLAGS}"
8865                                 POBAD_CC=""
8866                                 PICSUFFIX="po.o"
8867                         fi
8868                         cat >> confdefs.h <<\EOF
8869 #define STAT_ST_BLOCKSIZE 512
8870 EOF
8871
8872                 ;;
8873                 *sunos*) cat >> confdefs.h <<\EOF
8874 #define SUNOS4 1
8875 EOF
8876
8877                         BLDSHARED="true"
8878                         LDSHFLAGS="-G"
8879                         SONAMEFLAG="-Wl,-h,"
8880                         PICFLAG="-KPIC"   # Is this correct for SunOS
8881                 ;;
8882                 *bsd*)  BLDSHARED="true"
8883                         LDSHFLAGS="-shared"
8884                         DYNEXP="-Wl,-Bdynamic"
8885                         SONAMEFLAG="-Wl,-soname,"
8886                         PICFLAG="-fPIC"
8887                         cat >> confdefs.h <<\EOF
8888 #define STAT_ST_BLOCKSIZE 512
8889 EOF
8890
8891                 ;;
8892                 *irix*) cat >> confdefs.h <<\EOF
8893 #define IRIX 1
8894 EOF
8895
8896                         case "$host_os" in
8897                         *irix6*) cat >> confdefs.h <<\EOF
8898 #define IRIX6 1
8899 EOF
8900
8901                         ;;
8902                         esac
8903                         ATTEMPT_WRAP32_BUILD=yes
8904                         BLDSHARED="true"
8905                         LDSHFLAGS="-set_version sgi1.0 -shared"
8906                         SONAMEFLAG="-soname "
8907                         SHLD="\${LD}"
8908                         if test "${GCC}" = "yes"; then
8909                                 PICFLAG="-fPIC"
8910                         else 
8911                                 PICFLAG="-KPIC"
8912                         fi
8913                         cat >> confdefs.h <<\EOF
8914 #define STAT_ST_BLOCKSIZE 512
8915 EOF
8916
8917                 ;;
8918                 *aix*) cat >> confdefs.h <<\EOF
8919 #define AIX 1
8920 EOF
8921
8922                         BLDSHARED="true"
8923                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8924                         DYNEXP="-Wl,-brtl,-bexpall"
8925                         if test "${GCC}" = "yes"; then
8926                                 PICFLAG="-O2"
8927                         else
8928                         PICFLAG="-O2 -qmaxmem=6000"
8929                                 ## for funky AIX compiler using strncpy()
8930                                 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
8931                         fi
8932
8933                         cat >> confdefs.h <<\EOF
8934 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8935 EOF
8936
8937                 ;;
8938                 *hpux*) cat >> confdefs.h <<\EOF
8939 #define HPUX 1
8940 EOF
8941
8942                         SHLIBEXT="sl"
8943                         # Use special PIC flags for the native HP-UX compiler.
8944                         if test $ac_cv_prog_cc_Ae = yes; then
8945                                 BLDSHARED="true"
8946                                 SHLD="/usr/bin/ld"
8947                                 LDSHFLAGS="-B symbolic -b -z"
8948                                 SONAMEFLAG="+h "
8949                                 PICFLAG="+z"
8950                         fi
8951                         DYNEXP="-Wl,-E"
8952                         cat >> confdefs.h <<\EOF
8953 #define STAT_ST_BLOCKSIZE 8192
8954 EOF
8955
8956                 ;;
8957                 *qnx*) cat >> confdefs.h <<\EOF
8958 #define QNX 1
8959 EOF
8960 ;;
8961                 *osf*) cat >> confdefs.h <<\EOF
8962 #define OSF1 1
8963 EOF
8964
8965                         BLDSHARED="true"
8966                         LDSHFLAGS="-shared"
8967                         SONAMEFLAG="-Wl,-soname,"
8968                         PICFLAG="-fPIC"
8969                 ;;
8970                 *sco*) cat >> confdefs.h <<\EOF
8971 #define SCO 1
8972 EOF
8973 ;;
8974                 *unixware*) cat >> confdefs.h <<\EOF
8975 #define UNIXWARE 1
8976 EOF
8977
8978                         BLDSHARED="true"
8979                         LDSHFLAGS="-shared"
8980                         SONAMEFLAG="-Wl,-soname,"
8981                         PICFLAG="-KPIC"
8982                 ;;
8983                 *next2*) cat >> confdefs.h <<\EOF
8984 #define NEXT2 1
8985 EOF
8986 ;;
8987                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8988 set dummy groff; ac_word=$2
8989 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8990 echo "configure:8991: checking for $ac_word" >&5
8991 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8992   echo $ac_n "(cached) $ac_c" 1>&6
8993 else
8994   if test -n "$ROFF"; then
8995   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8996 else
8997   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8998   ac_dummy="$PATH"
8999   for ac_dir in $ac_dummy; do
9000     test -z "$ac_dir" && ac_dir=.
9001     if test -f $ac_dir/$ac_word; then
9002       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9003       break
9004     fi
9005   done
9006   IFS="$ac_save_ifs"
9007 fi
9008 fi
9009 ROFF="$ac_cv_prog_ROFF"
9010 if test -n "$ROFF"; then
9011   echo "$ac_t""$ROFF" 1>&6
9012 else
9013   echo "$ac_t""no" 1>&6
9014 fi
9015 ;;
9016                 *sysv4*)
9017                         case "$host" in
9018                                 *-univel-*)     if  test "$GCC" != yes ; then
9019                                                 cat >> confdefs.h <<\EOF
9020 #define HAVE_MEMSET 1
9021 EOF
9022
9023                                         fi
9024                                         LDSHFLAGS="-G"
9025                                         DYNEXP="-Bexport"
9026                                 ;;
9027                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
9028 #define RELIANTUNIX 1
9029 EOF
9030 ;;
9031                         esac
9032                 ;;
9033
9034                 *sysv5*)
9035                         if  test "$GCC" != yes ; then
9036                                 cat >> confdefs.h <<\EOF
9037 #define HAVE_MEMSET 1
9038 EOF
9039
9040                         fi
9041                         LDSHFLAGS="-G"
9042                 ;;
9043 esac
9044
9045 echo "$ac_t""$BLDSHARED" 1>&6
9046 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9047 echo "configure:9048: checking linker flags for shared libraries" >&5
9048 echo "$ac_t""$LDSHFLAGS" 1>&6
9049 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9050 echo "configure:9051: checking compiler flags for position-independent code" >&5
9051 echo "$ac_t""$PICFLAGS" 1>&6
9052
9053 #######################################################
9054 # test whether building a shared library actually works
9055 if test $BLDSHARED = true; then
9056 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9057 echo "configure:9058: checking whether building shared libraries actually works" >&5
9058 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9059   echo $ac_n "(cached) $ac_c" 1>&6
9060 else
9061   
9062    ac_cv_shlib_works=no
9063    # try building a trivial shared library
9064    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9065      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9066      ac_cv_shlib_works=yes
9067    rm -f shlib.so shlib.po
9068
9069 fi
9070
9071 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9072 if test $ac_cv_shlib_works = no; then
9073    BLDSHARED=false
9074 fi
9075 fi
9076
9077
9078 # this updates our target list if we can build shared libs
9079 if test $BLDSHARED = true; then
9080    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9081 else
9082    LIBSMBCLIENT_SHARED=
9083 fi
9084
9085 ################
9086
9087 echo $ac_n "checking for long long""... $ac_c" 1>&6
9088 echo "configure:9089: checking for long long" >&5
9089 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9090   echo $ac_n "(cached) $ac_c" 1>&6
9091 else
9092   
9093 if test "$cross_compiling" = yes; then
9094   samba_cv_have_longlong=cross
9095 else
9096   cat > conftest.$ac_ext <<EOF
9097 #line 9098 "configure"
9098 #include "confdefs.h"
9099 #include <stdio.h>
9100 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9101 EOF
9102 if { (eval echo configure:9103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9103 then
9104   samba_cv_have_longlong=yes
9105 else
9106   echo "configure: failed program was:" >&5
9107   cat conftest.$ac_ext >&5
9108   rm -fr conftest*
9109   samba_cv_have_longlong=no
9110 fi
9111 rm -fr conftest*
9112 fi
9113
9114 fi
9115
9116 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9117 if test x"$samba_cv_have_longlong" = x"yes"; then
9118     cat >> confdefs.h <<\EOF
9119 #define HAVE_LONGLONG 1
9120 EOF
9121
9122 fi
9123
9124 #
9125 # Check if the compiler supports the LL prefix on long long integers.
9126 # AIX needs this.
9127
9128 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9129 echo "configure:9130: checking for LL suffix on long long integers" >&5
9130 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9131   echo $ac_n "(cached) $ac_c" 1>&6
9132 else
9133   
9134     cat > conftest.$ac_ext <<EOF
9135 #line 9136 "configure"
9136 #include "confdefs.h"
9137 #include <stdio.h>
9138 int main() {
9139 long long i = 0x8000000000LL
9140 ; return 0; }
9141 EOF
9142 if { (eval echo configure:9143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9143   rm -rf conftest*
9144   samba_cv_compiler_supports_ll=yes
9145 else
9146   echo "configure: failed program was:" >&5
9147   cat conftest.$ac_ext >&5
9148   rm -rf conftest*
9149   samba_cv_compiler_supports_ll=no
9150 fi
9151 rm -f conftest*
9152 fi
9153
9154 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9155 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9156    cat >> confdefs.h <<\EOF
9157 #define COMPILER_SUPPORTS_LL 1
9158 EOF
9159
9160 fi
9161
9162   
9163 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9164 echo "configure:9165: checking for 64 bit off_t" >&5
9165 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9166   echo $ac_n "(cached) $ac_c" 1>&6
9167 else
9168   
9169 if test "$cross_compiling" = yes; then
9170   samba_cv_SIZEOF_OFF_T=cross
9171 else
9172   cat > conftest.$ac_ext <<EOF
9173 #line 9174 "configure"
9174 #include "confdefs.h"
9175 #include <stdio.h>
9176 #include <sys/stat.h>
9177 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9178 EOF
9179 if { (eval echo configure:9180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9180 then
9181   samba_cv_SIZEOF_OFF_T=yes
9182 else
9183   echo "configure: failed program was:" >&5
9184   cat conftest.$ac_ext >&5
9185   rm -fr conftest*
9186   samba_cv_SIZEOF_OFF_T=no
9187 fi
9188 rm -fr conftest*
9189 fi
9190
9191 fi
9192
9193 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9194 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9195     cat >> confdefs.h <<\EOF
9196 #define SIZEOF_OFF_T 8
9197 EOF
9198
9199 fi
9200
9201 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9202 echo "configure:9203: checking for off64_t" >&5
9203 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9204   echo $ac_n "(cached) $ac_c" 1>&6
9205 else
9206   
9207 if test "$cross_compiling" = yes; then
9208   samba_cv_HAVE_OFF64_T=cross
9209 else
9210   cat > conftest.$ac_ext <<EOF
9211 #line 9212 "configure"
9212 #include "confdefs.h"
9213
9214 #if defined(HAVE_UNISTD_H)
9215 #include <unistd.h>
9216 #endif
9217 #include <stdio.h>
9218 #include <sys/stat.h>
9219 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9220 EOF
9221 if { (eval echo configure:9222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9222 then
9223   samba_cv_HAVE_OFF64_T=yes
9224 else
9225   echo "configure: failed program was:" >&5
9226   cat conftest.$ac_ext >&5
9227   rm -fr conftest*
9228   samba_cv_HAVE_OFF64_T=no
9229 fi
9230 rm -fr conftest*
9231 fi
9232
9233 fi
9234
9235 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9236 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9237     cat >> confdefs.h <<\EOF
9238 #define HAVE_OFF64_T 1
9239 EOF
9240
9241 fi
9242
9243 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9244 echo "configure:9245: checking for 64 bit ino_t" >&5
9245 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9246   echo $ac_n "(cached) $ac_c" 1>&6
9247 else
9248   
9249 if test "$cross_compiling" = yes; then
9250   samba_cv_SIZEOF_INO_T=cross
9251 else
9252   cat > conftest.$ac_ext <<EOF
9253 #line 9254 "configure"
9254 #include "confdefs.h"
9255 #include <stdio.h>
9256 #include <sys/stat.h>
9257 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9258 EOF
9259 if { (eval echo configure:9260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9260 then
9261   samba_cv_SIZEOF_INO_T=yes
9262 else
9263   echo "configure: failed program was:" >&5
9264   cat conftest.$ac_ext >&5
9265   rm -fr conftest*
9266   samba_cv_SIZEOF_INO_T=no
9267 fi
9268 rm -fr conftest*
9269 fi
9270
9271 fi
9272
9273 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9274 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9275     cat >> confdefs.h <<\EOF
9276 #define SIZEOF_INO_T 8
9277 EOF
9278
9279 fi
9280
9281 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9282 echo "configure:9283: checking for ino64_t" >&5
9283 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9284   echo $ac_n "(cached) $ac_c" 1>&6
9285 else
9286   
9287 if test "$cross_compiling" = yes; then
9288   samba_cv_HAVE_INO64_T=cross
9289 else
9290   cat > conftest.$ac_ext <<EOF
9291 #line 9292 "configure"
9292 #include "confdefs.h"
9293
9294 #if defined(HAVE_UNISTD_H)
9295 #include <unistd.h>
9296 #endif
9297 #include <stdio.h>
9298 #include <sys/stat.h>
9299 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9300 EOF
9301 if { (eval echo configure:9302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9302 then
9303   samba_cv_HAVE_INO64_T=yes
9304 else
9305   echo "configure: failed program was:" >&5
9306   cat conftest.$ac_ext >&5
9307   rm -fr conftest*
9308   samba_cv_HAVE_INO64_T=no
9309 fi
9310 rm -fr conftest*
9311 fi
9312
9313 fi
9314
9315 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9316 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9317     cat >> confdefs.h <<\EOF
9318 #define HAVE_INO64_T 1
9319 EOF
9320
9321 fi
9322
9323 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9324 echo "configure:9325: checking for dev64_t" >&5
9325 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9326   echo $ac_n "(cached) $ac_c" 1>&6
9327 else
9328   
9329 if test "$cross_compiling" = yes; then
9330   samba_cv_HAVE_DEV64_T=cross
9331 else
9332   cat > conftest.$ac_ext <<EOF
9333 #line 9334 "configure"
9334 #include "confdefs.h"
9335
9336 #if defined(HAVE_UNISTD_H)
9337 #include <unistd.h>
9338 #endif
9339 #include <stdio.h>
9340 #include <sys/stat.h>
9341 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9342 EOF
9343 if { (eval echo configure:9344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9344 then
9345   samba_cv_HAVE_DEV64_T=yes
9346 else
9347   echo "configure: failed program was:" >&5
9348   cat conftest.$ac_ext >&5
9349   rm -fr conftest*
9350   samba_cv_HAVE_DEV64_T=no
9351 fi
9352 rm -fr conftest*
9353 fi
9354
9355 fi
9356
9357 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9358 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9359     cat >> confdefs.h <<\EOF
9360 #define HAVE_DEV64_T 1
9361 EOF
9362
9363 fi
9364
9365 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9366 echo "configure:9367: checking for struct dirent64" >&5
9367 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9368   echo $ac_n "(cached) $ac_c" 1>&6
9369 else
9370   
9371 cat > conftest.$ac_ext <<EOF
9372 #line 9373 "configure"
9373 #include "confdefs.h"
9374
9375 #if defined(HAVE_UNISTD_H)
9376 #include <unistd.h>
9377 #endif
9378 #include <sys/types.h>
9379 #include <dirent.h>
9380 int main() {
9381 struct dirent64 de;
9382 ; return 0; }
9383 EOF
9384 if { (eval echo configure:9385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9385   rm -rf conftest*
9386   samba_cv_HAVE_STRUCT_DIRENT64=yes
9387 else
9388   echo "configure: failed program was:" >&5
9389   cat conftest.$ac_ext >&5
9390   rm -rf conftest*
9391   samba_cv_HAVE_STRUCT_DIRENT64=no
9392 fi
9393 rm -f conftest*
9394 fi
9395
9396 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9397 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
9398     cat >> confdefs.h <<\EOF
9399 #define HAVE_STRUCT_DIRENT64 1
9400 EOF
9401
9402 fi
9403
9404 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9405 echo "configure:9406: checking for major macro" >&5
9406 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9407   echo $ac_n "(cached) $ac_c" 1>&6
9408 else
9409   
9410 if test "$cross_compiling" = yes; then
9411   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9412 else
9413   cat > conftest.$ac_ext <<EOF
9414 #line 9415 "configure"
9415 #include "confdefs.h"
9416
9417 #if defined(HAVE_UNISTD_H)
9418 #include <unistd.h>
9419 #endif
9420 #include <sys/types.h>
9421 main() { dev_t dev; int i = major(dev); return 0; }
9422 EOF
9423 if { (eval echo configure:9424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9424 then
9425   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9426 else
9427   echo "configure: failed program was:" >&5
9428   cat conftest.$ac_ext >&5
9429   rm -fr conftest*
9430   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9431 fi
9432 rm -fr conftest*
9433 fi
9434
9435 fi
9436
9437 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9438 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9439     cat >> confdefs.h <<\EOF
9440 #define HAVE_DEVICE_MAJOR_FN 1
9441 EOF
9442
9443 fi
9444
9445 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9446 echo "configure:9447: checking for minor macro" >&5
9447 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9448   echo $ac_n "(cached) $ac_c" 1>&6
9449 else
9450   
9451 if test "$cross_compiling" = yes; then
9452   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9453 else
9454   cat > conftest.$ac_ext <<EOF
9455 #line 9456 "configure"
9456 #include "confdefs.h"
9457
9458 #if defined(HAVE_UNISTD_H)
9459 #include <unistd.h>
9460 #endif
9461 #include <sys/types.h>
9462 main() { dev_t dev; int i = minor(dev); return 0; }
9463 EOF
9464 if { (eval echo configure:9465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9465 then
9466   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9467 else
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -fr conftest*
9471   samba_cv_HAVE_DEVICE_MINOR_FN=no
9472 fi
9473 rm -fr conftest*
9474 fi
9475
9476 fi
9477
9478 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9479 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9480     cat >> confdefs.h <<\EOF
9481 #define HAVE_DEVICE_MINOR_FN 1
9482 EOF
9483
9484 fi
9485
9486 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9487 echo "configure:9488: checking for unsigned char" >&5
9488 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9489   echo $ac_n "(cached) $ac_c" 1>&6
9490 else
9491   
9492 if test "$cross_compiling" = yes; then
9493   samba_cv_HAVE_UNSIGNED_CHAR=cross
9494 else
9495   cat > conftest.$ac_ext <<EOF
9496 #line 9497 "configure"
9497 #include "confdefs.h"
9498 #include <stdio.h>
9499 main() { char c; c=250; exit((c > 0)?0:1); }
9500 EOF
9501 if { (eval echo configure:9502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9502 then
9503   samba_cv_HAVE_UNSIGNED_CHAR=yes
9504 else
9505   echo "configure: failed program was:" >&5
9506   cat conftest.$ac_ext >&5
9507   rm -fr conftest*
9508   samba_cv_HAVE_UNSIGNED_CHAR=no
9509 fi
9510 rm -fr conftest*
9511 fi
9512
9513 fi
9514
9515 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9516 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9517     cat >> confdefs.h <<\EOF
9518 #define HAVE_UNSIGNED_CHAR 1
9519 EOF
9520
9521 fi
9522
9523 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9524 echo "configure:9525: checking for sin_len in sock" >&5
9525 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9526   echo $ac_n "(cached) $ac_c" 1>&6
9527 else
9528   
9529 cat > conftest.$ac_ext <<EOF
9530 #line 9531 "configure"
9531 #include "confdefs.h"
9532 #include <sys/types.h>
9533 #include <sys/socket.h>
9534 #include <netinet/in.h>
9535 int main() {
9536 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9537 ; return 0; }
9538 EOF
9539 if { (eval echo configure:9540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9540   rm -rf conftest*
9541   samba_cv_HAVE_SOCK_SIN_LEN=yes
9542 else
9543   echo "configure: failed program was:" >&5
9544   cat conftest.$ac_ext >&5
9545   rm -rf conftest*
9546   samba_cv_HAVE_SOCK_SIN_LEN=no
9547 fi
9548 rm -f conftest*
9549 fi
9550
9551 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9552 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9553     cat >> confdefs.h <<\EOF
9554 #define HAVE_SOCK_SIN_LEN 1
9555 EOF
9556
9557 fi
9558
9559 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9560 echo "configure:9561: checking whether seekdir returns void" >&5
9561 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9562   echo $ac_n "(cached) $ac_c" 1>&6
9563 else
9564   
9565 cat > conftest.$ac_ext <<EOF
9566 #line 9567 "configure"
9567 #include "confdefs.h"
9568 #include <sys/types.h>
9569 #include <dirent.h>
9570 void seekdir(DIR *d, long loc) { return; }
9571 int main() {
9572 return 0;
9573 ; return 0; }
9574 EOF
9575 if { (eval echo configure:9576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9576   rm -rf conftest*
9577   samba_cv_SEEKDIR_RETURNS_VOID=yes
9578 else
9579   echo "configure: failed program was:" >&5
9580   cat conftest.$ac_ext >&5
9581   rm -rf conftest*
9582   samba_cv_SEEKDIR_RETURNS_VOID=no
9583 fi
9584 rm -f conftest*
9585 fi
9586
9587 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9588 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9589     cat >> confdefs.h <<\EOF
9590 #define SEEKDIR_RETURNS_VOID 1
9591 EOF
9592
9593 fi
9594
9595 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9596 echo "configure:9597: checking for __FILE__ macro" >&5
9597 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9598   echo $ac_n "(cached) $ac_c" 1>&6
9599 else
9600   
9601 cat > conftest.$ac_ext <<EOF
9602 #line 9603 "configure"
9603 #include "confdefs.h"
9604 #include <stdio.h>
9605 int main() {
9606 printf("%s\n", __FILE__);
9607 ; return 0; }
9608 EOF
9609 if { (eval echo configure:9610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9610   rm -rf conftest*
9611   samba_cv_HAVE_FILE_MACRO=yes
9612 else
9613   echo "configure: failed program was:" >&5
9614   cat conftest.$ac_ext >&5
9615   rm -rf conftest*
9616   samba_cv_HAVE_FILE_MACRO=no
9617 fi
9618 rm -f conftest*
9619 fi
9620
9621 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9622 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9623     cat >> confdefs.h <<\EOF
9624 #define HAVE_FILE_MACRO 1
9625 EOF
9626
9627 fi
9628
9629 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9630 echo "configure:9631: checking for __FUNCTION__ macro" >&5
9631 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9632   echo $ac_n "(cached) $ac_c" 1>&6
9633 else
9634   
9635 cat > conftest.$ac_ext <<EOF
9636 #line 9637 "configure"
9637 #include "confdefs.h"
9638 #include <stdio.h>
9639 int main() {
9640 printf("%s\n", __FUNCTION__);
9641 ; return 0; }
9642 EOF
9643 if { (eval echo configure:9644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9644   rm -rf conftest*
9645   samba_cv_HAVE_FUNCTION_MACRO=yes
9646 else
9647   echo "configure: failed program was:" >&5
9648   cat conftest.$ac_ext >&5
9649   rm -rf conftest*
9650   samba_cv_HAVE_FUNCTION_MACRO=no
9651 fi
9652 rm -f conftest*
9653 fi
9654
9655 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9656 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9657     cat >> confdefs.h <<\EOF
9658 #define HAVE_FUNCTION_MACRO 1
9659 EOF
9660
9661 fi
9662
9663 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9664 echo "configure:9665: checking if gettimeofday takes tz argument" >&5
9665 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9666   echo $ac_n "(cached) $ac_c" 1>&6
9667 else
9668   
9669 if test "$cross_compiling" = yes; then
9670   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9671 else
9672   cat > conftest.$ac_ext <<EOF
9673 #line 9674 "configure"
9674 #include "confdefs.h"
9675
9676 #include <sys/time.h>
9677 #include <unistd.h>
9678 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9679 EOF
9680 if { (eval echo configure:9681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9681 then
9682   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9683 else
9684   echo "configure: failed program was:" >&5
9685   cat conftest.$ac_ext >&5
9686   rm -fr conftest*
9687   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9688 fi
9689 rm -fr conftest*
9690 fi
9691
9692 fi
9693
9694 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9695 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9696     cat >> confdefs.h <<\EOF
9697 #define HAVE_GETTIMEOFDAY_TZ 1
9698 EOF
9699
9700 fi
9701
9702 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9703 echo "configure:9704: checking for __va_copy" >&5
9704 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9705   echo $ac_n "(cached) $ac_c" 1>&6
9706 else
9707   
9708 cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711 #include <stdarg.h>
9712 va_list ap1,ap2;
9713 int main() {
9714 __va_copy(ap1,ap2);
9715 ; return 0; }
9716 EOF
9717 if { (eval echo configure:9718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9718   rm -rf conftest*
9719   samba_cv_HAVE_VA_COPY=yes
9720 else
9721   echo "configure: failed program was:" >&5
9722   cat conftest.$ac_ext >&5
9723   rm -rf conftest*
9724   samba_cv_HAVE_VA_COPY=no
9725 fi
9726 rm -f conftest*
9727 fi
9728
9729 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9730 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9731     cat >> confdefs.h <<\EOF
9732 #define HAVE_VA_COPY 1
9733 EOF
9734
9735 fi
9736
9737 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9738 echo "configure:9739: checking for C99 vsnprintf" >&5
9739 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9740   echo $ac_n "(cached) $ac_c" 1>&6
9741 else
9742   
9743 if test "$cross_compiling" = yes; then
9744   samba_cv_HAVE_C99_VSNPRINTF=cross
9745 else
9746   cat > conftest.$ac_ext <<EOF
9747 #line 9748 "configure"
9748 #include "confdefs.h"
9749
9750 #include <sys/types.h>
9751 #include <stdarg.h>
9752 void foo(const char *format, ...) { 
9753        va_list ap;
9754        int len;
9755        char buf[5];
9756
9757        va_start(ap, format);
9758        len = vsnprintf(buf, 0, format, ap);
9759        va_end(ap);
9760        if (len != 5) exit(1);
9761
9762        va_start(ap, format);
9763        len = vsnprintf(0, 0, format, ap);
9764        va_end(ap);
9765        if (len != 5) exit(1);
9766
9767        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9768
9769        exit(0);
9770 }
9771 main() { foo("hello"); }
9772
9773 EOF
9774 if { (eval echo configure:9775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9775 then
9776   samba_cv_HAVE_C99_VSNPRINTF=yes
9777 else
9778   echo "configure: failed program was:" >&5
9779   cat conftest.$ac_ext >&5
9780   rm -fr conftest*
9781   samba_cv_HAVE_C99_VSNPRINTF=no
9782 fi
9783 rm -fr conftest*
9784 fi
9785
9786 fi
9787
9788 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9789 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9790     cat >> confdefs.h <<\EOF
9791 #define HAVE_C99_VSNPRINTF 1
9792 EOF
9793
9794 fi
9795
9796 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9797 echo "configure:9798: checking for broken readdir" >&5
9798 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+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_BROKEN_READDIR=cross
9804 else
9805   cat > conftest.$ac_ext <<EOF
9806 #line 9807 "configure"
9807 #include "confdefs.h"
9808 #include <sys/types.h>
9809 #include <dirent.h>
9810 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9811 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9812 di->d_name[0] == 0) exit(0); exit(1);} 
9813 EOF
9814 if { (eval echo configure:9815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9815 then
9816   samba_cv_HAVE_BROKEN_READDIR=yes
9817 else
9818   echo "configure: failed program was:" >&5
9819   cat conftest.$ac_ext >&5
9820   rm -fr conftest*
9821   samba_cv_HAVE_BROKEN_READDIR=no
9822 fi
9823 rm -fr conftest*
9824 fi
9825
9826 fi
9827
9828 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9829 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9830     cat >> confdefs.h <<\EOF
9831 #define HAVE_BROKEN_READDIR 1
9832 EOF
9833
9834 fi
9835
9836 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9837 echo "configure:9838: checking for utimbuf" >&5
9838 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9839   echo $ac_n "(cached) $ac_c" 1>&6
9840 else
9841   
9842 cat > conftest.$ac_ext <<EOF
9843 #line 9844 "configure"
9844 #include "confdefs.h"
9845 #include <sys/types.h>
9846 #include <utime.h>
9847 int main() {
9848 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9849 ; return 0; }
9850 EOF
9851 if { (eval echo configure:9852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9852   rm -rf conftest*
9853   samba_cv_HAVE_UTIMBUF=yes
9854 else
9855   echo "configure: failed program was:" >&5
9856   cat conftest.$ac_ext >&5
9857   rm -rf conftest*
9858   samba_cv_HAVE_UTIMBUF=no
9859 fi
9860 rm -f conftest*
9861 fi
9862
9863 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9864 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9865     cat >> confdefs.h <<\EOF
9866 #define HAVE_UTIMBUF 1
9867 EOF
9868
9869 fi
9870
9871
9872 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9873 do
9874 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9875 echo "configure:9876: checking for $ac_func" >&5
9876 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9877   echo $ac_n "(cached) $ac_c" 1>&6
9878 else
9879   cat > conftest.$ac_ext <<EOF
9880 #line 9881 "configure"
9881 #include "confdefs.h"
9882 /* System header to define __stub macros and hopefully few prototypes,
9883     which can conflict with char $ac_func(); below.  */
9884 #include <assert.h>
9885 /* Override any gcc2 internal prototype to avoid an error.  */
9886 /* We use char because int might match the return type of a gcc2
9887     builtin and then its argument prototype would still apply.  */
9888 char $ac_func();
9889
9890 int main() {
9891
9892 /* The GNU C library defines this for functions which it implements
9893     to always fail with ENOSYS.  Some functions are actually named
9894     something starting with __ and the normal name is an alias.  */
9895 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9896 choke me
9897 #else
9898 $ac_func();
9899 #endif
9900
9901 ; return 0; }
9902 EOF
9903 if { (eval echo configure:9904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9904   rm -rf conftest*
9905   eval "ac_cv_func_$ac_func=yes"
9906 else
9907   echo "configure: failed program was:" >&5
9908   cat conftest.$ac_ext >&5
9909   rm -rf conftest*
9910   eval "ac_cv_func_$ac_func=no"
9911 fi
9912 rm -f conftest*
9913 fi
9914
9915 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9916   echo "$ac_t""yes" 1>&6
9917     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9918   cat >> confdefs.h <<EOF
9919 #define $ac_tr_func 1
9920 EOF
9921  
9922 else
9923   echo "$ac_t""no" 1>&6
9924 fi
9925 done
9926
9927
9928 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9929 echo "configure:9930: checking for ut_name in utmp" >&5
9930 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9931   echo $ac_n "(cached) $ac_c" 1>&6
9932 else
9933   
9934 cat > conftest.$ac_ext <<EOF
9935 #line 9936 "configure"
9936 #include "confdefs.h"
9937 #include <sys/types.h>
9938 #include <utmp.h>
9939 int main() {
9940 struct utmp ut;  ut.ut_name[0] = 'a';
9941 ; return 0; }
9942 EOF
9943 if { (eval echo configure:9944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9944   rm -rf conftest*
9945   samba_cv_HAVE_UT_UT_NAME=yes
9946 else
9947   echo "configure: failed program was:" >&5
9948   cat conftest.$ac_ext >&5
9949   rm -rf conftest*
9950   samba_cv_HAVE_UT_UT_NAME=no
9951 fi
9952 rm -f conftest*
9953 fi
9954
9955 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9956 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9957     cat >> confdefs.h <<\EOF
9958 #define HAVE_UT_UT_NAME 1
9959 EOF
9960
9961 fi 
9962
9963 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9964 echo "configure:9965: checking for ut_user in utmp" >&5
9965 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9966   echo $ac_n "(cached) $ac_c" 1>&6
9967 else
9968   
9969 cat > conftest.$ac_ext <<EOF
9970 #line 9971 "configure"
9971 #include "confdefs.h"
9972 #include <sys/types.h>
9973 #include <utmp.h>
9974 int main() {
9975 struct utmp ut;  ut.ut_user[0] = 'a';
9976 ; return 0; }
9977 EOF
9978 if { (eval echo configure:9979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9979   rm -rf conftest*
9980   samba_cv_HAVE_UT_UT_USER=yes
9981 else
9982   echo "configure: failed program was:" >&5
9983   cat conftest.$ac_ext >&5
9984   rm -rf conftest*
9985   samba_cv_HAVE_UT_UT_USER=no
9986 fi
9987 rm -f conftest*
9988 fi
9989
9990 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9991 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9992     cat >> confdefs.h <<\EOF
9993 #define HAVE_UT_UT_USER 1
9994 EOF
9995
9996 fi 
9997
9998 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9999 echo "configure:10000: checking for ut_id in utmp" >&5
10000 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10001   echo $ac_n "(cached) $ac_c" 1>&6
10002 else
10003   
10004 cat > conftest.$ac_ext <<EOF
10005 #line 10006 "configure"
10006 #include "confdefs.h"
10007 #include <sys/types.h>
10008 #include <utmp.h>
10009 int main() {
10010 struct utmp ut;  ut.ut_id[0] = 'a';
10011 ; return 0; }
10012 EOF
10013 if { (eval echo configure:10014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10014   rm -rf conftest*
10015   samba_cv_HAVE_UT_UT_ID=yes
10016 else
10017   echo "configure: failed program was:" >&5
10018   cat conftest.$ac_ext >&5
10019   rm -rf conftest*
10020   samba_cv_HAVE_UT_UT_ID=no
10021 fi
10022 rm -f conftest*
10023 fi
10024
10025 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10026 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10027     cat >> confdefs.h <<\EOF
10028 #define HAVE_UT_UT_ID 1
10029 EOF
10030
10031 fi 
10032
10033 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10034 echo "configure:10035: checking for ut_host in utmp" >&5
10035 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10036   echo $ac_n "(cached) $ac_c" 1>&6
10037 else
10038   
10039 cat > conftest.$ac_ext <<EOF
10040 #line 10041 "configure"
10041 #include "confdefs.h"
10042 #include <sys/types.h>
10043 #include <utmp.h>
10044 int main() {
10045 struct utmp ut;  ut.ut_host[0] = 'a';
10046 ; return 0; }
10047 EOF
10048 if { (eval echo configure:10049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10049   rm -rf conftest*
10050   samba_cv_HAVE_UT_UT_HOST=yes
10051 else
10052   echo "configure: failed program was:" >&5
10053   cat conftest.$ac_ext >&5
10054   rm -rf conftest*
10055   samba_cv_HAVE_UT_UT_HOST=no
10056 fi
10057 rm -f conftest*
10058 fi
10059
10060 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10061 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10062     cat >> confdefs.h <<\EOF
10063 #define HAVE_UT_UT_HOST 1
10064 EOF
10065
10066 fi 
10067
10068 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10069 echo "configure:10070: checking for ut_time in utmp" >&5
10070 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10071   echo $ac_n "(cached) $ac_c" 1>&6
10072 else
10073   
10074 cat > conftest.$ac_ext <<EOF
10075 #line 10076 "configure"
10076 #include "confdefs.h"
10077 #include <sys/types.h>
10078 #include <utmp.h>
10079 int main() {
10080 struct utmp ut;  time_t t; ut.ut_time = t;
10081 ; return 0; }
10082 EOF
10083 if { (eval echo configure:10084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10084   rm -rf conftest*
10085   samba_cv_HAVE_UT_UT_TIME=yes
10086 else
10087   echo "configure: failed program was:" >&5
10088   cat conftest.$ac_ext >&5
10089   rm -rf conftest*
10090   samba_cv_HAVE_UT_UT_TIME=no
10091 fi
10092 rm -f conftest*
10093 fi
10094
10095 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10096 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10097     cat >> confdefs.h <<\EOF
10098 #define HAVE_UT_UT_TIME 1
10099 EOF
10100
10101 fi 
10102
10103 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10104 echo "configure:10105: checking for ut_tv in utmp" >&5
10105 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10106   echo $ac_n "(cached) $ac_c" 1>&6
10107 else
10108   
10109 cat > conftest.$ac_ext <<EOF
10110 #line 10111 "configure"
10111 #include "confdefs.h"
10112 #include <sys/types.h>
10113 #include <utmp.h>
10114 int main() {
10115 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10116 ; return 0; }
10117 EOF
10118 if { (eval echo configure:10119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10119   rm -rf conftest*
10120   samba_cv_HAVE_UT_UT_TV=yes
10121 else
10122   echo "configure: failed program was:" >&5
10123   cat conftest.$ac_ext >&5
10124   rm -rf conftest*
10125   samba_cv_HAVE_UT_UT_TV=no
10126 fi
10127 rm -f conftest*
10128 fi
10129
10130 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10131 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10132     cat >> confdefs.h <<\EOF
10133 #define HAVE_UT_UT_TV 1
10134 EOF
10135
10136 fi 
10137
10138 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10139 echo "configure:10140: checking for ut_type in utmp" >&5
10140 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10141   echo $ac_n "(cached) $ac_c" 1>&6
10142 else
10143   
10144 cat > conftest.$ac_ext <<EOF
10145 #line 10146 "configure"
10146 #include "confdefs.h"
10147 #include <sys/types.h>
10148 #include <utmp.h>
10149 int main() {
10150 struct utmp ut;  ut.ut_type = 0;
10151 ; return 0; }
10152 EOF
10153 if { (eval echo configure:10154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10154   rm -rf conftest*
10155   samba_cv_HAVE_UT_UT_TYPE=yes
10156 else
10157   echo "configure: failed program was:" >&5
10158   cat conftest.$ac_ext >&5
10159   rm -rf conftest*
10160   samba_cv_HAVE_UT_UT_TYPE=no
10161 fi
10162 rm -f conftest*
10163 fi
10164
10165 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10166 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10167     cat >> confdefs.h <<\EOF
10168 #define HAVE_UT_UT_TYPE 1
10169 EOF
10170
10171 fi 
10172
10173 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10174 echo "configure:10175: checking for ut_pid in utmp" >&5
10175 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10176   echo $ac_n "(cached) $ac_c" 1>&6
10177 else
10178   
10179 cat > conftest.$ac_ext <<EOF
10180 #line 10181 "configure"
10181 #include "confdefs.h"
10182 #include <sys/types.h>
10183 #include <utmp.h>
10184 int main() {
10185 struct utmp ut;  ut.ut_pid = 0;
10186 ; return 0; }
10187 EOF
10188 if { (eval echo configure:10189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10189   rm -rf conftest*
10190   samba_cv_HAVE_UT_UT_PID=yes
10191 else
10192   echo "configure: failed program was:" >&5
10193   cat conftest.$ac_ext >&5
10194   rm -rf conftest*
10195   samba_cv_HAVE_UT_UT_PID=no
10196 fi
10197 rm -f conftest*
10198 fi
10199
10200 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10201 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10202     cat >> confdefs.h <<\EOF
10203 #define HAVE_UT_UT_PID 1
10204 EOF
10205
10206 fi 
10207
10208 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10209 echo "configure:10210: checking for ut_exit in utmp" >&5
10210 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10211   echo $ac_n "(cached) $ac_c" 1>&6
10212 else
10213   
10214 cat > conftest.$ac_ext <<EOF
10215 #line 10216 "configure"
10216 #include "confdefs.h"
10217 #include <sys/types.h>
10218 #include <utmp.h>
10219 int main() {
10220 struct utmp ut;  ut.ut_exit.e_exit = 0;
10221 ; return 0; }
10222 EOF
10223 if { (eval echo configure:10224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10224   rm -rf conftest*
10225   samba_cv_HAVE_UT_UT_EXIT=yes
10226 else
10227   echo "configure: failed program was:" >&5
10228   cat conftest.$ac_ext >&5
10229   rm -rf conftest*
10230   samba_cv_HAVE_UT_UT_EXIT=no
10231 fi
10232 rm -f conftest*
10233 fi
10234
10235 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10236 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10237     cat >> confdefs.h <<\EOF
10238 #define HAVE_UT_UT_EXIT 1
10239 EOF
10240
10241 fi 
10242
10243 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10244 echo "configure:10245: checking for ut_addr in utmp" >&5
10245 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10246   echo $ac_n "(cached) $ac_c" 1>&6
10247 else
10248   
10249 cat > conftest.$ac_ext <<EOF
10250 #line 10251 "configure"
10251 #include "confdefs.h"
10252 #include <sys/types.h>
10253 #include <utmp.h>
10254 int main() {
10255 struct utmp ut;  ut.ut_addr = 0;
10256 ; return 0; }
10257 EOF
10258 if { (eval echo configure:10259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10259   rm -rf conftest*
10260   samba_cv_HAVE_UT_UT_ADDR=yes
10261 else
10262   echo "configure: failed program was:" >&5
10263   cat conftest.$ac_ext >&5
10264   rm -rf conftest*
10265   samba_cv_HAVE_UT_UT_ADDR=no
10266 fi
10267 rm -f conftest*
10268 fi
10269
10270 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10271 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10272     cat >> confdefs.h <<\EOF
10273 #define HAVE_UT_UT_ADDR 1
10274 EOF
10275
10276 fi 
10277
10278 if test x$ac_cv_func_pututline = xyes ; then
10279   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10280 echo "configure:10281: checking whether pututline returns pointer" >&5
10281 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10282   echo $ac_n "(cached) $ac_c" 1>&6
10283 else
10284   
10285   cat > conftest.$ac_ext <<EOF
10286 #line 10287 "configure"
10287 #include "confdefs.h"
10288 #include <sys/types.h>
10289 #include <utmp.h>
10290 int main() {
10291 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10292 ; return 0; }
10293 EOF
10294 if { (eval echo configure:10295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10295   rm -rf conftest*
10296   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10297 else
10298   echo "configure: failed program was:" >&5
10299   cat conftest.$ac_ext >&5
10300   rm -rf conftest*
10301   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10302 fi
10303 rm -f conftest*
10304 fi
10305
10306 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10307   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10308       cat >> confdefs.h <<\EOF
10309 #define PUTUTLINE_RETURNS_UTMP 1
10310 EOF
10311
10312   fi
10313 fi
10314
10315 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10316 echo "configure:10317: checking for ut_syslen in utmpx" >&5
10317 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10318   echo $ac_n "(cached) $ac_c" 1>&6
10319 else
10320   
10321 cat > conftest.$ac_ext <<EOF
10322 #line 10323 "configure"
10323 #include "confdefs.h"
10324 #include <sys/types.h>
10325 #include <utmpx.h>
10326 int main() {
10327 struct utmpx ux;  ux.ut_syslen = 0;
10328 ; return 0; }
10329 EOF
10330 if { (eval echo configure:10331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10331   rm -rf conftest*
10332   samba_cv_HAVE_UX_UT_SYSLEN=yes
10333 else
10334   echo "configure: failed program was:" >&5
10335   cat conftest.$ac_ext >&5
10336   rm -rf conftest*
10337   samba_cv_HAVE_UX_UT_SYSLEN=no
10338 fi
10339 rm -f conftest*
10340 fi
10341
10342 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10343 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10344     cat >> confdefs.h <<\EOF
10345 #define HAVE_UX_UT_SYSLEN 1
10346 EOF
10347
10348 fi 
10349
10350
10351 #################################################
10352 # check for libiconv support
10353 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10354 echo "configure:10355: checking whether to use libiconv" >&5
10355 # Check whether --with-libiconv or --without-libiconv was given.
10356 if test "${with_libiconv+set}" = set; then
10357   withval="$with_libiconv"
10358    case "$withval" in
10359   no)
10360     echo "$ac_t""no" 1>&6
10361     ;;
10362   *)
10363     echo "$ac_t""yes" 1>&6
10364     CFLAGS="$CFLAGS -I$withval/include"
10365     LDFLAGS="$LDFLAGS -L$withval/lib"
10366     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10367 echo "configure:10368: checking for iconv_open in -liconv" >&5
10368 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10369 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10370   echo $ac_n "(cached) $ac_c" 1>&6
10371 else
10372   ac_save_LIBS="$LIBS"
10373 LIBS="-liconv  $LIBS"
10374 cat > conftest.$ac_ext <<EOF
10375 #line 10376 "configure"
10376 #include "confdefs.h"
10377 /* Override any gcc2 internal prototype to avoid an error.  */
10378 /* We use char because int might match the return type of a gcc2
10379     builtin and then its argument prototype would still apply.  */
10380 char iconv_open();
10381
10382 int main() {
10383 iconv_open()
10384 ; return 0; }
10385 EOF
10386 if { (eval echo configure:10387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10387   rm -rf conftest*
10388   eval "ac_cv_lib_$ac_lib_var=yes"
10389 else
10390   echo "configure: failed program was:" >&5
10391   cat conftest.$ac_ext >&5
10392   rm -rf conftest*
10393   eval "ac_cv_lib_$ac_lib_var=no"
10394 fi
10395 rm -f conftest*
10396 LIBS="$ac_save_LIBS"
10397
10398 fi
10399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10400   echo "$ac_t""yes" 1>&6
10401     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10402     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10403   cat >> confdefs.h <<EOF
10404 #define $ac_tr_lib 1
10405 EOF
10406
10407   LIBS="-liconv $LIBS"
10408
10409 else
10410   echo "$ac_t""no" 1>&6
10411 fi
10412
10413     cat >> confdefs.h <<EOF
10414 #define WITH_LIBICONV "${withval}"
10415 EOF
10416
10417     ;;
10418   esac 
10419 else
10420   echo "$ac_t""no" 1>&6
10421
10422 fi
10423
10424
10425
10426 ############
10427 # check for iconv in libc
10428 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10429 echo "configure:10430: checking for working iconv" >&5
10430 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10431   echo $ac_n "(cached) $ac_c" 1>&6
10432 else
10433   
10434 if test "$cross_compiling" = yes; then
10435   samba_cv_HAVE_NATIVE_ICONV=cross
10436 else
10437   cat > conftest.$ac_ext <<EOF
10438 #line 10439 "configure"
10439 #include "confdefs.h"
10440
10441 #include <iconv.h>
10442 main() {
10443        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10444        if (cd == 0 || cd == (iconv_t)-1) return -1;
10445        return 0;
10446 }
10447
10448 EOF
10449 if { (eval echo configure:10450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10450 then
10451   samba_cv_HAVE_NATIVE_ICONV=yes
10452 else
10453   echo "configure: failed program was:" >&5
10454   cat conftest.$ac_ext >&5
10455   rm -fr conftest*
10456   samba_cv_HAVE_NATIVE_ICONV=no
10457 fi
10458 rm -fr conftest*
10459 fi
10460
10461 fi
10462
10463 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10464 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10465     cat >> confdefs.h <<\EOF
10466 #define HAVE_NATIVE_ICONV 1
10467 EOF
10468
10469 fi
10470
10471
10472 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10473 echo "configure:10474: checking for Linux kernel oplocks" >&5
10474 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10475   echo $ac_n "(cached) $ac_c" 1>&6
10476 else
10477   
10478 if test "$cross_compiling" = yes; then
10479   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10480 else
10481   cat > conftest.$ac_ext <<EOF
10482 #line 10483 "configure"
10483 #include "confdefs.h"
10484
10485 #include <sys/types.h>
10486 #include <fcntl.h>
10487 #ifndef F_GETLEASE
10488 #define F_GETLEASE      1025
10489 #endif
10490 main() {
10491        int fd = open("/dev/null", O_RDONLY);
10492        return fcntl(fd, F_GETLEASE, 0) == -1;
10493 }
10494
10495 EOF
10496 if { (eval echo configure:10497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10497 then
10498   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10499 else
10500   echo "configure: failed program was:" >&5
10501   cat conftest.$ac_ext >&5
10502   rm -fr conftest*
10503   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10504 fi
10505 rm -fr conftest*
10506 fi
10507
10508 fi
10509
10510 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10511 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10512     cat >> confdefs.h <<\EOF
10513 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10514 EOF
10515
10516 fi
10517
10518 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10519 echo "configure:10520: checking for kernel change notify support" >&5
10520 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10521   echo $ac_n "(cached) $ac_c" 1>&6
10522 else
10523   
10524 if test "$cross_compiling" = yes; then
10525   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10526 else
10527   cat > conftest.$ac_ext <<EOF
10528 #line 10529 "configure"
10529 #include "confdefs.h"
10530
10531 #include <sys/types.h>
10532 #include <fcntl.h>
10533 #include <signal.h>
10534 #ifndef F_NOTIFY
10535 #define F_NOTIFY 1026
10536 #endif
10537 main() {
10538         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10539 }
10540
10541 EOF
10542 if { (eval echo configure:10543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10543 then
10544   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10545 else
10546   echo "configure: failed program was:" >&5
10547   cat conftest.$ac_ext >&5
10548   rm -fr conftest*
10549   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10550 fi
10551 rm -fr conftest*
10552 fi
10553
10554 fi
10555
10556 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10557 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10558     cat >> confdefs.h <<\EOF
10559 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10560 EOF
10561
10562 fi
10563
10564 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10565 echo "configure:10566: checking for kernel share modes" >&5
10566 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10567   echo $ac_n "(cached) $ac_c" 1>&6
10568 else
10569   
10570 if test "$cross_compiling" = yes; then
10571   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10572 else
10573   cat > conftest.$ac_ext <<EOF
10574 #line 10575 "configure"
10575 #include "confdefs.h"
10576
10577 #include <sys/types.h>
10578 #include <fcntl.h>
10579 #include <signal.h>
10580 #include <sys/file.h>
10581 #ifndef LOCK_MAND
10582 #define LOCK_MAND       32
10583 #define LOCK_READ       64
10584 #endif
10585 main() {
10586         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10587 }
10588
10589 EOF
10590 if { (eval echo configure:10591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10591 then
10592   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10593 else
10594   echo "configure: failed program was:" >&5
10595   cat conftest.$ac_ext >&5
10596   rm -fr conftest*
10597   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10598 fi
10599 rm -fr conftest*
10600 fi
10601
10602 fi
10603
10604 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10605 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10606     cat >> confdefs.h <<\EOF
10607 #define HAVE_KERNEL_SHARE_MODES 1
10608 EOF
10609
10610 fi
10611
10612
10613
10614
10615 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10616 echo "configure:10617: checking for IRIX kernel oplock type definitions" >&5
10617 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10618   echo $ac_n "(cached) $ac_c" 1>&6
10619 else
10620   
10621 cat > conftest.$ac_ext <<EOF
10622 #line 10623 "configure"
10623 #include "confdefs.h"
10624 #include <sys/types.h>
10625 #include <fcntl.h>
10626 int main() {
10627 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10628 ; return 0; }
10629 EOF
10630 if { (eval echo configure:10631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10631   rm -rf conftest*
10632   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10633 else
10634   echo "configure: failed program was:" >&5
10635   cat conftest.$ac_ext >&5
10636   rm -rf conftest*
10637   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10638 fi
10639 rm -f conftest*
10640 fi
10641
10642 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10643 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10644     cat >> confdefs.h <<\EOF
10645 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10646 EOF
10647
10648 fi
10649
10650 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10651 echo "configure:10652: checking for irix specific capabilities" >&5
10652 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10653   echo $ac_n "(cached) $ac_c" 1>&6
10654 else
10655   
10656 if test "$cross_compiling" = yes; then
10657   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10658 else
10659   cat > conftest.$ac_ext <<EOF
10660 #line 10661 "configure"
10661 #include "confdefs.h"
10662 #include <sys/types.h>
10663 #include <sys/capability.h>
10664 main() {
10665  cap_t cap;
10666  if ((cap = cap_get_proc()) == NULL)
10667    exit(1);
10668  cap->cap_effective |= CAP_NETWORK_MGT;
10669  cap->cap_inheritable |= CAP_NETWORK_MGT;
10670  cap_set_proc(cap);
10671  exit(0);
10672 }
10673
10674 EOF
10675 if { (eval echo configure:10676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10676 then
10677   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10678 else
10679   echo "configure: failed program was:" >&5
10680   cat conftest.$ac_ext >&5
10681   rm -fr conftest*
10682   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10683 fi
10684 rm -fr conftest*
10685 fi
10686
10687 fi
10688
10689 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10690 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10691     cat >> confdefs.h <<\EOF
10692 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10693 EOF
10694
10695 fi
10696
10697 #
10698 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10699 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10700 #
10701
10702 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10703 echo "configure:10704: checking for int16 typedef included by rpc/rpc.h" >&5
10704 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10705   echo $ac_n "(cached) $ac_c" 1>&6
10706 else
10707   
10708 cat > conftest.$ac_ext <<EOF
10709 #line 10710 "configure"
10710 #include "confdefs.h"
10711 #include <sys/types.h>
10712 #if defined(HAVE_RPC_RPC_H)
10713 #include <rpc/rpc.h>
10714 #endif
10715 int main() {
10716 int16 testvar;
10717 ; return 0; }
10718 EOF
10719 if { (eval echo configure:10720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10720   rm -rf conftest*
10721   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10722 else
10723   echo "configure: failed program was:" >&5
10724   cat conftest.$ac_ext >&5
10725   rm -rf conftest*
10726   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10727 fi
10728 rm -f conftest*
10729 fi
10730
10731 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10732 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10733     cat >> confdefs.h <<\EOF
10734 #define HAVE_INT16_FROM_RPC_RPC_H 1
10735 EOF
10736
10737 fi
10738
10739 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10740 echo "configure:10741: checking for uint16 typedef included by rpc/rpc.h" >&5
10741 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10742   echo $ac_n "(cached) $ac_c" 1>&6
10743 else
10744   
10745 cat > conftest.$ac_ext <<EOF
10746 #line 10747 "configure"
10747 #include "confdefs.h"
10748 #include <sys/types.h>
10749 #if defined(HAVE_RPC_RPC_H)
10750 #include <rpc/rpc.h>
10751 #endif
10752 int main() {
10753 uint16 testvar;
10754 ; return 0; }
10755 EOF
10756 if { (eval echo configure:10757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10757   rm -rf conftest*
10758   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10759 else
10760   echo "configure: failed program was:" >&5
10761   cat conftest.$ac_ext >&5
10762   rm -rf conftest*
10763   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10764 fi
10765 rm -f conftest*
10766 fi
10767
10768 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10769 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10770     cat >> confdefs.h <<\EOF
10771 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10772 EOF
10773
10774 fi
10775
10776 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10777 echo "configure:10778: checking for int32 typedef included by rpc/rpc.h" >&5
10778 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10779   echo $ac_n "(cached) $ac_c" 1>&6
10780 else
10781   
10782 cat > conftest.$ac_ext <<EOF
10783 #line 10784 "configure"
10784 #include "confdefs.h"
10785 #include <sys/types.h>
10786 #if defined(HAVE_RPC_RPC_H)
10787 #include <rpc/rpc.h>
10788 #endif
10789 int main() {
10790 int32 testvar;
10791 ; return 0; }
10792 EOF
10793 if { (eval echo configure:10794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10794   rm -rf conftest*
10795   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10796 else
10797   echo "configure: failed program was:" >&5
10798   cat conftest.$ac_ext >&5
10799   rm -rf conftest*
10800   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10801 fi
10802 rm -f conftest*
10803 fi
10804
10805 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10806 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10807     cat >> confdefs.h <<\EOF
10808 #define HAVE_INT32_FROM_RPC_RPC_H 1
10809 EOF
10810
10811 fi
10812
10813 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10814 echo "configure:10815: checking for uint32 typedef included by rpc/rpc.h" >&5
10815 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10816   echo $ac_n "(cached) $ac_c" 1>&6
10817 else
10818   
10819 cat > conftest.$ac_ext <<EOF
10820 #line 10821 "configure"
10821 #include "confdefs.h"
10822 #include <sys/types.h>
10823 #if defined(HAVE_RPC_RPC_H)
10824 #include <rpc/rpc.h>
10825 #endif
10826 int main() {
10827 uint32 testvar;
10828 ; return 0; }
10829 EOF
10830 if { (eval echo configure:10831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10831   rm -rf conftest*
10832   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10833 else
10834   echo "configure: failed program was:" >&5
10835   cat conftest.$ac_ext >&5
10836   rm -rf conftest*
10837   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10838 fi
10839 rm -f conftest*
10840 fi
10841
10842 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10843 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10844     cat >> confdefs.h <<\EOF
10845 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10846 EOF
10847
10848 fi
10849
10850
10851 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10852 echo "configure:10853: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10853 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10854   echo $ac_n "(cached) $ac_c" 1>&6
10855 else
10856   
10857 cat > conftest.$ac_ext <<EOF
10858 #line 10859 "configure"
10859 #include "confdefs.h"
10860 #include <sys/types.h>
10861 #ifdef HAVE_SYS_SECURITY_H
10862 #include <sys/security.h>
10863 #include <prot.h>
10864 #endif  /* HAVE_SYS_SECURITY_H */
10865 #if defined(HAVE_RPC_RPC_H)
10866 #include <rpc/rpc.h>
10867 #endif
10868 int main() {
10869 int testvar;
10870 ; return 0; }
10871 EOF
10872 if { (eval echo configure:10873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10873   rm -rf conftest*
10874   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10875 else
10876   echo "configure: failed program was:" >&5
10877   cat conftest.$ac_ext >&5
10878   rm -rf conftest*
10879   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10880 fi
10881 rm -f conftest*
10882 fi
10883
10884 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10885 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10886     cat >> confdefs.h <<\EOF
10887 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10888 EOF
10889
10890 fi
10891
10892 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10893 echo "configure:10894: checking for test routines" >&5
10894 if test "$cross_compiling" = yes; then
10895   echo "configure: warning: cannot run when cross-compiling" 1>&2
10896 else
10897   cat > conftest.$ac_ext <<EOF
10898 #line 10899 "configure"
10899 #include "confdefs.h"
10900 #include "${srcdir-.}/tests/trivial.c"
10901 EOF
10902 if { (eval echo configure:10903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10903 then
10904   echo "$ac_t""yes" 1>&6
10905 else
10906   echo "configure: failed program was:" >&5
10907   cat conftest.$ac_ext >&5
10908   rm -fr conftest*
10909   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10910 fi
10911 rm -fr conftest*
10912 fi
10913
10914
10915 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10916 echo "configure:10917: checking for ftruncate extend" >&5
10917 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10918   echo $ac_n "(cached) $ac_c" 1>&6
10919 else
10920   
10921 if test "$cross_compiling" = yes; then
10922   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10923 else
10924   cat > conftest.$ac_ext <<EOF
10925 #line 10926 "configure"
10926 #include "confdefs.h"
10927 #include "${srcdir-.}/tests/ftruncate.c"
10928 EOF
10929 if { (eval echo configure:10930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10930 then
10931   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10932 else
10933   echo "configure: failed program was:" >&5
10934   cat conftest.$ac_ext >&5
10935   rm -fr conftest*
10936   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10937 fi
10938 rm -fr conftest*
10939 fi
10940
10941 fi
10942
10943 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10944 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10945     cat >> confdefs.h <<\EOF
10946 #define HAVE_FTRUNCATE_EXTEND 1
10947 EOF
10948
10949 fi
10950
10951 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10952 echo "configure:10953: checking for AF_LOCAL socket support" >&5
10953 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10954   echo $ac_n "(cached) $ac_c" 1>&6
10955 else
10956   
10957 if test "$cross_compiling" = yes; then
10958   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10959 else
10960   cat > conftest.$ac_ext <<EOF
10961 #line 10962 "configure"
10962 #include "confdefs.h"
10963 #include "${srcdir-.}/tests/unixsock.c"
10964 EOF
10965 if { (eval echo configure:10966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10966 then
10967   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10968 else
10969   echo "configure: failed program was:" >&5
10970   cat conftest.$ac_ext >&5
10971   rm -fr conftest*
10972   samba_cv_HAVE_WORKING_AF_LOCAL=no
10973 fi
10974 rm -fr conftest*
10975 fi
10976
10977 fi
10978
10979 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10980 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10981 then
10982     cat >> confdefs.h <<\EOF
10983 #define HAVE_WORKING_AF_LOCAL 1
10984 EOF
10985
10986 fi
10987
10988 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10989 echo "configure:10990: checking for broken getgroups" >&5
10990 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10991   echo $ac_n "(cached) $ac_c" 1>&6
10992 else
10993   
10994 if test "$cross_compiling" = yes; then
10995   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10996 else
10997   cat > conftest.$ac_ext <<EOF
10998 #line 10999 "configure"
10999 #include "confdefs.h"
11000 #include "${srcdir-.}/tests/getgroups.c"
11001 EOF
11002 if { (eval echo configure:11003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11003 then
11004   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11005 else
11006   echo "configure: failed program was:" >&5
11007   cat conftest.$ac_ext >&5
11008   rm -fr conftest*
11009   samba_cv_HAVE_BROKEN_GETGROUPS=no
11010 fi
11011 rm -fr conftest*
11012 fi
11013
11014 fi
11015
11016 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11017 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11018     cat >> confdefs.h <<\EOF
11019 #define HAVE_BROKEN_GETGROUPS 1
11020 EOF
11021
11022 fi
11023
11024 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11025 echo "configure:11026: checking whether getpass should be replaced" >&5
11026 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11027   echo $ac_n "(cached) $ac_c" 1>&6
11028 else
11029   
11030 SAVE_CPPFLAGS="$CPPFLAGS"
11031 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt  -I${srcdir-.}/smbwrapper"
11032 cat > conftest.$ac_ext <<EOF
11033 #line 11034 "configure"
11034 #include "confdefs.h"
11035
11036 #define REPLACE_GETPASS 1
11037 #define NO_CONFIG_H 1
11038 #define main dont_declare_main
11039 #include "${srcdir-.}/lib/getsmbpass.c"
11040 #undef main
11041
11042 int main() {
11043
11044 ; return 0; }
11045 EOF
11046 if { (eval echo configure:11047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11047   rm -rf conftest*
11048   samba_cv_REPLACE_GETPASS=yes
11049 else
11050   echo "configure: failed program was:" >&5
11051   cat conftest.$ac_ext >&5
11052   rm -rf conftest*
11053   samba_cv_REPLACE_GETPASS=no
11054 fi
11055 rm -f conftest*
11056 CPPFLAGS="$SAVE_CPPFLAGS"
11057
11058 fi
11059
11060 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11061 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11062         cat >> confdefs.h <<\EOF
11063 #define REPLACE_GETPASS 1
11064 EOF
11065
11066 fi
11067
11068 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11069 echo "configure:11070: checking for broken inet_ntoa" >&5
11070 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11071   echo $ac_n "(cached) $ac_c" 1>&6
11072 else
11073   
11074 if test "$cross_compiling" = yes; then
11075   samba_cv_REPLACE_INET_NTOA=cross
11076 else
11077   cat > conftest.$ac_ext <<EOF
11078 #line 11079 "configure"
11079 #include "confdefs.h"
11080
11081 #include <stdio.h>
11082 #include <sys/types.h>
11083 #include <netinet/in.h>
11084 #ifdef HAVE_ARPA_INET_H
11085 #include <arpa/inet.h>
11086 #endif
11087 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11088 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11089     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11090 exit(1);}
11091 EOF
11092 if { (eval echo configure:11093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11093 then
11094   samba_cv_REPLACE_INET_NTOA=yes
11095 else
11096   echo "configure: failed program was:" >&5
11097   cat conftest.$ac_ext >&5
11098   rm -fr conftest*
11099   samba_cv_REPLACE_INET_NTOA=no
11100 fi
11101 rm -fr conftest*
11102 fi
11103
11104 fi
11105
11106 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11107 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11108     cat >> confdefs.h <<\EOF
11109 #define REPLACE_INET_NTOA 1
11110 EOF
11111
11112 fi
11113
11114 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11115 echo "configure:11116: checking for secure mkstemp" >&5
11116 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11117   echo $ac_n "(cached) $ac_c" 1>&6
11118 else
11119   
11120 if test "$cross_compiling" = yes; then
11121   samba_cv_HAVE_SECURE_MKSTEMP=cross
11122 else
11123   cat > conftest.$ac_ext <<EOF
11124 #line 11125 "configure"
11125 #include "confdefs.h"
11126 #include <stdlib.h>
11127 #include <sys/types.h>
11128 #include <sys/stat.h>
11129 #include <unistd.h>
11130 main() { 
11131   struct stat st;
11132   char tpl[20]="/tmp/test.XXXXXX"; 
11133   int fd = mkstemp(tpl); 
11134   if (fd == -1) exit(1);
11135   unlink(tpl);
11136   if (fstat(fd, &st) != 0) exit(1);
11137   if ((st.st_mode & 0777) != 0600) exit(1);
11138   exit(0);
11139 }
11140 EOF
11141 if { (eval echo configure:11142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11142 then
11143   samba_cv_HAVE_SECURE_MKSTEMP=yes
11144 else
11145   echo "configure: failed program was:" >&5
11146   cat conftest.$ac_ext >&5
11147   rm -fr conftest*
11148   samba_cv_HAVE_SECURE_MKSTEMP=no
11149 fi
11150 rm -fr conftest*
11151 fi
11152
11153 fi
11154
11155 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11156 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11157     cat >> confdefs.h <<\EOF
11158 #define HAVE_SECURE_MKSTEMP 1
11159 EOF
11160
11161 fi
11162
11163 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11164 echo "configure:11165: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11165 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11166   echo $ac_n "(cached) $ac_c" 1>&6
11167 else
11168   
11169 if test "$cross_compiling" = yes; then
11170   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11171 else
11172   cat > conftest.$ac_ext <<EOF
11173 #line 11174 "configure"
11174 #include "confdefs.h"
11175 #include <unistd.h>
11176 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11177 EOF
11178 if { (eval echo configure:11179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11179 then
11180   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11181 else
11182   echo "configure: failed program was:" >&5
11183   cat conftest.$ac_ext >&5
11184   rm -fr conftest*
11185   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11186 fi
11187 rm -fr conftest*
11188 fi
11189
11190 fi
11191
11192 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11193 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11194     cat >> confdefs.h <<\EOF
11195 #define SYSCONF_SC_NGROUPS_MAX 1
11196 EOF
11197
11198 fi
11199
11200 echo $ac_n "checking for root""... $ac_c" 1>&6
11201 echo "configure:11202: checking for root" >&5
11202 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11203   echo $ac_n "(cached) $ac_c" 1>&6
11204 else
11205   
11206 if test "$cross_compiling" = yes; then
11207   samba_cv_HAVE_ROOT=cross
11208 else
11209   cat > conftest.$ac_ext <<EOF
11210 #line 11211 "configure"
11211 #include "confdefs.h"
11212 main() { exit(getuid() != 0); }
11213 EOF
11214 if { (eval echo configure:11215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11215 then
11216   samba_cv_HAVE_ROOT=yes
11217 else
11218   echo "configure: failed program was:" >&5
11219   cat conftest.$ac_ext >&5
11220   rm -fr conftest*
11221   samba_cv_HAVE_ROOT=no
11222 fi
11223 rm -fr conftest*
11224 fi
11225
11226 fi
11227
11228 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11229 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11230     cat >> confdefs.h <<\EOF
11231 #define HAVE_ROOT 1
11232 EOF
11233
11234 else
11235     echo "configure: warning: running as non-root will disable some tests" 1>&2
11236 fi
11237
11238 ##################
11239 # look for a method of finding the list of network interfaces
11240 iface=no;
11241 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11242 echo "configure:11243: checking for iface AIX" >&5
11243 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11244   echo $ac_n "(cached) $ac_c" 1>&6
11245 else
11246   
11247 if test "$cross_compiling" = yes; then
11248   samba_cv_HAVE_IFACE_AIX=cross
11249 else
11250   cat > conftest.$ac_ext <<EOF
11251 #line 11252 "configure"
11252 #include "confdefs.h"
11253
11254 #define HAVE_IFACE_AIX 1
11255 #define AUTOCONF_TEST 1
11256 #include "confdefs.h"
11257 #include "${srcdir-.}/lib/interfaces.c"
11258 EOF
11259 if { (eval echo configure:11260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11260 then
11261   samba_cv_HAVE_IFACE_AIX=yes
11262 else
11263   echo "configure: failed program was:" >&5
11264   cat conftest.$ac_ext >&5
11265   rm -fr conftest*
11266   samba_cv_HAVE_IFACE_AIX=no
11267 fi
11268 rm -fr conftest*
11269 fi
11270
11271 fi
11272
11273 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11274 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11275     iface=yes;cat >> confdefs.h <<\EOF
11276 #define HAVE_IFACE_AIX 1
11277 EOF
11278
11279 fi
11280
11281 if test $iface = no; then
11282 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11283 echo "configure:11284: checking for iface ifconf" >&5
11284 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11285   echo $ac_n "(cached) $ac_c" 1>&6
11286 else
11287   
11288 if test "$cross_compiling" = yes; then
11289   samba_cv_HAVE_IFACE_IFCONF=cross
11290 else
11291   cat > conftest.$ac_ext <<EOF
11292 #line 11293 "configure"
11293 #include "confdefs.h"
11294
11295 #define HAVE_IFACE_IFCONF 1
11296 #define AUTOCONF_TEST 1
11297 #include "confdefs.h"
11298 #include "${srcdir-.}/lib/interfaces.c"
11299 EOF
11300 if { (eval echo configure:11301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11301 then
11302   samba_cv_HAVE_IFACE_IFCONF=yes
11303 else
11304   echo "configure: failed program was:" >&5
11305   cat conftest.$ac_ext >&5
11306   rm -fr conftest*
11307   samba_cv_HAVE_IFACE_IFCONF=no
11308 fi
11309 rm -fr conftest*
11310 fi
11311
11312 fi
11313
11314 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11315 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11316     iface=yes;cat >> confdefs.h <<\EOF
11317 #define HAVE_IFACE_IFCONF 1
11318 EOF
11319
11320 fi
11321 fi
11322
11323 if test $iface = no; then
11324 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11325 echo "configure:11326: checking for iface ifreq" >&5
11326 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11327   echo $ac_n "(cached) $ac_c" 1>&6
11328 else
11329   
11330 if test "$cross_compiling" = yes; then
11331   samba_cv_HAVE_IFACE_IFREQ=cross
11332 else
11333   cat > conftest.$ac_ext <<EOF
11334 #line 11335 "configure"
11335 #include "confdefs.h"
11336
11337 #define HAVE_IFACE_IFREQ 1
11338 #define AUTOCONF_TEST 1
11339 #include "confdefs.h"
11340 #include "${srcdir-.}/lib/interfaces.c"
11341 EOF
11342 if { (eval echo configure:11343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11343 then
11344   samba_cv_HAVE_IFACE_IFREQ=yes
11345 else
11346   echo "configure: failed program was:" >&5
11347   cat conftest.$ac_ext >&5
11348   rm -fr conftest*
11349   samba_cv_HAVE_IFACE_IFREQ=no
11350 fi
11351 rm -fr conftest*
11352 fi
11353
11354 fi
11355
11356 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11357 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11358     iface=yes;cat >> confdefs.h <<\EOF
11359 #define HAVE_IFACE_IFREQ 1
11360 EOF
11361
11362 fi
11363 fi
11364
11365
11366 ################################################
11367 # look for a method of setting the effective uid
11368 seteuid=no;
11369 if test $seteuid = no; then
11370 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11371 echo "configure:11372: checking for setresuid" >&5
11372 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11373   echo $ac_n "(cached) $ac_c" 1>&6
11374 else
11375   
11376 if test "$cross_compiling" = yes; then
11377   samba_cv_USE_SETRESUID=cross
11378 else
11379   cat > conftest.$ac_ext <<EOF
11380 #line 11381 "configure"
11381 #include "confdefs.h"
11382
11383 #define AUTOCONF_TEST 1
11384 #define USE_SETRESUID 1
11385 #include "confdefs.h"
11386 #include "${srcdir-.}/lib/util_sec.c"
11387 EOF
11388 if { (eval echo configure:11389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11389 then
11390   samba_cv_USE_SETRESUID=yes
11391 else
11392   echo "configure: failed program was:" >&5
11393   cat conftest.$ac_ext >&5
11394   rm -fr conftest*
11395   samba_cv_USE_SETRESUID=no
11396 fi
11397 rm -fr conftest*
11398 fi
11399
11400 fi
11401
11402 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11403 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11404     seteuid=yes;cat >> confdefs.h <<\EOF
11405 #define USE_SETRESUID 1
11406 EOF
11407
11408 fi
11409 fi
11410
11411
11412 if test $seteuid = no; then
11413 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11414 echo "configure:11415: checking for setreuid" >&5
11415 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11416   echo $ac_n "(cached) $ac_c" 1>&6
11417 else
11418   
11419 if test "$cross_compiling" = yes; then
11420   samba_cv_USE_SETREUID=cross
11421 else
11422   cat > conftest.$ac_ext <<EOF
11423 #line 11424 "configure"
11424 #include "confdefs.h"
11425
11426 #define AUTOCONF_TEST 1
11427 #define USE_SETREUID 1
11428 #include "confdefs.h"
11429 #include "${srcdir-.}/lib/util_sec.c"
11430 EOF
11431 if { (eval echo configure:11432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11432 then
11433   samba_cv_USE_SETREUID=yes
11434 else
11435   echo "configure: failed program was:" >&5
11436   cat conftest.$ac_ext >&5
11437   rm -fr conftest*
11438   samba_cv_USE_SETREUID=no
11439 fi
11440 rm -fr conftest*
11441 fi
11442
11443 fi
11444
11445 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11446 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11447     seteuid=yes;cat >> confdefs.h <<\EOF
11448 #define USE_SETREUID 1
11449 EOF
11450
11451 fi
11452 fi
11453
11454 if test $seteuid = no; then
11455 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11456 echo "configure:11457: checking for seteuid" >&5
11457 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11458   echo $ac_n "(cached) $ac_c" 1>&6
11459 else
11460   
11461 if test "$cross_compiling" = yes; then
11462   samba_cv_USE_SETEUID=cross
11463 else
11464   cat > conftest.$ac_ext <<EOF
11465 #line 11466 "configure"
11466 #include "confdefs.h"
11467
11468 #define AUTOCONF_TEST 1
11469 #define USE_SETEUID 1
11470 #include "confdefs.h"
11471 #include "${srcdir-.}/lib/util_sec.c"
11472 EOF
11473 if { (eval echo configure:11474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11474 then
11475   samba_cv_USE_SETEUID=yes
11476 else
11477   echo "configure: failed program was:" >&5
11478   cat conftest.$ac_ext >&5
11479   rm -fr conftest*
11480   samba_cv_USE_SETEUID=no
11481 fi
11482 rm -fr conftest*
11483 fi
11484
11485 fi
11486
11487 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11488 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11489     seteuid=yes;cat >> confdefs.h <<\EOF
11490 #define USE_SETEUID 1
11491 EOF
11492
11493 fi
11494 fi
11495
11496 if test $seteuid = no; then
11497 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11498 echo "configure:11499: checking for setuidx" >&5
11499 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11500   echo $ac_n "(cached) $ac_c" 1>&6
11501 else
11502   
11503 if test "$cross_compiling" = yes; then
11504   samba_cv_USE_SETUIDX=cross
11505 else
11506   cat > conftest.$ac_ext <<EOF
11507 #line 11508 "configure"
11508 #include "confdefs.h"
11509
11510 #define AUTOCONF_TEST 1
11511 #define USE_SETUIDX 1
11512 #include "confdefs.h"
11513 #include "${srcdir-.}/lib/util_sec.c"
11514 EOF
11515 if { (eval echo configure:11516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11516 then
11517   samba_cv_USE_SETUIDX=yes
11518 else
11519   echo "configure: failed program was:" >&5
11520   cat conftest.$ac_ext >&5
11521   rm -fr conftest*
11522   samba_cv_USE_SETUIDX=no
11523 fi
11524 rm -fr conftest*
11525 fi
11526
11527 fi
11528
11529 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11530 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11531     seteuid=yes;cat >> confdefs.h <<\EOF
11532 #define USE_SETUIDX 1
11533 EOF
11534
11535 fi
11536 fi
11537
11538
11539 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11540 echo "configure:11541: checking for working mmap" >&5
11541 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11542   echo $ac_n "(cached) $ac_c" 1>&6
11543 else
11544   
11545 if test "$cross_compiling" = yes; then
11546   samba_cv_HAVE_MMAP=cross
11547 else
11548   cat > conftest.$ac_ext <<EOF
11549 #line 11550 "configure"
11550 #include "confdefs.h"
11551 #include "${srcdir-.}/tests/shared_mmap.c"
11552 EOF
11553 if { (eval echo configure:11554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11554 then
11555   samba_cv_HAVE_MMAP=yes
11556 else
11557   echo "configure: failed program was:" >&5
11558   cat conftest.$ac_ext >&5
11559   rm -fr conftest*
11560   samba_cv_HAVE_MMAP=no
11561 fi
11562 rm -fr conftest*
11563 fi
11564
11565 fi
11566
11567 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11568 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11569     cat >> confdefs.h <<\EOF
11570 #define HAVE_MMAP 1
11571 EOF
11572
11573 fi
11574
11575 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11576 echo "configure:11577: checking for ftruncate needs root" >&5
11577 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11578   echo $ac_n "(cached) $ac_c" 1>&6
11579 else
11580   
11581 if test "$cross_compiling" = yes; then
11582   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11583 else
11584   cat > conftest.$ac_ext <<EOF
11585 #line 11586 "configure"
11586 #include "confdefs.h"
11587 #include "${srcdir-.}/tests/ftruncroot.c"
11588 EOF
11589 if { (eval echo configure:11590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11590 then
11591   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11592 else
11593   echo "configure: failed program was:" >&5
11594   cat conftest.$ac_ext >&5
11595   rm -fr conftest*
11596   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11597 fi
11598 rm -fr conftest*
11599 fi
11600
11601 fi
11602
11603 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11604 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11605     cat >> confdefs.h <<\EOF
11606 #define FTRUNCATE_NEEDS_ROOT 1
11607 EOF
11608
11609 fi
11610
11611 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11612 echo "configure:11613: checking for fcntl locking" >&5
11613 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11614   echo $ac_n "(cached) $ac_c" 1>&6
11615 else
11616   
11617 if test "$cross_compiling" = yes; then
11618   samba_cv_HAVE_FCNTL_LOCK=cross
11619 else
11620   cat > conftest.$ac_ext <<EOF
11621 #line 11622 "configure"
11622 #include "confdefs.h"
11623 #include "${srcdir-.}/tests/fcntl_lock.c"
11624 EOF
11625 if { (eval echo configure:11626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11626 then
11627   samba_cv_HAVE_FCNTL_LOCK=yes
11628 else
11629   echo "configure: failed program was:" >&5
11630   cat conftest.$ac_ext >&5
11631   rm -fr conftest*
11632   samba_cv_HAVE_FCNTL_LOCK=no
11633 fi
11634 rm -fr conftest*
11635 fi
11636
11637 fi
11638
11639 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11640 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11641     cat >> confdefs.h <<\EOF
11642 #define HAVE_FCNTL_LOCK 1
11643 EOF
11644
11645 fi
11646
11647 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11648 echo "configure:11649: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11649 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11650   echo $ac_n "(cached) $ac_c" 1>&6
11651 else
11652   
11653 if test "$cross_compiling" = yes; then
11654   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11655 else
11656   cat > conftest.$ac_ext <<EOF
11657 #line 11658 "configure"
11658 #include "confdefs.h"
11659 #include "${srcdir-.}/tests/fcntl_lock64.c"
11660 EOF
11661 if { (eval echo configure:11662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11662 then
11663   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11664 else
11665   echo "configure: failed program was:" >&5
11666   cat conftest.$ac_ext >&5
11667   rm -fr conftest*
11668   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11669 fi
11670 rm -fr conftest*
11671 fi
11672
11673 fi
11674
11675 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11676 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11677     cat >> confdefs.h <<\EOF
11678 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11679 EOF
11680
11681
11682 else
11683
11684
11685   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11686 echo "configure:11687: checking for 64 bit fcntl locking" >&5
11687 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11688   echo $ac_n "(cached) $ac_c" 1>&6
11689 else
11690   
11691   if test "$cross_compiling" = yes; then
11692   samba_cv_HAVE_STRUCT_FLOCK64=cross
11693 else
11694   cat > conftest.$ac_ext <<EOF
11695 #line 11696 "configure"
11696 #include "confdefs.h"
11697
11698 #if defined(HAVE_UNISTD_H)
11699 #include <unistd.h>
11700 #endif
11701 #include <stdio.h>
11702 #include <stdlib.h>
11703
11704 #ifdef HAVE_FCNTL_H
11705 #include <fcntl.h>
11706 #endif
11707
11708 #ifdef HAVE_SYS_FCNTL_H
11709 #include <sys/fcntl.h>
11710 #endif
11711 main() { struct flock64 fl64;
11712 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11713 exit(0);
11714 #else
11715 exit(1);
11716 #endif
11717 }
11718 EOF
11719 if { (eval echo configure:11720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11720 then
11721   samba_cv_HAVE_STRUCT_FLOCK64=yes
11722 else
11723   echo "configure: failed program was:" >&5
11724   cat conftest.$ac_ext >&5
11725   rm -fr conftest*
11726   samba_cv_HAVE_STRUCT_FLOCK64=no
11727 fi
11728 rm -fr conftest*
11729 fi
11730
11731 fi
11732
11733 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11734
11735   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11736       cat >> confdefs.h <<\EOF
11737 #define HAVE_STRUCT_FLOCK64 1
11738 EOF
11739
11740   fi
11741 fi
11742
11743 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11744 echo "configure:11745: checking for st_blocks in struct stat" >&5
11745 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11746   echo $ac_n "(cached) $ac_c" 1>&6
11747 else
11748   
11749 cat > conftest.$ac_ext <<EOF
11750 #line 11751 "configure"
11751 #include "confdefs.h"
11752 #include <sys/types.h>
11753 #include <sys/stat.h>
11754 #include <unistd.h>
11755 int main() {
11756 struct stat st;  st.st_blocks = 0;
11757 ; return 0; }
11758 EOF
11759 if { (eval echo configure:11760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11760   rm -rf conftest*
11761   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11762 else
11763   echo "configure: failed program was:" >&5
11764   cat conftest.$ac_ext >&5
11765   rm -rf conftest*
11766   samba_cv_HAVE_STAT_ST_BLOCKS=no
11767 fi
11768 rm -f conftest*
11769 fi
11770
11771 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11772 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11773     cat >> confdefs.h <<\EOF
11774 #define HAVE_STAT_ST_BLOCKS 1
11775 EOF
11776
11777 fi 
11778
11779 case "$host_os" in
11780 *linux*)
11781 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11782 echo "configure:11783: checking for broken RedHat 7.2 system header files" >&5
11783 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11784   echo $ac_n "(cached) $ac_c" 1>&6
11785 else
11786   
11787 cat > conftest.$ac_ext <<EOF
11788 #line 11789 "configure"
11789 #include "confdefs.h"
11790
11791 #ifdef HAVE_SYS_VFS_H
11792 #include <sys/vfs.h>
11793 #endif
11794 #ifdef HAVE_SYS_CAPABILITY_H
11795 #include <sys/capability.h>
11796 #endif
11797
11798 int main() {
11799 int i;
11800 ; return 0; }
11801 EOF
11802 if { (eval echo configure:11803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11803   rm -rf conftest*
11804   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11805 else
11806   echo "configure: failed program was:" >&5
11807   cat conftest.$ac_ext >&5
11808   rm -rf conftest*
11809   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11810 fi
11811 rm -f conftest*
11812 fi
11813
11814 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11815 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11816    cat >> confdefs.h <<\EOF
11817 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11818 EOF
11819
11820 fi
11821 ;;
11822 esac
11823
11824 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11825 echo "configure:11826: checking for broken nisplus include files" >&5
11826 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11827   echo $ac_n "(cached) $ac_c" 1>&6
11828 else
11829   
11830 cat > conftest.$ac_ext <<EOF
11831 #line 11832 "configure"
11832 #include "confdefs.h"
11833 #include <sys/acl.h>
11834 #if defined(HAVE_RPCSVC_NIS_H)
11835 #include <rpcsvc/nis.h>
11836 #endif
11837 int main() {
11838 int i;
11839 ; return 0; }
11840 EOF
11841 if { (eval echo configure:11842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11842   rm -rf conftest*
11843   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11844 else
11845   echo "configure: failed program was:" >&5
11846   cat conftest.$ac_ext >&5
11847   rm -rf conftest*
11848   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11849 fi
11850 rm -f conftest*
11851 fi
11852
11853 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11854 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11855     cat >> confdefs.h <<\EOF
11856 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11857 EOF
11858
11859 fi
11860
11861
11862 #################################################
11863 # check for smbwrapper support
11864 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11865 echo "configure:11866: checking whether to use smbwrapper" >&5
11866 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11867 if test "${with_smbwrapper+set}" = set; then
11868   withval="$with_smbwrapper"
11869    case "$withval" in
11870   yes)
11871     echo "$ac_t""yes" 1>&6
11872     cat >> confdefs.h <<\EOF
11873 #define WITH_SMBWRAPPER 1
11874 EOF
11875
11876         WRAPPROG="bin/smbsh"
11877         WRAP="bin/smbwrapper.$SHLIBEXT"
11878
11879         if test x$ATTEMPT_WRAP32_BUILD = x; then
11880                 WRAP32=""
11881         else
11882                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11883         fi
11884
11885 # Conditions under which smbwrapper should not be built.
11886
11887         if test x$PICFLAG = x; then
11888            echo No support for PIC code - disabling smbwrapper and smbsh
11889            WRAPPROG=""
11890            WRAP=""
11891            WRAP32=""
11892         elif test x$ac_cv_func_syscall = xno; then
11893            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11894            WRAPPROG=""
11895            WRAP=""
11896            WRAP32=""
11897         fi
11898     ;;
11899   *)
11900     echo "$ac_t""no" 1>&6
11901     ;;
11902   esac 
11903 else
11904   echo "$ac_t""no" 1>&6
11905
11906 fi
11907
11908
11909 #################################################
11910 # check for AFS clear-text auth support
11911 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11912 echo "configure:11913: checking whether to use AFS clear-text auth" >&5
11913 # Check whether --with-afs or --without-afs was given.
11914 if test "${with_afs+set}" = set; then
11915   withval="$with_afs"
11916    case "$withval" in
11917   yes)
11918     echo "$ac_t""yes" 1>&6
11919     cat >> confdefs.h <<\EOF
11920 #define WITH_AFS 1
11921 EOF
11922
11923     ;;
11924   *)
11925     echo "$ac_t""no" 1>&6
11926     ;;
11927   esac 
11928 else
11929   echo "$ac_t""no" 1>&6
11930
11931 fi
11932
11933
11934
11935 #################################################
11936 # check for the DFS clear-text auth system
11937 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11938 echo "configure:11939: checking whether to use DFS clear-text auth" >&5
11939 # Check whether --with-dfs or --without-dfs was given.
11940 if test "${with_dfs+set}" = set; then
11941   withval="$with_dfs"
11942    case "$withval" in
11943   yes)
11944     echo "$ac_t""yes" 1>&6
11945     cat >> confdefs.h <<\EOF
11946 #define WITH_DFS 1
11947 EOF
11948
11949     ;;
11950   *)
11951     echo "$ac_t""no" 1>&6
11952     ;;
11953   esac 
11954 else
11955   echo "$ac_t""no" 1>&6
11956
11957 fi
11958
11959
11960
11961 #################################################
11962 # see if this box has the RedHat location for kerberos
11963 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11964 echo "configure:11965: checking for /usr/kerberos" >&5
11965 if test -d /usr/kerberos; then
11966     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11967     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11968     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11969     echo "$ac_t""yes" 1>&6
11970 else
11971     echo "$ac_t""no" 1>&6
11972 fi
11973
11974 #################################################
11975 # check for location of Kerberos 5 install
11976 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11977 echo "configure:11978: checking for kerberos 5 install path" >&5
11978 # Check whether --with-krb5 or --without-krb5 was given.
11979 if test "${with_krb5+set}" = set; then
11980   withval="$with_krb5"
11981    case "$withval" in
11982   no)
11983     echo "$ac_t""no" 1>&6
11984     ;;
11985   *)
11986     echo "$ac_t""yes" 1>&6
11987     LIBS="$LIBS -lkrb5"
11988     CFLAGS="$CFLAGS -I$withval/include"
11989     CPPFLAGS="$CPPFLAGS -I$withval/include"
11990     LDFLAGS="$LDFLAGS -L$withval/lib"
11991     ;;
11992   esac 
11993 else
11994   echo "$ac_t""no" 1>&6
11995
11996 fi
11997
11998
11999 # now check for krb5.h. Some systems have the libraries without the headers!
12000 # note that this check is done here to allow for different kerberos
12001 # include paths
12002 for ac_hdr in krb5.h
12003 do
12004 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12005 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12006 echo "configure:12007: checking for $ac_hdr" >&5
12007 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12008   echo $ac_n "(cached) $ac_c" 1>&6
12009 else
12010   cat > conftest.$ac_ext <<EOF
12011 #line 12012 "configure"
12012 #include "confdefs.h"
12013 #include <$ac_hdr>
12014 EOF
12015 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12016 { (eval echo configure:12017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12017 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12018 if test -z "$ac_err"; then
12019   rm -rf conftest*
12020   eval "ac_cv_header_$ac_safe=yes"
12021 else
12022   echo "$ac_err" >&5
12023   echo "configure: failed program was:" >&5
12024   cat conftest.$ac_ext >&5
12025   rm -rf conftest*
12026   eval "ac_cv_header_$ac_safe=no"
12027 fi
12028 rm -f conftest*
12029 fi
12030 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12031   echo "$ac_t""yes" 1>&6
12032     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12033   cat >> confdefs.h <<EOF
12034 #define $ac_tr_hdr 1
12035 EOF
12036  
12037 else
12038   echo "$ac_t""no" 1>&6
12039 fi
12040 done
12041
12042
12043 # now check for gssapi headers.  This is also done here to allow for
12044 # different kerberos include paths
12045 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12046 do
12047 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12048 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12049 echo "configure:12050: checking for $ac_hdr" >&5
12050 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12051   echo $ac_n "(cached) $ac_c" 1>&6
12052 else
12053   cat > conftest.$ac_ext <<EOF
12054 #line 12055 "configure"
12055 #include "confdefs.h"
12056 #include <$ac_hdr>
12057 EOF
12058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12059 { (eval echo configure:12060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12061 if test -z "$ac_err"; then
12062   rm -rf conftest*
12063   eval "ac_cv_header_$ac_safe=yes"
12064 else
12065   echo "$ac_err" >&5
12066   echo "configure: failed program was:" >&5
12067   cat conftest.$ac_ext >&5
12068   rm -rf conftest*
12069   eval "ac_cv_header_$ac_safe=no"
12070 fi
12071 rm -f conftest*
12072 fi
12073 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12074   echo "$ac_t""yes" 1>&6
12075     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12076   cat >> confdefs.h <<EOF
12077 #define $ac_tr_hdr 1
12078 EOF
12079  
12080 else
12081   echo "$ac_t""no" 1>&6
12082 fi
12083 done
12084
12085
12086 ##################################################################
12087 # we might need the k5crypto and com_err libraries on some systems
12088 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12089 echo "configure:12090: checking for _et_list in -lcom_err" >&5
12090 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12091 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12092   echo $ac_n "(cached) $ac_c" 1>&6
12093 else
12094   ac_save_LIBS="$LIBS"
12095 LIBS="-lcom_err  $LIBS"
12096 cat > conftest.$ac_ext <<EOF
12097 #line 12098 "configure"
12098 #include "confdefs.h"
12099 /* Override any gcc2 internal prototype to avoid an error.  */
12100 /* We use char because int might match the return type of a gcc2
12101     builtin and then its argument prototype would still apply.  */
12102 char _et_list();
12103
12104 int main() {
12105 _et_list()
12106 ; return 0; }
12107 EOF
12108 if { (eval echo configure:12109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12109   rm -rf conftest*
12110   eval "ac_cv_lib_$ac_lib_var=yes"
12111 else
12112   echo "configure: failed program was:" >&5
12113   cat conftest.$ac_ext >&5
12114   rm -rf conftest*
12115   eval "ac_cv_lib_$ac_lib_var=no"
12116 fi
12117 rm -f conftest*
12118 LIBS="$ac_save_LIBS"
12119
12120 fi
12121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12122   echo "$ac_t""yes" 1>&6
12123   LIBS="$LIBS -lcom_err"
12124 else
12125   echo "$ac_t""no" 1>&6
12126 fi
12127
12128 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12129 echo "configure:12130: checking for krb5_encrypt_data in -lk5crypto" >&5
12130 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12131 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12132   echo $ac_n "(cached) $ac_c" 1>&6
12133 else
12134   ac_save_LIBS="$LIBS"
12135 LIBS="-lk5crypto  $LIBS"
12136 cat > conftest.$ac_ext <<EOF
12137 #line 12138 "configure"
12138 #include "confdefs.h"
12139 /* Override any gcc2 internal prototype to avoid an error.  */
12140 /* We use char because int might match the return type of a gcc2
12141     builtin and then its argument prototype would still apply.  */
12142 char krb5_encrypt_data();
12143
12144 int main() {
12145 krb5_encrypt_data()
12146 ; return 0; }
12147 EOF
12148 if { (eval echo configure:12149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12149   rm -rf conftest*
12150   eval "ac_cv_lib_$ac_lib_var=yes"
12151 else
12152   echo "configure: failed program was:" >&5
12153   cat conftest.$ac_ext >&5
12154   rm -rf conftest*
12155   eval "ac_cv_lib_$ac_lib_var=no"
12156 fi
12157 rm -f conftest*
12158 LIBS="$ac_save_LIBS"
12159
12160 fi
12161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12162   echo "$ac_t""yes" 1>&6
12163   LIBS="$LIBS -lk5crypto"
12164 else
12165   echo "$ac_t""no" 1>&6
12166 fi
12167
12168
12169 ########################################################
12170 # now see if we can find the krb5 libs in standard paths
12171 # or as specified above
12172 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12173 echo "configure:12174: checking for krb5_mk_req_extended in -lkrb5" >&5
12174 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12175 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12176   echo $ac_n "(cached) $ac_c" 1>&6
12177 else
12178   ac_save_LIBS="$LIBS"
12179 LIBS="-lkrb5  $LIBS"
12180 cat > conftest.$ac_ext <<EOF
12181 #line 12182 "configure"
12182 #include "confdefs.h"
12183 /* Override any gcc2 internal prototype to avoid an error.  */
12184 /* We use char because int might match the return type of a gcc2
12185     builtin and then its argument prototype would still apply.  */
12186 char krb5_mk_req_extended();
12187
12188 int main() {
12189 krb5_mk_req_extended()
12190 ; return 0; }
12191 EOF
12192 if { (eval echo configure:12193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12193   rm -rf conftest*
12194   eval "ac_cv_lib_$ac_lib_var=yes"
12195 else
12196   echo "configure: failed program was:" >&5
12197   cat conftest.$ac_ext >&5
12198   rm -rf conftest*
12199   eval "ac_cv_lib_$ac_lib_var=no"
12200 fi
12201 rm -f conftest*
12202 LIBS="$ac_save_LIBS"
12203
12204 fi
12205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12206   echo "$ac_t""yes" 1>&6
12207   LIBS="$LIBS -lkrb5";
12208         cat >> confdefs.h <<\EOF
12209 #define HAVE_KRB5 1
12210 EOF
12211
12212 else
12213   echo "$ac_t""no" 1>&6
12214 fi
12215
12216
12217 ########################################################
12218 # now see if we can find the gssapi libs in standard paths
12219 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12220 echo "configure:12221: checking for gss_display_status in -lgssapi_krb5" >&5
12221 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12222 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12223   echo $ac_n "(cached) $ac_c" 1>&6
12224 else
12225   ac_save_LIBS="$LIBS"
12226 LIBS="-lgssapi_krb5  $LIBS"
12227 cat > conftest.$ac_ext <<EOF
12228 #line 12229 "configure"
12229 #include "confdefs.h"
12230 /* Override any gcc2 internal prototype to avoid an error.  */
12231 /* We use char because int might match the return type of a gcc2
12232     builtin and then its argument prototype would still apply.  */
12233 char gss_display_status();
12234
12235 int main() {
12236 gss_display_status()
12237 ; return 0; }
12238 EOF
12239 if { (eval echo configure:12240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12240   rm -rf conftest*
12241   eval "ac_cv_lib_$ac_lib_var=yes"
12242 else
12243   echo "configure: failed program was:" >&5
12244   cat conftest.$ac_ext >&5
12245   rm -rf conftest*
12246   eval "ac_cv_lib_$ac_lib_var=no"
12247 fi
12248 rm -f conftest*
12249 LIBS="$ac_save_LIBS"
12250
12251 fi
12252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12253   echo "$ac_t""yes" 1>&6
12254   LIBS="$LIBS -lgssapi_krb5";
12255         cat >> confdefs.h <<\EOF
12256 #define HAVE_GSSAPI 1
12257 EOF
12258
12259 else
12260   echo "$ac_t""no" 1>&6
12261 fi
12262
12263
12264 ##################################################################
12265 # we might need the lber lib on some systems. To avoid link errors
12266 # this test must be before the libldap test
12267 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12268 echo "configure:12269: checking for ber_scanf in -llber" >&5
12269 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12270 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12271   echo $ac_n "(cached) $ac_c" 1>&6
12272 else
12273   ac_save_LIBS="$LIBS"
12274 LIBS="-llber  $LIBS"
12275 cat > conftest.$ac_ext <<EOF
12276 #line 12277 "configure"
12277 #include "confdefs.h"
12278 /* Override any gcc2 internal prototype to avoid an error.  */
12279 /* We use char because int might match the return type of a gcc2
12280     builtin and then its argument prototype would still apply.  */
12281 char ber_scanf();
12282
12283 int main() {
12284 ber_scanf()
12285 ; return 0; }
12286 EOF
12287 if { (eval echo configure:12288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12288   rm -rf conftest*
12289   eval "ac_cv_lib_$ac_lib_var=yes"
12290 else
12291   echo "configure: failed program was:" >&5
12292   cat conftest.$ac_ext >&5
12293   rm -rf conftest*
12294   eval "ac_cv_lib_$ac_lib_var=no"
12295 fi
12296 rm -f conftest*
12297 LIBS="$ac_save_LIBS"
12298
12299 fi
12300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12301   echo "$ac_t""yes" 1>&6
12302   LIBS="$LIBS -llber"
12303 else
12304   echo "$ac_t""no" 1>&6
12305 fi
12306
12307
12308 ########################################################
12309 # now see if we can find the ldap libs in standard paths
12310 if test x$have_ldap != xyes; then
12311 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12312 echo "configure:12313: checking for ldap_domain2hostlist in -lldap" >&5
12313 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12314 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12315   echo $ac_n "(cached) $ac_c" 1>&6
12316 else
12317   ac_save_LIBS="$LIBS"
12318 LIBS="-lldap  $LIBS"
12319 cat > conftest.$ac_ext <<EOF
12320 #line 12321 "configure"
12321 #include "confdefs.h"
12322 /* Override any gcc2 internal prototype to avoid an error.  */
12323 /* We use char because int might match the return type of a gcc2
12324     builtin and then its argument prototype would still apply.  */
12325 char ldap_domain2hostlist();
12326
12327 int main() {
12328 ldap_domain2hostlist()
12329 ; return 0; }
12330 EOF
12331 if { (eval echo configure:12332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12332   rm -rf conftest*
12333   eval "ac_cv_lib_$ac_lib_var=yes"
12334 else
12335   echo "configure: failed program was:" >&5
12336   cat conftest.$ac_ext >&5
12337   rm -rf conftest*
12338   eval "ac_cv_lib_$ac_lib_var=no"
12339 fi
12340 rm -f conftest*
12341 LIBS="$ac_save_LIBS"
12342
12343 fi
12344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12345   echo "$ac_t""yes" 1>&6
12346   LIBS="$LIBS -lldap";
12347         cat >> confdefs.h <<\EOF
12348 #define HAVE_LDAP 1
12349 EOF
12350
12351 else
12352   echo "$ac_t""no" 1>&6
12353 fi
12354
12355
12356         ########################################################
12357         # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
12358         # Check found in pam_ldap 145.
12359         for ac_func in ldap_set_rebind_proc
12360 do
12361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12362 echo "configure:12363: checking for $ac_func" >&5
12363 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12364   echo $ac_n "(cached) $ac_c" 1>&6
12365 else
12366   cat > conftest.$ac_ext <<EOF
12367 #line 12368 "configure"
12368 #include "confdefs.h"
12369 /* System header to define __stub macros and hopefully few prototypes,
12370     which can conflict with char $ac_func(); below.  */
12371 #include <assert.h>
12372 /* Override any gcc2 internal prototype to avoid an error.  */
12373 /* We use char because int might match the return type of a gcc2
12374     builtin and then its argument prototype would still apply.  */
12375 char $ac_func();
12376
12377 int main() {
12378
12379 /* The GNU C library defines this for functions which it implements
12380     to always fail with ENOSYS.  Some functions are actually named
12381     something starting with __ and the normal name is an alias.  */
12382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12383 choke me
12384 #else
12385 $ac_func();
12386 #endif
12387
12388 ; return 0; }
12389 EOF
12390 if { (eval echo configure:12391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12391   rm -rf conftest*
12392   eval "ac_cv_func_$ac_func=yes"
12393 else
12394   echo "configure: failed program was:" >&5
12395   cat conftest.$ac_ext >&5
12396   rm -rf conftest*
12397   eval "ac_cv_func_$ac_func=no"
12398 fi
12399 rm -f conftest*
12400 fi
12401
12402 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12403   echo "$ac_t""yes" 1>&6
12404     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12405   cat >> confdefs.h <<EOF
12406 #define $ac_tr_func 1
12407 EOF
12408  
12409 else
12410   echo "$ac_t""no" 1>&6
12411 fi
12412 done
12413
12414         echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6
12415 echo "configure:12416: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
12416 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then
12417   echo $ac_n "(cached) $ac_c" 1>&6
12418 else
12419   
12420         cat > conftest.$ac_ext <<EOF
12421 #line 12422 "configure"
12422 #include "confdefs.h"
12423
12424         #include <lber.h>
12425         #include <ldap.h>
12426 int main() {
12427 ldap_set_rebind_proc(0, 0, 0);
12428 ; return 0; }
12429 EOF
12430 if { (eval echo configure:12431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12431   rm -rf conftest*
12432   pam_ldap_cv_ldap_set_rebind_proc=3
12433 else
12434   echo "configure: failed program was:" >&5
12435   cat conftest.$ac_ext >&5
12436   rm -rf conftest*
12437   pam_ldap_cv_ldap_set_rebind_proc=2
12438 fi
12439 rm -f conftest* 
12440 fi
12441
12442 echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6
12443         cat >> confdefs.h <<EOF
12444 #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc
12445 EOF
12446
12447 fi
12448
12449 #################################################
12450 # check for automount support
12451 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12452 echo "configure:12453: checking whether to use AUTOMOUNT" >&5
12453 # Check whether --with-automount or --without-automount was given.
12454 if test "${with_automount+set}" = set; then
12455   withval="$with_automount"
12456    case "$withval" in
12457   yes)
12458     echo "$ac_t""yes" 1>&6
12459     cat >> confdefs.h <<\EOF
12460 #define WITH_AUTOMOUNT 1
12461 EOF
12462
12463     ;;
12464   *)
12465     echo "$ac_t""no" 1>&6
12466     ;;
12467   esac 
12468 else
12469   echo "$ac_t""no" 1>&6
12470
12471 fi
12472
12473
12474 #################################################
12475 # check for smbmount support
12476 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12477 echo "configure:12478: checking whether to use SMBMOUNT" >&5
12478 # Check whether --with-smbmount or --without-smbmount was given.
12479 if test "${with_smbmount+set}" = set; then
12480   withval="$with_smbmount"
12481    case "$withval" in
12482   yes)
12483         case "$host_os" in
12484         *linux*)
12485                 echo "$ac_t""yes" 1>&6
12486                 cat >> confdefs.h <<\EOF
12487 #define WITH_SMBMOUNT 1
12488 EOF
12489
12490                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12491                 ;;
12492         *)
12493                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12494                 ;;
12495         esac
12496     ;;
12497   *)
12498     echo "$ac_t""no" 1>&6
12499     MPROGS=
12500     ;;
12501   esac 
12502 else
12503   echo "$ac_t""no" 1>&6
12504   MPROGS=
12505
12506 fi
12507
12508
12509
12510 #################################################
12511 # check for a PAM clear-text auth, accounts, password and session support
12512 with_pam_for_crypt=no
12513 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12514 echo "configure:12515: checking whether to use PAM" >&5
12515 # Check whether --with-pam or --without-pam was given.
12516 if test "${with_pam+set}" = set; then
12517   withval="$with_pam"
12518    case "$withval" in
12519   yes)
12520     echo "$ac_t""yes" 1>&6
12521     cat >> confdefs.h <<\EOF
12522 #define WITH_PAM 1
12523 EOF
12524
12525     LIBS="$LIBS -lpam"
12526     with_pam_for_crypt=yes
12527     ;;
12528   *)
12529     echo "$ac_t""no" 1>&6
12530     ;;
12531   esac 
12532 else
12533   echo "$ac_t""no" 1>&6
12534
12535 fi
12536
12537
12538 # we can't build a pam module if we don't have pam.
12539 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12540 echo "configure:12541: checking for pam_get_data in -lpam" >&5
12541 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12542 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12543   echo $ac_n "(cached) $ac_c" 1>&6
12544 else
12545   ac_save_LIBS="$LIBS"
12546 LIBS="-lpam  $LIBS"
12547 cat > conftest.$ac_ext <<EOF
12548 #line 12549 "configure"
12549 #include "confdefs.h"
12550 /* Override any gcc2 internal prototype to avoid an error.  */
12551 /* We use char because int might match the return type of a gcc2
12552     builtin and then its argument prototype would still apply.  */
12553 char pam_get_data();
12554
12555 int main() {
12556 pam_get_data()
12557 ; return 0; }
12558 EOF
12559 if { (eval echo configure:12560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12560   rm -rf conftest*
12561   eval "ac_cv_lib_$ac_lib_var=yes"
12562 else
12563   echo "configure: failed program was:" >&5
12564   cat conftest.$ac_ext >&5
12565   rm -rf conftest*
12566   eval "ac_cv_lib_$ac_lib_var=no"
12567 fi
12568 rm -f conftest*
12569 LIBS="$ac_save_LIBS"
12570
12571 fi
12572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12573   echo "$ac_t""yes" 1>&6
12574   cat >> confdefs.h <<\EOF
12575 #define HAVE_LIBPAM 1
12576 EOF
12577
12578 else
12579   echo "$ac_t""no" 1>&6
12580 fi
12581
12582
12583 #################################################
12584 # check for pam_smbpass support
12585 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12586 echo "configure:12587: checking whether to use pam_smbpass" >&5
12587 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12588 if test "${with_pam_smbpass+set}" = set; then
12589   withval="$with_pam_smbpass"
12590    case "$withval" in
12591   yes)
12592     echo "$ac_t""yes" 1>&6
12593
12594 # Conditions under which pam_smbpass should not be built.
12595
12596        if test x$PICFLAG = x; then
12597           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12598           PAM_MOD=""
12599        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12600           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12601           PAM_MOD=""
12602        else
12603           PAM_MOD="bin/pam_smbpass.so"
12604        fi
12605     ;;
12606   *)
12607     echo "$ac_t""no" 1>&6
12608     ;;
12609   esac 
12610 else
12611   echo "$ac_t""no" 1>&6
12612
12613 fi
12614
12615
12616
12617 ###############################################
12618 # test for where we get crypt() from, but only
12619 # if not using PAM
12620 if test $with_pam_for_crypt = no; then
12621 for ac_func in crypt
12622 do
12623 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12624 echo "configure:12625: checking for $ac_func" >&5
12625 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12626   echo $ac_n "(cached) $ac_c" 1>&6
12627 else
12628   cat > conftest.$ac_ext <<EOF
12629 #line 12630 "configure"
12630 #include "confdefs.h"
12631 /* System header to define __stub macros and hopefully few prototypes,
12632     which can conflict with char $ac_func(); below.  */
12633 #include <assert.h>
12634 /* Override any gcc2 internal prototype to avoid an error.  */
12635 /* We use char because int might match the return type of a gcc2
12636     builtin and then its argument prototype would still apply.  */
12637 char $ac_func();
12638
12639 int main() {
12640
12641 /* The GNU C library defines this for functions which it implements
12642     to always fail with ENOSYS.  Some functions are actually named
12643     something starting with __ and the normal name is an alias.  */
12644 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12645 choke me
12646 #else
12647 $ac_func();
12648 #endif
12649
12650 ; return 0; }
12651 EOF
12652 if { (eval echo configure:12653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12653   rm -rf conftest*
12654   eval "ac_cv_func_$ac_func=yes"
12655 else
12656   echo "configure: failed program was:" >&5
12657   cat conftest.$ac_ext >&5
12658   rm -rf conftest*
12659   eval "ac_cv_func_$ac_func=no"
12660 fi
12661 rm -f conftest*
12662 fi
12663
12664 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12665   echo "$ac_t""yes" 1>&6
12666     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12667   cat >> confdefs.h <<EOF
12668 #define $ac_tr_func 1
12669 EOF
12670  
12671 else
12672   echo "$ac_t""no" 1>&6
12673 fi
12674 done
12675
12676 if test x"$ac_cv_func_crypt" = x"no"; then
12677     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12678 echo "configure:12679: checking for crypt in -lcrypt" >&5
12679 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12680 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12681   echo $ac_n "(cached) $ac_c" 1>&6
12682 else
12683   ac_save_LIBS="$LIBS"
12684 LIBS="-lcrypt  $LIBS"
12685 cat > conftest.$ac_ext <<EOF
12686 #line 12687 "configure"
12687 #include "confdefs.h"
12688 /* Override any gcc2 internal prototype to avoid an error.  */
12689 /* We use char because int might match the return type of a gcc2
12690     builtin and then its argument prototype would still apply.  */
12691 char crypt();
12692
12693 int main() {
12694 crypt()
12695 ; return 0; }
12696 EOF
12697 if { (eval echo configure:12698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12698   rm -rf conftest*
12699   eval "ac_cv_lib_$ac_lib_var=yes"
12700 else
12701   echo "configure: failed program was:" >&5
12702   cat conftest.$ac_ext >&5
12703   rm -rf conftest*
12704   eval "ac_cv_lib_$ac_lib_var=no"
12705 fi
12706 rm -f conftest*
12707 LIBS="$ac_save_LIBS"
12708
12709 fi
12710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12711   echo "$ac_t""yes" 1>&6
12712   SMBDLIBS="$SMBDLIBS -lcrypt";
12713         cat >> confdefs.h <<\EOF
12714 #define HAVE_CRYPT 1
12715 EOF
12716
12717 else
12718   echo "$ac_t""no" 1>&6
12719 fi
12720
12721 fi
12722 fi
12723
12724 ##
12725 ## moved after the check for -lcrypt in order to
12726 ## ensure that the necessary libraries are included
12727 ## check checking for truncated salt.  Wrapped by the
12728 ## $with_pam_for_crypt variable as above   --jerry
12729 ##
12730 if test $with_pam_for_crypt = no; then
12731 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12732 echo "configure:12733: checking for a crypt that needs truncated salt" >&5
12733 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12734   echo $ac_n "(cached) $ac_c" 1>&6
12735 else
12736   
12737 if test "$cross_compiling" = yes; then
12738   samba_cv_HAVE_TRUNCATED_SALT=cross
12739 else
12740   cat > conftest.$ac_ext <<EOF
12741 #line 12742 "configure"
12742 #include "confdefs.h"
12743 #include "${srcdir-.}/tests/crypttest.c"
12744 EOF
12745 if { (eval echo configure:12746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12746 then
12747   samba_cv_HAVE_TRUNCATED_SALT=no
12748 else
12749   echo "configure: failed program was:" >&5
12750   cat conftest.$ac_ext >&5
12751   rm -fr conftest*
12752   samba_cv_HAVE_TRUNCATED_SALT=yes
12753 fi
12754 rm -fr conftest*
12755 fi
12756
12757 fi
12758
12759 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12760 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12761         cat >> confdefs.h <<\EOF
12762 #define HAVE_TRUNCATED_SALT 1
12763 EOF
12764
12765 fi
12766 fi
12767
12768
12769
12770 ########################################################################################
12771 ##
12772 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12773 ##
12774 ########################################################################################
12775
12776 #################################################
12777 # check for a TDB password database
12778 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12779 echo "configure:12780: checking whether to use TDB SAM database" >&5
12780 # Check whether --with-tdbsam or --without-tdbsam was given.
12781 if test "${with_tdbsam+set}" = set; then
12782   withval="$with_tdbsam"
12783    case "$withval" in
12784   yes)
12785     echo "$ac_t""yes" 1>&6
12786     cat >> confdefs.h <<\EOF
12787 #define WITH_TDB_SAM 1
12788 EOF
12789
12790     ;;
12791   *)
12792     echo "$ac_t""no" 1>&6
12793     ;;
12794   esac 
12795 else
12796   echo "$ac_t""no" 1>&6
12797
12798 fi
12799
12800
12801 #################################################
12802 # check for a NISPLUS password database
12803 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12804 echo "configure:12805: checking whether to use NISPLUS SAM database" >&5
12805 # Check whether --with-nisplussam or --without-nisplussam was given.
12806 if test "${with_nisplussam+set}" = set; then
12807   withval="$with_nisplussam"
12808    case "$withval" in
12809   yes)
12810     echo "$ac_t""yes" 1>&6
12811     cat >> confdefs.h <<\EOF
12812 #define WITH_NISPLUS_SAM 1
12813 EOF
12814
12815     ;;
12816   *)
12817     echo "$ac_t""no" 1>&6
12818     ;;
12819   esac 
12820 else
12821   echo "$ac_t""no" 1>&6
12822
12823 fi
12824
12825
12826 ########################################################################################
12827 ##
12828 ## END OF TESTS FOR SAM BACKENDS.  
12829 ##
12830 ########################################################################################
12831
12832 #################################################
12833 # check for a NISPLUS_HOME support 
12834 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12835 echo "configure:12836: checking whether to use NISPLUS_HOME" >&5
12836 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12837 if test "${with_nisplus_home+set}" = set; then
12838   withval="$with_nisplus_home"
12839    case "$withval" in
12840   yes)
12841     echo "$ac_t""yes" 1>&6
12842     cat >> confdefs.h <<\EOF
12843 #define WITH_NISPLUS_HOME 1
12844 EOF
12845
12846     ;;
12847   *)
12848     echo "$ac_t""no" 1>&6
12849     ;;
12850   esac 
12851 else
12852   echo "$ac_t""no" 1>&6
12853
12854 fi
12855
12856
12857 #################################################
12858 # check for syslog logging
12859 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12860 echo "configure:12861: checking whether to use syslog logging" >&5
12861 # Check whether --with-syslog or --without-syslog was given.
12862 if test "${with_syslog+set}" = set; then
12863   withval="$with_syslog"
12864    case "$withval" in
12865   yes)
12866     echo "$ac_t""yes" 1>&6
12867     cat >> confdefs.h <<\EOF
12868 #define WITH_SYSLOG 1
12869 EOF
12870
12871     ;;
12872   *)
12873     echo "$ac_t""no" 1>&6
12874     ;;
12875   esac 
12876 else
12877   echo "$ac_t""no" 1>&6
12878
12879 fi
12880
12881
12882 #################################################
12883 # check for a shared memory profiling support
12884 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12885 echo "configure:12886: checking whether to use profiling" >&5
12886 # Check whether --with-profiling-data or --without-profiling-data was given.
12887 if test "${with_profiling_data+set}" = set; then
12888   withval="$with_profiling_data"
12889    case "$withval" in
12890   yes)
12891     echo "$ac_t""yes" 1>&6
12892     cat >> confdefs.h <<\EOF
12893 #define WITH_PROFILE 1
12894 EOF
12895
12896     ;;
12897   *)
12898     echo "$ac_t""no" 1>&6
12899     ;;
12900   esac 
12901 else
12902   echo "$ac_t""no" 1>&6
12903
12904 fi
12905
12906
12907
12908 #################################################
12909 # check for experimental disk-quotas support
12910 QUOTAOBJS=smbd/noquotas.o
12911
12912 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12913 echo "configure:12914: checking whether to support disk-quotas" >&5
12914 # Check whether --with-quotas or --without-quotas was given.
12915 if test "${with_quotas+set}" = set; then
12916   withval="$with_quotas"
12917    case "$withval" in
12918   yes)
12919     echo "$ac_t""yes" 1>&6
12920     case "$host_os" in
12921       *linux*)
12922         # Check for kernel 2.4.x quota braindamage...
12923         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12924 echo "configure:12925: checking for linux 2.4.x quota braindamage.." >&5
12925 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12926   echo $ac_n "(cached) $ac_c" 1>&6
12927 else
12928   
12929         cat > conftest.$ac_ext <<EOF
12930 #line 12931 "configure"
12931 #include "confdefs.h"
12932 #include <stdio.h>
12933 #include <sys/types.h>
12934 #include <asm/types.h>
12935 #include <linux/quota.h>
12936 #include <mntent.h>
12937 #include <linux/unistd.h>
12938 int main() {
12939 struct mem_dqblk D;
12940 ; return 0; }
12941 EOF
12942 if { (eval echo configure:12943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12943   rm -rf conftest*
12944   samba_cv_linux_2_4_quota_braindamage=yes
12945 else
12946   echo "configure: failed program was:" >&5
12947   cat conftest.$ac_ext >&5
12948   rm -rf conftest*
12949   samba_cv_linux_2_4_quota_braindamage=no
12950 fi
12951 rm -f conftest*
12952 fi
12953
12954 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12955 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12956         cat >> confdefs.h <<\EOF
12957 #define LINUX_QUOTAS_2 1
12958 EOF
12959
12960 else
12961         cat >> confdefs.h <<\EOF
12962 #define LINUX_QUOTAS_1 1
12963 EOF
12964
12965 fi
12966         ;;
12967       *)
12968         ;;
12969     esac
12970     QUOTAOBJS=smbd/quotas.o
12971     cat >> confdefs.h <<\EOF
12972 #define WITH_QUOTAS 1
12973 EOF
12974
12975     ;;
12976   *)
12977     echo "$ac_t""no" 1>&6
12978     ;;
12979   esac 
12980 else
12981   echo "$ac_t""no" 1>&6
12982
12983 fi
12984
12985
12986
12987 #################################################
12988 # check for experimental utmp accounting
12989
12990 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12991 echo "configure:12992: checking whether to support utmp accounting" >&5
12992 # Check whether --with-utmp or --without-utmp was given.
12993 if test "${with_utmp+set}" = set; then
12994   withval="$with_utmp"
12995    case "$withval" in
12996   yes)
12997     echo "$ac_t""yes" 1>&6
12998     cat >> confdefs.h <<\EOF
12999 #define WITH_UTMP 1
13000 EOF
13001
13002     ;;
13003   *)
13004     echo "$ac_t""no" 1>&6
13005     ;;
13006   esac 
13007 else
13008   echo "$ac_t""no" 1>&6
13009
13010 fi
13011
13012
13013 #################################################
13014 # choose native language(s) of man pages
13015 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13016 echo "configure:13017: checking chosen man pages' language(s)" >&5
13017 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13018 if test "${with_manpages_langs+set}" = set; then
13019   withval="$with_manpages_langs"
13020    case "$withval" in
13021   yes|no)
13022     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13023     manlangs="en"
13024   ;;
13025   *)
13026     manlangs="$withval"
13027   ;;
13028   esac
13029
13030   echo "$ac_t""$manlangs" 1>&6
13031   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13032   
13033 else
13034   manlangs="en"
13035   echo "$ac_t""$manlangs" 1>&6
13036   
13037
13038 fi
13039
13040
13041 #################################################
13042 # should we build libsmbclient?
13043
13044 LIBSMBCLIENT_SHARED=
13045 LIBSMBCLIENT=
13046 echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
13047 echo "configure:13048: checking whether to build the libsmbclient shared library" >&5
13048 # Check whether --with-libsmbclient or --without-libsmbclient was given.
13049 if test "${with_libsmbclient+set}" = set; then
13050   withval="$with_libsmbclient"
13051    case "$withval" in
13052   no) 
13053      echo "$ac_t""no" 1>&6
13054      ;;
13055   *)
13056      if test $BLDSHARED = true; then
13057         LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
13058         LIBSMBCLIENT=libsmbclient
13059         echo "$ac_t""yes" 1>&6
13060      else
13061         echo "$ac_t""no shared library support" 1>&6
13062      fi
13063      ;;
13064   esac 
13065 else
13066   echo "$ac_t""yes" 1>&6
13067
13068 fi
13069
13070
13071
13072 #################################################
13073 # these tests are taken from the GNU fileutils package
13074 echo "checking how to get filesystem space usage" 1>&6
13075 echo "configure:13076: checking how to get filesystem space usage" >&5
13076 space=no
13077
13078 # Test for statvfs64.
13079 if test $space = no; then
13080   # SVR4
13081   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13082 echo "configure:13083: checking statvfs64 function (SVR4)" >&5
13083 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13084   echo $ac_n "(cached) $ac_c" 1>&6
13085 else
13086   if test "$cross_compiling" = yes; then
13087   fu_cv_sys_stat_statvfs64=cross
13088 else
13089   cat > conftest.$ac_ext <<EOF
13090 #line 13091 "configure"
13091 #include "confdefs.h"
13092
13093 #if defined(HAVE_UNISTD_H)
13094 #include <unistd.h>
13095 #endif
13096 #include <sys/types.h>
13097 #include <sys/statvfs.h>
13098   main ()
13099   {
13100     struct statvfs64 fsd;
13101     exit (statvfs64 (".", &fsd));
13102   }
13103 EOF
13104 if { (eval echo configure:13105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13105 then
13106   fu_cv_sys_stat_statvfs64=yes
13107 else
13108   echo "configure: failed program was:" >&5
13109   cat conftest.$ac_ext >&5
13110   rm -fr conftest*
13111   fu_cv_sys_stat_statvfs64=no
13112 fi
13113 rm -fr conftest*
13114 fi
13115
13116 fi
13117
13118 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13119   if test $fu_cv_sys_stat_statvfs64 = yes; then
13120     space=yes
13121     cat >> confdefs.h <<\EOF
13122 #define STAT_STATVFS64 1
13123 EOF
13124
13125   fi
13126 fi
13127
13128 # Perform only the link test since it seems there are no variants of the
13129 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13130 # because that got a false positive on SCO OSR5.  Adding the declaration
13131 # of a `struct statvfs' causes this test to fail (as it should) on such
13132 # systems.  That system is reported to work fine with STAT_STATFS4 which
13133 # is what it gets when this test fails.
13134 if test $space = no; then
13135   # SVR4
13136   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13137 echo "configure:13138: checking statvfs function (SVR4)" >&5
13138 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13139   echo $ac_n "(cached) $ac_c" 1>&6
13140 else
13141   cat > conftest.$ac_ext <<EOF
13142 #line 13143 "configure"
13143 #include "confdefs.h"
13144 #include <sys/types.h>
13145 #include <sys/statvfs.h>
13146 int main() {
13147 struct statvfs fsd; statvfs (0, &fsd);
13148 ; return 0; }
13149 EOF
13150 if { (eval echo configure:13151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13151   rm -rf conftest*
13152   fu_cv_sys_stat_statvfs=yes
13153 else
13154   echo "configure: failed program was:" >&5
13155   cat conftest.$ac_ext >&5
13156   rm -rf conftest*
13157   fu_cv_sys_stat_statvfs=no
13158 fi
13159 rm -f conftest*
13160 fi
13161
13162 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13163   if test $fu_cv_sys_stat_statvfs = yes; then
13164     space=yes
13165     cat >> confdefs.h <<\EOF
13166 #define STAT_STATVFS 1
13167 EOF
13168
13169   fi
13170 fi
13171
13172 if test $space = no; then
13173   # DEC Alpha running OSF/1
13174   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13175 echo "configure:13176: checking for 3-argument statfs function (DEC OSF/1)" >&5
13176   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13177   echo $ac_n "(cached) $ac_c" 1>&6
13178 else
13179   if test "$cross_compiling" = yes; then
13180   fu_cv_sys_stat_statfs3_osf1=no
13181 else
13182   cat > conftest.$ac_ext <<EOF
13183 #line 13184 "configure"
13184 #include "confdefs.h"
13185
13186 #include <sys/param.h>
13187 #include <sys/types.h>
13188 #include <sys/mount.h>
13189   main ()
13190   {
13191     struct statfs fsd;
13192     fsd.f_fsize = 0;
13193     exit (statfs (".", &fsd, sizeof (struct statfs)));
13194   }
13195 EOF
13196 if { (eval echo configure:13197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13197 then
13198   fu_cv_sys_stat_statfs3_osf1=yes
13199 else
13200   echo "configure: failed program was:" >&5
13201   cat conftest.$ac_ext >&5
13202   rm -fr conftest*
13203   fu_cv_sys_stat_statfs3_osf1=no
13204 fi
13205 rm -fr conftest*
13206 fi
13207
13208 fi
13209
13210   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13211   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13212     space=yes
13213     cat >> confdefs.h <<\EOF
13214 #define STAT_STATFS3_OSF1 1
13215 EOF
13216
13217   fi
13218 fi
13219
13220 if test $space = no; then
13221 # AIX
13222   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13223 echo "configure:13224: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13224   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13225   echo $ac_n "(cached) $ac_c" 1>&6
13226 else
13227   if test "$cross_compiling" = yes; then
13228   fu_cv_sys_stat_statfs2_bsize=no
13229 else
13230   cat > conftest.$ac_ext <<EOF
13231 #line 13232 "configure"
13232 #include "confdefs.h"
13233
13234 #ifdef HAVE_SYS_PARAM_H
13235 #include <sys/param.h>
13236 #endif
13237 #ifdef HAVE_SYS_MOUNT_H
13238 #include <sys/mount.h>
13239 #endif
13240 #ifdef HAVE_SYS_VFS_H
13241 #include <sys/vfs.h>
13242 #endif
13243   main ()
13244   {
13245   struct statfs fsd;
13246   fsd.f_bsize = 0;
13247   exit (statfs (".", &fsd));
13248   }
13249 EOF
13250 if { (eval echo configure:13251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13251 then
13252   fu_cv_sys_stat_statfs2_bsize=yes
13253 else
13254   echo "configure: failed program was:" >&5
13255   cat conftest.$ac_ext >&5
13256   rm -fr conftest*
13257   fu_cv_sys_stat_statfs2_bsize=no
13258 fi
13259 rm -fr conftest*
13260 fi
13261
13262 fi
13263
13264   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13265   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13266     space=yes
13267     cat >> confdefs.h <<\EOF
13268 #define STAT_STATFS2_BSIZE 1
13269 EOF
13270
13271   fi
13272 fi
13273
13274 if test $space = no; then
13275 # SVR3
13276   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13277 echo "configure:13278: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13278   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13279   echo $ac_n "(cached) $ac_c" 1>&6
13280 else
13281   if test "$cross_compiling" = yes; then
13282   fu_cv_sys_stat_statfs4=no
13283 else
13284   cat > conftest.$ac_ext <<EOF
13285 #line 13286 "configure"
13286 #include "confdefs.h"
13287 #include <sys/types.h>
13288 #include <sys/statfs.h>
13289   main ()
13290   {
13291   struct statfs fsd;
13292   exit (statfs (".", &fsd, sizeof fsd, 0));
13293   }
13294 EOF
13295 if { (eval echo configure:13296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13296 then
13297   fu_cv_sys_stat_statfs4=yes
13298 else
13299   echo "configure: failed program was:" >&5
13300   cat conftest.$ac_ext >&5
13301   rm -fr conftest*
13302   fu_cv_sys_stat_statfs4=no
13303 fi
13304 rm -fr conftest*
13305 fi
13306
13307 fi
13308
13309   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13310   if test $fu_cv_sys_stat_statfs4 = yes; then
13311     space=yes
13312     cat >> confdefs.h <<\EOF
13313 #define STAT_STATFS4 1
13314 EOF
13315
13316   fi
13317 fi
13318
13319 if test $space = no; then
13320 # 4.4BSD and NetBSD
13321   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13322 echo "configure:13323: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13323   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13324   echo $ac_n "(cached) $ac_c" 1>&6
13325 else
13326   if test "$cross_compiling" = yes; then
13327   fu_cv_sys_stat_statfs2_fsize=no
13328 else
13329   cat > conftest.$ac_ext <<EOF
13330 #line 13331 "configure"
13331 #include "confdefs.h"
13332 #include <sys/types.h>
13333 #ifdef HAVE_SYS_PARAM_H
13334 #include <sys/param.h>
13335 #endif
13336 #ifdef HAVE_SYS_MOUNT_H
13337 #include <sys/mount.h>
13338 #endif
13339   main ()
13340   {
13341   struct statfs fsd;
13342   fsd.f_fsize = 0;
13343   exit (statfs (".", &fsd));
13344   }
13345 EOF
13346 if { (eval echo configure:13347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13347 then
13348   fu_cv_sys_stat_statfs2_fsize=yes
13349 else
13350   echo "configure: failed program was:" >&5
13351   cat conftest.$ac_ext >&5
13352   rm -fr conftest*
13353   fu_cv_sys_stat_statfs2_fsize=no
13354 fi
13355 rm -fr conftest*
13356 fi
13357
13358 fi
13359
13360   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13361   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13362     space=yes
13363     cat >> confdefs.h <<\EOF
13364 #define STAT_STATFS2_FSIZE 1
13365 EOF
13366
13367   fi
13368 fi
13369
13370 if test $space = no; then
13371   # Ultrix
13372   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13373 echo "configure:13374: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13374   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13375   echo $ac_n "(cached) $ac_c" 1>&6
13376 else
13377   if test "$cross_compiling" = yes; then
13378   fu_cv_sys_stat_fs_data=no
13379 else
13380   cat > conftest.$ac_ext <<EOF
13381 #line 13382 "configure"
13382 #include "confdefs.h"
13383 #include <sys/types.h>
13384 #ifdef HAVE_SYS_PARAM_H
13385 #include <sys/param.h>
13386 #endif
13387 #ifdef HAVE_SYS_MOUNT_H
13388 #include <sys/mount.h>
13389 #endif
13390 #ifdef HAVE_SYS_FS_TYPES_H
13391 #include <sys/fs_types.h>
13392 #endif
13393   main ()
13394   {
13395   struct fs_data fsd;
13396   /* Ultrix's statfs returns 1 for success,
13397      0 for not mounted, -1 for failure.  */
13398   exit (statfs (".", &fsd) != 1);
13399   }
13400 EOF
13401 if { (eval echo configure:13402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13402 then
13403   fu_cv_sys_stat_fs_data=yes
13404 else
13405   echo "configure: failed program was:" >&5
13406   cat conftest.$ac_ext >&5
13407   rm -fr conftest*
13408   fu_cv_sys_stat_fs_data=no
13409 fi
13410 rm -fr conftest*
13411 fi
13412
13413 fi
13414
13415   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13416   if test $fu_cv_sys_stat_fs_data = yes; then
13417     space=yes
13418     cat >> confdefs.h <<\EOF
13419 #define STAT_STATFS2_FS_DATA 1
13420 EOF
13421
13422   fi
13423 fi
13424
13425 #
13426 # As a gating factor for large file support, in order to
13427 # use <4GB files we must have the following minimal support
13428 # available.
13429 # long long, and a 64 bit off_t or off64_t.
13430 # If we don't have all of these then disable large
13431 # file support.
13432 #
13433 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13434 echo "configure:13435: checking if large file support can be enabled" >&5
13435 cat > conftest.$ac_ext <<EOF
13436 #line 13437 "configure"
13437 #include "confdefs.h"
13438
13439 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13440 #include <sys/types.h>
13441 #else
13442 __COMPILE_ERROR_
13443 #endif
13444
13445 int main() {
13446 int i
13447 ; return 0; }
13448 EOF
13449 if { (eval echo configure:13450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13450   rm -rf conftest*
13451   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13452 else
13453   echo "configure: failed program was:" >&5
13454   cat conftest.$ac_ext >&5
13455   rm -rf conftest*
13456   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13457 fi
13458 rm -f conftest*
13459 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13460     cat >> confdefs.h <<\EOF
13461 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13462 EOF
13463
13464 fi
13465 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13466
13467 # Check whether --with-spinlocks or --without-spinlocks was given.
13468 if test "${with_spinlocks+set}" = set; then
13469   withval="$with_spinlocks"
13470   :
13471 fi
13472
13473 if test "x$with_spinlocks" = "xyes"; then
13474     cat >> confdefs.h <<\EOF
13475 #define USE_SPINLOCKS 1
13476 EOF
13477
13478
13479     case "$host_cpu" in
13480         sparc)
13481             cat >> confdefs.h <<\EOF
13482 #define SPARC_SPINLOCKS 1
13483 EOF
13484
13485             ;;
13486
13487         i386|i486|i586|i686)
13488             cat >> confdefs.h <<\EOF
13489 #define INTEL_SPINLOCKS 1
13490 EOF
13491
13492             ;;
13493
13494         mips)
13495             cat >> confdefs.h <<\EOF
13496 #define MIPS_SPINLOCKS 1
13497 EOF
13498
13499             ;;
13500
13501         powerpc)
13502             cat >> confdefs.h <<\EOF
13503 #define POWERPC_SPINLOCKS 1
13504 EOF
13505
13506             ;;
13507     esac
13508 fi
13509
13510 #################################################
13511 # check for ACL support
13512
13513 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13514 echo "configure:13515: checking whether to support ACLs" >&5
13515 # Check whether --with-acl-support or --without-acl-support was given.
13516 if test "${with_acl_support+set}" = set; then
13517   withval="$with_acl_support"
13518    case "$withval" in
13519   yes)
13520
13521         case "$host_os" in
13522         *sysv5*)
13523                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13524                 cat >> confdefs.h <<\EOF
13525 #define HAVE_UNIXWARE_ACLS 1
13526 EOF
13527
13528                 ;;
13529         *solaris*)
13530                 echo "$ac_t""Using solaris ACLs" 1>&6
13531                 cat >> confdefs.h <<\EOF
13532 #define HAVE_SOLARIS_ACLS 1
13533 EOF
13534
13535                 ;;
13536         *hpux*)
13537                 echo "$ac_t""Using HPUX ACLs" 1>&6
13538                 cat >> confdefs.h <<\EOF
13539 #define HAVE_HPUX_ACLS 1
13540 EOF
13541
13542                 ;;
13543         *irix*)
13544                 echo "$ac_t""Using IRIX ACLs" 1>&6
13545                 cat >> confdefs.h <<\EOF
13546 #define HAVE_IRIX_ACLS 1
13547 EOF
13548
13549                 ;;
13550         *aix*)
13551                 echo "$ac_t""Using AIX ACLs" 1>&6
13552                 cat >> confdefs.h <<\EOF
13553 #define HAVE_AIX_ACLS 1
13554 EOF
13555
13556                 ;;
13557         *osf*)
13558                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13559                 cat >> confdefs.h <<\EOF
13560 #define HAVE_TRU64_ACLS 1
13561 EOF
13562
13563                 SMBDLIBS="$SMBDLIBS -lpacl"
13564                 ;;
13565         *)
13566                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13567 echo "configure:13568: checking for acl_get_file in -lacl" >&5
13568 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13569 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13570   echo $ac_n "(cached) $ac_c" 1>&6
13571 else
13572   ac_save_LIBS="$LIBS"
13573 LIBS="-lacl  $LIBS"
13574 cat > conftest.$ac_ext <<EOF
13575 #line 13576 "configure"
13576 #include "confdefs.h"
13577 /* Override any gcc2 internal prototype to avoid an error.  */
13578 /* We use char because int might match the return type of a gcc2
13579     builtin and then its argument prototype would still apply.  */
13580 char acl_get_file();
13581
13582 int main() {
13583 acl_get_file()
13584 ; return 0; }
13585 EOF
13586 if { (eval echo configure:13587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13587   rm -rf conftest*
13588   eval "ac_cv_lib_$ac_lib_var=yes"
13589 else
13590   echo "configure: failed program was:" >&5
13591   cat conftest.$ac_ext >&5
13592   rm -rf conftest*
13593   eval "ac_cv_lib_$ac_lib_var=no"
13594 fi
13595 rm -f conftest*
13596 LIBS="$ac_save_LIBS"
13597
13598 fi
13599 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13600   echo "$ac_t""yes" 1>&6
13601   SMBDLIBS="$SMBDLIBS -lacl"
13602 else
13603   echo "$ac_t""no" 1>&6
13604 fi
13605
13606                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13607 echo "configure:13608: checking for ACL support" >&5
13608 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13609   echo $ac_n "(cached) $ac_c" 1>&6
13610 else
13611   
13612                 acl_LIBS=$LIBS
13613                 LIBS="$LIBS -lacl"
13614                 cat > conftest.$ac_ext <<EOF
13615 #line 13616 "configure"
13616 #include "confdefs.h"
13617 #include <sys/types.h>
13618 #include <sys/acl.h>
13619 int main() {
13620  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13621 ; return 0; }
13622 EOF
13623 if { (eval echo configure:13624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13624   rm -rf conftest*
13625   samba_cv_HAVE_POSIX_ACLS=yes
13626 else
13627   echo "configure: failed program was:" >&5
13628   cat conftest.$ac_ext >&5
13629   rm -rf conftest*
13630   samba_cv_HAVE_POSIX_ACLS=no
13631 fi
13632 rm -f conftest*
13633                 LIBS=$acl_LIBS
13634 fi
13635
13636 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13637                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13638                                 echo "$ac_t""Using posix ACLs" 1>&6
13639                                 cat >> confdefs.h <<\EOF
13640 #define HAVE_POSIX_ACLS 1
13641 EOF
13642
13643                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13644 echo "configure:13645: checking for acl_get_perm_np" >&5
13645 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13646   echo $ac_n "(cached) $ac_c" 1>&6
13647 else
13648   
13649                                 acl_LIBS=$LIBS
13650                                 LIBS="$LIBS -lacl"
13651                                 cat > conftest.$ac_ext <<EOF
13652 #line 13653 "configure"
13653 #include "confdefs.h"
13654 #include <sys/types.h>
13655 #include <sys/acl.h>
13656 int main() {
13657  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13658 ; return 0; }
13659 EOF
13660 if { (eval echo configure:13661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13661   rm -rf conftest*
13662   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13663 else
13664   echo "configure: failed program was:" >&5
13665   cat conftest.$ac_ext >&5
13666   rm -rf conftest*
13667   samba_cv_HAVE_ACL_GET_PERM_NP=no
13668 fi
13669 rm -f conftest*
13670                                 LIBS=$acl_LIBS
13671 fi
13672
13673 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13674                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13675                                         cat >> confdefs.h <<\EOF
13676 #define HAVE_ACL_GET_PERM_NP 1
13677 EOF
13678
13679                                 fi
13680                         fi
13681             ;;
13682         esac
13683         ;;
13684   *)
13685     echo "$ac_t""no" 1>&6
13686     cat >> confdefs.h <<\EOF
13687 #define HAVE_NO_ACLS 1
13688 EOF
13689
13690     ;;
13691   esac 
13692 else
13693   cat >> confdefs.h <<\EOF
13694 #define HAVE_NO_ACLS 1
13695 EOF
13696
13697   echo "$ac_t""no" 1>&6
13698
13699 fi
13700
13701
13702 #################################################
13703 # Check whether winbind is supported on this platform.  If so we need to
13704 # build and install client programs (WINBIND_TARGETS), sbin programs
13705 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13706
13707 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13708 echo "configure:13709: checking whether to build winbind" >&5
13709
13710 # Initially, the value of $host_os decides whether winbind is supported
13711
13712 case "$host_os" in
13713         *linux*|*irix*)
13714                 HAVE_WINBIND=yes
13715                 ;;
13716         *solaris*)
13717                 HAVE_WINBIND=yes
13718                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13719                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
13720                 ;;
13721         *hpux11*)
13722                 HAVE_WINBIND=yes
13723                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13724                 ;;
13725         *)
13726                 HAVE_WINBIND=no
13727                 winbind_no_reason=", unsupported on $host_os"
13728                 ;;
13729 esac
13730
13731 # Check the setting of --with-winbindd
13732
13733 # Check whether --with-winbind or --without-winbind was given.
13734 if test "${with_winbind+set}" = set; then
13735   withval="$with_winbind"
13736    
13737   case "$withval" in
13738         yes)
13739                 HAVE_WINBIND=yes
13740                 ;;
13741         no)
13742                 HAVE_WINBIND=no
13743                 winbind_reason=""
13744                 ;;
13745   esac 
13746 fi
13747
13748
13749 # We need unix domain sockets for winbind
13750
13751 if test x"$HAVE_WINBIND" = x"yes"; then
13752         if test x"$samba_cv_unixsocket" = x"no"; then
13753                 winbind_no_reason=", no unix domain socket support on $host_os"
13754                 HAVE_WINBIND=no
13755         fi
13756 fi
13757
13758 # Display test results
13759
13760 WINBIND_TARGETS=""
13761 WINBIND_STARGETS=""
13762 WINBIND_LTARGETS=""
13763 WINBIND_PAM_PROGS=""
13764
13765 if test x"$HAVE_WINBIND" = x"yes"; then
13766         echo "$ac_t""yes" 1>&6
13767         cat >> confdefs.h <<\EOF
13768 #define WITH_WINBIND 1
13769 EOF
13770
13771
13772         WINBIND_TARGETS="bin/wbinfo"
13773         WINBIND_STARGETS="bin/winbindd"
13774         if test x"$BLDSHARED" = x"true"; then
13775                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13776                 if test x"$with_pam" = x"yes"; then
13777                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13778                 fi
13779         fi
13780 else
13781         echo "$ac_t""no$winbind_no_reason" 1>&6
13782 fi
13783
13784
13785 # Substitution time!
13786
13787
13788
13789
13790
13791
13792
13793
13794 # Solaris has some extra fields in struct passwd that need to be
13795 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
13796 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
13797 # this. 
13798
13799 #AC_CHECK_MEMBER(struct passwd.pw_comment,
13800 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
13801 #               [#include <pwd.h>])
13802
13803 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
13804 echo "configure:13805: checking whether struct passwd has pw_comment" >&5
13805 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
13806   echo $ac_n "(cached) $ac_c" 1>&6
13807 else
13808   
13809     cat > conftest.$ac_ext <<EOF
13810 #line 13811 "configure"
13811 #include "confdefs.h"
13812 #include <pwd.h>
13813 int main() {
13814 struct passwd p; p.pw_comment;
13815 ; return 0; }
13816 EOF
13817 if { (eval echo configure:13818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13818   rm -rf conftest*
13819   samba_cv_passwd_pw_comment=yes
13820 else
13821   echo "configure: failed program was:" >&5
13822   cat conftest.$ac_ext >&5
13823   rm -rf conftest*
13824   samba_cv_passwd_pw_comment=no
13825 fi
13826 rm -f conftest*
13827 fi
13828
13829 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
13830 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
13831    cat >> confdefs.h <<\EOF
13832 #define HAVE_PASSWD_PW_COMMENT 1
13833 EOF
13834
13835 fi
13836
13837 #AC_CHECK_MEMBER(struct passwd.pw_age,
13838 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
13839 #               [#include <pwd.h>])
13840
13841 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
13842 echo "configure:13843: checking whether struct passwd has pw_age" >&5
13843 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
13844   echo $ac_n "(cached) $ac_c" 1>&6
13845 else
13846   
13847     cat > conftest.$ac_ext <<EOF
13848 #line 13849 "configure"
13849 #include "confdefs.h"
13850 #include <pwd.h>
13851 int main() {
13852 struct passwd p; p.pw_age;
13853 ; return 0; }
13854 EOF
13855 if { (eval echo configure:13856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13856   rm -rf conftest*
13857   samba_cv_passwd_pw_age=yes
13858 else
13859   echo "configure: failed program was:" >&5
13860   cat conftest.$ac_ext >&5
13861   rm -rf conftest*
13862   samba_cv_passwd_pw_age=no
13863 fi
13864 rm -f conftest*
13865 fi
13866
13867 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
13868 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
13869    cat >> confdefs.h <<\EOF
13870 #define HAVE_PASSWD_PW_AGE 1
13871 EOF
13872
13873 fi
13874
13875 #################################################
13876 # Check to see if we should use the included popt 
13877
13878 # Check whether --with-included-popt or --without-included-popt was given.
13879 if test "${with_included_popt+set}" = set; then
13880   withval="$with_included_popt"
13881    
13882   case "$withval" in
13883         yes)
13884                 INCLUDED_POPT=yes
13885                 ;;
13886         no)
13887                 INCLUDED_POPT=no
13888                 ;;
13889   esac 
13890 fi
13891
13892 if test x"$INCLUDED_POPT" != x"yes"; then
13893     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13894 echo "configure:13895: checking for poptGetContext in -lpopt" >&5
13895 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13896 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13897   echo $ac_n "(cached) $ac_c" 1>&6
13898 else
13899   ac_save_LIBS="$LIBS"
13900 LIBS="-lpopt  $LIBS"
13901 cat > conftest.$ac_ext <<EOF
13902 #line 13903 "configure"
13903 #include "confdefs.h"
13904 /* Override any gcc2 internal prototype to avoid an error.  */
13905 /* We use char because int might match the return type of a gcc2
13906     builtin and then its argument prototype would still apply.  */
13907 char poptGetContext();
13908
13909 int main() {
13910 poptGetContext()
13911 ; return 0; }
13912 EOF
13913 if { (eval echo configure:13914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13914   rm -rf conftest*
13915   eval "ac_cv_lib_$ac_lib_var=yes"
13916 else
13917   echo "configure: failed program was:" >&5
13918   cat conftest.$ac_ext >&5
13919   rm -rf conftest*
13920   eval "ac_cv_lib_$ac_lib_var=no"
13921 fi
13922 rm -f conftest*
13923 LIBS="$ac_save_LIBS"
13924
13925 fi
13926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13927   echo "$ac_t""yes" 1>&6
13928   INCLUDED_POPT=no
13929 else
13930   echo "$ac_t""no" 1>&6
13931 INCLUDED_POPT=yes
13932 fi
13933
13934 fi
13935
13936 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13937 echo "configure:13938: checking whether to use included popt" >&5
13938 if test x"$INCLUDED_POPT" = x"yes"; then
13939     echo "$ac_t""yes" 1>&6
13940     BUILD_POPT='$(POPT_OBJS)'
13941     FLAGS1="-I$srcdir/popt"
13942 else
13943     echo "$ac_t""no" 1>&6
13944     LIBS="$LIBS -lpopt"
13945 fi
13946
13947
13948
13949 #################################################
13950 # do extra things if we are running insure
13951
13952 if test "${ac_cv_prog_CC}" = "insure"; then
13953         CPPFLAGS="$CPPFLAGS -D__INSURE__"
13954 fi
13955
13956 #################################################
13957 # final configure stuff
13958
13959 echo $ac_n "checking configure summary""... $ac_c" 1>&6
13960 echo "configure:13961: checking configure summary" >&5
13961 if test "$cross_compiling" = yes; then
13962   echo "configure: warning: cannot run when cross-compiling" 1>&2
13963 else
13964   cat > conftest.$ac_ext <<EOF
13965 #line 13966 "configure"
13966 #include "confdefs.h"
13967 #include "${srcdir-.}/tests/summary.c"
13968 EOF
13969 if { (eval echo configure:13970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13970 then
13971   echo "$ac_t""yes" 1>&6
13972 else
13973   echo "configure: failed program was:" >&5
13974   cat conftest.$ac_ext >&5
13975   rm -fr conftest*
13976   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
13977 fi
13978 rm -fr conftest*
13979 fi
13980
13981
13982 builddir=`pwd`
13983
13984
13985 trap '' 1 2 15
13986 cat > confcache <<\EOF
13987 # This file is a shell script that caches the results of configure
13988 # tests run on this system so they can be shared between configure
13989 # scripts and configure runs.  It is not useful on other systems.
13990 # If it contains results you don't want to keep, you may remove or edit it.
13991 #
13992 # By default, configure uses ./config.cache as the cache file,
13993 # creating it if it does not exist already.  You can give configure
13994 # the --cache-file=FILE option to use a different cache file; that is
13995 # what configure does when it calls configure scripts in
13996 # subdirectories, so they share the cache.
13997 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13998 # config.status only pays attention to the cache file if you give it the
13999 # --recheck option to rerun configure.
14000 #
14001 EOF
14002 # The following way of writing the cache mishandles newlines in values,
14003 # but we know of no workaround that is simple, portable, and efficient.
14004 # So, don't put newlines in cache variables' values.
14005 # Ultrix sh set writes to stderr and can't be redirected directly,
14006 # and sets the high bit in the cache file unless we assign to the vars.
14007 (set) 2>&1 |
14008   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14009   *ac_space=\ *)
14010     # `set' does not quote correctly, so add quotes (double-quote substitution
14011     # turns \\\\ into \\, and sed turns \\ into \).
14012     sed -n \
14013       -e "s/'/'\\\\''/g" \
14014       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14015     ;;
14016   *)
14017     # `set' quotes correctly as required by POSIX, so do not add quotes.
14018     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14019     ;;
14020   esac >> confcache
14021 if cmp -s $cache_file confcache; then
14022   :
14023 else
14024   if test -w $cache_file; then
14025     echo "updating cache $cache_file"
14026     cat confcache > $cache_file
14027   else
14028     echo "not updating unwritable cache $cache_file"
14029   fi
14030 fi
14031 rm -f confcache
14032
14033 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14034
14035 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14036 # Let make expand exec_prefix.
14037 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14038
14039 # Any assignment to VPATH causes Sun make to only execute
14040 # the first set of double-colon rules, so remove it if not needed.
14041 # If there is a colon in the path, we need to keep it.
14042 if test "x$srcdir" = x.; then
14043   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14044 fi
14045
14046 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14047
14048 DEFS=-DHAVE_CONFIG_H
14049
14050 # Without the "./", some shells look in PATH for config.status.
14051 : ${CONFIG_STATUS=./config.status}
14052
14053 echo creating $CONFIG_STATUS
14054 rm -f $CONFIG_STATUS
14055 cat > $CONFIG_STATUS <<EOF
14056 #! /bin/sh
14057 # Generated automatically by configure.
14058 # Run this file to recreate the current configuration.
14059 # This directory was configured as follows,
14060 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14061 #
14062 # $0 $ac_configure_args
14063 #
14064 # Compiler output produced by configure, useful for debugging
14065 # configure, is in ./config.log if it exists.
14066
14067 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14068 for ac_option
14069 do
14070   case "\$ac_option" in
14071   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14072     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14073     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14074   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14075     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14076     exit 0 ;;
14077   -help | --help | --hel | --he | --h)
14078     echo "\$ac_cs_usage"; exit 0 ;;
14079   *) echo "\$ac_cs_usage"; exit 1 ;;
14080   esac
14081 done
14082
14083 ac_given_srcdir=$srcdir
14084 ac_given_INSTALL="$INSTALL"
14085
14086 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/VFS/block/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14087 EOF
14088 cat >> $CONFIG_STATUS <<EOF
14089
14090 # Protect against being on the right side of a sed subst in config.status.
14091 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14092  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14093 $ac_vpsub
14094 $extrasub
14095 s%@SHELL@%$SHELL%g
14096 s%@CFLAGS@%$CFLAGS%g
14097 s%@CPPFLAGS@%$CPPFLAGS%g
14098 s%@CXXFLAGS@%$CXXFLAGS%g
14099 s%@FFLAGS@%$FFLAGS%g
14100 s%@DEFS@%$DEFS%g
14101 s%@LDFLAGS@%$LDFLAGS%g
14102 s%@LIBS@%$LIBS%g
14103 s%@exec_prefix@%$exec_prefix%g
14104 s%@prefix@%$prefix%g
14105 s%@program_transform_name@%$program_transform_name%g
14106 s%@bindir@%$bindir%g
14107 s%@sbindir@%$sbindir%g
14108 s%@libexecdir@%$libexecdir%g
14109 s%@datadir@%$datadir%g
14110 s%@sysconfdir@%$sysconfdir%g
14111 s%@sharedstatedir@%$sharedstatedir%g
14112 s%@localstatedir@%$localstatedir%g
14113 s%@libdir@%$libdir%g
14114 s%@includedir@%$includedir%g
14115 s%@oldincludedir@%$oldincludedir%g
14116 s%@infodir@%$infodir%g
14117 s%@mandir@%$mandir%g
14118 s%@configdir@%$configdir%g
14119 s%@lockdir@%$lockdir%g
14120 s%@piddir@%$piddir%g
14121 s%@logfilebase@%$logfilebase%g
14122 s%@privatedir@%$privatedir%g
14123 s%@swatdir@%$swatdir%g
14124 s%@RUNPROG@%$RUNPROG%g
14125 s%@MPROGS@%$MPROGS%g
14126 s%@LDSHFLAGS@%$LDSHFLAGS%g
14127 s%@SONAMEFLAG@%$SONAMEFLAG%g
14128 s%@SHLD@%$SHLD%g
14129 s%@HOST_OS@%$HOST_OS%g
14130 s%@PAM_MOD@%$PAM_MOD%g
14131 s%@WRAP@%$WRAP%g
14132 s%@WRAP32@%$WRAP32%g
14133 s%@WRAPPROG@%$WRAPPROG%g
14134 s%@PICFLAG@%$PICFLAG%g
14135 s%@PICSUFFIX@%$PICSUFFIX%g
14136 s%@POBAD_CC@%$POBAD_CC%g
14137 s%@SHLIBEXT@%$SHLIBEXT%g
14138 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14139 s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g
14140 s%@SMBDLIBS@%$SMBDLIBS%g
14141 s%@PRINTLIBS@%$PRINTLIBS%g
14142 s%@CC@%$CC%g
14143 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14144 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14145 s%@INSTALL_DATA@%$INSTALL_DATA%g
14146 s%@AWK@%$AWK%g
14147 s%@BROKEN_CC@%$BROKEN_CC%g
14148 s%@host@%$host%g
14149 s%@host_alias@%$host_alias%g
14150 s%@host_cpu@%$host_cpu%g
14151 s%@host_vendor@%$host_vendor%g
14152 s%@host_os@%$host_os%g
14153 s%@target@%$target%g
14154 s%@target_alias@%$target_alias%g
14155 s%@target_cpu@%$target_cpu%g
14156 s%@target_vendor@%$target_vendor%g
14157 s%@target_os@%$target_os%g
14158 s%@build@%$build%g
14159 s%@build_alias@%$build_alias%g
14160 s%@build_cpu@%$build_cpu%g
14161 s%@build_vendor@%$build_vendor%g
14162 s%@build_os@%$build_os%g
14163 s%@CPP@%$CPP%g
14164 s%@CUPS_CONFIG@%$CUPS_CONFIG%g
14165 s%@LIBOBJS@%$LIBOBJS%g
14166 s%@TERMLIBS@%$TERMLIBS%g
14167 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14168 s%@ROFF@%$ROFF%g
14169 s%@DYNEXP@%$DYNEXP%g
14170 s%@QUOTAOBJS@%$QUOTAOBJS%g
14171 s%@manlangs@%$manlangs%g
14172 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14173 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14174 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14175 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14176 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14177 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14178 s%@BUILD_POPT@%$BUILD_POPT%g
14179 s%@FLAGS1@%$FLAGS1%g
14180 s%@builddir@%$builddir%g
14181
14182 CEOF
14183 EOF
14184
14185 cat >> $CONFIG_STATUS <<\EOF
14186
14187 # Split the substitutions into bite-sized pieces for seds with
14188 # small command number limits, like on Digital OSF/1 and HP-UX.
14189 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14190 ac_file=1 # Number of current file.
14191 ac_beg=1 # First line for current file.
14192 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14193 ac_more_lines=:
14194 ac_sed_cmds=""
14195 while $ac_more_lines; do
14196   if test $ac_beg -gt 1; then
14197     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14198   else
14199     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14200   fi
14201   if test ! -s conftest.s$ac_file; then
14202     ac_more_lines=false
14203     rm -f conftest.s$ac_file
14204   else
14205     if test -z "$ac_sed_cmds"; then
14206       ac_sed_cmds="sed -f conftest.s$ac_file"
14207     else
14208       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14209     fi
14210     ac_file=`expr $ac_file + 1`
14211     ac_beg=$ac_end
14212     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14213   fi
14214 done
14215 if test -z "$ac_sed_cmds"; then
14216   ac_sed_cmds=cat
14217 fi
14218 EOF
14219
14220 cat >> $CONFIG_STATUS <<EOF
14221
14222 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/VFS/block/Makefile"}
14223 EOF
14224 cat >> $CONFIG_STATUS <<\EOF
14225 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14226   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14227   case "$ac_file" in
14228   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14229        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14230   *) ac_file_in="${ac_file}.in" ;;
14231   esac
14232
14233   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14234
14235   # Remove last slash and all that follows it.  Not all systems have dirname.
14236   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14237   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14238     # The file is in a subdirectory.
14239     test ! -d "$ac_dir" && mkdir "$ac_dir"
14240     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14241     # A "../" for each directory in $ac_dir_suffix.
14242     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14243   else
14244     ac_dir_suffix= ac_dots=
14245   fi
14246
14247   case "$ac_given_srcdir" in
14248   .)  srcdir=.
14249       if test -z "$ac_dots"; then top_srcdir=.
14250       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14251   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14252   *) # Relative path.
14253     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14254     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14255   esac
14256
14257   case "$ac_given_INSTALL" in
14258   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14259   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14260   esac
14261
14262   echo creating "$ac_file"
14263   rm -f "$ac_file"
14264   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14265   case "$ac_file" in
14266   *Makefile*) ac_comsub="1i\\
14267 # $configure_input" ;;
14268   *) ac_comsub= ;;
14269   esac
14270
14271   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14272   sed -e "$ac_comsub
14273 s%@configure_input@%$configure_input%g
14274 s%@srcdir@%$srcdir%g
14275 s%@top_srcdir@%$top_srcdir%g
14276 s%@INSTALL@%$INSTALL%g
14277 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14278 fi; done
14279 rm -f conftest.s*
14280
14281 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14282 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14283 #
14284 # ac_d sets the value in "#define NAME VALUE" lines.
14285 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14286 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14287 ac_dC='\3'
14288 ac_dD='%g'
14289 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14290 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14291 ac_uB='\([      ]\)%\1#\2define\3'
14292 ac_uC=' '
14293 ac_uD='\4%g'
14294 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14295 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14296 ac_eB='$%\1#\2define\3'
14297 ac_eC=' '
14298 ac_eD='%g'
14299
14300 if test "${CONFIG_HEADERS+set}" != set; then
14301 EOF
14302 cat >> $CONFIG_STATUS <<EOF
14303   CONFIG_HEADERS="include/config.h"
14304 EOF
14305 cat >> $CONFIG_STATUS <<\EOF
14306 fi
14307 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14308   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14309   case "$ac_file" in
14310   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14311        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14312   *) ac_file_in="${ac_file}.in" ;;
14313   esac
14314
14315   echo creating $ac_file
14316
14317   rm -f conftest.frag conftest.in conftest.out
14318   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14319   cat $ac_file_inputs > conftest.in
14320
14321 EOF
14322
14323 # Transform confdefs.h into a sed script conftest.vals that substitutes
14324 # the proper values into config.h.in to produce config.h.  And first:
14325 # Protect against being on the right side of a sed subst in config.status.
14326 # Protect against being in an unquoted here document in config.status.
14327 rm -f conftest.vals
14328 cat > conftest.hdr <<\EOF
14329 s/[\\&%]/\\&/g
14330 s%[\\$`]%\\&%g
14331 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14332 s%ac_d%ac_u%gp
14333 s%ac_u%ac_e%gp
14334 EOF
14335 sed -n -f conftest.hdr confdefs.h > conftest.vals
14336 rm -f conftest.hdr
14337
14338 # This sed command replaces #undef with comments.  This is necessary, for
14339 # example, in the case of _POSIX_SOURCE, which is predefined and required
14340 # on some systems where configure will not decide to define it.
14341 cat >> conftest.vals <<\EOF
14342 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14343 EOF
14344
14345 # Break up conftest.vals because some shells have a limit on
14346 # the size of here documents, and old seds have small limits too.
14347
14348 rm -f conftest.tail
14349 while :
14350 do
14351   ac_lines=`grep -c . conftest.vals`
14352   # grep -c gives empty output for an empty file on some AIX systems.
14353   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14354   # Write a limited-size here document to conftest.frag.
14355   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14356   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14357   echo 'CEOF
14358   sed -f conftest.frag conftest.in > conftest.out
14359   rm -f conftest.in
14360   mv conftest.out conftest.in
14361 ' >> $CONFIG_STATUS
14362   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14363   rm -f conftest.vals
14364   mv conftest.tail conftest.vals
14365 done
14366 rm -f conftest.vals
14367
14368 cat >> $CONFIG_STATUS <<\EOF
14369   rm -f conftest.frag conftest.h
14370   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14371   cat conftest.in >> conftest.h
14372   rm -f conftest.in
14373   if cmp -s $ac_file conftest.h 2>/dev/null; then
14374     echo "$ac_file is unchanged"
14375     rm -f conftest.h
14376   else
14377     # Remove last slash and all that follows it.  Not all systems have dirname.
14378       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14379       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14380       # The file is in a subdirectory.
14381       test ! -d "$ac_dir" && mkdir "$ac_dir"
14382     fi
14383     rm -f $ac_file
14384     mv conftest.h $ac_file
14385   fi
14386 fi; done
14387
14388 EOF
14389 cat >> $CONFIG_STATUS <<EOF
14390
14391 EOF
14392 cat >> $CONFIG_STATUS <<\EOF
14393
14394 exit 0
14395 EOF
14396 chmod +x $CONFIG_STATUS
14397 rm -fr confdefs* $ac_clean_files
14398 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14399
14400
14401 #################################################
14402 # Print very concise instructions on building/use
14403 if test "x$enable_dmalloc" = xyes
14404 then
14405         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14406         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14407 fi