merging some autoconf changes from SAMBA_2_2
[samba.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.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-codepagedir=DIR  Where to put codepage files (\$libdir/codepages)"
29 ac_help="$ac_help
30   --with-logfilebase=DIR  Where to put log files (\$(VARDIR))"
31 ac_help="$ac_help
32   --enable-debug          Turn on compiler debugging information (default=no)"
33 ac_help="$ac_help
34   --enable-developer      Turn on developer warnings and debugging (default=no)"
35 ac_help="$ac_help
36   --enable-krb5developer  Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)"
37 ac_help="$ac_help
38   --enable-dmalloc        Enable heap debugging [default=no]"
39 ac_help="$ac_help
40   --enable-cups           Turn on CUPS support (default=auto)"
41 ac_help="$ac_help
42   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
43 ac_help="$ac_help
44   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
45 ac_help="$ac_help
46   --with-smbwrapper       Include SMB wrapper support (default=no) "
47 ac_help="$ac_help
48   --with-afs              Include AFS clear-text auth support (default=no) "
49 ac_help="$ac_help
50   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
51 ac_help="$ac_help
52   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
53 ac_help="$ac_help
54   --with-automount        Include AUTOMOUNT support (default=no)"
55 ac_help="$ac_help
56   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
57 ac_help="$ac_help
58   --with-pam              Include PAM support (default=no)"
59 ac_help="$ac_help
60   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
61 ac_help="$ac_help
62   --with-tdbsam           Include experimental TDB SAM support (default=no)"
63 ac_help="$ac_help
64   --with-nisplussam       Include NISPLUS SAM support (default=no)"
65 ac_help="$ac_help
66   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
67 ac_help="$ac_help
68   --with-syslog           Include experimental SYSLOG support (default=no)"
69 ac_help="$ac_help
70   --with-profiling-data   Include gathering source code profile information (default=no)"
71 ac_help="$ac_help
72   --with-quotas           Include experimental disk-quota support (default=no)"
73 ac_help="$ac_help
74   --with-utmp             Include experimental utmp accounting (default=no)"
75 ac_help="$ac_help
76   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
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   codepagedir="\$(DATADIR)/samba/codepages"
607     configdir="${sysconfdir}/samba"
608     lockdir="\${VARDIR}/cache/samba"
609     piddir="\$(VARDIR)/run/samba"
610     logfilebase="\${VARDIR}/log/samba"
611     privatedir="\${CONFIGDIR}/private"
612     swatdir="\${DATADIR}/samba/swat"
613 else
614   codepagedir="\$(LIBDIR)/codepages"
615     configdir="\$(LIBDIR)"
616     logfilebase="\$(VARDIR)"
617     lockdir="\${VARDIR}/locks"
618     piddir="\$(VARDIR)/locks"
619     privatedir="\${prefix}/private"
620     swatdir="\${prefix}/swat"
621 fi
622
623
624 #################################################
625 # set private directory location
626 # Check whether --with-privatedir or --without-privatedir was given.
627 if test "${with_privatedir+set}" = set; then
628   withval="$with_privatedir"
629    case "$withval" in
630   yes|no)
631   #
632   # Just in case anybody calls it without argument
633   #
634     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
635   ;;
636   * )
637     privatedir="$withval"
638     ;;
639   esac
640 fi
641
642
643 #################################################
644 # set lock directory location
645 # Check whether --with-lockdir or --without-lockdir was given.
646 if test "${with_lockdir+set}" = set; then
647   withval="$with_lockdir"
648    case "$withval" in
649   yes|no)
650   #
651   # Just in case anybody calls it without argument
652   #
653     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
654   ;;
655   * )
656     lockdir="$withval"
657     ;;
658   esac
659 fi
660
661
662 #################################################
663 # set pid directory location
664 # Check whether --with-piddir or --without-piddir was given.
665 if test "${with_piddir+set}" = set; then
666   withval="$with_piddir"
667    case "$withval" in
668   yes|no)
669   #
670   # Just in case anybody calls it without argument
671   #
672     echo "configure: warning: --with-piddir called without argument - will use default" 1>&2
673   ;;
674   * )
675     piddir="$withval"
676     ;;
677   esac
678 fi
679
680
681 #################################################
682 # set SWAT directory location
683 # Check whether --with-swatdir or --without-swatdir was given.
684 if test "${with_swatdir+set}" = set; then
685   withval="$with_swatdir"
686    case "$withval" in
687   yes|no)
688   #
689   # Just in case anybody does it
690   #
691     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
692   ;;
693   * )
694     swatdir="$withval"
695     ;;
696   esac
697 fi
698
699
700 #################################################
701 # set configuration directory location
702 # Check whether --with-configdir or --without-configdir was given.
703 if test "${with_configdir+set}" = set; then
704   withval="$with_configdir"
705    case "$withval" in
706   yes|no)
707   #
708   # Just in case anybody does it
709   #
710     echo "configure: warning: --with-configdir called without argument - will use default" 1>&2
711   ;;
712   * )
713     configdir="$withval"
714     ;;
715   esac
716 fi
717
718
719 #################################################
720 # set codepage directory location
721 # Check whether --with-codepagedir or --without-codepagedir was given.
722 if test "${with_codepagedir+set}" = set; then
723   withval="$with_codepagedir"
724    case "$withval" in
725   yes|no)
726   #
727   # Just in case anybody does it
728   #
729     echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
730   ;;
731   * )
732     codepagedir="$withval"
733     ;;
734   esac
735 fi
736
737
738 #################################################
739 # set log directory location
740 # Check whether --with-logfilebase or --without-logfilebase was given.
741 if test "${with_logfilebase+set}" = set; then
742   withval="$with_logfilebase"
743    case "$withval" in
744   yes|no)
745   #
746   # Just in case anybody does it
747   #
748     echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
749   ;;
750   * )
751     logfilebase="$withval"
752     ;;
753   esac
754 fi
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782 # compile with optimisation and without debugging by default
783 CFLAGS="-O ${CFLAGS}"
784
785 # Check whether --enable-debug or --disable-debug was given.
786 if test "${enable_debug+set}" = set; then
787   enableval="$enable_debug"
788   if eval "test x$enable_debug = xyes"; then
789         CFLAGS="${CFLAGS} -g"
790     fi
791 fi
792
793
794 # Check whether --enable-developer or --disable-developer was given.
795 if test "${enable_developer+set}" = set; then
796   enableval="$enable_developer"
797   if eval "test x$enable_developer = xyes"; then
798         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
799     fi
800 fi
801
802
803 # Check whether --enable-krb5developer or --disable-krb5developer was given.
804 if test "${enable_krb5developer+set}" = set; then
805   enableval="$enable_krb5developer"
806   if eval "test x$enable_krb5developer = xyes"; then
807         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
808     fi
809 fi
810
811
812 # Check whether --enable-dmalloc or --disable-dmalloc was given.
813 if test "${enable_dmalloc+set}" = set; then
814   enableval="$enable_dmalloc"
815   :
816 fi
817
818
819 if test "x$enable_dmalloc" = xyes
820 then
821         cat >> confdefs.h <<\EOF
822 #define ENABLE_DMALLOC 1
823 EOF
824
825         cat >> confdefs.h <<\EOF
826 #define DMALLOC_FUNC_CHECK 1
827 EOF
828
829         LIBS="$LIBS -ldmalloc"  
830 fi
831
832 # Extract the first word of "gcc", so it can be a program name with args.
833 set dummy gcc; ac_word=$2
834 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
835 echo "configure:836: checking for $ac_word" >&5
836 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
837   echo $ac_n "(cached) $ac_c" 1>&6
838 else
839   if test -n "$CC"; then
840   ac_cv_prog_CC="$CC" # Let the user override the test.
841 else
842   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
843   ac_dummy="$PATH"
844   for ac_dir in $ac_dummy; do
845     test -z "$ac_dir" && ac_dir=.
846     if test -f $ac_dir/$ac_word; then
847       ac_cv_prog_CC="gcc"
848       break
849     fi
850   done
851   IFS="$ac_save_ifs"
852 fi
853 fi
854 CC="$ac_cv_prog_CC"
855 if test -n "$CC"; then
856   echo "$ac_t""$CC" 1>&6
857 else
858   echo "$ac_t""no" 1>&6
859 fi
860
861 if test -z "$CC"; then
862   # Extract the first word of "cc", so it can be a program name with args.
863 set dummy cc; ac_word=$2
864 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
865 echo "configure:866: checking for $ac_word" >&5
866 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
867   echo $ac_n "(cached) $ac_c" 1>&6
868 else
869   if test -n "$CC"; then
870   ac_cv_prog_CC="$CC" # Let the user override the test.
871 else
872   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
873   ac_prog_rejected=no
874   ac_dummy="$PATH"
875   for ac_dir in $ac_dummy; do
876     test -z "$ac_dir" && ac_dir=.
877     if test -f $ac_dir/$ac_word; then
878       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
879         ac_prog_rejected=yes
880         continue
881       fi
882       ac_cv_prog_CC="cc"
883       break
884     fi
885   done
886   IFS="$ac_save_ifs"
887 if test $ac_prog_rejected = yes; then
888   # We found a bogon in the path, so make sure we never use it.
889   set dummy $ac_cv_prog_CC
890   shift
891   if test $# -gt 0; then
892     # We chose a different compiler from the bogus one.
893     # However, it has the same basename, so the bogon will be chosen
894     # first if we set CC to just the basename; use the full file name.
895     shift
896     set dummy "$ac_dir/$ac_word" "$@"
897     shift
898     ac_cv_prog_CC="$@"
899   fi
900 fi
901 fi
902 fi
903 CC="$ac_cv_prog_CC"
904 if test -n "$CC"; then
905   echo "$ac_t""$CC" 1>&6
906 else
907   echo "$ac_t""no" 1>&6
908 fi
909
910   if test -z "$CC"; then
911     case "`uname -s`" in
912     *win32* | *WIN32*)
913       # Extract the first word of "cl", so it can be a program name with args.
914 set dummy cl; ac_word=$2
915 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
916 echo "configure:917: checking for $ac_word" >&5
917 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
918   echo $ac_n "(cached) $ac_c" 1>&6
919 else
920   if test -n "$CC"; then
921   ac_cv_prog_CC="$CC" # Let the user override the test.
922 else
923   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
924   ac_dummy="$PATH"
925   for ac_dir in $ac_dummy; do
926     test -z "$ac_dir" && ac_dir=.
927     if test -f $ac_dir/$ac_word; then
928       ac_cv_prog_CC="cl"
929       break
930     fi
931   done
932   IFS="$ac_save_ifs"
933 fi
934 fi
935 CC="$ac_cv_prog_CC"
936 if test -n "$CC"; then
937   echo "$ac_t""$CC" 1>&6
938 else
939   echo "$ac_t""no" 1>&6
940 fi
941  ;;
942     esac
943   fi
944   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
945 fi
946
947 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
948 echo "configure:949: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
949
950 ac_ext=c
951 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
952 ac_cpp='$CPP $CPPFLAGS'
953 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
954 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
955 cross_compiling=$ac_cv_prog_cc_cross
956
957 cat > conftest.$ac_ext << EOF
958
959 #line 960 "configure"
960 #include "confdefs.h"
961
962 main(){return(0);}
963 EOF
964 if { (eval echo configure:965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
965   ac_cv_prog_cc_works=yes
966   # If we can't run a trivial program, we are probably using a cross compiler.
967   if (./conftest; exit) 2>/dev/null; then
968     ac_cv_prog_cc_cross=no
969   else
970     ac_cv_prog_cc_cross=yes
971   fi
972 else
973   echo "configure: failed program was:" >&5
974   cat conftest.$ac_ext >&5
975   ac_cv_prog_cc_works=no
976 fi
977 rm -fr conftest*
978 ac_ext=c
979 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
980 ac_cpp='$CPP $CPPFLAGS'
981 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
982 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
983 cross_compiling=$ac_cv_prog_cc_cross
984
985 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
986 if test $ac_cv_prog_cc_works = no; then
987   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
988 fi
989 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
990 echo "configure:991: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
991 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
992 cross_compiling=$ac_cv_prog_cc_cross
993
994 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
995 echo "configure:996: checking whether we are using GNU C" >&5
996 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
997   echo $ac_n "(cached) $ac_c" 1>&6
998 else
999   cat > conftest.c <<EOF
1000 #ifdef __GNUC__
1001   yes;
1002 #endif
1003 EOF
1004 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1005   ac_cv_prog_gcc=yes
1006 else
1007   ac_cv_prog_gcc=no
1008 fi
1009 fi
1010
1011 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1012
1013 if test $ac_cv_prog_gcc = yes; then
1014   GCC=yes
1015 else
1016   GCC=
1017 fi
1018
1019 ac_test_CFLAGS="${CFLAGS+set}"
1020 ac_save_CFLAGS="$CFLAGS"
1021 CFLAGS=
1022 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1023 echo "configure:1024: checking whether ${CC-cc} accepts -g" >&5
1024 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1025   echo $ac_n "(cached) $ac_c" 1>&6
1026 else
1027   echo 'void f(){}' > conftest.c
1028 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1029   ac_cv_prog_cc_g=yes
1030 else
1031   ac_cv_prog_cc_g=no
1032 fi
1033 rm -f conftest*
1034
1035 fi
1036
1037 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1038 if test "$ac_test_CFLAGS" = set; then
1039   CFLAGS="$ac_save_CFLAGS"
1040 elif test $ac_cv_prog_cc_g = yes; then
1041   if test "$GCC" = yes; then
1042     CFLAGS="-g -O2"
1043   else
1044     CFLAGS="-g"
1045   fi
1046 else
1047   if test "$GCC" = yes; then
1048     CFLAGS="-O2"
1049   else
1050     CFLAGS=
1051   fi
1052 fi
1053
1054 ac_aux_dir=
1055 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1056   if test -f $ac_dir/install-sh; then
1057     ac_aux_dir=$ac_dir
1058     ac_install_sh="$ac_aux_dir/install-sh -c"
1059     break
1060   elif test -f $ac_dir/install.sh; then
1061     ac_aux_dir=$ac_dir
1062     ac_install_sh="$ac_aux_dir/install.sh -c"
1063     break
1064   fi
1065 done
1066 if test -z "$ac_aux_dir"; then
1067   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1068 fi
1069 ac_config_guess=$ac_aux_dir/config.guess
1070 ac_config_sub=$ac_aux_dir/config.sub
1071 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1072
1073 # Find a good install program.  We prefer a C program (faster),
1074 # so one script is as good as another.  But avoid the broken or
1075 # incompatible versions:
1076 # SysV /etc/install, /usr/sbin/install
1077 # SunOS /usr/etc/install
1078 # IRIX /sbin/install
1079 # AIX /bin/install
1080 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1081 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1082 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1083 # ./install, which can be erroneously created by make from ./install.sh.
1084 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1085 echo "configure:1086: checking for a BSD compatible install" >&5
1086 if test -z "$INSTALL"; then
1087 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1088   echo $ac_n "(cached) $ac_c" 1>&6
1089 else
1090     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1091   for ac_dir in $PATH; do
1092     # Account for people who put trailing slashes in PATH elements.
1093     case "$ac_dir/" in
1094     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1095     *)
1096       # OSF1 and SCO ODT 3.0 have their own names for install.
1097       # Don't use installbsd from OSF since it installs stuff as root
1098       # by default.
1099       for ac_prog in ginstall scoinst install; do
1100         if test -f $ac_dir/$ac_prog; then
1101           if test $ac_prog = install &&
1102             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1103             # AIX install.  It has an incompatible calling convention.
1104             :
1105           else
1106             ac_cv_path_install="$ac_dir/$ac_prog -c"
1107             break 2
1108           fi
1109         fi
1110       done
1111       ;;
1112     esac
1113   done
1114   IFS="$ac_save_IFS"
1115
1116 fi
1117   if test "${ac_cv_path_install+set}" = set; then
1118     INSTALL="$ac_cv_path_install"
1119   else
1120     # As a last resort, use the slow shell script.  We don't cache a
1121     # path for INSTALL within a source directory, because that will
1122     # break other packages using the cache if that directory is
1123     # removed, or if the path is relative.
1124     INSTALL="$ac_install_sh"
1125   fi
1126 fi
1127 echo "$ac_t""$INSTALL" 1>&6
1128
1129 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1130 # It thinks the first close brace ends the variable substitution.
1131 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1132
1133 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1134
1135 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1136
1137 for ac_prog in gawk mawk nawk awk
1138 do
1139 # Extract the first word of "$ac_prog", so it can be a program name with args.
1140 set dummy $ac_prog; ac_word=$2
1141 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1142 echo "configure:1143: checking for $ac_word" >&5
1143 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1144   echo $ac_n "(cached) $ac_c" 1>&6
1145 else
1146   if test -n "$AWK"; then
1147   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1148 else
1149   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1150   ac_dummy="$PATH"
1151   for ac_dir in $ac_dummy; do
1152     test -z "$ac_dir" && ac_dir=.
1153     if test -f $ac_dir/$ac_word; then
1154       ac_cv_prog_AWK="$ac_prog"
1155       break
1156     fi
1157   done
1158   IFS="$ac_save_ifs"
1159 fi
1160 fi
1161 AWK="$ac_cv_prog_AWK"
1162 if test -n "$AWK"; then
1163   echo "$ac_t""$AWK" 1>&6
1164 else
1165   echo "$ac_t""no" 1>&6
1166 fi
1167
1168 test -n "$AWK" && break
1169 done
1170
1171
1172 LD=ld
1173 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1174 echo "configure:1175: checking if the linker ($LD) is GNU ld" >&5
1175 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1176   echo $ac_n "(cached) $ac_c" 1>&6
1177 else
1178   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1179 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1180   ac_cv_prog_gnu_ld=yes
1181 else
1182   ac_cv_prog_gnu_ld=no
1183 fi
1184 fi
1185
1186 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1187
1188
1189 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1190 echo "configure:1191: checking for POSIXized ISC" >&5
1191 if test -d /etc/conf/kconfig.d &&
1192   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1193 then
1194   echo "$ac_t""yes" 1>&6
1195   ISC=yes # If later tests want to check for ISC.
1196   cat >> confdefs.h <<\EOF
1197 #define _POSIX_SOURCE 1
1198 EOF
1199
1200   if test "$GCC" = yes; then
1201     CC="$CC -posix"
1202   else
1203     CC="$CC -Xp"
1204   fi
1205 else
1206   echo "$ac_t""no" 1>&6
1207   ISC=
1208 fi
1209
1210
1211 if test "x$CC" != xcc; then
1212   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1213 echo "configure:1214: checking whether $CC and cc understand -c and -o together" >&5
1214 else
1215   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1216 echo "configure:1217: checking whether cc understands -c and -o together" >&5
1217 fi
1218 set dummy $CC; ac_cc="`echo $2 |
1219                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1220 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1221   echo $ac_n "(cached) $ac_c" 1>&6
1222 else
1223   echo 'foo(){}' > conftest.c
1224 # Make sure it works both with $CC and with simple cc.
1225 # We do the test twice because some compilers refuse to overwrite an
1226 # existing .o file with -o, though they will create one.
1227 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1228 if { (eval echo configure:1229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1229    test -f conftest.o && { (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1230 then
1231   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1232   if test "x$CC" != xcc; then
1233     # Test first that cc exists at all.
1234     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1235       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1236       if { (eval echo configure:1237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1237          test -f conftest.o && { (eval echo configure:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1238       then
1239         # cc works too.
1240         :
1241       else
1242         # cc exists but doesn't like -o.
1243         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1244       fi
1245     fi
1246   fi
1247 else
1248   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1249 fi
1250 rm -f conftest*
1251
1252 fi
1253 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1254   echo "$ac_t""yes" 1>&6
1255 else
1256   echo "$ac_t""no" 1>&6
1257   cat >> confdefs.h <<\EOF
1258 #define NO_MINUS_C_MINUS_O 1
1259 EOF
1260
1261 fi
1262
1263 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1264       BROKEN_CC=
1265 else
1266       BROKEN_CC=#
1267 fi
1268
1269
1270 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1271 echo "configure:1272: checking that the C compiler understands volatile" >&5
1272 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1273   echo $ac_n "(cached) $ac_c" 1>&6
1274 else
1275   
1276     cat > conftest.$ac_ext <<EOF
1277 #line 1278 "configure"
1278 #include "confdefs.h"
1279 #include <sys/types.h>
1280 int main() {
1281 volatile int i = 0
1282 ; return 0; }
1283 EOF
1284 if { (eval echo configure:1285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1285   rm -rf conftest*
1286   samba_cv_volatile=yes
1287 else
1288   echo "configure: failed program was:" >&5
1289   cat conftest.$ac_ext >&5
1290   rm -rf conftest*
1291   samba_cv_volatile=no
1292 fi
1293 rm -f conftest*
1294 fi
1295
1296 echo "$ac_t""$samba_cv_volatile" 1>&6
1297 if test x"$samba_cv_volatile" = x"yes"; then
1298    cat >> confdefs.h <<\EOF
1299 #define HAVE_VOLATILE 1
1300 EOF
1301
1302 fi
1303
1304
1305
1306 # Do some error checking and defaulting for the host and target type.
1307 # The inputs are:
1308 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1309 #
1310 # The rules are:
1311 # 1. You are not allowed to specify --host, --target, and nonopt at the
1312 #    same time.
1313 # 2. Host defaults to nonopt.
1314 # 3. If nonopt is not specified, then host defaults to the current host,
1315 #    as determined by config.guess.
1316 # 4. Target and build default to nonopt.
1317 # 5. If nonopt is not specified, then target and build default to host.
1318
1319 # The aliases save the names the user supplied, while $host etc.
1320 # will get canonicalized.
1321 case $host---$target---$nonopt in
1322 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1323 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1324 esac
1325
1326
1327 # Make sure we can run config.sub.
1328 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1329 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1330 fi
1331
1332 echo $ac_n "checking host system type""... $ac_c" 1>&6
1333 echo "configure:1334: checking host system type" >&5
1334
1335 host_alias=$host
1336 case "$host_alias" in
1337 NONE)
1338   case $nonopt in
1339   NONE)
1340     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1341     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1342     fi ;;
1343   *) host_alias=$nonopt ;;
1344   esac ;;
1345 esac
1346
1347 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1348 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1349 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1350 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1351 echo "$ac_t""$host" 1>&6
1352
1353 echo $ac_n "checking target system type""... $ac_c" 1>&6
1354 echo "configure:1355: checking target system type" >&5
1355
1356 target_alias=$target
1357 case "$target_alias" in
1358 NONE)
1359   case $nonopt in
1360   NONE) target_alias=$host_alias ;;
1361   *) target_alias=$nonopt ;;
1362   esac ;;
1363 esac
1364
1365 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1366 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1367 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1368 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1369 echo "$ac_t""$target" 1>&6
1370
1371 echo $ac_n "checking build system type""... $ac_c" 1>&6
1372 echo "configure:1373: checking build system type" >&5
1373
1374 build_alias=$build
1375 case "$build_alias" in
1376 NONE)
1377   case $nonopt in
1378   NONE) build_alias=$host_alias ;;
1379   *) build_alias=$nonopt ;;
1380   esac ;;
1381 esac
1382
1383 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1384 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1385 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1386 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1387 echo "$ac_t""$build" 1>&6
1388
1389 test "$host_alias" != "$target_alias" &&
1390   test "$program_prefix$program_suffix$program_transform_name" = \
1391     NONENONEs,x,x, &&
1392   program_prefix=${target_alias}-
1393
1394
1395   case "$host_os" in
1396         *irix6*) cat >> confdefs.h <<\EOF
1397 #include <standards.h>
1398 EOF
1399
1400         ;;
1401 esac
1402
1403
1404     
1405     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1406 echo "configure:1407: checking config.cache system type" >&5
1407     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1408          test x"$ac_cv_host_system_type" != x"$host"; } ||
1409        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1410          test x"$ac_cv_build_system_type" != x"$build"; } ||
1411        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1412          test x"$ac_cv_target_system_type" != x"$target"; }; then
1413         echo "$ac_t""different" 1>&6
1414         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1415     else
1416         echo "$ac_t""same" 1>&6
1417     fi
1418     ac_cv_host_system_type="$host"
1419     ac_cv_build_system_type="$build"
1420     ac_cv_target_system_type="$target"
1421
1422
1423 DYNEXP=
1424
1425 #
1426 # Config CPPFLAG settings for strange OS's that must be set
1427 # before other tests.
1428 #
1429 case "$host_os" in
1430 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1431     *hpux*)
1432     
1433       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1434 echo "configure:1435: checking whether ${CC-cc} accepts -Ae" >&5
1435 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1436   echo $ac_n "(cached) $ac_c" 1>&6
1437 else
1438   echo 'void f(){}' > conftest.c
1439 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1440   ac_cv_prog_cc_Ae=yes
1441 else
1442   ac_cv_prog_cc_Ae=no
1443 fi
1444 rm -f conftest*
1445
1446 fi
1447
1448 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1449       # mmap on HPUX is completely broken...
1450       cat >> confdefs.h <<\EOF
1451 #define MMAP_BLACKLIST 1
1452 EOF
1453
1454       if test $ac_cv_prog_cc_Ae = yes; then
1455         CPPFLAGS="$CPPFLAGS -Ae"
1456       fi
1457 #
1458 # Defines needed for HPUX support.
1459 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1460 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1461 #
1462       case `uname -r` in
1463                         *9*|*10*)
1464                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1465                                 cat >> confdefs.h <<\EOF
1466 #define USE_BOTH_CRYPT_CALLS 1
1467 EOF
1468
1469                                 cat >> confdefs.h <<\EOF
1470 #define _HPUX_SOURCE 1
1471 EOF
1472
1473                                 cat >> confdefs.h <<\EOF
1474 #define _POSIX_SOURCE 1
1475 EOF
1476
1477                                 cat >> confdefs.h <<\EOF
1478 #define _ALIGNMENT_REQUIRED 1
1479 EOF
1480
1481                                 cat >> confdefs.h <<\EOF
1482 #define _MAX_ALIGNMENT 4
1483 EOF
1484
1485                                 ;;
1486                         *11*)
1487                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1488                                 cat >> confdefs.h <<\EOF
1489 #define USE_BOTH_CRYPT_CALLS 1
1490 EOF
1491
1492                                 cat >> confdefs.h <<\EOF
1493 #define _HPUX_SOURCE 1
1494 EOF
1495
1496                                 cat >> confdefs.h <<\EOF
1497 #define _POSIX_SOURCE 1
1498 EOF
1499
1500                                 cat >> confdefs.h <<\EOF
1501 #define _LARGEFILE64_SOURCE 1
1502 EOF
1503
1504                                 cat >> confdefs.h <<\EOF
1505 #define _ALIGNMENT_REQUIRED 1
1506 EOF
1507
1508                                 cat >> confdefs.h <<\EOF
1509 #define _MAX_ALIGNMENT 4
1510 EOF
1511
1512                                 ;;
1513       esac
1514       DYNEXP="-Wl,-E"
1515       ;;
1516
1517 #
1518 # CRAY Unicos has broken const handling
1519        *unicos*)
1520           echo "$ac_t""disabling const" 1>&6
1521           CPPFLAGS="$CPPFLAGS -Dconst="
1522           ;;
1523         
1524 #
1525 # AIX4.x doesn't even admit to having large
1526 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1527 #
1528     *aix4*)
1529           echo "$ac_t""enabling large file support" 1>&6
1530       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1531       cat >> confdefs.h <<\EOF
1532 #define _LARGE_FILES 1
1533 EOF
1534
1535       ;;    
1536 #
1537 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1538 # to the existance of large files..
1539 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1540 # recommendations on large file support, however it makes the
1541 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1542 # recommendation makes the compile fail on gcc2.7. JRA.
1543 #
1544         *solaris*)
1545                 case `uname -r` in
1546                         5.0*|5.1*|5.2*|5.3*|5.5*)
1547                                 echo "$ac_t""no large file support" 1>&6
1548                                 ;;
1549                         5.*)
1550                         echo "$ac_t""enabling large file support" 1>&6
1551                         if test "$ac_cv_prog_gcc" = yes; then
1552                                 ${CC-cc} -v >conftest.c 2>&1
1553                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1554                                 rm -fr conftest.c
1555                                 case "$ac_cv_gcc_compiler_version_number" in
1556                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1557                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1558                                                 cat >> confdefs.h <<\EOF
1559 #define _LARGEFILE64_SOURCE 1
1560 EOF
1561
1562                                                 ;;
1563                                         *)
1564                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1565                                                 cat >> confdefs.h <<\EOF
1566 #define _LARGEFILE64_SOURCE 1
1567 EOF
1568
1569                                                 cat >> confdefs.h <<\EOF
1570 #define _FILE_OFFSET_BITS 64
1571 EOF
1572
1573                                                 ;;
1574                                 esac
1575                         else
1576                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1577                                 cat >> confdefs.h <<\EOF
1578 #define _LARGEFILE64_SOURCE 1
1579 EOF
1580
1581                                 cat >> confdefs.h <<\EOF
1582 #define _FILE_OFFSET_BITS 64
1583 EOF
1584
1585                         fi
1586                         ;;
1587                 esac
1588                 ;;
1589 #
1590 # Tests needed for SINIX large file support.
1591 #
1592     *sysv4*)
1593       if test $host = mips-sni-sysv4 ; then
1594         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1595 echo "configure:1596: checking for LFS support" >&5
1596         old_CPPFLAGS="$CPPFLAGS"
1597         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1598         if test "$cross_compiling" = yes; then
1599   SINIX_LFS_SUPPORT=cross
1600 else
1601   cat > conftest.$ac_ext <<EOF
1602 #line 1603 "configure"
1603 #include "confdefs.h"
1604
1605 #include <unistd.h>
1606 main () {
1607 #if _LFS64_LARGEFILE == 1
1608 exit(0);
1609 #else
1610 exit(1);
1611 #endif
1612 }
1613 EOF
1614 if { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1615 then
1616   SINIX_LFS_SUPPORT=yes
1617 else
1618   echo "configure: failed program was:" >&5
1619   cat conftest.$ac_ext >&5
1620   rm -fr conftest*
1621   SINIX_LFS_SUPPORT=no
1622 fi
1623 rm -fr conftest*
1624 fi
1625
1626         CPPFLAGS="$old_CPPFLAGS"
1627         if test x$SINIX_LFS_SUPPORT = xyes ; then
1628           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1629           cat >> confdefs.h <<\EOF
1630 #define _LARGEFILE64_SOURCE 1
1631 EOF
1632
1633           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1634           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1635           LIBS="`getconf LFS64_LIBS` $LIBS"
1636         fi
1637       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1638       fi
1639     ;;
1640
1641 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1642 #
1643     *linux*)
1644         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1645 echo "configure:1646: checking for LFS support" >&5
1646         old_CPPFLAGS="$CPPFLAGS"
1647         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1648        if test "$cross_compiling" = yes; then
1649   LINUX_LFS_SUPPORT=cross
1650 else
1651   cat > conftest.$ac_ext <<EOF
1652 #line 1653 "configure"
1653 #include "confdefs.h"
1654
1655 #include <unistd.h>
1656 #include <sys/utsname.h>
1657 main() {
1658 #if _LFS64_LARGEFILE == 1
1659        struct utsname uts;
1660        char *release;
1661        int major, minor;
1662
1663        /* Ensure this is glibc 2.2 or higher */
1664 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1665        int libc_major = __GLIBC__;
1666        int libc_minor = __GLIBC_MINOR__;
1667
1668        if (libc_major < 2)
1669               exit(1);
1670        if (libc_minor < 2)
1671               exit(1);
1672 #endif
1673
1674        /* Ensure this is kernel 2.4 or higher */
1675
1676        uname(&uts);
1677        release = uts.release;
1678        major = atoi(strsep(&release, "."));
1679        minor = atoi(strsep(&release, "."));
1680
1681        if (major > 2 || (major == 2 && minor > 3))
1682                exit(0);
1683        exit(1);
1684 #else
1685        exit(1);
1686 #endif
1687 }
1688
1689 EOF
1690 if { (eval echo configure:1691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1691 then
1692   LINUX_LFS_SUPPORT=yes
1693 else
1694   echo "configure: failed program was:" >&5
1695   cat conftest.$ac_ext >&5
1696   rm -fr conftest*
1697   LINUX_LFS_SUPPORT=no
1698 fi
1699 rm -fr conftest*
1700 fi
1701
1702         CPPFLAGS="$old_CPPFLAGS"
1703         if test x$LINUX_LFS_SUPPORT = xyes ; then
1704           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1705           cat >> confdefs.h <<\EOF
1706 #define _LARGEFILE64_SOURCE 1
1707 EOF
1708
1709           cat >> confdefs.h <<\EOF
1710 #define _FILE_OFFSET_BITS 64
1711 EOF
1712
1713           cat >> confdefs.h <<\EOF
1714 #define _GNU_SOURCE 1
1715 EOF
1716
1717         fi
1718        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1719                 ;;
1720
1721     *hurd*)
1722         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1723 echo "configure:1724: checking for LFS support" >&5
1724         old_CPPFLAGS="$CPPFLAGS"
1725         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1726         if test "$cross_compiling" = yes; then
1727   GLIBC_LFS_SUPPORT=cross
1728 else
1729   cat > conftest.$ac_ext <<EOF
1730 #line 1731 "configure"
1731 #include "confdefs.h"
1732
1733 #include <unistd.h>
1734 main () {
1735 #if _LFS64_LARGEFILE == 1
1736 exit(0);
1737 #else
1738 exit(1);
1739 #endif
1740 }
1741 EOF
1742 if { (eval echo configure:1743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1743 then
1744   GLIBC_LFS_SUPPORT=yes
1745 else
1746   echo "configure: failed program was:" >&5
1747   cat conftest.$ac_ext >&5
1748   rm -fr conftest*
1749   GLIBC_LFS_SUPPORT=no
1750 fi
1751 rm -fr conftest*
1752 fi
1753
1754         CPPFLAGS="$old_CPPFLAGS"
1755         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1756           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1757           cat >> confdefs.h <<\EOF
1758 #define _LARGEFILE64_SOURCE 1
1759 EOF
1760
1761           cat >> confdefs.h <<\EOF
1762 #define _GNU_SOURCE 1
1763 EOF
1764
1765         fi
1766       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1767     ;;
1768
1769 esac
1770
1771 echo $ac_n "checking for inline""... $ac_c" 1>&6
1772 echo "configure:1773: checking for inline" >&5
1773 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1774   echo $ac_n "(cached) $ac_c" 1>&6
1775 else
1776   ac_cv_c_inline=no
1777 for ac_kw in inline __inline__ __inline; do
1778   cat > conftest.$ac_ext <<EOF
1779 #line 1780 "configure"
1780 #include "confdefs.h"
1781
1782 int main() {
1783 } $ac_kw foo() {
1784 ; return 0; }
1785 EOF
1786 if { (eval echo configure:1787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1787   rm -rf conftest*
1788   ac_cv_c_inline=$ac_kw; break
1789 else
1790   echo "configure: failed program was:" >&5
1791   cat conftest.$ac_ext >&5
1792 fi
1793 rm -f conftest*
1794 done
1795
1796 fi
1797
1798 echo "$ac_t""$ac_cv_c_inline" 1>&6
1799 case "$ac_cv_c_inline" in
1800   inline | yes) ;;
1801   no) cat >> confdefs.h <<\EOF
1802 #define inline 
1803 EOF
1804  ;;
1805   *)  cat >> confdefs.h <<EOF
1806 #define inline $ac_cv_c_inline
1807 EOF
1808  ;;
1809 esac
1810
1811 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1812 echo "configure:1813: checking how to run the C preprocessor" >&5
1813 # On Suns, sometimes $CPP names a directory.
1814 if test -n "$CPP" && test -d "$CPP"; then
1815   CPP=
1816 fi
1817 if test -z "$CPP"; then
1818 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1819   echo $ac_n "(cached) $ac_c" 1>&6
1820 else
1821     # This must be in double quotes, not single quotes, because CPP may get
1822   # substituted into the Makefile and "${CC-cc}" will confuse make.
1823   CPP="${CC-cc} -E"
1824   # On the NeXT, cc -E runs the code through the compiler's parser,
1825   # not just through 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} -E -traditional-cpp"
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="${CC-cc} -nologo -E"
1860   cat > conftest.$ac_ext <<EOF
1861 #line 1862 "configure"
1862 #include "confdefs.h"
1863 #include <assert.h>
1864 Syntax Error
1865 EOF
1866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1867 { (eval echo configure:1868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1869 if test -z "$ac_err"; then
1870   :
1871 else
1872   echo "$ac_err" >&5
1873   echo "configure: failed program was:" >&5
1874   cat conftest.$ac_ext >&5
1875   rm -rf conftest*
1876   CPP=/lib/cpp
1877 fi
1878 rm -f conftest*
1879 fi
1880 rm -f conftest*
1881 fi
1882 rm -f conftest*
1883   ac_cv_prog_CPP="$CPP"
1884 fi
1885   CPP="$ac_cv_prog_CPP"
1886 else
1887   ac_cv_prog_CPP="$CPP"
1888 fi
1889 echo "$ac_t""$CPP" 1>&6
1890
1891 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1892 echo "configure:1893: checking for ANSI C header files" >&5
1893 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1894   echo $ac_n "(cached) $ac_c" 1>&6
1895 else
1896   cat > conftest.$ac_ext <<EOF
1897 #line 1898 "configure"
1898 #include "confdefs.h"
1899 #include <stdlib.h>
1900 #include <stdarg.h>
1901 #include <string.h>
1902 #include <float.h>
1903 EOF
1904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1905 { (eval echo configure:1906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1907 if test -z "$ac_err"; then
1908   rm -rf conftest*
1909   ac_cv_header_stdc=yes
1910 else
1911   echo "$ac_err" >&5
1912   echo "configure: failed program was:" >&5
1913   cat conftest.$ac_ext >&5
1914   rm -rf conftest*
1915   ac_cv_header_stdc=no
1916 fi
1917 rm -f conftest*
1918
1919 if test $ac_cv_header_stdc = yes; then
1920   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1921 cat > conftest.$ac_ext <<EOF
1922 #line 1923 "configure"
1923 #include "confdefs.h"
1924 #include <string.h>
1925 EOF
1926 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1927   egrep "memchr" >/dev/null 2>&1; then
1928   :
1929 else
1930   rm -rf conftest*
1931   ac_cv_header_stdc=no
1932 fi
1933 rm -f conftest*
1934
1935 fi
1936
1937 if test $ac_cv_header_stdc = yes; then
1938   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1939 cat > conftest.$ac_ext <<EOF
1940 #line 1941 "configure"
1941 #include "confdefs.h"
1942 #include <stdlib.h>
1943 EOF
1944 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1945   egrep "free" >/dev/null 2>&1; then
1946   :
1947 else
1948   rm -rf conftest*
1949   ac_cv_header_stdc=no
1950 fi
1951 rm -f conftest*
1952
1953 fi
1954
1955 if test $ac_cv_header_stdc = yes; then
1956   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1957 if test "$cross_compiling" = yes; then
1958   :
1959 else
1960   cat > conftest.$ac_ext <<EOF
1961 #line 1962 "configure"
1962 #include "confdefs.h"
1963 #include <ctype.h>
1964 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1965 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1966 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1967 int main () { int i; for (i = 0; i < 256; i++)
1968 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1969 exit (0); }
1970
1971 EOF
1972 if { (eval echo configure:1973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1973 then
1974   :
1975 else
1976   echo "configure: failed program was:" >&5
1977   cat conftest.$ac_ext >&5
1978   rm -fr conftest*
1979   ac_cv_header_stdc=no
1980 fi
1981 rm -fr conftest*
1982 fi
1983
1984 fi
1985 fi
1986
1987 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1988 if test $ac_cv_header_stdc = yes; then
1989   cat >> confdefs.h <<\EOF
1990 #define STDC_HEADERS 1
1991 EOF
1992
1993 fi
1994
1995 ac_header_dirent=no
1996 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1997 do
1998 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1999 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2000 echo "configure:2001: checking for $ac_hdr that defines DIR" >&5
2001 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2002   echo $ac_n "(cached) $ac_c" 1>&6
2003 else
2004   cat > conftest.$ac_ext <<EOF
2005 #line 2006 "configure"
2006 #include "confdefs.h"
2007 #include <sys/types.h>
2008 #include <$ac_hdr>
2009 int main() {
2010 DIR *dirp = 0;
2011 ; return 0; }
2012 EOF
2013 if { (eval echo configure:2014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2014   rm -rf conftest*
2015   eval "ac_cv_header_dirent_$ac_safe=yes"
2016 else
2017   echo "configure: failed program was:" >&5
2018   cat conftest.$ac_ext >&5
2019   rm -rf conftest*
2020   eval "ac_cv_header_dirent_$ac_safe=no"
2021 fi
2022 rm -f conftest*
2023 fi
2024 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2025   echo "$ac_t""yes" 1>&6
2026     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2027   cat >> confdefs.h <<EOF
2028 #define $ac_tr_hdr 1
2029 EOF
2030  ac_header_dirent=$ac_hdr; break
2031 else
2032   echo "$ac_t""no" 1>&6
2033 fi
2034 done
2035 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2036 if test $ac_header_dirent = dirent.h; then
2037 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2038 echo "configure:2039: checking for opendir in -ldir" >&5
2039 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2040 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2041   echo $ac_n "(cached) $ac_c" 1>&6
2042 else
2043   ac_save_LIBS="$LIBS"
2044 LIBS="-ldir  $LIBS"
2045 cat > conftest.$ac_ext <<EOF
2046 #line 2047 "configure"
2047 #include "confdefs.h"
2048 /* Override any gcc2 internal prototype to avoid an error.  */
2049 /* We use char because int might match the return type of a gcc2
2050     builtin and then its argument prototype would still apply.  */
2051 char opendir();
2052
2053 int main() {
2054 opendir()
2055 ; return 0; }
2056 EOF
2057 if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2058   rm -rf conftest*
2059   eval "ac_cv_lib_$ac_lib_var=yes"
2060 else
2061   echo "configure: failed program was:" >&5
2062   cat conftest.$ac_ext >&5
2063   rm -rf conftest*
2064   eval "ac_cv_lib_$ac_lib_var=no"
2065 fi
2066 rm -f conftest*
2067 LIBS="$ac_save_LIBS"
2068
2069 fi
2070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2071   echo "$ac_t""yes" 1>&6
2072   LIBS="$LIBS -ldir"
2073 else
2074   echo "$ac_t""no" 1>&6
2075 fi
2076
2077 else
2078 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2079 echo "configure:2080: checking for opendir in -lx" >&5
2080 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2081 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2082   echo $ac_n "(cached) $ac_c" 1>&6
2083 else
2084   ac_save_LIBS="$LIBS"
2085 LIBS="-lx  $LIBS"
2086 cat > conftest.$ac_ext <<EOF
2087 #line 2088 "configure"
2088 #include "confdefs.h"
2089 /* Override any gcc2 internal prototype to avoid an error.  */
2090 /* We use char because int might match the return type of a gcc2
2091     builtin and then its argument prototype would still apply.  */
2092 char opendir();
2093
2094 int main() {
2095 opendir()
2096 ; return 0; }
2097 EOF
2098 if { (eval echo configure:2099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2099   rm -rf conftest*
2100   eval "ac_cv_lib_$ac_lib_var=yes"
2101 else
2102   echo "configure: failed program was:" >&5
2103   cat conftest.$ac_ext >&5
2104   rm -rf conftest*
2105   eval "ac_cv_lib_$ac_lib_var=no"
2106 fi
2107 rm -f conftest*
2108 LIBS="$ac_save_LIBS"
2109
2110 fi
2111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2112   echo "$ac_t""yes" 1>&6
2113   LIBS="$LIBS -lx"
2114 else
2115   echo "$ac_t""no" 1>&6
2116 fi
2117
2118 fi
2119
2120 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2121 echo "configure:2122: checking whether time.h and sys/time.h may both be included" >&5
2122 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2123   echo $ac_n "(cached) $ac_c" 1>&6
2124 else
2125   cat > conftest.$ac_ext <<EOF
2126 #line 2127 "configure"
2127 #include "confdefs.h"
2128 #include <sys/types.h>
2129 #include <sys/time.h>
2130 #include <time.h>
2131 int main() {
2132 struct tm *tp;
2133 ; return 0; }
2134 EOF
2135 if { (eval echo configure:2136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2136   rm -rf conftest*
2137   ac_cv_header_time=yes
2138 else
2139   echo "configure: failed program was:" >&5
2140   cat conftest.$ac_ext >&5
2141   rm -rf conftest*
2142   ac_cv_header_time=no
2143 fi
2144 rm -f conftest*
2145 fi
2146
2147 echo "$ac_t""$ac_cv_header_time" 1>&6
2148 if test $ac_cv_header_time = yes; then
2149   cat >> confdefs.h <<\EOF
2150 #define TIME_WITH_SYS_TIME 1
2151 EOF
2152
2153 fi
2154
2155 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2156 echo "configure:2157: checking for sys/wait.h that is POSIX.1 compatible" >&5
2157 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2158   echo $ac_n "(cached) $ac_c" 1>&6
2159 else
2160   cat > conftest.$ac_ext <<EOF
2161 #line 2162 "configure"
2162 #include "confdefs.h"
2163 #include <sys/types.h>
2164 #include <sys/wait.h>
2165 #ifndef WEXITSTATUS
2166 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2167 #endif
2168 #ifndef WIFEXITED
2169 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2170 #endif
2171 int main() {
2172 int s;
2173 wait (&s);
2174 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2175 ; return 0; }
2176 EOF
2177 if { (eval echo configure:2178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2178   rm -rf conftest*
2179   ac_cv_header_sys_wait_h=yes
2180 else
2181   echo "configure: failed program was:" >&5
2182   cat conftest.$ac_ext >&5
2183   rm -rf conftest*
2184   ac_cv_header_sys_wait_h=no
2185 fi
2186 rm -f conftest*
2187 fi
2188
2189 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2190 if test $ac_cv_header_sys_wait_h = yes; then
2191   cat >> confdefs.h <<\EOF
2192 #define HAVE_SYS_WAIT_H 1
2193 EOF
2194
2195 fi
2196
2197 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2198 do
2199 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2200 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2201 echo "configure:2202: checking for $ac_hdr" >&5
2202 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2203   echo $ac_n "(cached) $ac_c" 1>&6
2204 else
2205   cat > conftest.$ac_ext <<EOF
2206 #line 2207 "configure"
2207 #include "confdefs.h"
2208 #include <$ac_hdr>
2209 EOF
2210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2211 { (eval echo configure:2212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2213 if test -z "$ac_err"; then
2214   rm -rf conftest*
2215   eval "ac_cv_header_$ac_safe=yes"
2216 else
2217   echo "$ac_err" >&5
2218   echo "configure: failed program was:" >&5
2219   cat conftest.$ac_ext >&5
2220   rm -rf conftest*
2221   eval "ac_cv_header_$ac_safe=no"
2222 fi
2223 rm -f conftest*
2224 fi
2225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2226   echo "$ac_t""yes" 1>&6
2227     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2228   cat >> confdefs.h <<EOF
2229 #define $ac_tr_hdr 1
2230 EOF
2231  
2232 else
2233   echo "$ac_t""no" 1>&6
2234 fi
2235 done
2236
2237 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2238 do
2239 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2240 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2241 echo "configure:2242: checking for $ac_hdr" >&5
2242 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2243   echo $ac_n "(cached) $ac_c" 1>&6
2244 else
2245   cat > conftest.$ac_ext <<EOF
2246 #line 2247 "configure"
2247 #include "confdefs.h"
2248 #include <$ac_hdr>
2249 EOF
2250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2251 { (eval echo configure:2252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2253 if test -z "$ac_err"; then
2254   rm -rf conftest*
2255   eval "ac_cv_header_$ac_safe=yes"
2256 else
2257   echo "$ac_err" >&5
2258   echo "configure: failed program was:" >&5
2259   cat conftest.$ac_ext >&5
2260   rm -rf conftest*
2261   eval "ac_cv_header_$ac_safe=no"
2262 fi
2263 rm -f conftest*
2264 fi
2265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2266   echo "$ac_t""yes" 1>&6
2267     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2268   cat >> confdefs.h <<EOF
2269 #define $ac_tr_hdr 1
2270 EOF
2271  
2272 else
2273   echo "$ac_t""no" 1>&6
2274 fi
2275 done
2276
2277 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2278 do
2279 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2280 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2281 echo "configure:2282: checking for $ac_hdr" >&5
2282 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2283   echo $ac_n "(cached) $ac_c" 1>&6
2284 else
2285   cat > conftest.$ac_ext <<EOF
2286 #line 2287 "configure"
2287 #include "confdefs.h"
2288 #include <$ac_hdr>
2289 EOF
2290 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2291 { (eval echo configure:2292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2292 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2293 if test -z "$ac_err"; then
2294   rm -rf conftest*
2295   eval "ac_cv_header_$ac_safe=yes"
2296 else
2297   echo "$ac_err" >&5
2298   echo "configure: failed program was:" >&5
2299   cat conftest.$ac_ext >&5
2300   rm -rf conftest*
2301   eval "ac_cv_header_$ac_safe=no"
2302 fi
2303 rm -f conftest*
2304 fi
2305 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2306   echo "$ac_t""yes" 1>&6
2307     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2308   cat >> confdefs.h <<EOF
2309 #define $ac_tr_hdr 1
2310 EOF
2311  
2312 else
2313   echo "$ac_t""no" 1>&6
2314 fi
2315 done
2316
2317 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2318 do
2319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2321 echo "configure:2322: checking for $ac_hdr" >&5
2322 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2323   echo $ac_n "(cached) $ac_c" 1>&6
2324 else
2325   cat > conftest.$ac_ext <<EOF
2326 #line 2327 "configure"
2327 #include "confdefs.h"
2328 #include <$ac_hdr>
2329 EOF
2330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2331 { (eval echo configure:2332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2333 if test -z "$ac_err"; then
2334   rm -rf conftest*
2335   eval "ac_cv_header_$ac_safe=yes"
2336 else
2337   echo "$ac_err" >&5
2338   echo "configure: failed program was:" >&5
2339   cat conftest.$ac_ext >&5
2340   rm -rf conftest*
2341   eval "ac_cv_header_$ac_safe=no"
2342 fi
2343 rm -f conftest*
2344 fi
2345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2346   echo "$ac_t""yes" 1>&6
2347     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2348   cat >> confdefs.h <<EOF
2349 #define $ac_tr_hdr 1
2350 EOF
2351  
2352 else
2353   echo "$ac_t""no" 1>&6
2354 fi
2355 done
2356
2357 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
2358 do
2359 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2360 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2361 echo "configure:2362: checking for $ac_hdr" >&5
2362 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2363   echo $ac_n "(cached) $ac_c" 1>&6
2364 else
2365   cat > conftest.$ac_ext <<EOF
2366 #line 2367 "configure"
2367 #include "confdefs.h"
2368 #include <$ac_hdr>
2369 EOF
2370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2371 { (eval echo configure:2372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2373 if test -z "$ac_err"; then
2374   rm -rf conftest*
2375   eval "ac_cv_header_$ac_safe=yes"
2376 else
2377   echo "$ac_err" >&5
2378   echo "configure: failed program was:" >&5
2379   cat conftest.$ac_ext >&5
2380   rm -rf conftest*
2381   eval "ac_cv_header_$ac_safe=no"
2382 fi
2383 rm -f conftest*
2384 fi
2385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2386   echo "$ac_t""yes" 1>&6
2387     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2388   cat >> confdefs.h <<EOF
2389 #define $ac_tr_hdr 1
2390 EOF
2391  
2392 else
2393   echo "$ac_t""no" 1>&6
2394 fi
2395 done
2396
2397 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2398 do
2399 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2400 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2401 echo "configure:2402: checking for $ac_hdr" >&5
2402 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2403   echo $ac_n "(cached) $ac_c" 1>&6
2404 else
2405   cat > conftest.$ac_ext <<EOF
2406 #line 2407 "configure"
2407 #include "confdefs.h"
2408 #include <$ac_hdr>
2409 EOF
2410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2411 { (eval echo configure:2412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2413 if test -z "$ac_err"; then
2414   rm -rf conftest*
2415   eval "ac_cv_header_$ac_safe=yes"
2416 else
2417   echo "$ac_err" >&5
2418   echo "configure: failed program was:" >&5
2419   cat conftest.$ac_ext >&5
2420   rm -rf conftest*
2421   eval "ac_cv_header_$ac_safe=no"
2422 fi
2423 rm -f conftest*
2424 fi
2425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2426   echo "$ac_t""yes" 1>&6
2427     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2428   cat >> confdefs.h <<EOF
2429 #define $ac_tr_hdr 1
2430 EOF
2431  
2432 else
2433   echo "$ac_t""no" 1>&6
2434 fi
2435 done
2436
2437 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2438 do
2439 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2440 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2441 echo "configure:2442: checking for $ac_hdr" >&5
2442 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2443   echo $ac_n "(cached) $ac_c" 1>&6
2444 else
2445   cat > conftest.$ac_ext <<EOF
2446 #line 2447 "configure"
2447 #include "confdefs.h"
2448 #include <$ac_hdr>
2449 EOF
2450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2451 { (eval echo configure:2452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2453 if test -z "$ac_err"; then
2454   rm -rf conftest*
2455   eval "ac_cv_header_$ac_safe=yes"
2456 else
2457   echo "$ac_err" >&5
2458   echo "configure: failed program was:" >&5
2459   cat conftest.$ac_ext >&5
2460   rm -rf conftest*
2461   eval "ac_cv_header_$ac_safe=no"
2462 fi
2463 rm -f conftest*
2464 fi
2465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2466   echo "$ac_t""yes" 1>&6
2467     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2468   cat >> confdefs.h <<EOF
2469 #define $ac_tr_hdr 1
2470 EOF
2471  
2472 else
2473   echo "$ac_t""no" 1>&6
2474 fi
2475 done
2476
2477 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2478 do
2479 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2480 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2481 echo "configure:2482: checking for $ac_hdr" >&5
2482 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2483   echo $ac_n "(cached) $ac_c" 1>&6
2484 else
2485   cat > conftest.$ac_ext <<EOF
2486 #line 2487 "configure"
2487 #include "confdefs.h"
2488 #include <$ac_hdr>
2489 EOF
2490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2491 { (eval echo configure:2492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2493 if test -z "$ac_err"; then
2494   rm -rf conftest*
2495   eval "ac_cv_header_$ac_safe=yes"
2496 else
2497   echo "$ac_err" >&5
2498   echo "configure: failed program was:" >&5
2499   cat conftest.$ac_ext >&5
2500   rm -rf conftest*
2501   eval "ac_cv_header_$ac_safe=no"
2502 fi
2503 rm -f conftest*
2504 fi
2505 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2506   echo "$ac_t""yes" 1>&6
2507     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2508   cat >> confdefs.h <<EOF
2509 #define $ac_tr_hdr 1
2510 EOF
2511  
2512 else
2513   echo "$ac_t""no" 1>&6
2514 fi
2515 done
2516
2517
2518 #
2519 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2520 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2521 #
2522 case "$host_os" in
2523     *hpux*)
2524                 cat > conftest.$ac_ext <<EOF
2525 #line 2526 "configure"
2526 #include "confdefs.h"
2527 #include <shadow.h>
2528 int main() {
2529 struct spwd testme
2530 ; return 0; }
2531 EOF
2532 if { (eval echo configure:2533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2533   rm -rf conftest*
2534   ac_cv_header_shadow_h=yes
2535 else
2536   echo "configure: failed program was:" >&5
2537   cat conftest.$ac_ext >&5
2538   rm -rf conftest*
2539   ac_cv_header_shadow_h=no
2540 fi
2541 rm -f conftest*
2542                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2543                    cat >> confdefs.h <<\EOF
2544 #define HAVE_SHADOW_H 1
2545 EOF
2546
2547                 fi
2548         ;;
2549 esac
2550 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2551 do
2552 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2553 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2554 echo "configure:2555: checking for $ac_hdr" >&5
2555 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2556   echo $ac_n "(cached) $ac_c" 1>&6
2557 else
2558   cat > conftest.$ac_ext <<EOF
2559 #line 2560 "configure"
2560 #include "confdefs.h"
2561 #include <$ac_hdr>
2562 EOF
2563 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2564 { (eval echo configure:2565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2565 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2566 if test -z "$ac_err"; then
2567   rm -rf conftest*
2568   eval "ac_cv_header_$ac_safe=yes"
2569 else
2570   echo "$ac_err" >&5
2571   echo "configure: failed program was:" >&5
2572   cat conftest.$ac_ext >&5
2573   rm -rf conftest*
2574   eval "ac_cv_header_$ac_safe=no"
2575 fi
2576 rm -f conftest*
2577 fi
2578 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2579   echo "$ac_t""yes" 1>&6
2580     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2581   cat >> confdefs.h <<EOF
2582 #define $ac_tr_hdr 1
2583 EOF
2584  
2585 else
2586   echo "$ac_t""no" 1>&6
2587 fi
2588 done
2589
2590 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2591 do
2592 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2593 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2594 echo "configure:2595: checking for $ac_hdr" >&5
2595 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2596   echo $ac_n "(cached) $ac_c" 1>&6
2597 else
2598   cat > conftest.$ac_ext <<EOF
2599 #line 2600 "configure"
2600 #include "confdefs.h"
2601 #include <$ac_hdr>
2602 EOF
2603 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2604 { (eval echo configure:2605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2605 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2606 if test -z "$ac_err"; then
2607   rm -rf conftest*
2608   eval "ac_cv_header_$ac_safe=yes"
2609 else
2610   echo "$ac_err" >&5
2611   echo "configure: failed program was:" >&5
2612   cat conftest.$ac_ext >&5
2613   rm -rf conftest*
2614   eval "ac_cv_header_$ac_safe=no"
2615 fi
2616 rm -f conftest*
2617 fi
2618 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2619   echo "$ac_t""yes" 1>&6
2620     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2621   cat >> confdefs.h <<EOF
2622 #define $ac_tr_hdr 1
2623 EOF
2624  
2625 else
2626   echo "$ac_t""no" 1>&6
2627 fi
2628 done
2629
2630 for ac_hdr in stropts.h poll.h
2631 do
2632 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2633 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2634 echo "configure:2635: checking for $ac_hdr" >&5
2635 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2636   echo $ac_n "(cached) $ac_c" 1>&6
2637 else
2638   cat > conftest.$ac_ext <<EOF
2639 #line 2640 "configure"
2640 #include "confdefs.h"
2641 #include <$ac_hdr>
2642 EOF
2643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2644 { (eval echo configure:2645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2645 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2646 if test -z "$ac_err"; then
2647   rm -rf conftest*
2648   eval "ac_cv_header_$ac_safe=yes"
2649 else
2650   echo "$ac_err" >&5
2651   echo "configure: failed program was:" >&5
2652   cat conftest.$ac_ext >&5
2653   rm -rf conftest*
2654   eval "ac_cv_header_$ac_safe=no"
2655 fi
2656 rm -f conftest*
2657 fi
2658 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2659   echo "$ac_t""yes" 1>&6
2660     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2661   cat >> confdefs.h <<EOF
2662 #define $ac_tr_hdr 1
2663 EOF
2664  
2665 else
2666   echo "$ac_t""no" 1>&6
2667 fi
2668 done
2669
2670 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2671 do
2672 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2673 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2674 echo "configure:2675: checking for $ac_hdr" >&5
2675 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2676   echo $ac_n "(cached) $ac_c" 1>&6
2677 else
2678   cat > conftest.$ac_ext <<EOF
2679 #line 2680 "configure"
2680 #include "confdefs.h"
2681 #include <$ac_hdr>
2682 EOF
2683 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2684 { (eval echo configure:2685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2685 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2686 if test -z "$ac_err"; then
2687   rm -rf conftest*
2688   eval "ac_cv_header_$ac_safe=yes"
2689 else
2690   echo "$ac_err" >&5
2691   echo "configure: failed program was:" >&5
2692   cat conftest.$ac_ext >&5
2693   rm -rf conftest*
2694   eval "ac_cv_header_$ac_safe=no"
2695 fi
2696 rm -f conftest*
2697 fi
2698 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2699   echo "$ac_t""yes" 1>&6
2700     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2701   cat >> confdefs.h <<EOF
2702 #define $ac_tr_hdr 1
2703 EOF
2704  
2705 else
2706   echo "$ac_t""no" 1>&6
2707 fi
2708 done
2709
2710 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2711 do
2712 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2713 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2714 echo "configure:2715: checking for $ac_hdr" >&5
2715 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2716   echo $ac_n "(cached) $ac_c" 1>&6
2717 else
2718   cat > conftest.$ac_ext <<EOF
2719 #line 2720 "configure"
2720 #include "confdefs.h"
2721 #include <$ac_hdr>
2722 EOF
2723 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2724 { (eval echo configure:2725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2725 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2726 if test -z "$ac_err"; then
2727   rm -rf conftest*
2728   eval "ac_cv_header_$ac_safe=yes"
2729 else
2730   echo "$ac_err" >&5
2731   echo "configure: failed program was:" >&5
2732   cat conftest.$ac_ext >&5
2733   rm -rf conftest*
2734   eval "ac_cv_header_$ac_safe=no"
2735 fi
2736 rm -f conftest*
2737 fi
2738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2739   echo "$ac_t""yes" 1>&6
2740     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2741   cat >> confdefs.h <<EOF
2742 #define $ac_tr_hdr 1
2743 EOF
2744  
2745 else
2746   echo "$ac_t""no" 1>&6
2747 fi
2748 done
2749
2750
2751 # For experimental utmp support (lastlog on some BSD-like systems)
2752 for ac_hdr in utmp.h utmpx.h lastlog.h
2753 do
2754 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2755 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2756 echo "configure:2757: checking for $ac_hdr" >&5
2757 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2758   echo $ac_n "(cached) $ac_c" 1>&6
2759 else
2760   cat > conftest.$ac_ext <<EOF
2761 #line 2762 "configure"
2762 #include "confdefs.h"
2763 #include <$ac_hdr>
2764 EOF
2765 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2766 { (eval echo configure:2767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2767 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2768 if test -z "$ac_err"; then
2769   rm -rf conftest*
2770   eval "ac_cv_header_$ac_safe=yes"
2771 else
2772   echo "$ac_err" >&5
2773   echo "configure: failed program was:" >&5
2774   cat conftest.$ac_ext >&5
2775   rm -rf conftest*
2776   eval "ac_cv_header_$ac_safe=no"
2777 fi
2778 rm -f conftest*
2779 fi
2780 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2781   echo "$ac_t""yes" 1>&6
2782     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2783   cat >> confdefs.h <<EOF
2784 #define $ac_tr_hdr 1
2785 EOF
2786  
2787 else
2788   echo "$ac_t""no" 1>&6
2789 fi
2790 done
2791
2792  
2793 # For quotas on Veritas VxFS filesystems
2794 for ac_hdr in sys/fs/vx_quota.h
2795 do
2796 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2797 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2798 echo "configure:2799: checking for $ac_hdr" >&5
2799 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2800   echo $ac_n "(cached) $ac_c" 1>&6
2801 else
2802   cat > conftest.$ac_ext <<EOF
2803 #line 2804 "configure"
2804 #include "confdefs.h"
2805 #include <$ac_hdr>
2806 EOF
2807 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2808 { (eval echo configure:2809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2809 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2810 if test -z "$ac_err"; then
2811   rm -rf conftest*
2812   eval "ac_cv_header_$ac_safe=yes"
2813 else
2814   echo "$ac_err" >&5
2815   echo "configure: failed program was:" >&5
2816   cat conftest.$ac_ext >&5
2817   rm -rf conftest*
2818   eval "ac_cv_header_$ac_safe=no"
2819 fi
2820 rm -f conftest*
2821 fi
2822 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2823   echo "$ac_t""yes" 1>&6
2824     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2825   cat >> confdefs.h <<EOF
2826 #define $ac_tr_hdr 1
2827 EOF
2828  
2829 else
2830   echo "$ac_t""no" 1>&6
2831 fi
2832 done
2833
2834
2835 # For quotas on Linux XFS filesystems
2836 for ac_hdr in linux/xqm.h
2837 do
2838 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2839 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2840 echo "configure:2841: checking for $ac_hdr" >&5
2841 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2842   echo $ac_n "(cached) $ac_c" 1>&6
2843 else
2844   cat > conftest.$ac_ext <<EOF
2845 #line 2846 "configure"
2846 #include "confdefs.h"
2847 #include <$ac_hdr>
2848 EOF
2849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2850 { (eval echo configure:2851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2852 if test -z "$ac_err"; then
2853   rm -rf conftest*
2854   eval "ac_cv_header_$ac_safe=yes"
2855 else
2856   echo "$ac_err" >&5
2857   echo "configure: failed program was:" >&5
2858   cat conftest.$ac_ext >&5
2859   rm -rf conftest*
2860   eval "ac_cv_header_$ac_safe=no"
2861 fi
2862 rm -f conftest*
2863 fi
2864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2865   echo "$ac_t""yes" 1>&6
2866     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2867   cat >> confdefs.h <<EOF
2868 #define $ac_tr_hdr 1
2869 EOF
2870  
2871 else
2872   echo "$ac_t""no" 1>&6
2873 fi
2874 done
2875
2876
2877 echo $ac_n "checking size of int""... $ac_c" 1>&6
2878 echo "configure:2879: checking size of int" >&5
2879 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2880   echo $ac_n "(cached) $ac_c" 1>&6
2881 else
2882   if test "$cross_compiling" = yes; then
2883   ac_cv_sizeof_int=cross
2884 else
2885   cat > conftest.$ac_ext <<EOF
2886 #line 2887 "configure"
2887 #include "confdefs.h"
2888 #include <stdio.h>
2889 main()
2890 {
2891   FILE *f=fopen("conftestval", "w");
2892   if (!f) exit(1);
2893   fprintf(f, "%d\n", sizeof(int));
2894   exit(0);
2895 }
2896 EOF
2897 if { (eval echo configure:2898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2898 then
2899   ac_cv_sizeof_int=`cat conftestval`
2900 else
2901   echo "configure: failed program was:" >&5
2902   cat conftest.$ac_ext >&5
2903   rm -fr conftest*
2904   ac_cv_sizeof_int=0
2905 fi
2906 rm -fr conftest*
2907 fi
2908
2909 fi
2910 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2911 cat >> confdefs.h <<EOF
2912 #define SIZEOF_INT $ac_cv_sizeof_int
2913 EOF
2914
2915
2916 echo $ac_n "checking size of long""... $ac_c" 1>&6
2917 echo "configure:2918: checking size of long" >&5
2918 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2919   echo $ac_n "(cached) $ac_c" 1>&6
2920 else
2921   if test "$cross_compiling" = yes; then
2922   ac_cv_sizeof_long=cross
2923 else
2924   cat > conftest.$ac_ext <<EOF
2925 #line 2926 "configure"
2926 #include "confdefs.h"
2927 #include <stdio.h>
2928 main()
2929 {
2930   FILE *f=fopen("conftestval", "w");
2931   if (!f) exit(1);
2932   fprintf(f, "%d\n", sizeof(long));
2933   exit(0);
2934 }
2935 EOF
2936 if { (eval echo configure:2937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2937 then
2938   ac_cv_sizeof_long=`cat conftestval`
2939 else
2940   echo "configure: failed program was:" >&5
2941   cat conftest.$ac_ext >&5
2942   rm -fr conftest*
2943   ac_cv_sizeof_long=0
2944 fi
2945 rm -fr conftest*
2946 fi
2947
2948 fi
2949 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2950 cat >> confdefs.h <<EOF
2951 #define SIZEOF_LONG $ac_cv_sizeof_long
2952 EOF
2953
2954
2955 echo $ac_n "checking size of short""... $ac_c" 1>&6
2956 echo "configure:2957: checking size of short" >&5
2957 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2958   echo $ac_n "(cached) $ac_c" 1>&6
2959 else
2960   if test "$cross_compiling" = yes; then
2961   ac_cv_sizeof_short=cross
2962 else
2963   cat > conftest.$ac_ext <<EOF
2964 #line 2965 "configure"
2965 #include "confdefs.h"
2966 #include <stdio.h>
2967 main()
2968 {
2969   FILE *f=fopen("conftestval", "w");
2970   if (!f) exit(1);
2971   fprintf(f, "%d\n", sizeof(short));
2972   exit(0);
2973 }
2974 EOF
2975 if { (eval echo configure:2976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2976 then
2977   ac_cv_sizeof_short=`cat conftestval`
2978 else
2979   echo "configure: failed program was:" >&5
2980   cat conftest.$ac_ext >&5
2981   rm -fr conftest*
2982   ac_cv_sizeof_short=0
2983 fi
2984 rm -fr conftest*
2985 fi
2986
2987 fi
2988 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2989 cat >> confdefs.h <<EOF
2990 #define SIZEOF_SHORT $ac_cv_sizeof_short
2991 EOF
2992
2993
2994
2995 echo $ac_n "checking for working const""... $ac_c" 1>&6
2996 echo "configure:2997: checking for working const" >&5
2997 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2998   echo $ac_n "(cached) $ac_c" 1>&6
2999 else
3000   cat > conftest.$ac_ext <<EOF
3001 #line 3002 "configure"
3002 #include "confdefs.h"
3003
3004 int main() {
3005
3006 /* Ultrix mips cc rejects this.  */
3007 typedef int charset[2]; const charset x;
3008 /* SunOS 4.1.1 cc rejects this.  */
3009 char const *const *ccp;
3010 char **p;
3011 /* NEC SVR4.0.2 mips cc rejects this.  */
3012 struct point {int x, y;};
3013 static struct point const zero = {0,0};
3014 /* AIX XL C 1.02.0.0 rejects this.
3015    It does not let you subtract one const X* pointer from another in an arm
3016    of an if-expression whose if-part is not a constant expression */
3017 const char *g = "string";
3018 ccp = &g + (g ? g-g : 0);
3019 /* HPUX 7.0 cc rejects these. */
3020 ++ccp;
3021 p = (char**) ccp;
3022 ccp = (char const *const *) p;
3023 { /* SCO 3.2v4 cc rejects this.  */
3024   char *t;
3025   char const *s = 0 ? (char *) 0 : (char const *) 0;
3026
3027   *t++ = 0;
3028 }
3029 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3030   int x[] = {25, 17};
3031   const int *foo = &x[0];
3032   ++foo;
3033 }
3034 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3035   typedef const int *iptr;
3036   iptr p = 0;
3037   ++p;
3038 }
3039 { /* AIX XL C 1.02.0.0 rejects this saying
3040      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3041   struct s { int j; const int *ap[3]; };
3042   struct s *b; b->j = 5;
3043 }
3044 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3045   const int foo = 10;
3046 }
3047
3048 ; return 0; }
3049 EOF
3050 if { (eval echo configure:3051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3051   rm -rf conftest*
3052   ac_cv_c_const=yes
3053 else
3054   echo "configure: failed program was:" >&5
3055   cat conftest.$ac_ext >&5
3056   rm -rf conftest*
3057   ac_cv_c_const=no
3058 fi
3059 rm -f conftest*
3060 fi
3061
3062 echo "$ac_t""$ac_cv_c_const" 1>&6
3063 if test $ac_cv_c_const = no; then
3064   cat >> confdefs.h <<\EOF
3065 #define const 
3066 EOF
3067
3068 fi
3069
3070 echo $ac_n "checking for inline""... $ac_c" 1>&6
3071 echo "configure:3072: checking for inline" >&5
3072 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3073   echo $ac_n "(cached) $ac_c" 1>&6
3074 else
3075   ac_cv_c_inline=no
3076 for ac_kw in inline __inline__ __inline; do
3077   cat > conftest.$ac_ext <<EOF
3078 #line 3079 "configure"
3079 #include "confdefs.h"
3080
3081 int main() {
3082 } $ac_kw foo() {
3083 ; return 0; }
3084 EOF
3085 if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3086   rm -rf conftest*
3087   ac_cv_c_inline=$ac_kw; break
3088 else
3089   echo "configure: failed program was:" >&5
3090   cat conftest.$ac_ext >&5
3091 fi
3092 rm -f conftest*
3093 done
3094
3095 fi
3096
3097 echo "$ac_t""$ac_cv_c_inline" 1>&6
3098 case "$ac_cv_c_inline" in
3099   inline | yes) ;;
3100   no) cat >> confdefs.h <<\EOF
3101 #define inline 
3102 EOF
3103  ;;
3104   *)  cat >> confdefs.h <<EOF
3105 #define inline $ac_cv_c_inline
3106 EOF
3107  ;;
3108 esac
3109
3110 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3111 echo "configure:3112: checking whether byte ordering is bigendian" >&5
3112 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3113   echo $ac_n "(cached) $ac_c" 1>&6
3114 else
3115   ac_cv_c_bigendian=unknown
3116 # See if sys/param.h defines the BYTE_ORDER macro.
3117 cat > conftest.$ac_ext <<EOF
3118 #line 3119 "configure"
3119 #include "confdefs.h"
3120 #include <sys/types.h>
3121 #include <sys/param.h>
3122 int main() {
3123
3124 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3125  bogus endian macros
3126 #endif
3127 ; return 0; }
3128 EOF
3129 if { (eval echo configure:3130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3130   rm -rf conftest*
3131   # It does; now see whether it defined to BIG_ENDIAN or not.
3132 cat > conftest.$ac_ext <<EOF
3133 #line 3134 "configure"
3134 #include "confdefs.h"
3135 #include <sys/types.h>
3136 #include <sys/param.h>
3137 int main() {
3138
3139 #if BYTE_ORDER != BIG_ENDIAN
3140  not big endian
3141 #endif
3142 ; return 0; }
3143 EOF
3144 if { (eval echo configure:3145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3145   rm -rf conftest*
3146   ac_cv_c_bigendian=yes
3147 else
3148   echo "configure: failed program was:" >&5
3149   cat conftest.$ac_ext >&5
3150   rm -rf conftest*
3151   ac_cv_c_bigendian=no
3152 fi
3153 rm -f conftest*
3154 else
3155   echo "configure: failed program was:" >&5
3156   cat conftest.$ac_ext >&5
3157 fi
3158 rm -f conftest*
3159 if test $ac_cv_c_bigendian = unknown; then
3160 if test "$cross_compiling" = yes; then
3161     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3162 else
3163   cat > conftest.$ac_ext <<EOF
3164 #line 3165 "configure"
3165 #include "confdefs.h"
3166 main () {
3167   /* Are we little or big endian?  From Harbison&Steele.  */
3168   union
3169   {
3170     long l;
3171     char c[sizeof (long)];
3172   } u;
3173   u.l = 1;
3174   exit (u.c[sizeof (long) - 1] == 1);
3175 }
3176 EOF
3177 if { (eval echo configure:3178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3178 then
3179   ac_cv_c_bigendian=no
3180 else
3181   echo "configure: failed program was:" >&5
3182   cat conftest.$ac_ext >&5
3183   rm -fr conftest*
3184   ac_cv_c_bigendian=yes
3185 fi
3186 rm -fr conftest*
3187 fi
3188
3189 fi
3190 fi
3191
3192 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3193 if test $ac_cv_c_bigendian = yes; then
3194   cat >> confdefs.h <<\EOF
3195 #define WORDS_BIGENDIAN 1
3196 EOF
3197
3198 fi
3199
3200 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3201 echo "configure:3202: checking whether char is unsigned" >&5
3202 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3203   echo $ac_n "(cached) $ac_c" 1>&6
3204 else
3205   if test "$GCC" = yes; then
3206   # GCC predefines this symbol on systems where it applies.
3207 cat > conftest.$ac_ext <<EOF
3208 #line 3209 "configure"
3209 #include "confdefs.h"
3210 #ifdef __CHAR_UNSIGNED__
3211   yes
3212 #endif
3213
3214 EOF
3215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3216   egrep "yes" >/dev/null 2>&1; then
3217   rm -rf conftest*
3218   ac_cv_c_char_unsigned=yes
3219 else
3220   rm -rf conftest*
3221   ac_cv_c_char_unsigned=no
3222 fi
3223 rm -f conftest*
3224
3225 else
3226 if test "$cross_compiling" = yes; then
3227     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3228 else
3229   cat > conftest.$ac_ext <<EOF
3230 #line 3231 "configure"
3231 #include "confdefs.h"
3232 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3233 #if !defined(__STDC__) || __STDC__ != 1
3234 #define volatile
3235 #endif
3236 main() {
3237   volatile char c = 255; exit(c < 0);
3238 }
3239 EOF
3240 if { (eval echo configure:3241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3241 then
3242   ac_cv_c_char_unsigned=yes
3243 else
3244   echo "configure: failed program was:" >&5
3245   cat conftest.$ac_ext >&5
3246   rm -fr conftest*
3247   ac_cv_c_char_unsigned=no
3248 fi
3249 rm -fr conftest*
3250 fi
3251
3252 fi
3253 fi
3254
3255 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3256 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3257   cat >> confdefs.h <<\EOF
3258 #define __CHAR_UNSIGNED__ 1
3259 EOF
3260
3261 fi
3262
3263
3264 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3265 echo "configure:3266: checking return type of signal handlers" >&5
3266 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3267   echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269   cat > conftest.$ac_ext <<EOF
3270 #line 3271 "configure"
3271 #include "confdefs.h"
3272 #include <sys/types.h>
3273 #include <signal.h>
3274 #ifdef signal
3275 #undef signal
3276 #endif
3277 #ifdef __cplusplus
3278 extern "C" void (*signal (int, void (*)(int)))(int);
3279 #else
3280 void (*signal ()) ();
3281 #endif
3282
3283 int main() {
3284 int i;
3285 ; return 0; }
3286 EOF
3287 if { (eval echo configure:3288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3288   rm -rf conftest*
3289   ac_cv_type_signal=void
3290 else
3291   echo "configure: failed program was:" >&5
3292   cat conftest.$ac_ext >&5
3293   rm -rf conftest*
3294   ac_cv_type_signal=int
3295 fi
3296 rm -f conftest*
3297 fi
3298
3299 echo "$ac_t""$ac_cv_type_signal" 1>&6
3300 cat >> confdefs.h <<EOF
3301 #define RETSIGTYPE $ac_cv_type_signal
3302 EOF
3303
3304
3305 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3306 echo "configure:3307: checking for uid_t in sys/types.h" >&5
3307 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3308   echo $ac_n "(cached) $ac_c" 1>&6
3309 else
3310   cat > conftest.$ac_ext <<EOF
3311 #line 3312 "configure"
3312 #include "confdefs.h"
3313 #include <sys/types.h>
3314 EOF
3315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3316   egrep "uid_t" >/dev/null 2>&1; then
3317   rm -rf conftest*
3318   ac_cv_type_uid_t=yes
3319 else
3320   rm -rf conftest*
3321   ac_cv_type_uid_t=no
3322 fi
3323 rm -f conftest*
3324
3325 fi
3326
3327 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3328 if test $ac_cv_type_uid_t = no; then
3329   cat >> confdefs.h <<\EOF
3330 #define uid_t int
3331 EOF
3332
3333   cat >> confdefs.h <<\EOF
3334 #define gid_t int
3335 EOF
3336
3337 fi
3338
3339 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3340 echo "configure:3341: checking for mode_t" >&5
3341 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3342   echo $ac_n "(cached) $ac_c" 1>&6
3343 else
3344   cat > conftest.$ac_ext <<EOF
3345 #line 3346 "configure"
3346 #include "confdefs.h"
3347 #include <sys/types.h>
3348 #if STDC_HEADERS
3349 #include <stdlib.h>
3350 #include <stddef.h>
3351 #endif
3352 EOF
3353 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3354   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3355   rm -rf conftest*
3356   ac_cv_type_mode_t=yes
3357 else
3358   rm -rf conftest*
3359   ac_cv_type_mode_t=no
3360 fi
3361 rm -f conftest*
3362
3363 fi
3364 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3365 if test $ac_cv_type_mode_t = no; then
3366   cat >> confdefs.h <<\EOF
3367 #define mode_t int
3368 EOF
3369
3370 fi
3371
3372 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3373 echo "configure:3374: checking for off_t" >&5
3374 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3375   echo $ac_n "(cached) $ac_c" 1>&6
3376 else
3377   cat > conftest.$ac_ext <<EOF
3378 #line 3379 "configure"
3379 #include "confdefs.h"
3380 #include <sys/types.h>
3381 #if STDC_HEADERS
3382 #include <stdlib.h>
3383 #include <stddef.h>
3384 #endif
3385 EOF
3386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3387   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3388   rm -rf conftest*
3389   ac_cv_type_off_t=yes
3390 else
3391   rm -rf conftest*
3392   ac_cv_type_off_t=no
3393 fi
3394 rm -f conftest*
3395
3396 fi
3397 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3398 if test $ac_cv_type_off_t = no; then
3399   cat >> confdefs.h <<\EOF
3400 #define off_t long
3401 EOF
3402
3403 fi
3404
3405 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3406 echo "configure:3407: checking for size_t" >&5
3407 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <sys/types.h>
3414 #if STDC_HEADERS
3415 #include <stdlib.h>
3416 #include <stddef.h>
3417 #endif
3418 EOF
3419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3420   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3421   rm -rf conftest*
3422   ac_cv_type_size_t=yes
3423 else
3424   rm -rf conftest*
3425   ac_cv_type_size_t=no
3426 fi
3427 rm -f conftest*
3428
3429 fi
3430 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3431 if test $ac_cv_type_size_t = no; then
3432   cat >> confdefs.h <<\EOF
3433 #define size_t unsigned
3434 EOF
3435
3436 fi
3437
3438 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3439 echo "configure:3440: checking for pid_t" >&5
3440 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3441   echo $ac_n "(cached) $ac_c" 1>&6
3442 else
3443   cat > conftest.$ac_ext <<EOF
3444 #line 3445 "configure"
3445 #include "confdefs.h"
3446 #include <sys/types.h>
3447 #if STDC_HEADERS
3448 #include <stdlib.h>
3449 #include <stddef.h>
3450 #endif
3451 EOF
3452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3453   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3454   rm -rf conftest*
3455   ac_cv_type_pid_t=yes
3456 else
3457   rm -rf conftest*
3458   ac_cv_type_pid_t=no
3459 fi
3460 rm -f conftest*
3461
3462 fi
3463 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3464 if test $ac_cv_type_pid_t = no; then
3465   cat >> confdefs.h <<\EOF
3466 #define pid_t int
3467 EOF
3468
3469 fi
3470
3471 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3472 echo "configure:3473: checking for st_rdev in struct stat" >&5
3473 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3474   echo $ac_n "(cached) $ac_c" 1>&6
3475 else
3476   cat > conftest.$ac_ext <<EOF
3477 #line 3478 "configure"
3478 #include "confdefs.h"
3479 #include <sys/types.h>
3480 #include <sys/stat.h>
3481 int main() {
3482 struct stat s; s.st_rdev;
3483 ; return 0; }
3484 EOF
3485 if { (eval echo configure:3486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3486   rm -rf conftest*
3487   ac_cv_struct_st_rdev=yes
3488 else
3489   echo "configure: failed program was:" >&5
3490   cat conftest.$ac_ext >&5
3491   rm -rf conftest*
3492   ac_cv_struct_st_rdev=no
3493 fi
3494 rm -f conftest*
3495 fi
3496
3497 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3498 if test $ac_cv_struct_st_rdev = yes; then
3499   cat >> confdefs.h <<\EOF
3500 #define HAVE_ST_RDEV 1
3501 EOF
3502
3503 fi
3504
3505 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3506 echo "configure:3507: checking for d_off in dirent" >&5
3507 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3508   echo $ac_n "(cached) $ac_c" 1>&6
3509 else
3510   cat > conftest.$ac_ext <<EOF
3511 #line 3512 "configure"
3512 #include "confdefs.h"
3513
3514 #include <unistd.h>
3515 #include <sys/types.h>
3516 #include <dirent.h>
3517 int main() {
3518 struct dirent d; d.d_off;
3519 ; return 0; }
3520 EOF
3521 if { (eval echo configure:3522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3522   rm -rf conftest*
3523   ac_cv_dirent_d_off=yes
3524 else
3525   echo "configure: failed program was:" >&5
3526   cat conftest.$ac_ext >&5
3527   rm -rf conftest*
3528   ac_cv_dirent_d_off=no
3529 fi
3530 rm -f conftest*
3531 fi
3532
3533 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3534 if test $ac_cv_dirent_d_off = yes; then
3535   cat >> confdefs.h <<\EOF
3536 #define HAVE_DIRENT_D_OFF 1
3537 EOF
3538
3539 fi
3540
3541 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3542 echo "configure:3543: checking for ino_t" >&5
3543 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3544   echo $ac_n "(cached) $ac_c" 1>&6
3545 else
3546   cat > conftest.$ac_ext <<EOF
3547 #line 3548 "configure"
3548 #include "confdefs.h"
3549 #include <sys/types.h>
3550 #if STDC_HEADERS
3551 #include <stdlib.h>
3552 #include <stddef.h>
3553 #endif
3554 EOF
3555 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3556   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3557   rm -rf conftest*
3558   ac_cv_type_ino_t=yes
3559 else
3560   rm -rf conftest*
3561   ac_cv_type_ino_t=no
3562 fi
3563 rm -f conftest*
3564
3565 fi
3566 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3567 if test $ac_cv_type_ino_t = no; then
3568   cat >> confdefs.h <<\EOF
3569 #define ino_t unsigned
3570 EOF
3571
3572 fi
3573
3574 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3575 echo "configure:3576: checking for loff_t" >&5
3576 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3577   echo $ac_n "(cached) $ac_c" 1>&6
3578 else
3579   cat > conftest.$ac_ext <<EOF
3580 #line 3581 "configure"
3581 #include "confdefs.h"
3582 #include <sys/types.h>
3583 #if STDC_HEADERS
3584 #include <stdlib.h>
3585 #include <stddef.h>
3586 #endif
3587 EOF
3588 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3589   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3590   rm -rf conftest*
3591   ac_cv_type_loff_t=yes
3592 else
3593   rm -rf conftest*
3594   ac_cv_type_loff_t=no
3595 fi
3596 rm -f conftest*
3597
3598 fi
3599 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3600 if test $ac_cv_type_loff_t = no; then
3601   cat >> confdefs.h <<\EOF
3602 #define loff_t off_t
3603 EOF
3604
3605 fi
3606
3607 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3608 echo "configure:3609: checking for offset_t" >&5
3609 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3610   echo $ac_n "(cached) $ac_c" 1>&6
3611 else
3612   cat > conftest.$ac_ext <<EOF
3613 #line 3614 "configure"
3614 #include "confdefs.h"
3615 #include <sys/types.h>
3616 #if STDC_HEADERS
3617 #include <stdlib.h>
3618 #include <stddef.h>
3619 #endif
3620 EOF
3621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3622   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3623   rm -rf conftest*
3624   ac_cv_type_offset_t=yes
3625 else
3626   rm -rf conftest*
3627   ac_cv_type_offset_t=no
3628 fi
3629 rm -f conftest*
3630
3631 fi
3632 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3633 if test $ac_cv_type_offset_t = no; then
3634   cat >> confdefs.h <<\EOF
3635 #define offset_t loff_t
3636 EOF
3637
3638 fi
3639
3640 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3641 echo "configure:3642: checking for ssize_t" >&5
3642 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3643   echo $ac_n "(cached) $ac_c" 1>&6
3644 else
3645   cat > conftest.$ac_ext <<EOF
3646 #line 3647 "configure"
3647 #include "confdefs.h"
3648 #include <sys/types.h>
3649 #if STDC_HEADERS
3650 #include <stdlib.h>
3651 #include <stddef.h>
3652 #endif
3653 EOF
3654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3655   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3656   rm -rf conftest*
3657   ac_cv_type_ssize_t=yes
3658 else
3659   rm -rf conftest*
3660   ac_cv_type_ssize_t=no
3661 fi
3662 rm -f conftest*
3663
3664 fi
3665 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3666 if test $ac_cv_type_ssize_t = no; then
3667   cat >> confdefs.h <<\EOF
3668 #define ssize_t int
3669 EOF
3670
3671 fi
3672
3673 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3674 echo "configure:3675: checking for wchar_t" >&5
3675 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3676   echo $ac_n "(cached) $ac_c" 1>&6
3677 else
3678   cat > conftest.$ac_ext <<EOF
3679 #line 3680 "configure"
3680 #include "confdefs.h"
3681 #include <sys/types.h>
3682 #if STDC_HEADERS
3683 #include <stdlib.h>
3684 #include <stddef.h>
3685 #endif
3686 EOF
3687 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3688   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3689   rm -rf conftest*
3690   ac_cv_type_wchar_t=yes
3691 else
3692   rm -rf conftest*
3693   ac_cv_type_wchar_t=no
3694 fi
3695 rm -f conftest*
3696
3697 fi
3698 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3699 if test $ac_cv_type_wchar_t = no; then
3700   cat >> confdefs.h <<\EOF
3701 #define wchar_t unsigned short
3702 EOF
3703
3704 fi
3705
3706
3707 ############################################
3708 # for cups support we need libcups, and a handful of header files
3709
3710 # Check whether --enable-cups or --disable-cups was given.
3711 if test "${enable_cups+set}" = set; then
3712   enableval="$enable_cups"
3713   :
3714 fi
3715
3716
3717 if test x$enable_cups != xno; then
3718         # Extract the first word of "cups-config", so it can be a program name with args.
3719 set dummy cups-config; ac_word=$2
3720 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3721 echo "configure:3722: checking for $ac_word" >&5
3722 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
3723   echo $ac_n "(cached) $ac_c" 1>&6
3724 else
3725   case "$CUPS_CONFIG" in
3726   /*)
3727   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
3728   ;;
3729   ?:/*)                  
3730   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
3731   ;;
3732   *)
3733   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3734   ac_dummy="$PATH"
3735   for ac_dir in $ac_dummy; do 
3736     test -z "$ac_dir" && ac_dir=.
3737     if test -f $ac_dir/$ac_word; then
3738       ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
3739       break
3740     fi
3741   done
3742   IFS="$ac_save_ifs"
3743   ;;
3744 esac
3745 fi
3746 CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
3747 if test -n "$CUPS_CONFIG"; then
3748   echo "$ac_t""$CUPS_CONFIG" 1>&6
3749 else
3750   echo "$ac_t""no" 1>&6
3751 fi
3752
3753
3754         if test "x$CUPS_CONFIG" != x; then
3755                         cat >> confdefs.h <<\EOF
3756 #define HAVE_CUPS 1
3757 EOF
3758
3759                 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
3760                 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
3761                 LIBS="$LIBS `$CUPS_CONFIG --libs`"
3762         fi
3763 fi
3764
3765 ############################################
3766 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3767 for ac_func in dlopen
3768 do
3769 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3770 echo "configure:3771: checking for $ac_func" >&5
3771 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3772   echo $ac_n "(cached) $ac_c" 1>&6
3773 else
3774   cat > conftest.$ac_ext <<EOF
3775 #line 3776 "configure"
3776 #include "confdefs.h"
3777 /* System header to define __stub macros and hopefully few prototypes,
3778     which can conflict with char $ac_func(); below.  */
3779 #include <assert.h>
3780 /* Override any gcc2 internal prototype to avoid an error.  */
3781 /* We use char because int might match the return type of a gcc2
3782     builtin and then its argument prototype would still apply.  */
3783 char $ac_func();
3784
3785 int main() {
3786
3787 /* The GNU C library defines this for functions which it implements
3788     to always fail with ENOSYS.  Some functions are actually named
3789     something starting with __ and the normal name is an alias.  */
3790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3791 choke me
3792 #else
3793 $ac_func();
3794 #endif
3795
3796 ; return 0; }
3797 EOF
3798 if { (eval echo configure:3799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3799   rm -rf conftest*
3800   eval "ac_cv_func_$ac_func=yes"
3801 else
3802   echo "configure: failed program was:" >&5
3803   cat conftest.$ac_ext >&5
3804   rm -rf conftest*
3805   eval "ac_cv_func_$ac_func=no"
3806 fi
3807 rm -f conftest*
3808 fi
3809
3810 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3811   echo "$ac_t""yes" 1>&6
3812     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3813   cat >> confdefs.h <<EOF
3814 #define $ac_tr_func 1
3815 EOF
3816  
3817 else
3818   echo "$ac_t""no" 1>&6
3819 fi
3820 done
3821
3822 if test x"$ac_cv_func_dlopen" = x"no"; then
3823     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3824 echo "configure:3825: checking for dlopen in -ldl" >&5
3825 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3826 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3827   echo $ac_n "(cached) $ac_c" 1>&6
3828 else
3829   ac_save_LIBS="$LIBS"
3830 LIBS="-ldl  $LIBS"
3831 cat > conftest.$ac_ext <<EOF
3832 #line 3833 "configure"
3833 #include "confdefs.h"
3834 /* Override any gcc2 internal prototype to avoid an error.  */
3835 /* We use char because int might match the return type of a gcc2
3836     builtin and then its argument prototype would still apply.  */
3837 char dlopen();
3838
3839 int main() {
3840 dlopen()
3841 ; return 0; }
3842 EOF
3843 if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3844   rm -rf conftest*
3845   eval "ac_cv_lib_$ac_lib_var=yes"
3846 else
3847   echo "configure: failed program was:" >&5
3848   cat conftest.$ac_ext >&5
3849   rm -rf conftest*
3850   eval "ac_cv_lib_$ac_lib_var=no"
3851 fi
3852 rm -f conftest*
3853 LIBS="$ac_save_LIBS"
3854
3855 fi
3856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3857   echo "$ac_t""yes" 1>&6
3858   LIBS="$LIBS -ldl";
3859         cat >> confdefs.h <<\EOF
3860 #define HAVE_DLOPEN 1
3861 EOF
3862
3863 else
3864   echo "$ac_t""no" 1>&6
3865 fi
3866
3867 fi
3868 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3869
3870 ############################################
3871 # check if the compiler can do immediate structures
3872 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3873 echo "configure:3874: checking for immediate structures" >&5
3874 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   
3878     cat > conftest.$ac_ext <<EOF
3879 #line 3880 "configure"
3880 #include "confdefs.h"
3881
3882 #include <stdio.h>
3883 int main() {
3884
3885    typedef struct {unsigned x;} FOOBAR;
3886    #define X_FOOBAR(x) ((FOOBAR) { x })
3887    #define FOO_ONE X_FOOBAR(1)
3888    FOOBAR f = FOO_ONE;   
3889    static struct {
3890         FOOBAR y; 
3891         } f2[] = {
3892                 {FOO_ONE}
3893         };   
3894
3895 ; return 0; }
3896 EOF
3897 if { (eval echo configure:3898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3898   rm -rf conftest*
3899   samba_cv_immediate_structures=yes
3900 else
3901   echo "configure: failed program was:" >&5
3902   cat conftest.$ac_ext >&5
3903   rm -rf conftest*
3904   samba_cv_immediate_structures=no
3905 fi
3906 rm -f conftest*
3907 fi
3908
3909 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3910 if test x"$samba_cv_immediate_structures" = x"yes"; then
3911    cat >> confdefs.h <<\EOF
3912 #define HAVE_IMMEDIATE_STRUCTURES 1
3913 EOF
3914
3915 fi
3916
3917 ############################################
3918 # check for unix domain sockets
3919 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3920 echo "configure:3921: checking for unix domain sockets" >&5
3921 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3922   echo $ac_n "(cached) $ac_c" 1>&6
3923 else
3924   
3925     cat > conftest.$ac_ext <<EOF
3926 #line 3927 "configure"
3927 #include "confdefs.h"
3928
3929 #include <sys/types.h>
3930 #include <stdlib.h>
3931 #include <stddef.h>
3932 #include <sys/socket.h>
3933 #include <sys/un.h>
3934 int main() {
3935
3936   struct sockaddr_un sunaddr; 
3937   sunaddr.sun_family = AF_UNIX;
3938
3939 ; return 0; }
3940 EOF
3941 if { (eval echo configure:3942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3942   rm -rf conftest*
3943   samba_cv_unixsocket=yes
3944 else
3945   echo "configure: failed program was:" >&5
3946   cat conftest.$ac_ext >&5
3947   rm -rf conftest*
3948   samba_cv_unixsocket=no
3949 fi
3950 rm -f conftest*
3951 fi
3952
3953 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3954 if test x"$samba_cv_unixsocket" = x"yes"; then
3955    cat >> confdefs.h <<\EOF
3956 #define HAVE_UNIXSOCKET 1
3957 EOF
3958
3959 fi
3960
3961
3962 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3963 echo "configure:3964: checking for socklen_t type" >&5
3964 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3965   echo $ac_n "(cached) $ac_c" 1>&6
3966 else
3967   
3968     cat > conftest.$ac_ext <<EOF
3969 #line 3970 "configure"
3970 #include "confdefs.h"
3971
3972 #include <sys/types.h>
3973 #if STDC_HEADERS
3974 #include <stdlib.h>
3975 #include <stddef.h>
3976 #endif
3977 #include <sys/socket.h>
3978 int main() {
3979 socklen_t i = 0
3980 ; return 0; }
3981 EOF
3982 if { (eval echo configure:3983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3983   rm -rf conftest*
3984   samba_cv_socklen_t=yes
3985 else
3986   echo "configure: failed program was:" >&5
3987   cat conftest.$ac_ext >&5
3988   rm -rf conftest*
3989   samba_cv_socklen_t=no
3990 fi
3991 rm -f conftest*
3992 fi
3993
3994 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3995 if test x"$samba_cv_socklen_t" = x"yes"; then
3996    cat >> confdefs.h <<\EOF
3997 #define HAVE_SOCKLEN_T_TYPE 1
3998 EOF
3999
4000 fi
4001
4002 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
4003 echo "configure:4004: checking for sig_atomic_t type" >&5
4004 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
4005   echo $ac_n "(cached) $ac_c" 1>&6
4006 else
4007   
4008     cat > conftest.$ac_ext <<EOF
4009 #line 4010 "configure"
4010 #include "confdefs.h"
4011
4012 #include <sys/types.h>
4013 #if STDC_HEADERS
4014 #include <stdlib.h>
4015 #include <stddef.h>
4016 #endif
4017 #include <signal.h>
4018 int main() {
4019 sig_atomic_t i = 0
4020 ; return 0; }
4021 EOF
4022 if { (eval echo configure:4023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4023   rm -rf conftest*
4024   samba_cv_sig_atomic_t=yes
4025 else
4026   echo "configure: failed program was:" >&5
4027   cat conftest.$ac_ext >&5
4028   rm -rf conftest*
4029   samba_cv_sig_atomic_t=no
4030 fi
4031 rm -f conftest*
4032 fi
4033
4034 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4035 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4036    cat >> confdefs.h <<\EOF
4037 #define HAVE_SIG_ATOMIC_T_TYPE 1
4038 EOF
4039
4040 fi
4041
4042 # stupid headers have the functions but no declaration. grrrr.
4043
4044  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4045 echo "configure:4046: checking for errno declaration" >&5
4046 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4047   echo $ac_n "(cached) $ac_c" 1>&6
4048 else
4049   
4050     cat > conftest.$ac_ext <<EOF
4051 #line 4052 "configure"
4052 #include "confdefs.h"
4053 #include <errno.h>
4054 int main() {
4055 int i = (int)errno
4056 ; return 0; }
4057 EOF
4058 if { (eval echo configure:4059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4059   rm -rf conftest*
4060   ac_cv_have_errno_decl=yes
4061 else
4062   echo "configure: failed program was:" >&5
4063   cat conftest.$ac_ext >&5
4064   rm -rf conftest*
4065   ac_cv_have_errno_decl=no
4066 fi
4067 rm -f conftest*
4068 fi
4069
4070 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4071  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4072     cat >> confdefs.h <<\EOF
4073 #define HAVE_ERRNO_DECL 1
4074 EOF
4075
4076  fi
4077
4078
4079  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4080 echo "configure:4081: checking for setresuid declaration" >&5
4081 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4082   echo $ac_n "(cached) $ac_c" 1>&6
4083 else
4084   
4085     cat > conftest.$ac_ext <<EOF
4086 #line 4087 "configure"
4087 #include "confdefs.h"
4088 #include <unistd.h>
4089 int main() {
4090 int i = (int)setresuid
4091 ; return 0; }
4092 EOF
4093 if { (eval echo configure:4094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4094   rm -rf conftest*
4095   ac_cv_have_setresuid_decl=yes
4096 else
4097   echo "configure: failed program was:" >&5
4098   cat conftest.$ac_ext >&5
4099   rm -rf conftest*
4100   ac_cv_have_setresuid_decl=no
4101 fi
4102 rm -f conftest*
4103 fi
4104
4105 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4106  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4107     cat >> confdefs.h <<\EOF
4108 #define HAVE_SETRESUID_DECL 1
4109 EOF
4110
4111  fi
4112
4113
4114  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4115 echo "configure:4116: checking for setresgid declaration" >&5
4116 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4117   echo $ac_n "(cached) $ac_c" 1>&6
4118 else
4119   
4120     cat > conftest.$ac_ext <<EOF
4121 #line 4122 "configure"
4122 #include "confdefs.h"
4123 #include <unistd.h>
4124 int main() {
4125 int i = (int)setresgid
4126 ; return 0; }
4127 EOF
4128 if { (eval echo configure:4129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4129   rm -rf conftest*
4130   ac_cv_have_setresgid_decl=yes
4131 else
4132   echo "configure: failed program was:" >&5
4133   cat conftest.$ac_ext >&5
4134   rm -rf conftest*
4135   ac_cv_have_setresgid_decl=no
4136 fi
4137 rm -f conftest*
4138 fi
4139
4140 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4141  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4142     cat >> confdefs.h <<\EOF
4143 #define HAVE_SETRESGID_DECL 1
4144 EOF
4145
4146  fi
4147
4148
4149  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4150 echo "configure:4151: checking for asprintf declaration" >&5
4151 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4152   echo $ac_n "(cached) $ac_c" 1>&6
4153 else
4154   
4155     cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 #include <stdio.h>
4159 int main() {
4160 int i = (int)asprintf
4161 ; return 0; }
4162 EOF
4163 if { (eval echo configure:4164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4164   rm -rf conftest*
4165   ac_cv_have_asprintf_decl=yes
4166 else
4167   echo "configure: failed program was:" >&5
4168   cat conftest.$ac_ext >&5
4169   rm -rf conftest*
4170   ac_cv_have_asprintf_decl=no
4171 fi
4172 rm -f conftest*
4173 fi
4174
4175 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4176  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4177     cat >> confdefs.h <<\EOF
4178 #define HAVE_ASPRINTF_DECL 1
4179 EOF
4180
4181  fi
4182
4183
4184  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4185 echo "configure:4186: checking for vasprintf declaration" >&5
4186 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4187   echo $ac_n "(cached) $ac_c" 1>&6
4188 else
4189   
4190     cat > conftest.$ac_ext <<EOF
4191 #line 4192 "configure"
4192 #include "confdefs.h"
4193 #include <stdio.h>
4194 int main() {
4195 int i = (int)vasprintf
4196 ; return 0; }
4197 EOF
4198 if { (eval echo configure:4199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4199   rm -rf conftest*
4200   ac_cv_have_vasprintf_decl=yes
4201 else
4202   echo "configure: failed program was:" >&5
4203   cat conftest.$ac_ext >&5
4204   rm -rf conftest*
4205   ac_cv_have_vasprintf_decl=no
4206 fi
4207 rm -f conftest*
4208 fi
4209
4210 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4211  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4212     cat >> confdefs.h <<\EOF
4213 #define HAVE_VASPRINTF_DECL 1
4214 EOF
4215
4216  fi
4217
4218
4219  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4220 echo "configure:4221: checking for vsnprintf declaration" >&5
4221 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4222   echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224   
4225     cat > conftest.$ac_ext <<EOF
4226 #line 4227 "configure"
4227 #include "confdefs.h"
4228 #include <stdio.h>
4229 int main() {
4230 int i = (int)vsnprintf
4231 ; return 0; }
4232 EOF
4233 if { (eval echo configure:4234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4234   rm -rf conftest*
4235   ac_cv_have_vsnprintf_decl=yes
4236 else
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   ac_cv_have_vsnprintf_decl=no
4241 fi
4242 rm -f conftest*
4243 fi
4244
4245 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4246  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4247     cat >> confdefs.h <<\EOF
4248 #define HAVE_VSNPRINTF_DECL 1
4249 EOF
4250
4251  fi
4252
4253
4254  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4255 echo "configure:4256: checking for snprintf declaration" >&5
4256 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4257   echo $ac_n "(cached) $ac_c" 1>&6
4258 else
4259   
4260     cat > conftest.$ac_ext <<EOF
4261 #line 4262 "configure"
4262 #include "confdefs.h"
4263 #include <stdio.h>
4264 int main() {
4265 int i = (int)snprintf
4266 ; return 0; }
4267 EOF
4268 if { (eval echo configure:4269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4269   rm -rf conftest*
4270   ac_cv_have_snprintf_decl=yes
4271 else
4272   echo "configure: failed program was:" >&5
4273   cat conftest.$ac_ext >&5
4274   rm -rf conftest*
4275   ac_cv_have_snprintf_decl=no
4276 fi
4277 rm -f conftest*
4278 fi
4279
4280 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4281  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4282     cat >> confdefs.h <<\EOF
4283 #define HAVE_SNPRINTF_DECL 1
4284 EOF
4285
4286  fi
4287
4288
4289 # and glibc has setresuid under linux but the function does
4290 # nothing until kernel 2.1.44! very dumb.
4291 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4292 echo "configure:4293: checking for real setresuid" >&5
4293 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4294   echo $ac_n "(cached) $ac_c" 1>&6
4295 else
4296   
4297     if test "$cross_compiling" = yes; then
4298   samba_cv_have_setresuid=cross
4299 else
4300   cat > conftest.$ac_ext <<EOF
4301 #line 4302 "configure"
4302 #include "confdefs.h"
4303 #include <errno.h>
4304 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4305 EOF
4306 if { (eval echo configure:4307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4307 then
4308   samba_cv_have_setresuid=yes
4309 else
4310   echo "configure: failed program was:" >&5
4311   cat conftest.$ac_ext >&5
4312   rm -fr conftest*
4313   samba_cv_have_setresuid=no
4314 fi
4315 rm -fr conftest*
4316 fi
4317
4318 fi
4319
4320 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4321 if test x"$samba_cv_have_setresuid" = x"yes"; then
4322     cat >> confdefs.h <<\EOF
4323 #define HAVE_SETRESUID 1
4324 EOF
4325
4326 fi
4327
4328 # Do the same check for setresguid...
4329 #
4330 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4331 echo "configure:4332: checking for real setresgid" >&5
4332 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4333   echo $ac_n "(cached) $ac_c" 1>&6
4334 else
4335   
4336     if test "$cross_compiling" = yes; then
4337   samba_cv_have_setresgid=cross
4338 else
4339   cat > conftest.$ac_ext <<EOF
4340 #line 4341 "configure"
4341 #include "confdefs.h"
4342 #include <unistd.h>
4343 #include <errno.h>
4344 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4345 EOF
4346 if { (eval echo configure:4347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4347 then
4348   samba_cv_have_setresgid=yes
4349 else
4350   echo "configure: failed program was:" >&5
4351   cat conftest.$ac_ext >&5
4352   rm -fr conftest*
4353   samba_cv_have_setresgid=no
4354 fi
4355 rm -fr conftest*
4356 fi
4357
4358 fi
4359
4360 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4361 if test x"$samba_cv_have_setresgid" = x"yes"; then
4362     cat >> confdefs.h <<\EOF
4363 #define HAVE_SETRESGID 1
4364 EOF
4365
4366 fi
4367
4368 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4369 echo "configure:4370: checking for 8-bit clean memcmp" >&5
4370 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4371   echo $ac_n "(cached) $ac_c" 1>&6
4372 else
4373   if test "$cross_compiling" = yes; then
4374   ac_cv_func_memcmp_clean=no
4375 else
4376   cat > conftest.$ac_ext <<EOF
4377 #line 4378 "configure"
4378 #include "confdefs.h"
4379
4380 main()
4381 {
4382   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4383   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4384 }
4385
4386 EOF
4387 if { (eval echo configure:4388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4388 then
4389   ac_cv_func_memcmp_clean=yes
4390 else
4391   echo "configure: failed program was:" >&5
4392   cat conftest.$ac_ext >&5
4393   rm -fr conftest*
4394   ac_cv_func_memcmp_clean=no
4395 fi
4396 rm -fr conftest*
4397 fi
4398
4399 fi
4400
4401 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4402 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4403
4404
4405 ###############################################
4406 # test for where we get crypt() from
4407 for ac_func in crypt
4408 do
4409 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4410 echo "configure:4411: checking for $ac_func" >&5
4411 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4412   echo $ac_n "(cached) $ac_c" 1>&6
4413 else
4414   cat > conftest.$ac_ext <<EOF
4415 #line 4416 "configure"
4416 #include "confdefs.h"
4417 /* System header to define __stub macros and hopefully few prototypes,
4418     which can conflict with char $ac_func(); below.  */
4419 #include <assert.h>
4420 /* Override any gcc2 internal prototype to avoid an error.  */
4421 /* We use char because int might match the return type of a gcc2
4422     builtin and then its argument prototype would still apply.  */
4423 char $ac_func();
4424
4425 int main() {
4426
4427 /* The GNU C library defines this for functions which it implements
4428     to always fail with ENOSYS.  Some functions are actually named
4429     something starting with __ and the normal name is an alias.  */
4430 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4431 choke me
4432 #else
4433 $ac_func();
4434 #endif
4435
4436 ; return 0; }
4437 EOF
4438 if { (eval echo configure:4439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4439   rm -rf conftest*
4440   eval "ac_cv_func_$ac_func=yes"
4441 else
4442   echo "configure: failed program was:" >&5
4443   cat conftest.$ac_ext >&5
4444   rm -rf conftest*
4445   eval "ac_cv_func_$ac_func=no"
4446 fi
4447 rm -f conftest*
4448 fi
4449
4450 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4451   echo "$ac_t""yes" 1>&6
4452     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4453   cat >> confdefs.h <<EOF
4454 #define $ac_tr_func 1
4455 EOF
4456  
4457 else
4458   echo "$ac_t""no" 1>&6
4459 fi
4460 done
4461
4462 if test x"$ac_cv_func_crypt" = x"no"; then
4463     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4464 echo "configure:4465: checking for crypt in -lcrypt" >&5
4465 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4466 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4467   echo $ac_n "(cached) $ac_c" 1>&6
4468 else
4469   ac_save_LIBS="$LIBS"
4470 LIBS="-lcrypt  $LIBS"
4471 cat > conftest.$ac_ext <<EOF
4472 #line 4473 "configure"
4473 #include "confdefs.h"
4474 /* Override any gcc2 internal prototype to avoid an error.  */
4475 /* We use char because int might match the return type of a gcc2
4476     builtin and then its argument prototype would still apply.  */
4477 char crypt();
4478
4479 int main() {
4480 crypt()
4481 ; return 0; }
4482 EOF
4483 if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4484   rm -rf conftest*
4485   eval "ac_cv_lib_$ac_lib_var=yes"
4486 else
4487   echo "configure: failed program was:" >&5
4488   cat conftest.$ac_ext >&5
4489   rm -rf conftest*
4490   eval "ac_cv_lib_$ac_lib_var=no"
4491 fi
4492 rm -f conftest*
4493 LIBS="$ac_save_LIBS"
4494
4495 fi
4496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4497   echo "$ac_t""yes" 1>&6
4498   LIBS="$LIBS -lcrypt";
4499         cat >> confdefs.h <<\EOF
4500 #define HAVE_CRYPT 1
4501 EOF
4502
4503 else
4504   echo "$ac_t""no" 1>&6
4505 fi
4506
4507 fi
4508
4509
4510 ###############################################
4511 # Readline included by default unless explicitly asked not to
4512 test "${with_readline+set}" != "set" && with_readline=yes
4513
4514 # test for where we get readline() from
4515 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4516 echo "configure:4517: checking whether to use readline" >&5
4517 # Check whether --with-readline or --without-readline was given.
4518 if test "${with_readline+set}" = set; then
4519   withval="$with_readline"
4520     case "$with_readline" in
4521   yes)
4522     echo "$ac_t""yes" 1>&6
4523
4524     for ac_hdr in readline.h history.h readline/readline.h
4525 do
4526 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4527 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4528 echo "configure:4529: checking for $ac_hdr" >&5
4529 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4530   echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532   cat > conftest.$ac_ext <<EOF
4533 #line 4534 "configure"
4534 #include "confdefs.h"
4535 #include <$ac_hdr>
4536 EOF
4537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4538 { (eval echo configure:4539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4540 if test -z "$ac_err"; then
4541   rm -rf conftest*
4542   eval "ac_cv_header_$ac_safe=yes"
4543 else
4544   echo "$ac_err" >&5
4545   echo "configure: failed program was:" >&5
4546   cat conftest.$ac_ext >&5
4547   rm -rf conftest*
4548   eval "ac_cv_header_$ac_safe=no"
4549 fi
4550 rm -f conftest*
4551 fi
4552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4553   echo "$ac_t""yes" 1>&6
4554     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4555   cat >> confdefs.h <<EOF
4556 #define $ac_tr_hdr 1
4557 EOF
4558  
4559 else
4560   echo "$ac_t""no" 1>&6
4561 fi
4562 done
4563
4564     for ac_hdr in readline/history.h
4565 do
4566 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4567 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4568 echo "configure:4569: checking for $ac_hdr" >&5
4569 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4570   echo $ac_n "(cached) $ac_c" 1>&6
4571 else
4572   cat > conftest.$ac_ext <<EOF
4573 #line 4574 "configure"
4574 #include "confdefs.h"
4575 #include <$ac_hdr>
4576 EOF
4577 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4578 { (eval echo configure:4579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4579 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4580 if test -z "$ac_err"; then
4581   rm -rf conftest*
4582   eval "ac_cv_header_$ac_safe=yes"
4583 else
4584   echo "$ac_err" >&5
4585   echo "configure: failed program was:" >&5
4586   cat conftest.$ac_ext >&5
4587   rm -rf conftest*
4588   eval "ac_cv_header_$ac_safe=no"
4589 fi
4590 rm -f conftest*
4591 fi
4592 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4593   echo "$ac_t""yes" 1>&6
4594     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4595   cat >> confdefs.h <<EOF
4596 #define $ac_tr_hdr 1
4597 EOF
4598  
4599 else
4600   echo "$ac_t""no" 1>&6
4601 fi
4602 done
4603
4604
4605     for ac_hdr in readline.h readline/readline.h
4606 do
4607 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4608 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4609 echo "configure:4610: checking for $ac_hdr" >&5
4610 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4611   echo $ac_n "(cached) $ac_c" 1>&6
4612 else
4613   cat > conftest.$ac_ext <<EOF
4614 #line 4615 "configure"
4615 #include "confdefs.h"
4616 #include <$ac_hdr>
4617 EOF
4618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4619 { (eval echo configure:4620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4621 if test -z "$ac_err"; then
4622   rm -rf conftest*
4623   eval "ac_cv_header_$ac_safe=yes"
4624 else
4625   echo "$ac_err" >&5
4626   echo "configure: failed program was:" >&5
4627   cat conftest.$ac_ext >&5
4628   rm -rf conftest*
4629   eval "ac_cv_header_$ac_safe=no"
4630 fi
4631 rm -f conftest*
4632 fi
4633 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4634   echo "$ac_t""yes" 1>&6
4635     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4636   cat >> confdefs.h <<EOF
4637 #define $ac_tr_hdr 1
4638 EOF
4639  
4640       for termlib in ncurses curses termcap terminfo termlib; do
4641        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4642 echo "configure:4643: checking for tgetent in -l${termlib}" >&5
4643 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4644 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4645   echo $ac_n "(cached) $ac_c" 1>&6
4646 else
4647   ac_save_LIBS="$LIBS"
4648 LIBS="-l${termlib}  $LIBS"
4649 cat > conftest.$ac_ext <<EOF
4650 #line 4651 "configure"
4651 #include "confdefs.h"
4652 /* Override any gcc2 internal prototype to avoid an error.  */
4653 /* We use char because int might match the return type of a gcc2
4654     builtin and then its argument prototype would still apply.  */
4655 char tgetent();
4656
4657 int main() {
4658 tgetent()
4659 ; return 0; }
4660 EOF
4661 if { (eval echo configure:4662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4662   rm -rf conftest*
4663   eval "ac_cv_lib_$ac_lib_var=yes"
4664 else
4665   echo "configure: failed program was:" >&5
4666   cat conftest.$ac_ext >&5
4667   rm -rf conftest*
4668   eval "ac_cv_lib_$ac_lib_var=no"
4669 fi
4670 rm -f conftest*
4671 LIBS="$ac_save_LIBS"
4672
4673 fi
4674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4675   echo "$ac_t""yes" 1>&6
4676   TERMLIBS="-l${termlib}"; break
4677 else
4678   echo "$ac_t""no" 1>&6
4679 fi
4680
4681       done
4682       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4683 echo "configure:4684: checking for rl_callback_handler_install in -lreadline" >&5
4684 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4685 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4686   echo $ac_n "(cached) $ac_c" 1>&6
4687 else
4688   ac_save_LIBS="$LIBS"
4689 LIBS="-lreadline $TERMLIBS $LIBS"
4690 cat > conftest.$ac_ext <<EOF
4691 #line 4692 "configure"
4692 #include "confdefs.h"
4693 /* Override any gcc2 internal prototype to avoid an error.  */
4694 /* We use char because int might match the return type of a gcc2
4695     builtin and then its argument prototype would still apply.  */
4696 char rl_callback_handler_install();
4697
4698 int main() {
4699 rl_callback_handler_install()
4700 ; return 0; }
4701 EOF
4702 if { (eval echo configure:4703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4703   rm -rf conftest*
4704   eval "ac_cv_lib_$ac_lib_var=yes"
4705 else
4706   echo "configure: failed program was:" >&5
4707   cat conftest.$ac_ext >&5
4708   rm -rf conftest*
4709   eval "ac_cv_lib_$ac_lib_var=no"
4710 fi
4711 rm -f conftest*
4712 LIBS="$ac_save_LIBS"
4713
4714 fi
4715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4716   echo "$ac_t""yes" 1>&6
4717   TERMLIBS="-lreadline $TERMLIBS"
4718        cat >> confdefs.h <<\EOF
4719 #define HAVE_LIBREADLINE 1
4720 EOF
4721
4722        break
4723 else
4724   echo "$ac_t""no" 1>&6
4725 TERMLIBS=
4726 fi
4727
4728 else
4729   echo "$ac_t""no" 1>&6
4730 fi
4731 done
4732
4733     ;;
4734   no)
4735     echo "$ac_t""no" 1>&6
4736     ;;
4737   *)
4738     echo "$ac_t""yes" 1>&6
4739
4740     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4741     # alternate readline path
4742     _ldflags=${LDFLAGS}
4743     _cppflags=${CPPFLAGS}
4744
4745     # Add additional search path
4746     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4747     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4748
4749     for ac_hdr in readline.h history.h readline/readline.h
4750 do
4751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4753 echo "configure:4754: checking for $ac_hdr" >&5
4754 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4755   echo $ac_n "(cached) $ac_c" 1>&6
4756 else
4757   cat > conftest.$ac_ext <<EOF
4758 #line 4759 "configure"
4759 #include "confdefs.h"
4760 #include <$ac_hdr>
4761 EOF
4762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4763 { (eval echo configure:4764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4765 if test -z "$ac_err"; then
4766   rm -rf conftest*
4767   eval "ac_cv_header_$ac_safe=yes"
4768 else
4769   echo "$ac_err" >&5
4770   echo "configure: failed program was:" >&5
4771   cat conftest.$ac_ext >&5
4772   rm -rf conftest*
4773   eval "ac_cv_header_$ac_safe=no"
4774 fi
4775 rm -f conftest*
4776 fi
4777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4778   echo "$ac_t""yes" 1>&6
4779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4780   cat >> confdefs.h <<EOF
4781 #define $ac_tr_hdr 1
4782 EOF
4783  
4784 else
4785   echo "$ac_t""no" 1>&6
4786 fi
4787 done
4788
4789     for ac_hdr in readline/history.h
4790 do
4791 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4792 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4793 echo "configure:4794: checking for $ac_hdr" >&5
4794 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4795   echo $ac_n "(cached) $ac_c" 1>&6
4796 else
4797   cat > conftest.$ac_ext <<EOF
4798 #line 4799 "configure"
4799 #include "confdefs.h"
4800 #include <$ac_hdr>
4801 EOF
4802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4803 { (eval echo configure:4804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4805 if test -z "$ac_err"; then
4806   rm -rf conftest*
4807   eval "ac_cv_header_$ac_safe=yes"
4808 else
4809   echo "$ac_err" >&5
4810   echo "configure: failed program was:" >&5
4811   cat conftest.$ac_ext >&5
4812   rm -rf conftest*
4813   eval "ac_cv_header_$ac_safe=no"
4814 fi
4815 rm -f conftest*
4816 fi
4817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4818   echo "$ac_t""yes" 1>&6
4819     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4820   cat >> confdefs.h <<EOF
4821 #define $ac_tr_hdr 1
4822 EOF
4823  
4824 else
4825   echo "$ac_t""no" 1>&6
4826 fi
4827 done
4828
4829
4830     for ac_hdr in readline.h readline/readline.h
4831 do
4832 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4833 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4834 echo "configure:4835: checking for $ac_hdr" >&5
4835 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4836   echo $ac_n "(cached) $ac_c" 1>&6
4837 else
4838   cat > conftest.$ac_ext <<EOF
4839 #line 4840 "configure"
4840 #include "confdefs.h"
4841 #include <$ac_hdr>
4842 EOF
4843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4844 { (eval echo configure:4845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4846 if test -z "$ac_err"; then
4847   rm -rf conftest*
4848   eval "ac_cv_header_$ac_safe=yes"
4849 else
4850   echo "$ac_err" >&5
4851   echo "configure: failed program was:" >&5
4852   cat conftest.$ac_ext >&5
4853   rm -rf conftest*
4854   eval "ac_cv_header_$ac_safe=no"
4855 fi
4856 rm -f conftest*
4857 fi
4858 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4859   echo "$ac_t""yes" 1>&6
4860     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4861   cat >> confdefs.h <<EOF
4862 #define $ac_tr_hdr 1
4863 EOF
4864  
4865       for termlib in ncurses curses termcap terminfo termlib; do
4866        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4867 echo "configure:4868: checking for tgetent in -l${termlib}" >&5
4868 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4869 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4870   echo $ac_n "(cached) $ac_c" 1>&6
4871 else
4872   ac_save_LIBS="$LIBS"
4873 LIBS="-l${termlib}  $LIBS"
4874 cat > conftest.$ac_ext <<EOF
4875 #line 4876 "configure"
4876 #include "confdefs.h"
4877 /* Override any gcc2 internal prototype to avoid an error.  */
4878 /* We use char because int might match the return type of a gcc2
4879     builtin and then its argument prototype would still apply.  */
4880 char tgetent();
4881
4882 int main() {
4883 tgetent()
4884 ; return 0; }
4885 EOF
4886 if { (eval echo configure:4887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4887   rm -rf conftest*
4888   eval "ac_cv_lib_$ac_lib_var=yes"
4889 else
4890   echo "configure: failed program was:" >&5
4891   cat conftest.$ac_ext >&5
4892   rm -rf conftest*
4893   eval "ac_cv_lib_$ac_lib_var=no"
4894 fi
4895 rm -f conftest*
4896 LIBS="$ac_save_LIBS"
4897
4898 fi
4899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4900   echo "$ac_t""yes" 1>&6
4901   TERMLIBS="-l${termlib}"; break
4902 else
4903   echo "$ac_t""no" 1>&6
4904 fi
4905
4906       done
4907       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4908 echo "configure:4909: checking for rl_callback_handler_install in -lreadline" >&5
4909 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4910 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4911   echo $ac_n "(cached) $ac_c" 1>&6
4912 else
4913   ac_save_LIBS="$LIBS"
4914 LIBS="-lreadline $TERMLIBS $LIBS"
4915 cat > conftest.$ac_ext <<EOF
4916 #line 4917 "configure"
4917 #include "confdefs.h"
4918 /* Override any gcc2 internal prototype to avoid an error.  */
4919 /* We use char because int might match the return type of a gcc2
4920     builtin and then its argument prototype would still apply.  */
4921 char rl_callback_handler_install();
4922
4923 int main() {
4924 rl_callback_handler_install()
4925 ; return 0; }
4926 EOF
4927 if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4928   rm -rf conftest*
4929   eval "ac_cv_lib_$ac_lib_var=yes"
4930 else
4931   echo "configure: failed program was:" >&5
4932   cat conftest.$ac_ext >&5
4933   rm -rf conftest*
4934   eval "ac_cv_lib_$ac_lib_var=no"
4935 fi
4936 rm -f conftest*
4937 LIBS="$ac_save_LIBS"
4938
4939 fi
4940 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4941   echo "$ac_t""yes" 1>&6
4942   TERMLDFLAGS="-L$with_readline/lib"
4943        TERMCPPFLAGS="-I$with_readline/include"
4944        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4945        TERMLIBS="-lreadline $TERMLIBS"
4946        cat >> confdefs.h <<\EOF
4947 #define HAVE_LIBREADLINE 1
4948 EOF
4949
4950        break
4951 else
4952   echo "$ac_t""no" 1>&6
4953 TERMLIBS= CPPFLAGS=$_cppflags
4954 fi
4955
4956 else
4957   echo "$ac_t""no" 1>&6
4958 fi
4959 done
4960
4961
4962     LDFLAGS=$_ldflags
4963     ;;
4964   esac
4965 else
4966   echo "$ac_t""no" 1>&6
4967
4968 fi
4969
4970
4971
4972
4973 # The readline API changed slightly from readline3 to readline4, so
4974 # code will generate warnings on one of them unless we have a few
4975 # special cases.
4976 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4977 echo "configure:4978: checking for rl_completion_matches in -lreadline" >&5
4978 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4979 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4980   echo $ac_n "(cached) $ac_c" 1>&6
4981 else
4982   ac_save_LIBS="$LIBS"
4983 LIBS="-lreadline $TERMLIBS $LIBS"
4984 cat > conftest.$ac_ext <<EOF
4985 #line 4986 "configure"
4986 #include "confdefs.h"
4987 /* Override any gcc2 internal prototype to avoid an error.  */
4988 /* We use char because int might match the return type of a gcc2
4989     builtin and then its argument prototype would still apply.  */
4990 char rl_completion_matches();
4991
4992 int main() {
4993 rl_completion_matches()
4994 ; return 0; }
4995 EOF
4996 if { (eval echo configure:4997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4997   rm -rf conftest*
4998   eval "ac_cv_lib_$ac_lib_var=yes"
4999 else
5000   echo "configure: failed program was:" >&5
5001   cat conftest.$ac_ext >&5
5002   rm -rf conftest*
5003   eval "ac_cv_lib_$ac_lib_var=no"
5004 fi
5005 rm -f conftest*
5006 LIBS="$ac_save_LIBS"
5007
5008 fi
5009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5010   echo "$ac_t""yes" 1>&6
5011   cat >> confdefs.h <<\EOF
5012 #define HAVE_NEW_LIBREADLINE 1
5013 EOF
5014
5015 else
5016   echo "$ac_t""no" 1>&6
5017 fi
5018
5019
5020 # The following test taken from the cvs sources
5021 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5022 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5023 # libsocket.so which has a bad implementation of gethostbyname (it
5024 # only looks in /etc/hosts), so we only look for -lsocket if we need
5025 # it.
5026 for ac_func in connect
5027 do
5028 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5029 echo "configure:5030: checking for $ac_func" >&5
5030 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5031   echo $ac_n "(cached) $ac_c" 1>&6
5032 else
5033   cat > conftest.$ac_ext <<EOF
5034 #line 5035 "configure"
5035 #include "confdefs.h"
5036 /* System header to define __stub macros and hopefully few prototypes,
5037     which can conflict with char $ac_func(); below.  */
5038 #include <assert.h>
5039 /* Override any gcc2 internal prototype to avoid an error.  */
5040 /* We use char because int might match the return type of a gcc2
5041     builtin and then its argument prototype would still apply.  */
5042 char $ac_func();
5043
5044 int main() {
5045
5046 /* The GNU C library defines this for functions which it implements
5047     to always fail with ENOSYS.  Some functions are actually named
5048     something starting with __ and the normal name is an alias.  */
5049 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5050 choke me
5051 #else
5052 $ac_func();
5053 #endif
5054
5055 ; return 0; }
5056 EOF
5057 if { (eval echo configure:5058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5058   rm -rf conftest*
5059   eval "ac_cv_func_$ac_func=yes"
5060 else
5061   echo "configure: failed program was:" >&5
5062   cat conftest.$ac_ext >&5
5063   rm -rf conftest*
5064   eval "ac_cv_func_$ac_func=no"
5065 fi
5066 rm -f conftest*
5067 fi
5068
5069 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5070   echo "$ac_t""yes" 1>&6
5071     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5072   cat >> confdefs.h <<EOF
5073 #define $ac_tr_func 1
5074 EOF
5075  
5076 else
5077   echo "$ac_t""no" 1>&6
5078 fi
5079 done
5080
5081 if test x"$ac_cv_func_connect" = x"no"; then
5082     case "$LIBS" in
5083     *-lnsl*) ;;
5084     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5085 echo "configure:5086: checking for printf in -lnsl_s" >&5
5086 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5087 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5088   echo $ac_n "(cached) $ac_c" 1>&6
5089 else
5090   ac_save_LIBS="$LIBS"
5091 LIBS="-lnsl_s  $LIBS"
5092 cat > conftest.$ac_ext <<EOF
5093 #line 5094 "configure"
5094 #include "confdefs.h"
5095 /* Override any gcc2 internal prototype to avoid an error.  */
5096 /* We use char because int might match the return type of a gcc2
5097     builtin and then its argument prototype would still apply.  */
5098 char printf();
5099
5100 int main() {
5101 printf()
5102 ; return 0; }
5103 EOF
5104 if { (eval echo configure:5105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5105   rm -rf conftest*
5106   eval "ac_cv_lib_$ac_lib_var=yes"
5107 else
5108   echo "configure: failed program was:" >&5
5109   cat conftest.$ac_ext >&5
5110   rm -rf conftest*
5111   eval "ac_cv_lib_$ac_lib_var=no"
5112 fi
5113 rm -f conftest*
5114 LIBS="$ac_save_LIBS"
5115
5116 fi
5117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5118   echo "$ac_t""yes" 1>&6
5119     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5120     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5121   cat >> confdefs.h <<EOF
5122 #define $ac_tr_lib 1
5123 EOF
5124
5125   LIBS="-lnsl_s $LIBS"
5126
5127 else
5128   echo "$ac_t""no" 1>&6
5129 fi
5130  ;;
5131     esac
5132     case "$LIBS" in
5133     *-lnsl*) ;;
5134     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5135 echo "configure:5136: checking for printf in -lnsl" >&5
5136 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5137 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5138   echo $ac_n "(cached) $ac_c" 1>&6
5139 else
5140   ac_save_LIBS="$LIBS"
5141 LIBS="-lnsl  $LIBS"
5142 cat > conftest.$ac_ext <<EOF
5143 #line 5144 "configure"
5144 #include "confdefs.h"
5145 /* Override any gcc2 internal prototype to avoid an error.  */
5146 /* We use char because int might match the return type of a gcc2
5147     builtin and then its argument prototype would still apply.  */
5148 char printf();
5149
5150 int main() {
5151 printf()
5152 ; return 0; }
5153 EOF
5154 if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5155   rm -rf conftest*
5156   eval "ac_cv_lib_$ac_lib_var=yes"
5157 else
5158   echo "configure: failed program was:" >&5
5159   cat conftest.$ac_ext >&5
5160   rm -rf conftest*
5161   eval "ac_cv_lib_$ac_lib_var=no"
5162 fi
5163 rm -f conftest*
5164 LIBS="$ac_save_LIBS"
5165
5166 fi
5167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5168   echo "$ac_t""yes" 1>&6
5169     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5171   cat >> confdefs.h <<EOF
5172 #define $ac_tr_lib 1
5173 EOF
5174
5175   LIBS="-lnsl $LIBS"
5176
5177 else
5178   echo "$ac_t""no" 1>&6
5179 fi
5180  ;;
5181     esac
5182     case "$LIBS" in
5183     *-lsocket*) ;;
5184     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5185 echo "configure:5186: checking for connect in -lsocket" >&5
5186 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5187 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5188   echo $ac_n "(cached) $ac_c" 1>&6
5189 else
5190   ac_save_LIBS="$LIBS"
5191 LIBS="-lsocket  $LIBS"
5192 cat > conftest.$ac_ext <<EOF
5193 #line 5194 "configure"
5194 #include "confdefs.h"
5195 /* Override any gcc2 internal prototype to avoid an error.  */
5196 /* We use char because int might match the return type of a gcc2
5197     builtin and then its argument prototype would still apply.  */
5198 char connect();
5199
5200 int main() {
5201 connect()
5202 ; return 0; }
5203 EOF
5204 if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5205   rm -rf conftest*
5206   eval "ac_cv_lib_$ac_lib_var=yes"
5207 else
5208   echo "configure: failed program was:" >&5
5209   cat conftest.$ac_ext >&5
5210   rm -rf conftest*
5211   eval "ac_cv_lib_$ac_lib_var=no"
5212 fi
5213 rm -f conftest*
5214 LIBS="$ac_save_LIBS"
5215
5216 fi
5217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5218   echo "$ac_t""yes" 1>&6
5219     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5220     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5221   cat >> confdefs.h <<EOF
5222 #define $ac_tr_lib 1
5223 EOF
5224
5225   LIBS="-lsocket $LIBS"
5226
5227 else
5228   echo "$ac_t""no" 1>&6
5229 fi
5230  ;;
5231     esac
5232     case "$LIBS" in
5233     *-linet*) ;;
5234     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5235 echo "configure:5236: checking for connect in -linet" >&5
5236 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5237 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5238   echo $ac_n "(cached) $ac_c" 1>&6
5239 else
5240   ac_save_LIBS="$LIBS"
5241 LIBS="-linet  $LIBS"
5242 cat > conftest.$ac_ext <<EOF
5243 #line 5244 "configure"
5244 #include "confdefs.h"
5245 /* Override any gcc2 internal prototype to avoid an error.  */
5246 /* We use char because int might match the return type of a gcc2
5247     builtin and then its argument prototype would still apply.  */
5248 char connect();
5249
5250 int main() {
5251 connect()
5252 ; return 0; }
5253 EOF
5254 if { (eval echo configure:5255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5255   rm -rf conftest*
5256   eval "ac_cv_lib_$ac_lib_var=yes"
5257 else
5258   echo "configure: failed program was:" >&5
5259   cat conftest.$ac_ext >&5
5260   rm -rf conftest*
5261   eval "ac_cv_lib_$ac_lib_var=no"
5262 fi
5263 rm -f conftest*
5264 LIBS="$ac_save_LIBS"
5265
5266 fi
5267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5268   echo "$ac_t""yes" 1>&6
5269     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5270     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5271   cat >> confdefs.h <<EOF
5272 #define $ac_tr_lib 1
5273 EOF
5274
5275   LIBS="-linet $LIBS"
5276
5277 else
5278   echo "$ac_t""no" 1>&6
5279 fi
5280  ;;
5281     esac
5282             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5283        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5284         # ac_cv_func_connect=yes
5285         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5286         cat >> confdefs.h <<\EOF
5287 #define HAVE_CONNECT 1
5288 EOF
5289
5290     fi
5291 fi
5292
5293 ###############################################
5294 # test for where we get get_yp_default_domain() from
5295 for ac_func in yp_get_default_domain
5296 do
5297 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5298 echo "configure:5299: checking for $ac_func" >&5
5299 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5300   echo $ac_n "(cached) $ac_c" 1>&6
5301 else
5302   cat > conftest.$ac_ext <<EOF
5303 #line 5304 "configure"
5304 #include "confdefs.h"
5305 /* System header to define __stub macros and hopefully few prototypes,
5306     which can conflict with char $ac_func(); below.  */
5307 #include <assert.h>
5308 /* Override any gcc2 internal prototype to avoid an error.  */
5309 /* We use char because int might match the return type of a gcc2
5310     builtin and then its argument prototype would still apply.  */
5311 char $ac_func();
5312
5313 int main() {
5314
5315 /* The GNU C library defines this for functions which it implements
5316     to always fail with ENOSYS.  Some functions are actually named
5317     something starting with __ and the normal name is an alias.  */
5318 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5319 choke me
5320 #else
5321 $ac_func();
5322 #endif
5323
5324 ; return 0; }
5325 EOF
5326 if { (eval echo configure:5327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5327   rm -rf conftest*
5328   eval "ac_cv_func_$ac_func=yes"
5329 else
5330   echo "configure: failed program was:" >&5
5331   cat conftest.$ac_ext >&5
5332   rm -rf conftest*
5333   eval "ac_cv_func_$ac_func=no"
5334 fi
5335 rm -f conftest*
5336 fi
5337
5338 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5339   echo "$ac_t""yes" 1>&6
5340     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5341   cat >> confdefs.h <<EOF
5342 #define $ac_tr_func 1
5343 EOF
5344  
5345 else
5346   echo "$ac_t""no" 1>&6
5347 fi
5348 done
5349
5350 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5351         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5352 echo "configure:5353: checking for yp_get_default_domain in -lnsl" >&5
5353 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5354 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5355   echo $ac_n "(cached) $ac_c" 1>&6
5356 else
5357   ac_save_LIBS="$LIBS"
5358 LIBS="-lnsl  $LIBS"
5359 cat > conftest.$ac_ext <<EOF
5360 #line 5361 "configure"
5361 #include "confdefs.h"
5362 /* Override any gcc2 internal prototype to avoid an error.  */
5363 /* We use char because int might match the return type of a gcc2
5364     builtin and then its argument prototype would still apply.  */
5365 char yp_get_default_domain();
5366
5367 int main() {
5368 yp_get_default_domain()
5369 ; return 0; }
5370 EOF
5371 if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5372   rm -rf conftest*
5373   eval "ac_cv_lib_$ac_lib_var=yes"
5374 else
5375   echo "configure: failed program was:" >&5
5376   cat conftest.$ac_ext >&5
5377   rm -rf conftest*
5378   eval "ac_cv_lib_$ac_lib_var=no"
5379 fi
5380 rm -f conftest*
5381 LIBS="$ac_save_LIBS"
5382
5383 fi
5384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5385   echo "$ac_t""yes" 1>&6
5386   LIBS="$LIBS -lnsl";
5387         cat >> confdefs.h <<\EOF
5388 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5389 EOF
5390
5391 else
5392   echo "$ac_t""no" 1>&6
5393 fi
5394  
5395 fi
5396
5397 # Check if we have execl, if not we need to compile smbrun.
5398 for ac_func in execl
5399 do
5400 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5401 echo "configure:5402: checking for $ac_func" >&5
5402 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5403   echo $ac_n "(cached) $ac_c" 1>&6
5404 else
5405   cat > conftest.$ac_ext <<EOF
5406 #line 5407 "configure"
5407 #include "confdefs.h"
5408 /* System header to define __stub macros and hopefully few prototypes,
5409     which can conflict with char $ac_func(); below.  */
5410 #include <assert.h>
5411 /* Override any gcc2 internal prototype to avoid an error.  */
5412 /* We use char because int might match the return type of a gcc2
5413     builtin and then its argument prototype would still apply.  */
5414 char $ac_func();
5415
5416 int main() {
5417
5418 /* The GNU C library defines this for functions which it implements
5419     to always fail with ENOSYS.  Some functions are actually named
5420     something starting with __ and the normal name is an alias.  */
5421 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5422 choke me
5423 #else
5424 $ac_func();
5425 #endif
5426
5427 ; return 0; }
5428 EOF
5429 if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5430   rm -rf conftest*
5431   eval "ac_cv_func_$ac_func=yes"
5432 else
5433   echo "configure: failed program was:" >&5
5434   cat conftest.$ac_ext >&5
5435   rm -rf conftest*
5436   eval "ac_cv_func_$ac_func=no"
5437 fi
5438 rm -f conftest*
5439 fi
5440
5441 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5442   echo "$ac_t""yes" 1>&6
5443     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5444   cat >> confdefs.h <<EOF
5445 #define $ac_tr_func 1
5446 EOF
5447  
5448 else
5449   echo "$ac_t""no" 1>&6
5450 fi
5451 done
5452
5453 if test x"$ac_cv_func_execl" = x"no"; then
5454     RUNPROG="bin/smbrun"
5455 else
5456     RUNPROG=""
5457 fi
5458
5459 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5460 do
5461 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5462 echo "configure:5463: checking for $ac_func" >&5
5463 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5464   echo $ac_n "(cached) $ac_c" 1>&6
5465 else
5466   cat > conftest.$ac_ext <<EOF
5467 #line 5468 "configure"
5468 #include "confdefs.h"
5469 /* System header to define __stub macros and hopefully few prototypes,
5470     which can conflict with char $ac_func(); below.  */
5471 #include <assert.h>
5472 /* Override any gcc2 internal prototype to avoid an error.  */
5473 /* We use char because int might match the return type of a gcc2
5474     builtin and then its argument prototype would still apply.  */
5475 char $ac_func();
5476
5477 int main() {
5478
5479 /* The GNU C library defines this for functions which it implements
5480     to always fail with ENOSYS.  Some functions are actually named
5481     something starting with __ and the normal name is an alias.  */
5482 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5483 choke me
5484 #else
5485 $ac_func();
5486 #endif
5487
5488 ; return 0; }
5489 EOF
5490 if { (eval echo configure:5491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5491   rm -rf conftest*
5492   eval "ac_cv_func_$ac_func=yes"
5493 else
5494   echo "configure: failed program was:" >&5
5495   cat conftest.$ac_ext >&5
5496   rm -rf conftest*
5497   eval "ac_cv_func_$ac_func=no"
5498 fi
5499 rm -f conftest*
5500 fi
5501
5502 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5503   echo "$ac_t""yes" 1>&6
5504     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5505   cat >> confdefs.h <<EOF
5506 #define $ac_tr_func 1
5507 EOF
5508  
5509 else
5510   echo "$ac_t""no" 1>&6
5511 fi
5512 done
5513
5514 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5515 do
5516 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5517 echo "configure:5518: checking for $ac_func" >&5
5518 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5519   echo $ac_n "(cached) $ac_c" 1>&6
5520 else
5521   cat > conftest.$ac_ext <<EOF
5522 #line 5523 "configure"
5523 #include "confdefs.h"
5524 /* System header to define __stub macros and hopefully few prototypes,
5525     which can conflict with char $ac_func(); below.  */
5526 #include <assert.h>
5527 /* Override any gcc2 internal prototype to avoid an error.  */
5528 /* We use char because int might match the return type of a gcc2
5529     builtin and then its argument prototype would still apply.  */
5530 char $ac_func();
5531
5532 int main() {
5533
5534 /* The GNU C library defines this for functions which it implements
5535     to always fail with ENOSYS.  Some functions are actually named
5536     something starting with __ and the normal name is an alias.  */
5537 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5538 choke me
5539 #else
5540 $ac_func();
5541 #endif
5542
5543 ; return 0; }
5544 EOF
5545 if { (eval echo configure:5546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5546   rm -rf conftest*
5547   eval "ac_cv_func_$ac_func=yes"
5548 else
5549   echo "configure: failed program was:" >&5
5550   cat conftest.$ac_ext >&5
5551   rm -rf conftest*
5552   eval "ac_cv_func_$ac_func=no"
5553 fi
5554 rm -f conftest*
5555 fi
5556
5557 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5558   echo "$ac_t""yes" 1>&6
5559     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5560   cat >> confdefs.h <<EOF
5561 #define $ac_tr_func 1
5562 EOF
5563  
5564 else
5565   echo "$ac_t""no" 1>&6
5566 fi
5567 done
5568
5569 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5570 do
5571 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5572 echo "configure:5573: checking for $ac_func" >&5
5573 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5574   echo $ac_n "(cached) $ac_c" 1>&6
5575 else
5576   cat > conftest.$ac_ext <<EOF
5577 #line 5578 "configure"
5578 #include "confdefs.h"
5579 /* System header to define __stub macros and hopefully few prototypes,
5580     which can conflict with char $ac_func(); below.  */
5581 #include <assert.h>
5582 /* Override any gcc2 internal prototype to avoid an error.  */
5583 /* We use char because int might match the return type of a gcc2
5584     builtin and then its argument prototype would still apply.  */
5585 char $ac_func();
5586
5587 int main() {
5588
5589 /* The GNU C library defines this for functions which it implements
5590     to always fail with ENOSYS.  Some functions are actually named
5591     something starting with __ and the normal name is an alias.  */
5592 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5593 choke me
5594 #else
5595 $ac_func();
5596 #endif
5597
5598 ; return 0; }
5599 EOF
5600 if { (eval echo configure:5601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5601   rm -rf conftest*
5602   eval "ac_cv_func_$ac_func=yes"
5603 else
5604   echo "configure: failed program was:" >&5
5605   cat conftest.$ac_ext >&5
5606   rm -rf conftest*
5607   eval "ac_cv_func_$ac_func=no"
5608 fi
5609 rm -f conftest*
5610 fi
5611
5612 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5613   echo "$ac_t""yes" 1>&6
5614     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5615   cat >> confdefs.h <<EOF
5616 #define $ac_tr_func 1
5617 EOF
5618  
5619 else
5620   echo "$ac_t""no" 1>&6
5621 fi
5622 done
5623
5624 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5625 do
5626 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5627 echo "configure:5628: checking for $ac_func" >&5
5628 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5629   echo $ac_n "(cached) $ac_c" 1>&6
5630 else
5631   cat > conftest.$ac_ext <<EOF
5632 #line 5633 "configure"
5633 #include "confdefs.h"
5634 /* System header to define __stub macros and hopefully few prototypes,
5635     which can conflict with char $ac_func(); below.  */
5636 #include <assert.h>
5637 /* Override any gcc2 internal prototype to avoid an error.  */
5638 /* We use char because int might match the return type of a gcc2
5639     builtin and then its argument prototype would still apply.  */
5640 char $ac_func();
5641
5642 int main() {
5643
5644 /* The GNU C library defines this for functions which it implements
5645     to always fail with ENOSYS.  Some functions are actually named
5646     something starting with __ and the normal name is an alias.  */
5647 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5648 choke me
5649 #else
5650 $ac_func();
5651 #endif
5652
5653 ; return 0; }
5654 EOF
5655 if { (eval echo configure:5656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5656   rm -rf conftest*
5657   eval "ac_cv_func_$ac_func=yes"
5658 else
5659   echo "configure: failed program was:" >&5
5660   cat conftest.$ac_ext >&5
5661   rm -rf conftest*
5662   eval "ac_cv_func_$ac_func=no"
5663 fi
5664 rm -f conftest*
5665 fi
5666
5667 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5668   echo "$ac_t""yes" 1>&6
5669     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5670   cat >> confdefs.h <<EOF
5671 #define $ac_tr_func 1
5672 EOF
5673  
5674 else
5675   echo "$ac_t""no" 1>&6
5676 fi
5677 done
5678
5679 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5680 do
5681 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5682 echo "configure:5683: checking for $ac_func" >&5
5683 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5684   echo $ac_n "(cached) $ac_c" 1>&6
5685 else
5686   cat > conftest.$ac_ext <<EOF
5687 #line 5688 "configure"
5688 #include "confdefs.h"
5689 /* System header to define __stub macros and hopefully few prototypes,
5690     which can conflict with char $ac_func(); below.  */
5691 #include <assert.h>
5692 /* Override any gcc2 internal prototype to avoid an error.  */
5693 /* We use char because int might match the return type of a gcc2
5694     builtin and then its argument prototype would still apply.  */
5695 char $ac_func();
5696
5697 int main() {
5698
5699 /* The GNU C library defines this for functions which it implements
5700     to always fail with ENOSYS.  Some functions are actually named
5701     something starting with __ and the normal name is an alias.  */
5702 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5703 choke me
5704 #else
5705 $ac_func();
5706 #endif
5707
5708 ; return 0; }
5709 EOF
5710 if { (eval echo configure:5711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5711   rm -rf conftest*
5712   eval "ac_cv_func_$ac_func=yes"
5713 else
5714   echo "configure: failed program was:" >&5
5715   cat conftest.$ac_ext >&5
5716   rm -rf conftest*
5717   eval "ac_cv_func_$ac_func=no"
5718 fi
5719 rm -f conftest*
5720 fi
5721
5722 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5723   echo "$ac_t""yes" 1>&6
5724     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5725   cat >> confdefs.h <<EOF
5726 #define $ac_tr_func 1
5727 EOF
5728  
5729 else
5730   echo "$ac_t""no" 1>&6
5731 fi
5732 done
5733
5734 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5735 do
5736 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5737 echo "configure:5738: checking for $ac_func" >&5
5738 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5739   echo $ac_n "(cached) $ac_c" 1>&6
5740 else
5741   cat > conftest.$ac_ext <<EOF
5742 #line 5743 "configure"
5743 #include "confdefs.h"
5744 /* System header to define __stub macros and hopefully few prototypes,
5745     which can conflict with char $ac_func(); below.  */
5746 #include <assert.h>
5747 /* Override any gcc2 internal prototype to avoid an error.  */
5748 /* We use char because int might match the return type of a gcc2
5749     builtin and then its argument prototype would still apply.  */
5750 char $ac_func();
5751
5752 int main() {
5753
5754 /* The GNU C library defines this for functions which it implements
5755     to always fail with ENOSYS.  Some functions are actually named
5756     something starting with __ and the normal name is an alias.  */
5757 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5758 choke me
5759 #else
5760 $ac_func();
5761 #endif
5762
5763 ; return 0; }
5764 EOF
5765 if { (eval echo configure:5766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5766   rm -rf conftest*
5767   eval "ac_cv_func_$ac_func=yes"
5768 else
5769   echo "configure: failed program was:" >&5
5770   cat conftest.$ac_ext >&5
5771   rm -rf conftest*
5772   eval "ac_cv_func_$ac_func=no"
5773 fi
5774 rm -f conftest*
5775 fi
5776
5777 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5778   echo "$ac_t""yes" 1>&6
5779     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5780   cat >> confdefs.h <<EOF
5781 #define $ac_tr_func 1
5782 EOF
5783  
5784 else
5785   echo "$ac_t""no" 1>&6
5786 fi
5787 done
5788
5789 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5790 do
5791 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5792 echo "configure:5793: checking for $ac_func" >&5
5793 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5794   echo $ac_n "(cached) $ac_c" 1>&6
5795 else
5796   cat > conftest.$ac_ext <<EOF
5797 #line 5798 "configure"
5798 #include "confdefs.h"
5799 /* System header to define __stub macros and hopefully few prototypes,
5800     which can conflict with char $ac_func(); below.  */
5801 #include <assert.h>
5802 /* Override any gcc2 internal prototype to avoid an error.  */
5803 /* We use char because int might match the return type of a gcc2
5804     builtin and then its argument prototype would still apply.  */
5805 char $ac_func();
5806
5807 int main() {
5808
5809 /* The GNU C library defines this for functions which it implements
5810     to always fail with ENOSYS.  Some functions are actually named
5811     something starting with __ and the normal name is an alias.  */
5812 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5813 choke me
5814 #else
5815 $ac_func();
5816 #endif
5817
5818 ; return 0; }
5819 EOF
5820 if { (eval echo configure:5821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5821   rm -rf conftest*
5822   eval "ac_cv_func_$ac_func=yes"
5823 else
5824   echo "configure: failed program was:" >&5
5825   cat conftest.$ac_ext >&5
5826   rm -rf conftest*
5827   eval "ac_cv_func_$ac_func=no"
5828 fi
5829 rm -f conftest*
5830 fi
5831
5832 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5833   echo "$ac_t""yes" 1>&6
5834     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5835   cat >> confdefs.h <<EOF
5836 #define $ac_tr_func 1
5837 EOF
5838  
5839 else
5840   echo "$ac_t""no" 1>&6
5841 fi
5842 done
5843
5844 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5845 do
5846 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5847 echo "configure:5848: checking for $ac_func" >&5
5848 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5849   echo $ac_n "(cached) $ac_c" 1>&6
5850 else
5851   cat > conftest.$ac_ext <<EOF
5852 #line 5853 "configure"
5853 #include "confdefs.h"
5854 /* System header to define __stub macros and hopefully few prototypes,
5855     which can conflict with char $ac_func(); below.  */
5856 #include <assert.h>
5857 /* Override any gcc2 internal prototype to avoid an error.  */
5858 /* We use char because int might match the return type of a gcc2
5859     builtin and then its argument prototype would still apply.  */
5860 char $ac_func();
5861
5862 int main() {
5863
5864 /* The GNU C library defines this for functions which it implements
5865     to always fail with ENOSYS.  Some functions are actually named
5866     something starting with __ and the normal name is an alias.  */
5867 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5868 choke me
5869 #else
5870 $ac_func();
5871 #endif
5872
5873 ; return 0; }
5874 EOF
5875 if { (eval echo configure:5876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5876   rm -rf conftest*
5877   eval "ac_cv_func_$ac_func=yes"
5878 else
5879   echo "configure: failed program was:" >&5
5880   cat conftest.$ac_ext >&5
5881   rm -rf conftest*
5882   eval "ac_cv_func_$ac_func=no"
5883 fi
5884 rm -f conftest*
5885 fi
5886
5887 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5888   echo "$ac_t""yes" 1>&6
5889     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5890   cat >> confdefs.h <<EOF
5891 #define $ac_tr_func 1
5892 EOF
5893  
5894 else
5895   echo "$ac_t""no" 1>&6
5896 fi
5897 done
5898
5899 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5900 do
5901 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5902 echo "configure:5903: checking for $ac_func" >&5
5903 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5904   echo $ac_n "(cached) $ac_c" 1>&6
5905 else
5906   cat > conftest.$ac_ext <<EOF
5907 #line 5908 "configure"
5908 #include "confdefs.h"
5909 /* System header to define __stub macros and hopefully few prototypes,
5910     which can conflict with char $ac_func(); below.  */
5911 #include <assert.h>
5912 /* Override any gcc2 internal prototype to avoid an error.  */
5913 /* We use char because int might match the return type of a gcc2
5914     builtin and then its argument prototype would still apply.  */
5915 char $ac_func();
5916
5917 int main() {
5918
5919 /* The GNU C library defines this for functions which it implements
5920     to always fail with ENOSYS.  Some functions are actually named
5921     something starting with __ and the normal name is an alias.  */
5922 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5923 choke me
5924 #else
5925 $ac_func();
5926 #endif
5927
5928 ; return 0; }
5929 EOF
5930 if { (eval echo configure:5931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5931   rm -rf conftest*
5932   eval "ac_cv_func_$ac_func=yes"
5933 else
5934   echo "configure: failed program was:" >&5
5935   cat conftest.$ac_ext >&5
5936   rm -rf conftest*
5937   eval "ac_cv_func_$ac_func=no"
5938 fi
5939 rm -f conftest*
5940 fi
5941
5942 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5943   echo "$ac_t""yes" 1>&6
5944     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5945   cat >> confdefs.h <<EOF
5946 #define $ac_tr_func 1
5947 EOF
5948  
5949 else
5950   echo "$ac_t""no" 1>&6
5951 fi
5952 done
5953
5954 for ac_func in syslog vsyslog
5955 do
5956 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5957 echo "configure:5958: checking for $ac_func" >&5
5958 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5959   echo $ac_n "(cached) $ac_c" 1>&6
5960 else
5961   cat > conftest.$ac_ext <<EOF
5962 #line 5963 "configure"
5963 #include "confdefs.h"
5964 /* System header to define __stub macros and hopefully few prototypes,
5965     which can conflict with char $ac_func(); below.  */
5966 #include <assert.h>
5967 /* Override any gcc2 internal prototype to avoid an error.  */
5968 /* We use char because int might match the return type of a gcc2
5969     builtin and then its argument prototype would still apply.  */
5970 char $ac_func();
5971
5972 int main() {
5973
5974 /* The GNU C library defines this for functions which it implements
5975     to always fail with ENOSYS.  Some functions are actually named
5976     something starting with __ and the normal name is an alias.  */
5977 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5978 choke me
5979 #else
5980 $ac_func();
5981 #endif
5982
5983 ; return 0; }
5984 EOF
5985 if { (eval echo configure:5986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5986   rm -rf conftest*
5987   eval "ac_cv_func_$ac_func=yes"
5988 else
5989   echo "configure: failed program was:" >&5
5990   cat conftest.$ac_ext >&5
5991   rm -rf conftest*
5992   eval "ac_cv_func_$ac_func=no"
5993 fi
5994 rm -f conftest*
5995 fi
5996
5997 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5998   echo "$ac_t""yes" 1>&6
5999     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6000   cat >> confdefs.h <<EOF
6001 #define $ac_tr_func 1
6002 EOF
6003  
6004 else
6005   echo "$ac_t""no" 1>&6
6006 fi
6007 done
6008
6009 # setbuffer is needed for smbtorture
6010 for ac_func in setbuffer
6011 do
6012 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6013 echo "configure:6014: checking for $ac_func" >&5
6014 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6015   echo $ac_n "(cached) $ac_c" 1>&6
6016 else
6017   cat > conftest.$ac_ext <<EOF
6018 #line 6019 "configure"
6019 #include "confdefs.h"
6020 /* System header to define __stub macros and hopefully few prototypes,
6021     which can conflict with char $ac_func(); below.  */
6022 #include <assert.h>
6023 /* Override any gcc2 internal prototype to avoid an error.  */
6024 /* We use char because int might match the return type of a gcc2
6025     builtin and then its argument prototype would still apply.  */
6026 char $ac_func();
6027
6028 int main() {
6029
6030 /* The GNU C library defines this for functions which it implements
6031     to always fail with ENOSYS.  Some functions are actually named
6032     something starting with __ and the normal name is an alias.  */
6033 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6034 choke me
6035 #else
6036 $ac_func();
6037 #endif
6038
6039 ; return 0; }
6040 EOF
6041 if { (eval echo configure:6042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6042   rm -rf conftest*
6043   eval "ac_cv_func_$ac_func=yes"
6044 else
6045   echo "configure: failed program was:" >&5
6046   cat conftest.$ac_ext >&5
6047   rm -rf conftest*
6048   eval "ac_cv_func_$ac_func=no"
6049 fi
6050 rm -f conftest*
6051 fi
6052
6053 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6054   echo "$ac_t""yes" 1>&6
6055     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6056   cat >> confdefs.h <<EOF
6057 #define $ac_tr_func 1
6058 EOF
6059  
6060 else
6061   echo "$ac_t""no" 1>&6
6062 fi
6063 done
6064
6065
6066 # syscall() is needed for smbwrapper.
6067 for ac_func in syscall
6068 do
6069 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6070 echo "configure:6071: checking for $ac_func" >&5
6071 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6072   echo $ac_n "(cached) $ac_c" 1>&6
6073 else
6074   cat > conftest.$ac_ext <<EOF
6075 #line 6076 "configure"
6076 #include "confdefs.h"
6077 /* System header to define __stub macros and hopefully few prototypes,
6078     which can conflict with char $ac_func(); below.  */
6079 #include <assert.h>
6080 /* Override any gcc2 internal prototype to avoid an error.  */
6081 /* We use char because int might match the return type of a gcc2
6082     builtin and then its argument prototype would still apply.  */
6083 char $ac_func();
6084
6085 int main() {
6086
6087 /* The GNU C library defines this for functions which it implements
6088     to always fail with ENOSYS.  Some functions are actually named
6089     something starting with __ and the normal name is an alias.  */
6090 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6091 choke me
6092 #else
6093 $ac_func();
6094 #endif
6095
6096 ; return 0; }
6097 EOF
6098 if { (eval echo configure:6099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6099   rm -rf conftest*
6100   eval "ac_cv_func_$ac_func=yes"
6101 else
6102   echo "configure: failed program was:" >&5
6103   cat conftest.$ac_ext >&5
6104   rm -rf conftest*
6105   eval "ac_cv_func_$ac_func=no"
6106 fi
6107 rm -f conftest*
6108 fi
6109
6110 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6111   echo "$ac_t""yes" 1>&6
6112     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6113   cat >> confdefs.h <<EOF
6114 #define $ac_tr_func 1
6115 EOF
6116  
6117 else
6118   echo "$ac_t""no" 1>&6
6119 fi
6120 done
6121
6122
6123 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6124 do
6125 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6126 echo "configure:6127: checking for $ac_func" >&5
6127 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6128   echo $ac_n "(cached) $ac_c" 1>&6
6129 else
6130   cat > conftest.$ac_ext <<EOF
6131 #line 6132 "configure"
6132 #include "confdefs.h"
6133 /* System header to define __stub macros and hopefully few prototypes,
6134     which can conflict with char $ac_func(); below.  */
6135 #include <assert.h>
6136 /* Override any gcc2 internal prototype to avoid an error.  */
6137 /* We use char because int might match the return type of a gcc2
6138     builtin and then its argument prototype would still apply.  */
6139 char $ac_func();
6140
6141 int main() {
6142
6143 /* The GNU C library defines this for functions which it implements
6144     to always fail with ENOSYS.  Some functions are actually named
6145     something starting with __ and the normal name is an alias.  */
6146 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6147 choke me
6148 #else
6149 $ac_func();
6150 #endif
6151
6152 ; return 0; }
6153 EOF
6154 if { (eval echo configure:6155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6155   rm -rf conftest*
6156   eval "ac_cv_func_$ac_func=yes"
6157 else
6158   echo "configure: failed program was:" >&5
6159   cat conftest.$ac_ext >&5
6160   rm -rf conftest*
6161   eval "ac_cv_func_$ac_func=no"
6162 fi
6163 rm -f conftest*
6164 fi
6165
6166 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6167   echo "$ac_t""yes" 1>&6
6168     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6169   cat >> confdefs.h <<EOF
6170 #define $ac_tr_func 1
6171 EOF
6172  
6173 else
6174   echo "$ac_t""no" 1>&6
6175 fi
6176 done
6177
6178 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6179 do
6180 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6181 echo "configure:6182: checking for $ac_func" >&5
6182 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6183   echo $ac_n "(cached) $ac_c" 1>&6
6184 else
6185   cat > conftest.$ac_ext <<EOF
6186 #line 6187 "configure"
6187 #include "confdefs.h"
6188 /* System header to define __stub macros and hopefully few prototypes,
6189     which can conflict with char $ac_func(); below.  */
6190 #include <assert.h>
6191 /* Override any gcc2 internal prototype to avoid an error.  */
6192 /* We use char because int might match the return type of a gcc2
6193     builtin and then its argument prototype would still apply.  */
6194 char $ac_func();
6195
6196 int main() {
6197
6198 /* The GNU C library defines this for functions which it implements
6199     to always fail with ENOSYS.  Some functions are actually named
6200     something starting with __ and the normal name is an alias.  */
6201 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6202 choke me
6203 #else
6204 $ac_func();
6205 #endif
6206
6207 ; return 0; }
6208 EOF
6209 if { (eval echo configure:6210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6210   rm -rf conftest*
6211   eval "ac_cv_func_$ac_func=yes"
6212 else
6213   echo "configure: failed program was:" >&5
6214   cat conftest.$ac_ext >&5
6215   rm -rf conftest*
6216   eval "ac_cv_func_$ac_func=no"
6217 fi
6218 rm -f conftest*
6219 fi
6220
6221 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6222   echo "$ac_t""yes" 1>&6
6223     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6224   cat >> confdefs.h <<EOF
6225 #define $ac_tr_func 1
6226 EOF
6227  
6228 else
6229   echo "$ac_t""no" 1>&6
6230 fi
6231 done
6232
6233 for ac_func in __getcwd _getcwd
6234 do
6235 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6236 echo "configure:6237: checking for $ac_func" >&5
6237 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6238   echo $ac_n "(cached) $ac_c" 1>&6
6239 else
6240   cat > conftest.$ac_ext <<EOF
6241 #line 6242 "configure"
6242 #include "confdefs.h"
6243 /* System header to define __stub macros and hopefully few prototypes,
6244     which can conflict with char $ac_func(); below.  */
6245 #include <assert.h>
6246 /* Override any gcc2 internal prototype to avoid an error.  */
6247 /* We use char because int might match the return type of a gcc2
6248     builtin and then its argument prototype would still apply.  */
6249 char $ac_func();
6250
6251 int main() {
6252
6253 /* The GNU C library defines this for functions which it implements
6254     to always fail with ENOSYS.  Some functions are actually named
6255     something starting with __ and the normal name is an alias.  */
6256 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6257 choke me
6258 #else
6259 $ac_func();
6260 #endif
6261
6262 ; return 0; }
6263 EOF
6264 if { (eval echo configure:6265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6265   rm -rf conftest*
6266   eval "ac_cv_func_$ac_func=yes"
6267 else
6268   echo "configure: failed program was:" >&5
6269   cat conftest.$ac_ext >&5
6270   rm -rf conftest*
6271   eval "ac_cv_func_$ac_func=no"
6272 fi
6273 rm -f conftest*
6274 fi
6275
6276 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6277   echo "$ac_t""yes" 1>&6
6278     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6279   cat >> confdefs.h <<EOF
6280 #define $ac_tr_func 1
6281 EOF
6282  
6283 else
6284   echo "$ac_t""no" 1>&6
6285 fi
6286 done
6287
6288 for ac_func in __xstat __fxstat __lxstat
6289 do
6290 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6291 echo "configure:6292: checking for $ac_func" >&5
6292 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6293   echo $ac_n "(cached) $ac_c" 1>&6
6294 else
6295   cat > conftest.$ac_ext <<EOF
6296 #line 6297 "configure"
6297 #include "confdefs.h"
6298 /* System header to define __stub macros and hopefully few prototypes,
6299     which can conflict with char $ac_func(); below.  */
6300 #include <assert.h>
6301 /* Override any gcc2 internal prototype to avoid an error.  */
6302 /* We use char because int might match the return type of a gcc2
6303     builtin and then its argument prototype would still apply.  */
6304 char $ac_func();
6305
6306 int main() {
6307
6308 /* The GNU C library defines this for functions which it implements
6309     to always fail with ENOSYS.  Some functions are actually named
6310     something starting with __ and the normal name is an alias.  */
6311 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6312 choke me
6313 #else
6314 $ac_func();
6315 #endif
6316
6317 ; return 0; }
6318 EOF
6319 if { (eval echo configure:6320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6320   rm -rf conftest*
6321   eval "ac_cv_func_$ac_func=yes"
6322 else
6323   echo "configure: failed program was:" >&5
6324   cat conftest.$ac_ext >&5
6325   rm -rf conftest*
6326   eval "ac_cv_func_$ac_func=no"
6327 fi
6328 rm -f conftest*
6329 fi
6330
6331 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6332   echo "$ac_t""yes" 1>&6
6333     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6334   cat >> confdefs.h <<EOF
6335 #define $ac_tr_func 1
6336 EOF
6337  
6338 else
6339   echo "$ac_t""no" 1>&6
6340 fi
6341 done
6342
6343 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6344 do
6345 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6346 echo "configure:6347: checking for $ac_func" >&5
6347 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6348   echo $ac_n "(cached) $ac_c" 1>&6
6349 else
6350   cat > conftest.$ac_ext <<EOF
6351 #line 6352 "configure"
6352 #include "confdefs.h"
6353 /* System header to define __stub macros and hopefully few prototypes,
6354     which can conflict with char $ac_func(); below.  */
6355 #include <assert.h>
6356 /* Override any gcc2 internal prototype to avoid an error.  */
6357 /* We use char because int might match the return type of a gcc2
6358     builtin and then its argument prototype would still apply.  */
6359 char $ac_func();
6360
6361 int main() {
6362
6363 /* The GNU C library defines this for functions which it implements
6364     to always fail with ENOSYS.  Some functions are actually named
6365     something starting with __ and the normal name is an alias.  */
6366 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6367 choke me
6368 #else
6369 $ac_func();
6370 #endif
6371
6372 ; return 0; }
6373 EOF
6374 if { (eval echo configure:6375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6375   rm -rf conftest*
6376   eval "ac_cv_func_$ac_func=yes"
6377 else
6378   echo "configure: failed program was:" >&5
6379   cat conftest.$ac_ext >&5
6380   rm -rf conftest*
6381   eval "ac_cv_func_$ac_func=no"
6382 fi
6383 rm -f conftest*
6384 fi
6385
6386 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6387   echo "$ac_t""yes" 1>&6
6388     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6389   cat >> confdefs.h <<EOF
6390 #define $ac_tr_func 1
6391 EOF
6392  
6393 else
6394   echo "$ac_t""no" 1>&6
6395 fi
6396 done
6397
6398 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6399 do
6400 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6401 echo "configure:6402: checking for $ac_func" >&5
6402 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6403   echo $ac_n "(cached) $ac_c" 1>&6
6404 else
6405   cat > conftest.$ac_ext <<EOF
6406 #line 6407 "configure"
6407 #include "confdefs.h"
6408 /* System header to define __stub macros and hopefully few prototypes,
6409     which can conflict with char $ac_func(); below.  */
6410 #include <assert.h>
6411 /* Override any gcc2 internal prototype to avoid an error.  */
6412 /* We use char because int might match the return type of a gcc2
6413     builtin and then its argument prototype would still apply.  */
6414 char $ac_func();
6415
6416 int main() {
6417
6418 /* The GNU C library defines this for functions which it implements
6419     to always fail with ENOSYS.  Some functions are actually named
6420     something starting with __ and the normal name is an alias.  */
6421 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6422 choke me
6423 #else
6424 $ac_func();
6425 #endif
6426
6427 ; return 0; }
6428 EOF
6429 if { (eval echo configure:6430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6430   rm -rf conftest*
6431   eval "ac_cv_func_$ac_func=yes"
6432 else
6433   echo "configure: failed program was:" >&5
6434   cat conftest.$ac_ext >&5
6435   rm -rf conftest*
6436   eval "ac_cv_func_$ac_func=no"
6437 fi
6438 rm -f conftest*
6439 fi
6440
6441 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6442   echo "$ac_t""yes" 1>&6
6443     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6444   cat >> confdefs.h <<EOF
6445 #define $ac_tr_func 1
6446 EOF
6447  
6448 else
6449   echo "$ac_t""no" 1>&6
6450 fi
6451 done
6452
6453 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6454 do
6455 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6456 echo "configure:6457: checking for $ac_func" >&5
6457 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6458   echo $ac_n "(cached) $ac_c" 1>&6
6459 else
6460   cat > conftest.$ac_ext <<EOF
6461 #line 6462 "configure"
6462 #include "confdefs.h"
6463 /* System header to define __stub macros and hopefully few prototypes,
6464     which can conflict with char $ac_func(); below.  */
6465 #include <assert.h>
6466 /* Override any gcc2 internal prototype to avoid an error.  */
6467 /* We use char because int might match the return type of a gcc2
6468     builtin and then its argument prototype would still apply.  */
6469 char $ac_func();
6470
6471 int main() {
6472
6473 /* The GNU C library defines this for functions which it implements
6474     to always fail with ENOSYS.  Some functions are actually named
6475     something starting with __ and the normal name is an alias.  */
6476 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6477 choke me
6478 #else
6479 $ac_func();
6480 #endif
6481
6482 ; return 0; }
6483 EOF
6484 if { (eval echo configure:6485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6485   rm -rf conftest*
6486   eval "ac_cv_func_$ac_func=yes"
6487 else
6488   echo "configure: failed program was:" >&5
6489   cat conftest.$ac_ext >&5
6490   rm -rf conftest*
6491   eval "ac_cv_func_$ac_func=no"
6492 fi
6493 rm -f conftest*
6494 fi
6495
6496 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6497   echo "$ac_t""yes" 1>&6
6498     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6499   cat >> confdefs.h <<EOF
6500 #define $ac_tr_func 1
6501 EOF
6502  
6503 else
6504   echo "$ac_t""no" 1>&6
6505 fi
6506 done
6507
6508 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6509 do
6510 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6511 echo "configure:6512: checking for $ac_func" >&5
6512 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6513   echo $ac_n "(cached) $ac_c" 1>&6
6514 else
6515   cat > conftest.$ac_ext <<EOF
6516 #line 6517 "configure"
6517 #include "confdefs.h"
6518 /* System header to define __stub macros and hopefully few prototypes,
6519     which can conflict with char $ac_func(); below.  */
6520 #include <assert.h>
6521 /* Override any gcc2 internal prototype to avoid an error.  */
6522 /* We use char because int might match the return type of a gcc2
6523     builtin and then its argument prototype would still apply.  */
6524 char $ac_func();
6525
6526 int main() {
6527
6528 /* The GNU C library defines this for functions which it implements
6529     to always fail with ENOSYS.  Some functions are actually named
6530     something starting with __ and the normal name is an alias.  */
6531 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6532 choke me
6533 #else
6534 $ac_func();
6535 #endif
6536
6537 ; return 0; }
6538 EOF
6539 if { (eval echo configure:6540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6540   rm -rf conftest*
6541   eval "ac_cv_func_$ac_func=yes"
6542 else
6543   echo "configure: failed program was:" >&5
6544   cat conftest.$ac_ext >&5
6545   rm -rf conftest*
6546   eval "ac_cv_func_$ac_func=no"
6547 fi
6548 rm -f conftest*
6549 fi
6550
6551 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6552   echo "$ac_t""yes" 1>&6
6553     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6554   cat >> confdefs.h <<EOF
6555 #define $ac_tr_func 1
6556 EOF
6557  
6558 else
6559   echo "$ac_t""no" 1>&6
6560 fi
6561 done
6562
6563 for ac_func in _write __write _fork __fork
6564 do
6565 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6566 echo "configure:6567: checking for $ac_func" >&5
6567 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6568   echo $ac_n "(cached) $ac_c" 1>&6
6569 else
6570   cat > conftest.$ac_ext <<EOF
6571 #line 6572 "configure"
6572 #include "confdefs.h"
6573 /* System header to define __stub macros and hopefully few prototypes,
6574     which can conflict with char $ac_func(); below.  */
6575 #include <assert.h>
6576 /* Override any gcc2 internal prototype to avoid an error.  */
6577 /* We use char because int might match the return type of a gcc2
6578     builtin and then its argument prototype would still apply.  */
6579 char $ac_func();
6580
6581 int main() {
6582
6583 /* The GNU C library defines this for functions which it implements
6584     to always fail with ENOSYS.  Some functions are actually named
6585     something starting with __ and the normal name is an alias.  */
6586 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6587 choke me
6588 #else
6589 $ac_func();
6590 #endif
6591
6592 ; return 0; }
6593 EOF
6594 if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6595   rm -rf conftest*
6596   eval "ac_cv_func_$ac_func=yes"
6597 else
6598   echo "configure: failed program was:" >&5
6599   cat conftest.$ac_ext >&5
6600   rm -rf conftest*
6601   eval "ac_cv_func_$ac_func=no"
6602 fi
6603 rm -f conftest*
6604 fi
6605
6606 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6607   echo "$ac_t""yes" 1>&6
6608     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6609   cat >> confdefs.h <<EOF
6610 #define $ac_tr_func 1
6611 EOF
6612  
6613 else
6614   echo "$ac_t""no" 1>&6
6615 fi
6616 done
6617
6618 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6619 do
6620 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6621 echo "configure:6622: checking for $ac_func" >&5
6622 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6623   echo $ac_n "(cached) $ac_c" 1>&6
6624 else
6625   cat > conftest.$ac_ext <<EOF
6626 #line 6627 "configure"
6627 #include "confdefs.h"
6628 /* System header to define __stub macros and hopefully few prototypes,
6629     which can conflict with char $ac_func(); below.  */
6630 #include <assert.h>
6631 /* Override any gcc2 internal prototype to avoid an error.  */
6632 /* We use char because int might match the return type of a gcc2
6633     builtin and then its argument prototype would still apply.  */
6634 char $ac_func();
6635
6636 int main() {
6637
6638 /* The GNU C library defines this for functions which it implements
6639     to always fail with ENOSYS.  Some functions are actually named
6640     something starting with __ and the normal name is an alias.  */
6641 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6642 choke me
6643 #else
6644 $ac_func();
6645 #endif
6646
6647 ; return 0; }
6648 EOF
6649 if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6650   rm -rf conftest*
6651   eval "ac_cv_func_$ac_func=yes"
6652 else
6653   echo "configure: failed program was:" >&5
6654   cat conftest.$ac_ext >&5
6655   rm -rf conftest*
6656   eval "ac_cv_func_$ac_func=no"
6657 fi
6658 rm -f conftest*
6659 fi
6660
6661 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6662   echo "$ac_t""yes" 1>&6
6663     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6664   cat >> confdefs.h <<EOF
6665 #define $ac_tr_func 1
6666 EOF
6667  
6668 else
6669   echo "$ac_t""no" 1>&6
6670 fi
6671 done
6672
6673 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6674 do
6675 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6676 echo "configure:6677: checking for $ac_func" >&5
6677 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6678   echo $ac_n "(cached) $ac_c" 1>&6
6679 else
6680   cat > conftest.$ac_ext <<EOF
6681 #line 6682 "configure"
6682 #include "confdefs.h"
6683 /* System header to define __stub macros and hopefully few prototypes,
6684     which can conflict with char $ac_func(); below.  */
6685 #include <assert.h>
6686 /* Override any gcc2 internal prototype to avoid an error.  */
6687 /* We use char because int might match the return type of a gcc2
6688     builtin and then its argument prototype would still apply.  */
6689 char $ac_func();
6690
6691 int main() {
6692
6693 /* The GNU C library defines this for functions which it implements
6694     to always fail with ENOSYS.  Some functions are actually named
6695     something starting with __ and the normal name is an alias.  */
6696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6697 choke me
6698 #else
6699 $ac_func();
6700 #endif
6701
6702 ; return 0; }
6703 EOF
6704 if { (eval echo configure:6705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6705   rm -rf conftest*
6706   eval "ac_cv_func_$ac_func=yes"
6707 else
6708   echo "configure: failed program was:" >&5
6709   cat conftest.$ac_ext >&5
6710   rm -rf conftest*
6711   eval "ac_cv_func_$ac_func=no"
6712 fi
6713 rm -f conftest*
6714 fi
6715
6716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6717   echo "$ac_t""yes" 1>&6
6718     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6719   cat >> confdefs.h <<EOF
6720 #define $ac_tr_func 1
6721 EOF
6722  
6723 else
6724   echo "$ac_t""no" 1>&6
6725 fi
6726 done
6727
6728 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6729 do
6730 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6731 echo "configure:6732: checking for $ac_func" >&5
6732 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6733   echo $ac_n "(cached) $ac_c" 1>&6
6734 else
6735   cat > conftest.$ac_ext <<EOF
6736 #line 6737 "configure"
6737 #include "confdefs.h"
6738 /* System header to define __stub macros and hopefully few prototypes,
6739     which can conflict with char $ac_func(); below.  */
6740 #include <assert.h>
6741 /* Override any gcc2 internal prototype to avoid an error.  */
6742 /* We use char because int might match the return type of a gcc2
6743     builtin and then its argument prototype would still apply.  */
6744 char $ac_func();
6745
6746 int main() {
6747
6748 /* The GNU C library defines this for functions which it implements
6749     to always fail with ENOSYS.  Some functions are actually named
6750     something starting with __ and the normal name is an alias.  */
6751 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6752 choke me
6753 #else
6754 $ac_func();
6755 #endif
6756
6757 ; return 0; }
6758 EOF
6759 if { (eval echo configure:6760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6760   rm -rf conftest*
6761   eval "ac_cv_func_$ac_func=yes"
6762 else
6763   echo "configure: failed program was:" >&5
6764   cat conftest.$ac_ext >&5
6765   rm -rf conftest*
6766   eval "ac_cv_func_$ac_func=no"
6767 fi
6768 rm -f conftest*
6769 fi
6770
6771 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6772   echo "$ac_t""yes" 1>&6
6773     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6774   cat >> confdefs.h <<EOF
6775 #define $ac_tr_func 1
6776 EOF
6777  
6778 else
6779   echo "$ac_t""no" 1>&6
6780 fi
6781 done
6782
6783 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6784 do
6785 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6786 echo "configure:6787: checking for $ac_func" >&5
6787 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6788   echo $ac_n "(cached) $ac_c" 1>&6
6789 else
6790   cat > conftest.$ac_ext <<EOF
6791 #line 6792 "configure"
6792 #include "confdefs.h"
6793 /* System header to define __stub macros and hopefully few prototypes,
6794     which can conflict with char $ac_func(); below.  */
6795 #include <assert.h>
6796 /* Override any gcc2 internal prototype to avoid an error.  */
6797 /* We use char because int might match the return type of a gcc2
6798     builtin and then its argument prototype would still apply.  */
6799 char $ac_func();
6800
6801 int main() {
6802
6803 /* The GNU C library defines this for functions which it implements
6804     to always fail with ENOSYS.  Some functions are actually named
6805     something starting with __ and the normal name is an alias.  */
6806 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6807 choke me
6808 #else
6809 $ac_func();
6810 #endif
6811
6812 ; return 0; }
6813 EOF
6814 if { (eval echo configure:6815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6815   rm -rf conftest*
6816   eval "ac_cv_func_$ac_func=yes"
6817 else
6818   echo "configure: failed program was:" >&5
6819   cat conftest.$ac_ext >&5
6820   rm -rf conftest*
6821   eval "ac_cv_func_$ac_func=no"
6822 fi
6823 rm -f conftest*
6824 fi
6825
6826 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6827   echo "$ac_t""yes" 1>&6
6828     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6829   cat >> confdefs.h <<EOF
6830 #define $ac_tr_func 1
6831 EOF
6832  
6833 else
6834   echo "$ac_t""no" 1>&6
6835 fi
6836 done
6837
6838 for ac_func in open64 _open64 __open64 creat64
6839 do
6840 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6841 echo "configure:6842: checking for $ac_func" >&5
6842 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6843   echo $ac_n "(cached) $ac_c" 1>&6
6844 else
6845   cat > conftest.$ac_ext <<EOF
6846 #line 6847 "configure"
6847 #include "confdefs.h"
6848 /* System header to define __stub macros and hopefully few prototypes,
6849     which can conflict with char $ac_func(); below.  */
6850 #include <assert.h>
6851 /* Override any gcc2 internal prototype to avoid an error.  */
6852 /* We use char because int might match the return type of a gcc2
6853     builtin and then its argument prototype would still apply.  */
6854 char $ac_func();
6855
6856 int main() {
6857
6858 /* The GNU C library defines this for functions which it implements
6859     to always fail with ENOSYS.  Some functions are actually named
6860     something starting with __ and the normal name is an alias.  */
6861 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6862 choke me
6863 #else
6864 $ac_func();
6865 #endif
6866
6867 ; return 0; }
6868 EOF
6869 if { (eval echo configure:6870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6870   rm -rf conftest*
6871   eval "ac_cv_func_$ac_func=yes"
6872 else
6873   echo "configure: failed program was:" >&5
6874   cat conftest.$ac_ext >&5
6875   rm -rf conftest*
6876   eval "ac_cv_func_$ac_func=no"
6877 fi
6878 rm -f conftest*
6879 fi
6880
6881 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6882   echo "$ac_t""yes" 1>&6
6883     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6884   cat >> confdefs.h <<EOF
6885 #define $ac_tr_func 1
6886 EOF
6887  
6888 else
6889   echo "$ac_t""no" 1>&6
6890 fi
6891 done
6892
6893
6894 #
6895 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6896 #
6897
6898 if test x$ac_cv_func_stat64 = xno ; then
6899   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6900 echo "configure:6901: checking for stat64 in <sys/stat.h>" >&5
6901   cat > conftest.$ac_ext <<EOF
6902 #line 6903 "configure"
6903 #include "confdefs.h"
6904
6905 #if defined(HAVE_UNISTD_H)
6906 #include <unistd.h>
6907 #endif
6908 #include <sys/stat.h>
6909
6910 int main() {
6911 struct stat64 st64; exit(stat64(".",&st64));
6912 ; return 0; }
6913 EOF
6914 if { (eval echo configure:6915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6915   rm -rf conftest*
6916   ac_cv_func_stat64=yes
6917 else
6918   echo "configure: failed program was:" >&5
6919   cat conftest.$ac_ext >&5
6920 fi
6921 rm -f conftest*
6922   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6923   if test x$ac_cv_func_stat64 = xyes ; then
6924     cat >> confdefs.h <<\EOF
6925 #define HAVE_STAT64 1
6926 EOF
6927
6928   fi
6929 fi
6930
6931 if test x$ac_cv_func_lstat64 = xno ; then
6932   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6933 echo "configure:6934: checking for lstat64 in <sys/stat.h>" >&5
6934   cat > conftest.$ac_ext <<EOF
6935 #line 6936 "configure"
6936 #include "confdefs.h"
6937
6938 #if defined(HAVE_UNISTD_H)
6939 #include <unistd.h>
6940 #endif
6941 #include <sys/stat.h>
6942
6943 int main() {
6944 struct stat64 st64; exit(lstat64(".",&st64));
6945 ; return 0; }
6946 EOF
6947 if { (eval echo configure:6948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6948   rm -rf conftest*
6949   ac_cv_func_lstat64=yes
6950 else
6951   echo "configure: failed program was:" >&5
6952   cat conftest.$ac_ext >&5
6953 fi
6954 rm -f conftest*
6955   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6956   if test x$ac_cv_func_lstat64 = xyes ; then
6957     cat >> confdefs.h <<\EOF
6958 #define HAVE_LSTAT64 1
6959 EOF
6960
6961   fi
6962 fi
6963
6964 if test x$ac_cv_func_fstat64 = xno ; then
6965   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6966 echo "configure:6967: checking for fstat64 in <sys/stat.h>" >&5
6967   cat > conftest.$ac_ext <<EOF
6968 #line 6969 "configure"
6969 #include "confdefs.h"
6970
6971 #if defined(HAVE_UNISTD_H)
6972 #include <unistd.h>
6973 #endif
6974 #include <sys/stat.h>
6975
6976 int main() {
6977 struct stat64 st64; exit(fstat64(0,&st64));
6978 ; return 0; }
6979 EOF
6980 if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6981   rm -rf conftest*
6982   ac_cv_func_fstat64=yes
6983 else
6984   echo "configure: failed program was:" >&5
6985   cat conftest.$ac_ext >&5
6986 fi
6987 rm -f conftest*
6988   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6989   if test x$ac_cv_func_fstat64 = xyes ; then
6990     cat >> confdefs.h <<\EOF
6991 #define HAVE_FSTAT64 1
6992 EOF
6993
6994   fi
6995 fi
6996
6997 #####################################
6998 # we might need the resolv library on some systems
6999 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
7000 echo "configure:7001: checking for dn_expand in -lresolv" >&5
7001 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
7002 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7003   echo $ac_n "(cached) $ac_c" 1>&6
7004 else
7005   ac_save_LIBS="$LIBS"
7006 LIBS="-lresolv  $LIBS"
7007 cat > conftest.$ac_ext <<EOF
7008 #line 7009 "configure"
7009 #include "confdefs.h"
7010 /* Override any gcc2 internal prototype to avoid an error.  */
7011 /* We use char because int might match the return type of a gcc2
7012     builtin and then its argument prototype would still apply.  */
7013 char dn_expand();
7014
7015 int main() {
7016 dn_expand()
7017 ; return 0; }
7018 EOF
7019 if { (eval echo configure:7020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7020   rm -rf conftest*
7021   eval "ac_cv_lib_$ac_lib_var=yes"
7022 else
7023   echo "configure: failed program was:" >&5
7024   cat conftest.$ac_ext >&5
7025   rm -rf conftest*
7026   eval "ac_cv_lib_$ac_lib_var=no"
7027 fi
7028 rm -f conftest*
7029 LIBS="$ac_save_LIBS"
7030
7031 fi
7032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7033   echo "$ac_t""yes" 1>&6
7034     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7035     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7036   cat >> confdefs.h <<EOF
7037 #define $ac_tr_lib 1
7038 EOF
7039
7040   LIBS="-lresolv $LIBS"
7041
7042 else
7043   echo "$ac_t""no" 1>&6
7044 fi
7045
7046
7047 #
7048 # Check for the functions putprpwnam, set_auth_parameters,
7049 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7050 # Needed for OSF1 and HPUX.
7051 #
7052
7053 case "$LIBS" in
7054   *-lsecurity*) for ac_func in putprpwnam
7055 do
7056 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7057 echo "configure:7058: checking for $ac_func" >&5
7058 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7059   echo $ac_n "(cached) $ac_c" 1>&6
7060 else
7061   cat > conftest.$ac_ext <<EOF
7062 #line 7063 "configure"
7063 #include "confdefs.h"
7064 /* System header to define __stub macros and hopefully few prototypes,
7065     which can conflict with char $ac_func(); below.  */
7066 #include <assert.h>
7067 /* Override any gcc2 internal prototype to avoid an error.  */
7068 /* We use char because int might match the return type of a gcc2
7069     builtin and then its argument prototype would still apply.  */
7070 char $ac_func();
7071
7072 int main() {
7073
7074 /* The GNU C library defines this for functions which it implements
7075     to always fail with ENOSYS.  Some functions are actually named
7076     something starting with __ and the normal name is an alias.  */
7077 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7078 choke me
7079 #else
7080 $ac_func();
7081 #endif
7082
7083 ; return 0; }
7084 EOF
7085 if { (eval echo configure:7086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7086   rm -rf conftest*
7087   eval "ac_cv_func_$ac_func=yes"
7088 else
7089   echo "configure: failed program was:" >&5
7090   cat conftest.$ac_ext >&5
7091   rm -rf conftest*
7092   eval "ac_cv_func_$ac_func=no"
7093 fi
7094 rm -f conftest*
7095 fi
7096
7097 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7098   echo "$ac_t""yes" 1>&6
7099     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7100   cat >> confdefs.h <<EOF
7101 #define $ac_tr_func 1
7102 EOF
7103  
7104 else
7105   echo "$ac_t""no" 1>&6
7106 fi
7107 done
7108  ;;
7109   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7110 echo "configure:7111: checking for putprpwnam in -lsecurity" >&5
7111 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7112 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7113   echo $ac_n "(cached) $ac_c" 1>&6
7114 else
7115   ac_save_LIBS="$LIBS"
7116 LIBS="-lsecurity  $LIBS"
7117 cat > conftest.$ac_ext <<EOF
7118 #line 7119 "configure"
7119 #include "confdefs.h"
7120 /* Override any gcc2 internal prototype to avoid an error.  */
7121 /* We use char because int might match the return type of a gcc2
7122     builtin and then its argument prototype would still apply.  */
7123 char putprpwnam();
7124
7125 int main() {
7126 putprpwnam()
7127 ; return 0; }
7128 EOF
7129 if { (eval echo configure:7130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7130   rm -rf conftest*
7131   eval "ac_cv_lib_$ac_lib_var=yes"
7132 else
7133   echo "configure: failed program was:" >&5
7134   cat conftest.$ac_ext >&5
7135   rm -rf conftest*
7136   eval "ac_cv_lib_$ac_lib_var=no"
7137 fi
7138 rm -f conftest*
7139 LIBS="$ac_save_LIBS"
7140
7141 fi
7142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7143   echo "$ac_t""yes" 1>&6
7144     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7145     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7146   cat >> confdefs.h <<EOF
7147 #define $ac_tr_lib 1
7148 EOF
7149
7150   LIBS="-lsecurity $LIBS"
7151
7152 else
7153   echo "$ac_t""no" 1>&6
7154 fi
7155  
7156      for ac_func in putprpwnam
7157 do
7158 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7159 echo "configure:7160: checking for $ac_func" >&5
7160 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7161   echo $ac_n "(cached) $ac_c" 1>&6
7162 else
7163   cat > conftest.$ac_ext <<EOF
7164 #line 7165 "configure"
7165 #include "confdefs.h"
7166 /* System header to define __stub macros and hopefully few prototypes,
7167     which can conflict with char $ac_func(); below.  */
7168 #include <assert.h>
7169 /* Override any gcc2 internal prototype to avoid an error.  */
7170 /* We use char because int might match the return type of a gcc2
7171     builtin and then its argument prototype would still apply.  */
7172 char $ac_func();
7173
7174 int main() {
7175
7176 /* The GNU C library defines this for functions which it implements
7177     to always fail with ENOSYS.  Some functions are actually named
7178     something starting with __ and the normal name is an alias.  */
7179 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7180 choke me
7181 #else
7182 $ac_func();
7183 #endif
7184
7185 ; return 0; }
7186 EOF
7187 if { (eval echo configure:7188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7188   rm -rf conftest*
7189   eval "ac_cv_func_$ac_func=yes"
7190 else
7191   echo "configure: failed program was:" >&5
7192   cat conftest.$ac_ext >&5
7193   rm -rf conftest*
7194   eval "ac_cv_func_$ac_func=no"
7195 fi
7196 rm -f conftest*
7197 fi
7198
7199 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7200   echo "$ac_t""yes" 1>&6
7201     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7202   cat >> confdefs.h <<EOF
7203 #define $ac_tr_func 1
7204 EOF
7205  
7206 else
7207   echo "$ac_t""no" 1>&6
7208 fi
7209 done
7210
7211   ;;
7212   esac
7213
7214 case "$LIBS" in
7215   *-lsec*) for ac_func in putprpwnam
7216 do
7217 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7218 echo "configure:7219: checking for $ac_func" >&5
7219 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7220   echo $ac_n "(cached) $ac_c" 1>&6
7221 else
7222   cat > conftest.$ac_ext <<EOF
7223 #line 7224 "configure"
7224 #include "confdefs.h"
7225 /* System header to define __stub macros and hopefully few prototypes,
7226     which can conflict with char $ac_func(); below.  */
7227 #include <assert.h>
7228 /* Override any gcc2 internal prototype to avoid an error.  */
7229 /* We use char because int might match the return type of a gcc2
7230     builtin and then its argument prototype would still apply.  */
7231 char $ac_func();
7232
7233 int main() {
7234
7235 /* The GNU C library defines this for functions which it implements
7236     to always fail with ENOSYS.  Some functions are actually named
7237     something starting with __ and the normal name is an alias.  */
7238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7239 choke me
7240 #else
7241 $ac_func();
7242 #endif
7243
7244 ; return 0; }
7245 EOF
7246 if { (eval echo configure:7247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7247   rm -rf conftest*
7248   eval "ac_cv_func_$ac_func=yes"
7249 else
7250   echo "configure: failed program was:" >&5
7251   cat conftest.$ac_ext >&5
7252   rm -rf conftest*
7253   eval "ac_cv_func_$ac_func=no"
7254 fi
7255 rm -f conftest*
7256 fi
7257
7258 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7259   echo "$ac_t""yes" 1>&6
7260     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7261   cat >> confdefs.h <<EOF
7262 #define $ac_tr_func 1
7263 EOF
7264  
7265 else
7266   echo "$ac_t""no" 1>&6
7267 fi
7268 done
7269  ;;
7270   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7271 echo "configure:7272: checking for putprpwnam in -lsec" >&5
7272 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7273 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7274   echo $ac_n "(cached) $ac_c" 1>&6
7275 else
7276   ac_save_LIBS="$LIBS"
7277 LIBS="-lsec  $LIBS"
7278 cat > conftest.$ac_ext <<EOF
7279 #line 7280 "configure"
7280 #include "confdefs.h"
7281 /* Override any gcc2 internal prototype to avoid an error.  */
7282 /* We use char because int might match the return type of a gcc2
7283     builtin and then its argument prototype would still apply.  */
7284 char putprpwnam();
7285
7286 int main() {
7287 putprpwnam()
7288 ; return 0; }
7289 EOF
7290 if { (eval echo configure:7291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7291   rm -rf conftest*
7292   eval "ac_cv_lib_$ac_lib_var=yes"
7293 else
7294   echo "configure: failed program was:" >&5
7295   cat conftest.$ac_ext >&5
7296   rm -rf conftest*
7297   eval "ac_cv_lib_$ac_lib_var=no"
7298 fi
7299 rm -f conftest*
7300 LIBS="$ac_save_LIBS"
7301
7302 fi
7303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7304   echo "$ac_t""yes" 1>&6
7305     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7306     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7307   cat >> confdefs.h <<EOF
7308 #define $ac_tr_lib 1
7309 EOF
7310
7311   LIBS="-lsec $LIBS"
7312
7313 else
7314   echo "$ac_t""no" 1>&6
7315 fi
7316  
7317      for ac_func in putprpwnam
7318 do
7319 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7320 echo "configure:7321: checking for $ac_func" >&5
7321 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7322   echo $ac_n "(cached) $ac_c" 1>&6
7323 else
7324   cat > conftest.$ac_ext <<EOF
7325 #line 7326 "configure"
7326 #include "confdefs.h"
7327 /* System header to define __stub macros and hopefully few prototypes,
7328     which can conflict with char $ac_func(); below.  */
7329 #include <assert.h>
7330 /* Override any gcc2 internal prototype to avoid an error.  */
7331 /* We use char because int might match the return type of a gcc2
7332     builtin and then its argument prototype would still apply.  */
7333 char $ac_func();
7334
7335 int main() {
7336
7337 /* The GNU C library defines this for functions which it implements
7338     to always fail with ENOSYS.  Some functions are actually named
7339     something starting with __ and the normal name is an alias.  */
7340 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7341 choke me
7342 #else
7343 $ac_func();
7344 #endif
7345
7346 ; return 0; }
7347 EOF
7348 if { (eval echo configure:7349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7349   rm -rf conftest*
7350   eval "ac_cv_func_$ac_func=yes"
7351 else
7352   echo "configure: failed program was:" >&5
7353   cat conftest.$ac_ext >&5
7354   rm -rf conftest*
7355   eval "ac_cv_func_$ac_func=no"
7356 fi
7357 rm -f conftest*
7358 fi
7359
7360 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7361   echo "$ac_t""yes" 1>&6
7362     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7363   cat >> confdefs.h <<EOF
7364 #define $ac_tr_func 1
7365 EOF
7366  
7367 else
7368   echo "$ac_t""no" 1>&6
7369 fi
7370 done
7371
7372   ;;
7373   esac
7374
7375
7376 case "$LIBS" in
7377   *-lsecurity*) for ac_func in set_auth_parameters
7378 do
7379 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7380 echo "configure:7381: checking for $ac_func" >&5
7381 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7382   echo $ac_n "(cached) $ac_c" 1>&6
7383 else
7384   cat > conftest.$ac_ext <<EOF
7385 #line 7386 "configure"
7386 #include "confdefs.h"
7387 /* System header to define __stub macros and hopefully few prototypes,
7388     which can conflict with char $ac_func(); below.  */
7389 #include <assert.h>
7390 /* Override any gcc2 internal prototype to avoid an error.  */
7391 /* We use char because int might match the return type of a gcc2
7392     builtin and then its argument prototype would still apply.  */
7393 char $ac_func();
7394
7395 int main() {
7396
7397 /* The GNU C library defines this for functions which it implements
7398     to always fail with ENOSYS.  Some functions are actually named
7399     something starting with __ and the normal name is an alias.  */
7400 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7401 choke me
7402 #else
7403 $ac_func();
7404 #endif
7405
7406 ; return 0; }
7407 EOF
7408 if { (eval echo configure:7409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7409   rm -rf conftest*
7410   eval "ac_cv_func_$ac_func=yes"
7411 else
7412   echo "configure: failed program was:" >&5
7413   cat conftest.$ac_ext >&5
7414   rm -rf conftest*
7415   eval "ac_cv_func_$ac_func=no"
7416 fi
7417 rm -f conftest*
7418 fi
7419
7420 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7421   echo "$ac_t""yes" 1>&6
7422     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7423   cat >> confdefs.h <<EOF
7424 #define $ac_tr_func 1
7425 EOF
7426  
7427 else
7428   echo "$ac_t""no" 1>&6
7429 fi
7430 done
7431  ;;
7432   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7433 echo "configure:7434: checking for set_auth_parameters in -lsecurity" >&5
7434 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7435 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7436   echo $ac_n "(cached) $ac_c" 1>&6
7437 else
7438   ac_save_LIBS="$LIBS"
7439 LIBS="-lsecurity  $LIBS"
7440 cat > conftest.$ac_ext <<EOF
7441 #line 7442 "configure"
7442 #include "confdefs.h"
7443 /* Override any gcc2 internal prototype to avoid an error.  */
7444 /* We use char because int might match the return type of a gcc2
7445     builtin and then its argument prototype would still apply.  */
7446 char set_auth_parameters();
7447
7448 int main() {
7449 set_auth_parameters()
7450 ; return 0; }
7451 EOF
7452 if { (eval echo configure:7453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7453   rm -rf conftest*
7454   eval "ac_cv_lib_$ac_lib_var=yes"
7455 else
7456   echo "configure: failed program was:" >&5
7457   cat conftest.$ac_ext >&5
7458   rm -rf conftest*
7459   eval "ac_cv_lib_$ac_lib_var=no"
7460 fi
7461 rm -f conftest*
7462 LIBS="$ac_save_LIBS"
7463
7464 fi
7465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7466   echo "$ac_t""yes" 1>&6
7467     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7468     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7469   cat >> confdefs.h <<EOF
7470 #define $ac_tr_lib 1
7471 EOF
7472
7473   LIBS="-lsecurity $LIBS"
7474
7475 else
7476   echo "$ac_t""no" 1>&6
7477 fi
7478  
7479      for ac_func in set_auth_parameters
7480 do
7481 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7482 echo "configure:7483: checking for $ac_func" >&5
7483 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7484   echo $ac_n "(cached) $ac_c" 1>&6
7485 else
7486   cat > conftest.$ac_ext <<EOF
7487 #line 7488 "configure"
7488 #include "confdefs.h"
7489 /* System header to define __stub macros and hopefully few prototypes,
7490     which can conflict with char $ac_func(); below.  */
7491 #include <assert.h>
7492 /* Override any gcc2 internal prototype to avoid an error.  */
7493 /* We use char because int might match the return type of a gcc2
7494     builtin and then its argument prototype would still apply.  */
7495 char $ac_func();
7496
7497 int main() {
7498
7499 /* The GNU C library defines this for functions which it implements
7500     to always fail with ENOSYS.  Some functions are actually named
7501     something starting with __ and the normal name is an alias.  */
7502 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7503 choke me
7504 #else
7505 $ac_func();
7506 #endif
7507
7508 ; return 0; }
7509 EOF
7510 if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7511   rm -rf conftest*
7512   eval "ac_cv_func_$ac_func=yes"
7513 else
7514   echo "configure: failed program was:" >&5
7515   cat conftest.$ac_ext >&5
7516   rm -rf conftest*
7517   eval "ac_cv_func_$ac_func=no"
7518 fi
7519 rm -f conftest*
7520 fi
7521
7522 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7523   echo "$ac_t""yes" 1>&6
7524     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7525   cat >> confdefs.h <<EOF
7526 #define $ac_tr_func 1
7527 EOF
7528  
7529 else
7530   echo "$ac_t""no" 1>&6
7531 fi
7532 done
7533
7534   ;;
7535   esac
7536
7537 case "$LIBS" in
7538   *-lsec*) for ac_func in set_auth_parameters
7539 do
7540 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7541 echo "configure:7542: checking for $ac_func" >&5
7542 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7543   echo $ac_n "(cached) $ac_c" 1>&6
7544 else
7545   cat > conftest.$ac_ext <<EOF
7546 #line 7547 "configure"
7547 #include "confdefs.h"
7548 /* System header to define __stub macros and hopefully few prototypes,
7549     which can conflict with char $ac_func(); below.  */
7550 #include <assert.h>
7551 /* Override any gcc2 internal prototype to avoid an error.  */
7552 /* We use char because int might match the return type of a gcc2
7553     builtin and then its argument prototype would still apply.  */
7554 char $ac_func();
7555
7556 int main() {
7557
7558 /* The GNU C library defines this for functions which it implements
7559     to always fail with ENOSYS.  Some functions are actually named
7560     something starting with __ and the normal name is an alias.  */
7561 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7562 choke me
7563 #else
7564 $ac_func();
7565 #endif
7566
7567 ; return 0; }
7568 EOF
7569 if { (eval echo configure:7570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7570   rm -rf conftest*
7571   eval "ac_cv_func_$ac_func=yes"
7572 else
7573   echo "configure: failed program was:" >&5
7574   cat conftest.$ac_ext >&5
7575   rm -rf conftest*
7576   eval "ac_cv_func_$ac_func=no"
7577 fi
7578 rm -f conftest*
7579 fi
7580
7581 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7582   echo "$ac_t""yes" 1>&6
7583     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7584   cat >> confdefs.h <<EOF
7585 #define $ac_tr_func 1
7586 EOF
7587  
7588 else
7589   echo "$ac_t""no" 1>&6
7590 fi
7591 done
7592  ;;
7593   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7594 echo "configure:7595: checking for set_auth_parameters in -lsec" >&5
7595 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7596 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7597   echo $ac_n "(cached) $ac_c" 1>&6
7598 else
7599   ac_save_LIBS="$LIBS"
7600 LIBS="-lsec  $LIBS"
7601 cat > conftest.$ac_ext <<EOF
7602 #line 7603 "configure"
7603 #include "confdefs.h"
7604 /* Override any gcc2 internal prototype to avoid an error.  */
7605 /* We use char because int might match the return type of a gcc2
7606     builtin and then its argument prototype would still apply.  */
7607 char set_auth_parameters();
7608
7609 int main() {
7610 set_auth_parameters()
7611 ; return 0; }
7612 EOF
7613 if { (eval echo configure:7614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7614   rm -rf conftest*
7615   eval "ac_cv_lib_$ac_lib_var=yes"
7616 else
7617   echo "configure: failed program was:" >&5
7618   cat conftest.$ac_ext >&5
7619   rm -rf conftest*
7620   eval "ac_cv_lib_$ac_lib_var=no"
7621 fi
7622 rm -f conftest*
7623 LIBS="$ac_save_LIBS"
7624
7625 fi
7626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7627   echo "$ac_t""yes" 1>&6
7628     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7629     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7630   cat >> confdefs.h <<EOF
7631 #define $ac_tr_lib 1
7632 EOF
7633
7634   LIBS="-lsec $LIBS"
7635
7636 else
7637   echo "$ac_t""no" 1>&6
7638 fi
7639  
7640      for ac_func in set_auth_parameters
7641 do
7642 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7643 echo "configure:7644: checking for $ac_func" >&5
7644 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7645   echo $ac_n "(cached) $ac_c" 1>&6
7646 else
7647   cat > conftest.$ac_ext <<EOF
7648 #line 7649 "configure"
7649 #include "confdefs.h"
7650 /* System header to define __stub macros and hopefully few prototypes,
7651     which can conflict with char $ac_func(); below.  */
7652 #include <assert.h>
7653 /* Override any gcc2 internal prototype to avoid an error.  */
7654 /* We use char because int might match the return type of a gcc2
7655     builtin and then its argument prototype would still apply.  */
7656 char $ac_func();
7657
7658 int main() {
7659
7660 /* The GNU C library defines this for functions which it implements
7661     to always fail with ENOSYS.  Some functions are actually named
7662     something starting with __ and the normal name is an alias.  */
7663 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7664 choke me
7665 #else
7666 $ac_func();
7667 #endif
7668
7669 ; return 0; }
7670 EOF
7671 if { (eval echo configure:7672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7672   rm -rf conftest*
7673   eval "ac_cv_func_$ac_func=yes"
7674 else
7675   echo "configure: failed program was:" >&5
7676   cat conftest.$ac_ext >&5
7677   rm -rf conftest*
7678   eval "ac_cv_func_$ac_func=no"
7679 fi
7680 rm -f conftest*
7681 fi
7682
7683 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7684   echo "$ac_t""yes" 1>&6
7685     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7686   cat >> confdefs.h <<EOF
7687 #define $ac_tr_func 1
7688 EOF
7689  
7690 else
7691   echo "$ac_t""no" 1>&6
7692 fi
7693 done
7694
7695   ;;
7696   esac
7697
7698
7699 # UnixWare 7.x has its getspnam in -lgen
7700 case "$LIBS" in
7701   *-lgen*) for ac_func in getspnam
7702 do
7703 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7704 echo "configure:7705: checking for $ac_func" >&5
7705 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7706   echo $ac_n "(cached) $ac_c" 1>&6
7707 else
7708   cat > conftest.$ac_ext <<EOF
7709 #line 7710 "configure"
7710 #include "confdefs.h"
7711 /* System header to define __stub macros and hopefully few prototypes,
7712     which can conflict with char $ac_func(); below.  */
7713 #include <assert.h>
7714 /* Override any gcc2 internal prototype to avoid an error.  */
7715 /* We use char because int might match the return type of a gcc2
7716     builtin and then its argument prototype would still apply.  */
7717 char $ac_func();
7718
7719 int main() {
7720
7721 /* The GNU C library defines this for functions which it implements
7722     to always fail with ENOSYS.  Some functions are actually named
7723     something starting with __ and the normal name is an alias.  */
7724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7725 choke me
7726 #else
7727 $ac_func();
7728 #endif
7729
7730 ; return 0; }
7731 EOF
7732 if { (eval echo configure:7733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7733   rm -rf conftest*
7734   eval "ac_cv_func_$ac_func=yes"
7735 else
7736   echo "configure: failed program was:" >&5
7737   cat conftest.$ac_ext >&5
7738   rm -rf conftest*
7739   eval "ac_cv_func_$ac_func=no"
7740 fi
7741 rm -f conftest*
7742 fi
7743
7744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7745   echo "$ac_t""yes" 1>&6
7746     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7747   cat >> confdefs.h <<EOF
7748 #define $ac_tr_func 1
7749 EOF
7750  
7751 else
7752   echo "$ac_t""no" 1>&6
7753 fi
7754 done
7755  ;;
7756   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7757 echo "configure:7758: checking for getspnam in -lgen" >&5
7758 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7759 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7760   echo $ac_n "(cached) $ac_c" 1>&6
7761 else
7762   ac_save_LIBS="$LIBS"
7763 LIBS="-lgen  $LIBS"
7764 cat > conftest.$ac_ext <<EOF
7765 #line 7766 "configure"
7766 #include "confdefs.h"
7767 /* Override any gcc2 internal prototype to avoid an error.  */
7768 /* We use char because int might match the return type of a gcc2
7769     builtin and then its argument prototype would still apply.  */
7770 char getspnam();
7771
7772 int main() {
7773 getspnam()
7774 ; return 0; }
7775 EOF
7776 if { (eval echo configure:7777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7777   rm -rf conftest*
7778   eval "ac_cv_lib_$ac_lib_var=yes"
7779 else
7780   echo "configure: failed program was:" >&5
7781   cat conftest.$ac_ext >&5
7782   rm -rf conftest*
7783   eval "ac_cv_lib_$ac_lib_var=no"
7784 fi
7785 rm -f conftest*
7786 LIBS="$ac_save_LIBS"
7787
7788 fi
7789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7790   echo "$ac_t""yes" 1>&6
7791     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7792     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7793   cat >> confdefs.h <<EOF
7794 #define $ac_tr_lib 1
7795 EOF
7796
7797   LIBS="-lgen $LIBS"
7798
7799 else
7800   echo "$ac_t""no" 1>&6
7801 fi
7802  
7803      for ac_func in getspnam
7804 do
7805 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7806 echo "configure:7807: checking for $ac_func" >&5
7807 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7808   echo $ac_n "(cached) $ac_c" 1>&6
7809 else
7810   cat > conftest.$ac_ext <<EOF
7811 #line 7812 "configure"
7812 #include "confdefs.h"
7813 /* System header to define __stub macros and hopefully few prototypes,
7814     which can conflict with char $ac_func(); below.  */
7815 #include <assert.h>
7816 /* Override any gcc2 internal prototype to avoid an error.  */
7817 /* We use char because int might match the return type of a gcc2
7818     builtin and then its argument prototype would still apply.  */
7819 char $ac_func();
7820
7821 int main() {
7822
7823 /* The GNU C library defines this for functions which it implements
7824     to always fail with ENOSYS.  Some functions are actually named
7825     something starting with __ and the normal name is an alias.  */
7826 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7827 choke me
7828 #else
7829 $ac_func();
7830 #endif
7831
7832 ; return 0; }
7833 EOF
7834 if { (eval echo configure:7835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7835   rm -rf conftest*
7836   eval "ac_cv_func_$ac_func=yes"
7837 else
7838   echo "configure: failed program was:" >&5
7839   cat conftest.$ac_ext >&5
7840   rm -rf conftest*
7841   eval "ac_cv_func_$ac_func=no"
7842 fi
7843 rm -f conftest*
7844 fi
7845
7846 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7847   echo "$ac_t""yes" 1>&6
7848     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7849   cat >> confdefs.h <<EOF
7850 #define $ac_tr_func 1
7851 EOF
7852  
7853 else
7854   echo "$ac_t""no" 1>&6
7855 fi
7856 done
7857
7858   ;;
7859   esac
7860
7861
7862 case "$LIBS" in
7863   *-lsecurity*) for ac_func in getspnam
7864 do
7865 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7866 echo "configure:7867: checking for $ac_func" >&5
7867 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7868   echo $ac_n "(cached) $ac_c" 1>&6
7869 else
7870   cat > conftest.$ac_ext <<EOF
7871 #line 7872 "configure"
7872 #include "confdefs.h"
7873 /* System header to define __stub macros and hopefully few prototypes,
7874     which can conflict with char $ac_func(); below.  */
7875 #include <assert.h>
7876 /* Override any gcc2 internal prototype to avoid an error.  */
7877 /* We use char because int might match the return type of a gcc2
7878     builtin and then its argument prototype would still apply.  */
7879 char $ac_func();
7880
7881 int main() {
7882
7883 /* The GNU C library defines this for functions which it implements
7884     to always fail with ENOSYS.  Some functions are actually named
7885     something starting with __ and the normal name is an alias.  */
7886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7887 choke me
7888 #else
7889 $ac_func();
7890 #endif
7891
7892 ; return 0; }
7893 EOF
7894 if { (eval echo configure:7895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7895   rm -rf conftest*
7896   eval "ac_cv_func_$ac_func=yes"
7897 else
7898   echo "configure: failed program was:" >&5
7899   cat conftest.$ac_ext >&5
7900   rm -rf conftest*
7901   eval "ac_cv_func_$ac_func=no"
7902 fi
7903 rm -f conftest*
7904 fi
7905
7906 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7907   echo "$ac_t""yes" 1>&6
7908     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7909   cat >> confdefs.h <<EOF
7910 #define $ac_tr_func 1
7911 EOF
7912  
7913 else
7914   echo "$ac_t""no" 1>&6
7915 fi
7916 done
7917  ;;
7918   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7919 echo "configure:7920: checking for getspnam in -lsecurity" >&5
7920 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7921 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7922   echo $ac_n "(cached) $ac_c" 1>&6
7923 else
7924   ac_save_LIBS="$LIBS"
7925 LIBS="-lsecurity  $LIBS"
7926 cat > conftest.$ac_ext <<EOF
7927 #line 7928 "configure"
7928 #include "confdefs.h"
7929 /* Override any gcc2 internal prototype to avoid an error.  */
7930 /* We use char because int might match the return type of a gcc2
7931     builtin and then its argument prototype would still apply.  */
7932 char getspnam();
7933
7934 int main() {
7935 getspnam()
7936 ; return 0; }
7937 EOF
7938 if { (eval echo configure:7939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7939   rm -rf conftest*
7940   eval "ac_cv_lib_$ac_lib_var=yes"
7941 else
7942   echo "configure: failed program was:" >&5
7943   cat conftest.$ac_ext >&5
7944   rm -rf conftest*
7945   eval "ac_cv_lib_$ac_lib_var=no"
7946 fi
7947 rm -f conftest*
7948 LIBS="$ac_save_LIBS"
7949
7950 fi
7951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7952   echo "$ac_t""yes" 1>&6
7953     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7954     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7955   cat >> confdefs.h <<EOF
7956 #define $ac_tr_lib 1
7957 EOF
7958
7959   LIBS="-lsecurity $LIBS"
7960
7961 else
7962   echo "$ac_t""no" 1>&6
7963 fi
7964  
7965      for ac_func in getspnam
7966 do
7967 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7968 echo "configure:7969: checking for $ac_func" >&5
7969 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7970   echo $ac_n "(cached) $ac_c" 1>&6
7971 else
7972   cat > conftest.$ac_ext <<EOF
7973 #line 7974 "configure"
7974 #include "confdefs.h"
7975 /* System header to define __stub macros and hopefully few prototypes,
7976     which can conflict with char $ac_func(); below.  */
7977 #include <assert.h>
7978 /* Override any gcc2 internal prototype to avoid an error.  */
7979 /* We use char because int might match the return type of a gcc2
7980     builtin and then its argument prototype would still apply.  */
7981 char $ac_func();
7982
7983 int main() {
7984
7985 /* The GNU C library defines this for functions which it implements
7986     to always fail with ENOSYS.  Some functions are actually named
7987     something starting with __ and the normal name is an alias.  */
7988 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7989 choke me
7990 #else
7991 $ac_func();
7992 #endif
7993
7994 ; return 0; }
7995 EOF
7996 if { (eval echo configure:7997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7997   rm -rf conftest*
7998   eval "ac_cv_func_$ac_func=yes"
7999 else
8000   echo "configure: failed program was:" >&5
8001   cat conftest.$ac_ext >&5
8002   rm -rf conftest*
8003   eval "ac_cv_func_$ac_func=no"
8004 fi
8005 rm -f conftest*
8006 fi
8007
8008 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8009   echo "$ac_t""yes" 1>&6
8010     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8011   cat >> confdefs.h <<EOF
8012 #define $ac_tr_func 1
8013 EOF
8014  
8015 else
8016   echo "$ac_t""no" 1>&6
8017 fi
8018 done
8019
8020   ;;
8021   esac
8022
8023 case "$LIBS" in
8024   *-lsec*) for ac_func in getspnam
8025 do
8026 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8027 echo "configure:8028: checking for $ac_func" >&5
8028 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8029   echo $ac_n "(cached) $ac_c" 1>&6
8030 else
8031   cat > conftest.$ac_ext <<EOF
8032 #line 8033 "configure"
8033 #include "confdefs.h"
8034 /* System header to define __stub macros and hopefully few prototypes,
8035     which can conflict with char $ac_func(); below.  */
8036 #include <assert.h>
8037 /* Override any gcc2 internal prototype to avoid an error.  */
8038 /* We use char because int might match the return type of a gcc2
8039     builtin and then its argument prototype would still apply.  */
8040 char $ac_func();
8041
8042 int main() {
8043
8044 /* The GNU C library defines this for functions which it implements
8045     to always fail with ENOSYS.  Some functions are actually named
8046     something starting with __ and the normal name is an alias.  */
8047 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8048 choke me
8049 #else
8050 $ac_func();
8051 #endif
8052
8053 ; return 0; }
8054 EOF
8055 if { (eval echo configure:8056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8056   rm -rf conftest*
8057   eval "ac_cv_func_$ac_func=yes"
8058 else
8059   echo "configure: failed program was:" >&5
8060   cat conftest.$ac_ext >&5
8061   rm -rf conftest*
8062   eval "ac_cv_func_$ac_func=no"
8063 fi
8064 rm -f conftest*
8065 fi
8066
8067 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8068   echo "$ac_t""yes" 1>&6
8069     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8070   cat >> confdefs.h <<EOF
8071 #define $ac_tr_func 1
8072 EOF
8073  
8074 else
8075   echo "$ac_t""no" 1>&6
8076 fi
8077 done
8078  ;;
8079   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8080 echo "configure:8081: checking for getspnam in -lsec" >&5
8081 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8082 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8083   echo $ac_n "(cached) $ac_c" 1>&6
8084 else
8085   ac_save_LIBS="$LIBS"
8086 LIBS="-lsec  $LIBS"
8087 cat > conftest.$ac_ext <<EOF
8088 #line 8089 "configure"
8089 #include "confdefs.h"
8090 /* Override any gcc2 internal prototype to avoid an error.  */
8091 /* We use char because int might match the return type of a gcc2
8092     builtin and then its argument prototype would still apply.  */
8093 char getspnam();
8094
8095 int main() {
8096 getspnam()
8097 ; return 0; }
8098 EOF
8099 if { (eval echo configure:8100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8100   rm -rf conftest*
8101   eval "ac_cv_lib_$ac_lib_var=yes"
8102 else
8103   echo "configure: failed program was:" >&5
8104   cat conftest.$ac_ext >&5
8105   rm -rf conftest*
8106   eval "ac_cv_lib_$ac_lib_var=no"
8107 fi
8108 rm -f conftest*
8109 LIBS="$ac_save_LIBS"
8110
8111 fi
8112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8113   echo "$ac_t""yes" 1>&6
8114     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8115     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8116   cat >> confdefs.h <<EOF
8117 #define $ac_tr_lib 1
8118 EOF
8119
8120   LIBS="-lsec $LIBS"
8121
8122 else
8123   echo "$ac_t""no" 1>&6
8124 fi
8125  
8126      for ac_func in getspnam
8127 do
8128 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8129 echo "configure:8130: checking for $ac_func" >&5
8130 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8131   echo $ac_n "(cached) $ac_c" 1>&6
8132 else
8133   cat > conftest.$ac_ext <<EOF
8134 #line 8135 "configure"
8135 #include "confdefs.h"
8136 /* System header to define __stub macros and hopefully few prototypes,
8137     which can conflict with char $ac_func(); below.  */
8138 #include <assert.h>
8139 /* Override any gcc2 internal prototype to avoid an error.  */
8140 /* We use char because int might match the return type of a gcc2
8141     builtin and then its argument prototype would still apply.  */
8142 char $ac_func();
8143
8144 int main() {
8145
8146 /* The GNU C library defines this for functions which it implements
8147     to always fail with ENOSYS.  Some functions are actually named
8148     something starting with __ and the normal name is an alias.  */
8149 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8150 choke me
8151 #else
8152 $ac_func();
8153 #endif
8154
8155 ; return 0; }
8156 EOF
8157 if { (eval echo configure:8158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8158   rm -rf conftest*
8159   eval "ac_cv_func_$ac_func=yes"
8160 else
8161   echo "configure: failed program was:" >&5
8162   cat conftest.$ac_ext >&5
8163   rm -rf conftest*
8164   eval "ac_cv_func_$ac_func=no"
8165 fi
8166 rm -f conftest*
8167 fi
8168
8169 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8170   echo "$ac_t""yes" 1>&6
8171     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8172   cat >> confdefs.h <<EOF
8173 #define $ac_tr_func 1
8174 EOF
8175  
8176 else
8177   echo "$ac_t""no" 1>&6
8178 fi
8179 done
8180
8181   ;;
8182   esac
8183
8184
8185 case "$LIBS" in
8186   *-lsecurity*) for ac_func in bigcrypt
8187 do
8188 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8189 echo "configure:8190: checking for $ac_func" >&5
8190 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8191   echo $ac_n "(cached) $ac_c" 1>&6
8192 else
8193   cat > conftest.$ac_ext <<EOF
8194 #line 8195 "configure"
8195 #include "confdefs.h"
8196 /* System header to define __stub macros and hopefully few prototypes,
8197     which can conflict with char $ac_func(); below.  */
8198 #include <assert.h>
8199 /* Override any gcc2 internal prototype to avoid an error.  */
8200 /* We use char because int might match the return type of a gcc2
8201     builtin and then its argument prototype would still apply.  */
8202 char $ac_func();
8203
8204 int main() {
8205
8206 /* The GNU C library defines this for functions which it implements
8207     to always fail with ENOSYS.  Some functions are actually named
8208     something starting with __ and the normal name is an alias.  */
8209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8210 choke me
8211 #else
8212 $ac_func();
8213 #endif
8214
8215 ; return 0; }
8216 EOF
8217 if { (eval echo configure:8218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8218   rm -rf conftest*
8219   eval "ac_cv_func_$ac_func=yes"
8220 else
8221   echo "configure: failed program was:" >&5
8222   cat conftest.$ac_ext >&5
8223   rm -rf conftest*
8224   eval "ac_cv_func_$ac_func=no"
8225 fi
8226 rm -f conftest*
8227 fi
8228
8229 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8230   echo "$ac_t""yes" 1>&6
8231     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8232   cat >> confdefs.h <<EOF
8233 #define $ac_tr_func 1
8234 EOF
8235  
8236 else
8237   echo "$ac_t""no" 1>&6
8238 fi
8239 done
8240  ;;
8241   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8242 echo "configure:8243: checking for bigcrypt in -lsecurity" >&5
8243 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8244 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8245   echo $ac_n "(cached) $ac_c" 1>&6
8246 else
8247   ac_save_LIBS="$LIBS"
8248 LIBS="-lsecurity  $LIBS"
8249 cat > conftest.$ac_ext <<EOF
8250 #line 8251 "configure"
8251 #include "confdefs.h"
8252 /* Override any gcc2 internal prototype to avoid an error.  */
8253 /* We use char because int might match the return type of a gcc2
8254     builtin and then its argument prototype would still apply.  */
8255 char bigcrypt();
8256
8257 int main() {
8258 bigcrypt()
8259 ; return 0; }
8260 EOF
8261 if { (eval echo configure:8262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8262   rm -rf conftest*
8263   eval "ac_cv_lib_$ac_lib_var=yes"
8264 else
8265   echo "configure: failed program was:" >&5
8266   cat conftest.$ac_ext >&5
8267   rm -rf conftest*
8268   eval "ac_cv_lib_$ac_lib_var=no"
8269 fi
8270 rm -f conftest*
8271 LIBS="$ac_save_LIBS"
8272
8273 fi
8274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8275   echo "$ac_t""yes" 1>&6
8276     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8277     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8278   cat >> confdefs.h <<EOF
8279 #define $ac_tr_lib 1
8280 EOF
8281
8282   LIBS="-lsecurity $LIBS"
8283
8284 else
8285   echo "$ac_t""no" 1>&6
8286 fi
8287  
8288      for ac_func in bigcrypt
8289 do
8290 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8291 echo "configure:8292: checking for $ac_func" >&5
8292 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8293   echo $ac_n "(cached) $ac_c" 1>&6
8294 else
8295   cat > conftest.$ac_ext <<EOF
8296 #line 8297 "configure"
8297 #include "confdefs.h"
8298 /* System header to define __stub macros and hopefully few prototypes,
8299     which can conflict with char $ac_func(); below.  */
8300 #include <assert.h>
8301 /* Override any gcc2 internal prototype to avoid an error.  */
8302 /* We use char because int might match the return type of a gcc2
8303     builtin and then its argument prototype would still apply.  */
8304 char $ac_func();
8305
8306 int main() {
8307
8308 /* The GNU C library defines this for functions which it implements
8309     to always fail with ENOSYS.  Some functions are actually named
8310     something starting with __ and the normal name is an alias.  */
8311 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8312 choke me
8313 #else
8314 $ac_func();
8315 #endif
8316
8317 ; return 0; }
8318 EOF
8319 if { (eval echo configure:8320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8320   rm -rf conftest*
8321   eval "ac_cv_func_$ac_func=yes"
8322 else
8323   echo "configure: failed program was:" >&5
8324   cat conftest.$ac_ext >&5
8325   rm -rf conftest*
8326   eval "ac_cv_func_$ac_func=no"
8327 fi
8328 rm -f conftest*
8329 fi
8330
8331 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8332   echo "$ac_t""yes" 1>&6
8333     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8334   cat >> confdefs.h <<EOF
8335 #define $ac_tr_func 1
8336 EOF
8337  
8338 else
8339   echo "$ac_t""no" 1>&6
8340 fi
8341 done
8342
8343   ;;
8344   esac
8345
8346 case "$LIBS" in
8347   *-lsec*) for ac_func in bigcrypt
8348 do
8349 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8350 echo "configure:8351: checking for $ac_func" >&5
8351 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8352   echo $ac_n "(cached) $ac_c" 1>&6
8353 else
8354   cat > conftest.$ac_ext <<EOF
8355 #line 8356 "configure"
8356 #include "confdefs.h"
8357 /* System header to define __stub macros and hopefully few prototypes,
8358     which can conflict with char $ac_func(); below.  */
8359 #include <assert.h>
8360 /* Override any gcc2 internal prototype to avoid an error.  */
8361 /* We use char because int might match the return type of a gcc2
8362     builtin and then its argument prototype would still apply.  */
8363 char $ac_func();
8364
8365 int main() {
8366
8367 /* The GNU C library defines this for functions which it implements
8368     to always fail with ENOSYS.  Some functions are actually named
8369     something starting with __ and the normal name is an alias.  */
8370 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8371 choke me
8372 #else
8373 $ac_func();
8374 #endif
8375
8376 ; return 0; }
8377 EOF
8378 if { (eval echo configure:8379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8379   rm -rf conftest*
8380   eval "ac_cv_func_$ac_func=yes"
8381 else
8382   echo "configure: failed program was:" >&5
8383   cat conftest.$ac_ext >&5
8384   rm -rf conftest*
8385   eval "ac_cv_func_$ac_func=no"
8386 fi
8387 rm -f conftest*
8388 fi
8389
8390 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8391   echo "$ac_t""yes" 1>&6
8392     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8393   cat >> confdefs.h <<EOF
8394 #define $ac_tr_func 1
8395 EOF
8396  
8397 else
8398   echo "$ac_t""no" 1>&6
8399 fi
8400 done
8401  ;;
8402   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8403 echo "configure:8404: checking for bigcrypt in -lsec" >&5
8404 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8405 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8406   echo $ac_n "(cached) $ac_c" 1>&6
8407 else
8408   ac_save_LIBS="$LIBS"
8409 LIBS="-lsec  $LIBS"
8410 cat > conftest.$ac_ext <<EOF
8411 #line 8412 "configure"
8412 #include "confdefs.h"
8413 /* Override any gcc2 internal prototype to avoid an error.  */
8414 /* We use char because int might match the return type of a gcc2
8415     builtin and then its argument prototype would still apply.  */
8416 char bigcrypt();
8417
8418 int main() {
8419 bigcrypt()
8420 ; return 0; }
8421 EOF
8422 if { (eval echo configure:8423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8423   rm -rf conftest*
8424   eval "ac_cv_lib_$ac_lib_var=yes"
8425 else
8426   echo "configure: failed program was:" >&5
8427   cat conftest.$ac_ext >&5
8428   rm -rf conftest*
8429   eval "ac_cv_lib_$ac_lib_var=no"
8430 fi
8431 rm -f conftest*
8432 LIBS="$ac_save_LIBS"
8433
8434 fi
8435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8436   echo "$ac_t""yes" 1>&6
8437     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8438     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8439   cat >> confdefs.h <<EOF
8440 #define $ac_tr_lib 1
8441 EOF
8442
8443   LIBS="-lsec $LIBS"
8444
8445 else
8446   echo "$ac_t""no" 1>&6
8447 fi
8448  
8449      for ac_func in bigcrypt
8450 do
8451 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8452 echo "configure:8453: checking for $ac_func" >&5
8453 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8454   echo $ac_n "(cached) $ac_c" 1>&6
8455 else
8456   cat > conftest.$ac_ext <<EOF
8457 #line 8458 "configure"
8458 #include "confdefs.h"
8459 /* System header to define __stub macros and hopefully few prototypes,
8460     which can conflict with char $ac_func(); below.  */
8461 #include <assert.h>
8462 /* Override any gcc2 internal prototype to avoid an error.  */
8463 /* We use char because int might match the return type of a gcc2
8464     builtin and then its argument prototype would still apply.  */
8465 char $ac_func();
8466
8467 int main() {
8468
8469 /* The GNU C library defines this for functions which it implements
8470     to always fail with ENOSYS.  Some functions are actually named
8471     something starting with __ and the normal name is an alias.  */
8472 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8473 choke me
8474 #else
8475 $ac_func();
8476 #endif
8477
8478 ; return 0; }
8479 EOF
8480 if { (eval echo configure:8481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8481   rm -rf conftest*
8482   eval "ac_cv_func_$ac_func=yes"
8483 else
8484   echo "configure: failed program was:" >&5
8485   cat conftest.$ac_ext >&5
8486   rm -rf conftest*
8487   eval "ac_cv_func_$ac_func=no"
8488 fi
8489 rm -f conftest*
8490 fi
8491
8492 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8493   echo "$ac_t""yes" 1>&6
8494     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8495   cat >> confdefs.h <<EOF
8496 #define $ac_tr_func 1
8497 EOF
8498  
8499 else
8500   echo "$ac_t""no" 1>&6
8501 fi
8502 done
8503
8504   ;;
8505   esac
8506
8507
8508 case "$LIBS" in
8509   *-lsecurity*) for ac_func in getprpwnam
8510 do
8511 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8512 echo "configure:8513: checking for $ac_func" >&5
8513 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8514   echo $ac_n "(cached) $ac_c" 1>&6
8515 else
8516   cat > conftest.$ac_ext <<EOF
8517 #line 8518 "configure"
8518 #include "confdefs.h"
8519 /* System header to define __stub macros and hopefully few prototypes,
8520     which can conflict with char $ac_func(); below.  */
8521 #include <assert.h>
8522 /* Override any gcc2 internal prototype to avoid an error.  */
8523 /* We use char because int might match the return type of a gcc2
8524     builtin and then its argument prototype would still apply.  */
8525 char $ac_func();
8526
8527 int main() {
8528
8529 /* The GNU C library defines this for functions which it implements
8530     to always fail with ENOSYS.  Some functions are actually named
8531     something starting with __ and the normal name is an alias.  */
8532 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8533 choke me
8534 #else
8535 $ac_func();
8536 #endif
8537
8538 ; return 0; }
8539 EOF
8540 if { (eval echo configure:8541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8541   rm -rf conftest*
8542   eval "ac_cv_func_$ac_func=yes"
8543 else
8544   echo "configure: failed program was:" >&5
8545   cat conftest.$ac_ext >&5
8546   rm -rf conftest*
8547   eval "ac_cv_func_$ac_func=no"
8548 fi
8549 rm -f conftest*
8550 fi
8551
8552 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8553   echo "$ac_t""yes" 1>&6
8554     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8555   cat >> confdefs.h <<EOF
8556 #define $ac_tr_func 1
8557 EOF
8558  
8559 else
8560   echo "$ac_t""no" 1>&6
8561 fi
8562 done
8563  ;;
8564   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8565 echo "configure:8566: checking for getprpwnam in -lsecurity" >&5
8566 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8567 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8568   echo $ac_n "(cached) $ac_c" 1>&6
8569 else
8570   ac_save_LIBS="$LIBS"
8571 LIBS="-lsecurity  $LIBS"
8572 cat > conftest.$ac_ext <<EOF
8573 #line 8574 "configure"
8574 #include "confdefs.h"
8575 /* Override any gcc2 internal prototype to avoid an error.  */
8576 /* We use char because int might match the return type of a gcc2
8577     builtin and then its argument prototype would still apply.  */
8578 char getprpwnam();
8579
8580 int main() {
8581 getprpwnam()
8582 ; return 0; }
8583 EOF
8584 if { (eval echo configure:8585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8585   rm -rf conftest*
8586   eval "ac_cv_lib_$ac_lib_var=yes"
8587 else
8588   echo "configure: failed program was:" >&5
8589   cat conftest.$ac_ext >&5
8590   rm -rf conftest*
8591   eval "ac_cv_lib_$ac_lib_var=no"
8592 fi
8593 rm -f conftest*
8594 LIBS="$ac_save_LIBS"
8595
8596 fi
8597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8598   echo "$ac_t""yes" 1>&6
8599     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8600     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8601   cat >> confdefs.h <<EOF
8602 #define $ac_tr_lib 1
8603 EOF
8604
8605   LIBS="-lsecurity $LIBS"
8606
8607 else
8608   echo "$ac_t""no" 1>&6
8609 fi
8610  
8611      for ac_func in getprpwnam
8612 do
8613 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8614 echo "configure:8615: checking for $ac_func" >&5
8615 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8616   echo $ac_n "(cached) $ac_c" 1>&6
8617 else
8618   cat > conftest.$ac_ext <<EOF
8619 #line 8620 "configure"
8620 #include "confdefs.h"
8621 /* System header to define __stub macros and hopefully few prototypes,
8622     which can conflict with char $ac_func(); below.  */
8623 #include <assert.h>
8624 /* Override any gcc2 internal prototype to avoid an error.  */
8625 /* We use char because int might match the return type of a gcc2
8626     builtin and then its argument prototype would still apply.  */
8627 char $ac_func();
8628
8629 int main() {
8630
8631 /* The GNU C library defines this for functions which it implements
8632     to always fail with ENOSYS.  Some functions are actually named
8633     something starting with __ and the normal name is an alias.  */
8634 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8635 choke me
8636 #else
8637 $ac_func();
8638 #endif
8639
8640 ; return 0; }
8641 EOF
8642 if { (eval echo configure:8643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8643   rm -rf conftest*
8644   eval "ac_cv_func_$ac_func=yes"
8645 else
8646   echo "configure: failed program was:" >&5
8647   cat conftest.$ac_ext >&5
8648   rm -rf conftest*
8649   eval "ac_cv_func_$ac_func=no"
8650 fi
8651 rm -f conftest*
8652 fi
8653
8654 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8655   echo "$ac_t""yes" 1>&6
8656     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8657   cat >> confdefs.h <<EOF
8658 #define $ac_tr_func 1
8659 EOF
8660  
8661 else
8662   echo "$ac_t""no" 1>&6
8663 fi
8664 done
8665
8666   ;;
8667   esac
8668
8669 case "$LIBS" in
8670   *-lsec*) for ac_func in getprpwnam
8671 do
8672 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8673 echo "configure:8674: checking for $ac_func" >&5
8674 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8675   echo $ac_n "(cached) $ac_c" 1>&6
8676 else
8677   cat > conftest.$ac_ext <<EOF
8678 #line 8679 "configure"
8679 #include "confdefs.h"
8680 /* System header to define __stub macros and hopefully few prototypes,
8681     which can conflict with char $ac_func(); below.  */
8682 #include <assert.h>
8683 /* Override any gcc2 internal prototype to avoid an error.  */
8684 /* We use char because int might match the return type of a gcc2
8685     builtin and then its argument prototype would still apply.  */
8686 char $ac_func();
8687
8688 int main() {
8689
8690 /* The GNU C library defines this for functions which it implements
8691     to always fail with ENOSYS.  Some functions are actually named
8692     something starting with __ and the normal name is an alias.  */
8693 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8694 choke me
8695 #else
8696 $ac_func();
8697 #endif
8698
8699 ; return 0; }
8700 EOF
8701 if { (eval echo configure:8702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8702   rm -rf conftest*
8703   eval "ac_cv_func_$ac_func=yes"
8704 else
8705   echo "configure: failed program was:" >&5
8706   cat conftest.$ac_ext >&5
8707   rm -rf conftest*
8708   eval "ac_cv_func_$ac_func=no"
8709 fi
8710 rm -f conftest*
8711 fi
8712
8713 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8714   echo "$ac_t""yes" 1>&6
8715     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8716   cat >> confdefs.h <<EOF
8717 #define $ac_tr_func 1
8718 EOF
8719  
8720 else
8721   echo "$ac_t""no" 1>&6
8722 fi
8723 done
8724  ;;
8725   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8726 echo "configure:8727: checking for getprpwnam in -lsec" >&5
8727 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8728 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8729   echo $ac_n "(cached) $ac_c" 1>&6
8730 else
8731   ac_save_LIBS="$LIBS"
8732 LIBS="-lsec  $LIBS"
8733 cat > conftest.$ac_ext <<EOF
8734 #line 8735 "configure"
8735 #include "confdefs.h"
8736 /* Override any gcc2 internal prototype to avoid an error.  */
8737 /* We use char because int might match the return type of a gcc2
8738     builtin and then its argument prototype would still apply.  */
8739 char getprpwnam();
8740
8741 int main() {
8742 getprpwnam()
8743 ; return 0; }
8744 EOF
8745 if { (eval echo configure:8746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8746   rm -rf conftest*
8747   eval "ac_cv_lib_$ac_lib_var=yes"
8748 else
8749   echo "configure: failed program was:" >&5
8750   cat conftest.$ac_ext >&5
8751   rm -rf conftest*
8752   eval "ac_cv_lib_$ac_lib_var=no"
8753 fi
8754 rm -f conftest*
8755 LIBS="$ac_save_LIBS"
8756
8757 fi
8758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8759   echo "$ac_t""yes" 1>&6
8760     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8761     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8762   cat >> confdefs.h <<EOF
8763 #define $ac_tr_lib 1
8764 EOF
8765
8766   LIBS="-lsec $LIBS"
8767
8768 else
8769   echo "$ac_t""no" 1>&6
8770 fi
8771  
8772      for ac_func in getprpwnam
8773 do
8774 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8775 echo "configure:8776: checking for $ac_func" >&5
8776 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8777   echo $ac_n "(cached) $ac_c" 1>&6
8778 else
8779   cat > conftest.$ac_ext <<EOF
8780 #line 8781 "configure"
8781 #include "confdefs.h"
8782 /* System header to define __stub macros and hopefully few prototypes,
8783     which can conflict with char $ac_func(); below.  */
8784 #include <assert.h>
8785 /* Override any gcc2 internal prototype to avoid an error.  */
8786 /* We use char because int might match the return type of a gcc2
8787     builtin and then its argument prototype would still apply.  */
8788 char $ac_func();
8789
8790 int main() {
8791
8792 /* The GNU C library defines this for functions which it implements
8793     to always fail with ENOSYS.  Some functions are actually named
8794     something starting with __ and the normal name is an alias.  */
8795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8796 choke me
8797 #else
8798 $ac_func();
8799 #endif
8800
8801 ; return 0; }
8802 EOF
8803 if { (eval echo configure:8804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8804   rm -rf conftest*
8805   eval "ac_cv_func_$ac_func=yes"
8806 else
8807   echo "configure: failed program was:" >&5
8808   cat conftest.$ac_ext >&5
8809   rm -rf conftest*
8810   eval "ac_cv_func_$ac_func=no"
8811 fi
8812 rm -f conftest*
8813 fi
8814
8815 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8816   echo "$ac_t""yes" 1>&6
8817     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8818   cat >> confdefs.h <<EOF
8819 #define $ac_tr_func 1
8820 EOF
8821  
8822 else
8823   echo "$ac_t""no" 1>&6
8824 fi
8825 done
8826
8827   ;;
8828   esac
8829
8830
8831 # this bit needs to be modified for each OS that is suported by
8832 # smbwrapper. You need to specify how to created a shared library and
8833 # how to compile C code to produce PIC object files
8834
8835 # these are the defaults, good for lots of systems
8836 HOST_OS="$host_os"
8837 LDSHFLAGS="-shared"
8838 SHLD="\${CC}"
8839 PICFLAG=""
8840 PICSUFFIX="po"
8841 POBAD_CC="#"
8842 SHLIBEXT="so"
8843 # Assume non-shared by default and override below
8844 BLDSHARED="false"
8845 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8846 echo "configure:8847: checking ability to build shared libraries" >&5
8847
8848 # and these are for particular systems
8849 case "$host_os" in
8850                 *linux*)   cat >> confdefs.h <<\EOF
8851 #define LINUX 1
8852 EOF
8853
8854                         BLDSHARED="true"
8855                         LDSHFLAGS="-shared" 
8856                         DYNEXP="-Wl,--export-dynamic"
8857                         PICFLAG="-fPIC"
8858                         cat >> confdefs.h <<\EOF
8859 #define STAT_ST_BLOCKSIZE 512
8860 EOF
8861
8862                 ;;
8863                 *solaris*) cat >> confdefs.h <<\EOF
8864 #define SUNOS5 1
8865 EOF
8866
8867                         BLDSHARED="true"
8868                         LDSHFLAGS="-G"
8869                         if test "${GCC}" = "yes"; then
8870                                 PICFLAG="-fPIC"
8871                                 if test "${ac_cv_prog_gnu_ld}" = "yes"; then
8872                                         DYNEXP="-Wl,-E"
8873                                 fi
8874                         else
8875                                 PICFLAG="-KPIC"
8876                                 ## ${CFLAGS} added for building 64-bit shared 
8877                                 ## libs using Sun's Compiler
8878                                 LDSHFLAGS="-G \${CFLAGS}"
8879                                 POBAD_CC=""
8880                                 PICSUFFIX="po.o"
8881                         fi
8882                         cat >> confdefs.h <<\EOF
8883 #define STAT_ST_BLOCKSIZE 512
8884 EOF
8885
8886                 ;;
8887                 *sunos*) cat >> confdefs.h <<\EOF
8888 #define SUNOS4 1
8889 EOF
8890
8891                         BLDSHARED="true"
8892                         LDSHFLAGS="-G"
8893                         PICFLAG="-KPIC"   # Is this correct for SunOS
8894                 ;;
8895                 *bsd*)  BLDSHARED="true"
8896                         LDSHFLAGS="-shared"
8897                         DYNEXP="-Wl,-Bdynamic"
8898                         PICFLAG="-fPIC"
8899                         cat >> confdefs.h <<\EOF
8900 #define STAT_ST_BLOCKSIZE 512
8901 EOF
8902
8903                 ;;
8904                 *irix*) cat >> confdefs.h <<\EOF
8905 #define IRIX 1
8906 EOF
8907
8908                         case "$host_os" in
8909                         *irix6*) cat >> confdefs.h <<\EOF
8910 #define IRIX6 1
8911 EOF
8912
8913                         ;;
8914                         esac
8915                         ATTEMPT_WRAP32_BUILD=yes
8916                         BLDSHARED="true"
8917                         LDSHFLAGS="-set_version sgi1.0 -shared"
8918                         SHLD="\${LD}"
8919                         if test "${GCC}" = "yes"; then
8920                                 PICFLAG="-fPIC"
8921                         else 
8922                                 PICFLAG="-KPIC"
8923                         fi
8924                         cat >> confdefs.h <<\EOF
8925 #define STAT_ST_BLOCKSIZE 512
8926 EOF
8927
8928                 ;;
8929                 *aix*) cat >> confdefs.h <<\EOF
8930 #define AIX 1
8931 EOF
8932
8933                         BLDSHARED="true"
8934                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8935                         DYNEXP="-Wl,-brtl,-bexpall"
8936                         if test "${GCC}" = "yes"; then
8937                                 PICFLAG="-O2"
8938                         else
8939                         PICFLAG="-O2 -qmaxmem=6000"
8940                                 ## for funky AIX compiler using strncpy()
8941                                 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
8942                         fi
8943
8944                         cat >> confdefs.h <<\EOF
8945 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8946 EOF
8947
8948                 ;;
8949                 *hpux*) cat >> confdefs.h <<\EOF
8950 #define HPUX 1
8951 EOF
8952
8953                         SHLIBEXT="sl"
8954                         # Use special PIC flags for the native HP-UX compiler.
8955                         if test $ac_cv_prog_cc_Ae = yes; then
8956                                 BLDSHARED="true"
8957                                 SHLD="/usr/bin/ld"
8958                                 LDSHFLAGS="-B symbolic -b -z"
8959                                 PICFLAG="+z"
8960                         fi
8961                         DYNEXP="-Wl,-E"
8962                         cat >> confdefs.h <<\EOF
8963 #define STAT_ST_BLOCKSIZE 8192
8964 EOF
8965
8966                 ;;
8967                 *qnx*) cat >> confdefs.h <<\EOF
8968 #define QNX 1
8969 EOF
8970 ;;
8971                 *osf*) cat >> confdefs.h <<\EOF
8972 #define OSF1 1
8973 EOF
8974
8975                         BLDSHARED="true"
8976                         LDSHFLAGS="-shared"
8977                         PICFLAG="-fPIC"
8978                 ;;
8979                 *sco*) cat >> confdefs.h <<\EOF
8980 #define SCO 1
8981 EOF
8982 ;;
8983                 *unixware*) cat >> confdefs.h <<\EOF
8984 #define UNIXWARE 1
8985 EOF
8986
8987                         BLDSHARED="true"
8988                         LDSHFLAGS="-shared"
8989                         PICFLAG="-KPIC"
8990                 ;;
8991                 *next2*) cat >> confdefs.h <<\EOF
8992 #define NEXT2 1
8993 EOF
8994 ;;
8995                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8996 set dummy groff; ac_word=$2
8997 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8998 echo "configure:8999: checking for $ac_word" >&5
8999 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
9000   echo $ac_n "(cached) $ac_c" 1>&6
9001 else
9002   if test -n "$ROFF"; then
9003   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
9004 else
9005   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
9006   ac_dummy="$PATH"
9007   for ac_dir in $ac_dummy; do
9008     test -z "$ac_dir" && ac_dir=.
9009     if test -f $ac_dir/$ac_word; then
9010       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9011       break
9012     fi
9013   done
9014   IFS="$ac_save_ifs"
9015 fi
9016 fi
9017 ROFF="$ac_cv_prog_ROFF"
9018 if test -n "$ROFF"; then
9019   echo "$ac_t""$ROFF" 1>&6
9020 else
9021   echo "$ac_t""no" 1>&6
9022 fi
9023 ;;
9024                 *sysv4*)
9025                         case "$host" in
9026                                 *-univel-*)     if  test "$GCC" != yes ; then
9027                                                 cat >> confdefs.h <<\EOF
9028 #define HAVE_MEMSET 1
9029 EOF
9030
9031                                         fi
9032                                         LDSHFLAGS="-G"
9033                                         DYNEXP="-Bexport"
9034                                 ;;
9035                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
9036 #define RELIANTUNIX 1
9037 EOF
9038 ;;
9039                         esac
9040                 ;;
9041
9042                 *sysv5*)
9043                         if  test "$GCC" != yes ; then
9044                                 cat >> confdefs.h <<\EOF
9045 #define HAVE_MEMSET 1
9046 EOF
9047
9048                         fi
9049                         LDSHFLAGS="-G"
9050                 ;;
9051 esac
9052
9053 echo "$ac_t""$BLDSHARED" 1>&6
9054 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9055 echo "configure:9056: checking linker flags for shared libraries" >&5
9056 echo "$ac_t""$LDSHFLAGS" 1>&6
9057 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9058 echo "configure:9059: checking compiler flags for position-independent code" >&5
9059 echo "$ac_t""$PICFLAGS" 1>&6
9060
9061 #######################################################
9062 # test whether building a shared library actually works
9063 if test $BLDSHARED = true; then
9064 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9065 echo "configure:9066: checking whether building shared libraries actually works" >&5
9066 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9067   echo $ac_n "(cached) $ac_c" 1>&6
9068 else
9069   
9070    ac_cv_shlib_works=no
9071    # try building a trivial shared library
9072    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9073      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9074      ac_cv_shlib_works=yes
9075    rm -f shlib.so shlib.po
9076
9077 fi
9078
9079 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9080 if test $ac_cv_shlib_works = no; then
9081    BLDSHARED=false
9082 fi
9083 fi
9084
9085
9086 # this updates our target list if we can build shared libs
9087 if test $BLDSHARED = true; then
9088    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9089 else
9090    LIBSMBCLIENT_SHARED=
9091 fi
9092
9093 ################
9094
9095 echo $ac_n "checking for long long""... $ac_c" 1>&6
9096 echo "configure:9097: checking for long long" >&5
9097 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9098   echo $ac_n "(cached) $ac_c" 1>&6
9099 else
9100   
9101 if test "$cross_compiling" = yes; then
9102   samba_cv_have_longlong=cross
9103 else
9104   cat > conftest.$ac_ext <<EOF
9105 #line 9106 "configure"
9106 #include "confdefs.h"
9107 #include <stdio.h>
9108 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9109 EOF
9110 if { (eval echo configure:9111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9111 then
9112   samba_cv_have_longlong=yes
9113 else
9114   echo "configure: failed program was:" >&5
9115   cat conftest.$ac_ext >&5
9116   rm -fr conftest*
9117   samba_cv_have_longlong=no
9118 fi
9119 rm -fr conftest*
9120 fi
9121
9122 fi
9123
9124 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9125 if test x"$samba_cv_have_longlong" = x"yes"; then
9126     cat >> confdefs.h <<\EOF
9127 #define HAVE_LONGLONG 1
9128 EOF
9129
9130 fi
9131
9132 #
9133 # Check if the compiler supports the LL prefix on long long integers.
9134 # AIX needs this.
9135
9136 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9137 echo "configure:9138: checking for LL suffix on long long integers" >&5
9138 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9139   echo $ac_n "(cached) $ac_c" 1>&6
9140 else
9141   
9142     cat > conftest.$ac_ext <<EOF
9143 #line 9144 "configure"
9144 #include "confdefs.h"
9145 #include <stdio.h>
9146 int main() {
9147 long long i = 0x8000000000LL
9148 ; return 0; }
9149 EOF
9150 if { (eval echo configure:9151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9151   rm -rf conftest*
9152   samba_cv_compiler_supports_ll=yes
9153 else
9154   echo "configure: failed program was:" >&5
9155   cat conftest.$ac_ext >&5
9156   rm -rf conftest*
9157   samba_cv_compiler_supports_ll=no
9158 fi
9159 rm -f conftest*
9160 fi
9161
9162 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9163 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9164    cat >> confdefs.h <<\EOF
9165 #define COMPILER_SUPPORTS_LL 1
9166 EOF
9167
9168 fi
9169
9170   
9171 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9172 echo "configure:9173: checking for 64 bit off_t" >&5
9173 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9174   echo $ac_n "(cached) $ac_c" 1>&6
9175 else
9176   
9177 if test "$cross_compiling" = yes; then
9178   samba_cv_SIZEOF_OFF_T=cross
9179 else
9180   cat > conftest.$ac_ext <<EOF
9181 #line 9182 "configure"
9182 #include "confdefs.h"
9183 #include <stdio.h>
9184 #include <sys/stat.h>
9185 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9186 EOF
9187 if { (eval echo configure:9188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9188 then
9189   samba_cv_SIZEOF_OFF_T=yes
9190 else
9191   echo "configure: failed program was:" >&5
9192   cat conftest.$ac_ext >&5
9193   rm -fr conftest*
9194   samba_cv_SIZEOF_OFF_T=no
9195 fi
9196 rm -fr conftest*
9197 fi
9198
9199 fi
9200
9201 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9202 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9203     cat >> confdefs.h <<\EOF
9204 #define SIZEOF_OFF_T 8
9205 EOF
9206
9207 fi
9208
9209 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9210 echo "configure:9211: checking for off64_t" >&5
9211 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9212   echo $ac_n "(cached) $ac_c" 1>&6
9213 else
9214   
9215 if test "$cross_compiling" = yes; then
9216   samba_cv_HAVE_OFF64_T=cross
9217 else
9218   cat > conftest.$ac_ext <<EOF
9219 #line 9220 "configure"
9220 #include "confdefs.h"
9221
9222 #if defined(HAVE_UNISTD_H)
9223 #include <unistd.h>
9224 #endif
9225 #include <stdio.h>
9226 #include <sys/stat.h>
9227 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9228 EOF
9229 if { (eval echo configure:9230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9230 then
9231   samba_cv_HAVE_OFF64_T=yes
9232 else
9233   echo "configure: failed program was:" >&5
9234   cat conftest.$ac_ext >&5
9235   rm -fr conftest*
9236   samba_cv_HAVE_OFF64_T=no
9237 fi
9238 rm -fr conftest*
9239 fi
9240
9241 fi
9242
9243 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9244 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9245     cat >> confdefs.h <<\EOF
9246 #define HAVE_OFF64_T 1
9247 EOF
9248
9249 fi
9250
9251 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9252 echo "configure:9253: checking for 64 bit ino_t" >&5
9253 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9254   echo $ac_n "(cached) $ac_c" 1>&6
9255 else
9256   
9257 if test "$cross_compiling" = yes; then
9258   samba_cv_SIZEOF_INO_T=cross
9259 else
9260   cat > conftest.$ac_ext <<EOF
9261 #line 9262 "configure"
9262 #include "confdefs.h"
9263 #include <stdio.h>
9264 #include <sys/stat.h>
9265 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9266 EOF
9267 if { (eval echo configure:9268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9268 then
9269   samba_cv_SIZEOF_INO_T=yes
9270 else
9271   echo "configure: failed program was:" >&5
9272   cat conftest.$ac_ext >&5
9273   rm -fr conftest*
9274   samba_cv_SIZEOF_INO_T=no
9275 fi
9276 rm -fr conftest*
9277 fi
9278
9279 fi
9280
9281 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9282 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9283     cat >> confdefs.h <<\EOF
9284 #define SIZEOF_INO_T 8
9285 EOF
9286
9287 fi
9288
9289 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9290 echo "configure:9291: checking for ino64_t" >&5
9291 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9292   echo $ac_n "(cached) $ac_c" 1>&6
9293 else
9294   
9295 if test "$cross_compiling" = yes; then
9296   samba_cv_HAVE_INO64_T=cross
9297 else
9298   cat > conftest.$ac_ext <<EOF
9299 #line 9300 "configure"
9300 #include "confdefs.h"
9301
9302 #if defined(HAVE_UNISTD_H)
9303 #include <unistd.h>
9304 #endif
9305 #include <stdio.h>
9306 #include <sys/stat.h>
9307 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9308 EOF
9309 if { (eval echo configure:9310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9310 then
9311   samba_cv_HAVE_INO64_T=yes
9312 else
9313   echo "configure: failed program was:" >&5
9314   cat conftest.$ac_ext >&5
9315   rm -fr conftest*
9316   samba_cv_HAVE_INO64_T=no
9317 fi
9318 rm -fr conftest*
9319 fi
9320
9321 fi
9322
9323 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9324 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9325     cat >> confdefs.h <<\EOF
9326 #define HAVE_INO64_T 1
9327 EOF
9328
9329 fi
9330
9331 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9332 echo "configure:9333: checking for dev64_t" >&5
9333 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9334   echo $ac_n "(cached) $ac_c" 1>&6
9335 else
9336   
9337 if test "$cross_compiling" = yes; then
9338   samba_cv_HAVE_DEV64_T=cross
9339 else
9340   cat > conftest.$ac_ext <<EOF
9341 #line 9342 "configure"
9342 #include "confdefs.h"
9343
9344 #if defined(HAVE_UNISTD_H)
9345 #include <unistd.h>
9346 #endif
9347 #include <stdio.h>
9348 #include <sys/stat.h>
9349 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9350 EOF
9351 if { (eval echo configure:9352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9352 then
9353   samba_cv_HAVE_DEV64_T=yes
9354 else
9355   echo "configure: failed program was:" >&5
9356   cat conftest.$ac_ext >&5
9357   rm -fr conftest*
9358   samba_cv_HAVE_DEV64_T=no
9359 fi
9360 rm -fr conftest*
9361 fi
9362
9363 fi
9364
9365 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9366 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9367     cat >> confdefs.h <<\EOF
9368 #define HAVE_DEV64_T 1
9369 EOF
9370
9371 fi
9372
9373 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9374 echo "configure:9375: checking for struct dirent64" >&5
9375 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9376   echo $ac_n "(cached) $ac_c" 1>&6
9377 else
9378   
9379 cat > conftest.$ac_ext <<EOF
9380 #line 9381 "configure"
9381 #include "confdefs.h"
9382
9383 #if defined(HAVE_UNISTD_H)
9384 #include <unistd.h>
9385 #endif
9386 #include <sys/types.h>
9387 #include <dirent.h>
9388 int main() {
9389 struct dirent64 de;
9390 ; return 0; }
9391 EOF
9392 if { (eval echo configure:9393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9393   rm -rf conftest*
9394   samba_cv_HAVE_STRUCT_DIRENT64=yes
9395 else
9396   echo "configure: failed program was:" >&5
9397   cat conftest.$ac_ext >&5
9398   rm -rf conftest*
9399   samba_cv_HAVE_STRUCT_DIRENT64=no
9400 fi
9401 rm -f conftest*
9402 fi
9403
9404 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9405 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
9406     cat >> confdefs.h <<\EOF
9407 #define HAVE_STRUCT_DIRENT64 1
9408 EOF
9409
9410 fi
9411
9412 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9413 echo "configure:9414: checking for major macro" >&5
9414 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9415   echo $ac_n "(cached) $ac_c" 1>&6
9416 else
9417   
9418 if test "$cross_compiling" = yes; then
9419   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9420 else
9421   cat > conftest.$ac_ext <<EOF
9422 #line 9423 "configure"
9423 #include "confdefs.h"
9424
9425 #if defined(HAVE_UNISTD_H)
9426 #include <unistd.h>
9427 #endif
9428 #include <sys/types.h>
9429 main() { dev_t dev; int i = major(dev); return 0; }
9430 EOF
9431 if { (eval echo configure:9432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9432 then
9433   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9434 else
9435   echo "configure: failed program was:" >&5
9436   cat conftest.$ac_ext >&5
9437   rm -fr conftest*
9438   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9439 fi
9440 rm -fr conftest*
9441 fi
9442
9443 fi
9444
9445 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9446 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9447     cat >> confdefs.h <<\EOF
9448 #define HAVE_DEVICE_MAJOR_FN 1
9449 EOF
9450
9451 fi
9452
9453 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9454 echo "configure:9455: checking for minor macro" >&5
9455 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9456   echo $ac_n "(cached) $ac_c" 1>&6
9457 else
9458   
9459 if test "$cross_compiling" = yes; then
9460   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9461 else
9462   cat > conftest.$ac_ext <<EOF
9463 #line 9464 "configure"
9464 #include "confdefs.h"
9465
9466 #if defined(HAVE_UNISTD_H)
9467 #include <unistd.h>
9468 #endif
9469 #include <sys/types.h>
9470 main() { dev_t dev; int i = minor(dev); return 0; }
9471 EOF
9472 if { (eval echo configure:9473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9473 then
9474   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9475 else
9476   echo "configure: failed program was:" >&5
9477   cat conftest.$ac_ext >&5
9478   rm -fr conftest*
9479   samba_cv_HAVE_DEVICE_MINOR_FN=no
9480 fi
9481 rm -fr conftest*
9482 fi
9483
9484 fi
9485
9486 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9487 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9488     cat >> confdefs.h <<\EOF
9489 #define HAVE_DEVICE_MINOR_FN 1
9490 EOF
9491
9492 fi
9493
9494 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9495 echo "configure:9496: checking for unsigned char" >&5
9496 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9497   echo $ac_n "(cached) $ac_c" 1>&6
9498 else
9499   
9500 if test "$cross_compiling" = yes; then
9501   samba_cv_HAVE_UNSIGNED_CHAR=cross
9502 else
9503   cat > conftest.$ac_ext <<EOF
9504 #line 9505 "configure"
9505 #include "confdefs.h"
9506 #include <stdio.h>
9507 main() { char c; c=250; exit((c > 0)?0:1); }
9508 EOF
9509 if { (eval echo configure:9510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9510 then
9511   samba_cv_HAVE_UNSIGNED_CHAR=yes
9512 else
9513   echo "configure: failed program was:" >&5
9514   cat conftest.$ac_ext >&5
9515   rm -fr conftest*
9516   samba_cv_HAVE_UNSIGNED_CHAR=no
9517 fi
9518 rm -fr conftest*
9519 fi
9520
9521 fi
9522
9523 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9524 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9525     cat >> confdefs.h <<\EOF
9526 #define HAVE_UNSIGNED_CHAR 1
9527 EOF
9528
9529 fi
9530
9531 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9532 echo "configure:9533: checking for sin_len in sock" >&5
9533 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9534   echo $ac_n "(cached) $ac_c" 1>&6
9535 else
9536   
9537 cat > conftest.$ac_ext <<EOF
9538 #line 9539 "configure"
9539 #include "confdefs.h"
9540 #include <sys/types.h>
9541 #include <sys/socket.h>
9542 #include <netinet/in.h>
9543 int main() {
9544 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9545 ; return 0; }
9546 EOF
9547 if { (eval echo configure:9548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9548   rm -rf conftest*
9549   samba_cv_HAVE_SOCK_SIN_LEN=yes
9550 else
9551   echo "configure: failed program was:" >&5
9552   cat conftest.$ac_ext >&5
9553   rm -rf conftest*
9554   samba_cv_HAVE_SOCK_SIN_LEN=no
9555 fi
9556 rm -f conftest*
9557 fi
9558
9559 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9560 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9561     cat >> confdefs.h <<\EOF
9562 #define HAVE_SOCK_SIN_LEN 1
9563 EOF
9564
9565 fi
9566
9567 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9568 echo "configure:9569: checking whether seekdir returns void" >&5
9569 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9570   echo $ac_n "(cached) $ac_c" 1>&6
9571 else
9572   
9573 cat > conftest.$ac_ext <<EOF
9574 #line 9575 "configure"
9575 #include "confdefs.h"
9576 #include <sys/types.h>
9577 #include <dirent.h>
9578 void seekdir(DIR *d, long loc) { return; }
9579 int main() {
9580 return 0;
9581 ; return 0; }
9582 EOF
9583 if { (eval echo configure:9584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9584   rm -rf conftest*
9585   samba_cv_SEEKDIR_RETURNS_VOID=yes
9586 else
9587   echo "configure: failed program was:" >&5
9588   cat conftest.$ac_ext >&5
9589   rm -rf conftest*
9590   samba_cv_SEEKDIR_RETURNS_VOID=no
9591 fi
9592 rm -f conftest*
9593 fi
9594
9595 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9596 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9597     cat >> confdefs.h <<\EOF
9598 #define SEEKDIR_RETURNS_VOID 1
9599 EOF
9600
9601 fi
9602
9603 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9604 echo "configure:9605: checking for __FILE__ macro" >&5
9605 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9606   echo $ac_n "(cached) $ac_c" 1>&6
9607 else
9608   
9609 cat > conftest.$ac_ext <<EOF
9610 #line 9611 "configure"
9611 #include "confdefs.h"
9612 #include <stdio.h>
9613 int main() {
9614 printf("%s\n", __FILE__);
9615 ; return 0; }
9616 EOF
9617 if { (eval echo configure:9618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9618   rm -rf conftest*
9619   samba_cv_HAVE_FILE_MACRO=yes
9620 else
9621   echo "configure: failed program was:" >&5
9622   cat conftest.$ac_ext >&5
9623   rm -rf conftest*
9624   samba_cv_HAVE_FILE_MACRO=no
9625 fi
9626 rm -f conftest*
9627 fi
9628
9629 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9630 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9631     cat >> confdefs.h <<\EOF
9632 #define HAVE_FILE_MACRO 1
9633 EOF
9634
9635 fi
9636
9637 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9638 echo "configure:9639: checking for __FUNCTION__ macro" >&5
9639 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9640   echo $ac_n "(cached) $ac_c" 1>&6
9641 else
9642   
9643 cat > conftest.$ac_ext <<EOF
9644 #line 9645 "configure"
9645 #include "confdefs.h"
9646 #include <stdio.h>
9647 int main() {
9648 printf("%s\n", __FUNCTION__);
9649 ; return 0; }
9650 EOF
9651 if { (eval echo configure:9652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9652   rm -rf conftest*
9653   samba_cv_HAVE_FUNCTION_MACRO=yes
9654 else
9655   echo "configure: failed program was:" >&5
9656   cat conftest.$ac_ext >&5
9657   rm -rf conftest*
9658   samba_cv_HAVE_FUNCTION_MACRO=no
9659 fi
9660 rm -f conftest*
9661 fi
9662
9663 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9664 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9665     cat >> confdefs.h <<\EOF
9666 #define HAVE_FUNCTION_MACRO 1
9667 EOF
9668
9669 fi
9670
9671 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9672 echo "configure:9673: checking if gettimeofday takes tz argument" >&5
9673 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9674   echo $ac_n "(cached) $ac_c" 1>&6
9675 else
9676   
9677 if test "$cross_compiling" = yes; then
9678   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9679 else
9680   cat > conftest.$ac_ext <<EOF
9681 #line 9682 "configure"
9682 #include "confdefs.h"
9683
9684 #include <sys/time.h>
9685 #include <unistd.h>
9686 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9687 EOF
9688 if { (eval echo configure:9689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9689 then
9690   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9691 else
9692   echo "configure: failed program was:" >&5
9693   cat conftest.$ac_ext >&5
9694   rm -fr conftest*
9695   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9696 fi
9697 rm -fr conftest*
9698 fi
9699
9700 fi
9701
9702 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9703 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9704     cat >> confdefs.h <<\EOF
9705 #define HAVE_GETTIMEOFDAY_TZ 1
9706 EOF
9707
9708 fi
9709
9710 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9711 echo "configure:9712: checking for __va_copy" >&5
9712 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9713   echo $ac_n "(cached) $ac_c" 1>&6
9714 else
9715   
9716 cat > conftest.$ac_ext <<EOF
9717 #line 9718 "configure"
9718 #include "confdefs.h"
9719 #include <stdarg.h>
9720 va_list ap1,ap2;
9721 int main() {
9722 __va_copy(ap1,ap2);
9723 ; return 0; }
9724 EOF
9725 if { (eval echo configure:9726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9726   rm -rf conftest*
9727   samba_cv_HAVE_VA_COPY=yes
9728 else
9729   echo "configure: failed program was:" >&5
9730   cat conftest.$ac_ext >&5
9731   rm -rf conftest*
9732   samba_cv_HAVE_VA_COPY=no
9733 fi
9734 rm -f conftest*
9735 fi
9736
9737 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9738 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9739     cat >> confdefs.h <<\EOF
9740 #define HAVE_VA_COPY 1
9741 EOF
9742
9743 fi
9744
9745 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9746 echo "configure:9747: checking for C99 vsnprintf" >&5
9747 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9748   echo $ac_n "(cached) $ac_c" 1>&6
9749 else
9750   
9751 if test "$cross_compiling" = yes; then
9752   samba_cv_HAVE_C99_VSNPRINTF=cross
9753 else
9754   cat > conftest.$ac_ext <<EOF
9755 #line 9756 "configure"
9756 #include "confdefs.h"
9757
9758 #include <sys/types.h>
9759 #include <stdarg.h>
9760 void foo(const char *format, ...) { 
9761        va_list ap;
9762        int len;
9763        char buf[5];
9764
9765        va_start(ap, format);
9766        len = vsnprintf(buf, 0, format, ap);
9767        va_end(ap);
9768        if (len != 5) exit(1);
9769
9770        va_start(ap, format);
9771        len = vsnprintf(0, 0, format, ap);
9772        va_end(ap);
9773        if (len != 5) exit(1);
9774
9775        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9776
9777        exit(0);
9778 }
9779 main() { foo("hello"); }
9780
9781 EOF
9782 if { (eval echo configure:9783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9783 then
9784   samba_cv_HAVE_C99_VSNPRINTF=yes
9785 else
9786   echo "configure: failed program was:" >&5
9787   cat conftest.$ac_ext >&5
9788   rm -fr conftest*
9789   samba_cv_HAVE_C99_VSNPRINTF=no
9790 fi
9791 rm -fr conftest*
9792 fi
9793
9794 fi
9795
9796 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9797 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9798     cat >> confdefs.h <<\EOF
9799 #define HAVE_C99_VSNPRINTF 1
9800 EOF
9801
9802 fi
9803
9804 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9805 echo "configure:9806: checking for broken readdir" >&5
9806 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9807   echo $ac_n "(cached) $ac_c" 1>&6
9808 else
9809   
9810 if test "$cross_compiling" = yes; then
9811   samba_cv_HAVE_BROKEN_READDIR=cross
9812 else
9813   cat > conftest.$ac_ext <<EOF
9814 #line 9815 "configure"
9815 #include "confdefs.h"
9816 #include <sys/types.h>
9817 #include <dirent.h>
9818 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9819 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9820 di->d_name[0] == 0) exit(0); exit(1);} 
9821 EOF
9822 if { (eval echo configure:9823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9823 then
9824   samba_cv_HAVE_BROKEN_READDIR=yes
9825 else
9826   echo "configure: failed program was:" >&5
9827   cat conftest.$ac_ext >&5
9828   rm -fr conftest*
9829   samba_cv_HAVE_BROKEN_READDIR=no
9830 fi
9831 rm -fr conftest*
9832 fi
9833
9834 fi
9835
9836 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9837 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9838     cat >> confdefs.h <<\EOF
9839 #define HAVE_BROKEN_READDIR 1
9840 EOF
9841
9842 fi
9843
9844 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9845 echo "configure:9846: checking for utimbuf" >&5
9846 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9847   echo $ac_n "(cached) $ac_c" 1>&6
9848 else
9849   
9850 cat > conftest.$ac_ext <<EOF
9851 #line 9852 "configure"
9852 #include "confdefs.h"
9853 #include <sys/types.h>
9854 #include <utime.h>
9855 int main() {
9856 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9857 ; return 0; }
9858 EOF
9859 if { (eval echo configure:9860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9860   rm -rf conftest*
9861   samba_cv_HAVE_UTIMBUF=yes
9862 else
9863   echo "configure: failed program was:" >&5
9864   cat conftest.$ac_ext >&5
9865   rm -rf conftest*
9866   samba_cv_HAVE_UTIMBUF=no
9867 fi
9868 rm -f conftest*
9869 fi
9870
9871 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9872 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9873     cat >> confdefs.h <<\EOF
9874 #define HAVE_UTIMBUF 1
9875 EOF
9876
9877 fi
9878
9879
9880 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9881 do
9882 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9883 echo "configure:9884: checking for $ac_func" >&5
9884 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9885   echo $ac_n "(cached) $ac_c" 1>&6
9886 else
9887   cat > conftest.$ac_ext <<EOF
9888 #line 9889 "configure"
9889 #include "confdefs.h"
9890 /* System header to define __stub macros and hopefully few prototypes,
9891     which can conflict with char $ac_func(); below.  */
9892 #include <assert.h>
9893 /* Override any gcc2 internal prototype to avoid an error.  */
9894 /* We use char because int might match the return type of a gcc2
9895     builtin and then its argument prototype would still apply.  */
9896 char $ac_func();
9897
9898 int main() {
9899
9900 /* The GNU C library defines this for functions which it implements
9901     to always fail with ENOSYS.  Some functions are actually named
9902     something starting with __ and the normal name is an alias.  */
9903 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9904 choke me
9905 #else
9906 $ac_func();
9907 #endif
9908
9909 ; return 0; }
9910 EOF
9911 if { (eval echo configure:9912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9912   rm -rf conftest*
9913   eval "ac_cv_func_$ac_func=yes"
9914 else
9915   echo "configure: failed program was:" >&5
9916   cat conftest.$ac_ext >&5
9917   rm -rf conftest*
9918   eval "ac_cv_func_$ac_func=no"
9919 fi
9920 rm -f conftest*
9921 fi
9922
9923 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9924   echo "$ac_t""yes" 1>&6
9925     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9926   cat >> confdefs.h <<EOF
9927 #define $ac_tr_func 1
9928 EOF
9929  
9930 else
9931   echo "$ac_t""no" 1>&6
9932 fi
9933 done
9934
9935
9936 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9937 echo "configure:9938: checking for ut_name in utmp" >&5
9938 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9939   echo $ac_n "(cached) $ac_c" 1>&6
9940 else
9941   
9942 cat > conftest.$ac_ext <<EOF
9943 #line 9944 "configure"
9944 #include "confdefs.h"
9945 #include <sys/types.h>
9946 #include <utmp.h>
9947 int main() {
9948 struct utmp ut;  ut.ut_name[0] = 'a';
9949 ; return 0; }
9950 EOF
9951 if { (eval echo configure:9952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9952   rm -rf conftest*
9953   samba_cv_HAVE_UT_UT_NAME=yes
9954 else
9955   echo "configure: failed program was:" >&5
9956   cat conftest.$ac_ext >&5
9957   rm -rf conftest*
9958   samba_cv_HAVE_UT_UT_NAME=no
9959 fi
9960 rm -f conftest*
9961 fi
9962
9963 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9964 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9965     cat >> confdefs.h <<\EOF
9966 #define HAVE_UT_UT_NAME 1
9967 EOF
9968
9969 fi 
9970
9971 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9972 echo "configure:9973: checking for ut_user in utmp" >&5
9973 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9974   echo $ac_n "(cached) $ac_c" 1>&6
9975 else
9976   
9977 cat > conftest.$ac_ext <<EOF
9978 #line 9979 "configure"
9979 #include "confdefs.h"
9980 #include <sys/types.h>
9981 #include <utmp.h>
9982 int main() {
9983 struct utmp ut;  ut.ut_user[0] = 'a';
9984 ; return 0; }
9985 EOF
9986 if { (eval echo configure:9987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9987   rm -rf conftest*
9988   samba_cv_HAVE_UT_UT_USER=yes
9989 else
9990   echo "configure: failed program was:" >&5
9991   cat conftest.$ac_ext >&5
9992   rm -rf conftest*
9993   samba_cv_HAVE_UT_UT_USER=no
9994 fi
9995 rm -f conftest*
9996 fi
9997
9998 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9999 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
10000     cat >> confdefs.h <<\EOF
10001 #define HAVE_UT_UT_USER 1
10002 EOF
10003
10004 fi 
10005
10006 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10007 echo "configure:10008: checking for ut_id in utmp" >&5
10008 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10009   echo $ac_n "(cached) $ac_c" 1>&6
10010 else
10011   
10012 cat > conftest.$ac_ext <<EOF
10013 #line 10014 "configure"
10014 #include "confdefs.h"
10015 #include <sys/types.h>
10016 #include <utmp.h>
10017 int main() {
10018 struct utmp ut;  ut.ut_id[0] = 'a';
10019 ; return 0; }
10020 EOF
10021 if { (eval echo configure:10022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10022   rm -rf conftest*
10023   samba_cv_HAVE_UT_UT_ID=yes
10024 else
10025   echo "configure: failed program was:" >&5
10026   cat conftest.$ac_ext >&5
10027   rm -rf conftest*
10028   samba_cv_HAVE_UT_UT_ID=no
10029 fi
10030 rm -f conftest*
10031 fi
10032
10033 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10034 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10035     cat >> confdefs.h <<\EOF
10036 #define HAVE_UT_UT_ID 1
10037 EOF
10038
10039 fi 
10040
10041 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10042 echo "configure:10043: checking for ut_host in utmp" >&5
10043 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10044   echo $ac_n "(cached) $ac_c" 1>&6
10045 else
10046   
10047 cat > conftest.$ac_ext <<EOF
10048 #line 10049 "configure"
10049 #include "confdefs.h"
10050 #include <sys/types.h>
10051 #include <utmp.h>
10052 int main() {
10053 struct utmp ut;  ut.ut_host[0] = 'a';
10054 ; return 0; }
10055 EOF
10056 if { (eval echo configure:10057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10057   rm -rf conftest*
10058   samba_cv_HAVE_UT_UT_HOST=yes
10059 else
10060   echo "configure: failed program was:" >&5
10061   cat conftest.$ac_ext >&5
10062   rm -rf conftest*
10063   samba_cv_HAVE_UT_UT_HOST=no
10064 fi
10065 rm -f conftest*
10066 fi
10067
10068 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10069 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10070     cat >> confdefs.h <<\EOF
10071 #define HAVE_UT_UT_HOST 1
10072 EOF
10073
10074 fi 
10075
10076 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10077 echo "configure:10078: checking for ut_time in utmp" >&5
10078 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10079   echo $ac_n "(cached) $ac_c" 1>&6
10080 else
10081   
10082 cat > conftest.$ac_ext <<EOF
10083 #line 10084 "configure"
10084 #include "confdefs.h"
10085 #include <sys/types.h>
10086 #include <utmp.h>
10087 int main() {
10088 struct utmp ut;  time_t t; ut.ut_time = t;
10089 ; return 0; }
10090 EOF
10091 if { (eval echo configure:10092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10092   rm -rf conftest*
10093   samba_cv_HAVE_UT_UT_TIME=yes
10094 else
10095   echo "configure: failed program was:" >&5
10096   cat conftest.$ac_ext >&5
10097   rm -rf conftest*
10098   samba_cv_HAVE_UT_UT_TIME=no
10099 fi
10100 rm -f conftest*
10101 fi
10102
10103 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10104 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10105     cat >> confdefs.h <<\EOF
10106 #define HAVE_UT_UT_TIME 1
10107 EOF
10108
10109 fi 
10110
10111 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10112 echo "configure:10113: checking for ut_tv in utmp" >&5
10113 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10114   echo $ac_n "(cached) $ac_c" 1>&6
10115 else
10116   
10117 cat > conftest.$ac_ext <<EOF
10118 #line 10119 "configure"
10119 #include "confdefs.h"
10120 #include <sys/types.h>
10121 #include <utmp.h>
10122 int main() {
10123 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10124 ; return 0; }
10125 EOF
10126 if { (eval echo configure:10127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10127   rm -rf conftest*
10128   samba_cv_HAVE_UT_UT_TV=yes
10129 else
10130   echo "configure: failed program was:" >&5
10131   cat conftest.$ac_ext >&5
10132   rm -rf conftest*
10133   samba_cv_HAVE_UT_UT_TV=no
10134 fi
10135 rm -f conftest*
10136 fi
10137
10138 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10139 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10140     cat >> confdefs.h <<\EOF
10141 #define HAVE_UT_UT_TV 1
10142 EOF
10143
10144 fi 
10145
10146 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10147 echo "configure:10148: checking for ut_type in utmp" >&5
10148 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10149   echo $ac_n "(cached) $ac_c" 1>&6
10150 else
10151   
10152 cat > conftest.$ac_ext <<EOF
10153 #line 10154 "configure"
10154 #include "confdefs.h"
10155 #include <sys/types.h>
10156 #include <utmp.h>
10157 int main() {
10158 struct utmp ut;  ut.ut_type = 0;
10159 ; return 0; }
10160 EOF
10161 if { (eval echo configure:10162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10162   rm -rf conftest*
10163   samba_cv_HAVE_UT_UT_TYPE=yes
10164 else
10165   echo "configure: failed program was:" >&5
10166   cat conftest.$ac_ext >&5
10167   rm -rf conftest*
10168   samba_cv_HAVE_UT_UT_TYPE=no
10169 fi
10170 rm -f conftest*
10171 fi
10172
10173 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10174 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10175     cat >> confdefs.h <<\EOF
10176 #define HAVE_UT_UT_TYPE 1
10177 EOF
10178
10179 fi 
10180
10181 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10182 echo "configure:10183: checking for ut_pid in utmp" >&5
10183 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10184   echo $ac_n "(cached) $ac_c" 1>&6
10185 else
10186   
10187 cat > conftest.$ac_ext <<EOF
10188 #line 10189 "configure"
10189 #include "confdefs.h"
10190 #include <sys/types.h>
10191 #include <utmp.h>
10192 int main() {
10193 struct utmp ut;  ut.ut_pid = 0;
10194 ; return 0; }
10195 EOF
10196 if { (eval echo configure:10197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10197   rm -rf conftest*
10198   samba_cv_HAVE_UT_UT_PID=yes
10199 else
10200   echo "configure: failed program was:" >&5
10201   cat conftest.$ac_ext >&5
10202   rm -rf conftest*
10203   samba_cv_HAVE_UT_UT_PID=no
10204 fi
10205 rm -f conftest*
10206 fi
10207
10208 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10209 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10210     cat >> confdefs.h <<\EOF
10211 #define HAVE_UT_UT_PID 1
10212 EOF
10213
10214 fi 
10215
10216 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10217 echo "configure:10218: checking for ut_exit in utmp" >&5
10218 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10219   echo $ac_n "(cached) $ac_c" 1>&6
10220 else
10221   
10222 cat > conftest.$ac_ext <<EOF
10223 #line 10224 "configure"
10224 #include "confdefs.h"
10225 #include <sys/types.h>
10226 #include <utmp.h>
10227 int main() {
10228 struct utmp ut;  ut.ut_exit.e_exit = 0;
10229 ; return 0; }
10230 EOF
10231 if { (eval echo configure:10232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10232   rm -rf conftest*
10233   samba_cv_HAVE_UT_UT_EXIT=yes
10234 else
10235   echo "configure: failed program was:" >&5
10236   cat conftest.$ac_ext >&5
10237   rm -rf conftest*
10238   samba_cv_HAVE_UT_UT_EXIT=no
10239 fi
10240 rm -f conftest*
10241 fi
10242
10243 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10244 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10245     cat >> confdefs.h <<\EOF
10246 #define HAVE_UT_UT_EXIT 1
10247 EOF
10248
10249 fi 
10250
10251 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10252 echo "configure:10253: checking for ut_addr in utmp" >&5
10253 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10254   echo $ac_n "(cached) $ac_c" 1>&6
10255 else
10256   
10257 cat > conftest.$ac_ext <<EOF
10258 #line 10259 "configure"
10259 #include "confdefs.h"
10260 #include <sys/types.h>
10261 #include <utmp.h>
10262 int main() {
10263 struct utmp ut;  ut.ut_addr = 0;
10264 ; return 0; }
10265 EOF
10266 if { (eval echo configure:10267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10267   rm -rf conftest*
10268   samba_cv_HAVE_UT_UT_ADDR=yes
10269 else
10270   echo "configure: failed program was:" >&5
10271   cat conftest.$ac_ext >&5
10272   rm -rf conftest*
10273   samba_cv_HAVE_UT_UT_ADDR=no
10274 fi
10275 rm -f conftest*
10276 fi
10277
10278 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10279 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10280     cat >> confdefs.h <<\EOF
10281 #define HAVE_UT_UT_ADDR 1
10282 EOF
10283
10284 fi 
10285
10286 if test x$ac_cv_func_pututline = xyes ; then
10287   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10288 echo "configure:10289: checking whether pututline returns pointer" >&5
10289 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10290   echo $ac_n "(cached) $ac_c" 1>&6
10291 else
10292   
10293   cat > conftest.$ac_ext <<EOF
10294 #line 10295 "configure"
10295 #include "confdefs.h"
10296 #include <sys/types.h>
10297 #include <utmp.h>
10298 int main() {
10299 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10300 ; return 0; }
10301 EOF
10302 if { (eval echo configure:10303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10303   rm -rf conftest*
10304   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10305 else
10306   echo "configure: failed program was:" >&5
10307   cat conftest.$ac_ext >&5
10308   rm -rf conftest*
10309   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10310 fi
10311 rm -f conftest*
10312 fi
10313
10314 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10315   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10316       cat >> confdefs.h <<\EOF
10317 #define PUTUTLINE_RETURNS_UTMP 1
10318 EOF
10319
10320   fi
10321 fi
10322
10323 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10324 echo "configure:10325: checking for ut_syslen in utmpx" >&5
10325 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10326   echo $ac_n "(cached) $ac_c" 1>&6
10327 else
10328   
10329 cat > conftest.$ac_ext <<EOF
10330 #line 10331 "configure"
10331 #include "confdefs.h"
10332 #include <sys/types.h>
10333 #include <utmpx.h>
10334 int main() {
10335 struct utmpx ux;  ux.ut_syslen = 0;
10336 ; return 0; }
10337 EOF
10338 if { (eval echo configure:10339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10339   rm -rf conftest*
10340   samba_cv_HAVE_UX_UT_SYSLEN=yes
10341 else
10342   echo "configure: failed program was:" >&5
10343   cat conftest.$ac_ext >&5
10344   rm -rf conftest*
10345   samba_cv_HAVE_UX_UT_SYSLEN=no
10346 fi
10347 rm -f conftest*
10348 fi
10349
10350 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10351 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10352     cat >> confdefs.h <<\EOF
10353 #define HAVE_UX_UT_SYSLEN 1
10354 EOF
10355
10356 fi 
10357
10358
10359 #################################################
10360 # check for libiconv support
10361 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10362 echo "configure:10363: checking whether to use libiconv" >&5
10363 # Check whether --with-libiconv or --without-libiconv was given.
10364 if test "${with_libiconv+set}" = set; then
10365   withval="$with_libiconv"
10366    case "$withval" in
10367   no)
10368     echo "$ac_t""no" 1>&6
10369     ;;
10370   *)
10371     echo "$ac_t""yes" 1>&6
10372     CFLAGS="$CFLAGS -I$withval/include"
10373     LDFLAGS="$LDFLAGS -L$withval/lib"
10374     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10375 echo "configure:10376: checking for iconv_open in -liconv" >&5
10376 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10377 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10378   echo $ac_n "(cached) $ac_c" 1>&6
10379 else
10380   ac_save_LIBS="$LIBS"
10381 LIBS="-liconv  $LIBS"
10382 cat > conftest.$ac_ext <<EOF
10383 #line 10384 "configure"
10384 #include "confdefs.h"
10385 /* Override any gcc2 internal prototype to avoid an error.  */
10386 /* We use char because int might match the return type of a gcc2
10387     builtin and then its argument prototype would still apply.  */
10388 char iconv_open();
10389
10390 int main() {
10391 iconv_open()
10392 ; return 0; }
10393 EOF
10394 if { (eval echo configure:10395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10395   rm -rf conftest*
10396   eval "ac_cv_lib_$ac_lib_var=yes"
10397 else
10398   echo "configure: failed program was:" >&5
10399   cat conftest.$ac_ext >&5
10400   rm -rf conftest*
10401   eval "ac_cv_lib_$ac_lib_var=no"
10402 fi
10403 rm -f conftest*
10404 LIBS="$ac_save_LIBS"
10405
10406 fi
10407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10408   echo "$ac_t""yes" 1>&6
10409     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10410     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10411   cat >> confdefs.h <<EOF
10412 #define $ac_tr_lib 1
10413 EOF
10414
10415   LIBS="-liconv $LIBS"
10416
10417 else
10418   echo "$ac_t""no" 1>&6
10419 fi
10420
10421     cat >> confdefs.h <<EOF
10422 #define WITH_LIBICONV "${withval}"
10423 EOF
10424
10425     ;;
10426   esac 
10427 else
10428   echo "$ac_t""no" 1>&6
10429
10430 fi
10431
10432
10433
10434 ############
10435 # check for iconv in libc
10436 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10437 echo "configure:10438: checking for working iconv" >&5
10438 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10439   echo $ac_n "(cached) $ac_c" 1>&6
10440 else
10441   
10442 if test "$cross_compiling" = yes; then
10443   samba_cv_HAVE_NATIVE_ICONV=cross
10444 else
10445   cat > conftest.$ac_ext <<EOF
10446 #line 10447 "configure"
10447 #include "confdefs.h"
10448
10449 #include <iconv.h>
10450 main() {
10451        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10452        if (cd == 0 || cd == (iconv_t)-1) return -1;
10453        return 0;
10454 }
10455
10456 EOF
10457 if { (eval echo configure:10458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10458 then
10459   samba_cv_HAVE_NATIVE_ICONV=yes
10460 else
10461   echo "configure: failed program was:" >&5
10462   cat conftest.$ac_ext >&5
10463   rm -fr conftest*
10464   samba_cv_HAVE_NATIVE_ICONV=no
10465 fi
10466 rm -fr conftest*
10467 fi
10468
10469 fi
10470
10471 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10472 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10473     cat >> confdefs.h <<\EOF
10474 #define HAVE_NATIVE_ICONV 1
10475 EOF
10476
10477 fi
10478
10479
10480 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10481 echo "configure:10482: checking for Linux kernel oplocks" >&5
10482 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10483   echo $ac_n "(cached) $ac_c" 1>&6
10484 else
10485   
10486 if test "$cross_compiling" = yes; then
10487   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10488 else
10489   cat > conftest.$ac_ext <<EOF
10490 #line 10491 "configure"
10491 #include "confdefs.h"
10492
10493 #include <sys/types.h>
10494 #include <fcntl.h>
10495 #ifndef F_GETLEASE
10496 #define F_GETLEASE      1025
10497 #endif
10498 main() {
10499        int fd = open("/dev/null", O_RDONLY);
10500        return fcntl(fd, F_GETLEASE, 0) == -1;
10501 }
10502
10503 EOF
10504 if { (eval echo configure:10505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10505 then
10506   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10507 else
10508   echo "configure: failed program was:" >&5
10509   cat conftest.$ac_ext >&5
10510   rm -fr conftest*
10511   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10512 fi
10513 rm -fr conftest*
10514 fi
10515
10516 fi
10517
10518 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10519 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10520     cat >> confdefs.h <<\EOF
10521 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10522 EOF
10523
10524 fi
10525
10526 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10527 echo "configure:10528: checking for kernel change notify support" >&5
10528 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10529   echo $ac_n "(cached) $ac_c" 1>&6
10530 else
10531   
10532 if test "$cross_compiling" = yes; then
10533   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10534 else
10535   cat > conftest.$ac_ext <<EOF
10536 #line 10537 "configure"
10537 #include "confdefs.h"
10538
10539 #include <sys/types.h>
10540 #include <fcntl.h>
10541 #include <signal.h>
10542 #ifndef F_NOTIFY
10543 #define F_NOTIFY 1026
10544 #endif
10545 main() {
10546         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10547 }
10548
10549 EOF
10550 if { (eval echo configure:10551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10551 then
10552   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10553 else
10554   echo "configure: failed program was:" >&5
10555   cat conftest.$ac_ext >&5
10556   rm -fr conftest*
10557   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10558 fi
10559 rm -fr conftest*
10560 fi
10561
10562 fi
10563
10564 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10565 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes" && test x"$target_cpu" != x"s390"; then
10566     cat >> confdefs.h <<\EOF
10567 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10568 EOF
10569
10570 fi
10571
10572 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10573 echo "configure:10574: checking for kernel share modes" >&5
10574 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10575   echo $ac_n "(cached) $ac_c" 1>&6
10576 else
10577   
10578 if test "$cross_compiling" = yes; then
10579   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10580 else
10581   cat > conftest.$ac_ext <<EOF
10582 #line 10583 "configure"
10583 #include "confdefs.h"
10584
10585 #include <sys/types.h>
10586 #include <fcntl.h>
10587 #include <signal.h>
10588 #include <sys/file.h>
10589 #ifndef LOCK_MAND
10590 #define LOCK_MAND       32
10591 #define LOCK_READ       64
10592 #endif
10593 main() {
10594         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10595 }
10596
10597 EOF
10598 if { (eval echo configure:10599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10599 then
10600   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10601 else
10602   echo "configure: failed program was:" >&5
10603   cat conftest.$ac_ext >&5
10604   rm -fr conftest*
10605   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10606 fi
10607 rm -fr conftest*
10608 fi
10609
10610 fi
10611
10612 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10613 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10614     cat >> confdefs.h <<\EOF
10615 #define HAVE_KERNEL_SHARE_MODES 1
10616 EOF
10617
10618 fi
10619
10620
10621
10622
10623 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10624 echo "configure:10625: checking for IRIX kernel oplock type definitions" >&5
10625 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10626   echo $ac_n "(cached) $ac_c" 1>&6
10627 else
10628   
10629 cat > conftest.$ac_ext <<EOF
10630 #line 10631 "configure"
10631 #include "confdefs.h"
10632 #include <sys/types.h>
10633 #include <fcntl.h>
10634 int main() {
10635 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10636 ; return 0; }
10637 EOF
10638 if { (eval echo configure:10639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10639   rm -rf conftest*
10640   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10641 else
10642   echo "configure: failed program was:" >&5
10643   cat conftest.$ac_ext >&5
10644   rm -rf conftest*
10645   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10646 fi
10647 rm -f conftest*
10648 fi
10649
10650 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10651 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10652     cat >> confdefs.h <<\EOF
10653 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10654 EOF
10655
10656 fi
10657
10658 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10659 echo "configure:10660: checking for irix specific capabilities" >&5
10660 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10661   echo $ac_n "(cached) $ac_c" 1>&6
10662 else
10663   
10664 if test "$cross_compiling" = yes; then
10665   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10666 else
10667   cat > conftest.$ac_ext <<EOF
10668 #line 10669 "configure"
10669 #include "confdefs.h"
10670 #include <sys/types.h>
10671 #include <sys/capability.h>
10672 main() {
10673  cap_t cap;
10674  if ((cap = cap_get_proc()) == NULL)
10675    exit(1);
10676  cap->cap_effective |= CAP_NETWORK_MGT;
10677  cap->cap_inheritable |= CAP_NETWORK_MGT;
10678  cap_set_proc(cap);
10679  exit(0);
10680 }
10681
10682 EOF
10683 if { (eval echo configure:10684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10684 then
10685   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10686 else
10687   echo "configure: failed program was:" >&5
10688   cat conftest.$ac_ext >&5
10689   rm -fr conftest*
10690   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10691 fi
10692 rm -fr conftest*
10693 fi
10694
10695 fi
10696
10697 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10698 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10699     cat >> confdefs.h <<\EOF
10700 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10701 EOF
10702
10703 fi
10704
10705 #
10706 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10707 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10708 #
10709
10710 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10711 echo "configure:10712: checking for int16 typedef included by rpc/rpc.h" >&5
10712 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10713   echo $ac_n "(cached) $ac_c" 1>&6
10714 else
10715   
10716 cat > conftest.$ac_ext <<EOF
10717 #line 10718 "configure"
10718 #include "confdefs.h"
10719 #include <sys/types.h>
10720 #if defined(HAVE_RPC_RPC_H)
10721 #include <rpc/rpc.h>
10722 #endif
10723 int main() {
10724 int16 testvar;
10725 ; return 0; }
10726 EOF
10727 if { (eval echo configure:10728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10728   rm -rf conftest*
10729   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10730 else
10731   echo "configure: failed program was:" >&5
10732   cat conftest.$ac_ext >&5
10733   rm -rf conftest*
10734   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10735 fi
10736 rm -f conftest*
10737 fi
10738
10739 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10740 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10741     cat >> confdefs.h <<\EOF
10742 #define HAVE_INT16_FROM_RPC_RPC_H 1
10743 EOF
10744
10745 fi
10746
10747 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10748 echo "configure:10749: checking for uint16 typedef included by rpc/rpc.h" >&5
10749 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10750   echo $ac_n "(cached) $ac_c" 1>&6
10751 else
10752   
10753 cat > conftest.$ac_ext <<EOF
10754 #line 10755 "configure"
10755 #include "confdefs.h"
10756 #include <sys/types.h>
10757 #if defined(HAVE_RPC_RPC_H)
10758 #include <rpc/rpc.h>
10759 #endif
10760 int main() {
10761 uint16 testvar;
10762 ; return 0; }
10763 EOF
10764 if { (eval echo configure:10765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10765   rm -rf conftest*
10766   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10767 else
10768   echo "configure: failed program was:" >&5
10769   cat conftest.$ac_ext >&5
10770   rm -rf conftest*
10771   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10772 fi
10773 rm -f conftest*
10774 fi
10775
10776 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10777 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10778     cat >> confdefs.h <<\EOF
10779 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10780 EOF
10781
10782 fi
10783
10784 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10785 echo "configure:10786: checking for int32 typedef included by rpc/rpc.h" >&5
10786 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10787   echo $ac_n "(cached) $ac_c" 1>&6
10788 else
10789   
10790 cat > conftest.$ac_ext <<EOF
10791 #line 10792 "configure"
10792 #include "confdefs.h"
10793 #include <sys/types.h>
10794 #if defined(HAVE_RPC_RPC_H)
10795 #include <rpc/rpc.h>
10796 #endif
10797 int main() {
10798 int32 testvar;
10799 ; return 0; }
10800 EOF
10801 if { (eval echo configure:10802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10802   rm -rf conftest*
10803   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10804 else
10805   echo "configure: failed program was:" >&5
10806   cat conftest.$ac_ext >&5
10807   rm -rf conftest*
10808   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10809 fi
10810 rm -f conftest*
10811 fi
10812
10813 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10814 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10815     cat >> confdefs.h <<\EOF
10816 #define HAVE_INT32_FROM_RPC_RPC_H 1
10817 EOF
10818
10819 fi
10820
10821 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10822 echo "configure:10823: checking for uint32 typedef included by rpc/rpc.h" >&5
10823 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10824   echo $ac_n "(cached) $ac_c" 1>&6
10825 else
10826   
10827 cat > conftest.$ac_ext <<EOF
10828 #line 10829 "configure"
10829 #include "confdefs.h"
10830 #include <sys/types.h>
10831 #if defined(HAVE_RPC_RPC_H)
10832 #include <rpc/rpc.h>
10833 #endif
10834 int main() {
10835 uint32 testvar;
10836 ; return 0; }
10837 EOF
10838 if { (eval echo configure:10839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10839   rm -rf conftest*
10840   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10841 else
10842   echo "configure: failed program was:" >&5
10843   cat conftest.$ac_ext >&5
10844   rm -rf conftest*
10845   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10846 fi
10847 rm -f conftest*
10848 fi
10849
10850 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10851 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10852     cat >> confdefs.h <<\EOF
10853 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10854 EOF
10855
10856 fi
10857
10858
10859 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10860 echo "configure:10861: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10861 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10862   echo $ac_n "(cached) $ac_c" 1>&6
10863 else
10864   
10865 cat > conftest.$ac_ext <<EOF
10866 #line 10867 "configure"
10867 #include "confdefs.h"
10868 #include <sys/types.h>
10869 #ifdef HAVE_SYS_SECURITY_H
10870 #include <sys/security.h>
10871 #include <prot.h>
10872 #endif  /* HAVE_SYS_SECURITY_H */
10873 #if defined(HAVE_RPC_RPC_H)
10874 #include <rpc/rpc.h>
10875 #endif
10876 int main() {
10877 int testvar;
10878 ; return 0; }
10879 EOF
10880 if { (eval echo configure:10881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10881   rm -rf conftest*
10882   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10883 else
10884   echo "configure: failed program was:" >&5
10885   cat conftest.$ac_ext >&5
10886   rm -rf conftest*
10887   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10888 fi
10889 rm -f conftest*
10890 fi
10891
10892 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10893 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10894     cat >> confdefs.h <<\EOF
10895 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10896 EOF
10897
10898 fi
10899
10900 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10901 echo "configure:10902: checking for test routines" >&5
10902 if test "$cross_compiling" = yes; then
10903   echo "configure: warning: cannot run when cross-compiling" 1>&2
10904 else
10905   cat > conftest.$ac_ext <<EOF
10906 #line 10907 "configure"
10907 #include "confdefs.h"
10908 #include "${srcdir-.}/tests/trivial.c"
10909 EOF
10910 if { (eval echo configure:10911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10911 then
10912   echo "$ac_t""yes" 1>&6
10913 else
10914   echo "configure: failed program was:" >&5
10915   cat conftest.$ac_ext >&5
10916   rm -fr conftest*
10917   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10918 fi
10919 rm -fr conftest*
10920 fi
10921
10922
10923 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10924 echo "configure:10925: checking for ftruncate extend" >&5
10925 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10926   echo $ac_n "(cached) $ac_c" 1>&6
10927 else
10928   
10929 if test "$cross_compiling" = yes; then
10930   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10931 else
10932   cat > conftest.$ac_ext <<EOF
10933 #line 10934 "configure"
10934 #include "confdefs.h"
10935 #include "${srcdir-.}/tests/ftruncate.c"
10936 EOF
10937 if { (eval echo configure:10938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10938 then
10939   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10940 else
10941   echo "configure: failed program was:" >&5
10942   cat conftest.$ac_ext >&5
10943   rm -fr conftest*
10944   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10945 fi
10946 rm -fr conftest*
10947 fi
10948
10949 fi
10950
10951 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10952 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10953     cat >> confdefs.h <<\EOF
10954 #define HAVE_FTRUNCATE_EXTEND 1
10955 EOF
10956
10957 fi
10958
10959 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10960 echo "configure:10961: checking for AF_LOCAL socket support" >&5
10961 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10962   echo $ac_n "(cached) $ac_c" 1>&6
10963 else
10964   
10965 if test "$cross_compiling" = yes; then
10966   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10967 else
10968   cat > conftest.$ac_ext <<EOF
10969 #line 10970 "configure"
10970 #include "confdefs.h"
10971 #include "${srcdir-.}/tests/unixsock.c"
10972 EOF
10973 if { (eval echo configure:10974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10974 then
10975   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10976 else
10977   echo "configure: failed program was:" >&5
10978   cat conftest.$ac_ext >&5
10979   rm -fr conftest*
10980   samba_cv_HAVE_WORKING_AF_LOCAL=no
10981 fi
10982 rm -fr conftest*
10983 fi
10984
10985 fi
10986
10987 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10988 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10989 then
10990     cat >> confdefs.h <<\EOF
10991 #define HAVE_WORKING_AF_LOCAL 1
10992 EOF
10993
10994 fi
10995
10996 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10997 echo "configure:10998: checking for broken getgroups" >&5
10998 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10999   echo $ac_n "(cached) $ac_c" 1>&6
11000 else
11001   
11002 if test "$cross_compiling" = yes; then
11003   samba_cv_HAVE_BROKEN_GETGROUPS=cross
11004 else
11005   cat > conftest.$ac_ext <<EOF
11006 #line 11007 "configure"
11007 #include "confdefs.h"
11008 #include "${srcdir-.}/tests/getgroups.c"
11009 EOF
11010 if { (eval echo configure:11011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11011 then
11012   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11013 else
11014   echo "configure: failed program was:" >&5
11015   cat conftest.$ac_ext >&5
11016   rm -fr conftest*
11017   samba_cv_HAVE_BROKEN_GETGROUPS=no
11018 fi
11019 rm -fr conftest*
11020 fi
11021
11022 fi
11023
11024 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11025 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11026     cat >> confdefs.h <<\EOF
11027 #define HAVE_BROKEN_GETGROUPS 1
11028 EOF
11029
11030 fi
11031
11032 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11033 echo "configure:11034: checking whether getpass should be replaced" >&5
11034 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11035   echo $ac_n "(cached) $ac_c" 1>&6
11036 else
11037   
11038 SAVE_CPPFLAGS="$CPPFLAGS"
11039 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt  -I${srcdir-.}/smbwrapper"
11040 cat > conftest.$ac_ext <<EOF
11041 #line 11042 "configure"
11042 #include "confdefs.h"
11043
11044 #define REPLACE_GETPASS 1
11045 #define NO_CONFIG_H 1
11046 #define main dont_declare_main
11047 #include "${srcdir-.}/lib/getsmbpass.c"
11048 #undef main
11049
11050 int main() {
11051
11052 ; return 0; }
11053 EOF
11054 if { (eval echo configure:11055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11055   rm -rf conftest*
11056   samba_cv_REPLACE_GETPASS=yes
11057 else
11058   echo "configure: failed program was:" >&5
11059   cat conftest.$ac_ext >&5
11060   rm -rf conftest*
11061   samba_cv_REPLACE_GETPASS=no
11062 fi
11063 rm -f conftest*
11064 CPPFLAGS="$SAVE_CPPFLAGS"
11065
11066 fi
11067
11068 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11069 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11070         cat >> confdefs.h <<\EOF
11071 #define REPLACE_GETPASS 1
11072 EOF
11073
11074 fi
11075
11076 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11077 echo "configure:11078: checking for broken inet_ntoa" >&5
11078 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11079   echo $ac_n "(cached) $ac_c" 1>&6
11080 else
11081   
11082 if test "$cross_compiling" = yes; then
11083   samba_cv_REPLACE_INET_NTOA=cross
11084 else
11085   cat > conftest.$ac_ext <<EOF
11086 #line 11087 "configure"
11087 #include "confdefs.h"
11088
11089 #include <stdio.h>
11090 #include <sys/types.h>
11091 #include <netinet/in.h>
11092 #ifdef HAVE_ARPA_INET_H
11093 #include <arpa/inet.h>
11094 #endif
11095 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11096 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11097     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11098 exit(1);}
11099 EOF
11100 if { (eval echo configure:11101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11101 then
11102   samba_cv_REPLACE_INET_NTOA=yes
11103 else
11104   echo "configure: failed program was:" >&5
11105   cat conftest.$ac_ext >&5
11106   rm -fr conftest*
11107   samba_cv_REPLACE_INET_NTOA=no
11108 fi
11109 rm -fr conftest*
11110 fi
11111
11112 fi
11113
11114 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11115 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11116     cat >> confdefs.h <<\EOF
11117 #define REPLACE_INET_NTOA 1
11118 EOF
11119
11120 fi
11121
11122 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11123 echo "configure:11124: checking for secure mkstemp" >&5
11124 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11125   echo $ac_n "(cached) $ac_c" 1>&6
11126 else
11127   
11128 if test "$cross_compiling" = yes; then
11129   samba_cv_HAVE_SECURE_MKSTEMP=cross
11130 else
11131   cat > conftest.$ac_ext <<EOF
11132 #line 11133 "configure"
11133 #include "confdefs.h"
11134 #include <stdlib.h>
11135 #include <sys/types.h>
11136 #include <sys/stat.h>
11137 #include <unistd.h>
11138 main() { 
11139   struct stat st;
11140   char tpl[20]="/tmp/test.XXXXXX"; 
11141   int fd = mkstemp(tpl); 
11142   if (fd == -1) exit(1);
11143   unlink(tpl);
11144   if (fstat(fd, &st) != 0) exit(1);
11145   if ((st.st_mode & 0777) != 0600) exit(1);
11146   exit(0);
11147 }
11148 EOF
11149 if { (eval echo configure:11150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11150 then
11151   samba_cv_HAVE_SECURE_MKSTEMP=yes
11152 else
11153   echo "configure: failed program was:" >&5
11154   cat conftest.$ac_ext >&5
11155   rm -fr conftest*
11156   samba_cv_HAVE_SECURE_MKSTEMP=no
11157 fi
11158 rm -fr conftest*
11159 fi
11160
11161 fi
11162
11163 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11164 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11165     cat >> confdefs.h <<\EOF
11166 #define HAVE_SECURE_MKSTEMP 1
11167 EOF
11168
11169 fi
11170
11171 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11172 echo "configure:11173: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11173 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11174   echo $ac_n "(cached) $ac_c" 1>&6
11175 else
11176   
11177 if test "$cross_compiling" = yes; then
11178   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11179 else
11180   cat > conftest.$ac_ext <<EOF
11181 #line 11182 "configure"
11182 #include "confdefs.h"
11183 #include <unistd.h>
11184 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11185 EOF
11186 if { (eval echo configure:11187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11187 then
11188   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11189 else
11190   echo "configure: failed program was:" >&5
11191   cat conftest.$ac_ext >&5
11192   rm -fr conftest*
11193   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11194 fi
11195 rm -fr conftest*
11196 fi
11197
11198 fi
11199
11200 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11201 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11202     cat >> confdefs.h <<\EOF
11203 #define SYSCONF_SC_NGROUPS_MAX 1
11204 EOF
11205
11206 fi
11207
11208 echo $ac_n "checking for root""... $ac_c" 1>&6
11209 echo "configure:11210: checking for root" >&5
11210 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11211   echo $ac_n "(cached) $ac_c" 1>&6
11212 else
11213   
11214 if test "$cross_compiling" = yes; then
11215   samba_cv_HAVE_ROOT=cross
11216 else
11217   cat > conftest.$ac_ext <<EOF
11218 #line 11219 "configure"
11219 #include "confdefs.h"
11220 main() { exit(getuid() != 0); }
11221 EOF
11222 if { (eval echo configure:11223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11223 then
11224   samba_cv_HAVE_ROOT=yes
11225 else
11226   echo "configure: failed program was:" >&5
11227   cat conftest.$ac_ext >&5
11228   rm -fr conftest*
11229   samba_cv_HAVE_ROOT=no
11230 fi
11231 rm -fr conftest*
11232 fi
11233
11234 fi
11235
11236 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11237 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11238     cat >> confdefs.h <<\EOF
11239 #define HAVE_ROOT 1
11240 EOF
11241
11242 else
11243     echo "configure: warning: running as non-root will disable some tests" 1>&2
11244 fi
11245
11246 ##################
11247 # look for a method of finding the list of network interfaces
11248 iface=no;
11249 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11250 echo "configure:11251: checking for iface AIX" >&5
11251 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11252   echo $ac_n "(cached) $ac_c" 1>&6
11253 else
11254   
11255 if test "$cross_compiling" = yes; then
11256   samba_cv_HAVE_IFACE_AIX=cross
11257 else
11258   cat > conftest.$ac_ext <<EOF
11259 #line 11260 "configure"
11260 #include "confdefs.h"
11261
11262 #define HAVE_IFACE_AIX 1
11263 #define AUTOCONF_TEST 1
11264 #include "confdefs.h"
11265 #include "${srcdir-.}/lib/interfaces.c"
11266 EOF
11267 if { (eval echo configure:11268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11268 then
11269   samba_cv_HAVE_IFACE_AIX=yes
11270 else
11271   echo "configure: failed program was:" >&5
11272   cat conftest.$ac_ext >&5
11273   rm -fr conftest*
11274   samba_cv_HAVE_IFACE_AIX=no
11275 fi
11276 rm -fr conftest*
11277 fi
11278
11279 fi
11280
11281 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11282 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11283     iface=yes;cat >> confdefs.h <<\EOF
11284 #define HAVE_IFACE_AIX 1
11285 EOF
11286
11287 fi
11288
11289 if test $iface = no; then
11290 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11291 echo "configure:11292: checking for iface ifconf" >&5
11292 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11293   echo $ac_n "(cached) $ac_c" 1>&6
11294 else
11295   
11296 if test "$cross_compiling" = yes; then
11297   samba_cv_HAVE_IFACE_IFCONF=cross
11298 else
11299   cat > conftest.$ac_ext <<EOF
11300 #line 11301 "configure"
11301 #include "confdefs.h"
11302
11303 #define HAVE_IFACE_IFCONF 1
11304 #define AUTOCONF_TEST 1
11305 #include "confdefs.h"
11306 #include "${srcdir-.}/lib/interfaces.c"
11307 EOF
11308 if { (eval echo configure:11309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11309 then
11310   samba_cv_HAVE_IFACE_IFCONF=yes
11311 else
11312   echo "configure: failed program was:" >&5
11313   cat conftest.$ac_ext >&5
11314   rm -fr conftest*
11315   samba_cv_HAVE_IFACE_IFCONF=no
11316 fi
11317 rm -fr conftest*
11318 fi
11319
11320 fi
11321
11322 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11323 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11324     iface=yes;cat >> confdefs.h <<\EOF
11325 #define HAVE_IFACE_IFCONF 1
11326 EOF
11327
11328 fi
11329 fi
11330
11331 if test $iface = no; then
11332 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11333 echo "configure:11334: checking for iface ifreq" >&5
11334 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11335   echo $ac_n "(cached) $ac_c" 1>&6
11336 else
11337   
11338 if test "$cross_compiling" = yes; then
11339   samba_cv_HAVE_IFACE_IFREQ=cross
11340 else
11341   cat > conftest.$ac_ext <<EOF
11342 #line 11343 "configure"
11343 #include "confdefs.h"
11344
11345 #define HAVE_IFACE_IFREQ 1
11346 #define AUTOCONF_TEST 1
11347 #include "confdefs.h"
11348 #include "${srcdir-.}/lib/interfaces.c"
11349 EOF
11350 if { (eval echo configure:11351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11351 then
11352   samba_cv_HAVE_IFACE_IFREQ=yes
11353 else
11354   echo "configure: failed program was:" >&5
11355   cat conftest.$ac_ext >&5
11356   rm -fr conftest*
11357   samba_cv_HAVE_IFACE_IFREQ=no
11358 fi
11359 rm -fr conftest*
11360 fi
11361
11362 fi
11363
11364 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11365 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11366     iface=yes;cat >> confdefs.h <<\EOF
11367 #define HAVE_IFACE_IFREQ 1
11368 EOF
11369
11370 fi
11371 fi
11372
11373
11374 ################################################
11375 # look for a method of setting the effective uid
11376 seteuid=no;
11377 if test $seteuid = no; then
11378 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11379 echo "configure:11380: checking for setresuid" >&5
11380 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11381   echo $ac_n "(cached) $ac_c" 1>&6
11382 else
11383   
11384 if test "$cross_compiling" = yes; then
11385   samba_cv_USE_SETRESUID=cross
11386 else
11387   cat > conftest.$ac_ext <<EOF
11388 #line 11389 "configure"
11389 #include "confdefs.h"
11390
11391 #define AUTOCONF_TEST 1
11392 #define USE_SETRESUID 1
11393 #include "confdefs.h"
11394 #include "${srcdir-.}/lib/util_sec.c"
11395 EOF
11396 if { (eval echo configure:11397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11397 then
11398   samba_cv_USE_SETRESUID=yes
11399 else
11400   echo "configure: failed program was:" >&5
11401   cat conftest.$ac_ext >&5
11402   rm -fr conftest*
11403   samba_cv_USE_SETRESUID=no
11404 fi
11405 rm -fr conftest*
11406 fi
11407
11408 fi
11409
11410 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11411 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11412     seteuid=yes;cat >> confdefs.h <<\EOF
11413 #define USE_SETRESUID 1
11414 EOF
11415
11416 fi
11417 fi
11418
11419
11420 if test $seteuid = no; then
11421 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11422 echo "configure:11423: checking for setreuid" >&5
11423 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11424   echo $ac_n "(cached) $ac_c" 1>&6
11425 else
11426   
11427 if test "$cross_compiling" = yes; then
11428   samba_cv_USE_SETREUID=cross
11429 else
11430   cat > conftest.$ac_ext <<EOF
11431 #line 11432 "configure"
11432 #include "confdefs.h"
11433
11434 #define AUTOCONF_TEST 1
11435 #define USE_SETREUID 1
11436 #include "confdefs.h"
11437 #include "${srcdir-.}/lib/util_sec.c"
11438 EOF
11439 if { (eval echo configure:11440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11440 then
11441   samba_cv_USE_SETREUID=yes
11442 else
11443   echo "configure: failed program was:" >&5
11444   cat conftest.$ac_ext >&5
11445   rm -fr conftest*
11446   samba_cv_USE_SETREUID=no
11447 fi
11448 rm -fr conftest*
11449 fi
11450
11451 fi
11452
11453 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11454 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11455     seteuid=yes;cat >> confdefs.h <<\EOF
11456 #define USE_SETREUID 1
11457 EOF
11458
11459 fi
11460 fi
11461
11462 if test $seteuid = no; then
11463 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11464 echo "configure:11465: checking for seteuid" >&5
11465 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11466   echo $ac_n "(cached) $ac_c" 1>&6
11467 else
11468   
11469 if test "$cross_compiling" = yes; then
11470   samba_cv_USE_SETEUID=cross
11471 else
11472   cat > conftest.$ac_ext <<EOF
11473 #line 11474 "configure"
11474 #include "confdefs.h"
11475
11476 #define AUTOCONF_TEST 1
11477 #define USE_SETEUID 1
11478 #include "confdefs.h"
11479 #include "${srcdir-.}/lib/util_sec.c"
11480 EOF
11481 if { (eval echo configure:11482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11482 then
11483   samba_cv_USE_SETEUID=yes
11484 else
11485   echo "configure: failed program was:" >&5
11486   cat conftest.$ac_ext >&5
11487   rm -fr conftest*
11488   samba_cv_USE_SETEUID=no
11489 fi
11490 rm -fr conftest*
11491 fi
11492
11493 fi
11494
11495 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11496 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11497     seteuid=yes;cat >> confdefs.h <<\EOF
11498 #define USE_SETEUID 1
11499 EOF
11500
11501 fi
11502 fi
11503
11504 if test $seteuid = no; then
11505 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11506 echo "configure:11507: checking for setuidx" >&5
11507 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11508   echo $ac_n "(cached) $ac_c" 1>&6
11509 else
11510   
11511 if test "$cross_compiling" = yes; then
11512   samba_cv_USE_SETUIDX=cross
11513 else
11514   cat > conftest.$ac_ext <<EOF
11515 #line 11516 "configure"
11516 #include "confdefs.h"
11517
11518 #define AUTOCONF_TEST 1
11519 #define USE_SETUIDX 1
11520 #include "confdefs.h"
11521 #include "${srcdir-.}/lib/util_sec.c"
11522 EOF
11523 if { (eval echo configure:11524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11524 then
11525   samba_cv_USE_SETUIDX=yes
11526 else
11527   echo "configure: failed program was:" >&5
11528   cat conftest.$ac_ext >&5
11529   rm -fr conftest*
11530   samba_cv_USE_SETUIDX=no
11531 fi
11532 rm -fr conftest*
11533 fi
11534
11535 fi
11536
11537 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11538 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11539     seteuid=yes;cat >> confdefs.h <<\EOF
11540 #define USE_SETUIDX 1
11541 EOF
11542
11543 fi
11544 fi
11545
11546
11547 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11548 echo "configure:11549: checking for working mmap" >&5
11549 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11550   echo $ac_n "(cached) $ac_c" 1>&6
11551 else
11552   
11553 if test "$cross_compiling" = yes; then
11554   samba_cv_HAVE_MMAP=cross
11555 else
11556   cat > conftest.$ac_ext <<EOF
11557 #line 11558 "configure"
11558 #include "confdefs.h"
11559 #include "${srcdir-.}/tests/shared_mmap.c"
11560 EOF
11561 if { (eval echo configure:11562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11562 then
11563   samba_cv_HAVE_MMAP=yes
11564 else
11565   echo "configure: failed program was:" >&5
11566   cat conftest.$ac_ext >&5
11567   rm -fr conftest*
11568   samba_cv_HAVE_MMAP=no
11569 fi
11570 rm -fr conftest*
11571 fi
11572
11573 fi
11574
11575 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11576 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11577     cat >> confdefs.h <<\EOF
11578 #define HAVE_MMAP 1
11579 EOF
11580
11581 fi
11582
11583 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11584 echo "configure:11585: checking for ftruncate needs root" >&5
11585 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11586   echo $ac_n "(cached) $ac_c" 1>&6
11587 else
11588   
11589 if test "$cross_compiling" = yes; then
11590   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11591 else
11592   cat > conftest.$ac_ext <<EOF
11593 #line 11594 "configure"
11594 #include "confdefs.h"
11595 #include "${srcdir-.}/tests/ftruncroot.c"
11596 EOF
11597 if { (eval echo configure:11598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11598 then
11599   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11600 else
11601   echo "configure: failed program was:" >&5
11602   cat conftest.$ac_ext >&5
11603   rm -fr conftest*
11604   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11605 fi
11606 rm -fr conftest*
11607 fi
11608
11609 fi
11610
11611 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11612 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11613     cat >> confdefs.h <<\EOF
11614 #define FTRUNCATE_NEEDS_ROOT 1
11615 EOF
11616
11617 fi
11618
11619 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11620 echo "configure:11621: checking for fcntl locking" >&5
11621 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11622   echo $ac_n "(cached) $ac_c" 1>&6
11623 else
11624   
11625 if test "$cross_compiling" = yes; then
11626   samba_cv_HAVE_FCNTL_LOCK=cross
11627 else
11628   cat > conftest.$ac_ext <<EOF
11629 #line 11630 "configure"
11630 #include "confdefs.h"
11631 #include "${srcdir-.}/tests/fcntl_lock.c"
11632 EOF
11633 if { (eval echo configure:11634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11634 then
11635   samba_cv_HAVE_FCNTL_LOCK=yes
11636 else
11637   echo "configure: failed program was:" >&5
11638   cat conftest.$ac_ext >&5
11639   rm -fr conftest*
11640   samba_cv_HAVE_FCNTL_LOCK=no
11641 fi
11642 rm -fr conftest*
11643 fi
11644
11645 fi
11646
11647 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11648 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11649     cat >> confdefs.h <<\EOF
11650 #define HAVE_FCNTL_LOCK 1
11651 EOF
11652
11653 fi
11654
11655 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11656 echo "configure:11657: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11657 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11658   echo $ac_n "(cached) $ac_c" 1>&6
11659 else
11660   
11661 if test "$cross_compiling" = yes; then
11662   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11663 else
11664   cat > conftest.$ac_ext <<EOF
11665 #line 11666 "configure"
11666 #include "confdefs.h"
11667 #include "${srcdir-.}/tests/fcntl_lock64.c"
11668 EOF
11669 if { (eval echo configure:11670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11670 then
11671   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11672 else
11673   echo "configure: failed program was:" >&5
11674   cat conftest.$ac_ext >&5
11675   rm -fr conftest*
11676   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11677 fi
11678 rm -fr conftest*
11679 fi
11680
11681 fi
11682
11683 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11684 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11685     cat >> confdefs.h <<\EOF
11686 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11687 EOF
11688
11689
11690 else
11691
11692
11693   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11694 echo "configure:11695: checking for 64 bit fcntl locking" >&5
11695 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11696   echo $ac_n "(cached) $ac_c" 1>&6
11697 else
11698   
11699   if test "$cross_compiling" = yes; then
11700   samba_cv_HAVE_STRUCT_FLOCK64=cross
11701 else
11702   cat > conftest.$ac_ext <<EOF
11703 #line 11704 "configure"
11704 #include "confdefs.h"
11705
11706 #if defined(HAVE_UNISTD_H)
11707 #include <unistd.h>
11708 #endif
11709 #include <stdio.h>
11710 #include <stdlib.h>
11711
11712 #ifdef HAVE_FCNTL_H
11713 #include <fcntl.h>
11714 #endif
11715
11716 #ifdef HAVE_SYS_FCNTL_H
11717 #include <sys/fcntl.h>
11718 #endif
11719 main() { struct flock64 fl64;
11720 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11721 exit(0);
11722 #else
11723 exit(1);
11724 #endif
11725 }
11726 EOF
11727 if { (eval echo configure:11728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11728 then
11729   samba_cv_HAVE_STRUCT_FLOCK64=yes
11730 else
11731   echo "configure: failed program was:" >&5
11732   cat conftest.$ac_ext >&5
11733   rm -fr conftest*
11734   samba_cv_HAVE_STRUCT_FLOCK64=no
11735 fi
11736 rm -fr conftest*
11737 fi
11738
11739 fi
11740
11741 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11742
11743   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11744       cat >> confdefs.h <<\EOF
11745 #define HAVE_STRUCT_FLOCK64 1
11746 EOF
11747
11748   fi
11749 fi
11750
11751 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11752 echo "configure:11753: checking for st_blocks in struct stat" >&5
11753 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11754   echo $ac_n "(cached) $ac_c" 1>&6
11755 else
11756   
11757 cat > conftest.$ac_ext <<EOF
11758 #line 11759 "configure"
11759 #include "confdefs.h"
11760 #include <sys/types.h>
11761 #include <sys/stat.h>
11762 #include <unistd.h>
11763 int main() {
11764 struct stat st;  st.st_blocks = 0;
11765 ; return 0; }
11766 EOF
11767 if { (eval echo configure:11768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11768   rm -rf conftest*
11769   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11770 else
11771   echo "configure: failed program was:" >&5
11772   cat conftest.$ac_ext >&5
11773   rm -rf conftest*
11774   samba_cv_HAVE_STAT_ST_BLOCKS=no
11775 fi
11776 rm -f conftest*
11777 fi
11778
11779 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11780 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11781     cat >> confdefs.h <<\EOF
11782 #define HAVE_STAT_ST_BLOCKS 1
11783 EOF
11784
11785 fi 
11786
11787 case "$host_os" in
11788 *linux*)
11789 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11790 echo "configure:11791: checking for broken RedHat 7.2 system header files" >&5
11791 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11792   echo $ac_n "(cached) $ac_c" 1>&6
11793 else
11794   
11795 cat > conftest.$ac_ext <<EOF
11796 #line 11797 "configure"
11797 #include "confdefs.h"
11798
11799 #ifdef HAVE_SYS_VFS_H
11800 #include <sys/vfs.h>
11801 #endif
11802 #ifdef HAVE_SYS_CAPABILITY_H
11803 #include <sys/capability.h>
11804 #endif
11805
11806 int main() {
11807 int i;
11808 ; return 0; }
11809 EOF
11810 if { (eval echo configure:11811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11811   rm -rf conftest*
11812   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11813 else
11814   echo "configure: failed program was:" >&5
11815   cat conftest.$ac_ext >&5
11816   rm -rf conftest*
11817   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11818 fi
11819 rm -f conftest*
11820 fi
11821
11822 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11823 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11824    cat >> confdefs.h <<\EOF
11825 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11826 EOF
11827
11828 fi
11829 ;;
11830 esac
11831
11832 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11833 echo "configure:11834: checking for broken nisplus include files" >&5
11834 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11835   echo $ac_n "(cached) $ac_c" 1>&6
11836 else
11837   
11838 cat > conftest.$ac_ext <<EOF
11839 #line 11840 "configure"
11840 #include "confdefs.h"
11841 #include <sys/acl.h>
11842 #if defined(HAVE_RPCSVC_NIS_H)
11843 #include <rpcsvc/nis.h>
11844 #endif
11845 int main() {
11846 int i;
11847 ; return 0; }
11848 EOF
11849 if { (eval echo configure:11850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11850   rm -rf conftest*
11851   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11852 else
11853   echo "configure: failed program was:" >&5
11854   cat conftest.$ac_ext >&5
11855   rm -rf conftest*
11856   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11857 fi
11858 rm -f conftest*
11859 fi
11860
11861 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11862 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11863     cat >> confdefs.h <<\EOF
11864 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11865 EOF
11866
11867 fi
11868
11869
11870 #################################################
11871 # check for smbwrapper support
11872 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11873 echo "configure:11874: checking whether to use smbwrapper" >&5
11874 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11875 if test "${with_smbwrapper+set}" = set; then
11876   withval="$with_smbwrapper"
11877    case "$withval" in
11878   yes)
11879     echo "$ac_t""yes" 1>&6
11880     cat >> confdefs.h <<\EOF
11881 #define WITH_SMBWRAPPER 1
11882 EOF
11883
11884         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11885
11886         if test x$ATTEMPT_WRAP32_BUILD = x; then
11887                 WRAP32=""
11888         else
11889                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11890         fi
11891
11892 # Conditions under which smbwrapper should not be built.
11893
11894         if test x$PICFLAG = x; then
11895            echo No support for PIC code - disabling smbwrapper and smbsh
11896            WRAP=""
11897            WRAP32=""
11898         elif test x$ac_cv_func_syscall = xno; then
11899            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11900            WRAP=""
11901            WRAP32=""
11902         fi
11903     ;;
11904   *)
11905     echo "$ac_t""no" 1>&6
11906     ;;
11907   esac 
11908 else
11909   echo "$ac_t""no" 1>&6
11910
11911 fi
11912
11913
11914 #################################################
11915 # check for AFS clear-text auth support
11916 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11917 echo "configure:11918: checking whether to use AFS clear-text auth" >&5
11918 # Check whether --with-afs or --without-afs was given.
11919 if test "${with_afs+set}" = set; then
11920   withval="$with_afs"
11921    case "$withval" in
11922   yes)
11923     echo "$ac_t""yes" 1>&6
11924     cat >> confdefs.h <<\EOF
11925 #define WITH_AFS 1
11926 EOF
11927
11928     ;;
11929   *)
11930     echo "$ac_t""no" 1>&6
11931     ;;
11932   esac 
11933 else
11934   echo "$ac_t""no" 1>&6
11935
11936 fi
11937
11938
11939
11940 #################################################
11941 # check for the DFS clear-text auth system
11942 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11943 echo "configure:11944: checking whether to use DFS clear-text auth" >&5
11944 # Check whether --with-dfs or --without-dfs was given.
11945 if test "${with_dfs+set}" = set; then
11946   withval="$with_dfs"
11947    case "$withval" in
11948   yes)
11949     echo "$ac_t""yes" 1>&6
11950     cat >> confdefs.h <<\EOF
11951 #define WITH_DFS 1
11952 EOF
11953
11954     ;;
11955   *)
11956     echo "$ac_t""no" 1>&6
11957     ;;
11958   esac 
11959 else
11960   echo "$ac_t""no" 1>&6
11961
11962 fi
11963
11964
11965
11966 #################################################
11967 # see if this box has the RedHat location for kerberos
11968 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11969 echo "configure:11970: checking for /usr/kerberos" >&5
11970 if test -d /usr/kerberos; then
11971     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11972     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11973     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11974     echo "$ac_t""yes" 1>&6
11975 else
11976     echo "$ac_t""no" 1>&6
11977 fi
11978
11979 #################################################
11980 # check for location of Kerberos 5 install
11981 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11982 echo "configure:11983: checking for kerberos 5 install path" >&5
11983 # Check whether --with-krb5 or --without-krb5 was given.
11984 if test "${with_krb5+set}" = set; then
11985   withval="$with_krb5"
11986    case "$withval" in
11987   no)
11988     echo "$ac_t""no" 1>&6
11989     ;;
11990   *)
11991     echo "$ac_t""yes" 1>&6
11992     LIBS="$LIBS -lkrb5"
11993     CFLAGS="$CFLAGS -I$withval/include"
11994     CPPFLAGS="$CPPFLAGS -I$withval/include"
11995     LDFLAGS="$LDFLAGS -L$withval/lib"
11996     ;;
11997   esac 
11998 else
11999   echo "$ac_t""no" 1>&6
12000
12001 fi
12002
12003
12004 # now check for krb5.h. Some systems have the libraries without the headers!
12005 # note that this check is done here to allow for different kerberos
12006 # include paths
12007 for ac_hdr in krb5.h
12008 do
12009 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12010 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12011 echo "configure:12012: checking for $ac_hdr" >&5
12012 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12013   echo $ac_n "(cached) $ac_c" 1>&6
12014 else
12015   cat > conftest.$ac_ext <<EOF
12016 #line 12017 "configure"
12017 #include "confdefs.h"
12018 #include <$ac_hdr>
12019 EOF
12020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12021 { (eval echo configure:12022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12023 if test -z "$ac_err"; then
12024   rm -rf conftest*
12025   eval "ac_cv_header_$ac_safe=yes"
12026 else
12027   echo "$ac_err" >&5
12028   echo "configure: failed program was:" >&5
12029   cat conftest.$ac_ext >&5
12030   rm -rf conftest*
12031   eval "ac_cv_header_$ac_safe=no"
12032 fi
12033 rm -f conftest*
12034 fi
12035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12036   echo "$ac_t""yes" 1>&6
12037     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12038   cat >> confdefs.h <<EOF
12039 #define $ac_tr_hdr 1
12040 EOF
12041  
12042 else
12043   echo "$ac_t""no" 1>&6
12044 fi
12045 done
12046
12047
12048 # now check for gssapi headers.  This is also done here to allow for
12049 # different kerberos include paths
12050 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12051 do
12052 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12053 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12054 echo "configure:12055: checking for $ac_hdr" >&5
12055 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12056   echo $ac_n "(cached) $ac_c" 1>&6
12057 else
12058   cat > conftest.$ac_ext <<EOF
12059 #line 12060 "configure"
12060 #include "confdefs.h"
12061 #include <$ac_hdr>
12062 EOF
12063 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12064 { (eval echo configure:12065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12065 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12066 if test -z "$ac_err"; then
12067   rm -rf conftest*
12068   eval "ac_cv_header_$ac_safe=yes"
12069 else
12070   echo "$ac_err" >&5
12071   echo "configure: failed program was:" >&5
12072   cat conftest.$ac_ext >&5
12073   rm -rf conftest*
12074   eval "ac_cv_header_$ac_safe=no"
12075 fi
12076 rm -f conftest*
12077 fi
12078 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12079   echo "$ac_t""yes" 1>&6
12080     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12081   cat >> confdefs.h <<EOF
12082 #define $ac_tr_hdr 1
12083 EOF
12084  
12085 else
12086   echo "$ac_t""no" 1>&6
12087 fi
12088 done
12089
12090
12091 ##################################################################
12092 # we might need the k5crypto and com_err libraries on some systems
12093 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12094 echo "configure:12095: checking for _et_list in -lcom_err" >&5
12095 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12096 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12097   echo $ac_n "(cached) $ac_c" 1>&6
12098 else
12099   ac_save_LIBS="$LIBS"
12100 LIBS="-lcom_err  $LIBS"
12101 cat > conftest.$ac_ext <<EOF
12102 #line 12103 "configure"
12103 #include "confdefs.h"
12104 /* Override any gcc2 internal prototype to avoid an error.  */
12105 /* We use char because int might match the return type of a gcc2
12106     builtin and then its argument prototype would still apply.  */
12107 char _et_list();
12108
12109 int main() {
12110 _et_list()
12111 ; return 0; }
12112 EOF
12113 if { (eval echo configure:12114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12114   rm -rf conftest*
12115   eval "ac_cv_lib_$ac_lib_var=yes"
12116 else
12117   echo "configure: failed program was:" >&5
12118   cat conftest.$ac_ext >&5
12119   rm -rf conftest*
12120   eval "ac_cv_lib_$ac_lib_var=no"
12121 fi
12122 rm -f conftest*
12123 LIBS="$ac_save_LIBS"
12124
12125 fi
12126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12127   echo "$ac_t""yes" 1>&6
12128   LIBS="$LIBS -lcom_err"
12129 else
12130   echo "$ac_t""no" 1>&6
12131 fi
12132
12133 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12134 echo "configure:12135: checking for krb5_encrypt_data in -lk5crypto" >&5
12135 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12136 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12137   echo $ac_n "(cached) $ac_c" 1>&6
12138 else
12139   ac_save_LIBS="$LIBS"
12140 LIBS="-lk5crypto  $LIBS"
12141 cat > conftest.$ac_ext <<EOF
12142 #line 12143 "configure"
12143 #include "confdefs.h"
12144 /* Override any gcc2 internal prototype to avoid an error.  */
12145 /* We use char because int might match the return type of a gcc2
12146     builtin and then its argument prototype would still apply.  */
12147 char krb5_encrypt_data();
12148
12149 int main() {
12150 krb5_encrypt_data()
12151 ; return 0; }
12152 EOF
12153 if { (eval echo configure:12154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12154   rm -rf conftest*
12155   eval "ac_cv_lib_$ac_lib_var=yes"
12156 else
12157   echo "configure: failed program was:" >&5
12158   cat conftest.$ac_ext >&5
12159   rm -rf conftest*
12160   eval "ac_cv_lib_$ac_lib_var=no"
12161 fi
12162 rm -f conftest*
12163 LIBS="$ac_save_LIBS"
12164
12165 fi
12166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12167   echo "$ac_t""yes" 1>&6
12168   LIBS="$LIBS -lk5crypto"
12169 else
12170   echo "$ac_t""no" 1>&6
12171 fi
12172
12173
12174 ########################################################
12175 # now see if we can find the krb5 libs in standard paths
12176 # or as specified above
12177 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12178 echo "configure:12179: checking for krb5_mk_req_extended in -lkrb5" >&5
12179 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12180 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12181   echo $ac_n "(cached) $ac_c" 1>&6
12182 else
12183   ac_save_LIBS="$LIBS"
12184 LIBS="-lkrb5  $LIBS"
12185 cat > conftest.$ac_ext <<EOF
12186 #line 12187 "configure"
12187 #include "confdefs.h"
12188 /* Override any gcc2 internal prototype to avoid an error.  */
12189 /* We use char because int might match the return type of a gcc2
12190     builtin and then its argument prototype would still apply.  */
12191 char krb5_mk_req_extended();
12192
12193 int main() {
12194 krb5_mk_req_extended()
12195 ; return 0; }
12196 EOF
12197 if { (eval echo configure:12198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12198   rm -rf conftest*
12199   eval "ac_cv_lib_$ac_lib_var=yes"
12200 else
12201   echo "configure: failed program was:" >&5
12202   cat conftest.$ac_ext >&5
12203   rm -rf conftest*
12204   eval "ac_cv_lib_$ac_lib_var=no"
12205 fi
12206 rm -f conftest*
12207 LIBS="$ac_save_LIBS"
12208
12209 fi
12210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12211   echo "$ac_t""yes" 1>&6
12212   LIBS="$LIBS -lkrb5";
12213         cat >> confdefs.h <<\EOF
12214 #define HAVE_KRB5 1
12215 EOF
12216
12217 else
12218   echo "$ac_t""no" 1>&6
12219 fi
12220
12221
12222 ########################################################
12223 # now see if we can find the gssapi libs in standard paths
12224 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12225 echo "configure:12226: checking for gss_display_status in -lgssapi_krb5" >&5
12226 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12227 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12228   echo $ac_n "(cached) $ac_c" 1>&6
12229 else
12230   ac_save_LIBS="$LIBS"
12231 LIBS="-lgssapi_krb5  $LIBS"
12232 cat > conftest.$ac_ext <<EOF
12233 #line 12234 "configure"
12234 #include "confdefs.h"
12235 /* Override any gcc2 internal prototype to avoid an error.  */
12236 /* We use char because int might match the return type of a gcc2
12237     builtin and then its argument prototype would still apply.  */
12238 char gss_display_status();
12239
12240 int main() {
12241 gss_display_status()
12242 ; return 0; }
12243 EOF
12244 if { (eval echo configure:12245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12245   rm -rf conftest*
12246   eval "ac_cv_lib_$ac_lib_var=yes"
12247 else
12248   echo "configure: failed program was:" >&5
12249   cat conftest.$ac_ext >&5
12250   rm -rf conftest*
12251   eval "ac_cv_lib_$ac_lib_var=no"
12252 fi
12253 rm -f conftest*
12254 LIBS="$ac_save_LIBS"
12255
12256 fi
12257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12258   echo "$ac_t""yes" 1>&6
12259   LIBS="$LIBS -lgssapi_krb5";
12260         cat >> confdefs.h <<\EOF
12261 #define HAVE_GSSAPI 1
12262 EOF
12263
12264 else
12265   echo "$ac_t""no" 1>&6
12266 fi
12267
12268
12269 ##################################################################
12270 # we might need the lber lib on some systems. To avoid link errors
12271 # this test must be before the libldap test
12272 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12273 echo "configure:12274: checking for ber_scanf in -llber" >&5
12274 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12275 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12276   echo $ac_n "(cached) $ac_c" 1>&6
12277 else
12278   ac_save_LIBS="$LIBS"
12279 LIBS="-llber  $LIBS"
12280 cat > conftest.$ac_ext <<EOF
12281 #line 12282 "configure"
12282 #include "confdefs.h"
12283 /* Override any gcc2 internal prototype to avoid an error.  */
12284 /* We use char because int might match the return type of a gcc2
12285     builtin and then its argument prototype would still apply.  */
12286 char ber_scanf();
12287
12288 int main() {
12289 ber_scanf()
12290 ; return 0; }
12291 EOF
12292 if { (eval echo configure:12293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12293   rm -rf conftest*
12294   eval "ac_cv_lib_$ac_lib_var=yes"
12295 else
12296   echo "configure: failed program was:" >&5
12297   cat conftest.$ac_ext >&5
12298   rm -rf conftest*
12299   eval "ac_cv_lib_$ac_lib_var=no"
12300 fi
12301 rm -f conftest*
12302 LIBS="$ac_save_LIBS"
12303
12304 fi
12305 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12306   echo "$ac_t""yes" 1>&6
12307   LIBS="$LIBS -llber"
12308 else
12309   echo "$ac_t""no" 1>&6
12310 fi
12311
12312
12313 ########################################################
12314 # now see if we can find the ldap libs in standard paths
12315 if test x$have_ldap != xyes; then
12316 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12317 echo "configure:12318: checking for ldap_domain2hostlist in -lldap" >&5
12318 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12319 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12320   echo $ac_n "(cached) $ac_c" 1>&6
12321 else
12322   ac_save_LIBS="$LIBS"
12323 LIBS="-lldap  $LIBS"
12324 cat > conftest.$ac_ext <<EOF
12325 #line 12326 "configure"
12326 #include "confdefs.h"
12327 /* Override any gcc2 internal prototype to avoid an error.  */
12328 /* We use char because int might match the return type of a gcc2
12329     builtin and then its argument prototype would still apply.  */
12330 char ldap_domain2hostlist();
12331
12332 int main() {
12333 ldap_domain2hostlist()
12334 ; return 0; }
12335 EOF
12336 if { (eval echo configure:12337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12337   rm -rf conftest*
12338   eval "ac_cv_lib_$ac_lib_var=yes"
12339 else
12340   echo "configure: failed program was:" >&5
12341   cat conftest.$ac_ext >&5
12342   rm -rf conftest*
12343   eval "ac_cv_lib_$ac_lib_var=no"
12344 fi
12345 rm -f conftest*
12346 LIBS="$ac_save_LIBS"
12347
12348 fi
12349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12350   echo "$ac_t""yes" 1>&6
12351   LIBS="$LIBS -lldap";
12352         cat >> confdefs.h <<\EOF
12353 #define HAVE_LDAP 1
12354 EOF
12355
12356 else
12357   echo "$ac_t""no" 1>&6
12358 fi
12359
12360
12361         ########################################################
12362         # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
12363         # Check found in pam_ldap 145.
12364         for ac_func in ldap_set_rebind_proc
12365 do
12366 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12367 echo "configure:12368: checking for $ac_func" >&5
12368 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12369   echo $ac_n "(cached) $ac_c" 1>&6
12370 else
12371   cat > conftest.$ac_ext <<EOF
12372 #line 12373 "configure"
12373 #include "confdefs.h"
12374 /* System header to define __stub macros and hopefully few prototypes,
12375     which can conflict with char $ac_func(); below.  */
12376 #include <assert.h>
12377 /* Override any gcc2 internal prototype to avoid an error.  */
12378 /* We use char because int might match the return type of a gcc2
12379     builtin and then its argument prototype would still apply.  */
12380 char $ac_func();
12381
12382 int main() {
12383
12384 /* The GNU C library defines this for functions which it implements
12385     to always fail with ENOSYS.  Some functions are actually named
12386     something starting with __ and the normal name is an alias.  */
12387 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12388 choke me
12389 #else
12390 $ac_func();
12391 #endif
12392
12393 ; return 0; }
12394 EOF
12395 if { (eval echo configure:12396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12396   rm -rf conftest*
12397   eval "ac_cv_func_$ac_func=yes"
12398 else
12399   echo "configure: failed program was:" >&5
12400   cat conftest.$ac_ext >&5
12401   rm -rf conftest*
12402   eval "ac_cv_func_$ac_func=no"
12403 fi
12404 rm -f conftest*
12405 fi
12406
12407 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12408   echo "$ac_t""yes" 1>&6
12409     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12410   cat >> confdefs.h <<EOF
12411 #define $ac_tr_func 1
12412 EOF
12413  
12414 else
12415   echo "$ac_t""no" 1>&6
12416 fi
12417 done
12418
12419         echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6
12420 echo "configure:12421: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
12421 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then
12422   echo $ac_n "(cached) $ac_c" 1>&6
12423 else
12424   
12425         cat > conftest.$ac_ext <<EOF
12426 #line 12427 "configure"
12427 #include "confdefs.h"
12428
12429         #include <lber.h>
12430         #include <ldap.h>
12431 int main() {
12432 ldap_set_rebind_proc(0, 0, 0);
12433 ; return 0; }
12434 EOF
12435 if { (eval echo configure:12436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12436   rm -rf conftest*
12437   pam_ldap_cv_ldap_set_rebind_proc=3
12438 else
12439   echo "configure: failed program was:" >&5
12440   cat conftest.$ac_ext >&5
12441   rm -rf conftest*
12442   pam_ldap_cv_ldap_set_rebind_proc=2
12443 fi
12444 rm -f conftest* 
12445 fi
12446
12447 echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6
12448         cat >> confdefs.h <<EOF
12449 #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc
12450 EOF
12451
12452 fi
12453
12454 #################################################
12455 # check for automount support
12456 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12457 echo "configure:12458: checking whether to use AUTOMOUNT" >&5
12458 # Check whether --with-automount or --without-automount was given.
12459 if test "${with_automount+set}" = set; then
12460   withval="$with_automount"
12461    case "$withval" in
12462   yes)
12463     echo "$ac_t""yes" 1>&6
12464     cat >> confdefs.h <<\EOF
12465 #define WITH_AUTOMOUNT 1
12466 EOF
12467
12468     ;;
12469   *)
12470     echo "$ac_t""no" 1>&6
12471     ;;
12472   esac 
12473 else
12474   echo "$ac_t""no" 1>&6
12475
12476 fi
12477
12478
12479 #################################################
12480 # check for smbmount support
12481 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12482 echo "configure:12483: checking whether to use SMBMOUNT" >&5
12483 # Check whether --with-smbmount or --without-smbmount was given.
12484 if test "${with_smbmount+set}" = set; then
12485   withval="$with_smbmount"
12486    case "$withval" in
12487   yes)
12488         case "$host_os" in
12489         *linux*)
12490                 echo "$ac_t""yes" 1>&6
12491                 cat >> confdefs.h <<\EOF
12492 #define WITH_SMBMOUNT 1
12493 EOF
12494
12495                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12496                 ;;
12497         *)
12498                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12499                 ;;
12500         esac
12501     ;;
12502   *)
12503     echo "$ac_t""no" 1>&6
12504     MPROGS=
12505     ;;
12506   esac 
12507 else
12508   echo "$ac_t""no" 1>&6
12509   MPROGS=
12510
12511 fi
12512
12513
12514
12515 #################################################
12516 # check for a PAM clear-text auth, accounts, password and session support
12517 with_pam_for_crypt=no
12518 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12519 echo "configure:12520: checking whether to use PAM" >&5
12520 # Check whether --with-pam or --without-pam was given.
12521 if test "${with_pam+set}" = set; then
12522   withval="$with_pam"
12523    case "$withval" in
12524   yes)
12525     echo "$ac_t""yes" 1>&6
12526     cat >> confdefs.h <<\EOF
12527 #define WITH_PAM 1
12528 EOF
12529
12530     LIBS="$LIBS -lpam"
12531     with_pam_for_crypt=yes
12532     ;;
12533   *)
12534     echo "$ac_t""no" 1>&6
12535     ;;
12536   esac 
12537 else
12538   echo "$ac_t""no" 1>&6
12539
12540 fi
12541
12542
12543 # we can't build a pam module if we don't have pam.
12544 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12545 echo "configure:12546: checking for pam_get_data in -lpam" >&5
12546 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12547 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12548   echo $ac_n "(cached) $ac_c" 1>&6
12549 else
12550   ac_save_LIBS="$LIBS"
12551 LIBS="-lpam  $LIBS"
12552 cat > conftest.$ac_ext <<EOF
12553 #line 12554 "configure"
12554 #include "confdefs.h"
12555 /* Override any gcc2 internal prototype to avoid an error.  */
12556 /* We use char because int might match the return type of a gcc2
12557     builtin and then its argument prototype would still apply.  */
12558 char pam_get_data();
12559
12560 int main() {
12561 pam_get_data()
12562 ; return 0; }
12563 EOF
12564 if { (eval echo configure:12565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12565   rm -rf conftest*
12566   eval "ac_cv_lib_$ac_lib_var=yes"
12567 else
12568   echo "configure: failed program was:" >&5
12569   cat conftest.$ac_ext >&5
12570   rm -rf conftest*
12571   eval "ac_cv_lib_$ac_lib_var=no"
12572 fi
12573 rm -f conftest*
12574 LIBS="$ac_save_LIBS"
12575
12576 fi
12577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12578   echo "$ac_t""yes" 1>&6
12579   cat >> confdefs.h <<\EOF
12580 #define HAVE_LIBPAM 1
12581 EOF
12582
12583 else
12584   echo "$ac_t""no" 1>&6
12585 fi
12586
12587
12588 #################################################
12589 # check for pam_smbpass support
12590 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12591 echo "configure:12592: checking whether to use pam_smbpass" >&5
12592 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12593 if test "${with_pam_smbpass+set}" = set; then
12594   withval="$with_pam_smbpass"
12595    case "$withval" in
12596   yes)
12597     echo "$ac_t""yes" 1>&6
12598
12599 # Conditions under which pam_smbpass should not be built.
12600
12601        if test x$PICFLAG = x; then
12602           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12603           PAM_MOD=""
12604        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12605           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12606           PAM_MOD=""
12607        else
12608           PAM_MOD="bin/pam_smbpass.so"
12609        fi
12610     ;;
12611   *)
12612     echo "$ac_t""no" 1>&6
12613     ;;
12614   esac 
12615 else
12616   echo "$ac_t""no" 1>&6
12617
12618 fi
12619
12620
12621
12622 ###############################################
12623 # test for where we get crypt() from, but only
12624 # if not using PAM
12625 if test $with_pam_for_crypt = no; then
12626 for ac_func in crypt
12627 do
12628 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12629 echo "configure:12630: checking for $ac_func" >&5
12630 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12631   echo $ac_n "(cached) $ac_c" 1>&6
12632 else
12633   cat > conftest.$ac_ext <<EOF
12634 #line 12635 "configure"
12635 #include "confdefs.h"
12636 /* System header to define __stub macros and hopefully few prototypes,
12637     which can conflict with char $ac_func(); below.  */
12638 #include <assert.h>
12639 /* Override any gcc2 internal prototype to avoid an error.  */
12640 /* We use char because int might match the return type of a gcc2
12641     builtin and then its argument prototype would still apply.  */
12642 char $ac_func();
12643
12644 int main() {
12645
12646 /* The GNU C library defines this for functions which it implements
12647     to always fail with ENOSYS.  Some functions are actually named
12648     something starting with __ and the normal name is an alias.  */
12649 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12650 choke me
12651 #else
12652 $ac_func();
12653 #endif
12654
12655 ; return 0; }
12656 EOF
12657 if { (eval echo configure:12658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12658   rm -rf conftest*
12659   eval "ac_cv_func_$ac_func=yes"
12660 else
12661   echo "configure: failed program was:" >&5
12662   cat conftest.$ac_ext >&5
12663   rm -rf conftest*
12664   eval "ac_cv_func_$ac_func=no"
12665 fi
12666 rm -f conftest*
12667 fi
12668
12669 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12670   echo "$ac_t""yes" 1>&6
12671     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12672   cat >> confdefs.h <<EOF
12673 #define $ac_tr_func 1
12674 EOF
12675  
12676 else
12677   echo "$ac_t""no" 1>&6
12678 fi
12679 done
12680
12681 if test x"$ac_cv_func_crypt" = x"no"; then
12682     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12683 echo "configure:12684: checking for crypt in -lcrypt" >&5
12684 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12685 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12686   echo $ac_n "(cached) $ac_c" 1>&6
12687 else
12688   ac_save_LIBS="$LIBS"
12689 LIBS="-lcrypt  $LIBS"
12690 cat > conftest.$ac_ext <<EOF
12691 #line 12692 "configure"
12692 #include "confdefs.h"
12693 /* Override any gcc2 internal prototype to avoid an error.  */
12694 /* We use char because int might match the return type of a gcc2
12695     builtin and then its argument prototype would still apply.  */
12696 char crypt();
12697
12698 int main() {
12699 crypt()
12700 ; return 0; }
12701 EOF
12702 if { (eval echo configure:12703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12703   rm -rf conftest*
12704   eval "ac_cv_lib_$ac_lib_var=yes"
12705 else
12706   echo "configure: failed program was:" >&5
12707   cat conftest.$ac_ext >&5
12708   rm -rf conftest*
12709   eval "ac_cv_lib_$ac_lib_var=no"
12710 fi
12711 rm -f conftest*
12712 LIBS="$ac_save_LIBS"
12713
12714 fi
12715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12716   echo "$ac_t""yes" 1>&6
12717   LIBS="$LIBS -lcrypt";
12718         cat >> confdefs.h <<\EOF
12719 #define HAVE_CRYPT 1
12720 EOF
12721
12722 else
12723   echo "$ac_t""no" 1>&6
12724 fi
12725
12726 fi
12727 fi
12728
12729 ##
12730 ## moved after the check for -lcrypt in order to
12731 ## ensure that the necessary libraries are included
12732 ## check checking for truncated salt.  Wrapped by the
12733 ## $with_pam_for_crypt variable as above   --jerry
12734 ##
12735 if test $with_pam_for_crypt = no; then
12736 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12737 echo "configure:12738: checking for a crypt that needs truncated salt" >&5
12738 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12739   echo $ac_n "(cached) $ac_c" 1>&6
12740 else
12741   
12742 if test "$cross_compiling" = yes; then
12743   samba_cv_HAVE_TRUNCATED_SALT=cross
12744 else
12745   cat > conftest.$ac_ext <<EOF
12746 #line 12747 "configure"
12747 #include "confdefs.h"
12748 #include "${srcdir-.}/tests/crypttest.c"
12749 EOF
12750 if { (eval echo configure:12751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12751 then
12752   samba_cv_HAVE_TRUNCATED_SALT=no
12753 else
12754   echo "configure: failed program was:" >&5
12755   cat conftest.$ac_ext >&5
12756   rm -fr conftest*
12757   samba_cv_HAVE_TRUNCATED_SALT=yes
12758 fi
12759 rm -fr conftest*
12760 fi
12761
12762 fi
12763
12764 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12765 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12766         cat >> confdefs.h <<\EOF
12767 #define HAVE_TRUNCATED_SALT 1
12768 EOF
12769
12770 fi
12771 fi
12772
12773
12774
12775 ########################################################################################
12776 ##
12777 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12778 ##
12779 ########################################################################################
12780
12781 #################################################
12782 # check for a TDB password database
12783 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12784 echo "configure:12785: checking whether to use TDB SAM database" >&5
12785 # Check whether --with-tdbsam or --without-tdbsam was given.
12786 if test "${with_tdbsam+set}" = set; then
12787   withval="$with_tdbsam"
12788    case "$withval" in
12789   yes)
12790     echo "$ac_t""yes" 1>&6
12791     cat >> confdefs.h <<\EOF
12792 #define WITH_TDB_SAM 1
12793 EOF
12794
12795     ;;
12796   *)
12797     echo "$ac_t""no" 1>&6
12798     ;;
12799   esac 
12800 else
12801   echo "$ac_t""no" 1>&6
12802
12803 fi
12804
12805
12806 #################################################
12807 # check for a NISPLUS password database
12808 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12809 echo "configure:12810: checking whether to use NISPLUS SAM database" >&5
12810 # Check whether --with-nisplussam or --without-nisplussam was given.
12811 if test "${with_nisplussam+set}" = set; then
12812   withval="$with_nisplussam"
12813    case "$withval" in
12814   yes)
12815     echo "$ac_t""yes" 1>&6
12816     cat >> confdefs.h <<\EOF
12817 #define WITH_NISPLUS_SAM 1
12818 EOF
12819
12820     ;;
12821   *)
12822     echo "$ac_t""no" 1>&6
12823     ;;
12824   esac 
12825 else
12826   echo "$ac_t""no" 1>&6
12827
12828 fi
12829
12830
12831 ########################################################################################
12832 ##
12833 ## END OF TESTS FOR SAM BACKENDS.  
12834 ##
12835 ########################################################################################
12836
12837 #################################################
12838 # check for a NISPLUS_HOME support 
12839 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12840 echo "configure:12841: checking whether to use NISPLUS_HOME" >&5
12841 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12842 if test "${with_nisplus_home+set}" = set; then
12843   withval="$with_nisplus_home"
12844    case "$withval" in
12845   yes)
12846     echo "$ac_t""yes" 1>&6
12847     cat >> confdefs.h <<\EOF
12848 #define WITH_NISPLUS_HOME 1
12849 EOF
12850
12851     ;;
12852   *)
12853     echo "$ac_t""no" 1>&6
12854     ;;
12855   esac 
12856 else
12857   echo "$ac_t""no" 1>&6
12858
12859 fi
12860
12861
12862 #################################################
12863 # check for syslog logging
12864 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12865 echo "configure:12866: checking whether to use syslog logging" >&5
12866 # Check whether --with-syslog or --without-syslog was given.
12867 if test "${with_syslog+set}" = set; then
12868   withval="$with_syslog"
12869    case "$withval" in
12870   yes)
12871     echo "$ac_t""yes" 1>&6
12872     cat >> confdefs.h <<\EOF
12873 #define WITH_SYSLOG 1
12874 EOF
12875
12876     ;;
12877   *)
12878     echo "$ac_t""no" 1>&6
12879     ;;
12880   esac 
12881 else
12882   echo "$ac_t""no" 1>&6
12883
12884 fi
12885
12886
12887 #################################################
12888 # check for a shared memory profiling support
12889 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12890 echo "configure:12891: checking whether to use profiling" >&5
12891 # Check whether --with-profiling-data or --without-profiling-data was given.
12892 if test "${with_profiling_data+set}" = set; then
12893   withval="$with_profiling_data"
12894    case "$withval" in
12895   yes)
12896     echo "$ac_t""yes" 1>&6
12897     cat >> confdefs.h <<\EOF
12898 #define WITH_PROFILE 1
12899 EOF
12900
12901     ;;
12902   *)
12903     echo "$ac_t""no" 1>&6
12904     ;;
12905   esac 
12906 else
12907   echo "$ac_t""no" 1>&6
12908
12909 fi
12910
12911
12912
12913 #################################################
12914 # check for experimental disk-quotas support
12915 QUOTAOBJS=smbd/noquotas.o
12916
12917 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12918 echo "configure:12919: checking whether to support disk-quotas" >&5
12919 # Check whether --with-quotas or --without-quotas was given.
12920 if test "${with_quotas+set}" = set; then
12921   withval="$with_quotas"
12922    case "$withval" in
12923   yes)
12924     echo "$ac_t""yes" 1>&6
12925     case "$host_os" in
12926       *linux*)
12927         # Check for kernel 2.4.x quota braindamage...
12928         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12929 echo "configure:12930: checking for linux 2.4.x quota braindamage.." >&5
12930 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12931   echo $ac_n "(cached) $ac_c" 1>&6
12932 else
12933   
12934         cat > conftest.$ac_ext <<EOF
12935 #line 12936 "configure"
12936 #include "confdefs.h"
12937 #include <stdio.h>
12938 #include <sys/types.h>
12939 #include <asm/types.h>
12940 #include <linux/quota.h>
12941 #include <mntent.h>
12942 #include <linux/unistd.h>
12943 int main() {
12944 struct mem_dqblk D;
12945 ; return 0; }
12946 EOF
12947 if { (eval echo configure:12948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12948   rm -rf conftest*
12949   samba_cv_linux_2_4_quota_braindamage=yes
12950 else
12951   echo "configure: failed program was:" >&5
12952   cat conftest.$ac_ext >&5
12953   rm -rf conftest*
12954   samba_cv_linux_2_4_quota_braindamage=no
12955 fi
12956 rm -f conftest*
12957 fi
12958
12959 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12960 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12961         cat >> confdefs.h <<\EOF
12962 #define LINUX_QUOTAS_2 1
12963 EOF
12964
12965 else
12966         cat >> confdefs.h <<\EOF
12967 #define LINUX_QUOTAS_1 1
12968 EOF
12969
12970 fi
12971         ;;
12972       *)
12973         ;;
12974     esac
12975     QUOTAOBJS=smbd/quotas.o
12976     cat >> confdefs.h <<\EOF
12977 #define WITH_QUOTAS 1
12978 EOF
12979
12980     ;;
12981   *)
12982     echo "$ac_t""no" 1>&6
12983     ;;
12984   esac 
12985 else
12986   echo "$ac_t""no" 1>&6
12987
12988 fi
12989
12990
12991
12992 #################################################
12993 # check for experimental utmp accounting
12994
12995 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12996 echo "configure:12997: checking whether to support utmp accounting" >&5
12997 # Check whether --with-utmp or --without-utmp was given.
12998 if test "${with_utmp+set}" = set; then
12999   withval="$with_utmp"
13000    case "$withval" in
13001   yes)
13002     echo "$ac_t""yes" 1>&6
13003     cat >> confdefs.h <<\EOF
13004 #define WITH_UTMP 1
13005 EOF
13006
13007     ;;
13008   *)
13009     echo "$ac_t""no" 1>&6
13010     ;;
13011   esac 
13012 else
13013   echo "$ac_t""no" 1>&6
13014
13015 fi
13016
13017
13018 #################################################
13019 # choose native language(s) of man pages
13020 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13021 echo "configure:13022: checking chosen man pages' language(s)" >&5
13022 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13023 if test "${with_manpages_langs+set}" = set; then
13024   withval="$with_manpages_langs"
13025    case "$withval" in
13026   yes|no)
13027     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13028     manlangs="en"
13029   ;;
13030   *)
13031     manlangs="$withval"
13032   ;;
13033   esac
13034
13035   echo "$ac_t""$manlangs" 1>&6
13036   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13037   
13038 else
13039   manlangs="en"
13040   echo "$ac_t""$manlangs" 1>&6
13041   
13042
13043 fi
13044
13045
13046 #################################################
13047 # these tests are taken from the GNU fileutils package
13048 echo "checking how to get filesystem space usage" 1>&6
13049 echo "configure:13050: checking how to get filesystem space usage" >&5
13050 space=no
13051
13052 # Test for statvfs64.
13053 if test $space = no; then
13054   # SVR4
13055   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13056 echo "configure:13057: checking statvfs64 function (SVR4)" >&5
13057 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13058   echo $ac_n "(cached) $ac_c" 1>&6
13059 else
13060   if test "$cross_compiling" = yes; then
13061   fu_cv_sys_stat_statvfs64=cross
13062 else
13063   cat > conftest.$ac_ext <<EOF
13064 #line 13065 "configure"
13065 #include "confdefs.h"
13066
13067 #if defined(HAVE_UNISTD_H)
13068 #include <unistd.h>
13069 #endif
13070 #include <sys/types.h>
13071 #include <sys/statvfs.h>
13072   main ()
13073   {
13074     struct statvfs64 fsd;
13075     exit (statvfs64 (".", &fsd));
13076   }
13077 EOF
13078 if { (eval echo configure:13079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13079 then
13080   fu_cv_sys_stat_statvfs64=yes
13081 else
13082   echo "configure: failed program was:" >&5
13083   cat conftest.$ac_ext >&5
13084   rm -fr conftest*
13085   fu_cv_sys_stat_statvfs64=no
13086 fi
13087 rm -fr conftest*
13088 fi
13089
13090 fi
13091
13092 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13093   if test $fu_cv_sys_stat_statvfs64 = yes; then
13094     space=yes
13095     cat >> confdefs.h <<\EOF
13096 #define STAT_STATVFS64 1
13097 EOF
13098
13099   fi
13100 fi
13101
13102 # Perform only the link test since it seems there are no variants of the
13103 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13104 # because that got a false positive on SCO OSR5.  Adding the declaration
13105 # of a `struct statvfs' causes this test to fail (as it should) on such
13106 # systems.  That system is reported to work fine with STAT_STATFS4 which
13107 # is what it gets when this test fails.
13108 if test $space = no; then
13109   # SVR4
13110   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13111 echo "configure:13112: checking statvfs function (SVR4)" >&5
13112 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13113   echo $ac_n "(cached) $ac_c" 1>&6
13114 else
13115   cat > conftest.$ac_ext <<EOF
13116 #line 13117 "configure"
13117 #include "confdefs.h"
13118 #include <sys/types.h>
13119 #include <sys/statvfs.h>
13120 int main() {
13121 struct statvfs fsd; statvfs (0, &fsd);
13122 ; return 0; }
13123 EOF
13124 if { (eval echo configure:13125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13125   rm -rf conftest*
13126   fu_cv_sys_stat_statvfs=yes
13127 else
13128   echo "configure: failed program was:" >&5
13129   cat conftest.$ac_ext >&5
13130   rm -rf conftest*
13131   fu_cv_sys_stat_statvfs=no
13132 fi
13133 rm -f conftest*
13134 fi
13135
13136 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13137   if test $fu_cv_sys_stat_statvfs = yes; then
13138     space=yes
13139     cat >> confdefs.h <<\EOF
13140 #define STAT_STATVFS 1
13141 EOF
13142
13143   fi
13144 fi
13145
13146 if test $space = no; then
13147   # DEC Alpha running OSF/1
13148   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13149 echo "configure:13150: checking for 3-argument statfs function (DEC OSF/1)" >&5
13150   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13151   echo $ac_n "(cached) $ac_c" 1>&6
13152 else
13153   if test "$cross_compiling" = yes; then
13154   fu_cv_sys_stat_statfs3_osf1=no
13155 else
13156   cat > conftest.$ac_ext <<EOF
13157 #line 13158 "configure"
13158 #include "confdefs.h"
13159
13160 #include <sys/param.h>
13161 #include <sys/types.h>
13162 #include <sys/mount.h>
13163   main ()
13164   {
13165     struct statfs fsd;
13166     fsd.f_fsize = 0;
13167     exit (statfs (".", &fsd, sizeof (struct statfs)));
13168   }
13169 EOF
13170 if { (eval echo configure:13171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13171 then
13172   fu_cv_sys_stat_statfs3_osf1=yes
13173 else
13174   echo "configure: failed program was:" >&5
13175   cat conftest.$ac_ext >&5
13176   rm -fr conftest*
13177   fu_cv_sys_stat_statfs3_osf1=no
13178 fi
13179 rm -fr conftest*
13180 fi
13181
13182 fi
13183
13184   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13185   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13186     space=yes
13187     cat >> confdefs.h <<\EOF
13188 #define STAT_STATFS3_OSF1 1
13189 EOF
13190
13191   fi
13192 fi
13193
13194 if test $space = no; then
13195 # AIX
13196   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13197 echo "configure:13198: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13198   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13199   echo $ac_n "(cached) $ac_c" 1>&6
13200 else
13201   if test "$cross_compiling" = yes; then
13202   fu_cv_sys_stat_statfs2_bsize=no
13203 else
13204   cat > conftest.$ac_ext <<EOF
13205 #line 13206 "configure"
13206 #include "confdefs.h"
13207
13208 #ifdef HAVE_SYS_PARAM_H
13209 #include <sys/param.h>
13210 #endif
13211 #ifdef HAVE_SYS_MOUNT_H
13212 #include <sys/mount.h>
13213 #endif
13214 #ifdef HAVE_SYS_VFS_H
13215 #include <sys/vfs.h>
13216 #endif
13217   main ()
13218   {
13219   struct statfs fsd;
13220   fsd.f_bsize = 0;
13221   exit (statfs (".", &fsd));
13222   }
13223 EOF
13224 if { (eval echo configure:13225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13225 then
13226   fu_cv_sys_stat_statfs2_bsize=yes
13227 else
13228   echo "configure: failed program was:" >&5
13229   cat conftest.$ac_ext >&5
13230   rm -fr conftest*
13231   fu_cv_sys_stat_statfs2_bsize=no
13232 fi
13233 rm -fr conftest*
13234 fi
13235
13236 fi
13237
13238   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13239   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13240     space=yes
13241     cat >> confdefs.h <<\EOF
13242 #define STAT_STATFS2_BSIZE 1
13243 EOF
13244
13245   fi
13246 fi
13247
13248 if test $space = no; then
13249 # SVR3
13250   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13251 echo "configure:13252: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13252   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13253   echo $ac_n "(cached) $ac_c" 1>&6
13254 else
13255   if test "$cross_compiling" = yes; then
13256   fu_cv_sys_stat_statfs4=no
13257 else
13258   cat > conftest.$ac_ext <<EOF
13259 #line 13260 "configure"
13260 #include "confdefs.h"
13261 #include <sys/types.h>
13262 #include <sys/statfs.h>
13263   main ()
13264   {
13265   struct statfs fsd;
13266   exit (statfs (".", &fsd, sizeof fsd, 0));
13267   }
13268 EOF
13269 if { (eval echo configure:13270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13270 then
13271   fu_cv_sys_stat_statfs4=yes
13272 else
13273   echo "configure: failed program was:" >&5
13274   cat conftest.$ac_ext >&5
13275   rm -fr conftest*
13276   fu_cv_sys_stat_statfs4=no
13277 fi
13278 rm -fr conftest*
13279 fi
13280
13281 fi
13282
13283   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13284   if test $fu_cv_sys_stat_statfs4 = yes; then
13285     space=yes
13286     cat >> confdefs.h <<\EOF
13287 #define STAT_STATFS4 1
13288 EOF
13289
13290   fi
13291 fi
13292
13293 if test $space = no; then
13294 # 4.4BSD and NetBSD
13295   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13296 echo "configure:13297: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13297   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13298   echo $ac_n "(cached) $ac_c" 1>&6
13299 else
13300   if test "$cross_compiling" = yes; then
13301   fu_cv_sys_stat_statfs2_fsize=no
13302 else
13303   cat > conftest.$ac_ext <<EOF
13304 #line 13305 "configure"
13305 #include "confdefs.h"
13306 #include <sys/types.h>
13307 #ifdef HAVE_SYS_PARAM_H
13308 #include <sys/param.h>
13309 #endif
13310 #ifdef HAVE_SYS_MOUNT_H
13311 #include <sys/mount.h>
13312 #endif
13313   main ()
13314   {
13315   struct statfs fsd;
13316   fsd.f_fsize = 0;
13317   exit (statfs (".", &fsd));
13318   }
13319 EOF
13320 if { (eval echo configure:13321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13321 then
13322   fu_cv_sys_stat_statfs2_fsize=yes
13323 else
13324   echo "configure: failed program was:" >&5
13325   cat conftest.$ac_ext >&5
13326   rm -fr conftest*
13327   fu_cv_sys_stat_statfs2_fsize=no
13328 fi
13329 rm -fr conftest*
13330 fi
13331
13332 fi
13333
13334   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13335   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13336     space=yes
13337     cat >> confdefs.h <<\EOF
13338 #define STAT_STATFS2_FSIZE 1
13339 EOF
13340
13341   fi
13342 fi
13343
13344 if test $space = no; then
13345   # Ultrix
13346   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13347 echo "configure:13348: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13348   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13349   echo $ac_n "(cached) $ac_c" 1>&6
13350 else
13351   if test "$cross_compiling" = yes; then
13352   fu_cv_sys_stat_fs_data=no
13353 else
13354   cat > conftest.$ac_ext <<EOF
13355 #line 13356 "configure"
13356 #include "confdefs.h"
13357 #include <sys/types.h>
13358 #ifdef HAVE_SYS_PARAM_H
13359 #include <sys/param.h>
13360 #endif
13361 #ifdef HAVE_SYS_MOUNT_H
13362 #include <sys/mount.h>
13363 #endif
13364 #ifdef HAVE_SYS_FS_TYPES_H
13365 #include <sys/fs_types.h>
13366 #endif
13367   main ()
13368   {
13369   struct fs_data fsd;
13370   /* Ultrix's statfs returns 1 for success,
13371      0 for not mounted, -1 for failure.  */
13372   exit (statfs (".", &fsd) != 1);
13373   }
13374 EOF
13375 if { (eval echo configure:13376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13376 then
13377   fu_cv_sys_stat_fs_data=yes
13378 else
13379   echo "configure: failed program was:" >&5
13380   cat conftest.$ac_ext >&5
13381   rm -fr conftest*
13382   fu_cv_sys_stat_fs_data=no
13383 fi
13384 rm -fr conftest*
13385 fi
13386
13387 fi
13388
13389   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13390   if test $fu_cv_sys_stat_fs_data = yes; then
13391     space=yes
13392     cat >> confdefs.h <<\EOF
13393 #define STAT_STATFS2_FS_DATA 1
13394 EOF
13395
13396   fi
13397 fi
13398
13399 #
13400 # As a gating factor for large file support, in order to
13401 # use <4GB files we must have the following minimal support
13402 # available.
13403 # long long, and a 64 bit off_t or off64_t.
13404 # If we don't have all of these then disable large
13405 # file support.
13406 #
13407 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13408 echo "configure:13409: checking if large file support can be enabled" >&5
13409 cat > conftest.$ac_ext <<EOF
13410 #line 13411 "configure"
13411 #include "confdefs.h"
13412
13413 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13414 #include <sys/types.h>
13415 #else
13416 __COMPILE_ERROR_
13417 #endif
13418
13419 int main() {
13420 int i
13421 ; return 0; }
13422 EOF
13423 if { (eval echo configure:13424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13424   rm -rf conftest*
13425   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13426 else
13427   echo "configure: failed program was:" >&5
13428   cat conftest.$ac_ext >&5
13429   rm -rf conftest*
13430   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13431 fi
13432 rm -f conftest*
13433 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13434     cat >> confdefs.h <<\EOF
13435 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13436 EOF
13437
13438 fi
13439 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13440
13441 # Check whether --with-spinlocks or --without-spinlocks was given.
13442 if test "${with_spinlocks+set}" = set; then
13443   withval="$with_spinlocks"
13444   :
13445 fi
13446
13447 if test "x$with_spinlocks" = "xyes"; then
13448     cat >> confdefs.h <<\EOF
13449 #define USE_SPINLOCKS 1
13450 EOF
13451
13452
13453     case "$host_cpu" in
13454         sparc)
13455             cat >> confdefs.h <<\EOF
13456 #define SPARC_SPINLOCKS 1
13457 EOF
13458
13459             ;;
13460
13461         i386|i486|i586|i686)
13462             cat >> confdefs.h <<\EOF
13463 #define INTEL_SPINLOCKS 1
13464 EOF
13465
13466             ;;
13467
13468         mips)
13469             cat >> confdefs.h <<\EOF
13470 #define MIPS_SPINLOCKS 1
13471 EOF
13472
13473             ;;
13474
13475         powerpc)
13476             cat >> confdefs.h <<\EOF
13477 #define POWERPC_SPINLOCKS 1
13478 EOF
13479
13480             ;;
13481     esac
13482 fi
13483
13484 #################################################
13485 # check for ACL support
13486
13487 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13488 echo "configure:13489: checking whether to support ACLs" >&5
13489 # Check whether --with-acl-support or --without-acl-support was given.
13490 if test "${with_acl_support+set}" = set; then
13491   withval="$with_acl_support"
13492    case "$withval" in
13493   yes)
13494
13495         case "$host_os" in
13496         *sysv5*)
13497                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13498                 cat >> confdefs.h <<\EOF
13499 #define HAVE_UNIXWARE_ACLS 1
13500 EOF
13501
13502                 ;;
13503         *solaris*)
13504                 echo "$ac_t""Using solaris ACLs" 1>&6
13505                 cat >> confdefs.h <<\EOF
13506 #define HAVE_SOLARIS_ACLS 1
13507 EOF
13508
13509                 ;;
13510         *hpux*)
13511                 echo "$ac_t""Using HPUX ACLs" 1>&6
13512                 cat >> confdefs.h <<\EOF
13513 #define HAVE_HPUX_ACLS 1
13514 EOF
13515
13516                 ;;
13517         *irix*)
13518                 echo "$ac_t""Using IRIX ACLs" 1>&6
13519                 cat >> confdefs.h <<\EOF
13520 #define HAVE_IRIX_ACLS 1
13521 EOF
13522
13523                 ;;
13524         *aix*)
13525                 echo "$ac_t""Using AIX ACLs" 1>&6
13526                 cat >> confdefs.h <<\EOF
13527 #define HAVE_AIX_ACLS 1
13528 EOF
13529
13530                 ;;
13531         *osf*)
13532                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13533                 cat >> confdefs.h <<\EOF
13534 #define HAVE_TRU64_ACLS 1
13535 EOF
13536
13537                 LIBS="$LIBS -lpacl"
13538                 ;;
13539         *)
13540                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13541 echo "configure:13542: checking for acl_get_file in -lacl" >&5
13542 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13543 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13544   echo $ac_n "(cached) $ac_c" 1>&6
13545 else
13546   ac_save_LIBS="$LIBS"
13547 LIBS="-lacl  $LIBS"
13548 cat > conftest.$ac_ext <<EOF
13549 #line 13550 "configure"
13550 #include "confdefs.h"
13551 /* Override any gcc2 internal prototype to avoid an error.  */
13552 /* We use char because int might match the return type of a gcc2
13553     builtin and then its argument prototype would still apply.  */
13554 char acl_get_file();
13555
13556 int main() {
13557 acl_get_file()
13558 ; return 0; }
13559 EOF
13560 if { (eval echo configure:13561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13561   rm -rf conftest*
13562   eval "ac_cv_lib_$ac_lib_var=yes"
13563 else
13564   echo "configure: failed program was:" >&5
13565   cat conftest.$ac_ext >&5
13566   rm -rf conftest*
13567   eval "ac_cv_lib_$ac_lib_var=no"
13568 fi
13569 rm -f conftest*
13570 LIBS="$ac_save_LIBS"
13571
13572 fi
13573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13574   echo "$ac_t""yes" 1>&6
13575     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13576     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13577   cat >> confdefs.h <<EOF
13578 #define $ac_tr_lib 1
13579 EOF
13580
13581   LIBS="-lacl $LIBS"
13582
13583 else
13584   echo "$ac_t""no" 1>&6
13585 fi
13586
13587                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13588 echo "configure:13589: checking for ACL support" >&5
13589 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13590   echo $ac_n "(cached) $ac_c" 1>&6
13591 else
13592   
13593                 cat > conftest.$ac_ext <<EOF
13594 #line 13595 "configure"
13595 #include "confdefs.h"
13596 #include <sys/types.h>
13597 #include <sys/acl.h>
13598 int main() {
13599  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13600 ; return 0; }
13601 EOF
13602 if { (eval echo configure:13603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13603   rm -rf conftest*
13604   samba_cv_HAVE_POSIX_ACLS=yes
13605 else
13606   echo "configure: failed program was:" >&5
13607   cat conftest.$ac_ext >&5
13608   rm -rf conftest*
13609   samba_cv_HAVE_POSIX_ACLS=no
13610 fi
13611 rm -f conftest*
13612 fi
13613
13614 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13615                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13616                                 echo "$ac_t""Using posix ACLs" 1>&6
13617                                 cat >> confdefs.h <<\EOF
13618 #define HAVE_POSIX_ACLS 1
13619 EOF
13620
13621                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13622 echo "configure:13623: checking for acl_get_perm_np" >&5
13623 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13624   echo $ac_n "(cached) $ac_c" 1>&6
13625 else
13626   
13627                                 cat > conftest.$ac_ext <<EOF
13628 #line 13629 "configure"
13629 #include "confdefs.h"
13630 #include <sys/types.h>
13631 #include <sys/acl.h>
13632 int main() {
13633  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13634 ; return 0; }
13635 EOF
13636 if { (eval echo configure:13637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13637   rm -rf conftest*
13638   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13639 else
13640   echo "configure: failed program was:" >&5
13641   cat conftest.$ac_ext >&5
13642   rm -rf conftest*
13643   samba_cv_HAVE_ACL_GET_PERM_NP=no
13644 fi
13645 rm -f conftest*
13646 fi
13647
13648 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13649                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13650                                         cat >> confdefs.h <<\EOF
13651 #define HAVE_ACL_GET_PERM_NP 1
13652 EOF
13653
13654                                 fi
13655                         fi
13656             ;;
13657         esac
13658         ;;
13659   *)
13660     echo "$ac_t""no" 1>&6
13661     cat >> confdefs.h <<\EOF
13662 #define HAVE_NO_ACLS 1
13663 EOF
13664
13665     ;;
13666   esac 
13667 else
13668   cat >> confdefs.h <<\EOF
13669 #define HAVE_NO_ACLS 1
13670 EOF
13671
13672   echo "$ac_t""no" 1>&6
13673
13674 fi
13675
13676
13677 #################################################
13678 # Check whether winbind is supported on this platform.  If so we need to
13679 # build and install client programs (WINBIND_TARGETS), sbin programs
13680 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13681
13682 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13683 echo "configure:13684: checking whether to build winbind" >&5
13684
13685 # Initially, the value of $host_os decides whether winbind is supported
13686
13687 case "$host_os" in
13688         *linux*|*irix*)
13689                 HAVE_WINBIND=yes
13690                 ;;
13691         *solaris*)
13692                 HAVE_WINBIND=yes
13693                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13694                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
13695                 ;;
13696         *hpux11*)
13697                 HAVE_WINBIND=yes
13698                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13699                 ;;
13700         *)
13701                 HAVE_WINBIND=no
13702                 winbind_no_reason=", unsupported on $host_os"
13703                 ;;
13704 esac
13705
13706 # Check the setting of --with-winbindd
13707
13708 # Check whether --with-winbind or --without-winbind was given.
13709 if test "${with_winbind+set}" = set; then
13710   withval="$with_winbind"
13711    
13712   case "$withval" in
13713         yes)
13714                 HAVE_WINBIND=yes
13715                 ;;
13716         no)
13717                 HAVE_WINBIND=no
13718                 winbind_reason=""
13719                 ;;
13720   esac 
13721 fi
13722
13723
13724 # We need unix domain sockets for winbind
13725
13726 if test x"$HAVE_WINBIND" = x"yes"; then
13727         if test x"$samba_cv_unixsocket" = x"no"; then
13728                 winbind_no_reason=", no unix domain socket support on $host_os"
13729                 HAVE_WINBIND=no
13730         fi
13731 fi
13732
13733 # Display test results
13734
13735 WINBIND_TARGETS=""
13736 WINBIND_STARGETS=""
13737 WINBIND_LTARGETS=""
13738 WINBIND_PAM_PROGS=""
13739
13740 if test x"$HAVE_WINBIND" = x"yes"; then
13741         echo "$ac_t""yes" 1>&6
13742
13743         WINBIND_TARGETS="bin/wbinfo"
13744         WINBIND_STARGETS="bin/winbindd"
13745         if test x"$BLDSHARED" = x"true"; then
13746                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13747                 if test x"$with_pam" = x"yes"; then
13748                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13749                 fi
13750         fi
13751 else
13752         echo "$ac_t""no$winbind_no_reason" 1>&6
13753 fi
13754
13755
13756 # Check for FreeBSD problem with getgroups
13757 # It returns EGID too many times in the list of groups
13758 # and causes a security problem
13759 echo $ac_n "checking whether or not getgroups returns EGID too many times""... $ac_c" 1>&6
13760 echo "configure:13761: checking whether or not getgroups returns EGID too many times" >&5
13761 if eval "test \"`echo '$''{'samba_cv_have_getgroups_too_many_egids'+set}'`\" = set"; then
13762   echo $ac_n "(cached) $ac_c" 1>&6
13763 else
13764   if test "$cross_compiling" = yes; then
13765   samba_cv_have_getgroups_too_many_egids=cross
13766 else
13767   cat > conftest.$ac_ext <<EOF
13768 #line 13769 "configure"
13769 #include "confdefs.h"
13770
13771 #include <sys/types.h>
13772 #include <stdio.h>
13773
13774 int main(int argc, char *argv[])
13775 {
13776   gid_t groups[10];
13777   int n = 10;
13778
13779   n = getgroups(n, &groups);
13780   /* Could actually pass back the number of EGIDs there ... */
13781   exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0);
13782 }
13783 EOF
13784 if { (eval echo configure:13785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13785 then
13786   samba_cv_have_getgroups_too_many_egids=no
13787 else
13788   echo "configure: failed program was:" >&5
13789   cat conftest.$ac_ext >&5
13790   rm -fr conftest*
13791   samba_cv_have_getgroups_too_many_egids=yes
13792 fi
13793 rm -fr conftest*
13794 fi
13795
13796 fi
13797
13798 echo "$ac_t""$samba_cv_have_getgroups_too_many_egids" 1>&6
13799 if test x"$samba_cv_have_getgroups_too_many_egids" = x"yes"; then
13800     cat >> confdefs.h <<\EOF
13801 #define HAVE_GETGROUPS_TOO_MANY_EGIDS 1
13802 EOF
13803
13804 fi
13805
13806
13807
13808 # Substitution time!
13809
13810
13811
13812
13813
13814
13815
13816
13817 # Solaris has some extra fields in struct passwd that need to be
13818 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
13819 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
13820 # this. 
13821
13822 #AC_CHECK_MEMBER(struct passwd.pw_comment,
13823 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
13824 #               [#include <pwd.h>])
13825
13826 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
13827 echo "configure:13828: checking whether struct passwd has pw_comment" >&5
13828 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
13829   echo $ac_n "(cached) $ac_c" 1>&6
13830 else
13831   
13832     cat > conftest.$ac_ext <<EOF
13833 #line 13834 "configure"
13834 #include "confdefs.h"
13835 #include <pwd.h>
13836 int main() {
13837 struct passwd p; p.pw_comment;
13838 ; return 0; }
13839 EOF
13840 if { (eval echo configure:13841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13841   rm -rf conftest*
13842   samba_cv_passwd_pw_comment=yes
13843 else
13844   echo "configure: failed program was:" >&5
13845   cat conftest.$ac_ext >&5
13846   rm -rf conftest*
13847   samba_cv_passwd_pw_comment=no
13848 fi
13849 rm -f conftest*
13850 fi
13851
13852 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
13853 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
13854    cat >> confdefs.h <<\EOF
13855 #define HAVE_PASSWD_PW_COMMENT 1
13856 EOF
13857
13858 fi
13859
13860 #AC_CHECK_MEMBER(struct passwd.pw_age,
13861 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
13862 #               [#include <pwd.h>])
13863
13864 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
13865 echo "configure:13866: checking whether struct passwd has pw_age" >&5
13866 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
13867   echo $ac_n "(cached) $ac_c" 1>&6
13868 else
13869   
13870     cat > conftest.$ac_ext <<EOF
13871 #line 13872 "configure"
13872 #include "confdefs.h"
13873 #include <pwd.h>
13874 int main() {
13875 struct passwd p; p.pw_age;
13876 ; return 0; }
13877 EOF
13878 if { (eval echo configure:13879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13879   rm -rf conftest*
13880   samba_cv_passwd_pw_age=yes
13881 else
13882   echo "configure: failed program was:" >&5
13883   cat conftest.$ac_ext >&5
13884   rm -rf conftest*
13885   samba_cv_passwd_pw_age=no
13886 fi
13887 rm -f conftest*
13888 fi
13889
13890 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
13891 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
13892    cat >> confdefs.h <<\EOF
13893 #define HAVE_PASSWD_PW_AGE 1
13894 EOF
13895
13896 fi
13897
13898 #################################################
13899 # Check to see if we should use the included popt 
13900
13901 # Check whether --with-included-popt or --without-included-popt was given.
13902 if test "${with_included_popt+set}" = set; then
13903   withval="$with_included_popt"
13904    
13905   case "$withval" in
13906         yes)
13907                 INCLUDED_POPT=yes
13908                 ;;
13909         no)
13910                 INCLUDED_POPT=no
13911                 ;;
13912   esac 
13913 fi
13914
13915 if test x"$INCLUDED_POPT" != x"yes"; then
13916     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13917 echo "configure:13918: checking for poptGetContext in -lpopt" >&5
13918 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13919 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13920   echo $ac_n "(cached) $ac_c" 1>&6
13921 else
13922   ac_save_LIBS="$LIBS"
13923 LIBS="-lpopt  $LIBS"
13924 cat > conftest.$ac_ext <<EOF
13925 #line 13926 "configure"
13926 #include "confdefs.h"
13927 /* Override any gcc2 internal prototype to avoid an error.  */
13928 /* We use char because int might match the return type of a gcc2
13929     builtin and then its argument prototype would still apply.  */
13930 char poptGetContext();
13931
13932 int main() {
13933 poptGetContext()
13934 ; return 0; }
13935 EOF
13936 if { (eval echo configure:13937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13937   rm -rf conftest*
13938   eval "ac_cv_lib_$ac_lib_var=yes"
13939 else
13940   echo "configure: failed program was:" >&5
13941   cat conftest.$ac_ext >&5
13942   rm -rf conftest*
13943   eval "ac_cv_lib_$ac_lib_var=no"
13944 fi
13945 rm -f conftest*
13946 LIBS="$ac_save_LIBS"
13947
13948 fi
13949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13950   echo "$ac_t""yes" 1>&6
13951   INCLUDED_POPT=no
13952 else
13953   echo "$ac_t""no" 1>&6
13954 INCLUDED_POPT=yes
13955 fi
13956
13957 fi
13958
13959 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13960 echo "configure:13961: checking whether to use included popt" >&5
13961 if test x"$INCLUDED_POPT" = x"yes"; then
13962     echo "$ac_t""$srcdir/popt" 1>&6
13963     BUILD_POPT='$(POPT_OBJS)'
13964     FLAGS1="-I$srcdir/popt"
13965 else
13966     echo "$ac_t""no" 1>&6
13967     LIBS="$LIBS -lpopt"
13968 fi
13969
13970
13971
13972 #################################################
13973 # do extra things if we are running insure
13974
13975 if test "${ac_cv_prog_CC}" = "insure"; then
13976         CPPFLAGS="$CPPFLAGS -D__INSURE__"
13977 fi
13978
13979 #################################################
13980 # final configure stuff
13981
13982 echo $ac_n "checking configure summary""... $ac_c" 1>&6
13983 echo "configure:13984: checking configure summary" >&5
13984 if test "$cross_compiling" = yes; then
13985   echo "configure: warning: cannot run when cross-compiling" 1>&2
13986 else
13987   cat > conftest.$ac_ext <<EOF
13988 #line 13989 "configure"
13989 #include "confdefs.h"
13990 #include "${srcdir-.}/tests/summary.c"
13991 EOF
13992 if { (eval echo configure:13993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13993 then
13994   echo "$ac_t""yes" 1>&6
13995 else
13996   echo "configure: failed program was:" >&5
13997   cat conftest.$ac_ext >&5
13998   rm -fr conftest*
13999   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
14000 fi
14001 rm -fr conftest*
14002 fi
14003
14004
14005 builddir=`pwd`
14006
14007
14008 trap '' 1 2 15
14009 cat > confcache <<\EOF
14010 # This file is a shell script that caches the results of configure
14011 # tests run on this system so they can be shared between configure
14012 # scripts and configure runs.  It is not useful on other systems.
14013 # If it contains results you don't want to keep, you may remove or edit it.
14014 #
14015 # By default, configure uses ./config.cache as the cache file,
14016 # creating it if it does not exist already.  You can give configure
14017 # the --cache-file=FILE option to use a different cache file; that is
14018 # what configure does when it calls configure scripts in
14019 # subdirectories, so they share the cache.
14020 # Giving --cache-file=/dev/null disables caching, for debugging configure.
14021 # config.status only pays attention to the cache file if you give it the
14022 # --recheck option to rerun configure.
14023 #
14024 EOF
14025 # The following way of writing the cache mishandles newlines in values,
14026 # but we know of no workaround that is simple, portable, and efficient.
14027 # So, don't put newlines in cache variables' values.
14028 # Ultrix sh set writes to stderr and can't be redirected directly,
14029 # and sets the high bit in the cache file unless we assign to the vars.
14030 (set) 2>&1 |
14031   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14032   *ac_space=\ *)
14033     # `set' does not quote correctly, so add quotes (double-quote substitution
14034     # turns \\\\ into \\, and sed turns \\ into \).
14035     sed -n \
14036       -e "s/'/'\\\\''/g" \
14037       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14038     ;;
14039   *)
14040     # `set' quotes correctly as required by POSIX, so do not add quotes.
14041     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14042     ;;
14043   esac >> confcache
14044 if cmp -s $cache_file confcache; then
14045   :
14046 else
14047   if test -w $cache_file; then
14048     echo "updating cache $cache_file"
14049     cat confcache > $cache_file
14050   else
14051     echo "not updating unwritable cache $cache_file"
14052   fi
14053 fi
14054 rm -f confcache
14055
14056 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14057
14058 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14059 # Let make expand exec_prefix.
14060 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14061
14062 # Any assignment to VPATH causes Sun make to only execute
14063 # the first set of double-colon rules, so remove it if not needed.
14064 # If there is a colon in the path, we need to keep it.
14065 if test "x$srcdir" = x.; then
14066   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14067 fi
14068
14069 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14070
14071 DEFS=-DHAVE_CONFIG_H
14072
14073 # Without the "./", some shells look in PATH for config.status.
14074 : ${CONFIG_STATUS=./config.status}
14075
14076 echo creating $CONFIG_STATUS
14077 rm -f $CONFIG_STATUS
14078 cat > $CONFIG_STATUS <<EOF
14079 #! /bin/sh
14080 # Generated automatically by configure.
14081 # Run this file to recreate the current configuration.
14082 # This directory was configured as follows,
14083 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14084 #
14085 # $0 $ac_configure_args
14086 #
14087 # Compiler output produced by configure, useful for debugging
14088 # configure, is in ./config.log if it exists.
14089
14090 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14091 for ac_option
14092 do
14093   case "\$ac_option" in
14094   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14095     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14096     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14097   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14098     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14099     exit 0 ;;
14100   -help | --help | --hel | --he | --h)
14101     echo "\$ac_cs_usage"; exit 0 ;;
14102   *) echo "\$ac_cs_usage"; exit 1 ;;
14103   esac
14104 done
14105
14106 ac_given_srcdir=$srcdir
14107 ac_given_INSTALL="$INSTALL"
14108
14109 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14110 EOF
14111 cat >> $CONFIG_STATUS <<EOF
14112
14113 # Protect against being on the right side of a sed subst in config.status.
14114 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14115  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14116 $ac_vpsub
14117 $extrasub
14118 s%@SHELL@%$SHELL%g
14119 s%@CFLAGS@%$CFLAGS%g
14120 s%@CPPFLAGS@%$CPPFLAGS%g
14121 s%@CXXFLAGS@%$CXXFLAGS%g
14122 s%@FFLAGS@%$FFLAGS%g
14123 s%@DEFS@%$DEFS%g
14124 s%@LDFLAGS@%$LDFLAGS%g
14125 s%@LIBS@%$LIBS%g
14126 s%@exec_prefix@%$exec_prefix%g
14127 s%@prefix@%$prefix%g
14128 s%@program_transform_name@%$program_transform_name%g
14129 s%@bindir@%$bindir%g
14130 s%@sbindir@%$sbindir%g
14131 s%@libexecdir@%$libexecdir%g
14132 s%@datadir@%$datadir%g
14133 s%@sysconfdir@%$sysconfdir%g
14134 s%@sharedstatedir@%$sharedstatedir%g
14135 s%@localstatedir@%$localstatedir%g
14136 s%@libdir@%$libdir%g
14137 s%@includedir@%$includedir%g
14138 s%@oldincludedir@%$oldincludedir%g
14139 s%@infodir@%$infodir%g
14140 s%@mandir@%$mandir%g
14141 s%@codepagedir@%$codepagedir%g
14142 s%@configdir@%$configdir%g
14143 s%@lockdir@%$lockdir%g
14144 s%@piddir@%$piddir%g
14145 s%@logfilebase@%$logfilebase%g
14146 s%@privatedir@%$privatedir%g
14147 s%@swatdir@%$swatdir%g
14148 s%@RUNPROG@%$RUNPROG%g
14149 s%@MPROGS@%$MPROGS%g
14150 s%@LDSHFLAGS@%$LDSHFLAGS%g
14151 s%@SHLD@%$SHLD%g
14152 s%@HOST_OS@%$HOST_OS%g
14153 s%@PAM_MOD@%$PAM_MOD%g
14154 s%@WRAP@%$WRAP%g
14155 s%@WRAP32@%$WRAP32%g
14156 s%@PICFLAG@%$PICFLAG%g
14157 s%@PICSUFFIX@%$PICSUFFIX%g
14158 s%@POBAD_CC@%$POBAD_CC%g
14159 s%@SHLIBEXT@%$SHLIBEXT%g
14160 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14161 s%@CC@%$CC%g
14162 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14163 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14164 s%@INSTALL_DATA@%$INSTALL_DATA%g
14165 s%@AWK@%$AWK%g
14166 s%@BROKEN_CC@%$BROKEN_CC%g
14167 s%@host@%$host%g
14168 s%@host_alias@%$host_alias%g
14169 s%@host_cpu@%$host_cpu%g
14170 s%@host_vendor@%$host_vendor%g
14171 s%@host_os@%$host_os%g
14172 s%@target@%$target%g
14173 s%@target_alias@%$target_alias%g
14174 s%@target_cpu@%$target_cpu%g
14175 s%@target_vendor@%$target_vendor%g
14176 s%@target_os@%$target_os%g
14177 s%@build@%$build%g
14178 s%@build_alias@%$build_alias%g
14179 s%@build_cpu@%$build_cpu%g
14180 s%@build_vendor@%$build_vendor%g
14181 s%@build_os@%$build_os%g
14182 s%@CPP@%$CPP%g
14183 s%@CUPS_CONFIG@%$CUPS_CONFIG%g
14184 s%@LIBOBJS@%$LIBOBJS%g
14185 s%@TERMLIBS@%$TERMLIBS%g
14186 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14187 s%@ROFF@%$ROFF%g
14188 s%@DYNEXP@%$DYNEXP%g
14189 s%@QUOTAOBJS@%$QUOTAOBJS%g
14190 s%@manlangs@%$manlangs%g
14191 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14192 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14193 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14194 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14195 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14196 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14197 s%@BUILD_POPT@%$BUILD_POPT%g
14198 s%@FLAGS1@%$FLAGS1%g
14199 s%@builddir@%$builddir%g
14200
14201 CEOF
14202 EOF
14203
14204 cat >> $CONFIG_STATUS <<\EOF
14205
14206 # Split the substitutions into bite-sized pieces for seds with
14207 # small command number limits, like on Digital OSF/1 and HP-UX.
14208 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14209 ac_file=1 # Number of current file.
14210 ac_beg=1 # First line for current file.
14211 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14212 ac_more_lines=:
14213 ac_sed_cmds=""
14214 while $ac_more_lines; do
14215   if test $ac_beg -gt 1; then
14216     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14217   else
14218     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14219   fi
14220   if test ! -s conftest.s$ac_file; then
14221     ac_more_lines=false
14222     rm -f conftest.s$ac_file
14223   else
14224     if test -z "$ac_sed_cmds"; then
14225       ac_sed_cmds="sed -f conftest.s$ac_file"
14226     else
14227       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14228     fi
14229     ac_file=`expr $ac_file + 1`
14230     ac_beg=$ac_end
14231     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14232   fi
14233 done
14234 if test -z "$ac_sed_cmds"; then
14235   ac_sed_cmds=cat
14236 fi
14237 EOF
14238
14239 cat >> $CONFIG_STATUS <<EOF
14240
14241 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb"}
14242 EOF
14243 cat >> $CONFIG_STATUS <<\EOF
14244 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14245   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14246   case "$ac_file" in
14247   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14248        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14249   *) ac_file_in="${ac_file}.in" ;;
14250   esac
14251
14252   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14253
14254   # Remove last slash and all that follows it.  Not all systems have dirname.
14255   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14256   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14257     # The file is in a subdirectory.
14258     test ! -d "$ac_dir" && mkdir "$ac_dir"
14259     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14260     # A "../" for each directory in $ac_dir_suffix.
14261     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14262   else
14263     ac_dir_suffix= ac_dots=
14264   fi
14265
14266   case "$ac_given_srcdir" in
14267   .)  srcdir=.
14268       if test -z "$ac_dots"; then top_srcdir=.
14269       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14270   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14271   *) # Relative path.
14272     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14273     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14274   esac
14275
14276   case "$ac_given_INSTALL" in
14277   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14278   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14279   esac
14280
14281   echo creating "$ac_file"
14282   rm -f "$ac_file"
14283   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14284   case "$ac_file" in
14285   *Makefile*) ac_comsub="1i\\
14286 # $configure_input" ;;
14287   *) ac_comsub= ;;
14288   esac
14289
14290   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14291   sed -e "$ac_comsub
14292 s%@configure_input@%$configure_input%g
14293 s%@srcdir@%$srcdir%g
14294 s%@top_srcdir@%$top_srcdir%g
14295 s%@INSTALL@%$INSTALL%g
14296 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14297 fi; done
14298 rm -f conftest.s*
14299
14300 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14301 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14302 #
14303 # ac_d sets the value in "#define NAME VALUE" lines.
14304 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14305 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14306 ac_dC='\3'
14307 ac_dD='%g'
14308 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14309 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14310 ac_uB='\([      ]\)%\1#\2define\3'
14311 ac_uC=' '
14312 ac_uD='\4%g'
14313 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14314 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14315 ac_eB='$%\1#\2define\3'
14316 ac_eC=' '
14317 ac_eD='%g'
14318
14319 if test "${CONFIG_HEADERS+set}" != set; then
14320 EOF
14321 cat >> $CONFIG_STATUS <<EOF
14322   CONFIG_HEADERS="include/config.h"
14323 EOF
14324 cat >> $CONFIG_STATUS <<\EOF
14325 fi
14326 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14327   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14328   case "$ac_file" in
14329   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14330        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14331   *) ac_file_in="${ac_file}.in" ;;
14332   esac
14333
14334   echo creating $ac_file
14335
14336   rm -f conftest.frag conftest.in conftest.out
14337   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14338   cat $ac_file_inputs > conftest.in
14339
14340 EOF
14341
14342 # Transform confdefs.h into a sed script conftest.vals that substitutes
14343 # the proper values into config.h.in to produce config.h.  And first:
14344 # Protect against being on the right side of a sed subst in config.status.
14345 # Protect against being in an unquoted here document in config.status.
14346 rm -f conftest.vals
14347 cat > conftest.hdr <<\EOF
14348 s/[\\&%]/\\&/g
14349 s%[\\$`]%\\&%g
14350 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14351 s%ac_d%ac_u%gp
14352 s%ac_u%ac_e%gp
14353 EOF
14354 sed -n -f conftest.hdr confdefs.h > conftest.vals
14355 rm -f conftest.hdr
14356
14357 # This sed command replaces #undef with comments.  This is necessary, for
14358 # example, in the case of _POSIX_SOURCE, which is predefined and required
14359 # on some systems where configure will not decide to define it.
14360 cat >> conftest.vals <<\EOF
14361 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14362 EOF
14363
14364 # Break up conftest.vals because some shells have a limit on
14365 # the size of here documents, and old seds have small limits too.
14366
14367 rm -f conftest.tail
14368 while :
14369 do
14370   ac_lines=`grep -c . conftest.vals`
14371   # grep -c gives empty output for an empty file on some AIX systems.
14372   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14373   # Write a limited-size here document to conftest.frag.
14374   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14375   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14376   echo 'CEOF
14377   sed -f conftest.frag conftest.in > conftest.out
14378   rm -f conftest.in
14379   mv conftest.out conftest.in
14380 ' >> $CONFIG_STATUS
14381   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14382   rm -f conftest.vals
14383   mv conftest.tail conftest.vals
14384 done
14385 rm -f conftest.vals
14386
14387 cat >> $CONFIG_STATUS <<\EOF
14388   rm -f conftest.frag conftest.h
14389   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14390   cat conftest.in >> conftest.h
14391   rm -f conftest.in
14392   if cmp -s $ac_file conftest.h 2>/dev/null; then
14393     echo "$ac_file is unchanged"
14394     rm -f conftest.h
14395   else
14396     # Remove last slash and all that follows it.  Not all systems have dirname.
14397       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14398       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14399       # The file is in a subdirectory.
14400       test ! -d "$ac_dir" && mkdir "$ac_dir"
14401     fi
14402     rm -f $ac_file
14403     mv conftest.h $ac_file
14404   fi
14405 fi; done
14406
14407 EOF
14408 cat >> $CONFIG_STATUS <<EOF
14409
14410 EOF
14411 cat >> $CONFIG_STATUS <<\EOF
14412
14413 exit 0
14414 EOF
14415 chmod +x $CONFIG_STATUS
14416 rm -fr confdefs* $ac_clean_files
14417 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14418
14419
14420 #################################################
14421 # Print very concise instructions on building/use
14422 if test "x$enable_dmalloc" = xyes
14423 then
14424         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14425         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14426 fi