reran configure
[kai/samba.git] / source / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --with-fhs              Use FHS-compliant paths (default=no)"
17 ac_help="$ac_help
18   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
19 ac_help="$ac_help
20   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
21 ac_help="$ac_help
22   --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)"
23 ac_help="$ac_help
24   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
25 ac_help="$ac_help
26   --with-configdir=DIR    Where to put configuration files (\$libdir)"
27 ac_help="$ac_help
28   --with-logfilebase=DIR  Where to put log files (\$(VARDIR))"
29 ac_help="$ac_help
30   --enable-debug          Turn on compiler debugging information (default=no)"
31 ac_help="$ac_help
32   --enable-developer      Turn on developer warnings and debugging (default=no)"
33 ac_help="$ac_help
34   --enable-krb5developer  Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)"
35 ac_help="$ac_help
36   --enable-dmalloc        Enable heap debugging [default=no]"
37 ac_help="$ac_help
38   --enable-cups           Turn on CUPS support (default=auto)"
39 ac_help="$ac_help
40   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
41 ac_help="$ac_help
42   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
43 ac_help="$ac_help
44   --with-smbwrapper       Include SMB wrapper support (default=no) "
45 ac_help="$ac_help
46   --with-afs              Include AFS clear-text auth support (default=no) "
47 ac_help="$ac_help
48   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
49 ac_help="$ac_help
50   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
51 ac_help="$ac_help
52   --with-automount        Include AUTOMOUNT support (default=no)"
53 ac_help="$ac_help
54   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
55 ac_help="$ac_help
56   --with-pam              Include PAM support (default=no)"
57 ac_help="$ac_help
58   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
59 ac_help="$ac_help
60   --with-tdbsam           Include experimental TDB SAM support (default=no)"
61 ac_help="$ac_help
62   --with-nisplussam       Include NISPLUS SAM support (default=no)"
63 ac_help="$ac_help
64   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
65 ac_help="$ac_help
66   --with-syslog           Include experimental SYSLOG support (default=no)"
67 ac_help="$ac_help
68   --with-profiling-data   Include gathering source code profile information (default=no)"
69 ac_help="$ac_help
70   --with-quotas           Include experimental disk-quota support (default=no)"
71 ac_help="$ac_help
72   --with-utmp             Include experimental utmp accounting (default=no)"
73 ac_help="$ac_help
74   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
75 ac_help="$ac_help
76   --with-libsmbclient     Build the libsmbclient shared library (default=yes)"
77 ac_help="$ac_help
78   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
79 ac_help="$ac_help
80   --with-acl-support      Include ACL support (default=no)"
81 ac_help="$ac_help
82   --with-winbind          Build winbind (default, if supported by OS)"
83 ac_help="$ac_help
84   --with-included-popt    use bundled popt library, not from system"
85
86 # Initialize some variables set by options.
87 # The variables have the same names as the options, with
88 # dashes changed to underlines.
89 build=NONE
90 cache_file=./config.cache
91 exec_prefix=NONE
92 host=NONE
93 no_create=
94 nonopt=NONE
95 no_recursion=
96 prefix=NONE
97 program_prefix=NONE
98 program_suffix=NONE
99 program_transform_name=s,x,x,
100 silent=
101 site=
102 srcdir=
103 target=NONE
104 verbose=
105 x_includes=NONE
106 x_libraries=NONE
107 bindir='${exec_prefix}/bin'
108 sbindir='${exec_prefix}/sbin'
109 libexecdir='${exec_prefix}/libexec'
110 datadir='${prefix}/share'
111 sysconfdir='${prefix}/etc'
112 sharedstatedir='${prefix}/com'
113 localstatedir='${prefix}/var'
114 libdir='${exec_prefix}/lib'
115 includedir='${prefix}/include'
116 oldincludedir='/usr/include'
117 infodir='${prefix}/info'
118 mandir='${prefix}/man'
119
120 # Initialize some other variables.
121 subdirs=
122 MFLAGS= MAKEFLAGS=
123 SHELL=${CONFIG_SHELL-/bin/sh}
124 # Maximum number of lines to put in a shell here document.
125 ac_max_here_lines=12
126
127 ac_prev=
128 for ac_option
129 do
130
131   # If the previous option needs an argument, assign it.
132   if test -n "$ac_prev"; then
133     eval "$ac_prev=\$ac_option"
134     ac_prev=
135     continue
136   fi
137
138   case "$ac_option" in
139   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
140   *) ac_optarg= ;;
141   esac
142
143   # Accept the important Cygnus configure options, so we can diagnose typos.
144
145   case "$ac_option" in
146
147   -bindir | --bindir | --bindi | --bind | --bin | --bi)
148     ac_prev=bindir ;;
149   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
150     bindir="$ac_optarg" ;;
151
152   -build | --build | --buil | --bui | --bu)
153     ac_prev=build ;;
154   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
155     build="$ac_optarg" ;;
156
157   -cache-file | --cache-file | --cache-fil | --cache-fi \
158   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
159     ac_prev=cache_file ;;
160   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
161   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
162     cache_file="$ac_optarg" ;;
163
164   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
165     ac_prev=datadir ;;
166   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
167   | --da=*)
168     datadir="$ac_optarg" ;;
169
170   -disable-* | --disable-*)
171     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
172     # Reject names that are not valid shell variable names.
173     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
174       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
175     fi
176     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
177     eval "enable_${ac_feature}=no" ;;
178
179   -enable-* | --enable-*)
180     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
181     # Reject names that are not valid shell variable names.
182     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
183       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
184     fi
185     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
186     case "$ac_option" in
187       *=*) ;;
188       *) ac_optarg=yes ;;
189     esac
190     eval "enable_${ac_feature}='$ac_optarg'" ;;
191
192   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
193   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
194   | --exec | --exe | --ex)
195     ac_prev=exec_prefix ;;
196   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
197   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
198   | --exec=* | --exe=* | --ex=*)
199     exec_prefix="$ac_optarg" ;;
200
201   -gas | --gas | --ga | --g)
202     # Obsolete; use --with-gas.
203     with_gas=yes ;;
204
205   -help | --help | --hel | --he)
206     # Omit some internal or obsolete options to make the list less imposing.
207     # This message is too long to be a string in the A/UX 3.1 sh.
208     cat << EOF
209 Usage: configure [options] [host]
210 Options: [defaults in brackets after descriptions]
211 Configuration:
212   --cache-file=FILE       cache test results in FILE
213   --help                  print this message
214   --no-create             do not create output files
215   --quiet, --silent       do not print \`checking...' messages
216   --version               print the version of autoconf that created configure
217 Directory and file names:
218   --prefix=PREFIX         install architecture-independent files in PREFIX
219                           [$ac_default_prefix]
220   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
221                           [same as prefix]
222   --bindir=DIR            user executables in DIR [EPREFIX/bin]
223   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
224   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
225   --datadir=DIR           read-only architecture-independent data in DIR
226                           [PREFIX/share]
227   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
228   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
229                           [PREFIX/com]
230   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
231   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
232   --includedir=DIR        C header files in DIR [PREFIX/include]
233   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
234   --infodir=DIR           info documentation in DIR [PREFIX/info]
235   --mandir=DIR            man documentation in DIR [PREFIX/man]
236   --srcdir=DIR            find the sources in DIR [configure dir or ..]
237   --program-prefix=PREFIX prepend PREFIX to installed program names
238   --program-suffix=SUFFIX append SUFFIX to installed program names
239   --program-transform-name=PROGRAM
240                           run sed PROGRAM on installed program names
241 EOF
242     cat << EOF
243 Host type:
244   --build=BUILD           configure for building on BUILD [BUILD=HOST]
245   --host=HOST             configure for HOST [guessed]
246   --target=TARGET         configure for TARGET [TARGET=HOST]
247 Features and packages:
248   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
249   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
250   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
251   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
252   --x-includes=DIR        X include files are in DIR
253   --x-libraries=DIR       X library files are in DIR
254 EOF
255     if test -n "$ac_help"; then
256       echo "--enable and --with options recognized:$ac_help"
257     fi
258     exit 0 ;;
259
260   -host | --host | --hos | --ho)
261     ac_prev=host ;;
262   -host=* | --host=* | --hos=* | --ho=*)
263     host="$ac_optarg" ;;
264
265   -includedir | --includedir | --includedi | --included | --include \
266   | --includ | --inclu | --incl | --inc)
267     ac_prev=includedir ;;
268   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
269   | --includ=* | --inclu=* | --incl=* | --inc=*)
270     includedir="$ac_optarg" ;;
271
272   -infodir | --infodir | --infodi | --infod | --info | --inf)
273     ac_prev=infodir ;;
274   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
275     infodir="$ac_optarg" ;;
276
277   -libdir | --libdir | --libdi | --libd)
278     ac_prev=libdir ;;
279   -libdir=* | --libdir=* | --libdi=* | --libd=*)
280     libdir="$ac_optarg" ;;
281
282   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
283   | --libexe | --libex | --libe)
284     ac_prev=libexecdir ;;
285   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
286   | --libexe=* | --libex=* | --libe=*)
287     libexecdir="$ac_optarg" ;;
288
289   -localstatedir | --localstatedir | --localstatedi | --localstated \
290   | --localstate | --localstat | --localsta | --localst \
291   | --locals | --local | --loca | --loc | --lo)
292     ac_prev=localstatedir ;;
293   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
294   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
295   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
296     localstatedir="$ac_optarg" ;;
297
298   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
299     ac_prev=mandir ;;
300   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
301     mandir="$ac_optarg" ;;
302
303   -nfp | --nfp | --nf)
304     # Obsolete; use --without-fp.
305     with_fp=no ;;
306
307   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
308   | --no-cr | --no-c)
309     no_create=yes ;;
310
311   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
312   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
313     no_recursion=yes ;;
314
315   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
316   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
317   | --oldin | --oldi | --old | --ol | --o)
318     ac_prev=oldincludedir ;;
319   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
320   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
321   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
322     oldincludedir="$ac_optarg" ;;
323
324   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
325     ac_prev=prefix ;;
326   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
327     prefix="$ac_optarg" ;;
328
329   -program-prefix | --program-prefix | --program-prefi | --program-pref \
330   | --program-pre | --program-pr | --program-p)
331     ac_prev=program_prefix ;;
332   -program-prefix=* | --program-prefix=* | --program-prefi=* \
333   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
334     program_prefix="$ac_optarg" ;;
335
336   -program-suffix | --program-suffix | --program-suffi | --program-suff \
337   | --program-suf | --program-su | --program-s)
338     ac_prev=program_suffix ;;
339   -program-suffix=* | --program-suffix=* | --program-suffi=* \
340   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
341     program_suffix="$ac_optarg" ;;
342
343   -program-transform-name | --program-transform-name \
344   | --program-transform-nam | --program-transform-na \
345   | --program-transform-n | --program-transform- \
346   | --program-transform | --program-transfor \
347   | --program-transfo | --program-transf \
348   | --program-trans | --program-tran \
349   | --progr-tra | --program-tr | --program-t)
350     ac_prev=program_transform_name ;;
351   -program-transform-name=* | --program-transform-name=* \
352   | --program-transform-nam=* | --program-transform-na=* \
353   | --program-transform-n=* | --program-transform-=* \
354   | --program-transform=* | --program-transfor=* \
355   | --program-transfo=* | --program-transf=* \
356   | --program-trans=* | --program-tran=* \
357   | --progr-tra=* | --program-tr=* | --program-t=*)
358     program_transform_name="$ac_optarg" ;;
359
360   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
361   | -silent | --silent | --silen | --sile | --sil)
362     silent=yes ;;
363
364   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
365     ac_prev=sbindir ;;
366   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
367   | --sbi=* | --sb=*)
368     sbindir="$ac_optarg" ;;
369
370   -sharedstatedir | --sharedstatedir | --sharedstatedi \
371   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
372   | --sharedst | --shareds | --shared | --share | --shar \
373   | --sha | --sh)
374     ac_prev=sharedstatedir ;;
375   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
376   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
377   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
378   | --sha=* | --sh=*)
379     sharedstatedir="$ac_optarg" ;;
380
381   -site | --site | --sit)
382     ac_prev=site ;;
383   -site=* | --site=* | --sit=*)
384     site="$ac_optarg" ;;
385
386   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
387     ac_prev=srcdir ;;
388   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
389     srcdir="$ac_optarg" ;;
390
391   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
392   | --syscon | --sysco | --sysc | --sys | --sy)
393     ac_prev=sysconfdir ;;
394   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
395   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
396     sysconfdir="$ac_optarg" ;;
397
398   -target | --target | --targe | --targ | --tar | --ta | --t)
399     ac_prev=target ;;
400   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
401     target="$ac_optarg" ;;
402
403   -v | -verbose | --verbose | --verbos | --verbo | --verb)
404     verbose=yes ;;
405
406   -version | --version | --versio | --versi | --vers)
407     echo "configure generated by autoconf version 2.13"
408     exit 0 ;;
409
410   -with-* | --with-*)
411     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
412     # Reject names that are not valid shell variable names.
413     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
414       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415     fi
416     ac_package=`echo $ac_package| sed 's/-/_/g'`
417     case "$ac_option" in
418       *=*) ;;
419       *) ac_optarg=yes ;;
420     esac
421     eval "with_${ac_package}='$ac_optarg'" ;;
422
423   -without-* | --without-*)
424     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
425     # Reject names that are not valid shell variable names.
426     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
427       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
428     fi
429     ac_package=`echo $ac_package| sed 's/-/_/g'`
430     eval "with_${ac_package}=no" ;;
431
432   --x)
433     # Obsolete; use --with-x.
434     with_x=yes ;;
435
436   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
437   | --x-incl | --x-inc | --x-in | --x-i)
438     ac_prev=x_includes ;;
439   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
440   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
441     x_includes="$ac_optarg" ;;
442
443   -x-libraries | --x-libraries | --x-librarie | --x-librari \
444   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
445     ac_prev=x_libraries ;;
446   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
447   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
448     x_libraries="$ac_optarg" ;;
449
450   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
451     ;;
452
453   *)
454     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
455       echo "configure: warning: $ac_option: invalid host type" 1>&2
456     fi
457     if test "x$nonopt" != xNONE; then
458       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
459     fi
460     nonopt="$ac_option"
461     ;;
462
463   esac
464 done
465
466 if test -n "$ac_prev"; then
467   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
468 fi
469
470 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
471
472 # File descriptor usage:
473 # 0 standard input
474 # 1 file creation
475 # 2 errors and warnings
476 # 3 some systems may open it to /dev/tty
477 # 4 used on the Kubota Titan
478 # 6 checking for... messages and results
479 # 5 compiler messages saved in config.log
480 if test "$silent" = yes; then
481   exec 6>/dev/null
482 else
483   exec 6>&1
484 fi
485 exec 5>./config.log
486
487 echo "\
488 This file contains any messages produced by compilers while
489 running configure, to aid debugging if configure makes a mistake.
490 " 1>&5
491
492 # Strip out --no-create and --no-recursion so they do not pile up.
493 # Also quote any args containing shell metacharacters.
494 ac_configure_args=
495 for ac_arg
496 do
497   case "$ac_arg" in
498   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
499   | --no-cr | --no-c) ;;
500   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
501   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
502   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
503   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
504   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
505   esac
506 done
507
508 # NLS nuisances.
509 # Only set these to C if already set.  These must not be set unconditionally
510 # because not all systems understand e.g. LANG=C (notably SCO).
511 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
512 # Non-C LC_CTYPE values break the ctype check.
513 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
514 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
515 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
516 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
517
518 # confdefs.h avoids OS command line length limits that DEFS can exceed.
519 rm -rf conftest* confdefs.h
520 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
521 echo > confdefs.h
522
523 # A filename unique to this package, relative to the directory that
524 # configure is in, which we can look for to find out if srcdir is correct.
525 ac_unique_file=include/includes.h
526
527 # Find the source files, if location was not specified.
528 if test -z "$srcdir"; then
529   ac_srcdir_defaulted=yes
530   # Try the directory containing this script, then its parent.
531   ac_prog=$0
532   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
533   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
534   srcdir=$ac_confdir
535   if test ! -r $srcdir/$ac_unique_file; then
536     srcdir=..
537   fi
538 else
539   ac_srcdir_defaulted=no
540 fi
541 if test ! -r $srcdir/$ac_unique_file; then
542   if test "$ac_srcdir_defaulted" = yes; then
543     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
544   else
545     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
546   fi
547 fi
548 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
549
550 # Prefer explicitly selected file to automatically selected ones.
551 if test -z "$CONFIG_SITE"; then
552   if test "x$prefix" != xNONE; then
553     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
554   else
555     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
556   fi
557 fi
558 for ac_site_file in $CONFIG_SITE; do
559   if test -r "$ac_site_file"; then
560     echo "loading site script $ac_site_file"
561     . "$ac_site_file"
562   fi
563 done
564
565 if test -r "$cache_file"; then
566   echo "loading cache $cache_file"
567   . $cache_file
568 else
569   echo "creating cache $cache_file"
570   > $cache_file
571 fi
572
573 ac_ext=c
574 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
575 ac_cpp='$CPP $CPPFLAGS'
576 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
577 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
578 cross_compiling=$ac_cv_prog_cc_cross
579
580 ac_exeext=
581 ac_objext=o
582 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
583   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
584   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
585     ac_n= ac_c='
586 ' ac_t='        '
587   else
588     ac_n=-n ac_c= ac_t=
589   fi
590 else
591   ac_n= ac_c='\c' ac_t=
592 fi
593
594
595
596
597 #################################################
598 # Directory handling stuff to support both the
599 # legacy SAMBA directories and FHS compliant
600 # ones...
601
602
603 # Check whether --with-fhs or --without-fhs was given.
604 if test "${with_fhs+set}" = set; then
605   withval="$with_fhs"
606   configdir="${sysconfdir}/samba"
607     lockdir="\${VARDIR}/cache/samba"
608     piddir="\$(VARDIR)/run/samba"
609     logfilebase="\${VARDIR}/log/samba"
610     privatedir="\${CONFIGDIR}/private"
611     swatdir="\${DATADIR}/samba/swat"
612 else
613   configdir="\$(LIBDIR)"
614     logfilebase="\$(VARDIR)"
615     lockdir="\${VARDIR}/locks"
616     piddir="\$(VARDIR)/locks"
617     privatedir="\${prefix}/private"
618     swatdir="\${prefix}/swat"
619 fi
620
621
622 #################################################
623 # set private directory location
624 # Check whether --with-privatedir or --without-privatedir was given.
625 if test "${with_privatedir+set}" = set; then
626   withval="$with_privatedir"
627    case "$withval" in
628   yes|no)
629   #
630   # Just in case anybody calls it without argument
631   #
632     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
633   ;;
634   * )
635     privatedir="$withval"
636     ;;
637   esac
638 fi
639
640
641 #################################################
642 # set lock directory location
643 # Check whether --with-lockdir or --without-lockdir was given.
644 if test "${with_lockdir+set}" = set; then
645   withval="$with_lockdir"
646    case "$withval" in
647   yes|no)
648   #
649   # Just in case anybody calls it without argument
650   #
651     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
652   ;;
653   * )
654     lockdir="$withval"
655     ;;
656   esac
657 fi
658
659
660 #################################################
661 # set pid directory location
662 # Check whether --with-piddir or --without-piddir was given.
663 if test "${with_piddir+set}" = set; then
664   withval="$with_piddir"
665    case "$withval" in
666   yes|no)
667   #
668   # Just in case anybody calls it without argument
669   #
670     echo "configure: warning: --with-piddir called without argument - will use default" 1>&2
671   ;;
672   * )
673     piddir="$withval"
674     ;;
675   esac
676 fi
677
678
679 #################################################
680 # set SWAT directory location
681 # Check whether --with-swatdir or --without-swatdir was given.
682 if test "${with_swatdir+set}" = set; then
683   withval="$with_swatdir"
684    case "$withval" in
685   yes|no)
686   #
687   # Just in case anybody does it
688   #
689     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
690   ;;
691   * )
692     swatdir="$withval"
693     ;;
694   esac
695 fi
696
697
698 #################################################
699 # set configuration directory location
700 # Check whether --with-configdir or --without-configdir was given.
701 if test "${with_configdir+set}" = set; then
702   withval="$with_configdir"
703    case "$withval" in
704   yes|no)
705   #
706   # Just in case anybody does it
707   #
708     echo "configure: warning: --with-configdir called without argument - will use default" 1>&2
709   ;;
710   * )
711     configdir="$withval"
712     ;;
713   esac
714 fi
715
716
717 #################################################
718 # set log directory location
719 # Check whether --with-logfilebase or --without-logfilebase was given.
720 if test "${with_logfilebase+set}" = set; then
721   withval="$with_logfilebase"
722    case "$withval" in
723   yes|no)
724   #
725   # Just in case anybody does it
726   #
727     echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2
728   ;;
729   * )
730     logfilebase="$withval"
731     ;;
732   esac
733 fi
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763 # compile with optimization and without debugging by default
764 CFLAGS="-O ${CFLAGS}"
765
766 # Check whether --enable-debug or --disable-debug was given.
767 if test "${enable_debug+set}" = set; then
768   enableval="$enable_debug"
769   if eval "test x$enable_debug = xyes"; then
770         CFLAGS="${CFLAGS} -g"
771     fi
772 fi
773
774
775 # Check whether --enable-developer or --disable-developer was given.
776 if test "${enable_developer+set}" = set; then
777   enableval="$enable_developer"
778   if eval "test x$enable_developer = xyes"; then
779         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
780     fi
781 fi
782
783
784 # Check whether --enable-krb5developer or --disable-krb5developer was given.
785 if test "${enable_krb5developer+set}" = set; then
786   enableval="$enable_krb5developer"
787   if eval "test x$enable_krb5developer = xyes"; then
788         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
789     fi
790 fi
791
792
793 # Check whether --enable-dmalloc or --disable-dmalloc was given.
794 if test "${enable_dmalloc+set}" = set; then
795   enableval="$enable_dmalloc"
796   :
797 fi
798
799
800 if test "x$enable_dmalloc" = xyes
801 then
802         cat >> confdefs.h <<\EOF
803 #define ENABLE_DMALLOC 1
804 EOF
805
806         cat >> confdefs.h <<\EOF
807 #define DMALLOC_FUNC_CHECK 1
808 EOF
809
810         LIBS="$LIBS -ldmalloc"  
811 fi
812
813 # Extract the first word of "gcc", so it can be a program name with args.
814 set dummy gcc; ac_word=$2
815 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
816 echo "configure:817: checking for $ac_word" >&5
817 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
818   echo $ac_n "(cached) $ac_c" 1>&6
819 else
820   if test -n "$CC"; then
821   ac_cv_prog_CC="$CC" # Let the user override the test.
822 else
823   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
824   ac_dummy="$PATH"
825   for ac_dir in $ac_dummy; do
826     test -z "$ac_dir" && ac_dir=.
827     if test -f $ac_dir/$ac_word; then
828       ac_cv_prog_CC="gcc"
829       break
830     fi
831   done
832   IFS="$ac_save_ifs"
833 fi
834 fi
835 CC="$ac_cv_prog_CC"
836 if test -n "$CC"; then
837   echo "$ac_t""$CC" 1>&6
838 else
839   echo "$ac_t""no" 1>&6
840 fi
841
842 if test -z "$CC"; then
843   # Extract the first word of "cc", so it can be a program name with args.
844 set dummy cc; ac_word=$2
845 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
846 echo "configure:847: checking for $ac_word" >&5
847 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
848   echo $ac_n "(cached) $ac_c" 1>&6
849 else
850   if test -n "$CC"; then
851   ac_cv_prog_CC="$CC" # Let the user override the test.
852 else
853   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
854   ac_prog_rejected=no
855   ac_dummy="$PATH"
856   for ac_dir in $ac_dummy; do
857     test -z "$ac_dir" && ac_dir=.
858     if test -f $ac_dir/$ac_word; then
859       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
860         ac_prog_rejected=yes
861         continue
862       fi
863       ac_cv_prog_CC="cc"
864       break
865     fi
866   done
867   IFS="$ac_save_ifs"
868 if test $ac_prog_rejected = yes; then
869   # We found a bogon in the path, so make sure we never use it.
870   set dummy $ac_cv_prog_CC
871   shift
872   if test $# -gt 0; then
873     # We chose a different compiler from the bogus one.
874     # However, it has the same basename, so the bogon will be chosen
875     # first if we set CC to just the basename; use the full file name.
876     shift
877     set dummy "$ac_dir/$ac_word" "$@"
878     shift
879     ac_cv_prog_CC="$@"
880   fi
881 fi
882 fi
883 fi
884 CC="$ac_cv_prog_CC"
885 if test -n "$CC"; then
886   echo "$ac_t""$CC" 1>&6
887 else
888   echo "$ac_t""no" 1>&6
889 fi
890
891   if test -z "$CC"; then
892     case "`uname -s`" in
893     *win32* | *WIN32*)
894       # Extract the first word of "cl", so it can be a program name with args.
895 set dummy cl; ac_word=$2
896 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
897 echo "configure:898: checking for $ac_word" >&5
898 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
899   echo $ac_n "(cached) $ac_c" 1>&6
900 else
901   if test -n "$CC"; then
902   ac_cv_prog_CC="$CC" # Let the user override the test.
903 else
904   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
905   ac_dummy="$PATH"
906   for ac_dir in $ac_dummy; do
907     test -z "$ac_dir" && ac_dir=.
908     if test -f $ac_dir/$ac_word; then
909       ac_cv_prog_CC="cl"
910       break
911     fi
912   done
913   IFS="$ac_save_ifs"
914 fi
915 fi
916 CC="$ac_cv_prog_CC"
917 if test -n "$CC"; then
918   echo "$ac_t""$CC" 1>&6
919 else
920   echo "$ac_t""no" 1>&6
921 fi
922  ;;
923     esac
924   fi
925   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
926 fi
927
928 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
929 echo "configure:930: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
930
931 ac_ext=c
932 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
933 ac_cpp='$CPP $CPPFLAGS'
934 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
935 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
936 cross_compiling=$ac_cv_prog_cc_cross
937
938 cat > conftest.$ac_ext << EOF
939
940 #line 941 "configure"
941 #include "confdefs.h"
942
943 main(){return(0);}
944 EOF
945 if { (eval echo configure:946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
946   ac_cv_prog_cc_works=yes
947   # If we can't run a trivial program, we are probably using a cross compiler.
948   if (./conftest; exit) 2>/dev/null; then
949     ac_cv_prog_cc_cross=no
950   else
951     ac_cv_prog_cc_cross=yes
952   fi
953 else
954   echo "configure: failed program was:" >&5
955   cat conftest.$ac_ext >&5
956   ac_cv_prog_cc_works=no
957 fi
958 rm -fr conftest*
959 ac_ext=c
960 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
961 ac_cpp='$CPP $CPPFLAGS'
962 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
963 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
964 cross_compiling=$ac_cv_prog_cc_cross
965
966 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
967 if test $ac_cv_prog_cc_works = no; then
968   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
969 fi
970 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
971 echo "configure:972: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
972 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
973 cross_compiling=$ac_cv_prog_cc_cross
974
975 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
976 echo "configure:977: checking whether we are using GNU C" >&5
977 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
978   echo $ac_n "(cached) $ac_c" 1>&6
979 else
980   cat > conftest.c <<EOF
981 #ifdef __GNUC__
982   yes;
983 #endif
984 EOF
985 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
986   ac_cv_prog_gcc=yes
987 else
988   ac_cv_prog_gcc=no
989 fi
990 fi
991
992 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
993
994 if test $ac_cv_prog_gcc = yes; then
995   GCC=yes
996 else
997   GCC=
998 fi
999
1000 ac_test_CFLAGS="${CFLAGS+set}"
1001 ac_save_CFLAGS="$CFLAGS"
1002 CFLAGS=
1003 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1004 echo "configure:1005: checking whether ${CC-cc} accepts -g" >&5
1005 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1006   echo $ac_n "(cached) $ac_c" 1>&6
1007 else
1008   echo 'void f(){}' > conftest.c
1009 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1010   ac_cv_prog_cc_g=yes
1011 else
1012   ac_cv_prog_cc_g=no
1013 fi
1014 rm -f conftest*
1015
1016 fi
1017
1018 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1019 if test "$ac_test_CFLAGS" = set; then
1020   CFLAGS="$ac_save_CFLAGS"
1021 elif test $ac_cv_prog_cc_g = yes; then
1022   if test "$GCC" = yes; then
1023     CFLAGS="-g -O2"
1024   else
1025     CFLAGS="-g"
1026   fi
1027 else
1028   if test "$GCC" = yes; then
1029     CFLAGS="-O2"
1030   else
1031     CFLAGS=
1032   fi
1033 fi
1034
1035 ac_aux_dir=
1036 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1037   if test -f $ac_dir/install-sh; then
1038     ac_aux_dir=$ac_dir
1039     ac_install_sh="$ac_aux_dir/install-sh -c"
1040     break
1041   elif test -f $ac_dir/install.sh; then
1042     ac_aux_dir=$ac_dir
1043     ac_install_sh="$ac_aux_dir/install.sh -c"
1044     break
1045   fi
1046 done
1047 if test -z "$ac_aux_dir"; then
1048   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1049 fi
1050 ac_config_guess=$ac_aux_dir/config.guess
1051 ac_config_sub=$ac_aux_dir/config.sub
1052 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1053
1054 # Find a good install program.  We prefer a C program (faster),
1055 # so one script is as good as another.  But avoid the broken or
1056 # incompatible versions:
1057 # SysV /etc/install, /usr/sbin/install
1058 # SunOS /usr/etc/install
1059 # IRIX /sbin/install
1060 # AIX /bin/install
1061 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1062 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1063 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1064 # ./install, which can be erroneously created by make from ./install.sh.
1065 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1066 echo "configure:1067: checking for a BSD compatible install" >&5
1067 if test -z "$INSTALL"; then
1068 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1069   echo $ac_n "(cached) $ac_c" 1>&6
1070 else
1071     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1072   for ac_dir in $PATH; do
1073     # Account for people who put trailing slashes in PATH elements.
1074     case "$ac_dir/" in
1075     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1076     *)
1077       # OSF1 and SCO ODT 3.0 have their own names for install.
1078       # Don't use installbsd from OSF since it installs stuff as root
1079       # by default.
1080       for ac_prog in ginstall scoinst install; do
1081         if test -f $ac_dir/$ac_prog; then
1082           if test $ac_prog = install &&
1083             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1084             # AIX install.  It has an incompatible calling convention.
1085             :
1086           else
1087             ac_cv_path_install="$ac_dir/$ac_prog -c"
1088             break 2
1089           fi
1090         fi
1091       done
1092       ;;
1093     esac
1094   done
1095   IFS="$ac_save_IFS"
1096
1097 fi
1098   if test "${ac_cv_path_install+set}" = set; then
1099     INSTALL="$ac_cv_path_install"
1100   else
1101     # As a last resort, use the slow shell script.  We don't cache a
1102     # path for INSTALL within a source directory, because that will
1103     # break other packages using the cache if that directory is
1104     # removed, or if the path is relative.
1105     INSTALL="$ac_install_sh"
1106   fi
1107 fi
1108 echo "$ac_t""$INSTALL" 1>&6
1109
1110 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1111 # It thinks the first close brace ends the variable substitution.
1112 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1113
1114 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1115
1116 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1117
1118 for ac_prog in mawk gawk nawk awk
1119 do
1120 # Extract the first word of "$ac_prog", so it can be a program name with args.
1121 set dummy $ac_prog; ac_word=$2
1122 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1123 echo "configure:1124: checking for $ac_word" >&5
1124 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1125   echo $ac_n "(cached) $ac_c" 1>&6
1126 else
1127   if test -n "$AWK"; then
1128   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1129 else
1130   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1131   ac_dummy="$PATH"
1132   for ac_dir in $ac_dummy; do
1133     test -z "$ac_dir" && ac_dir=.
1134     if test -f $ac_dir/$ac_word; then
1135       ac_cv_prog_AWK="$ac_prog"
1136       break
1137     fi
1138   done
1139   IFS="$ac_save_ifs"
1140 fi
1141 fi
1142 AWK="$ac_cv_prog_AWK"
1143 if test -n "$AWK"; then
1144   echo "$ac_t""$AWK" 1>&6
1145 else
1146   echo "$ac_t""no" 1>&6
1147 fi
1148
1149 test -n "$AWK" && break
1150 done
1151
1152
1153 LD=ld
1154 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1155 echo "configure:1156: checking if the linker ($LD) is GNU ld" >&5
1156 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1157   echo $ac_n "(cached) $ac_c" 1>&6
1158 else
1159   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1160 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1161   ac_cv_prog_gnu_ld=yes
1162 else
1163   ac_cv_prog_gnu_ld=no
1164 fi
1165 fi
1166
1167 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1168
1169
1170 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1171 echo "configure:1172: checking for POSIXized ISC" >&5
1172 if test -d /etc/conf/kconfig.d &&
1173   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1174 then
1175   echo "$ac_t""yes" 1>&6
1176   ISC=yes # If later tests want to check for ISC.
1177   cat >> confdefs.h <<\EOF
1178 #define _POSIX_SOURCE 1
1179 EOF
1180
1181   if test "$GCC" = yes; then
1182     CC="$CC -posix"
1183   else
1184     CC="$CC -Xp"
1185   fi
1186 else
1187   echo "$ac_t""no" 1>&6
1188   ISC=
1189 fi
1190
1191
1192 if test "x$CC" != xcc; then
1193   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1194 echo "configure:1195: checking whether $CC and cc understand -c and -o together" >&5
1195 else
1196   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1197 echo "configure:1198: checking whether cc understands -c and -o together" >&5
1198 fi
1199 set dummy $CC; ac_cc="`echo $2 |
1200                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1201 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1202   echo $ac_n "(cached) $ac_c" 1>&6
1203 else
1204   echo 'foo(){}' > conftest.c
1205 # Make sure it works both with $CC and with simple cc.
1206 # We do the test twice because some compilers refuse to overwrite an
1207 # existing .o file with -o, though they will create one.
1208 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1209 if { (eval echo configure:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1210    test -f conftest.o && { (eval echo configure:1211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1211 then
1212   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1213   if test "x$CC" != xcc; then
1214     # Test first that cc exists at all.
1215     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1216       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1217       if { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1218          test -f conftest.o && { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1219       then
1220         # cc works too.
1221         :
1222       else
1223         # cc exists but doesn't like -o.
1224         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1225       fi
1226     fi
1227   fi
1228 else
1229   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1230 fi
1231 rm -f conftest*
1232
1233 fi
1234 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1235   echo "$ac_t""yes" 1>&6
1236 else
1237   echo "$ac_t""no" 1>&6
1238   cat >> confdefs.h <<\EOF
1239 #define NO_MINUS_C_MINUS_O 1
1240 EOF
1241
1242 fi
1243
1244 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1245       BROKEN_CC=
1246 else
1247       BROKEN_CC=#
1248 fi
1249
1250
1251 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1252 echo "configure:1253: checking that the C compiler understands volatile" >&5
1253 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1254   echo $ac_n "(cached) $ac_c" 1>&6
1255 else
1256   
1257     cat > conftest.$ac_ext <<EOF
1258 #line 1259 "configure"
1259 #include "confdefs.h"
1260 #include <sys/types.h>
1261 int main() {
1262 volatile int i = 0
1263 ; return 0; }
1264 EOF
1265 if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1266   rm -rf conftest*
1267   samba_cv_volatile=yes
1268 else
1269   echo "configure: failed program was:" >&5
1270   cat conftest.$ac_ext >&5
1271   rm -rf conftest*
1272   samba_cv_volatile=no
1273 fi
1274 rm -f conftest*
1275 fi
1276
1277 echo "$ac_t""$samba_cv_volatile" 1>&6
1278 if test x"$samba_cv_volatile" = x"yes"; then
1279    cat >> confdefs.h <<\EOF
1280 #define HAVE_VOLATILE 1
1281 EOF
1282
1283 fi
1284
1285
1286
1287 # Do some error checking and defaulting for the host and target type.
1288 # The inputs are:
1289 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1290 #
1291 # The rules are:
1292 # 1. You are not allowed to specify --host, --target, and nonopt at the
1293 #    same time.
1294 # 2. Host defaults to nonopt.
1295 # 3. If nonopt is not specified, then host defaults to the current host,
1296 #    as determined by config.guess.
1297 # 4. Target and build default to nonopt.
1298 # 5. If nonopt is not specified, then target and build default to host.
1299
1300 # The aliases save the names the user supplied, while $host etc.
1301 # will get canonicalized.
1302 case $host---$target---$nonopt in
1303 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1304 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1305 esac
1306
1307
1308 # Make sure we can run config.sub.
1309 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1310 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1311 fi
1312
1313 echo $ac_n "checking host system type""... $ac_c" 1>&6
1314 echo "configure:1315: checking host system type" >&5
1315
1316 host_alias=$host
1317 case "$host_alias" in
1318 NONE)
1319   case $nonopt in
1320   NONE)
1321     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1322     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1323     fi ;;
1324   *) host_alias=$nonopt ;;
1325   esac ;;
1326 esac
1327
1328 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1329 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1330 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1331 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1332 echo "$ac_t""$host" 1>&6
1333
1334 echo $ac_n "checking target system type""... $ac_c" 1>&6
1335 echo "configure:1336: checking target system type" >&5
1336
1337 target_alias=$target
1338 case "$target_alias" in
1339 NONE)
1340   case $nonopt in
1341   NONE) target_alias=$host_alias ;;
1342   *) target_alias=$nonopt ;;
1343   esac ;;
1344 esac
1345
1346 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1347 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1348 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1349 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1350 echo "$ac_t""$target" 1>&6
1351
1352 echo $ac_n "checking build system type""... $ac_c" 1>&6
1353 echo "configure:1354: checking build system type" >&5
1354
1355 build_alias=$build
1356 case "$build_alias" in
1357 NONE)
1358   case $nonopt in
1359   NONE) build_alias=$host_alias ;;
1360   *) build_alias=$nonopt ;;
1361   esac ;;
1362 esac
1363
1364 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1365 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1366 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1367 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1368 echo "$ac_t""$build" 1>&6
1369
1370 test "$host_alias" != "$target_alias" &&
1371   test "$program_prefix$program_suffix$program_transform_name" = \
1372     NONENONEs,x,x, &&
1373   program_prefix=${target_alias}-
1374
1375
1376   case "$host_os" in
1377         *irix6*) cat >> confdefs.h <<\EOF
1378 #include <standards.h>
1379 EOF
1380
1381         ;;
1382 esac
1383
1384
1385     
1386     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1387 echo "configure:1388: checking config.cache system type" >&5
1388     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1389          test x"$ac_cv_host_system_type" != x"$host"; } ||
1390        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1391          test x"$ac_cv_build_system_type" != x"$build"; } ||
1392        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1393          test x"$ac_cv_target_system_type" != x"$target"; }; then
1394         echo "$ac_t""different" 1>&6
1395         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1396     else
1397         echo "$ac_t""same" 1>&6
1398     fi
1399     ac_cv_host_system_type="$host"
1400     ac_cv_build_system_type="$build"
1401     ac_cv_target_system_type="$target"
1402
1403
1404 DYNEXP=
1405
1406 #
1407 # Config CPPFLAG settings for strange OS's that must be set
1408 # before other tests.
1409 #
1410 case "$host_os" in
1411 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1412     *hpux*)
1413     
1414       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1415 echo "configure:1416: checking whether ${CC-cc} accepts -Ae" >&5
1416 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1417   echo $ac_n "(cached) $ac_c" 1>&6
1418 else
1419   echo 'void f(){}' > conftest.c
1420 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1421   ac_cv_prog_cc_Ae=yes
1422 else
1423   ac_cv_prog_cc_Ae=no
1424 fi
1425 rm -f conftest*
1426
1427 fi
1428
1429 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1430       # mmap on HPUX is completely broken...
1431       cat >> confdefs.h <<\EOF
1432 #define MMAP_BLACKLIST 1
1433 EOF
1434
1435       if test $ac_cv_prog_cc_Ae = yes; then
1436         CPPFLAGS="$CPPFLAGS -Ae"
1437       fi
1438 #
1439 # Defines needed for HPUX support.
1440 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1441 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1442 #
1443       case `uname -r` in
1444                         *9*|*10*)
1445                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1446                                 cat >> confdefs.h <<\EOF
1447 #define USE_BOTH_CRYPT_CALLS 1
1448 EOF
1449
1450                                 cat >> confdefs.h <<\EOF
1451 #define _HPUX_SOURCE 1
1452 EOF
1453
1454                                 cat >> confdefs.h <<\EOF
1455 #define _POSIX_SOURCE 1
1456 EOF
1457
1458                                 cat >> confdefs.h <<\EOF
1459 #define _ALIGNMENT_REQUIRED 1
1460 EOF
1461
1462                                 cat >> confdefs.h <<\EOF
1463 #define _MAX_ALIGNMENT 4
1464 EOF
1465
1466                                 ;;
1467                         *11*)
1468                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4"
1469                                 cat >> confdefs.h <<\EOF
1470 #define USE_BOTH_CRYPT_CALLS 1
1471 EOF
1472
1473                                 cat >> confdefs.h <<\EOF
1474 #define _HPUX_SOURCE 1
1475 EOF
1476
1477                                 cat >> confdefs.h <<\EOF
1478 #define _POSIX_SOURCE 1
1479 EOF
1480
1481                                 cat >> confdefs.h <<\EOF
1482 #define _LARGEFILE64_SOURCE 1
1483 EOF
1484
1485                                 cat >> confdefs.h <<\EOF
1486 #define _ALIGNMENT_REQUIRED 1
1487 EOF
1488
1489                                 cat >> confdefs.h <<\EOF
1490 #define _MAX_ALIGNMENT 4
1491 EOF
1492
1493                                 ;;
1494       esac
1495       DYNEXP="-Wl,-E"
1496       ;;
1497
1498 #
1499 # CRAY Unicos has broken const handling
1500        *unicos*)
1501           echo "$ac_t""disabling const" 1>&6
1502           CPPFLAGS="$CPPFLAGS -Dconst="
1503           ;;
1504         
1505 #
1506 # AIX4.x doesn't even admit to having large
1507 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1508 #
1509     *aix4*)
1510           echo "$ac_t""enabling large file support" 1>&6
1511       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1512       cat >> confdefs.h <<\EOF
1513 #define _LARGE_FILES 1
1514 EOF
1515
1516       ;;    
1517 #
1518 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1519 # to the existance of large files..
1520 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1521 # recommendations on large file support, however it makes the
1522 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1523 # recommendation makes the compile fail on gcc2.7. JRA.
1524 #
1525         *solaris*)
1526                 case `uname -r` in
1527                         5.0*|5.1*|5.2*|5.3*|5.5*)
1528                                 echo "$ac_t""no large file support" 1>&6
1529                                 ;;
1530                         5.*)
1531                         echo "$ac_t""enabling large file support" 1>&6
1532                         if test "$ac_cv_prog_gcc" = yes; then
1533                                 ${CC-cc} -v >conftest.c 2>&1
1534                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1535                                 rm -fr conftest.c
1536                                 case "$ac_cv_gcc_compiler_version_number" in
1537                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1538                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1539                                                 cat >> confdefs.h <<\EOF
1540 #define _LARGEFILE64_SOURCE 1
1541 EOF
1542
1543                                                 ;;
1544                                         *)
1545                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1546                                                 cat >> confdefs.h <<\EOF
1547 #define _LARGEFILE64_SOURCE 1
1548 EOF
1549
1550                                                 cat >> confdefs.h <<\EOF
1551 #define _FILE_OFFSET_BITS 64
1552 EOF
1553
1554                                                 ;;
1555                                 esac
1556                         else
1557                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1558                                 cat >> confdefs.h <<\EOF
1559 #define _LARGEFILE64_SOURCE 1
1560 EOF
1561
1562                                 cat >> confdefs.h <<\EOF
1563 #define _FILE_OFFSET_BITS 64
1564 EOF
1565
1566                         fi
1567                         ;;
1568                 esac
1569                 ;;
1570 #
1571 # Tests needed for SINIX large file support.
1572 #
1573     *sysv4*)
1574       if test $host = mips-sni-sysv4 ; then
1575         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1576 echo "configure:1577: checking for LFS support" >&5
1577         old_CPPFLAGS="$CPPFLAGS"
1578         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1579         if test "$cross_compiling" = yes; then
1580   SINIX_LFS_SUPPORT=cross
1581 else
1582   cat > conftest.$ac_ext <<EOF
1583 #line 1584 "configure"
1584 #include "confdefs.h"
1585
1586 #include <unistd.h>
1587 main () {
1588 #if _LFS64_LARGEFILE == 1
1589 exit(0);
1590 #else
1591 exit(1);
1592 #endif
1593 }
1594 EOF
1595 if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1596 then
1597   SINIX_LFS_SUPPORT=yes
1598 else
1599   echo "configure: failed program was:" >&5
1600   cat conftest.$ac_ext >&5
1601   rm -fr conftest*
1602   SINIX_LFS_SUPPORT=no
1603 fi
1604 rm -fr conftest*
1605 fi
1606
1607         CPPFLAGS="$old_CPPFLAGS"
1608         if test x$SINIX_LFS_SUPPORT = xyes ; then
1609           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1610           cat >> confdefs.h <<\EOF
1611 #define _LARGEFILE64_SOURCE 1
1612 EOF
1613
1614           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1615           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1616           LIBS="`getconf LFS64_LIBS` $LIBS"
1617         fi
1618       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1619       fi
1620     ;;
1621
1622 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1623 #
1624     *linux*)
1625         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1626 echo "configure:1627: checking for LFS support" >&5
1627         old_CPPFLAGS="$CPPFLAGS"
1628         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1629        if test "$cross_compiling" = yes; then
1630   LINUX_LFS_SUPPORT=cross
1631 else
1632   cat > conftest.$ac_ext <<EOF
1633 #line 1634 "configure"
1634 #include "confdefs.h"
1635
1636 #include <unistd.h>
1637 #include <sys/utsname.h>
1638 main() {
1639 #if _LFS64_LARGEFILE == 1
1640        struct utsname uts;
1641        char *release;
1642        int major, minor;
1643
1644        /* Ensure this is glibc 2.2 or higher */
1645 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1646        int libc_major = __GLIBC__;
1647        int libc_minor = __GLIBC_MINOR__;
1648
1649        if (libc_major < 2)
1650               exit(1);
1651        if (libc_minor < 2)
1652               exit(1);
1653 #endif
1654
1655        /* Ensure this is kernel 2.4 or higher */
1656
1657        uname(&uts);
1658        release = uts.release;
1659        major = atoi(strsep(&release, "."));
1660        minor = atoi(strsep(&release, "."));
1661
1662        if (major > 2 || (major == 2 && minor > 3))
1663                exit(0);
1664        exit(1);
1665 #else
1666        exit(1);
1667 #endif
1668 }
1669
1670 EOF
1671 if { (eval echo configure:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1672 then
1673   LINUX_LFS_SUPPORT=yes
1674 else
1675   echo "configure: failed program was:" >&5
1676   cat conftest.$ac_ext >&5
1677   rm -fr conftest*
1678   LINUX_LFS_SUPPORT=no
1679 fi
1680 rm -fr conftest*
1681 fi
1682
1683         CPPFLAGS="$old_CPPFLAGS"
1684         if test x$LINUX_LFS_SUPPORT = xyes ; then
1685           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1686           cat >> confdefs.h <<\EOF
1687 #define _LARGEFILE64_SOURCE 1
1688 EOF
1689
1690           cat >> confdefs.h <<\EOF
1691 #define _FILE_OFFSET_BITS 64
1692 EOF
1693
1694           cat >> confdefs.h <<\EOF
1695 #define _GNU_SOURCE 1
1696 EOF
1697
1698         fi
1699        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1700                 ;;
1701
1702     *hurd*)
1703         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1704 echo "configure:1705: checking for LFS support" >&5
1705         old_CPPFLAGS="$CPPFLAGS"
1706         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1707         if test "$cross_compiling" = yes; then
1708   GLIBC_LFS_SUPPORT=cross
1709 else
1710   cat > conftest.$ac_ext <<EOF
1711 #line 1712 "configure"
1712 #include "confdefs.h"
1713
1714 #include <unistd.h>
1715 main () {
1716 #if _LFS64_LARGEFILE == 1
1717 exit(0);
1718 #else
1719 exit(1);
1720 #endif
1721 }
1722 EOF
1723 if { (eval echo configure:1724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1724 then
1725   GLIBC_LFS_SUPPORT=yes
1726 else
1727   echo "configure: failed program was:" >&5
1728   cat conftest.$ac_ext >&5
1729   rm -fr conftest*
1730   GLIBC_LFS_SUPPORT=no
1731 fi
1732 rm -fr conftest*
1733 fi
1734
1735         CPPFLAGS="$old_CPPFLAGS"
1736         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1737           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1738           cat >> confdefs.h <<\EOF
1739 #define _LARGEFILE64_SOURCE 1
1740 EOF
1741
1742           cat >> confdefs.h <<\EOF
1743 #define _GNU_SOURCE 1
1744 EOF
1745
1746         fi
1747       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1748     ;;
1749
1750 esac
1751
1752 echo $ac_n "checking for inline""... $ac_c" 1>&6
1753 echo "configure:1754: checking for inline" >&5
1754 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1755   echo $ac_n "(cached) $ac_c" 1>&6
1756 else
1757   ac_cv_c_inline=no
1758 for ac_kw in inline __inline__ __inline; do
1759   cat > conftest.$ac_ext <<EOF
1760 #line 1761 "configure"
1761 #include "confdefs.h"
1762
1763 int main() {
1764 } $ac_kw foo() {
1765 ; return 0; }
1766 EOF
1767 if { (eval echo configure:1768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1768   rm -rf conftest*
1769   ac_cv_c_inline=$ac_kw; break
1770 else
1771   echo "configure: failed program was:" >&5
1772   cat conftest.$ac_ext >&5
1773 fi
1774 rm -f conftest*
1775 done
1776
1777 fi
1778
1779 echo "$ac_t""$ac_cv_c_inline" 1>&6
1780 case "$ac_cv_c_inline" in
1781   inline | yes) ;;
1782   no) cat >> confdefs.h <<\EOF
1783 #define inline 
1784 EOF
1785  ;;
1786   *)  cat >> confdefs.h <<EOF
1787 #define inline $ac_cv_c_inline
1788 EOF
1789  ;;
1790 esac
1791
1792 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1793 echo "configure:1794: checking how to run the C preprocessor" >&5
1794 # On Suns, sometimes $CPP names a directory.
1795 if test -n "$CPP" && test -d "$CPP"; then
1796   CPP=
1797 fi
1798 if test -z "$CPP"; then
1799 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1800   echo $ac_n "(cached) $ac_c" 1>&6
1801 else
1802     # This must be in double quotes, not single quotes, because CPP may get
1803   # substituted into the Makefile and "${CC-cc}" will confuse make.
1804   CPP="${CC-cc} -E"
1805   # On the NeXT, cc -E runs the code through the compiler's parser,
1806   # not just through cpp.
1807   cat > conftest.$ac_ext <<EOF
1808 #line 1809 "configure"
1809 #include "confdefs.h"
1810 #include <assert.h>
1811 Syntax Error
1812 EOF
1813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1814 { (eval echo configure:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1816 if test -z "$ac_err"; then
1817   :
1818 else
1819   echo "$ac_err" >&5
1820   echo "configure: failed program was:" >&5
1821   cat conftest.$ac_ext >&5
1822   rm -rf conftest*
1823   CPP="${CC-cc} -E -traditional-cpp"
1824   cat > conftest.$ac_ext <<EOF
1825 #line 1826 "configure"
1826 #include "confdefs.h"
1827 #include <assert.h>
1828 Syntax Error
1829 EOF
1830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1831 { (eval echo configure:1832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1833 if test -z "$ac_err"; then
1834   :
1835 else
1836   echo "$ac_err" >&5
1837   echo "configure: failed program was:" >&5
1838   cat conftest.$ac_ext >&5
1839   rm -rf conftest*
1840   CPP="${CC-cc} -nologo -E"
1841   cat > conftest.$ac_ext <<EOF
1842 #line 1843 "configure"
1843 #include "confdefs.h"
1844 #include <assert.h>
1845 Syntax Error
1846 EOF
1847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1848 { (eval echo configure:1849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1850 if test -z "$ac_err"; then
1851   :
1852 else
1853   echo "$ac_err" >&5
1854   echo "configure: failed program was:" >&5
1855   cat conftest.$ac_ext >&5
1856   rm -rf conftest*
1857   CPP=/lib/cpp
1858 fi
1859 rm -f conftest*
1860 fi
1861 rm -f conftest*
1862 fi
1863 rm -f conftest*
1864   ac_cv_prog_CPP="$CPP"
1865 fi
1866   CPP="$ac_cv_prog_CPP"
1867 else
1868   ac_cv_prog_CPP="$CPP"
1869 fi
1870 echo "$ac_t""$CPP" 1>&6
1871
1872 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1873 echo "configure:1874: checking for ANSI C header files" >&5
1874 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1875   echo $ac_n "(cached) $ac_c" 1>&6
1876 else
1877   cat > conftest.$ac_ext <<EOF
1878 #line 1879 "configure"
1879 #include "confdefs.h"
1880 #include <stdlib.h>
1881 #include <stdarg.h>
1882 #include <string.h>
1883 #include <float.h>
1884 EOF
1885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1886 { (eval echo configure:1887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1888 if test -z "$ac_err"; then
1889   rm -rf conftest*
1890   ac_cv_header_stdc=yes
1891 else
1892   echo "$ac_err" >&5
1893   echo "configure: failed program was:" >&5
1894   cat conftest.$ac_ext >&5
1895   rm -rf conftest*
1896   ac_cv_header_stdc=no
1897 fi
1898 rm -f conftest*
1899
1900 if test $ac_cv_header_stdc = yes; then
1901   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1902 cat > conftest.$ac_ext <<EOF
1903 #line 1904 "configure"
1904 #include "confdefs.h"
1905 #include <string.h>
1906 EOF
1907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1908   egrep "memchr" >/dev/null 2>&1; then
1909   :
1910 else
1911   rm -rf conftest*
1912   ac_cv_header_stdc=no
1913 fi
1914 rm -f conftest*
1915
1916 fi
1917
1918 if test $ac_cv_header_stdc = yes; then
1919   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1920 cat > conftest.$ac_ext <<EOF
1921 #line 1922 "configure"
1922 #include "confdefs.h"
1923 #include <stdlib.h>
1924 EOF
1925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1926   egrep "free" >/dev/null 2>&1; then
1927   :
1928 else
1929   rm -rf conftest*
1930   ac_cv_header_stdc=no
1931 fi
1932 rm -f conftest*
1933
1934 fi
1935
1936 if test $ac_cv_header_stdc = yes; then
1937   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1938 if test "$cross_compiling" = yes; then
1939   :
1940 else
1941   cat > conftest.$ac_ext <<EOF
1942 #line 1943 "configure"
1943 #include "confdefs.h"
1944 #include <ctype.h>
1945 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1946 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1947 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1948 int main () { int i; for (i = 0; i < 256; i++)
1949 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1950 exit (0); }
1951
1952 EOF
1953 if { (eval echo configure:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1954 then
1955   :
1956 else
1957   echo "configure: failed program was:" >&5
1958   cat conftest.$ac_ext >&5
1959   rm -fr conftest*
1960   ac_cv_header_stdc=no
1961 fi
1962 rm -fr conftest*
1963 fi
1964
1965 fi
1966 fi
1967
1968 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1969 if test $ac_cv_header_stdc = yes; then
1970   cat >> confdefs.h <<\EOF
1971 #define STDC_HEADERS 1
1972 EOF
1973
1974 fi
1975
1976 ac_header_dirent=no
1977 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1978 do
1979 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1980 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1981 echo "configure:1982: checking for $ac_hdr that defines DIR" >&5
1982 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1983   echo $ac_n "(cached) $ac_c" 1>&6
1984 else
1985   cat > conftest.$ac_ext <<EOF
1986 #line 1987 "configure"
1987 #include "confdefs.h"
1988 #include <sys/types.h>
1989 #include <$ac_hdr>
1990 int main() {
1991 DIR *dirp = 0;
1992 ; return 0; }
1993 EOF
1994 if { (eval echo configure:1995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1995   rm -rf conftest*
1996   eval "ac_cv_header_dirent_$ac_safe=yes"
1997 else
1998   echo "configure: failed program was:" >&5
1999   cat conftest.$ac_ext >&5
2000   rm -rf conftest*
2001   eval "ac_cv_header_dirent_$ac_safe=no"
2002 fi
2003 rm -f conftest*
2004 fi
2005 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2006   echo "$ac_t""yes" 1>&6
2007     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2008   cat >> confdefs.h <<EOF
2009 #define $ac_tr_hdr 1
2010 EOF
2011  ac_header_dirent=$ac_hdr; break
2012 else
2013   echo "$ac_t""no" 1>&6
2014 fi
2015 done
2016 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2017 if test $ac_header_dirent = dirent.h; then
2018 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2019 echo "configure:2020: checking for opendir in -ldir" >&5
2020 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2021 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2022   echo $ac_n "(cached) $ac_c" 1>&6
2023 else
2024   ac_save_LIBS="$LIBS"
2025 LIBS="-ldir  $LIBS"
2026 cat > conftest.$ac_ext <<EOF
2027 #line 2028 "configure"
2028 #include "confdefs.h"
2029 /* Override any gcc2 internal prototype to avoid an error.  */
2030 /* We use char because int might match the return type of a gcc2
2031     builtin and then its argument prototype would still apply.  */
2032 char opendir();
2033
2034 int main() {
2035 opendir()
2036 ; return 0; }
2037 EOF
2038 if { (eval echo configure:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2039   rm -rf conftest*
2040   eval "ac_cv_lib_$ac_lib_var=yes"
2041 else
2042   echo "configure: failed program was:" >&5
2043   cat conftest.$ac_ext >&5
2044   rm -rf conftest*
2045   eval "ac_cv_lib_$ac_lib_var=no"
2046 fi
2047 rm -f conftest*
2048 LIBS="$ac_save_LIBS"
2049
2050 fi
2051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2052   echo "$ac_t""yes" 1>&6
2053   LIBS="$LIBS -ldir"
2054 else
2055   echo "$ac_t""no" 1>&6
2056 fi
2057
2058 else
2059 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2060 echo "configure:2061: checking for opendir in -lx" >&5
2061 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2062 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2063   echo $ac_n "(cached) $ac_c" 1>&6
2064 else
2065   ac_save_LIBS="$LIBS"
2066 LIBS="-lx  $LIBS"
2067 cat > conftest.$ac_ext <<EOF
2068 #line 2069 "configure"
2069 #include "confdefs.h"
2070 /* Override any gcc2 internal prototype to avoid an error.  */
2071 /* We use char because int might match the return type of a gcc2
2072     builtin and then its argument prototype would still apply.  */
2073 char opendir();
2074
2075 int main() {
2076 opendir()
2077 ; return 0; }
2078 EOF
2079 if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2080   rm -rf conftest*
2081   eval "ac_cv_lib_$ac_lib_var=yes"
2082 else
2083   echo "configure: failed program was:" >&5
2084   cat conftest.$ac_ext >&5
2085   rm -rf conftest*
2086   eval "ac_cv_lib_$ac_lib_var=no"
2087 fi
2088 rm -f conftest*
2089 LIBS="$ac_save_LIBS"
2090
2091 fi
2092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2093   echo "$ac_t""yes" 1>&6
2094   LIBS="$LIBS -lx"
2095 else
2096   echo "$ac_t""no" 1>&6
2097 fi
2098
2099 fi
2100
2101 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2102 echo "configure:2103: checking whether time.h and sys/time.h may both be included" >&5
2103 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2104   echo $ac_n "(cached) $ac_c" 1>&6
2105 else
2106   cat > conftest.$ac_ext <<EOF
2107 #line 2108 "configure"
2108 #include "confdefs.h"
2109 #include <sys/types.h>
2110 #include <sys/time.h>
2111 #include <time.h>
2112 int main() {
2113 struct tm *tp;
2114 ; return 0; }
2115 EOF
2116 if { (eval echo configure:2117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2117   rm -rf conftest*
2118   ac_cv_header_time=yes
2119 else
2120   echo "configure: failed program was:" >&5
2121   cat conftest.$ac_ext >&5
2122   rm -rf conftest*
2123   ac_cv_header_time=no
2124 fi
2125 rm -f conftest*
2126 fi
2127
2128 echo "$ac_t""$ac_cv_header_time" 1>&6
2129 if test $ac_cv_header_time = yes; then
2130   cat >> confdefs.h <<\EOF
2131 #define TIME_WITH_SYS_TIME 1
2132 EOF
2133
2134 fi
2135
2136 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2137 echo "configure:2138: checking for sys/wait.h that is POSIX.1 compatible" >&5
2138 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2139   echo $ac_n "(cached) $ac_c" 1>&6
2140 else
2141   cat > conftest.$ac_ext <<EOF
2142 #line 2143 "configure"
2143 #include "confdefs.h"
2144 #include <sys/types.h>
2145 #include <sys/wait.h>
2146 #ifndef WEXITSTATUS
2147 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2148 #endif
2149 #ifndef WIFEXITED
2150 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2151 #endif
2152 int main() {
2153 int s;
2154 wait (&s);
2155 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2156 ; return 0; }
2157 EOF
2158 if { (eval echo configure:2159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2159   rm -rf conftest*
2160   ac_cv_header_sys_wait_h=yes
2161 else
2162   echo "configure: failed program was:" >&5
2163   cat conftest.$ac_ext >&5
2164   rm -rf conftest*
2165   ac_cv_header_sys_wait_h=no
2166 fi
2167 rm -f conftest*
2168 fi
2169
2170 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2171 if test $ac_cv_header_sys_wait_h = yes; then
2172   cat >> confdefs.h <<\EOF
2173 #define HAVE_SYS_WAIT_H 1
2174 EOF
2175
2176 fi
2177
2178 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2179 do
2180 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2181 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2182 echo "configure:2183: checking for $ac_hdr" >&5
2183 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2184   echo $ac_n "(cached) $ac_c" 1>&6
2185 else
2186   cat > conftest.$ac_ext <<EOF
2187 #line 2188 "configure"
2188 #include "confdefs.h"
2189 #include <$ac_hdr>
2190 EOF
2191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2192 { (eval echo configure:2193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2193 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2194 if test -z "$ac_err"; then
2195   rm -rf conftest*
2196   eval "ac_cv_header_$ac_safe=yes"
2197 else
2198   echo "$ac_err" >&5
2199   echo "configure: failed program was:" >&5
2200   cat conftest.$ac_ext >&5
2201   rm -rf conftest*
2202   eval "ac_cv_header_$ac_safe=no"
2203 fi
2204 rm -f conftest*
2205 fi
2206 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2207   echo "$ac_t""yes" 1>&6
2208     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2209   cat >> confdefs.h <<EOF
2210 #define $ac_tr_hdr 1
2211 EOF
2212  
2213 else
2214   echo "$ac_t""no" 1>&6
2215 fi
2216 done
2217
2218 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2219 do
2220 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2221 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2222 echo "configure:2223: checking for $ac_hdr" >&5
2223 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2224   echo $ac_n "(cached) $ac_c" 1>&6
2225 else
2226   cat > conftest.$ac_ext <<EOF
2227 #line 2228 "configure"
2228 #include "confdefs.h"
2229 #include <$ac_hdr>
2230 EOF
2231 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2232 { (eval echo configure:2233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2233 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2234 if test -z "$ac_err"; then
2235   rm -rf conftest*
2236   eval "ac_cv_header_$ac_safe=yes"
2237 else
2238   echo "$ac_err" >&5
2239   echo "configure: failed program was:" >&5
2240   cat conftest.$ac_ext >&5
2241   rm -rf conftest*
2242   eval "ac_cv_header_$ac_safe=no"
2243 fi
2244 rm -f conftest*
2245 fi
2246 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2247   echo "$ac_t""yes" 1>&6
2248     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2249   cat >> confdefs.h <<EOF
2250 #define $ac_tr_hdr 1
2251 EOF
2252  
2253 else
2254   echo "$ac_t""no" 1>&6
2255 fi
2256 done
2257
2258 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2259 do
2260 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2261 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2262 echo "configure:2263: checking for $ac_hdr" >&5
2263 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2264   echo $ac_n "(cached) $ac_c" 1>&6
2265 else
2266   cat > conftest.$ac_ext <<EOF
2267 #line 2268 "configure"
2268 #include "confdefs.h"
2269 #include <$ac_hdr>
2270 EOF
2271 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2272 { (eval echo configure:2273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2273 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2274 if test -z "$ac_err"; then
2275   rm -rf conftest*
2276   eval "ac_cv_header_$ac_safe=yes"
2277 else
2278   echo "$ac_err" >&5
2279   echo "configure: failed program was:" >&5
2280   cat conftest.$ac_ext >&5
2281   rm -rf conftest*
2282   eval "ac_cv_header_$ac_safe=no"
2283 fi
2284 rm -f conftest*
2285 fi
2286 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2287   echo "$ac_t""yes" 1>&6
2288     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2289   cat >> confdefs.h <<EOF
2290 #define $ac_tr_hdr 1
2291 EOF
2292  
2293 else
2294   echo "$ac_t""no" 1>&6
2295 fi
2296 done
2297
2298 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2299 do
2300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2302 echo "configure:2303: checking for $ac_hdr" >&5
2303 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2304   echo $ac_n "(cached) $ac_c" 1>&6
2305 else
2306   cat > conftest.$ac_ext <<EOF
2307 #line 2308 "configure"
2308 #include "confdefs.h"
2309 #include <$ac_hdr>
2310 EOF
2311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2312 { (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2314 if test -z "$ac_err"; then
2315   rm -rf conftest*
2316   eval "ac_cv_header_$ac_safe=yes"
2317 else
2318   echo "$ac_err" >&5
2319   echo "configure: failed program was:" >&5
2320   cat conftest.$ac_ext >&5
2321   rm -rf conftest*
2322   eval "ac_cv_header_$ac_safe=no"
2323 fi
2324 rm -f conftest*
2325 fi
2326 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2327   echo "$ac_t""yes" 1>&6
2328     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2329   cat >> confdefs.h <<EOF
2330 #define $ac_tr_hdr 1
2331 EOF
2332  
2333 else
2334   echo "$ac_t""no" 1>&6
2335 fi
2336 done
2337
2338 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
2339 do
2340 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2341 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2342 echo "configure:2343: checking for $ac_hdr" >&5
2343 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2344   echo $ac_n "(cached) $ac_c" 1>&6
2345 else
2346   cat > conftest.$ac_ext <<EOF
2347 #line 2348 "configure"
2348 #include "confdefs.h"
2349 #include <$ac_hdr>
2350 EOF
2351 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2352 { (eval echo configure:2353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2353 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2354 if test -z "$ac_err"; then
2355   rm -rf conftest*
2356   eval "ac_cv_header_$ac_safe=yes"
2357 else
2358   echo "$ac_err" >&5
2359   echo "configure: failed program was:" >&5
2360   cat conftest.$ac_ext >&5
2361   rm -rf conftest*
2362   eval "ac_cv_header_$ac_safe=no"
2363 fi
2364 rm -f conftest*
2365 fi
2366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2367   echo "$ac_t""yes" 1>&6
2368     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2369   cat >> confdefs.h <<EOF
2370 #define $ac_tr_hdr 1
2371 EOF
2372  
2373 else
2374   echo "$ac_t""no" 1>&6
2375 fi
2376 done
2377
2378 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2379 do
2380 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2381 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2382 echo "configure:2383: checking for $ac_hdr" >&5
2383 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2384   echo $ac_n "(cached) $ac_c" 1>&6
2385 else
2386   cat > conftest.$ac_ext <<EOF
2387 #line 2388 "configure"
2388 #include "confdefs.h"
2389 #include <$ac_hdr>
2390 EOF
2391 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2392 { (eval echo configure:2393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2393 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2394 if test -z "$ac_err"; then
2395   rm -rf conftest*
2396   eval "ac_cv_header_$ac_safe=yes"
2397 else
2398   echo "$ac_err" >&5
2399   echo "configure: failed program was:" >&5
2400   cat conftest.$ac_ext >&5
2401   rm -rf conftest*
2402   eval "ac_cv_header_$ac_safe=no"
2403 fi
2404 rm -f conftest*
2405 fi
2406 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2407   echo "$ac_t""yes" 1>&6
2408     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2409   cat >> confdefs.h <<EOF
2410 #define $ac_tr_hdr 1
2411 EOF
2412  
2413 else
2414   echo "$ac_t""no" 1>&6
2415 fi
2416 done
2417
2418 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2419 do
2420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2422 echo "configure:2423: checking for $ac_hdr" >&5
2423 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2424   echo $ac_n "(cached) $ac_c" 1>&6
2425 else
2426   cat > conftest.$ac_ext <<EOF
2427 #line 2428 "configure"
2428 #include "confdefs.h"
2429 #include <$ac_hdr>
2430 EOF
2431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2432 { (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2434 if test -z "$ac_err"; then
2435   rm -rf conftest*
2436   eval "ac_cv_header_$ac_safe=yes"
2437 else
2438   echo "$ac_err" >&5
2439   echo "configure: failed program was:" >&5
2440   cat conftest.$ac_ext >&5
2441   rm -rf conftest*
2442   eval "ac_cv_header_$ac_safe=no"
2443 fi
2444 rm -f conftest*
2445 fi
2446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2447   echo "$ac_t""yes" 1>&6
2448     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2449   cat >> confdefs.h <<EOF
2450 #define $ac_tr_hdr 1
2451 EOF
2452  
2453 else
2454   echo "$ac_t""no" 1>&6
2455 fi
2456 done
2457
2458 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h
2459 do
2460 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2461 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2462 echo "configure:2463: checking for $ac_hdr" >&5
2463 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2464   echo $ac_n "(cached) $ac_c" 1>&6
2465 else
2466   cat > conftest.$ac_ext <<EOF
2467 #line 2468 "configure"
2468 #include "confdefs.h"
2469 #include <$ac_hdr>
2470 EOF
2471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2472 { (eval echo configure:2473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2474 if test -z "$ac_err"; then
2475   rm -rf conftest*
2476   eval "ac_cv_header_$ac_safe=yes"
2477 else
2478   echo "$ac_err" >&5
2479   echo "configure: failed program was:" >&5
2480   cat conftest.$ac_ext >&5
2481   rm -rf conftest*
2482   eval "ac_cv_header_$ac_safe=no"
2483 fi
2484 rm -f conftest*
2485 fi
2486 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2487   echo "$ac_t""yes" 1>&6
2488     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2489   cat >> confdefs.h <<EOF
2490 #define $ac_tr_hdr 1
2491 EOF
2492  
2493 else
2494   echo "$ac_t""no" 1>&6
2495 fi
2496 done
2497
2498
2499 #
2500 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2501 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2502 #
2503 case "$host_os" in
2504     *hpux*)
2505                 cat > conftest.$ac_ext <<EOF
2506 #line 2507 "configure"
2507 #include "confdefs.h"
2508 #include <shadow.h>
2509 int main() {
2510 struct spwd testme
2511 ; return 0; }
2512 EOF
2513 if { (eval echo configure:2514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2514   rm -rf conftest*
2515   ac_cv_header_shadow_h=yes
2516 else
2517   echo "configure: failed program was:" >&5
2518   cat conftest.$ac_ext >&5
2519   rm -rf conftest*
2520   ac_cv_header_shadow_h=no
2521 fi
2522 rm -f conftest*
2523                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2524                    cat >> confdefs.h <<\EOF
2525 #define HAVE_SHADOW_H 1
2526 EOF
2527
2528                 fi
2529         ;;
2530 esac
2531 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2532 do
2533 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2534 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2535 echo "configure:2536: checking for $ac_hdr" >&5
2536 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2537   echo $ac_n "(cached) $ac_c" 1>&6
2538 else
2539   cat > conftest.$ac_ext <<EOF
2540 #line 2541 "configure"
2541 #include "confdefs.h"
2542 #include <$ac_hdr>
2543 EOF
2544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2545 { (eval echo configure:2546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2547 if test -z "$ac_err"; then
2548   rm -rf conftest*
2549   eval "ac_cv_header_$ac_safe=yes"
2550 else
2551   echo "$ac_err" >&5
2552   echo "configure: failed program was:" >&5
2553   cat conftest.$ac_ext >&5
2554   rm -rf conftest*
2555   eval "ac_cv_header_$ac_safe=no"
2556 fi
2557 rm -f conftest*
2558 fi
2559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2560   echo "$ac_t""yes" 1>&6
2561     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2562   cat >> confdefs.h <<EOF
2563 #define $ac_tr_hdr 1
2564 EOF
2565  
2566 else
2567   echo "$ac_t""no" 1>&6
2568 fi
2569 done
2570
2571 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2572 do
2573 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2574 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2575 echo "configure:2576: checking for $ac_hdr" >&5
2576 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2577   echo $ac_n "(cached) $ac_c" 1>&6
2578 else
2579   cat > conftest.$ac_ext <<EOF
2580 #line 2581 "configure"
2581 #include "confdefs.h"
2582 #include <$ac_hdr>
2583 EOF
2584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2585 { (eval echo configure:2586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2587 if test -z "$ac_err"; then
2588   rm -rf conftest*
2589   eval "ac_cv_header_$ac_safe=yes"
2590 else
2591   echo "$ac_err" >&5
2592   echo "configure: failed program was:" >&5
2593   cat conftest.$ac_ext >&5
2594   rm -rf conftest*
2595   eval "ac_cv_header_$ac_safe=no"
2596 fi
2597 rm -f conftest*
2598 fi
2599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2600   echo "$ac_t""yes" 1>&6
2601     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2602   cat >> confdefs.h <<EOF
2603 #define $ac_tr_hdr 1
2604 EOF
2605  
2606 else
2607   echo "$ac_t""no" 1>&6
2608 fi
2609 done
2610
2611 for ac_hdr in stropts.h poll.h
2612 do
2613 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2614 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2615 echo "configure:2616: checking for $ac_hdr" >&5
2616 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2617   echo $ac_n "(cached) $ac_c" 1>&6
2618 else
2619   cat > conftest.$ac_ext <<EOF
2620 #line 2621 "configure"
2621 #include "confdefs.h"
2622 #include <$ac_hdr>
2623 EOF
2624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2625 { (eval echo configure:2626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2627 if test -z "$ac_err"; then
2628   rm -rf conftest*
2629   eval "ac_cv_header_$ac_safe=yes"
2630 else
2631   echo "$ac_err" >&5
2632   echo "configure: failed program was:" >&5
2633   cat conftest.$ac_ext >&5
2634   rm -rf conftest*
2635   eval "ac_cv_header_$ac_safe=no"
2636 fi
2637 rm -f conftest*
2638 fi
2639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2640   echo "$ac_t""yes" 1>&6
2641     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2642   cat >> confdefs.h <<EOF
2643 #define $ac_tr_hdr 1
2644 EOF
2645  
2646 else
2647   echo "$ac_t""no" 1>&6
2648 fi
2649 done
2650
2651 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2652 do
2653 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2654 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2655 echo "configure:2656: checking for $ac_hdr" >&5
2656 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2657   echo $ac_n "(cached) $ac_c" 1>&6
2658 else
2659   cat > conftest.$ac_ext <<EOF
2660 #line 2661 "configure"
2661 #include "confdefs.h"
2662 #include <$ac_hdr>
2663 EOF
2664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2665 { (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2667 if test -z "$ac_err"; then
2668   rm -rf conftest*
2669   eval "ac_cv_header_$ac_safe=yes"
2670 else
2671   echo "$ac_err" >&5
2672   echo "configure: failed program was:" >&5
2673   cat conftest.$ac_ext >&5
2674   rm -rf conftest*
2675   eval "ac_cv_header_$ac_safe=no"
2676 fi
2677 rm -f conftest*
2678 fi
2679 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2680   echo "$ac_t""yes" 1>&6
2681     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2682   cat >> confdefs.h <<EOF
2683 #define $ac_tr_hdr 1
2684 EOF
2685  
2686 else
2687   echo "$ac_t""no" 1>&6
2688 fi
2689 done
2690
2691 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2692 do
2693 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2694 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2695 echo "configure:2696: checking for $ac_hdr" >&5
2696 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2697   echo $ac_n "(cached) $ac_c" 1>&6
2698 else
2699   cat > conftest.$ac_ext <<EOF
2700 #line 2701 "configure"
2701 #include "confdefs.h"
2702 #include <$ac_hdr>
2703 EOF
2704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2705 { (eval echo configure:2706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2707 if test -z "$ac_err"; then
2708   rm -rf conftest*
2709   eval "ac_cv_header_$ac_safe=yes"
2710 else
2711   echo "$ac_err" >&5
2712   echo "configure: failed program was:" >&5
2713   cat conftest.$ac_ext >&5
2714   rm -rf conftest*
2715   eval "ac_cv_header_$ac_safe=no"
2716 fi
2717 rm -f conftest*
2718 fi
2719 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2720   echo "$ac_t""yes" 1>&6
2721     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2722   cat >> confdefs.h <<EOF
2723 #define $ac_tr_hdr 1
2724 EOF
2725  
2726 else
2727   echo "$ac_t""no" 1>&6
2728 fi
2729 done
2730
2731
2732 # For experimental utmp support (lastlog on some BSD-like systems)
2733 for ac_hdr in utmp.h utmpx.h lastlog.h
2734 do
2735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2737 echo "configure:2738: checking for $ac_hdr" >&5
2738 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2739   echo $ac_n "(cached) $ac_c" 1>&6
2740 else
2741   cat > conftest.$ac_ext <<EOF
2742 #line 2743 "configure"
2743 #include "confdefs.h"
2744 #include <$ac_hdr>
2745 EOF
2746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2747 { (eval echo configure:2748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2749 if test -z "$ac_err"; then
2750   rm -rf conftest*
2751   eval "ac_cv_header_$ac_safe=yes"
2752 else
2753   echo "$ac_err" >&5
2754   echo "configure: failed program was:" >&5
2755   cat conftest.$ac_ext >&5
2756   rm -rf conftest*
2757   eval "ac_cv_header_$ac_safe=no"
2758 fi
2759 rm -f conftest*
2760 fi
2761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2762   echo "$ac_t""yes" 1>&6
2763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2764   cat >> confdefs.h <<EOF
2765 #define $ac_tr_hdr 1
2766 EOF
2767  
2768 else
2769   echo "$ac_t""no" 1>&6
2770 fi
2771 done
2772
2773  
2774 # For quotas on Veritas VxFS filesystems
2775 for ac_hdr in sys/fs/vx_quota.h
2776 do
2777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2779 echo "configure:2780: checking for $ac_hdr" >&5
2780 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2781   echo $ac_n "(cached) $ac_c" 1>&6
2782 else
2783   cat > conftest.$ac_ext <<EOF
2784 #line 2785 "configure"
2785 #include "confdefs.h"
2786 #include <$ac_hdr>
2787 EOF
2788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2789 { (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2791 if test -z "$ac_err"; then
2792   rm -rf conftest*
2793   eval "ac_cv_header_$ac_safe=yes"
2794 else
2795   echo "$ac_err" >&5
2796   echo "configure: failed program was:" >&5
2797   cat conftest.$ac_ext >&5
2798   rm -rf conftest*
2799   eval "ac_cv_header_$ac_safe=no"
2800 fi
2801 rm -f conftest*
2802 fi
2803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2804   echo "$ac_t""yes" 1>&6
2805     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2806   cat >> confdefs.h <<EOF
2807 #define $ac_tr_hdr 1
2808 EOF
2809  
2810 else
2811   echo "$ac_t""no" 1>&6
2812 fi
2813 done
2814
2815
2816 # For quotas on Linux XFS filesystems
2817 for ac_hdr in linux/xqm.h
2818 do
2819 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2820 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2821 echo "configure:2822: checking for $ac_hdr" >&5
2822 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2823   echo $ac_n "(cached) $ac_c" 1>&6
2824 else
2825   cat > conftest.$ac_ext <<EOF
2826 #line 2827 "configure"
2827 #include "confdefs.h"
2828 #include <$ac_hdr>
2829 EOF
2830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2831 { (eval echo configure:2832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2833 if test -z "$ac_err"; then
2834   rm -rf conftest*
2835   eval "ac_cv_header_$ac_safe=yes"
2836 else
2837   echo "$ac_err" >&5
2838   echo "configure: failed program was:" >&5
2839   cat conftest.$ac_ext >&5
2840   rm -rf conftest*
2841   eval "ac_cv_header_$ac_safe=no"
2842 fi
2843 rm -f conftest*
2844 fi
2845 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2846   echo "$ac_t""yes" 1>&6
2847     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2848   cat >> confdefs.h <<EOF
2849 #define $ac_tr_hdr 1
2850 EOF
2851  
2852 else
2853   echo "$ac_t""no" 1>&6
2854 fi
2855 done
2856
2857
2858 echo $ac_n "checking size of int""... $ac_c" 1>&6
2859 echo "configure:2860: checking size of int" >&5
2860 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2861   echo $ac_n "(cached) $ac_c" 1>&6
2862 else
2863   if test "$cross_compiling" = yes; then
2864   ac_cv_sizeof_int=cross
2865 else
2866   cat > conftest.$ac_ext <<EOF
2867 #line 2868 "configure"
2868 #include "confdefs.h"
2869 #include <stdio.h>
2870 #include <sys/types.h>
2871 main()
2872 {
2873   FILE *f=fopen("conftestval", "w");
2874   if (!f) exit(1);
2875   fprintf(f, "%d\n", sizeof(int));
2876   exit(0);
2877 }
2878 EOF
2879 if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2880 then
2881   ac_cv_sizeof_int=`cat conftestval`
2882 else
2883   echo "configure: failed program was:" >&5
2884   cat conftest.$ac_ext >&5
2885   rm -fr conftest*
2886   ac_cv_sizeof_int=0
2887 fi
2888 rm -fr conftest*
2889 fi
2890
2891 fi
2892 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2893 cat >> confdefs.h <<EOF
2894 #define SIZEOF_INT $ac_cv_sizeof_int
2895 EOF
2896
2897
2898 echo $ac_n "checking size of long""... $ac_c" 1>&6
2899 echo "configure:2900: checking size of long" >&5
2900 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2901   echo $ac_n "(cached) $ac_c" 1>&6
2902 else
2903   if test "$cross_compiling" = yes; then
2904   ac_cv_sizeof_long=cross
2905 else
2906   cat > conftest.$ac_ext <<EOF
2907 #line 2908 "configure"
2908 #include "confdefs.h"
2909 #include <stdio.h>
2910 #include <sys/types.h>
2911 main()
2912 {
2913   FILE *f=fopen("conftestval", "w");
2914   if (!f) exit(1);
2915   fprintf(f, "%d\n", sizeof(long));
2916   exit(0);
2917 }
2918 EOF
2919 if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2920 then
2921   ac_cv_sizeof_long=`cat conftestval`
2922 else
2923   echo "configure: failed program was:" >&5
2924   cat conftest.$ac_ext >&5
2925   rm -fr conftest*
2926   ac_cv_sizeof_long=0
2927 fi
2928 rm -fr conftest*
2929 fi
2930
2931 fi
2932 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2933 cat >> confdefs.h <<EOF
2934 #define SIZEOF_LONG $ac_cv_sizeof_long
2935 EOF
2936
2937
2938 echo $ac_n "checking size of short""... $ac_c" 1>&6
2939 echo "configure:2940: checking size of short" >&5
2940 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2941   echo $ac_n "(cached) $ac_c" 1>&6
2942 else
2943   if test "$cross_compiling" = yes; then
2944   ac_cv_sizeof_short=cross
2945 else
2946   cat > conftest.$ac_ext <<EOF
2947 #line 2948 "configure"
2948 #include "confdefs.h"
2949 #include <stdio.h>
2950 #include <sys/types.h>
2951 main()
2952 {
2953   FILE *f=fopen("conftestval", "w");
2954   if (!f) exit(1);
2955   fprintf(f, "%d\n", sizeof(short));
2956   exit(0);
2957 }
2958 EOF
2959 if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2960 then
2961   ac_cv_sizeof_short=`cat conftestval`
2962 else
2963   echo "configure: failed program was:" >&5
2964   cat conftest.$ac_ext >&5
2965   rm -fr conftest*
2966   ac_cv_sizeof_short=0
2967 fi
2968 rm -fr conftest*
2969 fi
2970
2971 fi
2972 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2973 cat >> confdefs.h <<EOF
2974 #define SIZEOF_SHORT $ac_cv_sizeof_short
2975 EOF
2976
2977
2978
2979 echo $ac_n "checking for working const""... $ac_c" 1>&6
2980 echo "configure:2981: checking for working const" >&5
2981 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2982   echo $ac_n "(cached) $ac_c" 1>&6
2983 else
2984   cat > conftest.$ac_ext <<EOF
2985 #line 2986 "configure"
2986 #include "confdefs.h"
2987
2988 int main() {
2989
2990 /* Ultrix mips cc rejects this.  */
2991 typedef int charset[2]; const charset x;
2992 /* SunOS 4.1.1 cc rejects this.  */
2993 char const *const *ccp;
2994 char **p;
2995 /* NEC SVR4.0.2 mips cc rejects this.  */
2996 struct point {int x, y;};
2997 static struct point const zero = {0,0};
2998 /* AIX XL C 1.02.0.0 rejects this.
2999    It does not let you subtract one const X* pointer from another in an arm
3000    of an if-expression whose if-part is not a constant expression */
3001 const char *g = "string";
3002 ccp = &g + (g ? g-g : 0);
3003 /* HPUX 7.0 cc rejects these. */
3004 ++ccp;
3005 p = (char**) ccp;
3006 ccp = (char const *const *) p;
3007 { /* SCO 3.2v4 cc rejects this.  */
3008   char *t;
3009   char const *s = 0 ? (char *) 0 : (char const *) 0;
3010
3011   *t++ = 0;
3012 }
3013 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3014   int x[] = {25, 17};
3015   const int *foo = &x[0];
3016   ++foo;
3017 }
3018 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3019   typedef const int *iptr;
3020   iptr p = 0;
3021   ++p;
3022 }
3023 { /* AIX XL C 1.02.0.0 rejects this saying
3024      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3025   struct s { int j; const int *ap[3]; };
3026   struct s *b; b->j = 5;
3027 }
3028 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3029   const int foo = 10;
3030 }
3031
3032 ; return 0; }
3033 EOF
3034 if { (eval echo configure:3035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3035   rm -rf conftest*
3036   ac_cv_c_const=yes
3037 else
3038   echo "configure: failed program was:" >&5
3039   cat conftest.$ac_ext >&5
3040   rm -rf conftest*
3041   ac_cv_c_const=no
3042 fi
3043 rm -f conftest*
3044 fi
3045
3046 echo "$ac_t""$ac_cv_c_const" 1>&6
3047 if test $ac_cv_c_const = no; then
3048   cat >> confdefs.h <<\EOF
3049 #define const 
3050 EOF
3051
3052 fi
3053
3054 echo $ac_n "checking for inline""... $ac_c" 1>&6
3055 echo "configure:3056: checking for inline" >&5
3056 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3057   echo $ac_n "(cached) $ac_c" 1>&6
3058 else
3059   ac_cv_c_inline=no
3060 for ac_kw in inline __inline__ __inline; do
3061   cat > conftest.$ac_ext <<EOF
3062 #line 3063 "configure"
3063 #include "confdefs.h"
3064
3065 int main() {
3066 } $ac_kw foo() {
3067 ; return 0; }
3068 EOF
3069 if { (eval echo configure:3070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3070   rm -rf conftest*
3071   ac_cv_c_inline=$ac_kw; break
3072 else
3073   echo "configure: failed program was:" >&5
3074   cat conftest.$ac_ext >&5
3075 fi
3076 rm -f conftest*
3077 done
3078
3079 fi
3080
3081 echo "$ac_t""$ac_cv_c_inline" 1>&6
3082 case "$ac_cv_c_inline" in
3083   inline | yes) ;;
3084   no) cat >> confdefs.h <<\EOF
3085 #define inline 
3086 EOF
3087  ;;
3088   *)  cat >> confdefs.h <<EOF
3089 #define inline $ac_cv_c_inline
3090 EOF
3091  ;;
3092 esac
3093
3094 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3095 echo "configure:3096: checking whether byte ordering is bigendian" >&5
3096 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3097   echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099   ac_cv_c_bigendian=unknown
3100 # See if sys/param.h defines the BYTE_ORDER macro.
3101 cat > conftest.$ac_ext <<EOF
3102 #line 3103 "configure"
3103 #include "confdefs.h"
3104 #include <sys/types.h>
3105 #include <sys/param.h>
3106 int main() {
3107
3108 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3109  bogus endian macros
3110 #endif
3111 ; return 0; }
3112 EOF
3113 if { (eval echo configure:3114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3114   rm -rf conftest*
3115   # It does; now see whether it defined to BIG_ENDIAN or not.
3116 cat > conftest.$ac_ext <<EOF
3117 #line 3118 "configure"
3118 #include "confdefs.h"
3119 #include <sys/types.h>
3120 #include <sys/param.h>
3121 int main() {
3122
3123 #if BYTE_ORDER != BIG_ENDIAN
3124  not big endian
3125 #endif
3126 ; return 0; }
3127 EOF
3128 if { (eval echo configure:3129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3129   rm -rf conftest*
3130   ac_cv_c_bigendian=yes
3131 else
3132   echo "configure: failed program was:" >&5
3133   cat conftest.$ac_ext >&5
3134   rm -rf conftest*
3135   ac_cv_c_bigendian=no
3136 fi
3137 rm -f conftest*
3138 else
3139   echo "configure: failed program was:" >&5
3140   cat conftest.$ac_ext >&5
3141 fi
3142 rm -f conftest*
3143 if test $ac_cv_c_bigendian = unknown; then
3144 if test "$cross_compiling" = yes; then
3145     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3146 else
3147   cat > conftest.$ac_ext <<EOF
3148 #line 3149 "configure"
3149 #include "confdefs.h"
3150 main () {
3151   /* Are we little or big endian?  From Harbison&Steele.  */
3152   union
3153   {
3154     long l;
3155     char c[sizeof (long)];
3156   } u;
3157   u.l = 1;
3158   exit (u.c[sizeof (long) - 1] == 1);
3159 }
3160 EOF
3161 if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3162 then
3163   ac_cv_c_bigendian=no
3164 else
3165   echo "configure: failed program was:" >&5
3166   cat conftest.$ac_ext >&5
3167   rm -fr conftest*
3168   ac_cv_c_bigendian=yes
3169 fi
3170 rm -fr conftest*
3171 fi
3172
3173 fi
3174 fi
3175
3176 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3177 if test $ac_cv_c_bigendian = yes; then
3178   cat >> confdefs.h <<\EOF
3179 #define WORDS_BIGENDIAN 1
3180 EOF
3181
3182 fi
3183
3184 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3185 echo "configure:3186: checking whether char is unsigned" >&5
3186 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3187   echo $ac_n "(cached) $ac_c" 1>&6
3188 else
3189   if test "$GCC" = yes; then
3190   # GCC predefines this symbol on systems where it applies.
3191 cat > conftest.$ac_ext <<EOF
3192 #line 3193 "configure"
3193 #include "confdefs.h"
3194 #ifdef __CHAR_UNSIGNED__
3195   yes
3196 #endif
3197
3198 EOF
3199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3200   egrep "yes" >/dev/null 2>&1; then
3201   rm -rf conftest*
3202   ac_cv_c_char_unsigned=yes
3203 else
3204   rm -rf conftest*
3205   ac_cv_c_char_unsigned=no
3206 fi
3207 rm -f conftest*
3208
3209 else
3210 if test "$cross_compiling" = yes; then
3211     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3212 else
3213   cat > conftest.$ac_ext <<EOF
3214 #line 3215 "configure"
3215 #include "confdefs.h"
3216 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3217 #if !defined(__STDC__) || __STDC__ != 1
3218 #define volatile
3219 #endif
3220 main() {
3221   volatile char c = 255; exit(c < 0);
3222 }
3223 EOF
3224 if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3225 then
3226   ac_cv_c_char_unsigned=yes
3227 else
3228   echo "configure: failed program was:" >&5
3229   cat conftest.$ac_ext >&5
3230   rm -fr conftest*
3231   ac_cv_c_char_unsigned=no
3232 fi
3233 rm -fr conftest*
3234 fi
3235
3236 fi
3237 fi
3238
3239 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3240 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3241   cat >> confdefs.h <<\EOF
3242 #define __CHAR_UNSIGNED__ 1
3243 EOF
3244
3245 fi
3246
3247
3248 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3249 echo "configure:3250: checking return type of signal handlers" >&5
3250 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3251   echo $ac_n "(cached) $ac_c" 1>&6
3252 else
3253   cat > conftest.$ac_ext <<EOF
3254 #line 3255 "configure"
3255 #include "confdefs.h"
3256 #include <sys/types.h>
3257 #include <signal.h>
3258 #ifdef signal
3259 #undef signal
3260 #endif
3261 #ifdef __cplusplus
3262 extern "C" void (*signal (int, void (*)(int)))(int);
3263 #else
3264 void (*signal ()) ();
3265 #endif
3266
3267 int main() {
3268 int i;
3269 ; return 0; }
3270 EOF
3271 if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3272   rm -rf conftest*
3273   ac_cv_type_signal=void
3274 else
3275   echo "configure: failed program was:" >&5
3276   cat conftest.$ac_ext >&5
3277   rm -rf conftest*
3278   ac_cv_type_signal=int
3279 fi
3280 rm -f conftest*
3281 fi
3282
3283 echo "$ac_t""$ac_cv_type_signal" 1>&6
3284 cat >> confdefs.h <<EOF
3285 #define RETSIGTYPE $ac_cv_type_signal
3286 EOF
3287
3288
3289 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3290 echo "configure:3291: checking for uid_t in sys/types.h" >&5
3291 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3292   echo $ac_n "(cached) $ac_c" 1>&6
3293 else
3294   cat > conftest.$ac_ext <<EOF
3295 #line 3296 "configure"
3296 #include "confdefs.h"
3297 #include <sys/types.h>
3298 EOF
3299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3300   egrep "uid_t" >/dev/null 2>&1; then
3301   rm -rf conftest*
3302   ac_cv_type_uid_t=yes
3303 else
3304   rm -rf conftest*
3305   ac_cv_type_uid_t=no
3306 fi
3307 rm -f conftest*
3308
3309 fi
3310
3311 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3312 if test $ac_cv_type_uid_t = no; then
3313   cat >> confdefs.h <<\EOF
3314 #define uid_t int
3315 EOF
3316
3317   cat >> confdefs.h <<\EOF
3318 #define gid_t int
3319 EOF
3320
3321 fi
3322
3323 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3324 echo "configure:3325: checking for mode_t" >&5
3325 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3326   echo $ac_n "(cached) $ac_c" 1>&6
3327 else
3328   cat > conftest.$ac_ext <<EOF
3329 #line 3330 "configure"
3330 #include "confdefs.h"
3331 #include <sys/types.h>
3332 #if STDC_HEADERS
3333 #include <stdlib.h>
3334 #include <stddef.h>
3335 #endif
3336 EOF
3337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3338   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3339   rm -rf conftest*
3340   ac_cv_type_mode_t=yes
3341 else
3342   rm -rf conftest*
3343   ac_cv_type_mode_t=no
3344 fi
3345 rm -f conftest*
3346
3347 fi
3348 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3349 if test $ac_cv_type_mode_t = no; then
3350   cat >> confdefs.h <<\EOF
3351 #define mode_t int
3352 EOF
3353
3354 fi
3355
3356 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3357 echo "configure:3358: checking for off_t" >&5
3358 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3359   echo $ac_n "(cached) $ac_c" 1>&6
3360 else
3361   cat > conftest.$ac_ext <<EOF
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364 #include <sys/types.h>
3365 #if STDC_HEADERS
3366 #include <stdlib.h>
3367 #include <stddef.h>
3368 #endif
3369 EOF
3370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3371   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3372   rm -rf conftest*
3373   ac_cv_type_off_t=yes
3374 else
3375   rm -rf conftest*
3376   ac_cv_type_off_t=no
3377 fi
3378 rm -f conftest*
3379
3380 fi
3381 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3382 if test $ac_cv_type_off_t = no; then
3383   cat >> confdefs.h <<\EOF
3384 #define off_t long
3385 EOF
3386
3387 fi
3388
3389 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3390 echo "configure:3391: checking for size_t" >&5
3391 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3392   echo $ac_n "(cached) $ac_c" 1>&6
3393 else
3394   cat > conftest.$ac_ext <<EOF
3395 #line 3396 "configure"
3396 #include "confdefs.h"
3397 #include <sys/types.h>
3398 #if STDC_HEADERS
3399 #include <stdlib.h>
3400 #include <stddef.h>
3401 #endif
3402 EOF
3403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3404   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3405   rm -rf conftest*
3406   ac_cv_type_size_t=yes
3407 else
3408   rm -rf conftest*
3409   ac_cv_type_size_t=no
3410 fi
3411 rm -f conftest*
3412
3413 fi
3414 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3415 if test $ac_cv_type_size_t = no; then
3416   cat >> confdefs.h <<\EOF
3417 #define size_t unsigned
3418 EOF
3419
3420 fi
3421
3422 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3423 echo "configure:3424: checking for pid_t" >&5
3424 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3425   echo $ac_n "(cached) $ac_c" 1>&6
3426 else
3427   cat > conftest.$ac_ext <<EOF
3428 #line 3429 "configure"
3429 #include "confdefs.h"
3430 #include <sys/types.h>
3431 #if STDC_HEADERS
3432 #include <stdlib.h>
3433 #include <stddef.h>
3434 #endif
3435 EOF
3436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3437   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3438   rm -rf conftest*
3439   ac_cv_type_pid_t=yes
3440 else
3441   rm -rf conftest*
3442   ac_cv_type_pid_t=no
3443 fi
3444 rm -f conftest*
3445
3446 fi
3447 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3448 if test $ac_cv_type_pid_t = no; then
3449   cat >> confdefs.h <<\EOF
3450 #define pid_t int
3451 EOF
3452
3453 fi
3454
3455 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3456 echo "configure:3457: checking for st_rdev in struct stat" >&5
3457 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3458   echo $ac_n "(cached) $ac_c" 1>&6
3459 else
3460   cat > conftest.$ac_ext <<EOF
3461 #line 3462 "configure"
3462 #include "confdefs.h"
3463 #include <sys/types.h>
3464 #include <sys/stat.h>
3465 int main() {
3466 struct stat s; s.st_rdev;
3467 ; return 0; }
3468 EOF
3469 if { (eval echo configure:3470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3470   rm -rf conftest*
3471   ac_cv_struct_st_rdev=yes
3472 else
3473   echo "configure: failed program was:" >&5
3474   cat conftest.$ac_ext >&5
3475   rm -rf conftest*
3476   ac_cv_struct_st_rdev=no
3477 fi
3478 rm -f conftest*
3479 fi
3480
3481 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3482 if test $ac_cv_struct_st_rdev = yes; then
3483   cat >> confdefs.h <<\EOF
3484 #define HAVE_ST_RDEV 1
3485 EOF
3486
3487 fi
3488
3489 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3490 echo "configure:3491: checking for d_off in dirent" >&5
3491 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3492   echo $ac_n "(cached) $ac_c" 1>&6
3493 else
3494   cat > conftest.$ac_ext <<EOF
3495 #line 3496 "configure"
3496 #include "confdefs.h"
3497
3498 #include <unistd.h>
3499 #include <sys/types.h>
3500 #include <dirent.h>
3501 int main() {
3502 struct dirent d; d.d_off;
3503 ; return 0; }
3504 EOF
3505 if { (eval echo configure:3506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3506   rm -rf conftest*
3507   ac_cv_dirent_d_off=yes
3508 else
3509   echo "configure: failed program was:" >&5
3510   cat conftest.$ac_ext >&5
3511   rm -rf conftest*
3512   ac_cv_dirent_d_off=no
3513 fi
3514 rm -f conftest*
3515 fi
3516
3517 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3518 if test $ac_cv_dirent_d_off = yes; then
3519   cat >> confdefs.h <<\EOF
3520 #define HAVE_DIRENT_D_OFF 1
3521 EOF
3522
3523 fi
3524
3525 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3526 echo "configure:3527: checking for ino_t" >&5
3527 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3528   echo $ac_n "(cached) $ac_c" 1>&6
3529 else
3530   cat > conftest.$ac_ext <<EOF
3531 #line 3532 "configure"
3532 #include "confdefs.h"
3533 #include <sys/types.h>
3534 #if STDC_HEADERS
3535 #include <stdlib.h>
3536 #include <stddef.h>
3537 #endif
3538 EOF
3539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3540   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3541   rm -rf conftest*
3542   ac_cv_type_ino_t=yes
3543 else
3544   rm -rf conftest*
3545   ac_cv_type_ino_t=no
3546 fi
3547 rm -f conftest*
3548
3549 fi
3550 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3551 if test $ac_cv_type_ino_t = no; then
3552   cat >> confdefs.h <<\EOF
3553 #define ino_t unsigned
3554 EOF
3555
3556 fi
3557
3558 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3559 echo "configure:3560: checking for loff_t" >&5
3560 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3561   echo $ac_n "(cached) $ac_c" 1>&6
3562 else
3563   cat > conftest.$ac_ext <<EOF
3564 #line 3565 "configure"
3565 #include "confdefs.h"
3566 #include <sys/types.h>
3567 #if STDC_HEADERS
3568 #include <stdlib.h>
3569 #include <stddef.h>
3570 #endif
3571 EOF
3572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3573   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3574   rm -rf conftest*
3575   ac_cv_type_loff_t=yes
3576 else
3577   rm -rf conftest*
3578   ac_cv_type_loff_t=no
3579 fi
3580 rm -f conftest*
3581
3582 fi
3583 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3584 if test $ac_cv_type_loff_t = no; then
3585   cat >> confdefs.h <<\EOF
3586 #define loff_t off_t
3587 EOF
3588
3589 fi
3590
3591 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3592 echo "configure:3593: checking for offset_t" >&5
3593 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3594   echo $ac_n "(cached) $ac_c" 1>&6
3595 else
3596   cat > conftest.$ac_ext <<EOF
3597 #line 3598 "configure"
3598 #include "confdefs.h"
3599 #include <sys/types.h>
3600 #if STDC_HEADERS
3601 #include <stdlib.h>
3602 #include <stddef.h>
3603 #endif
3604 EOF
3605 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3606   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3607   rm -rf conftest*
3608   ac_cv_type_offset_t=yes
3609 else
3610   rm -rf conftest*
3611   ac_cv_type_offset_t=no
3612 fi
3613 rm -f conftest*
3614
3615 fi
3616 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3617 if test $ac_cv_type_offset_t = no; then
3618   cat >> confdefs.h <<\EOF
3619 #define offset_t loff_t
3620 EOF
3621
3622 fi
3623
3624 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3625 echo "configure:3626: checking for ssize_t" >&5
3626 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3627   echo $ac_n "(cached) $ac_c" 1>&6
3628 else
3629   cat > conftest.$ac_ext <<EOF
3630 #line 3631 "configure"
3631 #include "confdefs.h"
3632 #include <sys/types.h>
3633 #if STDC_HEADERS
3634 #include <stdlib.h>
3635 #include <stddef.h>
3636 #endif
3637 EOF
3638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3639   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3640   rm -rf conftest*
3641   ac_cv_type_ssize_t=yes
3642 else
3643   rm -rf conftest*
3644   ac_cv_type_ssize_t=no
3645 fi
3646 rm -f conftest*
3647
3648 fi
3649 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3650 if test $ac_cv_type_ssize_t = no; then
3651   cat >> confdefs.h <<\EOF
3652 #define ssize_t int
3653 EOF
3654
3655 fi
3656
3657 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3658 echo "configure:3659: checking for wchar_t" >&5
3659 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3660   echo $ac_n "(cached) $ac_c" 1>&6
3661 else
3662   cat > conftest.$ac_ext <<EOF
3663 #line 3664 "configure"
3664 #include "confdefs.h"
3665 #include <sys/types.h>
3666 #if STDC_HEADERS
3667 #include <stdlib.h>
3668 #include <stddef.h>
3669 #endif
3670 EOF
3671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3672   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3673   rm -rf conftest*
3674   ac_cv_type_wchar_t=yes
3675 else
3676   rm -rf conftest*
3677   ac_cv_type_wchar_t=no
3678 fi
3679 rm -f conftest*
3680
3681 fi
3682 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3683 if test $ac_cv_type_wchar_t = no; then
3684   cat >> confdefs.h <<\EOF
3685 #define wchar_t unsigned short
3686 EOF
3687
3688 fi
3689
3690
3691 ############################################
3692 # for cups support we need libcups, and a handful of header files
3693
3694 # Check whether --enable-cups or --disable-cups was given.
3695 if test "${enable_cups+set}" = set; then
3696   enableval="$enable_cups"
3697   :
3698 fi
3699
3700
3701 if test x$enable_cups != xno; then
3702         # Extract the first word of "cups-config", so it can be a program name with args.
3703 set dummy cups-config; ac_word=$2
3704 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3705 echo "configure:3706: checking for $ac_word" >&5
3706 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
3707   echo $ac_n "(cached) $ac_c" 1>&6
3708 else
3709   case "$CUPS_CONFIG" in
3710   /*)
3711   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
3712   ;;
3713   ?:/*)                  
3714   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
3715   ;;
3716   *)
3717   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3718   ac_dummy="$PATH"
3719   for ac_dir in $ac_dummy; do 
3720     test -z "$ac_dir" && ac_dir=.
3721     if test -f $ac_dir/$ac_word; then
3722       ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
3723       break
3724     fi
3725   done
3726   IFS="$ac_save_ifs"
3727   ;;
3728 esac
3729 fi
3730 CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
3731 if test -n "$CUPS_CONFIG"; then
3732   echo "$ac_t""$CUPS_CONFIG" 1>&6
3733 else
3734   echo "$ac_t""no" 1>&6
3735 fi
3736
3737
3738         if test "x$CUPS_CONFIG" != x; then
3739                         cat >> confdefs.h <<\EOF
3740 #define HAVE_CUPS 1
3741 EOF
3742
3743                 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
3744                 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
3745                 LIBS="$LIBS `$CUPS_CONFIG --libs`"
3746         fi
3747 fi
3748
3749 ############################################
3750 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3751 for ac_func in dlopen
3752 do
3753 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3754 echo "configure:3755: checking for $ac_func" >&5
3755 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3756   echo $ac_n "(cached) $ac_c" 1>&6
3757 else
3758   cat > conftest.$ac_ext <<EOF
3759 #line 3760 "configure"
3760 #include "confdefs.h"
3761 /* System header to define __stub macros and hopefully few prototypes,
3762     which can conflict with char $ac_func(); below.  */
3763 #include <assert.h>
3764 /* Override any gcc2 internal prototype to avoid an error.  */
3765 /* We use char because int might match the return type of a gcc2
3766     builtin and then its argument prototype would still apply.  */
3767 char $ac_func();
3768
3769 int main() {
3770
3771 /* The GNU C library defines this for functions which it implements
3772     to always fail with ENOSYS.  Some functions are actually named
3773     something starting with __ and the normal name is an alias.  */
3774 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3775 choke me
3776 #else
3777 $ac_func();
3778 #endif
3779
3780 ; return 0; }
3781 EOF
3782 if { (eval echo configure:3783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3783   rm -rf conftest*
3784   eval "ac_cv_func_$ac_func=yes"
3785 else
3786   echo "configure: failed program was:" >&5
3787   cat conftest.$ac_ext >&5
3788   rm -rf conftest*
3789   eval "ac_cv_func_$ac_func=no"
3790 fi
3791 rm -f conftest*
3792 fi
3793
3794 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3795   echo "$ac_t""yes" 1>&6
3796     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3797   cat >> confdefs.h <<EOF
3798 #define $ac_tr_func 1
3799 EOF
3800  
3801 else
3802   echo "$ac_t""no" 1>&6
3803 fi
3804 done
3805
3806 if test x"$ac_cv_func_dlopen" = x"no"; then
3807     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3808 echo "configure:3809: checking for dlopen in -ldl" >&5
3809 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3810 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3811   echo $ac_n "(cached) $ac_c" 1>&6
3812 else
3813   ac_save_LIBS="$LIBS"
3814 LIBS="-ldl  $LIBS"
3815 cat > conftest.$ac_ext <<EOF
3816 #line 3817 "configure"
3817 #include "confdefs.h"
3818 /* Override any gcc2 internal prototype to avoid an error.  */
3819 /* We use char because int might match the return type of a gcc2
3820     builtin and then its argument prototype would still apply.  */
3821 char dlopen();
3822
3823 int main() {
3824 dlopen()
3825 ; return 0; }
3826 EOF
3827 if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3828   rm -rf conftest*
3829   eval "ac_cv_lib_$ac_lib_var=yes"
3830 else
3831   echo "configure: failed program was:" >&5
3832   cat conftest.$ac_ext >&5
3833   rm -rf conftest*
3834   eval "ac_cv_lib_$ac_lib_var=no"
3835 fi
3836 rm -f conftest*
3837 LIBS="$ac_save_LIBS"
3838
3839 fi
3840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3841   echo "$ac_t""yes" 1>&6
3842   LIBS="$LIBS -ldl";
3843         cat >> confdefs.h <<\EOF
3844 #define HAVE_DLOPEN 1
3845 EOF
3846
3847 else
3848   echo "$ac_t""no" 1>&6
3849 fi
3850
3851 fi
3852 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3853
3854 ############################################
3855 # check if the compiler can do immediate structures
3856 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3857 echo "configure:3858: checking for immediate structures" >&5
3858 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3859   echo $ac_n "(cached) $ac_c" 1>&6
3860 else
3861   
3862     cat > conftest.$ac_ext <<EOF
3863 #line 3864 "configure"
3864 #include "confdefs.h"
3865
3866 #include <stdio.h>
3867 int main() {
3868
3869    typedef struct {unsigned x;} FOOBAR;
3870    #define X_FOOBAR(x) ((FOOBAR) { x })
3871    #define FOO_ONE X_FOOBAR(1)
3872    FOOBAR f = FOO_ONE;   
3873    static struct {
3874         FOOBAR y; 
3875         } f2[] = {
3876                 {FOO_ONE}
3877         };   
3878
3879 ; return 0; }
3880 EOF
3881 if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3882   rm -rf conftest*
3883   samba_cv_immediate_structures=yes
3884 else
3885   echo "configure: failed program was:" >&5
3886   cat conftest.$ac_ext >&5
3887   rm -rf conftest*
3888   samba_cv_immediate_structures=no
3889 fi
3890 rm -f conftest*
3891 fi
3892
3893 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3894 if test x"$samba_cv_immediate_structures" = x"yes"; then
3895    cat >> confdefs.h <<\EOF
3896 #define HAVE_IMMEDIATE_STRUCTURES 1
3897 EOF
3898
3899 fi
3900
3901 ############################################
3902 # check for unix domain sockets
3903 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3904 echo "configure:3905: checking for unix domain sockets" >&5
3905 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3906   echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908   
3909     cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912
3913 #include <sys/types.h>
3914 #include <stdlib.h>
3915 #include <stddef.h>
3916 #include <sys/socket.h>
3917 #include <sys/un.h>
3918 int main() {
3919
3920   struct sockaddr_un sunaddr; 
3921   sunaddr.sun_family = AF_UNIX;
3922
3923 ; return 0; }
3924 EOF
3925 if { (eval echo configure:3926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3926   rm -rf conftest*
3927   samba_cv_unixsocket=yes
3928 else
3929   echo "configure: failed program was:" >&5
3930   cat conftest.$ac_ext >&5
3931   rm -rf conftest*
3932   samba_cv_unixsocket=no
3933 fi
3934 rm -f conftest*
3935 fi
3936
3937 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3938 if test x"$samba_cv_unixsocket" = x"yes"; then
3939    cat >> confdefs.h <<\EOF
3940 #define HAVE_UNIXSOCKET 1
3941 EOF
3942
3943 fi
3944
3945
3946 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3947 echo "configure:3948: checking for socklen_t type" >&5
3948 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3949   echo $ac_n "(cached) $ac_c" 1>&6
3950 else
3951   
3952     cat > conftest.$ac_ext <<EOF
3953 #line 3954 "configure"
3954 #include "confdefs.h"
3955
3956 #include <sys/types.h>
3957 #if STDC_HEADERS
3958 #include <stdlib.h>
3959 #include <stddef.h>
3960 #endif
3961 #include <sys/socket.h>
3962 int main() {
3963 socklen_t i = 0
3964 ; return 0; }
3965 EOF
3966 if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3967   rm -rf conftest*
3968   samba_cv_socklen_t=yes
3969 else
3970   echo "configure: failed program was:" >&5
3971   cat conftest.$ac_ext >&5
3972   rm -rf conftest*
3973   samba_cv_socklen_t=no
3974 fi
3975 rm -f conftest*
3976 fi
3977
3978 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3979 if test x"$samba_cv_socklen_t" = x"yes"; then
3980    cat >> confdefs.h <<\EOF
3981 #define HAVE_SOCKLEN_T_TYPE 1
3982 EOF
3983
3984 fi
3985
3986 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3987 echo "configure:3988: checking for sig_atomic_t type" >&5
3988 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3989   echo $ac_n "(cached) $ac_c" 1>&6
3990 else
3991   
3992     cat > conftest.$ac_ext <<EOF
3993 #line 3994 "configure"
3994 #include "confdefs.h"
3995
3996 #include <sys/types.h>
3997 #if STDC_HEADERS
3998 #include <stdlib.h>
3999 #include <stddef.h>
4000 #endif
4001 #include <signal.h>
4002 int main() {
4003 sig_atomic_t i = 0
4004 ; return 0; }
4005 EOF
4006 if { (eval echo configure:4007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4007   rm -rf conftest*
4008   samba_cv_sig_atomic_t=yes
4009 else
4010   echo "configure: failed program was:" >&5
4011   cat conftest.$ac_ext >&5
4012   rm -rf conftest*
4013   samba_cv_sig_atomic_t=no
4014 fi
4015 rm -f conftest*
4016 fi
4017
4018 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4019 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4020    cat >> confdefs.h <<\EOF
4021 #define HAVE_SIG_ATOMIC_T_TYPE 1
4022 EOF
4023
4024 fi
4025
4026 # stupid headers have the functions but no declaration. grrrr.
4027
4028  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4029 echo "configure:4030: checking for errno declaration" >&5
4030 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4031   echo $ac_n "(cached) $ac_c" 1>&6
4032 else
4033   
4034     cat > conftest.$ac_ext <<EOF
4035 #line 4036 "configure"
4036 #include "confdefs.h"
4037 #include <errno.h>
4038 int main() {
4039 int i = (int)errno
4040 ; return 0; }
4041 EOF
4042 if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4043   rm -rf conftest*
4044   ac_cv_have_errno_decl=yes
4045 else
4046   echo "configure: failed program was:" >&5
4047   cat conftest.$ac_ext >&5
4048   rm -rf conftest*
4049   ac_cv_have_errno_decl=no
4050 fi
4051 rm -f conftest*
4052 fi
4053
4054 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4055  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4056     cat >> confdefs.h <<\EOF
4057 #define HAVE_ERRNO_DECL 1
4058 EOF
4059
4060  fi
4061
4062
4063  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4064 echo "configure:4065: checking for setresuid declaration" >&5
4065 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4066   echo $ac_n "(cached) $ac_c" 1>&6
4067 else
4068   
4069     cat > conftest.$ac_ext <<EOF
4070 #line 4071 "configure"
4071 #include "confdefs.h"
4072 #include <unistd.h>
4073 int main() {
4074 int i = (int)setresuid
4075 ; return 0; }
4076 EOF
4077 if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4078   rm -rf conftest*
4079   ac_cv_have_setresuid_decl=yes
4080 else
4081   echo "configure: failed program was:" >&5
4082   cat conftest.$ac_ext >&5
4083   rm -rf conftest*
4084   ac_cv_have_setresuid_decl=no
4085 fi
4086 rm -f conftest*
4087 fi
4088
4089 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4090  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4091     cat >> confdefs.h <<\EOF
4092 #define HAVE_SETRESUID_DECL 1
4093 EOF
4094
4095  fi
4096
4097
4098  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4099 echo "configure:4100: checking for setresgid declaration" >&5
4100 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4101   echo $ac_n "(cached) $ac_c" 1>&6
4102 else
4103   
4104     cat > conftest.$ac_ext <<EOF
4105 #line 4106 "configure"
4106 #include "confdefs.h"
4107 #include <unistd.h>
4108 int main() {
4109 int i = (int)setresgid
4110 ; return 0; }
4111 EOF
4112 if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4113   rm -rf conftest*
4114   ac_cv_have_setresgid_decl=yes
4115 else
4116   echo "configure: failed program was:" >&5
4117   cat conftest.$ac_ext >&5
4118   rm -rf conftest*
4119   ac_cv_have_setresgid_decl=no
4120 fi
4121 rm -f conftest*
4122 fi
4123
4124 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4125  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4126     cat >> confdefs.h <<\EOF
4127 #define HAVE_SETRESGID_DECL 1
4128 EOF
4129
4130  fi
4131
4132
4133  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4134 echo "configure:4135: checking for asprintf declaration" >&5
4135 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4136   echo $ac_n "(cached) $ac_c" 1>&6
4137 else
4138   
4139     cat > conftest.$ac_ext <<EOF
4140 #line 4141 "configure"
4141 #include "confdefs.h"
4142 #include <stdio.h>
4143 int main() {
4144 int i = (int)asprintf
4145 ; return 0; }
4146 EOF
4147 if { (eval echo configure:4148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4148   rm -rf conftest*
4149   ac_cv_have_asprintf_decl=yes
4150 else
4151   echo "configure: failed program was:" >&5
4152   cat conftest.$ac_ext >&5
4153   rm -rf conftest*
4154   ac_cv_have_asprintf_decl=no
4155 fi
4156 rm -f conftest*
4157 fi
4158
4159 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4160  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4161     cat >> confdefs.h <<\EOF
4162 #define HAVE_ASPRINTF_DECL 1
4163 EOF
4164
4165  fi
4166
4167
4168  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4169 echo "configure:4170: checking for vasprintf declaration" >&5
4170 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4171   echo $ac_n "(cached) $ac_c" 1>&6
4172 else
4173   
4174     cat > conftest.$ac_ext <<EOF
4175 #line 4176 "configure"
4176 #include "confdefs.h"
4177 #include <stdio.h>
4178 int main() {
4179 int i = (int)vasprintf
4180 ; return 0; }
4181 EOF
4182 if { (eval echo configure:4183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4183   rm -rf conftest*
4184   ac_cv_have_vasprintf_decl=yes
4185 else
4186   echo "configure: failed program was:" >&5
4187   cat conftest.$ac_ext >&5
4188   rm -rf conftest*
4189   ac_cv_have_vasprintf_decl=no
4190 fi
4191 rm -f conftest*
4192 fi
4193
4194 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4195  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4196     cat >> confdefs.h <<\EOF
4197 #define HAVE_VASPRINTF_DECL 1
4198 EOF
4199
4200  fi
4201
4202
4203  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4204 echo "configure:4205: checking for vsnprintf declaration" >&5
4205 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4206   echo $ac_n "(cached) $ac_c" 1>&6
4207 else
4208   
4209     cat > conftest.$ac_ext <<EOF
4210 #line 4211 "configure"
4211 #include "confdefs.h"
4212 #include <stdio.h>
4213 int main() {
4214 int i = (int)vsnprintf
4215 ; return 0; }
4216 EOF
4217 if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4218   rm -rf conftest*
4219   ac_cv_have_vsnprintf_decl=yes
4220 else
4221   echo "configure: failed program was:" >&5
4222   cat conftest.$ac_ext >&5
4223   rm -rf conftest*
4224   ac_cv_have_vsnprintf_decl=no
4225 fi
4226 rm -f conftest*
4227 fi
4228
4229 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4230  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4231     cat >> confdefs.h <<\EOF
4232 #define HAVE_VSNPRINTF_DECL 1
4233 EOF
4234
4235  fi
4236
4237
4238  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4239 echo "configure:4240: checking for snprintf declaration" >&5
4240 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4241   echo $ac_n "(cached) $ac_c" 1>&6
4242 else
4243   
4244     cat > conftest.$ac_ext <<EOF
4245 #line 4246 "configure"
4246 #include "confdefs.h"
4247 #include <stdio.h>
4248 int main() {
4249 int i = (int)snprintf
4250 ; return 0; }
4251 EOF
4252 if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4253   rm -rf conftest*
4254   ac_cv_have_snprintf_decl=yes
4255 else
4256   echo "configure: failed program was:" >&5
4257   cat conftest.$ac_ext >&5
4258   rm -rf conftest*
4259   ac_cv_have_snprintf_decl=no
4260 fi
4261 rm -f conftest*
4262 fi
4263
4264 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4265  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4266     cat >> confdefs.h <<\EOF
4267 #define HAVE_SNPRINTF_DECL 1
4268 EOF
4269
4270  fi
4271
4272
4273 # and glibc has setresuid under linux but the function does
4274 # nothing until kernel 2.1.44! very dumb.
4275 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4276 echo "configure:4277: checking for real setresuid" >&5
4277 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4278   echo $ac_n "(cached) $ac_c" 1>&6
4279 else
4280   
4281     if test "$cross_compiling" = yes; then
4282   samba_cv_have_setresuid=cross
4283 else
4284   cat > conftest.$ac_ext <<EOF
4285 #line 4286 "configure"
4286 #include "confdefs.h"
4287 #include <errno.h>
4288 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4289 EOF
4290 if { (eval echo configure:4291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4291 then
4292   samba_cv_have_setresuid=yes
4293 else
4294   echo "configure: failed program was:" >&5
4295   cat conftest.$ac_ext >&5
4296   rm -fr conftest*
4297   samba_cv_have_setresuid=no
4298 fi
4299 rm -fr conftest*
4300 fi
4301
4302 fi
4303
4304 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4305 if test x"$samba_cv_have_setresuid" = x"yes"; then
4306     cat >> confdefs.h <<\EOF
4307 #define HAVE_SETRESUID 1
4308 EOF
4309
4310 fi
4311
4312 # Do the same check for setresguid...
4313 #
4314 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4315 echo "configure:4316: checking for real setresgid" >&5
4316 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4317   echo $ac_n "(cached) $ac_c" 1>&6
4318 else
4319   
4320     if test "$cross_compiling" = yes; then
4321   samba_cv_have_setresgid=cross
4322 else
4323   cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326 #include <unistd.h>
4327 #include <errno.h>
4328 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4329 EOF
4330 if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4331 then
4332   samba_cv_have_setresgid=yes
4333 else
4334   echo "configure: failed program was:" >&5
4335   cat conftest.$ac_ext >&5
4336   rm -fr conftest*
4337   samba_cv_have_setresgid=no
4338 fi
4339 rm -fr conftest*
4340 fi
4341
4342 fi
4343
4344 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4345 if test x"$samba_cv_have_setresgid" = x"yes"; then
4346     cat >> confdefs.h <<\EOF
4347 #define HAVE_SETRESGID 1
4348 EOF
4349
4350 fi
4351
4352 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4353 echo "configure:4354: checking for 8-bit clean memcmp" >&5
4354 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4355   echo $ac_n "(cached) $ac_c" 1>&6
4356 else
4357   if test "$cross_compiling" = yes; then
4358   ac_cv_func_memcmp_clean=no
4359 else
4360   cat > conftest.$ac_ext <<EOF
4361 #line 4362 "configure"
4362 #include "confdefs.h"
4363
4364 main()
4365 {
4366   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4367   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4368 }
4369
4370 EOF
4371 if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4372 then
4373   ac_cv_func_memcmp_clean=yes
4374 else
4375   echo "configure: failed program was:" >&5
4376   cat conftest.$ac_ext >&5
4377   rm -fr conftest*
4378   ac_cv_func_memcmp_clean=no
4379 fi
4380 rm -fr conftest*
4381 fi
4382
4383 fi
4384
4385 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4386 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4387
4388
4389 ###############################################
4390 # test for where we get crypt() from
4391 for ac_func in crypt
4392 do
4393 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4394 echo "configure:4395: checking for $ac_func" >&5
4395 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4396   echo $ac_n "(cached) $ac_c" 1>&6
4397 else
4398   cat > conftest.$ac_ext <<EOF
4399 #line 4400 "configure"
4400 #include "confdefs.h"
4401 /* System header to define __stub macros and hopefully few prototypes,
4402     which can conflict with char $ac_func(); below.  */
4403 #include <assert.h>
4404 /* Override any gcc2 internal prototype to avoid an error.  */
4405 /* We use char because int might match the return type of a gcc2
4406     builtin and then its argument prototype would still apply.  */
4407 char $ac_func();
4408
4409 int main() {
4410
4411 /* The GNU C library defines this for functions which it implements
4412     to always fail with ENOSYS.  Some functions are actually named
4413     something starting with __ and the normal name is an alias.  */
4414 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4415 choke me
4416 #else
4417 $ac_func();
4418 #endif
4419
4420 ; return 0; }
4421 EOF
4422 if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4423   rm -rf conftest*
4424   eval "ac_cv_func_$ac_func=yes"
4425 else
4426   echo "configure: failed program was:" >&5
4427   cat conftest.$ac_ext >&5
4428   rm -rf conftest*
4429   eval "ac_cv_func_$ac_func=no"
4430 fi
4431 rm -f conftest*
4432 fi
4433
4434 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4435   echo "$ac_t""yes" 1>&6
4436     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4437   cat >> confdefs.h <<EOF
4438 #define $ac_tr_func 1
4439 EOF
4440  
4441 else
4442   echo "$ac_t""no" 1>&6
4443 fi
4444 done
4445
4446 if test x"$ac_cv_func_crypt" = x"no"; then
4447     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4448 echo "configure:4449: checking for crypt in -lcrypt" >&5
4449 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4450 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4451   echo $ac_n "(cached) $ac_c" 1>&6
4452 else
4453   ac_save_LIBS="$LIBS"
4454 LIBS="-lcrypt  $LIBS"
4455 cat > conftest.$ac_ext <<EOF
4456 #line 4457 "configure"
4457 #include "confdefs.h"
4458 /* Override any gcc2 internal prototype to avoid an error.  */
4459 /* We use char because int might match the return type of a gcc2
4460     builtin and then its argument prototype would still apply.  */
4461 char crypt();
4462
4463 int main() {
4464 crypt()
4465 ; return 0; }
4466 EOF
4467 if { (eval echo configure:4468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4468   rm -rf conftest*
4469   eval "ac_cv_lib_$ac_lib_var=yes"
4470 else
4471   echo "configure: failed program was:" >&5
4472   cat conftest.$ac_ext >&5
4473   rm -rf conftest*
4474   eval "ac_cv_lib_$ac_lib_var=no"
4475 fi
4476 rm -f conftest*
4477 LIBS="$ac_save_LIBS"
4478
4479 fi
4480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4481   echo "$ac_t""yes" 1>&6
4482   LIBS="$LIBS -lcrypt";
4483         cat >> confdefs.h <<\EOF
4484 #define HAVE_CRYPT 1
4485 EOF
4486
4487 else
4488   echo "$ac_t""no" 1>&6
4489 fi
4490
4491 fi
4492
4493
4494 ###############################################
4495 # Readline included by default unless explicitly asked not to
4496 test "${with_readline+set}" != "set" && with_readline=yes
4497
4498 # test for where we get readline() from
4499 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4500 echo "configure:4501: checking whether to use readline" >&5
4501 # Check whether --with-readline or --without-readline was given.
4502 if test "${with_readline+set}" = set; then
4503   withval="$with_readline"
4504     case "$with_readline" in
4505   yes)
4506     echo "$ac_t""yes" 1>&6
4507
4508     for ac_hdr in readline.h history.h readline/readline.h
4509 do
4510 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4511 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4512 echo "configure:4513: checking for $ac_hdr" >&5
4513 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4514   echo $ac_n "(cached) $ac_c" 1>&6
4515 else
4516   cat > conftest.$ac_ext <<EOF
4517 #line 4518 "configure"
4518 #include "confdefs.h"
4519 #include <$ac_hdr>
4520 EOF
4521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4522 { (eval echo configure:4523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4524 if test -z "$ac_err"; then
4525   rm -rf conftest*
4526   eval "ac_cv_header_$ac_safe=yes"
4527 else
4528   echo "$ac_err" >&5
4529   echo "configure: failed program was:" >&5
4530   cat conftest.$ac_ext >&5
4531   rm -rf conftest*
4532   eval "ac_cv_header_$ac_safe=no"
4533 fi
4534 rm -f conftest*
4535 fi
4536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4537   echo "$ac_t""yes" 1>&6
4538     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4539   cat >> confdefs.h <<EOF
4540 #define $ac_tr_hdr 1
4541 EOF
4542  
4543 else
4544   echo "$ac_t""no" 1>&6
4545 fi
4546 done
4547
4548     for ac_hdr in readline/history.h
4549 do
4550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4552 echo "configure:4553: checking for $ac_hdr" >&5
4553 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4554   echo $ac_n "(cached) $ac_c" 1>&6
4555 else
4556   cat > conftest.$ac_ext <<EOF
4557 #line 4558 "configure"
4558 #include "confdefs.h"
4559 #include <$ac_hdr>
4560 EOF
4561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4562 { (eval echo configure:4563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4564 if test -z "$ac_err"; then
4565   rm -rf conftest*
4566   eval "ac_cv_header_$ac_safe=yes"
4567 else
4568   echo "$ac_err" >&5
4569   echo "configure: failed program was:" >&5
4570   cat conftest.$ac_ext >&5
4571   rm -rf conftest*
4572   eval "ac_cv_header_$ac_safe=no"
4573 fi
4574 rm -f conftest*
4575 fi
4576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4577   echo "$ac_t""yes" 1>&6
4578     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4579   cat >> confdefs.h <<EOF
4580 #define $ac_tr_hdr 1
4581 EOF
4582  
4583 else
4584   echo "$ac_t""no" 1>&6
4585 fi
4586 done
4587
4588
4589     for ac_hdr in readline.h readline/readline.h
4590 do
4591 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4592 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4593 echo "configure:4594: checking for $ac_hdr" >&5
4594 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4595   echo $ac_n "(cached) $ac_c" 1>&6
4596 else
4597   cat > conftest.$ac_ext <<EOF
4598 #line 4599 "configure"
4599 #include "confdefs.h"
4600 #include <$ac_hdr>
4601 EOF
4602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4603 { (eval echo configure:4604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4605 if test -z "$ac_err"; then
4606   rm -rf conftest*
4607   eval "ac_cv_header_$ac_safe=yes"
4608 else
4609   echo "$ac_err" >&5
4610   echo "configure: failed program was:" >&5
4611   cat conftest.$ac_ext >&5
4612   rm -rf conftest*
4613   eval "ac_cv_header_$ac_safe=no"
4614 fi
4615 rm -f conftest*
4616 fi
4617 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4618   echo "$ac_t""yes" 1>&6
4619     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4620   cat >> confdefs.h <<EOF
4621 #define $ac_tr_hdr 1
4622 EOF
4623  
4624       for termlib in ncurses curses termcap terminfo termlib; do
4625        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4626 echo "configure:4627: checking for tgetent in -l${termlib}" >&5
4627 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4628 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4629   echo $ac_n "(cached) $ac_c" 1>&6
4630 else
4631   ac_save_LIBS="$LIBS"
4632 LIBS="-l${termlib}  $LIBS"
4633 cat > conftest.$ac_ext <<EOF
4634 #line 4635 "configure"
4635 #include "confdefs.h"
4636 /* Override any gcc2 internal prototype to avoid an error.  */
4637 /* We use char because int might match the return type of a gcc2
4638     builtin and then its argument prototype would still apply.  */
4639 char tgetent();
4640
4641 int main() {
4642 tgetent()
4643 ; return 0; }
4644 EOF
4645 if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4646   rm -rf conftest*
4647   eval "ac_cv_lib_$ac_lib_var=yes"
4648 else
4649   echo "configure: failed program was:" >&5
4650   cat conftest.$ac_ext >&5
4651   rm -rf conftest*
4652   eval "ac_cv_lib_$ac_lib_var=no"
4653 fi
4654 rm -f conftest*
4655 LIBS="$ac_save_LIBS"
4656
4657 fi
4658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4659   echo "$ac_t""yes" 1>&6
4660   TERMLIBS="-l${termlib}"; break
4661 else
4662   echo "$ac_t""no" 1>&6
4663 fi
4664
4665       done
4666       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4667 echo "configure:4668: checking for rl_callback_handler_install in -lreadline" >&5
4668 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4669 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4670   echo $ac_n "(cached) $ac_c" 1>&6
4671 else
4672   ac_save_LIBS="$LIBS"
4673 LIBS="-lreadline $TERMLIBS $LIBS"
4674 cat > conftest.$ac_ext <<EOF
4675 #line 4676 "configure"
4676 #include "confdefs.h"
4677 /* Override any gcc2 internal prototype to avoid an error.  */
4678 /* We use char because int might match the return type of a gcc2
4679     builtin and then its argument prototype would still apply.  */
4680 char rl_callback_handler_install();
4681
4682 int main() {
4683 rl_callback_handler_install()
4684 ; return 0; }
4685 EOF
4686 if { (eval echo configure:4687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4687   rm -rf conftest*
4688   eval "ac_cv_lib_$ac_lib_var=yes"
4689 else
4690   echo "configure: failed program was:" >&5
4691   cat conftest.$ac_ext >&5
4692   rm -rf conftest*
4693   eval "ac_cv_lib_$ac_lib_var=no"
4694 fi
4695 rm -f conftest*
4696 LIBS="$ac_save_LIBS"
4697
4698 fi
4699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4700   echo "$ac_t""yes" 1>&6
4701   TERMLIBS="-lreadline $TERMLIBS"
4702        cat >> confdefs.h <<\EOF
4703 #define HAVE_LIBREADLINE 1
4704 EOF
4705
4706        break
4707 else
4708   echo "$ac_t""no" 1>&6
4709 TERMLIBS=
4710 fi
4711
4712 else
4713   echo "$ac_t""no" 1>&6
4714 fi
4715 done
4716
4717     ;;
4718   no)
4719     echo "$ac_t""no" 1>&6
4720     ;;
4721   *)
4722     echo "$ac_t""yes" 1>&6
4723
4724     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4725     # alternate readline path
4726     _ldflags=${LDFLAGS}
4727     _cppflags=${CPPFLAGS}
4728
4729     # Add additional search path
4730     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4731     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4732
4733     for ac_hdr in readline.h history.h readline/readline.h
4734 do
4735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4737 echo "configure:4738: checking for $ac_hdr" >&5
4738 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4739   echo $ac_n "(cached) $ac_c" 1>&6
4740 else
4741   cat > conftest.$ac_ext <<EOF
4742 #line 4743 "configure"
4743 #include "confdefs.h"
4744 #include <$ac_hdr>
4745 EOF
4746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4747 { (eval echo configure:4748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4749 if test -z "$ac_err"; then
4750   rm -rf conftest*
4751   eval "ac_cv_header_$ac_safe=yes"
4752 else
4753   echo "$ac_err" >&5
4754   echo "configure: failed program was:" >&5
4755   cat conftest.$ac_ext >&5
4756   rm -rf conftest*
4757   eval "ac_cv_header_$ac_safe=no"
4758 fi
4759 rm -f conftest*
4760 fi
4761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4762   echo "$ac_t""yes" 1>&6
4763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4764   cat >> confdefs.h <<EOF
4765 #define $ac_tr_hdr 1
4766 EOF
4767  
4768 else
4769   echo "$ac_t""no" 1>&6
4770 fi
4771 done
4772
4773     for ac_hdr in readline/history.h
4774 do
4775 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4776 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4777 echo "configure:4778: checking for $ac_hdr" >&5
4778 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4779   echo $ac_n "(cached) $ac_c" 1>&6
4780 else
4781   cat > conftest.$ac_ext <<EOF
4782 #line 4783 "configure"
4783 #include "confdefs.h"
4784 #include <$ac_hdr>
4785 EOF
4786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4787 { (eval echo configure:4788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4789 if test -z "$ac_err"; then
4790   rm -rf conftest*
4791   eval "ac_cv_header_$ac_safe=yes"
4792 else
4793   echo "$ac_err" >&5
4794   echo "configure: failed program was:" >&5
4795   cat conftest.$ac_ext >&5
4796   rm -rf conftest*
4797   eval "ac_cv_header_$ac_safe=no"
4798 fi
4799 rm -f conftest*
4800 fi
4801 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4802   echo "$ac_t""yes" 1>&6
4803     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4804   cat >> confdefs.h <<EOF
4805 #define $ac_tr_hdr 1
4806 EOF
4807  
4808 else
4809   echo "$ac_t""no" 1>&6
4810 fi
4811 done
4812
4813
4814     for ac_hdr in readline.h readline/readline.h
4815 do
4816 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4817 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4818 echo "configure:4819: checking for $ac_hdr" >&5
4819 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4820   echo $ac_n "(cached) $ac_c" 1>&6
4821 else
4822   cat > conftest.$ac_ext <<EOF
4823 #line 4824 "configure"
4824 #include "confdefs.h"
4825 #include <$ac_hdr>
4826 EOF
4827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4828 { (eval echo configure:4829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4830 if test -z "$ac_err"; then
4831   rm -rf conftest*
4832   eval "ac_cv_header_$ac_safe=yes"
4833 else
4834   echo "$ac_err" >&5
4835   echo "configure: failed program was:" >&5
4836   cat conftest.$ac_ext >&5
4837   rm -rf conftest*
4838   eval "ac_cv_header_$ac_safe=no"
4839 fi
4840 rm -f conftest*
4841 fi
4842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4843   echo "$ac_t""yes" 1>&6
4844     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4845   cat >> confdefs.h <<EOF
4846 #define $ac_tr_hdr 1
4847 EOF
4848  
4849       for termlib in ncurses curses termcap terminfo termlib; do
4850        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4851 echo "configure:4852: checking for tgetent in -l${termlib}" >&5
4852 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4853 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4854   echo $ac_n "(cached) $ac_c" 1>&6
4855 else
4856   ac_save_LIBS="$LIBS"
4857 LIBS="-l${termlib}  $LIBS"
4858 cat > conftest.$ac_ext <<EOF
4859 #line 4860 "configure"
4860 #include "confdefs.h"
4861 /* Override any gcc2 internal prototype to avoid an error.  */
4862 /* We use char because int might match the return type of a gcc2
4863     builtin and then its argument prototype would still apply.  */
4864 char tgetent();
4865
4866 int main() {
4867 tgetent()
4868 ; return 0; }
4869 EOF
4870 if { (eval echo configure:4871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4871   rm -rf conftest*
4872   eval "ac_cv_lib_$ac_lib_var=yes"
4873 else
4874   echo "configure: failed program was:" >&5
4875   cat conftest.$ac_ext >&5
4876   rm -rf conftest*
4877   eval "ac_cv_lib_$ac_lib_var=no"
4878 fi
4879 rm -f conftest*
4880 LIBS="$ac_save_LIBS"
4881
4882 fi
4883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4884   echo "$ac_t""yes" 1>&6
4885   TERMLIBS="-l${termlib}"; break
4886 else
4887   echo "$ac_t""no" 1>&6
4888 fi
4889
4890       done
4891       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4892 echo "configure:4893: checking for rl_callback_handler_install in -lreadline" >&5
4893 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4894 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4895   echo $ac_n "(cached) $ac_c" 1>&6
4896 else
4897   ac_save_LIBS="$LIBS"
4898 LIBS="-lreadline $TERMLIBS $LIBS"
4899 cat > conftest.$ac_ext <<EOF
4900 #line 4901 "configure"
4901 #include "confdefs.h"
4902 /* Override any gcc2 internal prototype to avoid an error.  */
4903 /* We use char because int might match the return type of a gcc2
4904     builtin and then its argument prototype would still apply.  */
4905 char rl_callback_handler_install();
4906
4907 int main() {
4908 rl_callback_handler_install()
4909 ; return 0; }
4910 EOF
4911 if { (eval echo configure:4912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4912   rm -rf conftest*
4913   eval "ac_cv_lib_$ac_lib_var=yes"
4914 else
4915   echo "configure: failed program was:" >&5
4916   cat conftest.$ac_ext >&5
4917   rm -rf conftest*
4918   eval "ac_cv_lib_$ac_lib_var=no"
4919 fi
4920 rm -f conftest*
4921 LIBS="$ac_save_LIBS"
4922
4923 fi
4924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4925   echo "$ac_t""yes" 1>&6
4926   TERMLDFLAGS="-L$with_readline/lib"
4927        TERMCPPFLAGS="-I$with_readline/include"
4928        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4929        TERMLIBS="-lreadline $TERMLIBS"
4930        cat >> confdefs.h <<\EOF
4931 #define HAVE_LIBREADLINE 1
4932 EOF
4933
4934        break
4935 else
4936   echo "$ac_t""no" 1>&6
4937 TERMLIBS= CPPFLAGS=$_cppflags
4938 fi
4939
4940 else
4941   echo "$ac_t""no" 1>&6
4942 fi
4943 done
4944
4945
4946     LDFLAGS=$_ldflags
4947     ;;
4948   esac
4949 else
4950   echo "$ac_t""no" 1>&6
4951
4952 fi
4953
4954
4955
4956
4957 # The readline API changed slightly from readline3 to readline4, so
4958 # code will generate warnings on one of them unless we have a few
4959 # special cases.
4960 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4961 echo "configure:4962: checking for rl_completion_matches in -lreadline" >&5
4962 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4963 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4964   echo $ac_n "(cached) $ac_c" 1>&6
4965 else
4966   ac_save_LIBS="$LIBS"
4967 LIBS="-lreadline $TERMLIBS $LIBS"
4968 cat > conftest.$ac_ext <<EOF
4969 #line 4970 "configure"
4970 #include "confdefs.h"
4971 /* Override any gcc2 internal prototype to avoid an error.  */
4972 /* We use char because int might match the return type of a gcc2
4973     builtin and then its argument prototype would still apply.  */
4974 char rl_completion_matches();
4975
4976 int main() {
4977 rl_completion_matches()
4978 ; return 0; }
4979 EOF
4980 if { (eval echo configure:4981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4981   rm -rf conftest*
4982   eval "ac_cv_lib_$ac_lib_var=yes"
4983 else
4984   echo "configure: failed program was:" >&5
4985   cat conftest.$ac_ext >&5
4986   rm -rf conftest*
4987   eval "ac_cv_lib_$ac_lib_var=no"
4988 fi
4989 rm -f conftest*
4990 LIBS="$ac_save_LIBS"
4991
4992 fi
4993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4994   echo "$ac_t""yes" 1>&6
4995   cat >> confdefs.h <<\EOF
4996 #define HAVE_NEW_LIBREADLINE 1
4997 EOF
4998
4999 else
5000   echo "$ac_t""no" 1>&6
5001 fi
5002
5003
5004 # The following test taken from the cvs sources
5005 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5006 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5007 # libsocket.so which has a bad implementation of gethostbyname (it
5008 # only looks in /etc/hosts), so we only look for -lsocket if we need
5009 # it.
5010 for ac_func in connect
5011 do
5012 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5013 echo "configure:5014: checking for $ac_func" >&5
5014 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5015   echo $ac_n "(cached) $ac_c" 1>&6
5016 else
5017   cat > conftest.$ac_ext <<EOF
5018 #line 5019 "configure"
5019 #include "confdefs.h"
5020 /* System header to define __stub macros and hopefully few prototypes,
5021     which can conflict with char $ac_func(); below.  */
5022 #include <assert.h>
5023 /* Override any gcc2 internal prototype to avoid an error.  */
5024 /* We use char because int might match the return type of a gcc2
5025     builtin and then its argument prototype would still apply.  */
5026 char $ac_func();
5027
5028 int main() {
5029
5030 /* The GNU C library defines this for functions which it implements
5031     to always fail with ENOSYS.  Some functions are actually named
5032     something starting with __ and the normal name is an alias.  */
5033 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5034 choke me
5035 #else
5036 $ac_func();
5037 #endif
5038
5039 ; return 0; }
5040 EOF
5041 if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5042   rm -rf conftest*
5043   eval "ac_cv_func_$ac_func=yes"
5044 else
5045   echo "configure: failed program was:" >&5
5046   cat conftest.$ac_ext >&5
5047   rm -rf conftest*
5048   eval "ac_cv_func_$ac_func=no"
5049 fi
5050 rm -f conftest*
5051 fi
5052
5053 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5054   echo "$ac_t""yes" 1>&6
5055     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5056   cat >> confdefs.h <<EOF
5057 #define $ac_tr_func 1
5058 EOF
5059  
5060 else
5061   echo "$ac_t""no" 1>&6
5062 fi
5063 done
5064
5065 if test x"$ac_cv_func_connect" = x"no"; then
5066     case "$LIBS" in
5067     *-lnsl*) ;;
5068     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5069 echo "configure:5070: checking for printf in -lnsl_s" >&5
5070 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5071 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5072   echo $ac_n "(cached) $ac_c" 1>&6
5073 else
5074   ac_save_LIBS="$LIBS"
5075 LIBS="-lnsl_s  $LIBS"
5076 cat > conftest.$ac_ext <<EOF
5077 #line 5078 "configure"
5078 #include "confdefs.h"
5079 /* Override any gcc2 internal prototype to avoid an error.  */
5080 /* We use char because int might match the return type of a gcc2
5081     builtin and then its argument prototype would still apply.  */
5082 char printf();
5083
5084 int main() {
5085 printf()
5086 ; return 0; }
5087 EOF
5088 if { (eval echo configure:5089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5089   rm -rf conftest*
5090   eval "ac_cv_lib_$ac_lib_var=yes"
5091 else
5092   echo "configure: failed program was:" >&5
5093   cat conftest.$ac_ext >&5
5094   rm -rf conftest*
5095   eval "ac_cv_lib_$ac_lib_var=no"
5096 fi
5097 rm -f conftest*
5098 LIBS="$ac_save_LIBS"
5099
5100 fi
5101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5102   echo "$ac_t""yes" 1>&6
5103     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5104     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5105   cat >> confdefs.h <<EOF
5106 #define $ac_tr_lib 1
5107 EOF
5108
5109   LIBS="-lnsl_s $LIBS"
5110
5111 else
5112   echo "$ac_t""no" 1>&6
5113 fi
5114  ;;
5115     esac
5116     case "$LIBS" in
5117     *-lnsl*) ;;
5118     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5119 echo "configure:5120: checking for printf in -lnsl" >&5
5120 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5121 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5122   echo $ac_n "(cached) $ac_c" 1>&6
5123 else
5124   ac_save_LIBS="$LIBS"
5125 LIBS="-lnsl  $LIBS"
5126 cat > conftest.$ac_ext <<EOF
5127 #line 5128 "configure"
5128 #include "confdefs.h"
5129 /* Override any gcc2 internal prototype to avoid an error.  */
5130 /* We use char because int might match the return type of a gcc2
5131     builtin and then its argument prototype would still apply.  */
5132 char printf();
5133
5134 int main() {
5135 printf()
5136 ; return 0; }
5137 EOF
5138 if { (eval echo configure:5139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5139   rm -rf conftest*
5140   eval "ac_cv_lib_$ac_lib_var=yes"
5141 else
5142   echo "configure: failed program was:" >&5
5143   cat conftest.$ac_ext >&5
5144   rm -rf conftest*
5145   eval "ac_cv_lib_$ac_lib_var=no"
5146 fi
5147 rm -f conftest*
5148 LIBS="$ac_save_LIBS"
5149
5150 fi
5151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5152   echo "$ac_t""yes" 1>&6
5153     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5154     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5155   cat >> confdefs.h <<EOF
5156 #define $ac_tr_lib 1
5157 EOF
5158
5159   LIBS="-lnsl $LIBS"
5160
5161 else
5162   echo "$ac_t""no" 1>&6
5163 fi
5164  ;;
5165     esac
5166     case "$LIBS" in
5167     *-lsocket*) ;;
5168     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5169 echo "configure:5170: checking for connect in -lsocket" >&5
5170 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5171 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5172   echo $ac_n "(cached) $ac_c" 1>&6
5173 else
5174   ac_save_LIBS="$LIBS"
5175 LIBS="-lsocket  $LIBS"
5176 cat > conftest.$ac_ext <<EOF
5177 #line 5178 "configure"
5178 #include "confdefs.h"
5179 /* Override any gcc2 internal prototype to avoid an error.  */
5180 /* We use char because int might match the return type of a gcc2
5181     builtin and then its argument prototype would still apply.  */
5182 char connect();
5183
5184 int main() {
5185 connect()
5186 ; return 0; }
5187 EOF
5188 if { (eval echo configure:5189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5189   rm -rf conftest*
5190   eval "ac_cv_lib_$ac_lib_var=yes"
5191 else
5192   echo "configure: failed program was:" >&5
5193   cat conftest.$ac_ext >&5
5194   rm -rf conftest*
5195   eval "ac_cv_lib_$ac_lib_var=no"
5196 fi
5197 rm -f conftest*
5198 LIBS="$ac_save_LIBS"
5199
5200 fi
5201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5202   echo "$ac_t""yes" 1>&6
5203     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5204     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5205   cat >> confdefs.h <<EOF
5206 #define $ac_tr_lib 1
5207 EOF
5208
5209   LIBS="-lsocket $LIBS"
5210
5211 else
5212   echo "$ac_t""no" 1>&6
5213 fi
5214  ;;
5215     esac
5216     case "$LIBS" in
5217     *-linet*) ;;
5218     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5219 echo "configure:5220: checking for connect in -linet" >&5
5220 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5221 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5222   echo $ac_n "(cached) $ac_c" 1>&6
5223 else
5224   ac_save_LIBS="$LIBS"
5225 LIBS="-linet  $LIBS"
5226 cat > conftest.$ac_ext <<EOF
5227 #line 5228 "configure"
5228 #include "confdefs.h"
5229 /* Override any gcc2 internal prototype to avoid an error.  */
5230 /* We use char because int might match the return type of a gcc2
5231     builtin and then its argument prototype would still apply.  */
5232 char connect();
5233
5234 int main() {
5235 connect()
5236 ; return 0; }
5237 EOF
5238 if { (eval echo configure:5239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5239   rm -rf conftest*
5240   eval "ac_cv_lib_$ac_lib_var=yes"
5241 else
5242   echo "configure: failed program was:" >&5
5243   cat conftest.$ac_ext >&5
5244   rm -rf conftest*
5245   eval "ac_cv_lib_$ac_lib_var=no"
5246 fi
5247 rm -f conftest*
5248 LIBS="$ac_save_LIBS"
5249
5250 fi
5251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5252   echo "$ac_t""yes" 1>&6
5253     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5254     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5255   cat >> confdefs.h <<EOF
5256 #define $ac_tr_lib 1
5257 EOF
5258
5259   LIBS="-linet $LIBS"
5260
5261 else
5262   echo "$ac_t""no" 1>&6
5263 fi
5264  ;;
5265     esac
5266             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5267        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5268         # ac_cv_func_connect=yes
5269         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5270         cat >> confdefs.h <<\EOF
5271 #define HAVE_CONNECT 1
5272 EOF
5273
5274     fi
5275 fi
5276
5277 ###############################################
5278 # test for where we get get_yp_default_domain() from
5279 for ac_func in yp_get_default_domain
5280 do
5281 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5282 echo "configure:5283: checking for $ac_func" >&5
5283 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5284   echo $ac_n "(cached) $ac_c" 1>&6
5285 else
5286   cat > conftest.$ac_ext <<EOF
5287 #line 5288 "configure"
5288 #include "confdefs.h"
5289 /* System header to define __stub macros and hopefully few prototypes,
5290     which can conflict with char $ac_func(); below.  */
5291 #include <assert.h>
5292 /* Override any gcc2 internal prototype to avoid an error.  */
5293 /* We use char because int might match the return type of a gcc2
5294     builtin and then its argument prototype would still apply.  */
5295 char $ac_func();
5296
5297 int main() {
5298
5299 /* The GNU C library defines this for functions which it implements
5300     to always fail with ENOSYS.  Some functions are actually named
5301     something starting with __ and the normal name is an alias.  */
5302 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5303 choke me
5304 #else
5305 $ac_func();
5306 #endif
5307
5308 ; return 0; }
5309 EOF
5310 if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5311   rm -rf conftest*
5312   eval "ac_cv_func_$ac_func=yes"
5313 else
5314   echo "configure: failed program was:" >&5
5315   cat conftest.$ac_ext >&5
5316   rm -rf conftest*
5317   eval "ac_cv_func_$ac_func=no"
5318 fi
5319 rm -f conftest*
5320 fi
5321
5322 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5323   echo "$ac_t""yes" 1>&6
5324     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5325   cat >> confdefs.h <<EOF
5326 #define $ac_tr_func 1
5327 EOF
5328  
5329 else
5330   echo "$ac_t""no" 1>&6
5331 fi
5332 done
5333
5334 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5335         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5336 echo "configure:5337: checking for yp_get_default_domain in -lnsl" >&5
5337 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5338 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5339   echo $ac_n "(cached) $ac_c" 1>&6
5340 else
5341   ac_save_LIBS="$LIBS"
5342 LIBS="-lnsl  $LIBS"
5343 cat > conftest.$ac_ext <<EOF
5344 #line 5345 "configure"
5345 #include "confdefs.h"
5346 /* Override any gcc2 internal prototype to avoid an error.  */
5347 /* We use char because int might match the return type of a gcc2
5348     builtin and then its argument prototype would still apply.  */
5349 char yp_get_default_domain();
5350
5351 int main() {
5352 yp_get_default_domain()
5353 ; return 0; }
5354 EOF
5355 if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5356   rm -rf conftest*
5357   eval "ac_cv_lib_$ac_lib_var=yes"
5358 else
5359   echo "configure: failed program was:" >&5
5360   cat conftest.$ac_ext >&5
5361   rm -rf conftest*
5362   eval "ac_cv_lib_$ac_lib_var=no"
5363 fi
5364 rm -f conftest*
5365 LIBS="$ac_save_LIBS"
5366
5367 fi
5368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5369   echo "$ac_t""yes" 1>&6
5370   LIBS="$LIBS -lnsl";
5371         cat >> confdefs.h <<\EOF
5372 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5373 EOF
5374
5375 else
5376   echo "$ac_t""no" 1>&6
5377 fi
5378  
5379 fi
5380
5381 # Check if we have execl, if not we need to compile smbrun.
5382 for ac_func in execl
5383 do
5384 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5385 echo "configure:5386: checking for $ac_func" >&5
5386 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5387   echo $ac_n "(cached) $ac_c" 1>&6
5388 else
5389   cat > conftest.$ac_ext <<EOF
5390 #line 5391 "configure"
5391 #include "confdefs.h"
5392 /* System header to define __stub macros and hopefully few prototypes,
5393     which can conflict with char $ac_func(); below.  */
5394 #include <assert.h>
5395 /* Override any gcc2 internal prototype to avoid an error.  */
5396 /* We use char because int might match the return type of a gcc2
5397     builtin and then its argument prototype would still apply.  */
5398 char $ac_func();
5399
5400 int main() {
5401
5402 /* The GNU C library defines this for functions which it implements
5403     to always fail with ENOSYS.  Some functions are actually named
5404     something starting with __ and the normal name is an alias.  */
5405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5406 choke me
5407 #else
5408 $ac_func();
5409 #endif
5410
5411 ; return 0; }
5412 EOF
5413 if { (eval echo configure:5414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5414   rm -rf conftest*
5415   eval "ac_cv_func_$ac_func=yes"
5416 else
5417   echo "configure: failed program was:" >&5
5418   cat conftest.$ac_ext >&5
5419   rm -rf conftest*
5420   eval "ac_cv_func_$ac_func=no"
5421 fi
5422 rm -f conftest*
5423 fi
5424
5425 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5426   echo "$ac_t""yes" 1>&6
5427     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5428   cat >> confdefs.h <<EOF
5429 #define $ac_tr_func 1
5430 EOF
5431  
5432 else
5433   echo "$ac_t""no" 1>&6
5434 fi
5435 done
5436
5437 if test x"$ac_cv_func_execl" = x"no"; then
5438     RUNPROG="bin/smbrun"
5439 else
5440     RUNPROG=""
5441 fi
5442
5443 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5444 do
5445 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5446 echo "configure:5447: checking for $ac_func" >&5
5447 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5448   echo $ac_n "(cached) $ac_c" 1>&6
5449 else
5450   cat > conftest.$ac_ext <<EOF
5451 #line 5452 "configure"
5452 #include "confdefs.h"
5453 /* System header to define __stub macros and hopefully few prototypes,
5454     which can conflict with char $ac_func(); below.  */
5455 #include <assert.h>
5456 /* Override any gcc2 internal prototype to avoid an error.  */
5457 /* We use char because int might match the return type of a gcc2
5458     builtin and then its argument prototype would still apply.  */
5459 char $ac_func();
5460
5461 int main() {
5462
5463 /* The GNU C library defines this for functions which it implements
5464     to always fail with ENOSYS.  Some functions are actually named
5465     something starting with __ and the normal name is an alias.  */
5466 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5467 choke me
5468 #else
5469 $ac_func();
5470 #endif
5471
5472 ; return 0; }
5473 EOF
5474 if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5475   rm -rf conftest*
5476   eval "ac_cv_func_$ac_func=yes"
5477 else
5478   echo "configure: failed program was:" >&5
5479   cat conftest.$ac_ext >&5
5480   rm -rf conftest*
5481   eval "ac_cv_func_$ac_func=no"
5482 fi
5483 rm -f conftest*
5484 fi
5485
5486 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5487   echo "$ac_t""yes" 1>&6
5488     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5489   cat >> confdefs.h <<EOF
5490 #define $ac_tr_func 1
5491 EOF
5492  
5493 else
5494   echo "$ac_t""no" 1>&6
5495 fi
5496 done
5497
5498 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5499 do
5500 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5501 echo "configure:5502: checking for $ac_func" >&5
5502 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5503   echo $ac_n "(cached) $ac_c" 1>&6
5504 else
5505   cat > conftest.$ac_ext <<EOF
5506 #line 5507 "configure"
5507 #include "confdefs.h"
5508 /* System header to define __stub macros and hopefully few prototypes,
5509     which can conflict with char $ac_func(); below.  */
5510 #include <assert.h>
5511 /* Override any gcc2 internal prototype to avoid an error.  */
5512 /* We use char because int might match the return type of a gcc2
5513     builtin and then its argument prototype would still apply.  */
5514 char $ac_func();
5515
5516 int main() {
5517
5518 /* The GNU C library defines this for functions which it implements
5519     to always fail with ENOSYS.  Some functions are actually named
5520     something starting with __ and the normal name is an alias.  */
5521 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5522 choke me
5523 #else
5524 $ac_func();
5525 #endif
5526
5527 ; return 0; }
5528 EOF
5529 if { (eval echo configure:5530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5530   rm -rf conftest*
5531   eval "ac_cv_func_$ac_func=yes"
5532 else
5533   echo "configure: failed program was:" >&5
5534   cat conftest.$ac_ext >&5
5535   rm -rf conftest*
5536   eval "ac_cv_func_$ac_func=no"
5537 fi
5538 rm -f conftest*
5539 fi
5540
5541 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5542   echo "$ac_t""yes" 1>&6
5543     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5544   cat >> confdefs.h <<EOF
5545 #define $ac_tr_func 1
5546 EOF
5547  
5548 else
5549   echo "$ac_t""no" 1>&6
5550 fi
5551 done
5552
5553 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5554 do
5555 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5556 echo "configure:5557: checking for $ac_func" >&5
5557 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5558   echo $ac_n "(cached) $ac_c" 1>&6
5559 else
5560   cat > conftest.$ac_ext <<EOF
5561 #line 5562 "configure"
5562 #include "confdefs.h"
5563 /* System header to define __stub macros and hopefully few prototypes,
5564     which can conflict with char $ac_func(); below.  */
5565 #include <assert.h>
5566 /* Override any gcc2 internal prototype to avoid an error.  */
5567 /* We use char because int might match the return type of a gcc2
5568     builtin and then its argument prototype would still apply.  */
5569 char $ac_func();
5570
5571 int main() {
5572
5573 /* The GNU C library defines this for functions which it implements
5574     to always fail with ENOSYS.  Some functions are actually named
5575     something starting with __ and the normal name is an alias.  */
5576 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5577 choke me
5578 #else
5579 $ac_func();
5580 #endif
5581
5582 ; return 0; }
5583 EOF
5584 if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5585   rm -rf conftest*
5586   eval "ac_cv_func_$ac_func=yes"
5587 else
5588   echo "configure: failed program was:" >&5
5589   cat conftest.$ac_ext >&5
5590   rm -rf conftest*
5591   eval "ac_cv_func_$ac_func=no"
5592 fi
5593 rm -f conftest*
5594 fi
5595
5596 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5597   echo "$ac_t""yes" 1>&6
5598     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5599   cat >> confdefs.h <<EOF
5600 #define $ac_tr_func 1
5601 EOF
5602  
5603 else
5604   echo "$ac_t""no" 1>&6
5605 fi
5606 done
5607
5608 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5609 do
5610 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5611 echo "configure:5612: checking for $ac_func" >&5
5612 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5613   echo $ac_n "(cached) $ac_c" 1>&6
5614 else
5615   cat > conftest.$ac_ext <<EOF
5616 #line 5617 "configure"
5617 #include "confdefs.h"
5618 /* System header to define __stub macros and hopefully few prototypes,
5619     which can conflict with char $ac_func(); below.  */
5620 #include <assert.h>
5621 /* Override any gcc2 internal prototype to avoid an error.  */
5622 /* We use char because int might match the return type of a gcc2
5623     builtin and then its argument prototype would still apply.  */
5624 char $ac_func();
5625
5626 int main() {
5627
5628 /* The GNU C library defines this for functions which it implements
5629     to always fail with ENOSYS.  Some functions are actually named
5630     something starting with __ and the normal name is an alias.  */
5631 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5632 choke me
5633 #else
5634 $ac_func();
5635 #endif
5636
5637 ; return 0; }
5638 EOF
5639 if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5640   rm -rf conftest*
5641   eval "ac_cv_func_$ac_func=yes"
5642 else
5643   echo "configure: failed program was:" >&5
5644   cat conftest.$ac_ext >&5
5645   rm -rf conftest*
5646   eval "ac_cv_func_$ac_func=no"
5647 fi
5648 rm -f conftest*
5649 fi
5650
5651 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5652   echo "$ac_t""yes" 1>&6
5653     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5654   cat >> confdefs.h <<EOF
5655 #define $ac_tr_func 1
5656 EOF
5657  
5658 else
5659   echo "$ac_t""no" 1>&6
5660 fi
5661 done
5662
5663 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5664 do
5665 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5666 echo "configure:5667: checking for $ac_func" >&5
5667 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5668   echo $ac_n "(cached) $ac_c" 1>&6
5669 else
5670   cat > conftest.$ac_ext <<EOF
5671 #line 5672 "configure"
5672 #include "confdefs.h"
5673 /* System header to define __stub macros and hopefully few prototypes,
5674     which can conflict with char $ac_func(); below.  */
5675 #include <assert.h>
5676 /* Override any gcc2 internal prototype to avoid an error.  */
5677 /* We use char because int might match the return type of a gcc2
5678     builtin and then its argument prototype would still apply.  */
5679 char $ac_func();
5680
5681 int main() {
5682
5683 /* The GNU C library defines this for functions which it implements
5684     to always fail with ENOSYS.  Some functions are actually named
5685     something starting with __ and the normal name is an alias.  */
5686 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5687 choke me
5688 #else
5689 $ac_func();
5690 #endif
5691
5692 ; return 0; }
5693 EOF
5694 if { (eval echo configure:5695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5695   rm -rf conftest*
5696   eval "ac_cv_func_$ac_func=yes"
5697 else
5698   echo "configure: failed program was:" >&5
5699   cat conftest.$ac_ext >&5
5700   rm -rf conftest*
5701   eval "ac_cv_func_$ac_func=no"
5702 fi
5703 rm -f conftest*
5704 fi
5705
5706 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5707   echo "$ac_t""yes" 1>&6
5708     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5709   cat >> confdefs.h <<EOF
5710 #define $ac_tr_func 1
5711 EOF
5712  
5713 else
5714   echo "$ac_t""no" 1>&6
5715 fi
5716 done
5717
5718 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5719 do
5720 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5721 echo "configure:5722: checking for $ac_func" >&5
5722 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5723   echo $ac_n "(cached) $ac_c" 1>&6
5724 else
5725   cat > conftest.$ac_ext <<EOF
5726 #line 5727 "configure"
5727 #include "confdefs.h"
5728 /* System header to define __stub macros and hopefully few prototypes,
5729     which can conflict with char $ac_func(); below.  */
5730 #include <assert.h>
5731 /* Override any gcc2 internal prototype to avoid an error.  */
5732 /* We use char because int might match the return type of a gcc2
5733     builtin and then its argument prototype would still apply.  */
5734 char $ac_func();
5735
5736 int main() {
5737
5738 /* The GNU C library defines this for functions which it implements
5739     to always fail with ENOSYS.  Some functions are actually named
5740     something starting with __ and the normal name is an alias.  */
5741 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5742 choke me
5743 #else
5744 $ac_func();
5745 #endif
5746
5747 ; return 0; }
5748 EOF
5749 if { (eval echo configure:5750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5750   rm -rf conftest*
5751   eval "ac_cv_func_$ac_func=yes"
5752 else
5753   echo "configure: failed program was:" >&5
5754   cat conftest.$ac_ext >&5
5755   rm -rf conftest*
5756   eval "ac_cv_func_$ac_func=no"
5757 fi
5758 rm -f conftest*
5759 fi
5760
5761 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5762   echo "$ac_t""yes" 1>&6
5763     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5764   cat >> confdefs.h <<EOF
5765 #define $ac_tr_func 1
5766 EOF
5767  
5768 else
5769   echo "$ac_t""no" 1>&6
5770 fi
5771 done
5772
5773 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5774 do
5775 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5776 echo "configure:5777: checking for $ac_func" >&5
5777 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5778   echo $ac_n "(cached) $ac_c" 1>&6
5779 else
5780   cat > conftest.$ac_ext <<EOF
5781 #line 5782 "configure"
5782 #include "confdefs.h"
5783 /* System header to define __stub macros and hopefully few prototypes,
5784     which can conflict with char $ac_func(); below.  */
5785 #include <assert.h>
5786 /* Override any gcc2 internal prototype to avoid an error.  */
5787 /* We use char because int might match the return type of a gcc2
5788     builtin and then its argument prototype would still apply.  */
5789 char $ac_func();
5790
5791 int main() {
5792
5793 /* The GNU C library defines this for functions which it implements
5794     to always fail with ENOSYS.  Some functions are actually named
5795     something starting with __ and the normal name is an alias.  */
5796 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5797 choke me
5798 #else
5799 $ac_func();
5800 #endif
5801
5802 ; return 0; }
5803 EOF
5804 if { (eval echo configure:5805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5805   rm -rf conftest*
5806   eval "ac_cv_func_$ac_func=yes"
5807 else
5808   echo "configure: failed program was:" >&5
5809   cat conftest.$ac_ext >&5
5810   rm -rf conftest*
5811   eval "ac_cv_func_$ac_func=no"
5812 fi
5813 rm -f conftest*
5814 fi
5815
5816 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5817   echo "$ac_t""yes" 1>&6
5818     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5819   cat >> confdefs.h <<EOF
5820 #define $ac_tr_func 1
5821 EOF
5822  
5823 else
5824   echo "$ac_t""no" 1>&6
5825 fi
5826 done
5827
5828 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5829 do
5830 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5831 echo "configure:5832: checking for $ac_func" >&5
5832 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5833   echo $ac_n "(cached) $ac_c" 1>&6
5834 else
5835   cat > conftest.$ac_ext <<EOF
5836 #line 5837 "configure"
5837 #include "confdefs.h"
5838 /* System header to define __stub macros and hopefully few prototypes,
5839     which can conflict with char $ac_func(); below.  */
5840 #include <assert.h>
5841 /* Override any gcc2 internal prototype to avoid an error.  */
5842 /* We use char because int might match the return type of a gcc2
5843     builtin and then its argument prototype would still apply.  */
5844 char $ac_func();
5845
5846 int main() {
5847
5848 /* The GNU C library defines this for functions which it implements
5849     to always fail with ENOSYS.  Some functions are actually named
5850     something starting with __ and the normal name is an alias.  */
5851 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5852 choke me
5853 #else
5854 $ac_func();
5855 #endif
5856
5857 ; return 0; }
5858 EOF
5859 if { (eval echo configure:5860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5860   rm -rf conftest*
5861   eval "ac_cv_func_$ac_func=yes"
5862 else
5863   echo "configure: failed program was:" >&5
5864   cat conftest.$ac_ext >&5
5865   rm -rf conftest*
5866   eval "ac_cv_func_$ac_func=no"
5867 fi
5868 rm -f conftest*
5869 fi
5870
5871 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5872   echo "$ac_t""yes" 1>&6
5873     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5874   cat >> confdefs.h <<EOF
5875 #define $ac_tr_func 1
5876 EOF
5877  
5878 else
5879   echo "$ac_t""no" 1>&6
5880 fi
5881 done
5882
5883 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5884 do
5885 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5886 echo "configure:5887: checking for $ac_func" >&5
5887 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5888   echo $ac_n "(cached) $ac_c" 1>&6
5889 else
5890   cat > conftest.$ac_ext <<EOF
5891 #line 5892 "configure"
5892 #include "confdefs.h"
5893 /* System header to define __stub macros and hopefully few prototypes,
5894     which can conflict with char $ac_func(); below.  */
5895 #include <assert.h>
5896 /* Override any gcc2 internal prototype to avoid an error.  */
5897 /* We use char because int might match the return type of a gcc2
5898     builtin and then its argument prototype would still apply.  */
5899 char $ac_func();
5900
5901 int main() {
5902
5903 /* The GNU C library defines this for functions which it implements
5904     to always fail with ENOSYS.  Some functions are actually named
5905     something starting with __ and the normal name is an alias.  */
5906 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5907 choke me
5908 #else
5909 $ac_func();
5910 #endif
5911
5912 ; return 0; }
5913 EOF
5914 if { (eval echo configure:5915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5915   rm -rf conftest*
5916   eval "ac_cv_func_$ac_func=yes"
5917 else
5918   echo "configure: failed program was:" >&5
5919   cat conftest.$ac_ext >&5
5920   rm -rf conftest*
5921   eval "ac_cv_func_$ac_func=no"
5922 fi
5923 rm -f conftest*
5924 fi
5925
5926 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5927   echo "$ac_t""yes" 1>&6
5928     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5929   cat >> confdefs.h <<EOF
5930 #define $ac_tr_func 1
5931 EOF
5932  
5933 else
5934   echo "$ac_t""no" 1>&6
5935 fi
5936 done
5937
5938 for ac_func in syslog vsyslog
5939 do
5940 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5941 echo "configure:5942: checking for $ac_func" >&5
5942 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5943   echo $ac_n "(cached) $ac_c" 1>&6
5944 else
5945   cat > conftest.$ac_ext <<EOF
5946 #line 5947 "configure"
5947 #include "confdefs.h"
5948 /* System header to define __stub macros and hopefully few prototypes,
5949     which can conflict with char $ac_func(); below.  */
5950 #include <assert.h>
5951 /* Override any gcc2 internal prototype to avoid an error.  */
5952 /* We use char because int might match the return type of a gcc2
5953     builtin and then its argument prototype would still apply.  */
5954 char $ac_func();
5955
5956 int main() {
5957
5958 /* The GNU C library defines this for functions which it implements
5959     to always fail with ENOSYS.  Some functions are actually named
5960     something starting with __ and the normal name is an alias.  */
5961 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5962 choke me
5963 #else
5964 $ac_func();
5965 #endif
5966
5967 ; return 0; }
5968 EOF
5969 if { (eval echo configure:5970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5970   rm -rf conftest*
5971   eval "ac_cv_func_$ac_func=yes"
5972 else
5973   echo "configure: failed program was:" >&5
5974   cat conftest.$ac_ext >&5
5975   rm -rf conftest*
5976   eval "ac_cv_func_$ac_func=no"
5977 fi
5978 rm -f conftest*
5979 fi
5980
5981 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5982   echo "$ac_t""yes" 1>&6
5983     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5984   cat >> confdefs.h <<EOF
5985 #define $ac_tr_func 1
5986 EOF
5987  
5988 else
5989   echo "$ac_t""no" 1>&6
5990 fi
5991 done
5992
5993 # setbuffer is needed for smbtorture
5994 for ac_func in setbuffer
5995 do
5996 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5997 echo "configure:5998: checking for $ac_func" >&5
5998 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5999   echo $ac_n "(cached) $ac_c" 1>&6
6000 else
6001   cat > conftest.$ac_ext <<EOF
6002 #line 6003 "configure"
6003 #include "confdefs.h"
6004 /* System header to define __stub macros and hopefully few prototypes,
6005     which can conflict with char $ac_func(); below.  */
6006 #include <assert.h>
6007 /* Override any gcc2 internal prototype to avoid an error.  */
6008 /* We use char because int might match the return type of a gcc2
6009     builtin and then its argument prototype would still apply.  */
6010 char $ac_func();
6011
6012 int main() {
6013
6014 /* The GNU C library defines this for functions which it implements
6015     to always fail with ENOSYS.  Some functions are actually named
6016     something starting with __ and the normal name is an alias.  */
6017 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6018 choke me
6019 #else
6020 $ac_func();
6021 #endif
6022
6023 ; return 0; }
6024 EOF
6025 if { (eval echo configure:6026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6026   rm -rf conftest*
6027   eval "ac_cv_func_$ac_func=yes"
6028 else
6029   echo "configure: failed program was:" >&5
6030   cat conftest.$ac_ext >&5
6031   rm -rf conftest*
6032   eval "ac_cv_func_$ac_func=no"
6033 fi
6034 rm -f conftest*
6035 fi
6036
6037 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6038   echo "$ac_t""yes" 1>&6
6039     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6040   cat >> confdefs.h <<EOF
6041 #define $ac_tr_func 1
6042 EOF
6043  
6044 else
6045   echo "$ac_t""no" 1>&6
6046 fi
6047 done
6048
6049
6050 # syscall() is needed for smbwrapper.
6051 for ac_func in syscall
6052 do
6053 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6054 echo "configure:6055: checking for $ac_func" >&5
6055 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6056   echo $ac_n "(cached) $ac_c" 1>&6
6057 else
6058   cat > conftest.$ac_ext <<EOF
6059 #line 6060 "configure"
6060 #include "confdefs.h"
6061 /* System header to define __stub macros and hopefully few prototypes,
6062     which can conflict with char $ac_func(); below.  */
6063 #include <assert.h>
6064 /* Override any gcc2 internal prototype to avoid an error.  */
6065 /* We use char because int might match the return type of a gcc2
6066     builtin and then its argument prototype would still apply.  */
6067 char $ac_func();
6068
6069 int main() {
6070
6071 /* The GNU C library defines this for functions which it implements
6072     to always fail with ENOSYS.  Some functions are actually named
6073     something starting with __ and the normal name is an alias.  */
6074 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6075 choke me
6076 #else
6077 $ac_func();
6078 #endif
6079
6080 ; return 0; }
6081 EOF
6082 if { (eval echo configure:6083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6083   rm -rf conftest*
6084   eval "ac_cv_func_$ac_func=yes"
6085 else
6086   echo "configure: failed program was:" >&5
6087   cat conftest.$ac_ext >&5
6088   rm -rf conftest*
6089   eval "ac_cv_func_$ac_func=no"
6090 fi
6091 rm -f conftest*
6092 fi
6093
6094 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6095   echo "$ac_t""yes" 1>&6
6096     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6097   cat >> confdefs.h <<EOF
6098 #define $ac_tr_func 1
6099 EOF
6100  
6101 else
6102   echo "$ac_t""no" 1>&6
6103 fi
6104 done
6105
6106
6107 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6108 do
6109 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6110 echo "configure:6111: checking for $ac_func" >&5
6111 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6112   echo $ac_n "(cached) $ac_c" 1>&6
6113 else
6114   cat > conftest.$ac_ext <<EOF
6115 #line 6116 "configure"
6116 #include "confdefs.h"
6117 /* System header to define __stub macros and hopefully few prototypes,
6118     which can conflict with char $ac_func(); below.  */
6119 #include <assert.h>
6120 /* Override any gcc2 internal prototype to avoid an error.  */
6121 /* We use char because int might match the return type of a gcc2
6122     builtin and then its argument prototype would still apply.  */
6123 char $ac_func();
6124
6125 int main() {
6126
6127 /* The GNU C library defines this for functions which it implements
6128     to always fail with ENOSYS.  Some functions are actually named
6129     something starting with __ and the normal name is an alias.  */
6130 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6131 choke me
6132 #else
6133 $ac_func();
6134 #endif
6135
6136 ; return 0; }
6137 EOF
6138 if { (eval echo configure:6139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6139   rm -rf conftest*
6140   eval "ac_cv_func_$ac_func=yes"
6141 else
6142   echo "configure: failed program was:" >&5
6143   cat conftest.$ac_ext >&5
6144   rm -rf conftest*
6145   eval "ac_cv_func_$ac_func=no"
6146 fi
6147 rm -f conftest*
6148 fi
6149
6150 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6151   echo "$ac_t""yes" 1>&6
6152     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6153   cat >> confdefs.h <<EOF
6154 #define $ac_tr_func 1
6155 EOF
6156  
6157 else
6158   echo "$ac_t""no" 1>&6
6159 fi
6160 done
6161
6162 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6163 do
6164 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6165 echo "configure:6166: checking for $ac_func" >&5
6166 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6167   echo $ac_n "(cached) $ac_c" 1>&6
6168 else
6169   cat > conftest.$ac_ext <<EOF
6170 #line 6171 "configure"
6171 #include "confdefs.h"
6172 /* System header to define __stub macros and hopefully few prototypes,
6173     which can conflict with char $ac_func(); below.  */
6174 #include <assert.h>
6175 /* Override any gcc2 internal prototype to avoid an error.  */
6176 /* We use char because int might match the return type of a gcc2
6177     builtin and then its argument prototype would still apply.  */
6178 char $ac_func();
6179
6180 int main() {
6181
6182 /* The GNU C library defines this for functions which it implements
6183     to always fail with ENOSYS.  Some functions are actually named
6184     something starting with __ and the normal name is an alias.  */
6185 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6186 choke me
6187 #else
6188 $ac_func();
6189 #endif
6190
6191 ; return 0; }
6192 EOF
6193 if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6194   rm -rf conftest*
6195   eval "ac_cv_func_$ac_func=yes"
6196 else
6197   echo "configure: failed program was:" >&5
6198   cat conftest.$ac_ext >&5
6199   rm -rf conftest*
6200   eval "ac_cv_func_$ac_func=no"
6201 fi
6202 rm -f conftest*
6203 fi
6204
6205 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6206   echo "$ac_t""yes" 1>&6
6207     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6208   cat >> confdefs.h <<EOF
6209 #define $ac_tr_func 1
6210 EOF
6211  
6212 else
6213   echo "$ac_t""no" 1>&6
6214 fi
6215 done
6216
6217 for ac_func in __getcwd _getcwd
6218 do
6219 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6220 echo "configure:6221: checking for $ac_func" >&5
6221 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6222   echo $ac_n "(cached) $ac_c" 1>&6
6223 else
6224   cat > conftest.$ac_ext <<EOF
6225 #line 6226 "configure"
6226 #include "confdefs.h"
6227 /* System header to define __stub macros and hopefully few prototypes,
6228     which can conflict with char $ac_func(); below.  */
6229 #include <assert.h>
6230 /* Override any gcc2 internal prototype to avoid an error.  */
6231 /* We use char because int might match the return type of a gcc2
6232     builtin and then its argument prototype would still apply.  */
6233 char $ac_func();
6234
6235 int main() {
6236
6237 /* The GNU C library defines this for functions which it implements
6238     to always fail with ENOSYS.  Some functions are actually named
6239     something starting with __ and the normal name is an alias.  */
6240 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6241 choke me
6242 #else
6243 $ac_func();
6244 #endif
6245
6246 ; return 0; }
6247 EOF
6248 if { (eval echo configure:6249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6249   rm -rf conftest*
6250   eval "ac_cv_func_$ac_func=yes"
6251 else
6252   echo "configure: failed program was:" >&5
6253   cat conftest.$ac_ext >&5
6254   rm -rf conftest*
6255   eval "ac_cv_func_$ac_func=no"
6256 fi
6257 rm -f conftest*
6258 fi
6259
6260 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6261   echo "$ac_t""yes" 1>&6
6262     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6263   cat >> confdefs.h <<EOF
6264 #define $ac_tr_func 1
6265 EOF
6266  
6267 else
6268   echo "$ac_t""no" 1>&6
6269 fi
6270 done
6271
6272 for ac_func in __xstat __fxstat __lxstat
6273 do
6274 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6275 echo "configure:6276: checking for $ac_func" >&5
6276 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6277   echo $ac_n "(cached) $ac_c" 1>&6
6278 else
6279   cat > conftest.$ac_ext <<EOF
6280 #line 6281 "configure"
6281 #include "confdefs.h"
6282 /* System header to define __stub macros and hopefully few prototypes,
6283     which can conflict with char $ac_func(); below.  */
6284 #include <assert.h>
6285 /* Override any gcc2 internal prototype to avoid an error.  */
6286 /* We use char because int might match the return type of a gcc2
6287     builtin and then its argument prototype would still apply.  */
6288 char $ac_func();
6289
6290 int main() {
6291
6292 /* The GNU C library defines this for functions which it implements
6293     to always fail with ENOSYS.  Some functions are actually named
6294     something starting with __ and the normal name is an alias.  */
6295 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6296 choke me
6297 #else
6298 $ac_func();
6299 #endif
6300
6301 ; return 0; }
6302 EOF
6303 if { (eval echo configure:6304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6304   rm -rf conftest*
6305   eval "ac_cv_func_$ac_func=yes"
6306 else
6307   echo "configure: failed program was:" >&5
6308   cat conftest.$ac_ext >&5
6309   rm -rf conftest*
6310   eval "ac_cv_func_$ac_func=no"
6311 fi
6312 rm -f conftest*
6313 fi
6314
6315 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6316   echo "$ac_t""yes" 1>&6
6317     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6318   cat >> confdefs.h <<EOF
6319 #define $ac_tr_func 1
6320 EOF
6321  
6322 else
6323   echo "$ac_t""no" 1>&6
6324 fi
6325 done
6326
6327 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6328 do
6329 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6330 echo "configure:6331: checking for $ac_func" >&5
6331 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6332   echo $ac_n "(cached) $ac_c" 1>&6
6333 else
6334   cat > conftest.$ac_ext <<EOF
6335 #line 6336 "configure"
6336 #include "confdefs.h"
6337 /* System header to define __stub macros and hopefully few prototypes,
6338     which can conflict with char $ac_func(); below.  */
6339 #include <assert.h>
6340 /* Override any gcc2 internal prototype to avoid an error.  */
6341 /* We use char because int might match the return type of a gcc2
6342     builtin and then its argument prototype would still apply.  */
6343 char $ac_func();
6344
6345 int main() {
6346
6347 /* The GNU C library defines this for functions which it implements
6348     to always fail with ENOSYS.  Some functions are actually named
6349     something starting with __ and the normal name is an alias.  */
6350 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6351 choke me
6352 #else
6353 $ac_func();
6354 #endif
6355
6356 ; return 0; }
6357 EOF
6358 if { (eval echo configure:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6359   rm -rf conftest*
6360   eval "ac_cv_func_$ac_func=yes"
6361 else
6362   echo "configure: failed program was:" >&5
6363   cat conftest.$ac_ext >&5
6364   rm -rf conftest*
6365   eval "ac_cv_func_$ac_func=no"
6366 fi
6367 rm -f conftest*
6368 fi
6369
6370 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6371   echo "$ac_t""yes" 1>&6
6372     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6373   cat >> confdefs.h <<EOF
6374 #define $ac_tr_func 1
6375 EOF
6376  
6377 else
6378   echo "$ac_t""no" 1>&6
6379 fi
6380 done
6381
6382 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6383 do
6384 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6385 echo "configure:6386: checking for $ac_func" >&5
6386 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6387   echo $ac_n "(cached) $ac_c" 1>&6
6388 else
6389   cat > conftest.$ac_ext <<EOF
6390 #line 6391 "configure"
6391 #include "confdefs.h"
6392 /* System header to define __stub macros and hopefully few prototypes,
6393     which can conflict with char $ac_func(); below.  */
6394 #include <assert.h>
6395 /* Override any gcc2 internal prototype to avoid an error.  */
6396 /* We use char because int might match the return type of a gcc2
6397     builtin and then its argument prototype would still apply.  */
6398 char $ac_func();
6399
6400 int main() {
6401
6402 /* The GNU C library defines this for functions which it implements
6403     to always fail with ENOSYS.  Some functions are actually named
6404     something starting with __ and the normal name is an alias.  */
6405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6406 choke me
6407 #else
6408 $ac_func();
6409 #endif
6410
6411 ; return 0; }
6412 EOF
6413 if { (eval echo configure:6414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6414   rm -rf conftest*
6415   eval "ac_cv_func_$ac_func=yes"
6416 else
6417   echo "configure: failed program was:" >&5
6418   cat conftest.$ac_ext >&5
6419   rm -rf conftest*
6420   eval "ac_cv_func_$ac_func=no"
6421 fi
6422 rm -f conftest*
6423 fi
6424
6425 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6426   echo "$ac_t""yes" 1>&6
6427     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6428   cat >> confdefs.h <<EOF
6429 #define $ac_tr_func 1
6430 EOF
6431  
6432 else
6433   echo "$ac_t""no" 1>&6
6434 fi
6435 done
6436
6437 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6438 do
6439 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6440 echo "configure:6441: checking for $ac_func" >&5
6441 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6442   echo $ac_n "(cached) $ac_c" 1>&6
6443 else
6444   cat > conftest.$ac_ext <<EOF
6445 #line 6446 "configure"
6446 #include "confdefs.h"
6447 /* System header to define __stub macros and hopefully few prototypes,
6448     which can conflict with char $ac_func(); below.  */
6449 #include <assert.h>
6450 /* Override any gcc2 internal prototype to avoid an error.  */
6451 /* We use char because int might match the return type of a gcc2
6452     builtin and then its argument prototype would still apply.  */
6453 char $ac_func();
6454
6455 int main() {
6456
6457 /* The GNU C library defines this for functions which it implements
6458     to always fail with ENOSYS.  Some functions are actually named
6459     something starting with __ and the normal name is an alias.  */
6460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6461 choke me
6462 #else
6463 $ac_func();
6464 #endif
6465
6466 ; return 0; }
6467 EOF
6468 if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6469   rm -rf conftest*
6470   eval "ac_cv_func_$ac_func=yes"
6471 else
6472   echo "configure: failed program was:" >&5
6473   cat conftest.$ac_ext >&5
6474   rm -rf conftest*
6475   eval "ac_cv_func_$ac_func=no"
6476 fi
6477 rm -f conftest*
6478 fi
6479
6480 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6481   echo "$ac_t""yes" 1>&6
6482     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6483   cat >> confdefs.h <<EOF
6484 #define $ac_tr_func 1
6485 EOF
6486  
6487 else
6488   echo "$ac_t""no" 1>&6
6489 fi
6490 done
6491
6492 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6493 do
6494 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6495 echo "configure:6496: checking for $ac_func" >&5
6496 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6497   echo $ac_n "(cached) $ac_c" 1>&6
6498 else
6499   cat > conftest.$ac_ext <<EOF
6500 #line 6501 "configure"
6501 #include "confdefs.h"
6502 /* System header to define __stub macros and hopefully few prototypes,
6503     which can conflict with char $ac_func(); below.  */
6504 #include <assert.h>
6505 /* Override any gcc2 internal prototype to avoid an error.  */
6506 /* We use char because int might match the return type of a gcc2
6507     builtin and then its argument prototype would still apply.  */
6508 char $ac_func();
6509
6510 int main() {
6511
6512 /* The GNU C library defines this for functions which it implements
6513     to always fail with ENOSYS.  Some functions are actually named
6514     something starting with __ and the normal name is an alias.  */
6515 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6516 choke me
6517 #else
6518 $ac_func();
6519 #endif
6520
6521 ; return 0; }
6522 EOF
6523 if { (eval echo configure:6524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6524   rm -rf conftest*
6525   eval "ac_cv_func_$ac_func=yes"
6526 else
6527   echo "configure: failed program was:" >&5
6528   cat conftest.$ac_ext >&5
6529   rm -rf conftest*
6530   eval "ac_cv_func_$ac_func=no"
6531 fi
6532 rm -f conftest*
6533 fi
6534
6535 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6536   echo "$ac_t""yes" 1>&6
6537     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6538   cat >> confdefs.h <<EOF
6539 #define $ac_tr_func 1
6540 EOF
6541  
6542 else
6543   echo "$ac_t""no" 1>&6
6544 fi
6545 done
6546
6547 for ac_func in _write __write _fork __fork
6548 do
6549 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6550 echo "configure:6551: checking for $ac_func" >&5
6551 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6552   echo $ac_n "(cached) $ac_c" 1>&6
6553 else
6554   cat > conftest.$ac_ext <<EOF
6555 #line 6556 "configure"
6556 #include "confdefs.h"
6557 /* System header to define __stub macros and hopefully few prototypes,
6558     which can conflict with char $ac_func(); below.  */
6559 #include <assert.h>
6560 /* Override any gcc2 internal prototype to avoid an error.  */
6561 /* We use char because int might match the return type of a gcc2
6562     builtin and then its argument prototype would still apply.  */
6563 char $ac_func();
6564
6565 int main() {
6566
6567 /* The GNU C library defines this for functions which it implements
6568     to always fail with ENOSYS.  Some functions are actually named
6569     something starting with __ and the normal name is an alias.  */
6570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6571 choke me
6572 #else
6573 $ac_func();
6574 #endif
6575
6576 ; return 0; }
6577 EOF
6578 if { (eval echo configure:6579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6579   rm -rf conftest*
6580   eval "ac_cv_func_$ac_func=yes"
6581 else
6582   echo "configure: failed program was:" >&5
6583   cat conftest.$ac_ext >&5
6584   rm -rf conftest*
6585   eval "ac_cv_func_$ac_func=no"
6586 fi
6587 rm -f conftest*
6588 fi
6589
6590 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6591   echo "$ac_t""yes" 1>&6
6592     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6593   cat >> confdefs.h <<EOF
6594 #define $ac_tr_func 1
6595 EOF
6596  
6597 else
6598   echo "$ac_t""no" 1>&6
6599 fi
6600 done
6601
6602 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6603 do
6604 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6605 echo "configure:6606: checking for $ac_func" >&5
6606 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6607   echo $ac_n "(cached) $ac_c" 1>&6
6608 else
6609   cat > conftest.$ac_ext <<EOF
6610 #line 6611 "configure"
6611 #include "confdefs.h"
6612 /* System header to define __stub macros and hopefully few prototypes,
6613     which can conflict with char $ac_func(); below.  */
6614 #include <assert.h>
6615 /* Override any gcc2 internal prototype to avoid an error.  */
6616 /* We use char because int might match the return type of a gcc2
6617     builtin and then its argument prototype would still apply.  */
6618 char $ac_func();
6619
6620 int main() {
6621
6622 /* The GNU C library defines this for functions which it implements
6623     to always fail with ENOSYS.  Some functions are actually named
6624     something starting with __ and the normal name is an alias.  */
6625 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6626 choke me
6627 #else
6628 $ac_func();
6629 #endif
6630
6631 ; return 0; }
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6634   rm -rf conftest*
6635   eval "ac_cv_func_$ac_func=yes"
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   eval "ac_cv_func_$ac_func=no"
6641 fi
6642 rm -f conftest*
6643 fi
6644
6645 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6646   echo "$ac_t""yes" 1>&6
6647     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6648   cat >> confdefs.h <<EOF
6649 #define $ac_tr_func 1
6650 EOF
6651  
6652 else
6653   echo "$ac_t""no" 1>&6
6654 fi
6655 done
6656
6657 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6658 do
6659 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6660 echo "configure:6661: checking for $ac_func" >&5
6661 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6662   echo $ac_n "(cached) $ac_c" 1>&6
6663 else
6664   cat > conftest.$ac_ext <<EOF
6665 #line 6666 "configure"
6666 #include "confdefs.h"
6667 /* System header to define __stub macros and hopefully few prototypes,
6668     which can conflict with char $ac_func(); below.  */
6669 #include <assert.h>
6670 /* Override any gcc2 internal prototype to avoid an error.  */
6671 /* We use char because int might match the return type of a gcc2
6672     builtin and then its argument prototype would still apply.  */
6673 char $ac_func();
6674
6675 int main() {
6676
6677 /* The GNU C library defines this for functions which it implements
6678     to always fail with ENOSYS.  Some functions are actually named
6679     something starting with __ and the normal name is an alias.  */
6680 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6681 choke me
6682 #else
6683 $ac_func();
6684 #endif
6685
6686 ; return 0; }
6687 EOF
6688 if { (eval echo configure:6689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6689   rm -rf conftest*
6690   eval "ac_cv_func_$ac_func=yes"
6691 else
6692   echo "configure: failed program was:" >&5
6693   cat conftest.$ac_ext >&5
6694   rm -rf conftest*
6695   eval "ac_cv_func_$ac_func=no"
6696 fi
6697 rm -f conftest*
6698 fi
6699
6700 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6701   echo "$ac_t""yes" 1>&6
6702     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6703   cat >> confdefs.h <<EOF
6704 #define $ac_tr_func 1
6705 EOF
6706  
6707 else
6708   echo "$ac_t""no" 1>&6
6709 fi
6710 done
6711
6712 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6713 do
6714 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6715 echo "configure:6716: checking for $ac_func" >&5
6716 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6717   echo $ac_n "(cached) $ac_c" 1>&6
6718 else
6719   cat > conftest.$ac_ext <<EOF
6720 #line 6721 "configure"
6721 #include "confdefs.h"
6722 /* System header to define __stub macros and hopefully few prototypes,
6723     which can conflict with char $ac_func(); below.  */
6724 #include <assert.h>
6725 /* Override any gcc2 internal prototype to avoid an error.  */
6726 /* We use char because int might match the return type of a gcc2
6727     builtin and then its argument prototype would still apply.  */
6728 char $ac_func();
6729
6730 int main() {
6731
6732 /* The GNU C library defines this for functions which it implements
6733     to always fail with ENOSYS.  Some functions are actually named
6734     something starting with __ and the normal name is an alias.  */
6735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6736 choke me
6737 #else
6738 $ac_func();
6739 #endif
6740
6741 ; return 0; }
6742 EOF
6743 if { (eval echo configure:6744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6744   rm -rf conftest*
6745   eval "ac_cv_func_$ac_func=yes"
6746 else
6747   echo "configure: failed program was:" >&5
6748   cat conftest.$ac_ext >&5
6749   rm -rf conftest*
6750   eval "ac_cv_func_$ac_func=no"
6751 fi
6752 rm -f conftest*
6753 fi
6754
6755 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6756   echo "$ac_t""yes" 1>&6
6757     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6758   cat >> confdefs.h <<EOF
6759 #define $ac_tr_func 1
6760 EOF
6761  
6762 else
6763   echo "$ac_t""no" 1>&6
6764 fi
6765 done
6766
6767 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6768 do
6769 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6770 echo "configure:6771: checking for $ac_func" >&5
6771 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6772   echo $ac_n "(cached) $ac_c" 1>&6
6773 else
6774   cat > conftest.$ac_ext <<EOF
6775 #line 6776 "configure"
6776 #include "confdefs.h"
6777 /* System header to define __stub macros and hopefully few prototypes,
6778     which can conflict with char $ac_func(); below.  */
6779 #include <assert.h>
6780 /* Override any gcc2 internal prototype to avoid an error.  */
6781 /* We use char because int might match the return type of a gcc2
6782     builtin and then its argument prototype would still apply.  */
6783 char $ac_func();
6784
6785 int main() {
6786
6787 /* The GNU C library defines this for functions which it implements
6788     to always fail with ENOSYS.  Some functions are actually named
6789     something starting with __ and the normal name is an alias.  */
6790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6791 choke me
6792 #else
6793 $ac_func();
6794 #endif
6795
6796 ; return 0; }
6797 EOF
6798 if { (eval echo configure:6799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6799   rm -rf conftest*
6800   eval "ac_cv_func_$ac_func=yes"
6801 else
6802   echo "configure: failed program was:" >&5
6803   cat conftest.$ac_ext >&5
6804   rm -rf conftest*
6805   eval "ac_cv_func_$ac_func=no"
6806 fi
6807 rm -f conftest*
6808 fi
6809
6810 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6811   echo "$ac_t""yes" 1>&6
6812     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6813   cat >> confdefs.h <<EOF
6814 #define $ac_tr_func 1
6815 EOF
6816  
6817 else
6818   echo "$ac_t""no" 1>&6
6819 fi
6820 done
6821
6822 for ac_func in open64 _open64 __open64 creat64
6823 do
6824 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6825 echo "configure:6826: checking for $ac_func" >&5
6826 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6827   echo $ac_n "(cached) $ac_c" 1>&6
6828 else
6829   cat > conftest.$ac_ext <<EOF
6830 #line 6831 "configure"
6831 #include "confdefs.h"
6832 /* System header to define __stub macros and hopefully few prototypes,
6833     which can conflict with char $ac_func(); below.  */
6834 #include <assert.h>
6835 /* Override any gcc2 internal prototype to avoid an error.  */
6836 /* We use char because int might match the return type of a gcc2
6837     builtin and then its argument prototype would still apply.  */
6838 char $ac_func();
6839
6840 int main() {
6841
6842 /* The GNU C library defines this for functions which it implements
6843     to always fail with ENOSYS.  Some functions are actually named
6844     something starting with __ and the normal name is an alias.  */
6845 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6846 choke me
6847 #else
6848 $ac_func();
6849 #endif
6850
6851 ; return 0; }
6852 EOF
6853 if { (eval echo configure:6854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6854   rm -rf conftest*
6855   eval "ac_cv_func_$ac_func=yes"
6856 else
6857   echo "configure: failed program was:" >&5
6858   cat conftest.$ac_ext >&5
6859   rm -rf conftest*
6860   eval "ac_cv_func_$ac_func=no"
6861 fi
6862 rm -f conftest*
6863 fi
6864
6865 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6866   echo "$ac_t""yes" 1>&6
6867     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6868   cat >> confdefs.h <<EOF
6869 #define $ac_tr_func 1
6870 EOF
6871  
6872 else
6873   echo "$ac_t""no" 1>&6
6874 fi
6875 done
6876
6877
6878 #
6879 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6880 #
6881
6882 if test x$ac_cv_func_stat64 = xno ; then
6883   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6884 echo "configure:6885: checking for stat64 in <sys/stat.h>" >&5
6885   cat > conftest.$ac_ext <<EOF
6886 #line 6887 "configure"
6887 #include "confdefs.h"
6888
6889 #if defined(HAVE_UNISTD_H)
6890 #include <unistd.h>
6891 #endif
6892 #include <sys/stat.h>
6893
6894 int main() {
6895 struct stat64 st64; exit(stat64(".",&st64));
6896 ; return 0; }
6897 EOF
6898 if { (eval echo configure:6899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6899   rm -rf conftest*
6900   ac_cv_func_stat64=yes
6901 else
6902   echo "configure: failed program was:" >&5
6903   cat conftest.$ac_ext >&5
6904 fi
6905 rm -f conftest*
6906   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6907   if test x$ac_cv_func_stat64 = xyes ; then
6908     cat >> confdefs.h <<\EOF
6909 #define HAVE_STAT64 1
6910 EOF
6911
6912   fi
6913 fi
6914
6915 if test x$ac_cv_func_lstat64 = xno ; then
6916   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6917 echo "configure:6918: checking for lstat64 in <sys/stat.h>" >&5
6918   cat > conftest.$ac_ext <<EOF
6919 #line 6920 "configure"
6920 #include "confdefs.h"
6921
6922 #if defined(HAVE_UNISTD_H)
6923 #include <unistd.h>
6924 #endif
6925 #include <sys/stat.h>
6926
6927 int main() {
6928 struct stat64 st64; exit(lstat64(".",&st64));
6929 ; return 0; }
6930 EOF
6931 if { (eval echo configure:6932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6932   rm -rf conftest*
6933   ac_cv_func_lstat64=yes
6934 else
6935   echo "configure: failed program was:" >&5
6936   cat conftest.$ac_ext >&5
6937 fi
6938 rm -f conftest*
6939   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6940   if test x$ac_cv_func_lstat64 = xyes ; then
6941     cat >> confdefs.h <<\EOF
6942 #define HAVE_LSTAT64 1
6943 EOF
6944
6945   fi
6946 fi
6947
6948 if test x$ac_cv_func_fstat64 = xno ; then
6949   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6950 echo "configure:6951: checking for fstat64 in <sys/stat.h>" >&5
6951   cat > conftest.$ac_ext <<EOF
6952 #line 6953 "configure"
6953 #include "confdefs.h"
6954
6955 #if defined(HAVE_UNISTD_H)
6956 #include <unistd.h>
6957 #endif
6958 #include <sys/stat.h>
6959
6960 int main() {
6961 struct stat64 st64; exit(fstat64(0,&st64));
6962 ; return 0; }
6963 EOF
6964 if { (eval echo configure:6965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6965   rm -rf conftest*
6966   ac_cv_func_fstat64=yes
6967 else
6968   echo "configure: failed program was:" >&5
6969   cat conftest.$ac_ext >&5
6970 fi
6971 rm -f conftest*
6972   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6973   if test x$ac_cv_func_fstat64 = xyes ; then
6974     cat >> confdefs.h <<\EOF
6975 #define HAVE_FSTAT64 1
6976 EOF
6977
6978   fi
6979 fi
6980
6981 #####################################
6982 # we might need the resolv library on some systems
6983 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6984 echo "configure:6985: checking for dn_expand in -lresolv" >&5
6985 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6986 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6987   echo $ac_n "(cached) $ac_c" 1>&6
6988 else
6989   ac_save_LIBS="$LIBS"
6990 LIBS="-lresolv  $LIBS"
6991 cat > conftest.$ac_ext <<EOF
6992 #line 6993 "configure"
6993 #include "confdefs.h"
6994 /* Override any gcc2 internal prototype to avoid an error.  */
6995 /* We use char because int might match the return type of a gcc2
6996     builtin and then its argument prototype would still apply.  */
6997 char dn_expand();
6998
6999 int main() {
7000 dn_expand()
7001 ; return 0; }
7002 EOF
7003 if { (eval echo configure:7004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7004   rm -rf conftest*
7005   eval "ac_cv_lib_$ac_lib_var=yes"
7006 else
7007   echo "configure: failed program was:" >&5
7008   cat conftest.$ac_ext >&5
7009   rm -rf conftest*
7010   eval "ac_cv_lib_$ac_lib_var=no"
7011 fi
7012 rm -f conftest*
7013 LIBS="$ac_save_LIBS"
7014
7015 fi
7016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7017   echo "$ac_t""yes" 1>&6
7018     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7019     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7020   cat >> confdefs.h <<EOF
7021 #define $ac_tr_lib 1
7022 EOF
7023
7024   LIBS="-lresolv $LIBS"
7025
7026 else
7027   echo "$ac_t""no" 1>&6
7028 fi
7029
7030
7031 #
7032 # Check for the functions putprpwnam, set_auth_parameters,
7033 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7034 # Needed for OSF1 and HPUX.
7035 #
7036
7037 case "$LIBS" in
7038   *-lsecurity*) for ac_func in putprpwnam
7039 do
7040 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7041 echo "configure:7042: checking for $ac_func" >&5
7042 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7043   echo $ac_n "(cached) $ac_c" 1>&6
7044 else
7045   cat > conftest.$ac_ext <<EOF
7046 #line 7047 "configure"
7047 #include "confdefs.h"
7048 /* System header to define __stub macros and hopefully few prototypes,
7049     which can conflict with char $ac_func(); below.  */
7050 #include <assert.h>
7051 /* Override any gcc2 internal prototype to avoid an error.  */
7052 /* We use char because int might match the return type of a gcc2
7053     builtin and then its argument prototype would still apply.  */
7054 char $ac_func();
7055
7056 int main() {
7057
7058 /* The GNU C library defines this for functions which it implements
7059     to always fail with ENOSYS.  Some functions are actually named
7060     something starting with __ and the normal name is an alias.  */
7061 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7062 choke me
7063 #else
7064 $ac_func();
7065 #endif
7066
7067 ; return 0; }
7068 EOF
7069 if { (eval echo configure:7070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7070   rm -rf conftest*
7071   eval "ac_cv_func_$ac_func=yes"
7072 else
7073   echo "configure: failed program was:" >&5
7074   cat conftest.$ac_ext >&5
7075   rm -rf conftest*
7076   eval "ac_cv_func_$ac_func=no"
7077 fi
7078 rm -f conftest*
7079 fi
7080
7081 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7082   echo "$ac_t""yes" 1>&6
7083     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7084   cat >> confdefs.h <<EOF
7085 #define $ac_tr_func 1
7086 EOF
7087  
7088 else
7089   echo "$ac_t""no" 1>&6
7090 fi
7091 done
7092  ;;
7093   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7094 echo "configure:7095: checking for putprpwnam in -lsecurity" >&5
7095 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7096 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7097   echo $ac_n "(cached) $ac_c" 1>&6
7098 else
7099   ac_save_LIBS="$LIBS"
7100 LIBS="-lsecurity  $LIBS"
7101 cat > conftest.$ac_ext <<EOF
7102 #line 7103 "configure"
7103 #include "confdefs.h"
7104 /* Override any gcc2 internal prototype to avoid an error.  */
7105 /* We use char because int might match the return type of a gcc2
7106     builtin and then its argument prototype would still apply.  */
7107 char putprpwnam();
7108
7109 int main() {
7110 putprpwnam()
7111 ; return 0; }
7112 EOF
7113 if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7114   rm -rf conftest*
7115   eval "ac_cv_lib_$ac_lib_var=yes"
7116 else
7117   echo "configure: failed program was:" >&5
7118   cat conftest.$ac_ext >&5
7119   rm -rf conftest*
7120   eval "ac_cv_lib_$ac_lib_var=no"
7121 fi
7122 rm -f conftest*
7123 LIBS="$ac_save_LIBS"
7124
7125 fi
7126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7127   echo "$ac_t""yes" 1>&6
7128     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7129     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7130   cat >> confdefs.h <<EOF
7131 #define $ac_tr_lib 1
7132 EOF
7133
7134   LIBS="-lsecurity $LIBS"
7135
7136 else
7137   echo "$ac_t""no" 1>&6
7138 fi
7139  
7140      for ac_func in putprpwnam
7141 do
7142 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7143 echo "configure:7144: checking for $ac_func" >&5
7144 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7145   echo $ac_n "(cached) $ac_c" 1>&6
7146 else
7147   cat > conftest.$ac_ext <<EOF
7148 #line 7149 "configure"
7149 #include "confdefs.h"
7150 /* System header to define __stub macros and hopefully few prototypes,
7151     which can conflict with char $ac_func(); below.  */
7152 #include <assert.h>
7153 /* Override any gcc2 internal prototype to avoid an error.  */
7154 /* We use char because int might match the return type of a gcc2
7155     builtin and then its argument prototype would still apply.  */
7156 char $ac_func();
7157
7158 int main() {
7159
7160 /* The GNU C library defines this for functions which it implements
7161     to always fail with ENOSYS.  Some functions are actually named
7162     something starting with __ and the normal name is an alias.  */
7163 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7164 choke me
7165 #else
7166 $ac_func();
7167 #endif
7168
7169 ; return 0; }
7170 EOF
7171 if { (eval echo configure:7172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7172   rm -rf conftest*
7173   eval "ac_cv_func_$ac_func=yes"
7174 else
7175   echo "configure: failed program was:" >&5
7176   cat conftest.$ac_ext >&5
7177   rm -rf conftest*
7178   eval "ac_cv_func_$ac_func=no"
7179 fi
7180 rm -f conftest*
7181 fi
7182
7183 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7184   echo "$ac_t""yes" 1>&6
7185     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7186   cat >> confdefs.h <<EOF
7187 #define $ac_tr_func 1
7188 EOF
7189  
7190 else
7191   echo "$ac_t""no" 1>&6
7192 fi
7193 done
7194
7195   ;;
7196   esac
7197
7198 case "$LIBS" in
7199   *-lsec*) for ac_func in putprpwnam
7200 do
7201 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7202 echo "configure:7203: checking for $ac_func" >&5
7203 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7204   echo $ac_n "(cached) $ac_c" 1>&6
7205 else
7206   cat > conftest.$ac_ext <<EOF
7207 #line 7208 "configure"
7208 #include "confdefs.h"
7209 /* System header to define __stub macros and hopefully few prototypes,
7210     which can conflict with char $ac_func(); below.  */
7211 #include <assert.h>
7212 /* Override any gcc2 internal prototype to avoid an error.  */
7213 /* We use char because int might match the return type of a gcc2
7214     builtin and then its argument prototype would still apply.  */
7215 char $ac_func();
7216
7217 int main() {
7218
7219 /* The GNU C library defines this for functions which it implements
7220     to always fail with ENOSYS.  Some functions are actually named
7221     something starting with __ and the normal name is an alias.  */
7222 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7223 choke me
7224 #else
7225 $ac_func();
7226 #endif
7227
7228 ; return 0; }
7229 EOF
7230 if { (eval echo configure:7231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7231   rm -rf conftest*
7232   eval "ac_cv_func_$ac_func=yes"
7233 else
7234   echo "configure: failed program was:" >&5
7235   cat conftest.$ac_ext >&5
7236   rm -rf conftest*
7237   eval "ac_cv_func_$ac_func=no"
7238 fi
7239 rm -f conftest*
7240 fi
7241
7242 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7243   echo "$ac_t""yes" 1>&6
7244     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7245   cat >> confdefs.h <<EOF
7246 #define $ac_tr_func 1
7247 EOF
7248  
7249 else
7250   echo "$ac_t""no" 1>&6
7251 fi
7252 done
7253  ;;
7254   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7255 echo "configure:7256: checking for putprpwnam in -lsec" >&5
7256 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7257 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7258   echo $ac_n "(cached) $ac_c" 1>&6
7259 else
7260   ac_save_LIBS="$LIBS"
7261 LIBS="-lsec  $LIBS"
7262 cat > conftest.$ac_ext <<EOF
7263 #line 7264 "configure"
7264 #include "confdefs.h"
7265 /* Override any gcc2 internal prototype to avoid an error.  */
7266 /* We use char because int might match the return type of a gcc2
7267     builtin and then its argument prototype would still apply.  */
7268 char putprpwnam();
7269
7270 int main() {
7271 putprpwnam()
7272 ; return 0; }
7273 EOF
7274 if { (eval echo configure:7275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7275   rm -rf conftest*
7276   eval "ac_cv_lib_$ac_lib_var=yes"
7277 else
7278   echo "configure: failed program was:" >&5
7279   cat conftest.$ac_ext >&5
7280   rm -rf conftest*
7281   eval "ac_cv_lib_$ac_lib_var=no"
7282 fi
7283 rm -f conftest*
7284 LIBS="$ac_save_LIBS"
7285
7286 fi
7287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7288   echo "$ac_t""yes" 1>&6
7289     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7290     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7291   cat >> confdefs.h <<EOF
7292 #define $ac_tr_lib 1
7293 EOF
7294
7295   LIBS="-lsec $LIBS"
7296
7297 else
7298   echo "$ac_t""no" 1>&6
7299 fi
7300  
7301      for ac_func in putprpwnam
7302 do
7303 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7304 echo "configure:7305: checking for $ac_func" >&5
7305 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7306   echo $ac_n "(cached) $ac_c" 1>&6
7307 else
7308   cat > conftest.$ac_ext <<EOF
7309 #line 7310 "configure"
7310 #include "confdefs.h"
7311 /* System header to define __stub macros and hopefully few prototypes,
7312     which can conflict with char $ac_func(); below.  */
7313 #include <assert.h>
7314 /* Override any gcc2 internal prototype to avoid an error.  */
7315 /* We use char because int might match the return type of a gcc2
7316     builtin and then its argument prototype would still apply.  */
7317 char $ac_func();
7318
7319 int main() {
7320
7321 /* The GNU C library defines this for functions which it implements
7322     to always fail with ENOSYS.  Some functions are actually named
7323     something starting with __ and the normal name is an alias.  */
7324 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7325 choke me
7326 #else
7327 $ac_func();
7328 #endif
7329
7330 ; return 0; }
7331 EOF
7332 if { (eval echo configure:7333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7333   rm -rf conftest*
7334   eval "ac_cv_func_$ac_func=yes"
7335 else
7336   echo "configure: failed program was:" >&5
7337   cat conftest.$ac_ext >&5
7338   rm -rf conftest*
7339   eval "ac_cv_func_$ac_func=no"
7340 fi
7341 rm -f conftest*
7342 fi
7343
7344 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7345   echo "$ac_t""yes" 1>&6
7346     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7347   cat >> confdefs.h <<EOF
7348 #define $ac_tr_func 1
7349 EOF
7350  
7351 else
7352   echo "$ac_t""no" 1>&6
7353 fi
7354 done
7355
7356   ;;
7357   esac
7358
7359
7360 case "$LIBS" in
7361   *-lsecurity*) for ac_func in set_auth_parameters
7362 do
7363 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7364 echo "configure:7365: checking for $ac_func" >&5
7365 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7366   echo $ac_n "(cached) $ac_c" 1>&6
7367 else
7368   cat > conftest.$ac_ext <<EOF
7369 #line 7370 "configure"
7370 #include "confdefs.h"
7371 /* System header to define __stub macros and hopefully few prototypes,
7372     which can conflict with char $ac_func(); below.  */
7373 #include <assert.h>
7374 /* Override any gcc2 internal prototype to avoid an error.  */
7375 /* We use char because int might match the return type of a gcc2
7376     builtin and then its argument prototype would still apply.  */
7377 char $ac_func();
7378
7379 int main() {
7380
7381 /* The GNU C library defines this for functions which it implements
7382     to always fail with ENOSYS.  Some functions are actually named
7383     something starting with __ and the normal name is an alias.  */
7384 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7385 choke me
7386 #else
7387 $ac_func();
7388 #endif
7389
7390 ; return 0; }
7391 EOF
7392 if { (eval echo configure:7393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7393   rm -rf conftest*
7394   eval "ac_cv_func_$ac_func=yes"
7395 else
7396   echo "configure: failed program was:" >&5
7397   cat conftest.$ac_ext >&5
7398   rm -rf conftest*
7399   eval "ac_cv_func_$ac_func=no"
7400 fi
7401 rm -f conftest*
7402 fi
7403
7404 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7405   echo "$ac_t""yes" 1>&6
7406     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7407   cat >> confdefs.h <<EOF
7408 #define $ac_tr_func 1
7409 EOF
7410  
7411 else
7412   echo "$ac_t""no" 1>&6
7413 fi
7414 done
7415  ;;
7416   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7417 echo "configure:7418: checking for set_auth_parameters in -lsecurity" >&5
7418 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7419 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7420   echo $ac_n "(cached) $ac_c" 1>&6
7421 else
7422   ac_save_LIBS="$LIBS"
7423 LIBS="-lsecurity  $LIBS"
7424 cat > conftest.$ac_ext <<EOF
7425 #line 7426 "configure"
7426 #include "confdefs.h"
7427 /* Override any gcc2 internal prototype to avoid an error.  */
7428 /* We use char because int might match the return type of a gcc2
7429     builtin and then its argument prototype would still apply.  */
7430 char set_auth_parameters();
7431
7432 int main() {
7433 set_auth_parameters()
7434 ; return 0; }
7435 EOF
7436 if { (eval echo configure:7437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7437   rm -rf conftest*
7438   eval "ac_cv_lib_$ac_lib_var=yes"
7439 else
7440   echo "configure: failed program was:" >&5
7441   cat conftest.$ac_ext >&5
7442   rm -rf conftest*
7443   eval "ac_cv_lib_$ac_lib_var=no"
7444 fi
7445 rm -f conftest*
7446 LIBS="$ac_save_LIBS"
7447
7448 fi
7449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7450   echo "$ac_t""yes" 1>&6
7451     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7452     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7453   cat >> confdefs.h <<EOF
7454 #define $ac_tr_lib 1
7455 EOF
7456
7457   LIBS="-lsecurity $LIBS"
7458
7459 else
7460   echo "$ac_t""no" 1>&6
7461 fi
7462  
7463      for ac_func in set_auth_parameters
7464 do
7465 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7466 echo "configure:7467: checking for $ac_func" >&5
7467 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7468   echo $ac_n "(cached) $ac_c" 1>&6
7469 else
7470   cat > conftest.$ac_ext <<EOF
7471 #line 7472 "configure"
7472 #include "confdefs.h"
7473 /* System header to define __stub macros and hopefully few prototypes,
7474     which can conflict with char $ac_func(); below.  */
7475 #include <assert.h>
7476 /* Override any gcc2 internal prototype to avoid an error.  */
7477 /* We use char because int might match the return type of a gcc2
7478     builtin and then its argument prototype would still apply.  */
7479 char $ac_func();
7480
7481 int main() {
7482
7483 /* The GNU C library defines this for functions which it implements
7484     to always fail with ENOSYS.  Some functions are actually named
7485     something starting with __ and the normal name is an alias.  */
7486 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7487 choke me
7488 #else
7489 $ac_func();
7490 #endif
7491
7492 ; return 0; }
7493 EOF
7494 if { (eval echo configure:7495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7495   rm -rf conftest*
7496   eval "ac_cv_func_$ac_func=yes"
7497 else
7498   echo "configure: failed program was:" >&5
7499   cat conftest.$ac_ext >&5
7500   rm -rf conftest*
7501   eval "ac_cv_func_$ac_func=no"
7502 fi
7503 rm -f conftest*
7504 fi
7505
7506 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7507   echo "$ac_t""yes" 1>&6
7508     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7509   cat >> confdefs.h <<EOF
7510 #define $ac_tr_func 1
7511 EOF
7512  
7513 else
7514   echo "$ac_t""no" 1>&6
7515 fi
7516 done
7517
7518   ;;
7519   esac
7520
7521 case "$LIBS" in
7522   *-lsec*) for ac_func in set_auth_parameters
7523 do
7524 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7525 echo "configure:7526: checking for $ac_func" >&5
7526 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7527   echo $ac_n "(cached) $ac_c" 1>&6
7528 else
7529   cat > conftest.$ac_ext <<EOF
7530 #line 7531 "configure"
7531 #include "confdefs.h"
7532 /* System header to define __stub macros and hopefully few prototypes,
7533     which can conflict with char $ac_func(); below.  */
7534 #include <assert.h>
7535 /* Override any gcc2 internal prototype to avoid an error.  */
7536 /* We use char because int might match the return type of a gcc2
7537     builtin and then its argument prototype would still apply.  */
7538 char $ac_func();
7539
7540 int main() {
7541
7542 /* The GNU C library defines this for functions which it implements
7543     to always fail with ENOSYS.  Some functions are actually named
7544     something starting with __ and the normal name is an alias.  */
7545 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7546 choke me
7547 #else
7548 $ac_func();
7549 #endif
7550
7551 ; return 0; }
7552 EOF
7553 if { (eval echo configure:7554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7554   rm -rf conftest*
7555   eval "ac_cv_func_$ac_func=yes"
7556 else
7557   echo "configure: failed program was:" >&5
7558   cat conftest.$ac_ext >&5
7559   rm -rf conftest*
7560   eval "ac_cv_func_$ac_func=no"
7561 fi
7562 rm -f conftest*
7563 fi
7564
7565 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7566   echo "$ac_t""yes" 1>&6
7567     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7568   cat >> confdefs.h <<EOF
7569 #define $ac_tr_func 1
7570 EOF
7571  
7572 else
7573   echo "$ac_t""no" 1>&6
7574 fi
7575 done
7576  ;;
7577   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7578 echo "configure:7579: checking for set_auth_parameters in -lsec" >&5
7579 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7580 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7581   echo $ac_n "(cached) $ac_c" 1>&6
7582 else
7583   ac_save_LIBS="$LIBS"
7584 LIBS="-lsec  $LIBS"
7585 cat > conftest.$ac_ext <<EOF
7586 #line 7587 "configure"
7587 #include "confdefs.h"
7588 /* Override any gcc2 internal prototype to avoid an error.  */
7589 /* We use char because int might match the return type of a gcc2
7590     builtin and then its argument prototype would still apply.  */
7591 char set_auth_parameters();
7592
7593 int main() {
7594 set_auth_parameters()
7595 ; return 0; }
7596 EOF
7597 if { (eval echo configure:7598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7598   rm -rf conftest*
7599   eval "ac_cv_lib_$ac_lib_var=yes"
7600 else
7601   echo "configure: failed program was:" >&5
7602   cat conftest.$ac_ext >&5
7603   rm -rf conftest*
7604   eval "ac_cv_lib_$ac_lib_var=no"
7605 fi
7606 rm -f conftest*
7607 LIBS="$ac_save_LIBS"
7608
7609 fi
7610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7611   echo "$ac_t""yes" 1>&6
7612     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7613     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7614   cat >> confdefs.h <<EOF
7615 #define $ac_tr_lib 1
7616 EOF
7617
7618   LIBS="-lsec $LIBS"
7619
7620 else
7621   echo "$ac_t""no" 1>&6
7622 fi
7623  
7624      for ac_func in set_auth_parameters
7625 do
7626 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7627 echo "configure:7628: checking for $ac_func" >&5
7628 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7629   echo $ac_n "(cached) $ac_c" 1>&6
7630 else
7631   cat > conftest.$ac_ext <<EOF
7632 #line 7633 "configure"
7633 #include "confdefs.h"
7634 /* System header to define __stub macros and hopefully few prototypes,
7635     which can conflict with char $ac_func(); below.  */
7636 #include <assert.h>
7637 /* Override any gcc2 internal prototype to avoid an error.  */
7638 /* We use char because int might match the return type of a gcc2
7639     builtin and then its argument prototype would still apply.  */
7640 char $ac_func();
7641
7642 int main() {
7643
7644 /* The GNU C library defines this for functions which it implements
7645     to always fail with ENOSYS.  Some functions are actually named
7646     something starting with __ and the normal name is an alias.  */
7647 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7648 choke me
7649 #else
7650 $ac_func();
7651 #endif
7652
7653 ; return 0; }
7654 EOF
7655 if { (eval echo configure:7656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7656   rm -rf conftest*
7657   eval "ac_cv_func_$ac_func=yes"
7658 else
7659   echo "configure: failed program was:" >&5
7660   cat conftest.$ac_ext >&5
7661   rm -rf conftest*
7662   eval "ac_cv_func_$ac_func=no"
7663 fi
7664 rm -f conftest*
7665 fi
7666
7667 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7668   echo "$ac_t""yes" 1>&6
7669     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7670   cat >> confdefs.h <<EOF
7671 #define $ac_tr_func 1
7672 EOF
7673  
7674 else
7675   echo "$ac_t""no" 1>&6
7676 fi
7677 done
7678
7679   ;;
7680   esac
7681
7682
7683 # UnixWare 7.x has its getspnam in -lgen
7684 case "$LIBS" in
7685   *-lgen*) for ac_func in getspnam
7686 do
7687 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7688 echo "configure:7689: checking for $ac_func" >&5
7689 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7690   echo $ac_n "(cached) $ac_c" 1>&6
7691 else
7692   cat > conftest.$ac_ext <<EOF
7693 #line 7694 "configure"
7694 #include "confdefs.h"
7695 /* System header to define __stub macros and hopefully few prototypes,
7696     which can conflict with char $ac_func(); below.  */
7697 #include <assert.h>
7698 /* Override any gcc2 internal prototype to avoid an error.  */
7699 /* We use char because int might match the return type of a gcc2
7700     builtin and then its argument prototype would still apply.  */
7701 char $ac_func();
7702
7703 int main() {
7704
7705 /* The GNU C library defines this for functions which it implements
7706     to always fail with ENOSYS.  Some functions are actually named
7707     something starting with __ and the normal name is an alias.  */
7708 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7709 choke me
7710 #else
7711 $ac_func();
7712 #endif
7713
7714 ; return 0; }
7715 EOF
7716 if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7717   rm -rf conftest*
7718   eval "ac_cv_func_$ac_func=yes"
7719 else
7720   echo "configure: failed program was:" >&5
7721   cat conftest.$ac_ext >&5
7722   rm -rf conftest*
7723   eval "ac_cv_func_$ac_func=no"
7724 fi
7725 rm -f conftest*
7726 fi
7727
7728 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7729   echo "$ac_t""yes" 1>&6
7730     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7731   cat >> confdefs.h <<EOF
7732 #define $ac_tr_func 1
7733 EOF
7734  
7735 else
7736   echo "$ac_t""no" 1>&6
7737 fi
7738 done
7739  ;;
7740   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7741 echo "configure:7742: checking for getspnam in -lgen" >&5
7742 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7743 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7744   echo $ac_n "(cached) $ac_c" 1>&6
7745 else
7746   ac_save_LIBS="$LIBS"
7747 LIBS="-lgen  $LIBS"
7748 cat > conftest.$ac_ext <<EOF
7749 #line 7750 "configure"
7750 #include "confdefs.h"
7751 /* Override any gcc2 internal prototype to avoid an error.  */
7752 /* We use char because int might match the return type of a gcc2
7753     builtin and then its argument prototype would still apply.  */
7754 char getspnam();
7755
7756 int main() {
7757 getspnam()
7758 ; return 0; }
7759 EOF
7760 if { (eval echo configure:7761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7761   rm -rf conftest*
7762   eval "ac_cv_lib_$ac_lib_var=yes"
7763 else
7764   echo "configure: failed program was:" >&5
7765   cat conftest.$ac_ext >&5
7766   rm -rf conftest*
7767   eval "ac_cv_lib_$ac_lib_var=no"
7768 fi
7769 rm -f conftest*
7770 LIBS="$ac_save_LIBS"
7771
7772 fi
7773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7774   echo "$ac_t""yes" 1>&6
7775     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7776     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7777   cat >> confdefs.h <<EOF
7778 #define $ac_tr_lib 1
7779 EOF
7780
7781   LIBS="-lgen $LIBS"
7782
7783 else
7784   echo "$ac_t""no" 1>&6
7785 fi
7786  
7787      for ac_func in getspnam
7788 do
7789 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7790 echo "configure:7791: checking for $ac_func" >&5
7791 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7792   echo $ac_n "(cached) $ac_c" 1>&6
7793 else
7794   cat > conftest.$ac_ext <<EOF
7795 #line 7796 "configure"
7796 #include "confdefs.h"
7797 /* System header to define __stub macros and hopefully few prototypes,
7798     which can conflict with char $ac_func(); below.  */
7799 #include <assert.h>
7800 /* Override any gcc2 internal prototype to avoid an error.  */
7801 /* We use char because int might match the return type of a gcc2
7802     builtin and then its argument prototype would still apply.  */
7803 char $ac_func();
7804
7805 int main() {
7806
7807 /* The GNU C library defines this for functions which it implements
7808     to always fail with ENOSYS.  Some functions are actually named
7809     something starting with __ and the normal name is an alias.  */
7810 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7811 choke me
7812 #else
7813 $ac_func();
7814 #endif
7815
7816 ; return 0; }
7817 EOF
7818 if { (eval echo configure:7819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7819   rm -rf conftest*
7820   eval "ac_cv_func_$ac_func=yes"
7821 else
7822   echo "configure: failed program was:" >&5
7823   cat conftest.$ac_ext >&5
7824   rm -rf conftest*
7825   eval "ac_cv_func_$ac_func=no"
7826 fi
7827 rm -f conftest*
7828 fi
7829
7830 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7831   echo "$ac_t""yes" 1>&6
7832     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7833   cat >> confdefs.h <<EOF
7834 #define $ac_tr_func 1
7835 EOF
7836  
7837 else
7838   echo "$ac_t""no" 1>&6
7839 fi
7840 done
7841
7842   ;;
7843   esac
7844
7845
7846 case "$LIBS" in
7847   *-lsecurity*) for ac_func in getspnam
7848 do
7849 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7850 echo "configure:7851: checking for $ac_func" >&5
7851 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7852   echo $ac_n "(cached) $ac_c" 1>&6
7853 else
7854   cat > conftest.$ac_ext <<EOF
7855 #line 7856 "configure"
7856 #include "confdefs.h"
7857 /* System header to define __stub macros and hopefully few prototypes,
7858     which can conflict with char $ac_func(); below.  */
7859 #include <assert.h>
7860 /* Override any gcc2 internal prototype to avoid an error.  */
7861 /* We use char because int might match the return type of a gcc2
7862     builtin and then its argument prototype would still apply.  */
7863 char $ac_func();
7864
7865 int main() {
7866
7867 /* The GNU C library defines this for functions which it implements
7868     to always fail with ENOSYS.  Some functions are actually named
7869     something starting with __ and the normal name is an alias.  */
7870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7871 choke me
7872 #else
7873 $ac_func();
7874 #endif
7875
7876 ; return 0; }
7877 EOF
7878 if { (eval echo configure:7879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7879   rm -rf conftest*
7880   eval "ac_cv_func_$ac_func=yes"
7881 else
7882   echo "configure: failed program was:" >&5
7883   cat conftest.$ac_ext >&5
7884   rm -rf conftest*
7885   eval "ac_cv_func_$ac_func=no"
7886 fi
7887 rm -f conftest*
7888 fi
7889
7890 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7891   echo "$ac_t""yes" 1>&6
7892     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7893   cat >> confdefs.h <<EOF
7894 #define $ac_tr_func 1
7895 EOF
7896  
7897 else
7898   echo "$ac_t""no" 1>&6
7899 fi
7900 done
7901  ;;
7902   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7903 echo "configure:7904: checking for getspnam in -lsecurity" >&5
7904 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7905 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7906   echo $ac_n "(cached) $ac_c" 1>&6
7907 else
7908   ac_save_LIBS="$LIBS"
7909 LIBS="-lsecurity  $LIBS"
7910 cat > conftest.$ac_ext <<EOF
7911 #line 7912 "configure"
7912 #include "confdefs.h"
7913 /* Override any gcc2 internal prototype to avoid an error.  */
7914 /* We use char because int might match the return type of a gcc2
7915     builtin and then its argument prototype would still apply.  */
7916 char getspnam();
7917
7918 int main() {
7919 getspnam()
7920 ; return 0; }
7921 EOF
7922 if { (eval echo configure:7923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7923   rm -rf conftest*
7924   eval "ac_cv_lib_$ac_lib_var=yes"
7925 else
7926   echo "configure: failed program was:" >&5
7927   cat conftest.$ac_ext >&5
7928   rm -rf conftest*
7929   eval "ac_cv_lib_$ac_lib_var=no"
7930 fi
7931 rm -f conftest*
7932 LIBS="$ac_save_LIBS"
7933
7934 fi
7935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7936   echo "$ac_t""yes" 1>&6
7937     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7938     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7939   cat >> confdefs.h <<EOF
7940 #define $ac_tr_lib 1
7941 EOF
7942
7943   LIBS="-lsecurity $LIBS"
7944
7945 else
7946   echo "$ac_t""no" 1>&6
7947 fi
7948  
7949      for ac_func in getspnam
7950 do
7951 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7952 echo "configure:7953: checking for $ac_func" >&5
7953 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7954   echo $ac_n "(cached) $ac_c" 1>&6
7955 else
7956   cat > conftest.$ac_ext <<EOF
7957 #line 7958 "configure"
7958 #include "confdefs.h"
7959 /* System header to define __stub macros and hopefully few prototypes,
7960     which can conflict with char $ac_func(); below.  */
7961 #include <assert.h>
7962 /* Override any gcc2 internal prototype to avoid an error.  */
7963 /* We use char because int might match the return type of a gcc2
7964     builtin and then its argument prototype would still apply.  */
7965 char $ac_func();
7966
7967 int main() {
7968
7969 /* The GNU C library defines this for functions which it implements
7970     to always fail with ENOSYS.  Some functions are actually named
7971     something starting with __ and the normal name is an alias.  */
7972 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7973 choke me
7974 #else
7975 $ac_func();
7976 #endif
7977
7978 ; return 0; }
7979 EOF
7980 if { (eval echo configure:7981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7981   rm -rf conftest*
7982   eval "ac_cv_func_$ac_func=yes"
7983 else
7984   echo "configure: failed program was:" >&5
7985   cat conftest.$ac_ext >&5
7986   rm -rf conftest*
7987   eval "ac_cv_func_$ac_func=no"
7988 fi
7989 rm -f conftest*
7990 fi
7991
7992 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7993   echo "$ac_t""yes" 1>&6
7994     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7995   cat >> confdefs.h <<EOF
7996 #define $ac_tr_func 1
7997 EOF
7998  
7999 else
8000   echo "$ac_t""no" 1>&6
8001 fi
8002 done
8003
8004   ;;
8005   esac
8006
8007 case "$LIBS" in
8008   *-lsec*) for ac_func in getspnam
8009 do
8010 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8011 echo "configure:8012: checking for $ac_func" >&5
8012 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8013   echo $ac_n "(cached) $ac_c" 1>&6
8014 else
8015   cat > conftest.$ac_ext <<EOF
8016 #line 8017 "configure"
8017 #include "confdefs.h"
8018 /* System header to define __stub macros and hopefully few prototypes,
8019     which can conflict with char $ac_func(); below.  */
8020 #include <assert.h>
8021 /* Override any gcc2 internal prototype to avoid an error.  */
8022 /* We use char because int might match the return type of a gcc2
8023     builtin and then its argument prototype would still apply.  */
8024 char $ac_func();
8025
8026 int main() {
8027
8028 /* The GNU C library defines this for functions which it implements
8029     to always fail with ENOSYS.  Some functions are actually named
8030     something starting with __ and the normal name is an alias.  */
8031 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8032 choke me
8033 #else
8034 $ac_func();
8035 #endif
8036
8037 ; return 0; }
8038 EOF
8039 if { (eval echo configure:8040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8040   rm -rf conftest*
8041   eval "ac_cv_func_$ac_func=yes"
8042 else
8043   echo "configure: failed program was:" >&5
8044   cat conftest.$ac_ext >&5
8045   rm -rf conftest*
8046   eval "ac_cv_func_$ac_func=no"
8047 fi
8048 rm -f conftest*
8049 fi
8050
8051 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8052   echo "$ac_t""yes" 1>&6
8053     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8054   cat >> confdefs.h <<EOF
8055 #define $ac_tr_func 1
8056 EOF
8057  
8058 else
8059   echo "$ac_t""no" 1>&6
8060 fi
8061 done
8062  ;;
8063   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8064 echo "configure:8065: checking for getspnam in -lsec" >&5
8065 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8066 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8067   echo $ac_n "(cached) $ac_c" 1>&6
8068 else
8069   ac_save_LIBS="$LIBS"
8070 LIBS="-lsec  $LIBS"
8071 cat > conftest.$ac_ext <<EOF
8072 #line 8073 "configure"
8073 #include "confdefs.h"
8074 /* Override any gcc2 internal prototype to avoid an error.  */
8075 /* We use char because int might match the return type of a gcc2
8076     builtin and then its argument prototype would still apply.  */
8077 char getspnam();
8078
8079 int main() {
8080 getspnam()
8081 ; return 0; }
8082 EOF
8083 if { (eval echo configure:8084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8084   rm -rf conftest*
8085   eval "ac_cv_lib_$ac_lib_var=yes"
8086 else
8087   echo "configure: failed program was:" >&5
8088   cat conftest.$ac_ext >&5
8089   rm -rf conftest*
8090   eval "ac_cv_lib_$ac_lib_var=no"
8091 fi
8092 rm -f conftest*
8093 LIBS="$ac_save_LIBS"
8094
8095 fi
8096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8097   echo "$ac_t""yes" 1>&6
8098     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8099     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8100   cat >> confdefs.h <<EOF
8101 #define $ac_tr_lib 1
8102 EOF
8103
8104   LIBS="-lsec $LIBS"
8105
8106 else
8107   echo "$ac_t""no" 1>&6
8108 fi
8109  
8110      for ac_func in getspnam
8111 do
8112 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8113 echo "configure:8114: checking for $ac_func" >&5
8114 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8115   echo $ac_n "(cached) $ac_c" 1>&6
8116 else
8117   cat > conftest.$ac_ext <<EOF
8118 #line 8119 "configure"
8119 #include "confdefs.h"
8120 /* System header to define __stub macros and hopefully few prototypes,
8121     which can conflict with char $ac_func(); below.  */
8122 #include <assert.h>
8123 /* Override any gcc2 internal prototype to avoid an error.  */
8124 /* We use char because int might match the return type of a gcc2
8125     builtin and then its argument prototype would still apply.  */
8126 char $ac_func();
8127
8128 int main() {
8129
8130 /* The GNU C library defines this for functions which it implements
8131     to always fail with ENOSYS.  Some functions are actually named
8132     something starting with __ and the normal name is an alias.  */
8133 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8134 choke me
8135 #else
8136 $ac_func();
8137 #endif
8138
8139 ; return 0; }
8140 EOF
8141 if { (eval echo configure:8142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8142   rm -rf conftest*
8143   eval "ac_cv_func_$ac_func=yes"
8144 else
8145   echo "configure: failed program was:" >&5
8146   cat conftest.$ac_ext >&5
8147   rm -rf conftest*
8148   eval "ac_cv_func_$ac_func=no"
8149 fi
8150 rm -f conftest*
8151 fi
8152
8153 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8154   echo "$ac_t""yes" 1>&6
8155     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8156   cat >> confdefs.h <<EOF
8157 #define $ac_tr_func 1
8158 EOF
8159  
8160 else
8161   echo "$ac_t""no" 1>&6
8162 fi
8163 done
8164
8165   ;;
8166   esac
8167
8168
8169 case "$LIBS" in
8170   *-lsecurity*) for ac_func in bigcrypt
8171 do
8172 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8173 echo "configure:8174: checking for $ac_func" >&5
8174 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8175   echo $ac_n "(cached) $ac_c" 1>&6
8176 else
8177   cat > conftest.$ac_ext <<EOF
8178 #line 8179 "configure"
8179 #include "confdefs.h"
8180 /* System header to define __stub macros and hopefully few prototypes,
8181     which can conflict with char $ac_func(); below.  */
8182 #include <assert.h>
8183 /* Override any gcc2 internal prototype to avoid an error.  */
8184 /* We use char because int might match the return type of a gcc2
8185     builtin and then its argument prototype would still apply.  */
8186 char $ac_func();
8187
8188 int main() {
8189
8190 /* The GNU C library defines this for functions which it implements
8191     to always fail with ENOSYS.  Some functions are actually named
8192     something starting with __ and the normal name is an alias.  */
8193 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8194 choke me
8195 #else
8196 $ac_func();
8197 #endif
8198
8199 ; return 0; }
8200 EOF
8201 if { (eval echo configure:8202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8202   rm -rf conftest*
8203   eval "ac_cv_func_$ac_func=yes"
8204 else
8205   echo "configure: failed program was:" >&5
8206   cat conftest.$ac_ext >&5
8207   rm -rf conftest*
8208   eval "ac_cv_func_$ac_func=no"
8209 fi
8210 rm -f conftest*
8211 fi
8212
8213 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8214   echo "$ac_t""yes" 1>&6
8215     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8216   cat >> confdefs.h <<EOF
8217 #define $ac_tr_func 1
8218 EOF
8219  
8220 else
8221   echo "$ac_t""no" 1>&6
8222 fi
8223 done
8224  ;;
8225   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8226 echo "configure:8227: checking for bigcrypt in -lsecurity" >&5
8227 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8228 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8229   echo $ac_n "(cached) $ac_c" 1>&6
8230 else
8231   ac_save_LIBS="$LIBS"
8232 LIBS="-lsecurity  $LIBS"
8233 cat > conftest.$ac_ext <<EOF
8234 #line 8235 "configure"
8235 #include "confdefs.h"
8236 /* Override any gcc2 internal prototype to avoid an error.  */
8237 /* We use char because int might match the return type of a gcc2
8238     builtin and then its argument prototype would still apply.  */
8239 char bigcrypt();
8240
8241 int main() {
8242 bigcrypt()
8243 ; return 0; }
8244 EOF
8245 if { (eval echo configure:8246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8246   rm -rf conftest*
8247   eval "ac_cv_lib_$ac_lib_var=yes"
8248 else
8249   echo "configure: failed program was:" >&5
8250   cat conftest.$ac_ext >&5
8251   rm -rf conftest*
8252   eval "ac_cv_lib_$ac_lib_var=no"
8253 fi
8254 rm -f conftest*
8255 LIBS="$ac_save_LIBS"
8256
8257 fi
8258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8259   echo "$ac_t""yes" 1>&6
8260     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8261     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8262   cat >> confdefs.h <<EOF
8263 #define $ac_tr_lib 1
8264 EOF
8265
8266   LIBS="-lsecurity $LIBS"
8267
8268 else
8269   echo "$ac_t""no" 1>&6
8270 fi
8271  
8272      for ac_func in bigcrypt
8273 do
8274 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8275 echo "configure:8276: checking for $ac_func" >&5
8276 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8277   echo $ac_n "(cached) $ac_c" 1>&6
8278 else
8279   cat > conftest.$ac_ext <<EOF
8280 #line 8281 "configure"
8281 #include "confdefs.h"
8282 /* System header to define __stub macros and hopefully few prototypes,
8283     which can conflict with char $ac_func(); below.  */
8284 #include <assert.h>
8285 /* Override any gcc2 internal prototype to avoid an error.  */
8286 /* We use char because int might match the return type of a gcc2
8287     builtin and then its argument prototype would still apply.  */
8288 char $ac_func();
8289
8290 int main() {
8291
8292 /* The GNU C library defines this for functions which it implements
8293     to always fail with ENOSYS.  Some functions are actually named
8294     something starting with __ and the normal name is an alias.  */
8295 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8296 choke me
8297 #else
8298 $ac_func();
8299 #endif
8300
8301 ; return 0; }
8302 EOF
8303 if { (eval echo configure:8304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8304   rm -rf conftest*
8305   eval "ac_cv_func_$ac_func=yes"
8306 else
8307   echo "configure: failed program was:" >&5
8308   cat conftest.$ac_ext >&5
8309   rm -rf conftest*
8310   eval "ac_cv_func_$ac_func=no"
8311 fi
8312 rm -f conftest*
8313 fi
8314
8315 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8316   echo "$ac_t""yes" 1>&6
8317     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8318   cat >> confdefs.h <<EOF
8319 #define $ac_tr_func 1
8320 EOF
8321  
8322 else
8323   echo "$ac_t""no" 1>&6
8324 fi
8325 done
8326
8327   ;;
8328   esac
8329
8330 case "$LIBS" in
8331   *-lsec*) for ac_func in bigcrypt
8332 do
8333 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8334 echo "configure:8335: checking for $ac_func" >&5
8335 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8336   echo $ac_n "(cached) $ac_c" 1>&6
8337 else
8338   cat > conftest.$ac_ext <<EOF
8339 #line 8340 "configure"
8340 #include "confdefs.h"
8341 /* System header to define __stub macros and hopefully few prototypes,
8342     which can conflict with char $ac_func(); below.  */
8343 #include <assert.h>
8344 /* Override any gcc2 internal prototype to avoid an error.  */
8345 /* We use char because int might match the return type of a gcc2
8346     builtin and then its argument prototype would still apply.  */
8347 char $ac_func();
8348
8349 int main() {
8350
8351 /* The GNU C library defines this for functions which it implements
8352     to always fail with ENOSYS.  Some functions are actually named
8353     something starting with __ and the normal name is an alias.  */
8354 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8355 choke me
8356 #else
8357 $ac_func();
8358 #endif
8359
8360 ; return 0; }
8361 EOF
8362 if { (eval echo configure:8363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8363   rm -rf conftest*
8364   eval "ac_cv_func_$ac_func=yes"
8365 else
8366   echo "configure: failed program was:" >&5
8367   cat conftest.$ac_ext >&5
8368   rm -rf conftest*
8369   eval "ac_cv_func_$ac_func=no"
8370 fi
8371 rm -f conftest*
8372 fi
8373
8374 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8375   echo "$ac_t""yes" 1>&6
8376     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8377   cat >> confdefs.h <<EOF
8378 #define $ac_tr_func 1
8379 EOF
8380  
8381 else
8382   echo "$ac_t""no" 1>&6
8383 fi
8384 done
8385  ;;
8386   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8387 echo "configure:8388: checking for bigcrypt in -lsec" >&5
8388 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8389 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8390   echo $ac_n "(cached) $ac_c" 1>&6
8391 else
8392   ac_save_LIBS="$LIBS"
8393 LIBS="-lsec  $LIBS"
8394 cat > conftest.$ac_ext <<EOF
8395 #line 8396 "configure"
8396 #include "confdefs.h"
8397 /* Override any gcc2 internal prototype to avoid an error.  */
8398 /* We use char because int might match the return type of a gcc2
8399     builtin and then its argument prototype would still apply.  */
8400 char bigcrypt();
8401
8402 int main() {
8403 bigcrypt()
8404 ; return 0; }
8405 EOF
8406 if { (eval echo configure:8407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8407   rm -rf conftest*
8408   eval "ac_cv_lib_$ac_lib_var=yes"
8409 else
8410   echo "configure: failed program was:" >&5
8411   cat conftest.$ac_ext >&5
8412   rm -rf conftest*
8413   eval "ac_cv_lib_$ac_lib_var=no"
8414 fi
8415 rm -f conftest*
8416 LIBS="$ac_save_LIBS"
8417
8418 fi
8419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8420   echo "$ac_t""yes" 1>&6
8421     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8422     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8423   cat >> confdefs.h <<EOF
8424 #define $ac_tr_lib 1
8425 EOF
8426
8427   LIBS="-lsec $LIBS"
8428
8429 else
8430   echo "$ac_t""no" 1>&6
8431 fi
8432  
8433      for ac_func in bigcrypt
8434 do
8435 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8436 echo "configure:8437: checking for $ac_func" >&5
8437 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8438   echo $ac_n "(cached) $ac_c" 1>&6
8439 else
8440   cat > conftest.$ac_ext <<EOF
8441 #line 8442 "configure"
8442 #include "confdefs.h"
8443 /* System header to define __stub macros and hopefully few prototypes,
8444     which can conflict with char $ac_func(); below.  */
8445 #include <assert.h>
8446 /* Override any gcc2 internal prototype to avoid an error.  */
8447 /* We use char because int might match the return type of a gcc2
8448     builtin and then its argument prototype would still apply.  */
8449 char $ac_func();
8450
8451 int main() {
8452
8453 /* The GNU C library defines this for functions which it implements
8454     to always fail with ENOSYS.  Some functions are actually named
8455     something starting with __ and the normal name is an alias.  */
8456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8457 choke me
8458 #else
8459 $ac_func();
8460 #endif
8461
8462 ; return 0; }
8463 EOF
8464 if { (eval echo configure:8465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8465   rm -rf conftest*
8466   eval "ac_cv_func_$ac_func=yes"
8467 else
8468   echo "configure: failed program was:" >&5
8469   cat conftest.$ac_ext >&5
8470   rm -rf conftest*
8471   eval "ac_cv_func_$ac_func=no"
8472 fi
8473 rm -f conftest*
8474 fi
8475
8476 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8477   echo "$ac_t""yes" 1>&6
8478     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8479   cat >> confdefs.h <<EOF
8480 #define $ac_tr_func 1
8481 EOF
8482  
8483 else
8484   echo "$ac_t""no" 1>&6
8485 fi
8486 done
8487
8488   ;;
8489   esac
8490
8491
8492 case "$LIBS" in
8493   *-lsecurity*) for ac_func in getprpwnam
8494 do
8495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8496 echo "configure:8497: checking for $ac_func" >&5
8497 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8498   echo $ac_n "(cached) $ac_c" 1>&6
8499 else
8500   cat > conftest.$ac_ext <<EOF
8501 #line 8502 "configure"
8502 #include "confdefs.h"
8503 /* System header to define __stub macros and hopefully few prototypes,
8504     which can conflict with char $ac_func(); below.  */
8505 #include <assert.h>
8506 /* Override any gcc2 internal prototype to avoid an error.  */
8507 /* We use char because int might match the return type of a gcc2
8508     builtin and then its argument prototype would still apply.  */
8509 char $ac_func();
8510
8511 int main() {
8512
8513 /* The GNU C library defines this for functions which it implements
8514     to always fail with ENOSYS.  Some functions are actually named
8515     something starting with __ and the normal name is an alias.  */
8516 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8517 choke me
8518 #else
8519 $ac_func();
8520 #endif
8521
8522 ; return 0; }
8523 EOF
8524 if { (eval echo configure:8525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8525   rm -rf conftest*
8526   eval "ac_cv_func_$ac_func=yes"
8527 else
8528   echo "configure: failed program was:" >&5
8529   cat conftest.$ac_ext >&5
8530   rm -rf conftest*
8531   eval "ac_cv_func_$ac_func=no"
8532 fi
8533 rm -f conftest*
8534 fi
8535
8536 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8537   echo "$ac_t""yes" 1>&6
8538     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8539   cat >> confdefs.h <<EOF
8540 #define $ac_tr_func 1
8541 EOF
8542  
8543 else
8544   echo "$ac_t""no" 1>&6
8545 fi
8546 done
8547  ;;
8548   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8549 echo "configure:8550: checking for getprpwnam in -lsecurity" >&5
8550 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8551 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8552   echo $ac_n "(cached) $ac_c" 1>&6
8553 else
8554   ac_save_LIBS="$LIBS"
8555 LIBS="-lsecurity  $LIBS"
8556 cat > conftest.$ac_ext <<EOF
8557 #line 8558 "configure"
8558 #include "confdefs.h"
8559 /* Override any gcc2 internal prototype to avoid an error.  */
8560 /* We use char because int might match the return type of a gcc2
8561     builtin and then its argument prototype would still apply.  */
8562 char getprpwnam();
8563
8564 int main() {
8565 getprpwnam()
8566 ; return 0; }
8567 EOF
8568 if { (eval echo configure:8569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8569   rm -rf conftest*
8570   eval "ac_cv_lib_$ac_lib_var=yes"
8571 else
8572   echo "configure: failed program was:" >&5
8573   cat conftest.$ac_ext >&5
8574   rm -rf conftest*
8575   eval "ac_cv_lib_$ac_lib_var=no"
8576 fi
8577 rm -f conftest*
8578 LIBS="$ac_save_LIBS"
8579
8580 fi
8581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8582   echo "$ac_t""yes" 1>&6
8583     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8584     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8585   cat >> confdefs.h <<EOF
8586 #define $ac_tr_lib 1
8587 EOF
8588
8589   LIBS="-lsecurity $LIBS"
8590
8591 else
8592   echo "$ac_t""no" 1>&6
8593 fi
8594  
8595      for ac_func in getprpwnam
8596 do
8597 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8598 echo "configure:8599: checking for $ac_func" >&5
8599 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8600   echo $ac_n "(cached) $ac_c" 1>&6
8601 else
8602   cat > conftest.$ac_ext <<EOF
8603 #line 8604 "configure"
8604 #include "confdefs.h"
8605 /* System header to define __stub macros and hopefully few prototypes,
8606     which can conflict with char $ac_func(); below.  */
8607 #include <assert.h>
8608 /* Override any gcc2 internal prototype to avoid an error.  */
8609 /* We use char because int might match the return type of a gcc2
8610     builtin and then its argument prototype would still apply.  */
8611 char $ac_func();
8612
8613 int main() {
8614
8615 /* The GNU C library defines this for functions which it implements
8616     to always fail with ENOSYS.  Some functions are actually named
8617     something starting with __ and the normal name is an alias.  */
8618 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8619 choke me
8620 #else
8621 $ac_func();
8622 #endif
8623
8624 ; return 0; }
8625 EOF
8626 if { (eval echo configure:8627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8627   rm -rf conftest*
8628   eval "ac_cv_func_$ac_func=yes"
8629 else
8630   echo "configure: failed program was:" >&5
8631   cat conftest.$ac_ext >&5
8632   rm -rf conftest*
8633   eval "ac_cv_func_$ac_func=no"
8634 fi
8635 rm -f conftest*
8636 fi
8637
8638 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8639   echo "$ac_t""yes" 1>&6
8640     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8641   cat >> confdefs.h <<EOF
8642 #define $ac_tr_func 1
8643 EOF
8644  
8645 else
8646   echo "$ac_t""no" 1>&6
8647 fi
8648 done
8649
8650   ;;
8651   esac
8652
8653 case "$LIBS" in
8654   *-lsec*) for ac_func in getprpwnam
8655 do
8656 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8657 echo "configure:8658: checking for $ac_func" >&5
8658 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8659   echo $ac_n "(cached) $ac_c" 1>&6
8660 else
8661   cat > conftest.$ac_ext <<EOF
8662 #line 8663 "configure"
8663 #include "confdefs.h"
8664 /* System header to define __stub macros and hopefully few prototypes,
8665     which can conflict with char $ac_func(); below.  */
8666 #include <assert.h>
8667 /* Override any gcc2 internal prototype to avoid an error.  */
8668 /* We use char because int might match the return type of a gcc2
8669     builtin and then its argument prototype would still apply.  */
8670 char $ac_func();
8671
8672 int main() {
8673
8674 /* The GNU C library defines this for functions which it implements
8675     to always fail with ENOSYS.  Some functions are actually named
8676     something starting with __ and the normal name is an alias.  */
8677 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8678 choke me
8679 #else
8680 $ac_func();
8681 #endif
8682
8683 ; return 0; }
8684 EOF
8685 if { (eval echo configure:8686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8686   rm -rf conftest*
8687   eval "ac_cv_func_$ac_func=yes"
8688 else
8689   echo "configure: failed program was:" >&5
8690   cat conftest.$ac_ext >&5
8691   rm -rf conftest*
8692   eval "ac_cv_func_$ac_func=no"
8693 fi
8694 rm -f conftest*
8695 fi
8696
8697 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8698   echo "$ac_t""yes" 1>&6
8699     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8700   cat >> confdefs.h <<EOF
8701 #define $ac_tr_func 1
8702 EOF
8703  
8704 else
8705   echo "$ac_t""no" 1>&6
8706 fi
8707 done
8708  ;;
8709   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8710 echo "configure:8711: checking for getprpwnam in -lsec" >&5
8711 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8712 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8713   echo $ac_n "(cached) $ac_c" 1>&6
8714 else
8715   ac_save_LIBS="$LIBS"
8716 LIBS="-lsec  $LIBS"
8717 cat > conftest.$ac_ext <<EOF
8718 #line 8719 "configure"
8719 #include "confdefs.h"
8720 /* Override any gcc2 internal prototype to avoid an error.  */
8721 /* We use char because int might match the return type of a gcc2
8722     builtin and then its argument prototype would still apply.  */
8723 char getprpwnam();
8724
8725 int main() {
8726 getprpwnam()
8727 ; return 0; }
8728 EOF
8729 if { (eval echo configure:8730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8730   rm -rf conftest*
8731   eval "ac_cv_lib_$ac_lib_var=yes"
8732 else
8733   echo "configure: failed program was:" >&5
8734   cat conftest.$ac_ext >&5
8735   rm -rf conftest*
8736   eval "ac_cv_lib_$ac_lib_var=no"
8737 fi
8738 rm -f conftest*
8739 LIBS="$ac_save_LIBS"
8740
8741 fi
8742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8743   echo "$ac_t""yes" 1>&6
8744     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8745     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8746   cat >> confdefs.h <<EOF
8747 #define $ac_tr_lib 1
8748 EOF
8749
8750   LIBS="-lsec $LIBS"
8751
8752 else
8753   echo "$ac_t""no" 1>&6
8754 fi
8755  
8756      for ac_func in getprpwnam
8757 do
8758 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8759 echo "configure:8760: checking for $ac_func" >&5
8760 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8761   echo $ac_n "(cached) $ac_c" 1>&6
8762 else
8763   cat > conftest.$ac_ext <<EOF
8764 #line 8765 "configure"
8765 #include "confdefs.h"
8766 /* System header to define __stub macros and hopefully few prototypes,
8767     which can conflict with char $ac_func(); below.  */
8768 #include <assert.h>
8769 /* Override any gcc2 internal prototype to avoid an error.  */
8770 /* We use char because int might match the return type of a gcc2
8771     builtin and then its argument prototype would still apply.  */
8772 char $ac_func();
8773
8774 int main() {
8775
8776 /* The GNU C library defines this for functions which it implements
8777     to always fail with ENOSYS.  Some functions are actually named
8778     something starting with __ and the normal name is an alias.  */
8779 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8780 choke me
8781 #else
8782 $ac_func();
8783 #endif
8784
8785 ; return 0; }
8786 EOF
8787 if { (eval echo configure:8788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8788   rm -rf conftest*
8789   eval "ac_cv_func_$ac_func=yes"
8790 else
8791   echo "configure: failed program was:" >&5
8792   cat conftest.$ac_ext >&5
8793   rm -rf conftest*
8794   eval "ac_cv_func_$ac_func=no"
8795 fi
8796 rm -f conftest*
8797 fi
8798
8799 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8800   echo "$ac_t""yes" 1>&6
8801     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8802   cat >> confdefs.h <<EOF
8803 #define $ac_tr_func 1
8804 EOF
8805  
8806 else
8807   echo "$ac_t""no" 1>&6
8808 fi
8809 done
8810
8811   ;;
8812   esac
8813
8814
8815 # this bit needs to be modified for each OS that is suported by
8816 # smbwrapper. You need to specify how to created a shared library and
8817 # how to compile C code to produce PIC object files
8818
8819 # these are the defaults, good for lots of systems
8820 HOST_OS="$host_os"
8821 LDSHFLAGS="-shared"
8822 SONAMEFLAG="#"
8823 SHLD="\${CC}"
8824 PICFLAG=""
8825 PICSUFFIX="po"
8826 POBAD_CC="#"
8827 SHLIBEXT="so"
8828 # Assume non-shared by default and override below
8829 BLDSHARED="false"
8830 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8831 echo "configure:8832: checking ability to build shared libraries" >&5
8832
8833 # and these are for particular systems
8834 case "$host_os" in
8835                 *linux*)   cat >> confdefs.h <<\EOF
8836 #define LINUX 1
8837 EOF
8838
8839                         BLDSHARED="true"
8840                         LDSHFLAGS="-shared" 
8841                         DYNEXP="-Wl,--export-dynamic"
8842                         PICFLAG="-fPIC"
8843                         SONAMEFLAG="-Wl,-soname="
8844                         cat >> confdefs.h <<\EOF
8845 #define STAT_ST_BLOCKSIZE 512
8846 EOF
8847
8848                 ;;
8849                 *solaris*) cat >> confdefs.h <<\EOF
8850 #define SUNOS5 1
8851 EOF
8852
8853                         BLDSHARED="true"
8854                         LDSHFLAGS="-G"
8855                         SONAMEFLAG="-h "
8856                         if test "${GCC}" = "yes"; then
8857                                 PICFLAG="-fPIC"
8858                                 if test "${ac_cv_prog_gnu_ld}" = "yes"; then
8859                                         DYNEXP="-Wl,-E"
8860                                 fi
8861                         else
8862                                 PICFLAG="-KPIC"
8863                                 ## ${CFLAGS} added for building 64-bit shared 
8864                                 ## libs using Sun's Compiler
8865                                 LDSHFLAGS="-G \${CFLAGS}"
8866                                 POBAD_CC=""
8867                                 PICSUFFIX="po.o"
8868                         fi
8869                         cat >> confdefs.h <<\EOF
8870 #define STAT_ST_BLOCKSIZE 512
8871 EOF
8872
8873                 ;;
8874                 *sunos*) cat >> confdefs.h <<\EOF
8875 #define SUNOS4 1
8876 EOF
8877
8878                         BLDSHARED="true"
8879                         LDSHFLAGS="-G"
8880                         SONAMEFLAG="-Wl,-h,"
8881                         PICFLAG="-KPIC"   # Is this correct for SunOS
8882                 ;;
8883                 *bsd*)  BLDSHARED="true"
8884                         LDSHFLAGS="-shared"
8885                         DYNEXP="-Wl,-Bdynamic"
8886                         SONAMEFLAG="-Wl,-soname,"
8887                         PICFLAG="-fPIC"
8888                         cat >> confdefs.h <<\EOF
8889 #define STAT_ST_BLOCKSIZE 512
8890 EOF
8891
8892                 ;;
8893                 *irix*) cat >> confdefs.h <<\EOF
8894 #define IRIX 1
8895 EOF
8896
8897                         case "$host_os" in
8898                         *irix6*) cat >> confdefs.h <<\EOF
8899 #define IRIX6 1
8900 EOF
8901
8902                         ;;
8903                         esac
8904                         ATTEMPT_WRAP32_BUILD=yes
8905                         BLDSHARED="true"
8906                         LDSHFLAGS="-set_version sgi1.0 -shared"
8907                         SONAMEFLAG="-soname "
8908                         SHLD="\${LD}"
8909                         if test "${GCC}" = "yes"; then
8910                                 PICFLAG="-fPIC"
8911                         else 
8912                                 PICFLAG="-KPIC"
8913                         fi
8914                         cat >> confdefs.h <<\EOF
8915 #define STAT_ST_BLOCKSIZE 512
8916 EOF
8917
8918                 ;;
8919                 *aix*) cat >> confdefs.h <<\EOF
8920 #define AIX 1
8921 EOF
8922
8923                         BLDSHARED="true"
8924                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8925                         DYNEXP="-Wl,-brtl,-bexpall"
8926                         if test "${GCC}" = "yes"; then
8927                                 PICFLAG="-O2"
8928                         else
8929                         PICFLAG="-O2 -qmaxmem=6000"
8930                                 ## for funky AIX compiler using strncpy()
8931                                 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
8932                         fi
8933
8934                         cat >> confdefs.h <<\EOF
8935 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8936 EOF
8937
8938                 ;;
8939                 *hpux*) cat >> confdefs.h <<\EOF
8940 #define HPUX 1
8941 EOF
8942
8943                         SHLIBEXT="sl"
8944                         # Use special PIC flags for the native HP-UX compiler.
8945                         if test $ac_cv_prog_cc_Ae = yes; then
8946                                 BLDSHARED="true"
8947                                 SHLD="/usr/bin/ld"
8948                                 LDSHFLAGS="-B symbolic -b -z"
8949                                 SONAMEFLAG="+h "
8950                                 PICFLAG="+z"
8951                         fi
8952                         DYNEXP="-Wl,-E"
8953                         cat >> confdefs.h <<\EOF
8954 #define STAT_ST_BLOCKSIZE 8192
8955 EOF
8956
8957                 ;;
8958                 *qnx*) cat >> confdefs.h <<\EOF
8959 #define QNX 1
8960 EOF
8961 ;;
8962                 *osf*) cat >> confdefs.h <<\EOF
8963 #define OSF1 1
8964 EOF
8965
8966                         BLDSHARED="true"
8967                         LDSHFLAGS="-shared"
8968                         SONAMEFLAG="-Wl,-soname,"
8969                         PICFLAG="-fPIC"
8970                 ;;
8971                 *sco*) cat >> confdefs.h <<\EOF
8972 #define SCO 1
8973 EOF
8974 ;;
8975                 *unixware*) cat >> confdefs.h <<\EOF
8976 #define UNIXWARE 1
8977 EOF
8978
8979                         BLDSHARED="true"
8980                         LDSHFLAGS="-shared"
8981                         SONAMEFLAG="-Wl,-soname,"
8982                         PICFLAG="-KPIC"
8983                 ;;
8984                 *next2*) cat >> confdefs.h <<\EOF
8985 #define NEXT2 1
8986 EOF
8987 ;;
8988                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8989 set dummy groff; ac_word=$2
8990 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8991 echo "configure:8992: checking for $ac_word" >&5
8992 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8993   echo $ac_n "(cached) $ac_c" 1>&6
8994 else
8995   if test -n "$ROFF"; then
8996   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8997 else
8998   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8999   ac_dummy="$PATH"
9000   for ac_dir in $ac_dummy; do
9001     test -z "$ac_dir" && ac_dir=.
9002     if test -f $ac_dir/$ac_word; then
9003       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9004       break
9005     fi
9006   done
9007   IFS="$ac_save_ifs"
9008 fi
9009 fi
9010 ROFF="$ac_cv_prog_ROFF"
9011 if test -n "$ROFF"; then
9012   echo "$ac_t""$ROFF" 1>&6
9013 else
9014   echo "$ac_t""no" 1>&6
9015 fi
9016 ;;
9017                 *sysv4*)
9018                         case "$host" in
9019                                 *-univel-*)     if  test "$GCC" != yes ; then
9020                                                 cat >> confdefs.h <<\EOF
9021 #define HAVE_MEMSET 1
9022 EOF
9023
9024                                         fi
9025                                         LDSHFLAGS="-G"
9026                                         DYNEXP="-Bexport"
9027                                 ;;
9028                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
9029 #define RELIANTUNIX 1
9030 EOF
9031 ;;
9032                         esac
9033                 ;;
9034
9035                 *sysv5*)
9036                         if  test "$GCC" != yes ; then
9037                                 cat >> confdefs.h <<\EOF
9038 #define HAVE_MEMSET 1
9039 EOF
9040
9041                         fi
9042                         LDSHFLAGS="-G"
9043                 ;;
9044 esac
9045
9046 echo "$ac_t""$BLDSHARED" 1>&6
9047 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9048 echo "configure:9049: checking linker flags for shared libraries" >&5
9049 echo "$ac_t""$LDSHFLAGS" 1>&6
9050 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9051 echo "configure:9052: checking compiler flags for position-independent code" >&5
9052 echo "$ac_t""$PICFLAGS" 1>&6
9053
9054 #######################################################
9055 # test whether building a shared library actually works
9056 if test $BLDSHARED = true; then
9057 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9058 echo "configure:9059: checking whether building shared libraries actually works" >&5
9059 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9060   echo $ac_n "(cached) $ac_c" 1>&6
9061 else
9062   
9063    ac_cv_shlib_works=no
9064    # try building a trivial shared library
9065    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9066      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9067      ac_cv_shlib_works=yes
9068    rm -f shlib.so shlib.po
9069
9070 fi
9071
9072 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9073 if test $ac_cv_shlib_works = no; then
9074    BLDSHARED=false
9075 fi
9076 fi
9077
9078
9079 # this updates our target list if we can build shared libs
9080 if test $BLDSHARED = true; then
9081    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9082 else
9083    LIBSMBCLIENT_SHARED=
9084 fi
9085
9086 ################
9087
9088 echo $ac_n "checking for long long""... $ac_c" 1>&6
9089 echo "configure:9090: checking for long long" >&5
9090 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9091   echo $ac_n "(cached) $ac_c" 1>&6
9092 else
9093   
9094 if test "$cross_compiling" = yes; then
9095   samba_cv_have_longlong=cross
9096 else
9097   cat > conftest.$ac_ext <<EOF
9098 #line 9099 "configure"
9099 #include "confdefs.h"
9100 #include <stdio.h>
9101 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9102 EOF
9103 if { (eval echo configure:9104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9104 then
9105   samba_cv_have_longlong=yes
9106 else
9107   echo "configure: failed program was:" >&5
9108   cat conftest.$ac_ext >&5
9109   rm -fr conftest*
9110   samba_cv_have_longlong=no
9111 fi
9112 rm -fr conftest*
9113 fi
9114
9115 fi
9116
9117 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9118 if test x"$samba_cv_have_longlong" = x"yes"; then
9119     cat >> confdefs.h <<\EOF
9120 #define HAVE_LONGLONG 1
9121 EOF
9122
9123 fi
9124
9125 #
9126 # Check if the compiler supports the LL prefix on long long integers.
9127 # AIX needs this.
9128
9129 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9130 echo "configure:9131: checking for LL suffix on long long integers" >&5
9131 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9132   echo $ac_n "(cached) $ac_c" 1>&6
9133 else
9134   
9135     cat > conftest.$ac_ext <<EOF
9136 #line 9137 "configure"
9137 #include "confdefs.h"
9138 #include <stdio.h>
9139 int main() {
9140 long long i = 0x8000000000LL
9141 ; return 0; }
9142 EOF
9143 if { (eval echo configure:9144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9144   rm -rf conftest*
9145   samba_cv_compiler_supports_ll=yes
9146 else
9147   echo "configure: failed program was:" >&5
9148   cat conftest.$ac_ext >&5
9149   rm -rf conftest*
9150   samba_cv_compiler_supports_ll=no
9151 fi
9152 rm -f conftest*
9153 fi
9154
9155 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9156 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9157    cat >> confdefs.h <<\EOF
9158 #define COMPILER_SUPPORTS_LL 1
9159 EOF
9160
9161 fi
9162
9163   
9164 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9165 echo "configure:9166: checking for 64 bit off_t" >&5
9166 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9167   echo $ac_n "(cached) $ac_c" 1>&6
9168 else
9169   
9170 if test "$cross_compiling" = yes; then
9171   samba_cv_SIZEOF_OFF_T=cross
9172 else
9173   cat > conftest.$ac_ext <<EOF
9174 #line 9175 "configure"
9175 #include "confdefs.h"
9176 #include <stdio.h>
9177 #include <sys/stat.h>
9178 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9179 EOF
9180 if { (eval echo configure:9181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9181 then
9182   samba_cv_SIZEOF_OFF_T=yes
9183 else
9184   echo "configure: failed program was:" >&5
9185   cat conftest.$ac_ext >&5
9186   rm -fr conftest*
9187   samba_cv_SIZEOF_OFF_T=no
9188 fi
9189 rm -fr conftest*
9190 fi
9191
9192 fi
9193
9194 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9195 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9196     cat >> confdefs.h <<\EOF
9197 #define SIZEOF_OFF_T 8
9198 EOF
9199
9200 fi
9201
9202 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9203 echo "configure:9204: checking for off64_t" >&5
9204 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9205   echo $ac_n "(cached) $ac_c" 1>&6
9206 else
9207   
9208 if test "$cross_compiling" = yes; then
9209   samba_cv_HAVE_OFF64_T=cross
9210 else
9211   cat > conftest.$ac_ext <<EOF
9212 #line 9213 "configure"
9213 #include "confdefs.h"
9214
9215 #if defined(HAVE_UNISTD_H)
9216 #include <unistd.h>
9217 #endif
9218 #include <stdio.h>
9219 #include <sys/stat.h>
9220 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9221 EOF
9222 if { (eval echo configure:9223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9223 then
9224   samba_cv_HAVE_OFF64_T=yes
9225 else
9226   echo "configure: failed program was:" >&5
9227   cat conftest.$ac_ext >&5
9228   rm -fr conftest*
9229   samba_cv_HAVE_OFF64_T=no
9230 fi
9231 rm -fr conftest*
9232 fi
9233
9234 fi
9235
9236 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9237 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9238     cat >> confdefs.h <<\EOF
9239 #define HAVE_OFF64_T 1
9240 EOF
9241
9242 fi
9243
9244 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9245 echo "configure:9246: checking for 64 bit ino_t" >&5
9246 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9247   echo $ac_n "(cached) $ac_c" 1>&6
9248 else
9249   
9250 if test "$cross_compiling" = yes; then
9251   samba_cv_SIZEOF_INO_T=cross
9252 else
9253   cat > conftest.$ac_ext <<EOF
9254 #line 9255 "configure"
9255 #include "confdefs.h"
9256 #include <stdio.h>
9257 #include <sys/stat.h>
9258 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9259 EOF
9260 if { (eval echo configure:9261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9261 then
9262   samba_cv_SIZEOF_INO_T=yes
9263 else
9264   echo "configure: failed program was:" >&5
9265   cat conftest.$ac_ext >&5
9266   rm -fr conftest*
9267   samba_cv_SIZEOF_INO_T=no
9268 fi
9269 rm -fr conftest*
9270 fi
9271
9272 fi
9273
9274 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9275 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9276     cat >> confdefs.h <<\EOF
9277 #define SIZEOF_INO_T 8
9278 EOF
9279
9280 fi
9281
9282 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9283 echo "configure:9284: checking for ino64_t" >&5
9284 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9285   echo $ac_n "(cached) $ac_c" 1>&6
9286 else
9287   
9288 if test "$cross_compiling" = yes; then
9289   samba_cv_HAVE_INO64_T=cross
9290 else
9291   cat > conftest.$ac_ext <<EOF
9292 #line 9293 "configure"
9293 #include "confdefs.h"
9294
9295 #if defined(HAVE_UNISTD_H)
9296 #include <unistd.h>
9297 #endif
9298 #include <stdio.h>
9299 #include <sys/stat.h>
9300 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9301 EOF
9302 if { (eval echo configure:9303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9303 then
9304   samba_cv_HAVE_INO64_T=yes
9305 else
9306   echo "configure: failed program was:" >&5
9307   cat conftest.$ac_ext >&5
9308   rm -fr conftest*
9309   samba_cv_HAVE_INO64_T=no
9310 fi
9311 rm -fr conftest*
9312 fi
9313
9314 fi
9315
9316 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9317 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9318     cat >> confdefs.h <<\EOF
9319 #define HAVE_INO64_T 1
9320 EOF
9321
9322 fi
9323
9324 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9325 echo "configure:9326: checking for dev64_t" >&5
9326 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9327   echo $ac_n "(cached) $ac_c" 1>&6
9328 else
9329   
9330 if test "$cross_compiling" = yes; then
9331   samba_cv_HAVE_DEV64_T=cross
9332 else
9333   cat > conftest.$ac_ext <<EOF
9334 #line 9335 "configure"
9335 #include "confdefs.h"
9336
9337 #if defined(HAVE_UNISTD_H)
9338 #include <unistd.h>
9339 #endif
9340 #include <stdio.h>
9341 #include <sys/stat.h>
9342 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9343 EOF
9344 if { (eval echo configure:9345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9345 then
9346   samba_cv_HAVE_DEV64_T=yes
9347 else
9348   echo "configure: failed program was:" >&5
9349   cat conftest.$ac_ext >&5
9350   rm -fr conftest*
9351   samba_cv_HAVE_DEV64_T=no
9352 fi
9353 rm -fr conftest*
9354 fi
9355
9356 fi
9357
9358 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9359 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9360     cat >> confdefs.h <<\EOF
9361 #define HAVE_DEV64_T 1
9362 EOF
9363
9364 fi
9365
9366 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9367 echo "configure:9368: checking for struct dirent64" >&5
9368 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9369   echo $ac_n "(cached) $ac_c" 1>&6
9370 else
9371   
9372 cat > conftest.$ac_ext <<EOF
9373 #line 9374 "configure"
9374 #include "confdefs.h"
9375
9376 #if defined(HAVE_UNISTD_H)
9377 #include <unistd.h>
9378 #endif
9379 #include <sys/types.h>
9380 #include <dirent.h>
9381 int main() {
9382 struct dirent64 de;
9383 ; return 0; }
9384 EOF
9385 if { (eval echo configure:9386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9386   rm -rf conftest*
9387   samba_cv_HAVE_STRUCT_DIRENT64=yes
9388 else
9389   echo "configure: failed program was:" >&5
9390   cat conftest.$ac_ext >&5
9391   rm -rf conftest*
9392   samba_cv_HAVE_STRUCT_DIRENT64=no
9393 fi
9394 rm -f conftest*
9395 fi
9396
9397 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9398 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
9399     cat >> confdefs.h <<\EOF
9400 #define HAVE_STRUCT_DIRENT64 1
9401 EOF
9402
9403 fi
9404
9405 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9406 echo "configure:9407: checking for major macro" >&5
9407 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9408   echo $ac_n "(cached) $ac_c" 1>&6
9409 else
9410   
9411 if test "$cross_compiling" = yes; then
9412   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9413 else
9414   cat > conftest.$ac_ext <<EOF
9415 #line 9416 "configure"
9416 #include "confdefs.h"
9417
9418 #if defined(HAVE_UNISTD_H)
9419 #include <unistd.h>
9420 #endif
9421 #include <sys/types.h>
9422 main() { dev_t dev; int i = major(dev); return 0; }
9423 EOF
9424 if { (eval echo configure:9425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9425 then
9426   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9427 else
9428   echo "configure: failed program was:" >&5
9429   cat conftest.$ac_ext >&5
9430   rm -fr conftest*
9431   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9432 fi
9433 rm -fr conftest*
9434 fi
9435
9436 fi
9437
9438 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9439 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9440     cat >> confdefs.h <<\EOF
9441 #define HAVE_DEVICE_MAJOR_FN 1
9442 EOF
9443
9444 fi
9445
9446 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9447 echo "configure:9448: checking for minor macro" >&5
9448 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9449   echo $ac_n "(cached) $ac_c" 1>&6
9450 else
9451   
9452 if test "$cross_compiling" = yes; then
9453   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9454 else
9455   cat > conftest.$ac_ext <<EOF
9456 #line 9457 "configure"
9457 #include "confdefs.h"
9458
9459 #if defined(HAVE_UNISTD_H)
9460 #include <unistd.h>
9461 #endif
9462 #include <sys/types.h>
9463 main() { dev_t dev; int i = minor(dev); return 0; }
9464 EOF
9465 if { (eval echo configure:9466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9466 then
9467   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9468 else
9469   echo "configure: failed program was:" >&5
9470   cat conftest.$ac_ext >&5
9471   rm -fr conftest*
9472   samba_cv_HAVE_DEVICE_MINOR_FN=no
9473 fi
9474 rm -fr conftest*
9475 fi
9476
9477 fi
9478
9479 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9480 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9481     cat >> confdefs.h <<\EOF
9482 #define HAVE_DEVICE_MINOR_FN 1
9483 EOF
9484
9485 fi
9486
9487 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9488 echo "configure:9489: checking for unsigned char" >&5
9489 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9490   echo $ac_n "(cached) $ac_c" 1>&6
9491 else
9492   
9493 if test "$cross_compiling" = yes; then
9494   samba_cv_HAVE_UNSIGNED_CHAR=cross
9495 else
9496   cat > conftest.$ac_ext <<EOF
9497 #line 9498 "configure"
9498 #include "confdefs.h"
9499 #include <stdio.h>
9500 main() { char c; c=250; exit((c > 0)?0:1); }
9501 EOF
9502 if { (eval echo configure:9503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9503 then
9504   samba_cv_HAVE_UNSIGNED_CHAR=yes
9505 else
9506   echo "configure: failed program was:" >&5
9507   cat conftest.$ac_ext >&5
9508   rm -fr conftest*
9509   samba_cv_HAVE_UNSIGNED_CHAR=no
9510 fi
9511 rm -fr conftest*
9512 fi
9513
9514 fi
9515
9516 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9517 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9518     cat >> confdefs.h <<\EOF
9519 #define HAVE_UNSIGNED_CHAR 1
9520 EOF
9521
9522 fi
9523
9524 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9525 echo "configure:9526: checking for sin_len in sock" >&5
9526 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9527   echo $ac_n "(cached) $ac_c" 1>&6
9528 else
9529   
9530 cat > conftest.$ac_ext <<EOF
9531 #line 9532 "configure"
9532 #include "confdefs.h"
9533 #include <sys/types.h>
9534 #include <sys/socket.h>
9535 #include <netinet/in.h>
9536 int main() {
9537 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9538 ; return 0; }
9539 EOF
9540 if { (eval echo configure:9541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9541   rm -rf conftest*
9542   samba_cv_HAVE_SOCK_SIN_LEN=yes
9543 else
9544   echo "configure: failed program was:" >&5
9545   cat conftest.$ac_ext >&5
9546   rm -rf conftest*
9547   samba_cv_HAVE_SOCK_SIN_LEN=no
9548 fi
9549 rm -f conftest*
9550 fi
9551
9552 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9553 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9554     cat >> confdefs.h <<\EOF
9555 #define HAVE_SOCK_SIN_LEN 1
9556 EOF
9557
9558 fi
9559
9560 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9561 echo "configure:9562: checking whether seekdir returns void" >&5
9562 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9563   echo $ac_n "(cached) $ac_c" 1>&6
9564 else
9565   
9566 cat > conftest.$ac_ext <<EOF
9567 #line 9568 "configure"
9568 #include "confdefs.h"
9569 #include <sys/types.h>
9570 #include <dirent.h>
9571 void seekdir(DIR *d, long loc) { return; }
9572 int main() {
9573 return 0;
9574 ; return 0; }
9575 EOF
9576 if { (eval echo configure:9577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9577   rm -rf conftest*
9578   samba_cv_SEEKDIR_RETURNS_VOID=yes
9579 else
9580   echo "configure: failed program was:" >&5
9581   cat conftest.$ac_ext >&5
9582   rm -rf conftest*
9583   samba_cv_SEEKDIR_RETURNS_VOID=no
9584 fi
9585 rm -f conftest*
9586 fi
9587
9588 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9589 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9590     cat >> confdefs.h <<\EOF
9591 #define SEEKDIR_RETURNS_VOID 1
9592 EOF
9593
9594 fi
9595
9596 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9597 echo "configure:9598: checking for __FILE__ macro" >&5
9598 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9599   echo $ac_n "(cached) $ac_c" 1>&6
9600 else
9601   
9602 cat > conftest.$ac_ext <<EOF
9603 #line 9604 "configure"
9604 #include "confdefs.h"
9605 #include <stdio.h>
9606 int main() {
9607 printf("%s\n", __FILE__);
9608 ; return 0; }
9609 EOF
9610 if { (eval echo configure:9611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9611   rm -rf conftest*
9612   samba_cv_HAVE_FILE_MACRO=yes
9613 else
9614   echo "configure: failed program was:" >&5
9615   cat conftest.$ac_ext >&5
9616   rm -rf conftest*
9617   samba_cv_HAVE_FILE_MACRO=no
9618 fi
9619 rm -f conftest*
9620 fi
9621
9622 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9623 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9624     cat >> confdefs.h <<\EOF
9625 #define HAVE_FILE_MACRO 1
9626 EOF
9627
9628 fi
9629
9630 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9631 echo "configure:9632: checking for __FUNCTION__ macro" >&5
9632 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9633   echo $ac_n "(cached) $ac_c" 1>&6
9634 else
9635   
9636 cat > conftest.$ac_ext <<EOF
9637 #line 9638 "configure"
9638 #include "confdefs.h"
9639 #include <stdio.h>
9640 int main() {
9641 printf("%s\n", __FUNCTION__);
9642 ; return 0; }
9643 EOF
9644 if { (eval echo configure:9645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9645   rm -rf conftest*
9646   samba_cv_HAVE_FUNCTION_MACRO=yes
9647 else
9648   echo "configure: failed program was:" >&5
9649   cat conftest.$ac_ext >&5
9650   rm -rf conftest*
9651   samba_cv_HAVE_FUNCTION_MACRO=no
9652 fi
9653 rm -f conftest*
9654 fi
9655
9656 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9657 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9658     cat >> confdefs.h <<\EOF
9659 #define HAVE_FUNCTION_MACRO 1
9660 EOF
9661
9662 fi
9663
9664 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9665 echo "configure:9666: checking if gettimeofday takes tz argument" >&5
9666 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9667   echo $ac_n "(cached) $ac_c" 1>&6
9668 else
9669   
9670 if test "$cross_compiling" = yes; then
9671   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9672 else
9673   cat > conftest.$ac_ext <<EOF
9674 #line 9675 "configure"
9675 #include "confdefs.h"
9676
9677 #include <sys/time.h>
9678 #include <unistd.h>
9679 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9680 EOF
9681 if { (eval echo configure:9682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9682 then
9683   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9684 else
9685   echo "configure: failed program was:" >&5
9686   cat conftest.$ac_ext >&5
9687   rm -fr conftest*
9688   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9689 fi
9690 rm -fr conftest*
9691 fi
9692
9693 fi
9694
9695 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9696 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9697     cat >> confdefs.h <<\EOF
9698 #define HAVE_GETTIMEOFDAY_TZ 1
9699 EOF
9700
9701 fi
9702
9703 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9704 echo "configure:9705: checking for __va_copy" >&5
9705 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9706   echo $ac_n "(cached) $ac_c" 1>&6
9707 else
9708   
9709 cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 #include <stdarg.h>
9713 va_list ap1,ap2;
9714 int main() {
9715 __va_copy(ap1,ap2);
9716 ; return 0; }
9717 EOF
9718 if { (eval echo configure:9719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9719   rm -rf conftest*
9720   samba_cv_HAVE_VA_COPY=yes
9721 else
9722   echo "configure: failed program was:" >&5
9723   cat conftest.$ac_ext >&5
9724   rm -rf conftest*
9725   samba_cv_HAVE_VA_COPY=no
9726 fi
9727 rm -f conftest*
9728 fi
9729
9730 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9731 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9732     cat >> confdefs.h <<\EOF
9733 #define HAVE_VA_COPY 1
9734 EOF
9735
9736 fi
9737
9738 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9739 echo "configure:9740: checking for C99 vsnprintf" >&5
9740 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9741   echo $ac_n "(cached) $ac_c" 1>&6
9742 else
9743   
9744 if test "$cross_compiling" = yes; then
9745   samba_cv_HAVE_C99_VSNPRINTF=cross
9746 else
9747   cat > conftest.$ac_ext <<EOF
9748 #line 9749 "configure"
9749 #include "confdefs.h"
9750
9751 #include <sys/types.h>
9752 #include <stdarg.h>
9753 void foo(const char *format, ...) { 
9754        va_list ap;
9755        int len;
9756        char buf[5];
9757
9758        va_start(ap, format);
9759        len = vsnprintf(buf, 0, format, ap);
9760        va_end(ap);
9761        if (len != 5) exit(1);
9762
9763        va_start(ap, format);
9764        len = vsnprintf(0, 0, format, ap);
9765        va_end(ap);
9766        if (len != 5) exit(1);
9767
9768        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9769
9770        exit(0);
9771 }
9772 main() { foo("hello"); }
9773
9774 EOF
9775 if { (eval echo configure:9776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9776 then
9777   samba_cv_HAVE_C99_VSNPRINTF=yes
9778 else
9779   echo "configure: failed program was:" >&5
9780   cat conftest.$ac_ext >&5
9781   rm -fr conftest*
9782   samba_cv_HAVE_C99_VSNPRINTF=no
9783 fi
9784 rm -fr conftest*
9785 fi
9786
9787 fi
9788
9789 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9790 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9791     cat >> confdefs.h <<\EOF
9792 #define HAVE_C99_VSNPRINTF 1
9793 EOF
9794
9795 fi
9796
9797 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9798 echo "configure:9799: checking for broken readdir" >&5
9799 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9800   echo $ac_n "(cached) $ac_c" 1>&6
9801 else
9802   
9803 if test "$cross_compiling" = yes; then
9804   samba_cv_HAVE_BROKEN_READDIR=cross
9805 else
9806   cat > conftest.$ac_ext <<EOF
9807 #line 9808 "configure"
9808 #include "confdefs.h"
9809 #include <sys/types.h>
9810 #include <dirent.h>
9811 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9812 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9813 di->d_name[0] == 0) exit(0); exit(1);} 
9814 EOF
9815 if { (eval echo configure:9816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9816 then
9817   samba_cv_HAVE_BROKEN_READDIR=yes
9818 else
9819   echo "configure: failed program was:" >&5
9820   cat conftest.$ac_ext >&5
9821   rm -fr conftest*
9822   samba_cv_HAVE_BROKEN_READDIR=no
9823 fi
9824 rm -fr conftest*
9825 fi
9826
9827 fi
9828
9829 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9830 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9831     cat >> confdefs.h <<\EOF
9832 #define HAVE_BROKEN_READDIR 1
9833 EOF
9834
9835 fi
9836
9837 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9838 echo "configure:9839: checking for utimbuf" >&5
9839 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9840   echo $ac_n "(cached) $ac_c" 1>&6
9841 else
9842   
9843 cat > conftest.$ac_ext <<EOF
9844 #line 9845 "configure"
9845 #include "confdefs.h"
9846 #include <sys/types.h>
9847 #include <utime.h>
9848 int main() {
9849 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9850 ; return 0; }
9851 EOF
9852 if { (eval echo configure:9853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9853   rm -rf conftest*
9854   samba_cv_HAVE_UTIMBUF=yes
9855 else
9856   echo "configure: failed program was:" >&5
9857   cat conftest.$ac_ext >&5
9858   rm -rf conftest*
9859   samba_cv_HAVE_UTIMBUF=no
9860 fi
9861 rm -f conftest*
9862 fi
9863
9864 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9865 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9866     cat >> confdefs.h <<\EOF
9867 #define HAVE_UTIMBUF 1
9868 EOF
9869
9870 fi
9871
9872
9873 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9874 do
9875 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9876 echo "configure:9877: checking for $ac_func" >&5
9877 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9878   echo $ac_n "(cached) $ac_c" 1>&6
9879 else
9880   cat > conftest.$ac_ext <<EOF
9881 #line 9882 "configure"
9882 #include "confdefs.h"
9883 /* System header to define __stub macros and hopefully few prototypes,
9884     which can conflict with char $ac_func(); below.  */
9885 #include <assert.h>
9886 /* Override any gcc2 internal prototype to avoid an error.  */
9887 /* We use char because int might match the return type of a gcc2
9888     builtin and then its argument prototype would still apply.  */
9889 char $ac_func();
9890
9891 int main() {
9892
9893 /* The GNU C library defines this for functions which it implements
9894     to always fail with ENOSYS.  Some functions are actually named
9895     something starting with __ and the normal name is an alias.  */
9896 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9897 choke me
9898 #else
9899 $ac_func();
9900 #endif
9901
9902 ; return 0; }
9903 EOF
9904 if { (eval echo configure:9905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9905   rm -rf conftest*
9906   eval "ac_cv_func_$ac_func=yes"
9907 else
9908   echo "configure: failed program was:" >&5
9909   cat conftest.$ac_ext >&5
9910   rm -rf conftest*
9911   eval "ac_cv_func_$ac_func=no"
9912 fi
9913 rm -f conftest*
9914 fi
9915
9916 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9917   echo "$ac_t""yes" 1>&6
9918     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9919   cat >> confdefs.h <<EOF
9920 #define $ac_tr_func 1
9921 EOF
9922  
9923 else
9924   echo "$ac_t""no" 1>&6
9925 fi
9926 done
9927
9928
9929 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9930 echo "configure:9931: checking for ut_name in utmp" >&5
9931 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9932   echo $ac_n "(cached) $ac_c" 1>&6
9933 else
9934   
9935 cat > conftest.$ac_ext <<EOF
9936 #line 9937 "configure"
9937 #include "confdefs.h"
9938 #include <sys/types.h>
9939 #include <utmp.h>
9940 int main() {
9941 struct utmp ut;  ut.ut_name[0] = 'a';
9942 ; return 0; }
9943 EOF
9944 if { (eval echo configure:9945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9945   rm -rf conftest*
9946   samba_cv_HAVE_UT_UT_NAME=yes
9947 else
9948   echo "configure: failed program was:" >&5
9949   cat conftest.$ac_ext >&5
9950   rm -rf conftest*
9951   samba_cv_HAVE_UT_UT_NAME=no
9952 fi
9953 rm -f conftest*
9954 fi
9955
9956 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9957 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9958     cat >> confdefs.h <<\EOF
9959 #define HAVE_UT_UT_NAME 1
9960 EOF
9961
9962 fi 
9963
9964 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9965 echo "configure:9966: checking for ut_user in utmp" >&5
9966 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9967   echo $ac_n "(cached) $ac_c" 1>&6
9968 else
9969   
9970 cat > conftest.$ac_ext <<EOF
9971 #line 9972 "configure"
9972 #include "confdefs.h"
9973 #include <sys/types.h>
9974 #include <utmp.h>
9975 int main() {
9976 struct utmp ut;  ut.ut_user[0] = 'a';
9977 ; return 0; }
9978 EOF
9979 if { (eval echo configure:9980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9980   rm -rf conftest*
9981   samba_cv_HAVE_UT_UT_USER=yes
9982 else
9983   echo "configure: failed program was:" >&5
9984   cat conftest.$ac_ext >&5
9985   rm -rf conftest*
9986   samba_cv_HAVE_UT_UT_USER=no
9987 fi
9988 rm -f conftest*
9989 fi
9990
9991 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9992 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9993     cat >> confdefs.h <<\EOF
9994 #define HAVE_UT_UT_USER 1
9995 EOF
9996
9997 fi 
9998
9999 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
10000 echo "configure:10001: checking for ut_id in utmp" >&5
10001 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
10002   echo $ac_n "(cached) $ac_c" 1>&6
10003 else
10004   
10005 cat > conftest.$ac_ext <<EOF
10006 #line 10007 "configure"
10007 #include "confdefs.h"
10008 #include <sys/types.h>
10009 #include <utmp.h>
10010 int main() {
10011 struct utmp ut;  ut.ut_id[0] = 'a';
10012 ; return 0; }
10013 EOF
10014 if { (eval echo configure:10015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10015   rm -rf conftest*
10016   samba_cv_HAVE_UT_UT_ID=yes
10017 else
10018   echo "configure: failed program was:" >&5
10019   cat conftest.$ac_ext >&5
10020   rm -rf conftest*
10021   samba_cv_HAVE_UT_UT_ID=no
10022 fi
10023 rm -f conftest*
10024 fi
10025
10026 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10027 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10028     cat >> confdefs.h <<\EOF
10029 #define HAVE_UT_UT_ID 1
10030 EOF
10031
10032 fi 
10033
10034 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10035 echo "configure:10036: checking for ut_host in utmp" >&5
10036 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10037   echo $ac_n "(cached) $ac_c" 1>&6
10038 else
10039   
10040 cat > conftest.$ac_ext <<EOF
10041 #line 10042 "configure"
10042 #include "confdefs.h"
10043 #include <sys/types.h>
10044 #include <utmp.h>
10045 int main() {
10046 struct utmp ut;  ut.ut_host[0] = 'a';
10047 ; return 0; }
10048 EOF
10049 if { (eval echo configure:10050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10050   rm -rf conftest*
10051   samba_cv_HAVE_UT_UT_HOST=yes
10052 else
10053   echo "configure: failed program was:" >&5
10054   cat conftest.$ac_ext >&5
10055   rm -rf conftest*
10056   samba_cv_HAVE_UT_UT_HOST=no
10057 fi
10058 rm -f conftest*
10059 fi
10060
10061 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10062 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10063     cat >> confdefs.h <<\EOF
10064 #define HAVE_UT_UT_HOST 1
10065 EOF
10066
10067 fi 
10068
10069 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10070 echo "configure:10071: checking for ut_time in utmp" >&5
10071 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10072   echo $ac_n "(cached) $ac_c" 1>&6
10073 else
10074   
10075 cat > conftest.$ac_ext <<EOF
10076 #line 10077 "configure"
10077 #include "confdefs.h"
10078 #include <sys/types.h>
10079 #include <utmp.h>
10080 int main() {
10081 struct utmp ut;  time_t t; ut.ut_time = t;
10082 ; return 0; }
10083 EOF
10084 if { (eval echo configure:10085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10085   rm -rf conftest*
10086   samba_cv_HAVE_UT_UT_TIME=yes
10087 else
10088   echo "configure: failed program was:" >&5
10089   cat conftest.$ac_ext >&5
10090   rm -rf conftest*
10091   samba_cv_HAVE_UT_UT_TIME=no
10092 fi
10093 rm -f conftest*
10094 fi
10095
10096 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10097 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10098     cat >> confdefs.h <<\EOF
10099 #define HAVE_UT_UT_TIME 1
10100 EOF
10101
10102 fi 
10103
10104 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10105 echo "configure:10106: checking for ut_tv in utmp" >&5
10106 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10107   echo $ac_n "(cached) $ac_c" 1>&6
10108 else
10109   
10110 cat > conftest.$ac_ext <<EOF
10111 #line 10112 "configure"
10112 #include "confdefs.h"
10113 #include <sys/types.h>
10114 #include <utmp.h>
10115 int main() {
10116 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10117 ; return 0; }
10118 EOF
10119 if { (eval echo configure:10120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10120   rm -rf conftest*
10121   samba_cv_HAVE_UT_UT_TV=yes
10122 else
10123   echo "configure: failed program was:" >&5
10124   cat conftest.$ac_ext >&5
10125   rm -rf conftest*
10126   samba_cv_HAVE_UT_UT_TV=no
10127 fi
10128 rm -f conftest*
10129 fi
10130
10131 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10132 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10133     cat >> confdefs.h <<\EOF
10134 #define HAVE_UT_UT_TV 1
10135 EOF
10136
10137 fi 
10138
10139 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10140 echo "configure:10141: checking for ut_type in utmp" >&5
10141 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10142   echo $ac_n "(cached) $ac_c" 1>&6
10143 else
10144   
10145 cat > conftest.$ac_ext <<EOF
10146 #line 10147 "configure"
10147 #include "confdefs.h"
10148 #include <sys/types.h>
10149 #include <utmp.h>
10150 int main() {
10151 struct utmp ut;  ut.ut_type = 0;
10152 ; return 0; }
10153 EOF
10154 if { (eval echo configure:10155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10155   rm -rf conftest*
10156   samba_cv_HAVE_UT_UT_TYPE=yes
10157 else
10158   echo "configure: failed program was:" >&5
10159   cat conftest.$ac_ext >&5
10160   rm -rf conftest*
10161   samba_cv_HAVE_UT_UT_TYPE=no
10162 fi
10163 rm -f conftest*
10164 fi
10165
10166 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10167 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10168     cat >> confdefs.h <<\EOF
10169 #define HAVE_UT_UT_TYPE 1
10170 EOF
10171
10172 fi 
10173
10174 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10175 echo "configure:10176: checking for ut_pid in utmp" >&5
10176 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10177   echo $ac_n "(cached) $ac_c" 1>&6
10178 else
10179   
10180 cat > conftest.$ac_ext <<EOF
10181 #line 10182 "configure"
10182 #include "confdefs.h"
10183 #include <sys/types.h>
10184 #include <utmp.h>
10185 int main() {
10186 struct utmp ut;  ut.ut_pid = 0;
10187 ; return 0; }
10188 EOF
10189 if { (eval echo configure:10190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10190   rm -rf conftest*
10191   samba_cv_HAVE_UT_UT_PID=yes
10192 else
10193   echo "configure: failed program was:" >&5
10194   cat conftest.$ac_ext >&5
10195   rm -rf conftest*
10196   samba_cv_HAVE_UT_UT_PID=no
10197 fi
10198 rm -f conftest*
10199 fi
10200
10201 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10202 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10203     cat >> confdefs.h <<\EOF
10204 #define HAVE_UT_UT_PID 1
10205 EOF
10206
10207 fi 
10208
10209 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10210 echo "configure:10211: checking for ut_exit in utmp" >&5
10211 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10212   echo $ac_n "(cached) $ac_c" 1>&6
10213 else
10214   
10215 cat > conftest.$ac_ext <<EOF
10216 #line 10217 "configure"
10217 #include "confdefs.h"
10218 #include <sys/types.h>
10219 #include <utmp.h>
10220 int main() {
10221 struct utmp ut;  ut.ut_exit.e_exit = 0;
10222 ; return 0; }
10223 EOF
10224 if { (eval echo configure:10225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10225   rm -rf conftest*
10226   samba_cv_HAVE_UT_UT_EXIT=yes
10227 else
10228   echo "configure: failed program was:" >&5
10229   cat conftest.$ac_ext >&5
10230   rm -rf conftest*
10231   samba_cv_HAVE_UT_UT_EXIT=no
10232 fi
10233 rm -f conftest*
10234 fi
10235
10236 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10237 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10238     cat >> confdefs.h <<\EOF
10239 #define HAVE_UT_UT_EXIT 1
10240 EOF
10241
10242 fi 
10243
10244 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10245 echo "configure:10246: checking for ut_addr in utmp" >&5
10246 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10247   echo $ac_n "(cached) $ac_c" 1>&6
10248 else
10249   
10250 cat > conftest.$ac_ext <<EOF
10251 #line 10252 "configure"
10252 #include "confdefs.h"
10253 #include <sys/types.h>
10254 #include <utmp.h>
10255 int main() {
10256 struct utmp ut;  ut.ut_addr = 0;
10257 ; return 0; }
10258 EOF
10259 if { (eval echo configure:10260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10260   rm -rf conftest*
10261   samba_cv_HAVE_UT_UT_ADDR=yes
10262 else
10263   echo "configure: failed program was:" >&5
10264   cat conftest.$ac_ext >&5
10265   rm -rf conftest*
10266   samba_cv_HAVE_UT_UT_ADDR=no
10267 fi
10268 rm -f conftest*
10269 fi
10270
10271 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10272 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10273     cat >> confdefs.h <<\EOF
10274 #define HAVE_UT_UT_ADDR 1
10275 EOF
10276
10277 fi 
10278
10279 if test x$ac_cv_func_pututline = xyes ; then
10280   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10281 echo "configure:10282: checking whether pututline returns pointer" >&5
10282 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10283   echo $ac_n "(cached) $ac_c" 1>&6
10284 else
10285   
10286   cat > conftest.$ac_ext <<EOF
10287 #line 10288 "configure"
10288 #include "confdefs.h"
10289 #include <sys/types.h>
10290 #include <utmp.h>
10291 int main() {
10292 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10293 ; return 0; }
10294 EOF
10295 if { (eval echo configure:10296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10296   rm -rf conftest*
10297   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10298 else
10299   echo "configure: failed program was:" >&5
10300   cat conftest.$ac_ext >&5
10301   rm -rf conftest*
10302   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10303 fi
10304 rm -f conftest*
10305 fi
10306
10307 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10308   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10309       cat >> confdefs.h <<\EOF
10310 #define PUTUTLINE_RETURNS_UTMP 1
10311 EOF
10312
10313   fi
10314 fi
10315
10316 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10317 echo "configure:10318: checking for ut_syslen in utmpx" >&5
10318 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10319   echo $ac_n "(cached) $ac_c" 1>&6
10320 else
10321   
10322 cat > conftest.$ac_ext <<EOF
10323 #line 10324 "configure"
10324 #include "confdefs.h"
10325 #include <sys/types.h>
10326 #include <utmpx.h>
10327 int main() {
10328 struct utmpx ux;  ux.ut_syslen = 0;
10329 ; return 0; }
10330 EOF
10331 if { (eval echo configure:10332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10332   rm -rf conftest*
10333   samba_cv_HAVE_UX_UT_SYSLEN=yes
10334 else
10335   echo "configure: failed program was:" >&5
10336   cat conftest.$ac_ext >&5
10337   rm -rf conftest*
10338   samba_cv_HAVE_UX_UT_SYSLEN=no
10339 fi
10340 rm -f conftest*
10341 fi
10342
10343 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10344 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10345     cat >> confdefs.h <<\EOF
10346 #define HAVE_UX_UT_SYSLEN 1
10347 EOF
10348
10349 fi 
10350
10351
10352 #################################################
10353 # check for libiconv support
10354 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10355 echo "configure:10356: checking whether to use libiconv" >&5
10356 # Check whether --with-libiconv or --without-libiconv was given.
10357 if test "${with_libiconv+set}" = set; then
10358   withval="$with_libiconv"
10359    case "$withval" in
10360   no)
10361     echo "$ac_t""no" 1>&6
10362     ;;
10363   *)
10364     echo "$ac_t""yes" 1>&6
10365     CFLAGS="$CFLAGS -I$withval/include"
10366     LDFLAGS="$LDFLAGS -L$withval/lib"
10367     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10368 echo "configure:10369: checking for iconv_open in -liconv" >&5
10369 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10370 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10371   echo $ac_n "(cached) $ac_c" 1>&6
10372 else
10373   ac_save_LIBS="$LIBS"
10374 LIBS="-liconv  $LIBS"
10375 cat > conftest.$ac_ext <<EOF
10376 #line 10377 "configure"
10377 #include "confdefs.h"
10378 /* Override any gcc2 internal prototype to avoid an error.  */
10379 /* We use char because int might match the return type of a gcc2
10380     builtin and then its argument prototype would still apply.  */
10381 char iconv_open();
10382
10383 int main() {
10384 iconv_open()
10385 ; return 0; }
10386 EOF
10387 if { (eval echo configure:10388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10388   rm -rf conftest*
10389   eval "ac_cv_lib_$ac_lib_var=yes"
10390 else
10391   echo "configure: failed program was:" >&5
10392   cat conftest.$ac_ext >&5
10393   rm -rf conftest*
10394   eval "ac_cv_lib_$ac_lib_var=no"
10395 fi
10396 rm -f conftest*
10397 LIBS="$ac_save_LIBS"
10398
10399 fi
10400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10401   echo "$ac_t""yes" 1>&6
10402     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10403     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10404   cat >> confdefs.h <<EOF
10405 #define $ac_tr_lib 1
10406 EOF
10407
10408   LIBS="-liconv $LIBS"
10409
10410 else
10411   echo "$ac_t""no" 1>&6
10412 fi
10413
10414     cat >> confdefs.h <<EOF
10415 #define WITH_LIBICONV "${withval}"
10416 EOF
10417
10418     ;;
10419   esac 
10420 else
10421   echo "$ac_t""no" 1>&6
10422
10423 fi
10424
10425
10426
10427 ############
10428 # check for iconv in libc
10429 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10430 echo "configure:10431: checking for working iconv" >&5
10431 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10432   echo $ac_n "(cached) $ac_c" 1>&6
10433 else
10434   
10435 if test "$cross_compiling" = yes; then
10436   samba_cv_HAVE_NATIVE_ICONV=cross
10437 else
10438   cat > conftest.$ac_ext <<EOF
10439 #line 10440 "configure"
10440 #include "confdefs.h"
10441
10442 #include <iconv.h>
10443 main() {
10444        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10445        if (cd == 0 || cd == (iconv_t)-1) return -1;
10446        return 0;
10447 }
10448
10449 EOF
10450 if { (eval echo configure:10451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10451 then
10452   samba_cv_HAVE_NATIVE_ICONV=yes
10453 else
10454   echo "configure: failed program was:" >&5
10455   cat conftest.$ac_ext >&5
10456   rm -fr conftest*
10457   samba_cv_HAVE_NATIVE_ICONV=no
10458 fi
10459 rm -fr conftest*
10460 fi
10461
10462 fi
10463
10464 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10465 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10466     cat >> confdefs.h <<\EOF
10467 #define HAVE_NATIVE_ICONV 1
10468 EOF
10469
10470 fi
10471
10472
10473 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10474 echo "configure:10475: checking for Linux kernel oplocks" >&5
10475 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10476   echo $ac_n "(cached) $ac_c" 1>&6
10477 else
10478   
10479 if test "$cross_compiling" = yes; then
10480   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10481 else
10482   cat > conftest.$ac_ext <<EOF
10483 #line 10484 "configure"
10484 #include "confdefs.h"
10485
10486 #include <sys/types.h>
10487 #include <fcntl.h>
10488 #ifndef F_GETLEASE
10489 #define F_GETLEASE      1025
10490 #endif
10491 main() {
10492        int fd = open("/dev/null", O_RDONLY);
10493        return fcntl(fd, F_GETLEASE, 0) == -1;
10494 }
10495
10496 EOF
10497 if { (eval echo configure:10498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10498 then
10499   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10500 else
10501   echo "configure: failed program was:" >&5
10502   cat conftest.$ac_ext >&5
10503   rm -fr conftest*
10504   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10505 fi
10506 rm -fr conftest*
10507 fi
10508
10509 fi
10510
10511 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10512 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10513     cat >> confdefs.h <<\EOF
10514 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10515 EOF
10516
10517 fi
10518
10519 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10520 echo "configure:10521: checking for kernel change notify support" >&5
10521 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10522   echo $ac_n "(cached) $ac_c" 1>&6
10523 else
10524   
10525 if test "$cross_compiling" = yes; then
10526   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10527 else
10528   cat > conftest.$ac_ext <<EOF
10529 #line 10530 "configure"
10530 #include "confdefs.h"
10531
10532 #include <sys/types.h>
10533 #include <fcntl.h>
10534 #include <signal.h>
10535 #ifndef F_NOTIFY
10536 #define F_NOTIFY 1026
10537 #endif
10538 main() {
10539         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10540 }
10541
10542 EOF
10543 if { (eval echo configure:10544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10544 then
10545   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10546 else
10547   echo "configure: failed program was:" >&5
10548   cat conftest.$ac_ext >&5
10549   rm -fr conftest*
10550   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10551 fi
10552 rm -fr conftest*
10553 fi
10554
10555 fi
10556
10557 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10558 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10559     cat >> confdefs.h <<\EOF
10560 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10561 EOF
10562
10563 fi
10564
10565 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10566 echo "configure:10567: checking for kernel share modes" >&5
10567 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10568   echo $ac_n "(cached) $ac_c" 1>&6
10569 else
10570   
10571 if test "$cross_compiling" = yes; then
10572   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10573 else
10574   cat > conftest.$ac_ext <<EOF
10575 #line 10576 "configure"
10576 #include "confdefs.h"
10577
10578 #include <sys/types.h>
10579 #include <fcntl.h>
10580 #include <signal.h>
10581 #include <sys/file.h>
10582 #ifndef LOCK_MAND
10583 #define LOCK_MAND       32
10584 #define LOCK_READ       64
10585 #endif
10586 main() {
10587         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10588 }
10589
10590 EOF
10591 if { (eval echo configure:10592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10592 then
10593   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10594 else
10595   echo "configure: failed program was:" >&5
10596   cat conftest.$ac_ext >&5
10597   rm -fr conftest*
10598   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10599 fi
10600 rm -fr conftest*
10601 fi
10602
10603 fi
10604
10605 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10606 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10607     cat >> confdefs.h <<\EOF
10608 #define HAVE_KERNEL_SHARE_MODES 1
10609 EOF
10610
10611 fi
10612
10613
10614
10615
10616 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10617 echo "configure:10618: checking for IRIX kernel oplock type definitions" >&5
10618 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10619   echo $ac_n "(cached) $ac_c" 1>&6
10620 else
10621   
10622 cat > conftest.$ac_ext <<EOF
10623 #line 10624 "configure"
10624 #include "confdefs.h"
10625 #include <sys/types.h>
10626 #include <fcntl.h>
10627 int main() {
10628 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10629 ; return 0; }
10630 EOF
10631 if { (eval echo configure:10632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10632   rm -rf conftest*
10633   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10634 else
10635   echo "configure: failed program was:" >&5
10636   cat conftest.$ac_ext >&5
10637   rm -rf conftest*
10638   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10639 fi
10640 rm -f conftest*
10641 fi
10642
10643 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10644 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10645     cat >> confdefs.h <<\EOF
10646 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10647 EOF
10648
10649 fi
10650
10651 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10652 echo "configure:10653: checking for irix specific capabilities" >&5
10653 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10654   echo $ac_n "(cached) $ac_c" 1>&6
10655 else
10656   
10657 if test "$cross_compiling" = yes; then
10658   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10659 else
10660   cat > conftest.$ac_ext <<EOF
10661 #line 10662 "configure"
10662 #include "confdefs.h"
10663 #include <sys/types.h>
10664 #include <sys/capability.h>
10665 main() {
10666  cap_t cap;
10667  if ((cap = cap_get_proc()) == NULL)
10668    exit(1);
10669  cap->cap_effective |= CAP_NETWORK_MGT;
10670  cap->cap_inheritable |= CAP_NETWORK_MGT;
10671  cap_set_proc(cap);
10672  exit(0);
10673 }
10674
10675 EOF
10676 if { (eval echo configure:10677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10677 then
10678   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10679 else
10680   echo "configure: failed program was:" >&5
10681   cat conftest.$ac_ext >&5
10682   rm -fr conftest*
10683   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10684 fi
10685 rm -fr conftest*
10686 fi
10687
10688 fi
10689
10690 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10691 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10692     cat >> confdefs.h <<\EOF
10693 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10694 EOF
10695
10696 fi
10697
10698 #
10699 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10700 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10701 #
10702
10703 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10704 echo "configure:10705: checking for int16 typedef included by rpc/rpc.h" >&5
10705 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10706   echo $ac_n "(cached) $ac_c" 1>&6
10707 else
10708   
10709 cat > conftest.$ac_ext <<EOF
10710 #line 10711 "configure"
10711 #include "confdefs.h"
10712 #include <sys/types.h>
10713 #if defined(HAVE_RPC_RPC_H)
10714 #include <rpc/rpc.h>
10715 #endif
10716 int main() {
10717 int16 testvar;
10718 ; return 0; }
10719 EOF
10720 if { (eval echo configure:10721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10721   rm -rf conftest*
10722   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10723 else
10724   echo "configure: failed program was:" >&5
10725   cat conftest.$ac_ext >&5
10726   rm -rf conftest*
10727   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10728 fi
10729 rm -f conftest*
10730 fi
10731
10732 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10733 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10734     cat >> confdefs.h <<\EOF
10735 #define HAVE_INT16_FROM_RPC_RPC_H 1
10736 EOF
10737
10738 fi
10739
10740 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10741 echo "configure:10742: checking for uint16 typedef included by rpc/rpc.h" >&5
10742 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10743   echo $ac_n "(cached) $ac_c" 1>&6
10744 else
10745   
10746 cat > conftest.$ac_ext <<EOF
10747 #line 10748 "configure"
10748 #include "confdefs.h"
10749 #include <sys/types.h>
10750 #if defined(HAVE_RPC_RPC_H)
10751 #include <rpc/rpc.h>
10752 #endif
10753 int main() {
10754 uint16 testvar;
10755 ; return 0; }
10756 EOF
10757 if { (eval echo configure:10758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10758   rm -rf conftest*
10759   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10760 else
10761   echo "configure: failed program was:" >&5
10762   cat conftest.$ac_ext >&5
10763   rm -rf conftest*
10764   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10765 fi
10766 rm -f conftest*
10767 fi
10768
10769 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10770 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10771     cat >> confdefs.h <<\EOF
10772 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10773 EOF
10774
10775 fi
10776
10777 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10778 echo "configure:10779: checking for int32 typedef included by rpc/rpc.h" >&5
10779 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10780   echo $ac_n "(cached) $ac_c" 1>&6
10781 else
10782   
10783 cat > conftest.$ac_ext <<EOF
10784 #line 10785 "configure"
10785 #include "confdefs.h"
10786 #include <sys/types.h>
10787 #if defined(HAVE_RPC_RPC_H)
10788 #include <rpc/rpc.h>
10789 #endif
10790 int main() {
10791 int32 testvar;
10792 ; return 0; }
10793 EOF
10794 if { (eval echo configure:10795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10795   rm -rf conftest*
10796   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10797 else
10798   echo "configure: failed program was:" >&5
10799   cat conftest.$ac_ext >&5
10800   rm -rf conftest*
10801   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10802 fi
10803 rm -f conftest*
10804 fi
10805
10806 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10807 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10808     cat >> confdefs.h <<\EOF
10809 #define HAVE_INT32_FROM_RPC_RPC_H 1
10810 EOF
10811
10812 fi
10813
10814 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10815 echo "configure:10816: checking for uint32 typedef included by rpc/rpc.h" >&5
10816 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10817   echo $ac_n "(cached) $ac_c" 1>&6
10818 else
10819   
10820 cat > conftest.$ac_ext <<EOF
10821 #line 10822 "configure"
10822 #include "confdefs.h"
10823 #include <sys/types.h>
10824 #if defined(HAVE_RPC_RPC_H)
10825 #include <rpc/rpc.h>
10826 #endif
10827 int main() {
10828 uint32 testvar;
10829 ; return 0; }
10830 EOF
10831 if { (eval echo configure:10832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10832   rm -rf conftest*
10833   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10834 else
10835   echo "configure: failed program was:" >&5
10836   cat conftest.$ac_ext >&5
10837   rm -rf conftest*
10838   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10839 fi
10840 rm -f conftest*
10841 fi
10842
10843 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10844 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10845     cat >> confdefs.h <<\EOF
10846 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10847 EOF
10848
10849 fi
10850
10851
10852 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10853 echo "configure:10854: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10854 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10855   echo $ac_n "(cached) $ac_c" 1>&6
10856 else
10857   
10858 cat > conftest.$ac_ext <<EOF
10859 #line 10860 "configure"
10860 #include "confdefs.h"
10861 #include <sys/types.h>
10862 #ifdef HAVE_SYS_SECURITY_H
10863 #include <sys/security.h>
10864 #include <prot.h>
10865 #endif  /* HAVE_SYS_SECURITY_H */
10866 #if defined(HAVE_RPC_RPC_H)
10867 #include <rpc/rpc.h>
10868 #endif
10869 int main() {
10870 int testvar;
10871 ; return 0; }
10872 EOF
10873 if { (eval echo configure:10874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10874   rm -rf conftest*
10875   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10876 else
10877   echo "configure: failed program was:" >&5
10878   cat conftest.$ac_ext >&5
10879   rm -rf conftest*
10880   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10881 fi
10882 rm -f conftest*
10883 fi
10884
10885 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10886 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10887     cat >> confdefs.h <<\EOF
10888 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10889 EOF
10890
10891 fi
10892
10893 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10894 echo "configure:10895: checking for test routines" >&5
10895 if test "$cross_compiling" = yes; then
10896   echo "configure: warning: cannot run when cross-compiling" 1>&2
10897 else
10898   cat > conftest.$ac_ext <<EOF
10899 #line 10900 "configure"
10900 #include "confdefs.h"
10901 #include "${srcdir-.}/tests/trivial.c"
10902 EOF
10903 if { (eval echo configure:10904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10904 then
10905   echo "$ac_t""yes" 1>&6
10906 else
10907   echo "configure: failed program was:" >&5
10908   cat conftest.$ac_ext >&5
10909   rm -fr conftest*
10910   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10911 fi
10912 rm -fr conftest*
10913 fi
10914
10915
10916 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10917 echo "configure:10918: checking for ftruncate extend" >&5
10918 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10919   echo $ac_n "(cached) $ac_c" 1>&6
10920 else
10921   
10922 if test "$cross_compiling" = yes; then
10923   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10924 else
10925   cat > conftest.$ac_ext <<EOF
10926 #line 10927 "configure"
10927 #include "confdefs.h"
10928 #include "${srcdir-.}/tests/ftruncate.c"
10929 EOF
10930 if { (eval echo configure:10931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10931 then
10932   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10933 else
10934   echo "configure: failed program was:" >&5
10935   cat conftest.$ac_ext >&5
10936   rm -fr conftest*
10937   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10938 fi
10939 rm -fr conftest*
10940 fi
10941
10942 fi
10943
10944 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10945 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10946     cat >> confdefs.h <<\EOF
10947 #define HAVE_FTRUNCATE_EXTEND 1
10948 EOF
10949
10950 fi
10951
10952 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10953 echo "configure:10954: checking for AF_LOCAL socket support" >&5
10954 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10955   echo $ac_n "(cached) $ac_c" 1>&6
10956 else
10957   
10958 if test "$cross_compiling" = yes; then
10959   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10960 else
10961   cat > conftest.$ac_ext <<EOF
10962 #line 10963 "configure"
10963 #include "confdefs.h"
10964 #include "${srcdir-.}/tests/unixsock.c"
10965 EOF
10966 if { (eval echo configure:10967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10967 then
10968   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10969 else
10970   echo "configure: failed program was:" >&5
10971   cat conftest.$ac_ext >&5
10972   rm -fr conftest*
10973   samba_cv_HAVE_WORKING_AF_LOCAL=no
10974 fi
10975 rm -fr conftest*
10976 fi
10977
10978 fi
10979
10980 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10981 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10982 then
10983     cat >> confdefs.h <<\EOF
10984 #define HAVE_WORKING_AF_LOCAL 1
10985 EOF
10986
10987 fi
10988
10989 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10990 echo "configure:10991: checking for broken getgroups" >&5
10991 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10992   echo $ac_n "(cached) $ac_c" 1>&6
10993 else
10994   
10995 if test "$cross_compiling" = yes; then
10996   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10997 else
10998   cat > conftest.$ac_ext <<EOF
10999 #line 11000 "configure"
11000 #include "confdefs.h"
11001 #include "${srcdir-.}/tests/getgroups.c"
11002 EOF
11003 if { (eval echo configure:11004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11004 then
11005   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11006 else
11007   echo "configure: failed program was:" >&5
11008   cat conftest.$ac_ext >&5
11009   rm -fr conftest*
11010   samba_cv_HAVE_BROKEN_GETGROUPS=no
11011 fi
11012 rm -fr conftest*
11013 fi
11014
11015 fi
11016
11017 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11018 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11019     cat >> confdefs.h <<\EOF
11020 #define HAVE_BROKEN_GETGROUPS 1
11021 EOF
11022
11023 fi
11024
11025 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11026 echo "configure:11027: checking whether getpass should be replaced" >&5
11027 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11028   echo $ac_n "(cached) $ac_c" 1>&6
11029 else
11030   
11031 SAVE_CPPFLAGS="$CPPFLAGS"
11032 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt  -I${srcdir-.}/smbwrapper"
11033 cat > conftest.$ac_ext <<EOF
11034 #line 11035 "configure"
11035 #include "confdefs.h"
11036
11037 #define REPLACE_GETPASS 1
11038 #define NO_CONFIG_H 1
11039 #define main dont_declare_main
11040 #include "${srcdir-.}/lib/getsmbpass.c"
11041 #undef main
11042
11043 int main() {
11044
11045 ; return 0; }
11046 EOF
11047 if { (eval echo configure:11048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11048   rm -rf conftest*
11049   samba_cv_REPLACE_GETPASS=yes
11050 else
11051   echo "configure: failed program was:" >&5
11052   cat conftest.$ac_ext >&5
11053   rm -rf conftest*
11054   samba_cv_REPLACE_GETPASS=no
11055 fi
11056 rm -f conftest*
11057 CPPFLAGS="$SAVE_CPPFLAGS"
11058
11059 fi
11060
11061 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11062 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11063         cat >> confdefs.h <<\EOF
11064 #define REPLACE_GETPASS 1
11065 EOF
11066
11067 fi
11068
11069 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11070 echo "configure:11071: checking for broken inet_ntoa" >&5
11071 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11072   echo $ac_n "(cached) $ac_c" 1>&6
11073 else
11074   
11075 if test "$cross_compiling" = yes; then
11076   samba_cv_REPLACE_INET_NTOA=cross
11077 else
11078   cat > conftest.$ac_ext <<EOF
11079 #line 11080 "configure"
11080 #include "confdefs.h"
11081
11082 #include <stdio.h>
11083 #include <sys/types.h>
11084 #include <netinet/in.h>
11085 #ifdef HAVE_ARPA_INET_H
11086 #include <arpa/inet.h>
11087 #endif
11088 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11089 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11090     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11091 exit(1);}
11092 EOF
11093 if { (eval echo configure:11094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11094 then
11095   samba_cv_REPLACE_INET_NTOA=yes
11096 else
11097   echo "configure: failed program was:" >&5
11098   cat conftest.$ac_ext >&5
11099   rm -fr conftest*
11100   samba_cv_REPLACE_INET_NTOA=no
11101 fi
11102 rm -fr conftest*
11103 fi
11104
11105 fi
11106
11107 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11108 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11109     cat >> confdefs.h <<\EOF
11110 #define REPLACE_INET_NTOA 1
11111 EOF
11112
11113 fi
11114
11115 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11116 echo "configure:11117: checking for secure mkstemp" >&5
11117 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11118   echo $ac_n "(cached) $ac_c" 1>&6
11119 else
11120   
11121 if test "$cross_compiling" = yes; then
11122   samba_cv_HAVE_SECURE_MKSTEMP=cross
11123 else
11124   cat > conftest.$ac_ext <<EOF
11125 #line 11126 "configure"
11126 #include "confdefs.h"
11127 #include <stdlib.h>
11128 #include <sys/types.h>
11129 #include <sys/stat.h>
11130 #include <unistd.h>
11131 main() { 
11132   struct stat st;
11133   char tpl[20]="/tmp/test.XXXXXX"; 
11134   int fd = mkstemp(tpl); 
11135   if (fd == -1) exit(1);
11136   unlink(tpl);
11137   if (fstat(fd, &st) != 0) exit(1);
11138   if ((st.st_mode & 0777) != 0600) exit(1);
11139   exit(0);
11140 }
11141 EOF
11142 if { (eval echo configure:11143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11143 then
11144   samba_cv_HAVE_SECURE_MKSTEMP=yes
11145 else
11146   echo "configure: failed program was:" >&5
11147   cat conftest.$ac_ext >&5
11148   rm -fr conftest*
11149   samba_cv_HAVE_SECURE_MKSTEMP=no
11150 fi
11151 rm -fr conftest*
11152 fi
11153
11154 fi
11155
11156 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11157 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11158     cat >> confdefs.h <<\EOF
11159 #define HAVE_SECURE_MKSTEMP 1
11160 EOF
11161
11162 fi
11163
11164 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11165 echo "configure:11166: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11166 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11167   echo $ac_n "(cached) $ac_c" 1>&6
11168 else
11169   
11170 if test "$cross_compiling" = yes; then
11171   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11172 else
11173   cat > conftest.$ac_ext <<EOF
11174 #line 11175 "configure"
11175 #include "confdefs.h"
11176 #include <unistd.h>
11177 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11178 EOF
11179 if { (eval echo configure:11180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11180 then
11181   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11182 else
11183   echo "configure: failed program was:" >&5
11184   cat conftest.$ac_ext >&5
11185   rm -fr conftest*
11186   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11187 fi
11188 rm -fr conftest*
11189 fi
11190
11191 fi
11192
11193 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11194 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11195     cat >> confdefs.h <<\EOF
11196 #define SYSCONF_SC_NGROUPS_MAX 1
11197 EOF
11198
11199 fi
11200
11201 echo $ac_n "checking for root""... $ac_c" 1>&6
11202 echo "configure:11203: checking for root" >&5
11203 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11204   echo $ac_n "(cached) $ac_c" 1>&6
11205 else
11206   
11207 if test "$cross_compiling" = yes; then
11208   samba_cv_HAVE_ROOT=cross
11209 else
11210   cat > conftest.$ac_ext <<EOF
11211 #line 11212 "configure"
11212 #include "confdefs.h"
11213 main() { exit(getuid() != 0); }
11214 EOF
11215 if { (eval echo configure:11216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11216 then
11217   samba_cv_HAVE_ROOT=yes
11218 else
11219   echo "configure: failed program was:" >&5
11220   cat conftest.$ac_ext >&5
11221   rm -fr conftest*
11222   samba_cv_HAVE_ROOT=no
11223 fi
11224 rm -fr conftest*
11225 fi
11226
11227 fi
11228
11229 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11230 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11231     cat >> confdefs.h <<\EOF
11232 #define HAVE_ROOT 1
11233 EOF
11234
11235 else
11236     echo "configure: warning: running as non-root will disable some tests" 1>&2
11237 fi
11238
11239 ##################
11240 # look for a method of finding the list of network interfaces
11241 iface=no;
11242 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11243 echo "configure:11244: checking for iface AIX" >&5
11244 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11245   echo $ac_n "(cached) $ac_c" 1>&6
11246 else
11247   
11248 if test "$cross_compiling" = yes; then
11249   samba_cv_HAVE_IFACE_AIX=cross
11250 else
11251   cat > conftest.$ac_ext <<EOF
11252 #line 11253 "configure"
11253 #include "confdefs.h"
11254
11255 #define HAVE_IFACE_AIX 1
11256 #define AUTOCONF_TEST 1
11257 #include "confdefs.h"
11258 #include "${srcdir-.}/lib/interfaces.c"
11259 EOF
11260 if { (eval echo configure:11261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11261 then
11262   samba_cv_HAVE_IFACE_AIX=yes
11263 else
11264   echo "configure: failed program was:" >&5
11265   cat conftest.$ac_ext >&5
11266   rm -fr conftest*
11267   samba_cv_HAVE_IFACE_AIX=no
11268 fi
11269 rm -fr conftest*
11270 fi
11271
11272 fi
11273
11274 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11275 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11276     iface=yes;cat >> confdefs.h <<\EOF
11277 #define HAVE_IFACE_AIX 1
11278 EOF
11279
11280 fi
11281
11282 if test $iface = no; then
11283 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11284 echo "configure:11285: checking for iface ifconf" >&5
11285 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11286   echo $ac_n "(cached) $ac_c" 1>&6
11287 else
11288   
11289 if test "$cross_compiling" = yes; then
11290   samba_cv_HAVE_IFACE_IFCONF=cross
11291 else
11292   cat > conftest.$ac_ext <<EOF
11293 #line 11294 "configure"
11294 #include "confdefs.h"
11295
11296 #define HAVE_IFACE_IFCONF 1
11297 #define AUTOCONF_TEST 1
11298 #include "confdefs.h"
11299 #include "${srcdir-.}/lib/interfaces.c"
11300 EOF
11301 if { (eval echo configure:11302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11302 then
11303   samba_cv_HAVE_IFACE_IFCONF=yes
11304 else
11305   echo "configure: failed program was:" >&5
11306   cat conftest.$ac_ext >&5
11307   rm -fr conftest*
11308   samba_cv_HAVE_IFACE_IFCONF=no
11309 fi
11310 rm -fr conftest*
11311 fi
11312
11313 fi
11314
11315 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11316 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11317     iface=yes;cat >> confdefs.h <<\EOF
11318 #define HAVE_IFACE_IFCONF 1
11319 EOF
11320
11321 fi
11322 fi
11323
11324 if test $iface = no; then
11325 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11326 echo "configure:11327: checking for iface ifreq" >&5
11327 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11328   echo $ac_n "(cached) $ac_c" 1>&6
11329 else
11330   
11331 if test "$cross_compiling" = yes; then
11332   samba_cv_HAVE_IFACE_IFREQ=cross
11333 else
11334   cat > conftest.$ac_ext <<EOF
11335 #line 11336 "configure"
11336 #include "confdefs.h"
11337
11338 #define HAVE_IFACE_IFREQ 1
11339 #define AUTOCONF_TEST 1
11340 #include "confdefs.h"
11341 #include "${srcdir-.}/lib/interfaces.c"
11342 EOF
11343 if { (eval echo configure:11344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11344 then
11345   samba_cv_HAVE_IFACE_IFREQ=yes
11346 else
11347   echo "configure: failed program was:" >&5
11348   cat conftest.$ac_ext >&5
11349   rm -fr conftest*
11350   samba_cv_HAVE_IFACE_IFREQ=no
11351 fi
11352 rm -fr conftest*
11353 fi
11354
11355 fi
11356
11357 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11358 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11359     iface=yes;cat >> confdefs.h <<\EOF
11360 #define HAVE_IFACE_IFREQ 1
11361 EOF
11362
11363 fi
11364 fi
11365
11366
11367 ################################################
11368 # look for a method of setting the effective uid
11369 seteuid=no;
11370 if test $seteuid = no; then
11371 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11372 echo "configure:11373: checking for setresuid" >&5
11373 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11374   echo $ac_n "(cached) $ac_c" 1>&6
11375 else
11376   
11377 if test "$cross_compiling" = yes; then
11378   samba_cv_USE_SETRESUID=cross
11379 else
11380   cat > conftest.$ac_ext <<EOF
11381 #line 11382 "configure"
11382 #include "confdefs.h"
11383
11384 #define AUTOCONF_TEST 1
11385 #define USE_SETRESUID 1
11386 #include "confdefs.h"
11387 #include "${srcdir-.}/lib/util_sec.c"
11388 EOF
11389 if { (eval echo configure:11390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11390 then
11391   samba_cv_USE_SETRESUID=yes
11392 else
11393   echo "configure: failed program was:" >&5
11394   cat conftest.$ac_ext >&5
11395   rm -fr conftest*
11396   samba_cv_USE_SETRESUID=no
11397 fi
11398 rm -fr conftest*
11399 fi
11400
11401 fi
11402
11403 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11404 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11405     seteuid=yes;cat >> confdefs.h <<\EOF
11406 #define USE_SETRESUID 1
11407 EOF
11408
11409 fi
11410 fi
11411
11412
11413 if test $seteuid = no; then
11414 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11415 echo "configure:11416: checking for setreuid" >&5
11416 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11417   echo $ac_n "(cached) $ac_c" 1>&6
11418 else
11419   
11420 if test "$cross_compiling" = yes; then
11421   samba_cv_USE_SETREUID=cross
11422 else
11423   cat > conftest.$ac_ext <<EOF
11424 #line 11425 "configure"
11425 #include "confdefs.h"
11426
11427 #define AUTOCONF_TEST 1
11428 #define USE_SETREUID 1
11429 #include "confdefs.h"
11430 #include "${srcdir-.}/lib/util_sec.c"
11431 EOF
11432 if { (eval echo configure:11433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11433 then
11434   samba_cv_USE_SETREUID=yes
11435 else
11436   echo "configure: failed program was:" >&5
11437   cat conftest.$ac_ext >&5
11438   rm -fr conftest*
11439   samba_cv_USE_SETREUID=no
11440 fi
11441 rm -fr conftest*
11442 fi
11443
11444 fi
11445
11446 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11447 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11448     seteuid=yes;cat >> confdefs.h <<\EOF
11449 #define USE_SETREUID 1
11450 EOF
11451
11452 fi
11453 fi
11454
11455 if test $seteuid = no; then
11456 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11457 echo "configure:11458: checking for seteuid" >&5
11458 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11459   echo $ac_n "(cached) $ac_c" 1>&6
11460 else
11461   
11462 if test "$cross_compiling" = yes; then
11463   samba_cv_USE_SETEUID=cross
11464 else
11465   cat > conftest.$ac_ext <<EOF
11466 #line 11467 "configure"
11467 #include "confdefs.h"
11468
11469 #define AUTOCONF_TEST 1
11470 #define USE_SETEUID 1
11471 #include "confdefs.h"
11472 #include "${srcdir-.}/lib/util_sec.c"
11473 EOF
11474 if { (eval echo configure:11475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11475 then
11476   samba_cv_USE_SETEUID=yes
11477 else
11478   echo "configure: failed program was:" >&5
11479   cat conftest.$ac_ext >&5
11480   rm -fr conftest*
11481   samba_cv_USE_SETEUID=no
11482 fi
11483 rm -fr conftest*
11484 fi
11485
11486 fi
11487
11488 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11489 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11490     seteuid=yes;cat >> confdefs.h <<\EOF
11491 #define USE_SETEUID 1
11492 EOF
11493
11494 fi
11495 fi
11496
11497 if test $seteuid = no; then
11498 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11499 echo "configure:11500: checking for setuidx" >&5
11500 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11501   echo $ac_n "(cached) $ac_c" 1>&6
11502 else
11503   
11504 if test "$cross_compiling" = yes; then
11505   samba_cv_USE_SETUIDX=cross
11506 else
11507   cat > conftest.$ac_ext <<EOF
11508 #line 11509 "configure"
11509 #include "confdefs.h"
11510
11511 #define AUTOCONF_TEST 1
11512 #define USE_SETUIDX 1
11513 #include "confdefs.h"
11514 #include "${srcdir-.}/lib/util_sec.c"
11515 EOF
11516 if { (eval echo configure:11517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11517 then
11518   samba_cv_USE_SETUIDX=yes
11519 else
11520   echo "configure: failed program was:" >&5
11521   cat conftest.$ac_ext >&5
11522   rm -fr conftest*
11523   samba_cv_USE_SETUIDX=no
11524 fi
11525 rm -fr conftest*
11526 fi
11527
11528 fi
11529
11530 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11531 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11532     seteuid=yes;cat >> confdefs.h <<\EOF
11533 #define USE_SETUIDX 1
11534 EOF
11535
11536 fi
11537 fi
11538
11539
11540 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11541 echo "configure:11542: checking for working mmap" >&5
11542 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11543   echo $ac_n "(cached) $ac_c" 1>&6
11544 else
11545   
11546 if test "$cross_compiling" = yes; then
11547   samba_cv_HAVE_MMAP=cross
11548 else
11549   cat > conftest.$ac_ext <<EOF
11550 #line 11551 "configure"
11551 #include "confdefs.h"
11552 #include "${srcdir-.}/tests/shared_mmap.c"
11553 EOF
11554 if { (eval echo configure:11555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11555 then
11556   samba_cv_HAVE_MMAP=yes
11557 else
11558   echo "configure: failed program was:" >&5
11559   cat conftest.$ac_ext >&5
11560   rm -fr conftest*
11561   samba_cv_HAVE_MMAP=no
11562 fi
11563 rm -fr conftest*
11564 fi
11565
11566 fi
11567
11568 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11569 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11570     cat >> confdefs.h <<\EOF
11571 #define HAVE_MMAP 1
11572 EOF
11573
11574 fi
11575
11576 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11577 echo "configure:11578: checking for ftruncate needs root" >&5
11578 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11579   echo $ac_n "(cached) $ac_c" 1>&6
11580 else
11581   
11582 if test "$cross_compiling" = yes; then
11583   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11584 else
11585   cat > conftest.$ac_ext <<EOF
11586 #line 11587 "configure"
11587 #include "confdefs.h"
11588 #include "${srcdir-.}/tests/ftruncroot.c"
11589 EOF
11590 if { (eval echo configure:11591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11591 then
11592   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11593 else
11594   echo "configure: failed program was:" >&5
11595   cat conftest.$ac_ext >&5
11596   rm -fr conftest*
11597   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11598 fi
11599 rm -fr conftest*
11600 fi
11601
11602 fi
11603
11604 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11605 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11606     cat >> confdefs.h <<\EOF
11607 #define FTRUNCATE_NEEDS_ROOT 1
11608 EOF
11609
11610 fi
11611
11612 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11613 echo "configure:11614: checking for fcntl locking" >&5
11614 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11615   echo $ac_n "(cached) $ac_c" 1>&6
11616 else
11617   
11618 if test "$cross_compiling" = yes; then
11619   samba_cv_HAVE_FCNTL_LOCK=cross
11620 else
11621   cat > conftest.$ac_ext <<EOF
11622 #line 11623 "configure"
11623 #include "confdefs.h"
11624 #include "${srcdir-.}/tests/fcntl_lock.c"
11625 EOF
11626 if { (eval echo configure:11627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11627 then
11628   samba_cv_HAVE_FCNTL_LOCK=yes
11629 else
11630   echo "configure: failed program was:" >&5
11631   cat conftest.$ac_ext >&5
11632   rm -fr conftest*
11633   samba_cv_HAVE_FCNTL_LOCK=no
11634 fi
11635 rm -fr conftest*
11636 fi
11637
11638 fi
11639
11640 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11641 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11642     cat >> confdefs.h <<\EOF
11643 #define HAVE_FCNTL_LOCK 1
11644 EOF
11645
11646 fi
11647
11648 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11649 echo "configure:11650: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11650 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11651   echo $ac_n "(cached) $ac_c" 1>&6
11652 else
11653   
11654 if test "$cross_compiling" = yes; then
11655   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11656 else
11657   cat > conftest.$ac_ext <<EOF
11658 #line 11659 "configure"
11659 #include "confdefs.h"
11660 #include "${srcdir-.}/tests/fcntl_lock64.c"
11661 EOF
11662 if { (eval echo configure:11663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11663 then
11664   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11665 else
11666   echo "configure: failed program was:" >&5
11667   cat conftest.$ac_ext >&5
11668   rm -fr conftest*
11669   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11670 fi
11671 rm -fr conftest*
11672 fi
11673
11674 fi
11675
11676 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11677 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11678     cat >> confdefs.h <<\EOF
11679 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11680 EOF
11681
11682
11683 else
11684
11685
11686   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11687 echo "configure:11688: checking for 64 bit fcntl locking" >&5
11688 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11689   echo $ac_n "(cached) $ac_c" 1>&6
11690 else
11691   
11692   if test "$cross_compiling" = yes; then
11693   samba_cv_HAVE_STRUCT_FLOCK64=cross
11694 else
11695   cat > conftest.$ac_ext <<EOF
11696 #line 11697 "configure"
11697 #include "confdefs.h"
11698
11699 #if defined(HAVE_UNISTD_H)
11700 #include <unistd.h>
11701 #endif
11702 #include <stdio.h>
11703 #include <stdlib.h>
11704
11705 #ifdef HAVE_FCNTL_H
11706 #include <fcntl.h>
11707 #endif
11708
11709 #ifdef HAVE_SYS_FCNTL_H
11710 #include <sys/fcntl.h>
11711 #endif
11712 main() { struct flock64 fl64;
11713 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11714 exit(0);
11715 #else
11716 exit(1);
11717 #endif
11718 }
11719 EOF
11720 if { (eval echo configure:11721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11721 then
11722   samba_cv_HAVE_STRUCT_FLOCK64=yes
11723 else
11724   echo "configure: failed program was:" >&5
11725   cat conftest.$ac_ext >&5
11726   rm -fr conftest*
11727   samba_cv_HAVE_STRUCT_FLOCK64=no
11728 fi
11729 rm -fr conftest*
11730 fi
11731
11732 fi
11733
11734 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11735
11736   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11737       cat >> confdefs.h <<\EOF
11738 #define HAVE_STRUCT_FLOCK64 1
11739 EOF
11740
11741   fi
11742 fi
11743
11744 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11745 echo "configure:11746: checking for st_blocks in struct stat" >&5
11746 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11747   echo $ac_n "(cached) $ac_c" 1>&6
11748 else
11749   
11750 cat > conftest.$ac_ext <<EOF
11751 #line 11752 "configure"
11752 #include "confdefs.h"
11753 #include <sys/types.h>
11754 #include <sys/stat.h>
11755 #include <unistd.h>
11756 int main() {
11757 struct stat st;  st.st_blocks = 0;
11758 ; return 0; }
11759 EOF
11760 if { (eval echo configure:11761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11761   rm -rf conftest*
11762   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11763 else
11764   echo "configure: failed program was:" >&5
11765   cat conftest.$ac_ext >&5
11766   rm -rf conftest*
11767   samba_cv_HAVE_STAT_ST_BLOCKS=no
11768 fi
11769 rm -f conftest*
11770 fi
11771
11772 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11773 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11774     cat >> confdefs.h <<\EOF
11775 #define HAVE_STAT_ST_BLOCKS 1
11776 EOF
11777
11778 fi 
11779
11780 case "$host_os" in
11781 *linux*)
11782 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11783 echo "configure:11784: checking for broken RedHat 7.2 system header files" >&5
11784 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11785   echo $ac_n "(cached) $ac_c" 1>&6
11786 else
11787   
11788 cat > conftest.$ac_ext <<EOF
11789 #line 11790 "configure"
11790 #include "confdefs.h"
11791
11792 #ifdef HAVE_SYS_VFS_H
11793 #include <sys/vfs.h>
11794 #endif
11795 #ifdef HAVE_SYS_CAPABILITY_H
11796 #include <sys/capability.h>
11797 #endif
11798
11799 int main() {
11800 int i;
11801 ; return 0; }
11802 EOF
11803 if { (eval echo configure:11804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11804   rm -rf conftest*
11805   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11806 else
11807   echo "configure: failed program was:" >&5
11808   cat conftest.$ac_ext >&5
11809   rm -rf conftest*
11810   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11811 fi
11812 rm -f conftest*
11813 fi
11814
11815 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11816 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11817    cat >> confdefs.h <<\EOF
11818 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11819 EOF
11820
11821 fi
11822 ;;
11823 esac
11824
11825 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11826 echo "configure:11827: checking for broken nisplus include files" >&5
11827 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11828   echo $ac_n "(cached) $ac_c" 1>&6
11829 else
11830   
11831 cat > conftest.$ac_ext <<EOF
11832 #line 11833 "configure"
11833 #include "confdefs.h"
11834 #include <sys/acl.h>
11835 #if defined(HAVE_RPCSVC_NIS_H)
11836 #include <rpcsvc/nis.h>
11837 #endif
11838 int main() {
11839 int i;
11840 ; return 0; }
11841 EOF
11842 if { (eval echo configure:11843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11843   rm -rf conftest*
11844   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11845 else
11846   echo "configure: failed program was:" >&5
11847   cat conftest.$ac_ext >&5
11848   rm -rf conftest*
11849   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11850 fi
11851 rm -f conftest*
11852 fi
11853
11854 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11855 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11856     cat >> confdefs.h <<\EOF
11857 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11858 EOF
11859
11860 fi
11861
11862
11863 #################################################
11864 # check for smbwrapper support
11865 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11866 echo "configure:11867: checking whether to use smbwrapper" >&5
11867 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11868 if test "${with_smbwrapper+set}" = set; then
11869   withval="$with_smbwrapper"
11870    case "$withval" in
11871   yes)
11872     echo "$ac_t""yes" 1>&6
11873     cat >> confdefs.h <<\EOF
11874 #define WITH_SMBWRAPPER 1
11875 EOF
11876
11877         WRAPPROG="bin/smbsh"
11878         WRAP="bin/smbwrapper.$SHLIBEXT"
11879
11880         if test x$ATTEMPT_WRAP32_BUILD = x; then
11881                 WRAP32=""
11882         else
11883                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11884         fi
11885
11886 # Conditions under which smbwrapper should not be built.
11887
11888         if test x$PICFLAG = x; then
11889            echo No support for PIC code - disabling smbwrapper and smbsh
11890            WRAPPROG=""
11891            WRAP=""
11892            WRAP32=""
11893         elif test x$ac_cv_func_syscall = xno; then
11894            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11895            WRAPPROG=""
11896            WRAP=""
11897            WRAP32=""
11898         fi
11899     ;;
11900   *)
11901     echo "$ac_t""no" 1>&6
11902     ;;
11903   esac 
11904 else
11905   echo "$ac_t""no" 1>&6
11906
11907 fi
11908
11909
11910 #################################################
11911 # check for AFS clear-text auth support
11912 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11913 echo "configure:11914: checking whether to use AFS clear-text auth" >&5
11914 # Check whether --with-afs or --without-afs was given.
11915 if test "${with_afs+set}" = set; then
11916   withval="$with_afs"
11917    case "$withval" in
11918   yes)
11919     echo "$ac_t""yes" 1>&6
11920     cat >> confdefs.h <<\EOF
11921 #define WITH_AFS 1
11922 EOF
11923
11924     ;;
11925   *)
11926     echo "$ac_t""no" 1>&6
11927     ;;
11928   esac 
11929 else
11930   echo "$ac_t""no" 1>&6
11931
11932 fi
11933
11934
11935
11936 #################################################
11937 # check for the DFS clear-text auth system
11938 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11939 echo "configure:11940: checking whether to use DFS clear-text auth" >&5
11940 # Check whether --with-dfs or --without-dfs was given.
11941 if test "${with_dfs+set}" = set; then
11942   withval="$with_dfs"
11943    case "$withval" in
11944   yes)
11945     echo "$ac_t""yes" 1>&6
11946     cat >> confdefs.h <<\EOF
11947 #define WITH_DFS 1
11948 EOF
11949
11950     ;;
11951   *)
11952     echo "$ac_t""no" 1>&6
11953     ;;
11954   esac 
11955 else
11956   echo "$ac_t""no" 1>&6
11957
11958 fi
11959
11960
11961
11962 #################################################
11963 # see if this box has the RedHat location for kerberos
11964 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11965 echo "configure:11966: checking for /usr/kerberos" >&5
11966 if test -d /usr/kerberos; then
11967     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11968     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11969     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11970     echo "$ac_t""yes" 1>&6
11971 else
11972     echo "$ac_t""no" 1>&6
11973 fi
11974
11975 #################################################
11976 # check for location of Kerberos 5 install
11977 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11978 echo "configure:11979: checking for kerberos 5 install path" >&5
11979 # Check whether --with-krb5 or --without-krb5 was given.
11980 if test "${with_krb5+set}" = set; then
11981   withval="$with_krb5"
11982    case "$withval" in
11983   no)
11984     echo "$ac_t""no" 1>&6
11985     ;;
11986   *)
11987     echo "$ac_t""yes" 1>&6
11988     LIBS="$LIBS -lkrb5"
11989     CFLAGS="$CFLAGS -I$withval/include"
11990     CPPFLAGS="$CPPFLAGS -I$withval/include"
11991     LDFLAGS="$LDFLAGS -L$withval/lib"
11992     ;;
11993   esac 
11994 else
11995   echo "$ac_t""no" 1>&6
11996
11997 fi
11998
11999
12000 # now check for krb5.h. Some systems have the libraries without the headers!
12001 # note that this check is done here to allow for different kerberos
12002 # include paths
12003 for ac_hdr in krb5.h
12004 do
12005 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12006 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12007 echo "configure:12008: checking for $ac_hdr" >&5
12008 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12009   echo $ac_n "(cached) $ac_c" 1>&6
12010 else
12011   cat > conftest.$ac_ext <<EOF
12012 #line 12013 "configure"
12013 #include "confdefs.h"
12014 #include <$ac_hdr>
12015 EOF
12016 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12017 { (eval echo configure:12018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12018 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12019 if test -z "$ac_err"; then
12020   rm -rf conftest*
12021   eval "ac_cv_header_$ac_safe=yes"
12022 else
12023   echo "$ac_err" >&5
12024   echo "configure: failed program was:" >&5
12025   cat conftest.$ac_ext >&5
12026   rm -rf conftest*
12027   eval "ac_cv_header_$ac_safe=no"
12028 fi
12029 rm -f conftest*
12030 fi
12031 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12032   echo "$ac_t""yes" 1>&6
12033     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12034   cat >> confdefs.h <<EOF
12035 #define $ac_tr_hdr 1
12036 EOF
12037  
12038 else
12039   echo "$ac_t""no" 1>&6
12040 fi
12041 done
12042
12043
12044 # now check for gssapi headers.  This is also done here to allow for
12045 # different kerberos include paths
12046 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12047 do
12048 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12049 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12050 echo "configure:12051: checking for $ac_hdr" >&5
12051 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12052   echo $ac_n "(cached) $ac_c" 1>&6
12053 else
12054   cat > conftest.$ac_ext <<EOF
12055 #line 12056 "configure"
12056 #include "confdefs.h"
12057 #include <$ac_hdr>
12058 EOF
12059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12060 { (eval echo configure:12061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12062 if test -z "$ac_err"; then
12063   rm -rf conftest*
12064   eval "ac_cv_header_$ac_safe=yes"
12065 else
12066   echo "$ac_err" >&5
12067   echo "configure: failed program was:" >&5
12068   cat conftest.$ac_ext >&5
12069   rm -rf conftest*
12070   eval "ac_cv_header_$ac_safe=no"
12071 fi
12072 rm -f conftest*
12073 fi
12074 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12075   echo "$ac_t""yes" 1>&6
12076     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12077   cat >> confdefs.h <<EOF
12078 #define $ac_tr_hdr 1
12079 EOF
12080  
12081 else
12082   echo "$ac_t""no" 1>&6
12083 fi
12084 done
12085
12086
12087 ##################################################################
12088 # we might need the k5crypto and com_err libraries on some systems
12089 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12090 echo "configure:12091: checking for _et_list in -lcom_err" >&5
12091 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12092 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12093   echo $ac_n "(cached) $ac_c" 1>&6
12094 else
12095   ac_save_LIBS="$LIBS"
12096 LIBS="-lcom_err  $LIBS"
12097 cat > conftest.$ac_ext <<EOF
12098 #line 12099 "configure"
12099 #include "confdefs.h"
12100 /* Override any gcc2 internal prototype to avoid an error.  */
12101 /* We use char because int might match the return type of a gcc2
12102     builtin and then its argument prototype would still apply.  */
12103 char _et_list();
12104
12105 int main() {
12106 _et_list()
12107 ; return 0; }
12108 EOF
12109 if { (eval echo configure:12110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12110   rm -rf conftest*
12111   eval "ac_cv_lib_$ac_lib_var=yes"
12112 else
12113   echo "configure: failed program was:" >&5
12114   cat conftest.$ac_ext >&5
12115   rm -rf conftest*
12116   eval "ac_cv_lib_$ac_lib_var=no"
12117 fi
12118 rm -f conftest*
12119 LIBS="$ac_save_LIBS"
12120
12121 fi
12122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12123   echo "$ac_t""yes" 1>&6
12124   LIBS="$LIBS -lcom_err"
12125 else
12126   echo "$ac_t""no" 1>&6
12127 fi
12128
12129 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12130 echo "configure:12131: checking for krb5_encrypt_data in -lk5crypto" >&5
12131 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12132 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12133   echo $ac_n "(cached) $ac_c" 1>&6
12134 else
12135   ac_save_LIBS="$LIBS"
12136 LIBS="-lk5crypto  $LIBS"
12137 cat > conftest.$ac_ext <<EOF
12138 #line 12139 "configure"
12139 #include "confdefs.h"
12140 /* Override any gcc2 internal prototype to avoid an error.  */
12141 /* We use char because int might match the return type of a gcc2
12142     builtin and then its argument prototype would still apply.  */
12143 char krb5_encrypt_data();
12144
12145 int main() {
12146 krb5_encrypt_data()
12147 ; return 0; }
12148 EOF
12149 if { (eval echo configure:12150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12150   rm -rf conftest*
12151   eval "ac_cv_lib_$ac_lib_var=yes"
12152 else
12153   echo "configure: failed program was:" >&5
12154   cat conftest.$ac_ext >&5
12155   rm -rf conftest*
12156   eval "ac_cv_lib_$ac_lib_var=no"
12157 fi
12158 rm -f conftest*
12159 LIBS="$ac_save_LIBS"
12160
12161 fi
12162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12163   echo "$ac_t""yes" 1>&6
12164   LIBS="$LIBS -lk5crypto"
12165 else
12166   echo "$ac_t""no" 1>&6
12167 fi
12168
12169
12170 ########################################################
12171 # now see if we can find the krb5 libs in standard paths
12172 # or as specified above
12173 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12174 echo "configure:12175: checking for krb5_mk_req_extended in -lkrb5" >&5
12175 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12176 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12177   echo $ac_n "(cached) $ac_c" 1>&6
12178 else
12179   ac_save_LIBS="$LIBS"
12180 LIBS="-lkrb5  $LIBS"
12181 cat > conftest.$ac_ext <<EOF
12182 #line 12183 "configure"
12183 #include "confdefs.h"
12184 /* Override any gcc2 internal prototype to avoid an error.  */
12185 /* We use char because int might match the return type of a gcc2
12186     builtin and then its argument prototype would still apply.  */
12187 char krb5_mk_req_extended();
12188
12189 int main() {
12190 krb5_mk_req_extended()
12191 ; return 0; }
12192 EOF
12193 if { (eval echo configure:12194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12194   rm -rf conftest*
12195   eval "ac_cv_lib_$ac_lib_var=yes"
12196 else
12197   echo "configure: failed program was:" >&5
12198   cat conftest.$ac_ext >&5
12199   rm -rf conftest*
12200   eval "ac_cv_lib_$ac_lib_var=no"
12201 fi
12202 rm -f conftest*
12203 LIBS="$ac_save_LIBS"
12204
12205 fi
12206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12207   echo "$ac_t""yes" 1>&6
12208   LIBS="$LIBS -lkrb5";
12209         cat >> confdefs.h <<\EOF
12210 #define HAVE_KRB5 1
12211 EOF
12212
12213 else
12214   echo "$ac_t""no" 1>&6
12215 fi
12216
12217
12218 ########################################################
12219 # now see if we can find the gssapi libs in standard paths
12220 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12221 echo "configure:12222: checking for gss_display_status in -lgssapi_krb5" >&5
12222 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12223 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12224   echo $ac_n "(cached) $ac_c" 1>&6
12225 else
12226   ac_save_LIBS="$LIBS"
12227 LIBS="-lgssapi_krb5  $LIBS"
12228 cat > conftest.$ac_ext <<EOF
12229 #line 12230 "configure"
12230 #include "confdefs.h"
12231 /* Override any gcc2 internal prototype to avoid an error.  */
12232 /* We use char because int might match the return type of a gcc2
12233     builtin and then its argument prototype would still apply.  */
12234 char gss_display_status();
12235
12236 int main() {
12237 gss_display_status()
12238 ; return 0; }
12239 EOF
12240 if { (eval echo configure:12241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12241   rm -rf conftest*
12242   eval "ac_cv_lib_$ac_lib_var=yes"
12243 else
12244   echo "configure: failed program was:" >&5
12245   cat conftest.$ac_ext >&5
12246   rm -rf conftest*
12247   eval "ac_cv_lib_$ac_lib_var=no"
12248 fi
12249 rm -f conftest*
12250 LIBS="$ac_save_LIBS"
12251
12252 fi
12253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12254   echo "$ac_t""yes" 1>&6
12255   LIBS="$LIBS -lgssapi_krb5";
12256         cat >> confdefs.h <<\EOF
12257 #define HAVE_GSSAPI 1
12258 EOF
12259
12260 else
12261   echo "$ac_t""no" 1>&6
12262 fi
12263
12264
12265 ##################################################################
12266 # we might need the lber lib on some systems. To avoid link errors
12267 # this test must be before the libldap test
12268 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12269 echo "configure:12270: checking for ber_scanf in -llber" >&5
12270 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12271 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12272   echo $ac_n "(cached) $ac_c" 1>&6
12273 else
12274   ac_save_LIBS="$LIBS"
12275 LIBS="-llber  $LIBS"
12276 cat > conftest.$ac_ext <<EOF
12277 #line 12278 "configure"
12278 #include "confdefs.h"
12279 /* Override any gcc2 internal prototype to avoid an error.  */
12280 /* We use char because int might match the return type of a gcc2
12281     builtin and then its argument prototype would still apply.  */
12282 char ber_scanf();
12283
12284 int main() {
12285 ber_scanf()
12286 ; return 0; }
12287 EOF
12288 if { (eval echo configure:12289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12289   rm -rf conftest*
12290   eval "ac_cv_lib_$ac_lib_var=yes"
12291 else
12292   echo "configure: failed program was:" >&5
12293   cat conftest.$ac_ext >&5
12294   rm -rf conftest*
12295   eval "ac_cv_lib_$ac_lib_var=no"
12296 fi
12297 rm -f conftest*
12298 LIBS="$ac_save_LIBS"
12299
12300 fi
12301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12302   echo "$ac_t""yes" 1>&6
12303   LIBS="$LIBS -llber"
12304 else
12305   echo "$ac_t""no" 1>&6
12306 fi
12307
12308
12309 ########################################################
12310 # now see if we can find the ldap libs in standard paths
12311 if test x$have_ldap != xyes; then
12312 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12313 echo "configure:12314: checking for ldap_domain2hostlist in -lldap" >&5
12314 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12315 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12316   echo $ac_n "(cached) $ac_c" 1>&6
12317 else
12318   ac_save_LIBS="$LIBS"
12319 LIBS="-lldap  $LIBS"
12320 cat > conftest.$ac_ext <<EOF
12321 #line 12322 "configure"
12322 #include "confdefs.h"
12323 /* Override any gcc2 internal prototype to avoid an error.  */
12324 /* We use char because int might match the return type of a gcc2
12325     builtin and then its argument prototype would still apply.  */
12326 char ldap_domain2hostlist();
12327
12328 int main() {
12329 ldap_domain2hostlist()
12330 ; return 0; }
12331 EOF
12332 if { (eval echo configure:12333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12333   rm -rf conftest*
12334   eval "ac_cv_lib_$ac_lib_var=yes"
12335 else
12336   echo "configure: failed program was:" >&5
12337   cat conftest.$ac_ext >&5
12338   rm -rf conftest*
12339   eval "ac_cv_lib_$ac_lib_var=no"
12340 fi
12341 rm -f conftest*
12342 LIBS="$ac_save_LIBS"
12343
12344 fi
12345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12346   echo "$ac_t""yes" 1>&6
12347   LIBS="$LIBS -lldap";
12348         cat >> confdefs.h <<\EOF
12349 #define HAVE_LDAP 1
12350 EOF
12351
12352 else
12353   echo "$ac_t""no" 1>&6
12354 fi
12355
12356
12357         ########################################################
12358         # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
12359         # Check found in pam_ldap 145.
12360         for ac_func in ldap_set_rebind_proc
12361 do
12362 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12363 echo "configure:12364: checking for $ac_func" >&5
12364 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12365   echo $ac_n "(cached) $ac_c" 1>&6
12366 else
12367   cat > conftest.$ac_ext <<EOF
12368 #line 12369 "configure"
12369 #include "confdefs.h"
12370 /* System header to define __stub macros and hopefully few prototypes,
12371     which can conflict with char $ac_func(); below.  */
12372 #include <assert.h>
12373 /* Override any gcc2 internal prototype to avoid an error.  */
12374 /* We use char because int might match the return type of a gcc2
12375     builtin and then its argument prototype would still apply.  */
12376 char $ac_func();
12377
12378 int main() {
12379
12380 /* The GNU C library defines this for functions which it implements
12381     to always fail with ENOSYS.  Some functions are actually named
12382     something starting with __ and the normal name is an alias.  */
12383 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12384 choke me
12385 #else
12386 $ac_func();
12387 #endif
12388
12389 ; return 0; }
12390 EOF
12391 if { (eval echo configure:12392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12392   rm -rf conftest*
12393   eval "ac_cv_func_$ac_func=yes"
12394 else
12395   echo "configure: failed program was:" >&5
12396   cat conftest.$ac_ext >&5
12397   rm -rf conftest*
12398   eval "ac_cv_func_$ac_func=no"
12399 fi
12400 rm -f conftest*
12401 fi
12402
12403 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12404   echo "$ac_t""yes" 1>&6
12405     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12406   cat >> confdefs.h <<EOF
12407 #define $ac_tr_func 1
12408 EOF
12409  
12410 else
12411   echo "$ac_t""no" 1>&6
12412 fi
12413 done
12414
12415         echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6
12416 echo "configure:12417: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
12417 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then
12418   echo $ac_n "(cached) $ac_c" 1>&6
12419 else
12420   
12421         cat > conftest.$ac_ext <<EOF
12422 #line 12423 "configure"
12423 #include "confdefs.h"
12424
12425         #include <lber.h>
12426         #include <ldap.h>
12427 int main() {
12428 ldap_set_rebind_proc(0, 0, 0);
12429 ; return 0; }
12430 EOF
12431 if { (eval echo configure:12432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12432   rm -rf conftest*
12433   pam_ldap_cv_ldap_set_rebind_proc=3
12434 else
12435   echo "configure: failed program was:" >&5
12436   cat conftest.$ac_ext >&5
12437   rm -rf conftest*
12438   pam_ldap_cv_ldap_set_rebind_proc=2
12439 fi
12440 rm -f conftest* 
12441 fi
12442
12443 echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6
12444         cat >> confdefs.h <<EOF
12445 #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc
12446 EOF
12447
12448 fi
12449
12450 #################################################
12451 # check for automount support
12452 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12453 echo "configure:12454: checking whether to use AUTOMOUNT" >&5
12454 # Check whether --with-automount or --without-automount was given.
12455 if test "${with_automount+set}" = set; then
12456   withval="$with_automount"
12457    case "$withval" in
12458   yes)
12459     echo "$ac_t""yes" 1>&6
12460     cat >> confdefs.h <<\EOF
12461 #define WITH_AUTOMOUNT 1
12462 EOF
12463
12464     ;;
12465   *)
12466     echo "$ac_t""no" 1>&6
12467     ;;
12468   esac 
12469 else
12470   echo "$ac_t""no" 1>&6
12471
12472 fi
12473
12474
12475 #################################################
12476 # check for smbmount support
12477 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12478 echo "configure:12479: checking whether to use SMBMOUNT" >&5
12479 # Check whether --with-smbmount or --without-smbmount was given.
12480 if test "${with_smbmount+set}" = set; then
12481   withval="$with_smbmount"
12482    case "$withval" in
12483   yes)
12484         case "$host_os" in
12485         *linux*)
12486                 echo "$ac_t""yes" 1>&6
12487                 cat >> confdefs.h <<\EOF
12488 #define WITH_SMBMOUNT 1
12489 EOF
12490
12491                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12492                 ;;
12493         *)
12494                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12495                 ;;
12496         esac
12497     ;;
12498   *)
12499     echo "$ac_t""no" 1>&6
12500     MPROGS=
12501     ;;
12502   esac 
12503 else
12504   echo "$ac_t""no" 1>&6
12505   MPROGS=
12506
12507 fi
12508
12509
12510
12511 #################################################
12512 # check for a PAM clear-text auth, accounts, password and session support
12513 with_pam_for_crypt=no
12514 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12515 echo "configure:12516: checking whether to use PAM" >&5
12516 # Check whether --with-pam or --without-pam was given.
12517 if test "${with_pam+set}" = set; then
12518   withval="$with_pam"
12519    case "$withval" in
12520   yes)
12521     echo "$ac_t""yes" 1>&6
12522     cat >> confdefs.h <<\EOF
12523 #define WITH_PAM 1
12524 EOF
12525
12526     LIBS="$LIBS -lpam"
12527     with_pam_for_crypt=yes
12528     ;;
12529   *)
12530     echo "$ac_t""no" 1>&6
12531     ;;
12532   esac 
12533 else
12534   echo "$ac_t""no" 1>&6
12535
12536 fi
12537
12538
12539 # we can't build a pam module if we don't have pam.
12540 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12541 echo "configure:12542: checking for pam_get_data in -lpam" >&5
12542 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12543 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12544   echo $ac_n "(cached) $ac_c" 1>&6
12545 else
12546   ac_save_LIBS="$LIBS"
12547 LIBS="-lpam  $LIBS"
12548 cat > conftest.$ac_ext <<EOF
12549 #line 12550 "configure"
12550 #include "confdefs.h"
12551 /* Override any gcc2 internal prototype to avoid an error.  */
12552 /* We use char because int might match the return type of a gcc2
12553     builtin and then its argument prototype would still apply.  */
12554 char pam_get_data();
12555
12556 int main() {
12557 pam_get_data()
12558 ; return 0; }
12559 EOF
12560 if { (eval echo configure:12561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12561   rm -rf conftest*
12562   eval "ac_cv_lib_$ac_lib_var=yes"
12563 else
12564   echo "configure: failed program was:" >&5
12565   cat conftest.$ac_ext >&5
12566   rm -rf conftest*
12567   eval "ac_cv_lib_$ac_lib_var=no"
12568 fi
12569 rm -f conftest*
12570 LIBS="$ac_save_LIBS"
12571
12572 fi
12573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12574   echo "$ac_t""yes" 1>&6
12575   cat >> confdefs.h <<\EOF
12576 #define HAVE_LIBPAM 1
12577 EOF
12578
12579 else
12580   echo "$ac_t""no" 1>&6
12581 fi
12582
12583
12584 #################################################
12585 # check for pam_smbpass support
12586 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12587 echo "configure:12588: checking whether to use pam_smbpass" >&5
12588 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12589 if test "${with_pam_smbpass+set}" = set; then
12590   withval="$with_pam_smbpass"
12591    case "$withval" in
12592   yes)
12593     echo "$ac_t""yes" 1>&6
12594
12595 # Conditions under which pam_smbpass should not be built.
12596
12597        if test x$PICFLAG = x; then
12598           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12599           PAM_MOD=""
12600        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12601           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12602           PAM_MOD=""
12603        else
12604           PAM_MOD="bin/pam_smbpass.so"
12605        fi
12606     ;;
12607   *)
12608     echo "$ac_t""no" 1>&6
12609     ;;
12610   esac 
12611 else
12612   echo "$ac_t""no" 1>&6
12613
12614 fi
12615
12616
12617
12618 ###############################################
12619 # test for where we get crypt() from, but only
12620 # if not using PAM
12621 if test $with_pam_for_crypt = no; then
12622 for ac_func in crypt
12623 do
12624 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12625 echo "configure:12626: checking for $ac_func" >&5
12626 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12627   echo $ac_n "(cached) $ac_c" 1>&6
12628 else
12629   cat > conftest.$ac_ext <<EOF
12630 #line 12631 "configure"
12631 #include "confdefs.h"
12632 /* System header to define __stub macros and hopefully few prototypes,
12633     which can conflict with char $ac_func(); below.  */
12634 #include <assert.h>
12635 /* Override any gcc2 internal prototype to avoid an error.  */
12636 /* We use char because int might match the return type of a gcc2
12637     builtin and then its argument prototype would still apply.  */
12638 char $ac_func();
12639
12640 int main() {
12641
12642 /* The GNU C library defines this for functions which it implements
12643     to always fail with ENOSYS.  Some functions are actually named
12644     something starting with __ and the normal name is an alias.  */
12645 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12646 choke me
12647 #else
12648 $ac_func();
12649 #endif
12650
12651 ; return 0; }
12652 EOF
12653 if { (eval echo configure:12654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12654   rm -rf conftest*
12655   eval "ac_cv_func_$ac_func=yes"
12656 else
12657   echo "configure: failed program was:" >&5
12658   cat conftest.$ac_ext >&5
12659   rm -rf conftest*
12660   eval "ac_cv_func_$ac_func=no"
12661 fi
12662 rm -f conftest*
12663 fi
12664
12665 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12666   echo "$ac_t""yes" 1>&6
12667     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12668   cat >> confdefs.h <<EOF
12669 #define $ac_tr_func 1
12670 EOF
12671  
12672 else
12673   echo "$ac_t""no" 1>&6
12674 fi
12675 done
12676
12677 if test x"$ac_cv_func_crypt" = x"no"; then
12678     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12679 echo "configure:12680: checking for crypt in -lcrypt" >&5
12680 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12681 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12682   echo $ac_n "(cached) $ac_c" 1>&6
12683 else
12684   ac_save_LIBS="$LIBS"
12685 LIBS="-lcrypt  $LIBS"
12686 cat > conftest.$ac_ext <<EOF
12687 #line 12688 "configure"
12688 #include "confdefs.h"
12689 /* Override any gcc2 internal prototype to avoid an error.  */
12690 /* We use char because int might match the return type of a gcc2
12691     builtin and then its argument prototype would still apply.  */
12692 char crypt();
12693
12694 int main() {
12695 crypt()
12696 ; return 0; }
12697 EOF
12698 if { (eval echo configure:12699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12699   rm -rf conftest*
12700   eval "ac_cv_lib_$ac_lib_var=yes"
12701 else
12702   echo "configure: failed program was:" >&5
12703   cat conftest.$ac_ext >&5
12704   rm -rf conftest*
12705   eval "ac_cv_lib_$ac_lib_var=no"
12706 fi
12707 rm -f conftest*
12708 LIBS="$ac_save_LIBS"
12709
12710 fi
12711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12712   echo "$ac_t""yes" 1>&6
12713   LIBS="$LIBS -lcrypt";
12714         cat >> confdefs.h <<\EOF
12715 #define HAVE_CRYPT 1
12716 EOF
12717
12718 else
12719   echo "$ac_t""no" 1>&6
12720 fi
12721
12722 fi
12723 fi
12724
12725 ##
12726 ## moved after the check for -lcrypt in order to
12727 ## ensure that the necessary libraries are included
12728 ## check checking for truncated salt.  Wrapped by the
12729 ## $with_pam_for_crypt variable as above   --jerry
12730 ##
12731 if test $with_pam_for_crypt = no; then
12732 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12733 echo "configure:12734: checking for a crypt that needs truncated salt" >&5
12734 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12735   echo $ac_n "(cached) $ac_c" 1>&6
12736 else
12737   
12738 if test "$cross_compiling" = yes; then
12739   samba_cv_HAVE_TRUNCATED_SALT=cross
12740 else
12741   cat > conftest.$ac_ext <<EOF
12742 #line 12743 "configure"
12743 #include "confdefs.h"
12744 #include "${srcdir-.}/tests/crypttest.c"
12745 EOF
12746 if { (eval echo configure:12747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12747 then
12748   samba_cv_HAVE_TRUNCATED_SALT=no
12749 else
12750   echo "configure: failed program was:" >&5
12751   cat conftest.$ac_ext >&5
12752   rm -fr conftest*
12753   samba_cv_HAVE_TRUNCATED_SALT=yes
12754 fi
12755 rm -fr conftest*
12756 fi
12757
12758 fi
12759
12760 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12761 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12762         cat >> confdefs.h <<\EOF
12763 #define HAVE_TRUNCATED_SALT 1
12764 EOF
12765
12766 fi
12767 fi
12768
12769
12770
12771 ########################################################################################
12772 ##
12773 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12774 ##
12775 ########################################################################################
12776
12777 #################################################
12778 # check for a TDB password database
12779 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12780 echo "configure:12781: checking whether to use TDB SAM database" >&5
12781 # Check whether --with-tdbsam or --without-tdbsam was given.
12782 if test "${with_tdbsam+set}" = set; then
12783   withval="$with_tdbsam"
12784    case "$withval" in
12785   yes)
12786     echo "$ac_t""yes" 1>&6
12787     cat >> confdefs.h <<\EOF
12788 #define WITH_TDB_SAM 1
12789 EOF
12790
12791     ;;
12792   *)
12793     echo "$ac_t""no" 1>&6
12794     ;;
12795   esac 
12796 else
12797   echo "$ac_t""no" 1>&6
12798
12799 fi
12800
12801
12802 #################################################
12803 # check for a NISPLUS password database
12804 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12805 echo "configure:12806: checking whether to use NISPLUS SAM database" >&5
12806 # Check whether --with-nisplussam or --without-nisplussam was given.
12807 if test "${with_nisplussam+set}" = set; then
12808   withval="$with_nisplussam"
12809    case "$withval" in
12810   yes)
12811     echo "$ac_t""yes" 1>&6
12812     cat >> confdefs.h <<\EOF
12813 #define WITH_NISPLUS_SAM 1
12814 EOF
12815
12816     ;;
12817   *)
12818     echo "$ac_t""no" 1>&6
12819     ;;
12820   esac 
12821 else
12822   echo "$ac_t""no" 1>&6
12823
12824 fi
12825
12826
12827 ########################################################################################
12828 ##
12829 ## END OF TESTS FOR SAM BACKENDS.  
12830 ##
12831 ########################################################################################
12832
12833 #################################################
12834 # check for a NISPLUS_HOME support 
12835 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12836 echo "configure:12837: checking whether to use NISPLUS_HOME" >&5
12837 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12838 if test "${with_nisplus_home+set}" = set; then
12839   withval="$with_nisplus_home"
12840    case "$withval" in
12841   yes)
12842     echo "$ac_t""yes" 1>&6
12843     cat >> confdefs.h <<\EOF
12844 #define WITH_NISPLUS_HOME 1
12845 EOF
12846
12847     ;;
12848   *)
12849     echo "$ac_t""no" 1>&6
12850     ;;
12851   esac 
12852 else
12853   echo "$ac_t""no" 1>&6
12854
12855 fi
12856
12857
12858 #################################################
12859 # check for syslog logging
12860 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12861 echo "configure:12862: checking whether to use syslog logging" >&5
12862 # Check whether --with-syslog or --without-syslog was given.
12863 if test "${with_syslog+set}" = set; then
12864   withval="$with_syslog"
12865    case "$withval" in
12866   yes)
12867     echo "$ac_t""yes" 1>&6
12868     cat >> confdefs.h <<\EOF
12869 #define WITH_SYSLOG 1
12870 EOF
12871
12872     ;;
12873   *)
12874     echo "$ac_t""no" 1>&6
12875     ;;
12876   esac 
12877 else
12878   echo "$ac_t""no" 1>&6
12879
12880 fi
12881
12882
12883 #################################################
12884 # check for a shared memory profiling support
12885 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12886 echo "configure:12887: checking whether to use profiling" >&5
12887 # Check whether --with-profiling-data or --without-profiling-data was given.
12888 if test "${with_profiling_data+set}" = set; then
12889   withval="$with_profiling_data"
12890    case "$withval" in
12891   yes)
12892     echo "$ac_t""yes" 1>&6
12893     cat >> confdefs.h <<\EOF
12894 #define WITH_PROFILE 1
12895 EOF
12896
12897     ;;
12898   *)
12899     echo "$ac_t""no" 1>&6
12900     ;;
12901   esac 
12902 else
12903   echo "$ac_t""no" 1>&6
12904
12905 fi
12906
12907
12908
12909 #################################################
12910 # check for experimental disk-quotas support
12911 QUOTAOBJS=smbd/noquotas.o
12912
12913 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12914 echo "configure:12915: checking whether to support disk-quotas" >&5
12915 # Check whether --with-quotas or --without-quotas was given.
12916 if test "${with_quotas+set}" = set; then
12917   withval="$with_quotas"
12918    case "$withval" in
12919   yes)
12920     echo "$ac_t""yes" 1>&6
12921     case "$host_os" in
12922       *linux*)
12923         # Check for kernel 2.4.x quota braindamage...
12924         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12925 echo "configure:12926: checking for linux 2.4.x quota braindamage.." >&5
12926 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12927   echo $ac_n "(cached) $ac_c" 1>&6
12928 else
12929   
12930         cat > conftest.$ac_ext <<EOF
12931 #line 12932 "configure"
12932 #include "confdefs.h"
12933 #include <stdio.h>
12934 #include <sys/types.h>
12935 #include <asm/types.h>
12936 #include <linux/quota.h>
12937 #include <mntent.h>
12938 #include <linux/unistd.h>
12939 int main() {
12940 struct mem_dqblk D;
12941 ; return 0; }
12942 EOF
12943 if { (eval echo configure:12944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12944   rm -rf conftest*
12945   samba_cv_linux_2_4_quota_braindamage=yes
12946 else
12947   echo "configure: failed program was:" >&5
12948   cat conftest.$ac_ext >&5
12949   rm -rf conftest*
12950   samba_cv_linux_2_4_quota_braindamage=no
12951 fi
12952 rm -f conftest*
12953 fi
12954
12955 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12956 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12957         cat >> confdefs.h <<\EOF
12958 #define LINUX_QUOTAS_2 1
12959 EOF
12960
12961 else
12962         cat >> confdefs.h <<\EOF
12963 #define LINUX_QUOTAS_1 1
12964 EOF
12965
12966 fi
12967         ;;
12968       *)
12969         ;;
12970     esac
12971     QUOTAOBJS=smbd/quotas.o
12972     cat >> confdefs.h <<\EOF
12973 #define WITH_QUOTAS 1
12974 EOF
12975
12976     ;;
12977   *)
12978     echo "$ac_t""no" 1>&6
12979     ;;
12980   esac 
12981 else
12982   echo "$ac_t""no" 1>&6
12983
12984 fi
12985
12986
12987
12988 #################################################
12989 # check for experimental utmp accounting
12990
12991 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12992 echo "configure:12993: checking whether to support utmp accounting" >&5
12993 # Check whether --with-utmp or --without-utmp was given.
12994 if test "${with_utmp+set}" = set; then
12995   withval="$with_utmp"
12996    case "$withval" in
12997   yes)
12998     echo "$ac_t""yes" 1>&6
12999     cat >> confdefs.h <<\EOF
13000 #define WITH_UTMP 1
13001 EOF
13002
13003     ;;
13004   *)
13005     echo "$ac_t""no" 1>&6
13006     ;;
13007   esac 
13008 else
13009   echo "$ac_t""no" 1>&6
13010
13011 fi
13012
13013
13014 #################################################
13015 # choose native language(s) of man pages
13016 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13017 echo "configure:13018: checking chosen man pages' language(s)" >&5
13018 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13019 if test "${with_manpages_langs+set}" = set; then
13020   withval="$with_manpages_langs"
13021    case "$withval" in
13022   yes|no)
13023     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13024     manlangs="en"
13025   ;;
13026   *)
13027     manlangs="$withval"
13028   ;;
13029   esac
13030
13031   echo "$ac_t""$manlangs" 1>&6
13032   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13033   
13034 else
13035   manlangs="en"
13036   echo "$ac_t""$manlangs" 1>&6
13037   
13038
13039 fi
13040
13041
13042 #################################################
13043 # should we build libsmbclient?
13044
13045 LIBSMBCLIENT_SHARED=
13046 LIBSMBCLIENT=
13047 echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
13048 echo "configure:13049: checking whether to build the libsmbclient shared library" >&5
13049 # Check whether --with-libsmbclient or --without-libsmbclient was given.
13050 if test "${with_libsmbclient+set}" = set; then
13051   withval="$with_libsmbclient"
13052    case "$withval" in
13053   no) 
13054      echo "$ac_t""no" 1>&6
13055      ;;
13056   *)
13057      if test $BLDSHARED = true; then
13058         LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
13059         LIBSMBCLIENT=libsmbclient
13060         echo "$ac_t""yes" 1>&6
13061      else
13062         echo "$ac_t""no shared library support" 1>&6
13063      fi
13064      ;;
13065   esac 
13066 else
13067   echo "$ac_t""yes" 1>&6
13068
13069 fi
13070
13071
13072
13073 #################################################
13074 # these tests are taken from the GNU fileutils package
13075 echo "checking how to get filesystem space usage" 1>&6
13076 echo "configure:13077: checking how to get filesystem space usage" >&5
13077 space=no
13078
13079 # Test for statvfs64.
13080 if test $space = no; then
13081   # SVR4
13082   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13083 echo "configure:13084: checking statvfs64 function (SVR4)" >&5
13084 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13085   echo $ac_n "(cached) $ac_c" 1>&6
13086 else
13087   if test "$cross_compiling" = yes; then
13088   fu_cv_sys_stat_statvfs64=cross
13089 else
13090   cat > conftest.$ac_ext <<EOF
13091 #line 13092 "configure"
13092 #include "confdefs.h"
13093
13094 #if defined(HAVE_UNISTD_H)
13095 #include <unistd.h>
13096 #endif
13097 #include <sys/types.h>
13098 #include <sys/statvfs.h>
13099   main ()
13100   {
13101     struct statvfs64 fsd;
13102     exit (statvfs64 (".", &fsd));
13103   }
13104 EOF
13105 if { (eval echo configure:13106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13106 then
13107   fu_cv_sys_stat_statvfs64=yes
13108 else
13109   echo "configure: failed program was:" >&5
13110   cat conftest.$ac_ext >&5
13111   rm -fr conftest*
13112   fu_cv_sys_stat_statvfs64=no
13113 fi
13114 rm -fr conftest*
13115 fi
13116
13117 fi
13118
13119 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13120   if test $fu_cv_sys_stat_statvfs64 = yes; then
13121     space=yes
13122     cat >> confdefs.h <<\EOF
13123 #define STAT_STATVFS64 1
13124 EOF
13125
13126   fi
13127 fi
13128
13129 # Perform only the link test since it seems there are no variants of the
13130 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13131 # because that got a false positive on SCO OSR5.  Adding the declaration
13132 # of a `struct statvfs' causes this test to fail (as it should) on such
13133 # systems.  That system is reported to work fine with STAT_STATFS4 which
13134 # is what it gets when this test fails.
13135 if test $space = no; then
13136   # SVR4
13137   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13138 echo "configure:13139: checking statvfs function (SVR4)" >&5
13139 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13140   echo $ac_n "(cached) $ac_c" 1>&6
13141 else
13142   cat > conftest.$ac_ext <<EOF
13143 #line 13144 "configure"
13144 #include "confdefs.h"
13145 #include <sys/types.h>
13146 #include <sys/statvfs.h>
13147 int main() {
13148 struct statvfs fsd; statvfs (0, &fsd);
13149 ; return 0; }
13150 EOF
13151 if { (eval echo configure:13152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13152   rm -rf conftest*
13153   fu_cv_sys_stat_statvfs=yes
13154 else
13155   echo "configure: failed program was:" >&5
13156   cat conftest.$ac_ext >&5
13157   rm -rf conftest*
13158   fu_cv_sys_stat_statvfs=no
13159 fi
13160 rm -f conftest*
13161 fi
13162
13163 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13164   if test $fu_cv_sys_stat_statvfs = yes; then
13165     space=yes
13166     cat >> confdefs.h <<\EOF
13167 #define STAT_STATVFS 1
13168 EOF
13169
13170   fi
13171 fi
13172
13173 if test $space = no; then
13174   # DEC Alpha running OSF/1
13175   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13176 echo "configure:13177: checking for 3-argument statfs function (DEC OSF/1)" >&5
13177   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13178   echo $ac_n "(cached) $ac_c" 1>&6
13179 else
13180   if test "$cross_compiling" = yes; then
13181   fu_cv_sys_stat_statfs3_osf1=no
13182 else
13183   cat > conftest.$ac_ext <<EOF
13184 #line 13185 "configure"
13185 #include "confdefs.h"
13186
13187 #include <sys/param.h>
13188 #include <sys/types.h>
13189 #include <sys/mount.h>
13190   main ()
13191   {
13192     struct statfs fsd;
13193     fsd.f_fsize = 0;
13194     exit (statfs (".", &fsd, sizeof (struct statfs)));
13195   }
13196 EOF
13197 if { (eval echo configure:13198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13198 then
13199   fu_cv_sys_stat_statfs3_osf1=yes
13200 else
13201   echo "configure: failed program was:" >&5
13202   cat conftest.$ac_ext >&5
13203   rm -fr conftest*
13204   fu_cv_sys_stat_statfs3_osf1=no
13205 fi
13206 rm -fr conftest*
13207 fi
13208
13209 fi
13210
13211   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13212   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13213     space=yes
13214     cat >> confdefs.h <<\EOF
13215 #define STAT_STATFS3_OSF1 1
13216 EOF
13217
13218   fi
13219 fi
13220
13221 if test $space = no; then
13222 # AIX
13223   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13224 echo "configure:13225: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13225   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13226   echo $ac_n "(cached) $ac_c" 1>&6
13227 else
13228   if test "$cross_compiling" = yes; then
13229   fu_cv_sys_stat_statfs2_bsize=no
13230 else
13231   cat > conftest.$ac_ext <<EOF
13232 #line 13233 "configure"
13233 #include "confdefs.h"
13234
13235 #ifdef HAVE_SYS_PARAM_H
13236 #include <sys/param.h>
13237 #endif
13238 #ifdef HAVE_SYS_MOUNT_H
13239 #include <sys/mount.h>
13240 #endif
13241 #ifdef HAVE_SYS_VFS_H
13242 #include <sys/vfs.h>
13243 #endif
13244   main ()
13245   {
13246   struct statfs fsd;
13247   fsd.f_bsize = 0;
13248   exit (statfs (".", &fsd));
13249   }
13250 EOF
13251 if { (eval echo configure:13252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13252 then
13253   fu_cv_sys_stat_statfs2_bsize=yes
13254 else
13255   echo "configure: failed program was:" >&5
13256   cat conftest.$ac_ext >&5
13257   rm -fr conftest*
13258   fu_cv_sys_stat_statfs2_bsize=no
13259 fi
13260 rm -fr conftest*
13261 fi
13262
13263 fi
13264
13265   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13266   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13267     space=yes
13268     cat >> confdefs.h <<\EOF
13269 #define STAT_STATFS2_BSIZE 1
13270 EOF
13271
13272   fi
13273 fi
13274
13275 if test $space = no; then
13276 # SVR3
13277   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13278 echo "configure:13279: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13279   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13280   echo $ac_n "(cached) $ac_c" 1>&6
13281 else
13282   if test "$cross_compiling" = yes; then
13283   fu_cv_sys_stat_statfs4=no
13284 else
13285   cat > conftest.$ac_ext <<EOF
13286 #line 13287 "configure"
13287 #include "confdefs.h"
13288 #include <sys/types.h>
13289 #include <sys/statfs.h>
13290   main ()
13291   {
13292   struct statfs fsd;
13293   exit (statfs (".", &fsd, sizeof fsd, 0));
13294   }
13295 EOF
13296 if { (eval echo configure:13297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13297 then
13298   fu_cv_sys_stat_statfs4=yes
13299 else
13300   echo "configure: failed program was:" >&5
13301   cat conftest.$ac_ext >&5
13302   rm -fr conftest*
13303   fu_cv_sys_stat_statfs4=no
13304 fi
13305 rm -fr conftest*
13306 fi
13307
13308 fi
13309
13310   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13311   if test $fu_cv_sys_stat_statfs4 = yes; then
13312     space=yes
13313     cat >> confdefs.h <<\EOF
13314 #define STAT_STATFS4 1
13315 EOF
13316
13317   fi
13318 fi
13319
13320 if test $space = no; then
13321 # 4.4BSD and NetBSD
13322   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13323 echo "configure:13324: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13324   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13325   echo $ac_n "(cached) $ac_c" 1>&6
13326 else
13327   if test "$cross_compiling" = yes; then
13328   fu_cv_sys_stat_statfs2_fsize=no
13329 else
13330   cat > conftest.$ac_ext <<EOF
13331 #line 13332 "configure"
13332 #include "confdefs.h"
13333 #include <sys/types.h>
13334 #ifdef HAVE_SYS_PARAM_H
13335 #include <sys/param.h>
13336 #endif
13337 #ifdef HAVE_SYS_MOUNT_H
13338 #include <sys/mount.h>
13339 #endif
13340   main ()
13341   {
13342   struct statfs fsd;
13343   fsd.f_fsize = 0;
13344   exit (statfs (".", &fsd));
13345   }
13346 EOF
13347 if { (eval echo configure:13348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13348 then
13349   fu_cv_sys_stat_statfs2_fsize=yes
13350 else
13351   echo "configure: failed program was:" >&5
13352   cat conftest.$ac_ext >&5
13353   rm -fr conftest*
13354   fu_cv_sys_stat_statfs2_fsize=no
13355 fi
13356 rm -fr conftest*
13357 fi
13358
13359 fi
13360
13361   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13362   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13363     space=yes
13364     cat >> confdefs.h <<\EOF
13365 #define STAT_STATFS2_FSIZE 1
13366 EOF
13367
13368   fi
13369 fi
13370
13371 if test $space = no; then
13372   # Ultrix
13373   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13374 echo "configure:13375: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13375   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13376   echo $ac_n "(cached) $ac_c" 1>&6
13377 else
13378   if test "$cross_compiling" = yes; then
13379   fu_cv_sys_stat_fs_data=no
13380 else
13381   cat > conftest.$ac_ext <<EOF
13382 #line 13383 "configure"
13383 #include "confdefs.h"
13384 #include <sys/types.h>
13385 #ifdef HAVE_SYS_PARAM_H
13386 #include <sys/param.h>
13387 #endif
13388 #ifdef HAVE_SYS_MOUNT_H
13389 #include <sys/mount.h>
13390 #endif
13391 #ifdef HAVE_SYS_FS_TYPES_H
13392 #include <sys/fs_types.h>
13393 #endif
13394   main ()
13395   {
13396   struct fs_data fsd;
13397   /* Ultrix's statfs returns 1 for success,
13398      0 for not mounted, -1 for failure.  */
13399   exit (statfs (".", &fsd) != 1);
13400   }
13401 EOF
13402 if { (eval echo configure:13403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13403 then
13404   fu_cv_sys_stat_fs_data=yes
13405 else
13406   echo "configure: failed program was:" >&5
13407   cat conftest.$ac_ext >&5
13408   rm -fr conftest*
13409   fu_cv_sys_stat_fs_data=no
13410 fi
13411 rm -fr conftest*
13412 fi
13413
13414 fi
13415
13416   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13417   if test $fu_cv_sys_stat_fs_data = yes; then
13418     space=yes
13419     cat >> confdefs.h <<\EOF
13420 #define STAT_STATFS2_FS_DATA 1
13421 EOF
13422
13423   fi
13424 fi
13425
13426 #
13427 # As a gating factor for large file support, in order to
13428 # use <4GB files we must have the following minimal support
13429 # available.
13430 # long long, and a 64 bit off_t or off64_t.
13431 # If we don't have all of these then disable large
13432 # file support.
13433 #
13434 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13435 echo "configure:13436: checking if large file support can be enabled" >&5
13436 cat > conftest.$ac_ext <<EOF
13437 #line 13438 "configure"
13438 #include "confdefs.h"
13439
13440 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13441 #include <sys/types.h>
13442 #else
13443 __COMPILE_ERROR_
13444 #endif
13445
13446 int main() {
13447 int i
13448 ; return 0; }
13449 EOF
13450 if { (eval echo configure:13451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13451   rm -rf conftest*
13452   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13453 else
13454   echo "configure: failed program was:" >&5
13455   cat conftest.$ac_ext >&5
13456   rm -rf conftest*
13457   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13458 fi
13459 rm -f conftest*
13460 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13461     cat >> confdefs.h <<\EOF
13462 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13463 EOF
13464
13465 fi
13466 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13467
13468 # Check whether --with-spinlocks or --without-spinlocks was given.
13469 if test "${with_spinlocks+set}" = set; then
13470   withval="$with_spinlocks"
13471   :
13472 fi
13473
13474 if test "x$with_spinlocks" = "xyes"; then
13475     cat >> confdefs.h <<\EOF
13476 #define USE_SPINLOCKS 1
13477 EOF
13478
13479
13480     case "$host_cpu" in
13481         sparc)
13482             cat >> confdefs.h <<\EOF
13483 #define SPARC_SPINLOCKS 1
13484 EOF
13485
13486             ;;
13487
13488         i386|i486|i586|i686)
13489             cat >> confdefs.h <<\EOF
13490 #define INTEL_SPINLOCKS 1
13491 EOF
13492
13493             ;;
13494
13495         mips)
13496             cat >> confdefs.h <<\EOF
13497 #define MIPS_SPINLOCKS 1
13498 EOF
13499
13500             ;;
13501
13502         powerpc)
13503             cat >> confdefs.h <<\EOF
13504 #define POWERPC_SPINLOCKS 1
13505 EOF
13506
13507             ;;
13508     esac
13509 fi
13510
13511 #################################################
13512 # check for ACL support
13513
13514 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13515 echo "configure:13516: checking whether to support ACLs" >&5
13516 # Check whether --with-acl-support or --without-acl-support was given.
13517 if test "${with_acl_support+set}" = set; then
13518   withval="$with_acl_support"
13519    case "$withval" in
13520   yes)
13521
13522         case "$host_os" in
13523         *sysv5*)
13524                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13525                 cat >> confdefs.h <<\EOF
13526 #define HAVE_UNIXWARE_ACLS 1
13527 EOF
13528
13529                 ;;
13530         *solaris*)
13531                 echo "$ac_t""Using solaris ACLs" 1>&6
13532                 cat >> confdefs.h <<\EOF
13533 #define HAVE_SOLARIS_ACLS 1
13534 EOF
13535
13536                 ;;
13537         *hpux*)
13538                 echo "$ac_t""Using HPUX ACLs" 1>&6
13539                 cat >> confdefs.h <<\EOF
13540 #define HAVE_HPUX_ACLS 1
13541 EOF
13542
13543                 ;;
13544         *irix*)
13545                 echo "$ac_t""Using IRIX ACLs" 1>&6
13546                 cat >> confdefs.h <<\EOF
13547 #define HAVE_IRIX_ACLS 1
13548 EOF
13549
13550                 ;;
13551         *aix*)
13552                 echo "$ac_t""Using AIX ACLs" 1>&6
13553                 cat >> confdefs.h <<\EOF
13554 #define HAVE_AIX_ACLS 1
13555 EOF
13556
13557                 ;;
13558         *osf*)
13559                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13560                 cat >> confdefs.h <<\EOF
13561 #define HAVE_TRU64_ACLS 1
13562 EOF
13563
13564                 LIBS="$LIBS -lpacl"
13565                 ;;
13566         *)
13567                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13568 echo "configure:13569: checking for acl_get_file in -lacl" >&5
13569 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13570 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13571   echo $ac_n "(cached) $ac_c" 1>&6
13572 else
13573   ac_save_LIBS="$LIBS"
13574 LIBS="-lacl  $LIBS"
13575 cat > conftest.$ac_ext <<EOF
13576 #line 13577 "configure"
13577 #include "confdefs.h"
13578 /* Override any gcc2 internal prototype to avoid an error.  */
13579 /* We use char because int might match the return type of a gcc2
13580     builtin and then its argument prototype would still apply.  */
13581 char acl_get_file();
13582
13583 int main() {
13584 acl_get_file()
13585 ; return 0; }
13586 EOF
13587 if { (eval echo configure:13588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13588   rm -rf conftest*
13589   eval "ac_cv_lib_$ac_lib_var=yes"
13590 else
13591   echo "configure: failed program was:" >&5
13592   cat conftest.$ac_ext >&5
13593   rm -rf conftest*
13594   eval "ac_cv_lib_$ac_lib_var=no"
13595 fi
13596 rm -f conftest*
13597 LIBS="$ac_save_LIBS"
13598
13599 fi
13600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13601   echo "$ac_t""yes" 1>&6
13602     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13603     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13604   cat >> confdefs.h <<EOF
13605 #define $ac_tr_lib 1
13606 EOF
13607
13608   LIBS="-lacl $LIBS"
13609
13610 else
13611   echo "$ac_t""no" 1>&6
13612 fi
13613
13614                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13615 echo "configure:13616: checking for ACL support" >&5
13616 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13617   echo $ac_n "(cached) $ac_c" 1>&6
13618 else
13619   
13620                 cat > conftest.$ac_ext <<EOF
13621 #line 13622 "configure"
13622 #include "confdefs.h"
13623 #include <sys/types.h>
13624 #include <sys/acl.h>
13625 int main() {
13626  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13627 ; return 0; }
13628 EOF
13629 if { (eval echo configure:13630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13630   rm -rf conftest*
13631   samba_cv_HAVE_POSIX_ACLS=yes
13632 else
13633   echo "configure: failed program was:" >&5
13634   cat conftest.$ac_ext >&5
13635   rm -rf conftest*
13636   samba_cv_HAVE_POSIX_ACLS=no
13637 fi
13638 rm -f conftest*
13639 fi
13640
13641 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13642                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13643                                 echo "$ac_t""Using posix ACLs" 1>&6
13644                                 cat >> confdefs.h <<\EOF
13645 #define HAVE_POSIX_ACLS 1
13646 EOF
13647
13648                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13649 echo "configure:13650: checking for acl_get_perm_np" >&5
13650 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13651   echo $ac_n "(cached) $ac_c" 1>&6
13652 else
13653   
13654                                 cat > conftest.$ac_ext <<EOF
13655 #line 13656 "configure"
13656 #include "confdefs.h"
13657 #include <sys/types.h>
13658 #include <sys/acl.h>
13659 int main() {
13660  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13661 ; return 0; }
13662 EOF
13663 if { (eval echo configure:13664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13664   rm -rf conftest*
13665   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13666 else
13667   echo "configure: failed program was:" >&5
13668   cat conftest.$ac_ext >&5
13669   rm -rf conftest*
13670   samba_cv_HAVE_ACL_GET_PERM_NP=no
13671 fi
13672 rm -f conftest*
13673 fi
13674
13675 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13676                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13677                                         cat >> confdefs.h <<\EOF
13678 #define HAVE_ACL_GET_PERM_NP 1
13679 EOF
13680
13681                                 fi
13682                         fi
13683             ;;
13684         esac
13685         ;;
13686   *)
13687     echo "$ac_t""no" 1>&6
13688     cat >> confdefs.h <<\EOF
13689 #define HAVE_NO_ACLS 1
13690 EOF
13691
13692     ;;
13693   esac 
13694 else
13695   cat >> confdefs.h <<\EOF
13696 #define HAVE_NO_ACLS 1
13697 EOF
13698
13699   echo "$ac_t""no" 1>&6
13700
13701 fi
13702
13703
13704 #################################################
13705 # Check whether winbind is supported on this platform.  If so we need to
13706 # build and install client programs (WINBIND_TARGETS), sbin programs
13707 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13708
13709 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13710 echo "configure:13711: checking whether to build winbind" >&5
13711
13712 # Initially, the value of $host_os decides whether winbind is supported
13713
13714 case "$host_os" in
13715         *linux*|*irix*)
13716                 HAVE_WINBIND=yes
13717                 ;;
13718         *solaris*)
13719                 HAVE_WINBIND=yes
13720                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13721                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
13722                 ;;
13723         *hpux11*)
13724                 HAVE_WINBIND=yes
13725                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13726                 ;;
13727         *)
13728                 HAVE_WINBIND=no
13729                 winbind_no_reason=", unsupported on $host_os"
13730                 ;;
13731 esac
13732
13733 # Check the setting of --with-winbindd
13734
13735 # Check whether --with-winbind or --without-winbind was given.
13736 if test "${with_winbind+set}" = set; then
13737   withval="$with_winbind"
13738    
13739   case "$withval" in
13740         yes)
13741                 HAVE_WINBIND=yes
13742                 ;;
13743         no)
13744                 HAVE_WINBIND=no
13745                 winbind_reason=""
13746                 ;;
13747   esac 
13748 fi
13749
13750
13751 # We need unix domain sockets for winbind
13752
13753 if test x"$HAVE_WINBIND" = x"yes"; then
13754         if test x"$samba_cv_unixsocket" = x"no"; then
13755                 winbind_no_reason=", no unix domain socket support on $host_os"
13756                 HAVE_WINBIND=no
13757         fi
13758 fi
13759
13760 # Display test results
13761
13762 WINBIND_TARGETS=""
13763 WINBIND_STARGETS=""
13764 WINBIND_LTARGETS=""
13765 WINBIND_PAM_PROGS=""
13766
13767 if test x"$HAVE_WINBIND" = x"yes"; then
13768         echo "$ac_t""yes" 1>&6
13769
13770         WINBIND_TARGETS="bin/wbinfo"
13771         WINBIND_STARGETS="bin/winbindd"
13772         if test x"$BLDSHARED" = x"true"; then
13773                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13774                 if test x"$with_pam" = x"yes"; then
13775                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13776                 fi
13777         fi
13778 else
13779         echo "$ac_t""no$winbind_no_reason" 1>&6
13780 fi
13781
13782
13783 # Substitution time!
13784
13785
13786
13787
13788
13789
13790
13791
13792 # Solaris has some extra fields in struct passwd that need to be
13793 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
13794 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
13795 # this. 
13796
13797 #AC_CHECK_MEMBER(struct passwd.pw_comment,
13798 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
13799 #               [#include <pwd.h>])
13800
13801 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
13802 echo "configure:13803: checking whether struct passwd has pw_comment" >&5
13803 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
13804   echo $ac_n "(cached) $ac_c" 1>&6
13805 else
13806   
13807     cat > conftest.$ac_ext <<EOF
13808 #line 13809 "configure"
13809 #include "confdefs.h"
13810 #include <pwd.h>
13811 int main() {
13812 struct passwd p; p.pw_comment;
13813 ; return 0; }
13814 EOF
13815 if { (eval echo configure:13816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13816   rm -rf conftest*
13817   samba_cv_passwd_pw_comment=yes
13818 else
13819   echo "configure: failed program was:" >&5
13820   cat conftest.$ac_ext >&5
13821   rm -rf conftest*
13822   samba_cv_passwd_pw_comment=no
13823 fi
13824 rm -f conftest*
13825 fi
13826
13827 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
13828 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
13829    cat >> confdefs.h <<\EOF
13830 #define HAVE_PASSWD_PW_COMMENT 1
13831 EOF
13832
13833 fi
13834
13835 #AC_CHECK_MEMBER(struct passwd.pw_age,
13836 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
13837 #               [#include <pwd.h>])
13838
13839 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
13840 echo "configure:13841: checking whether struct passwd has pw_age" >&5
13841 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
13842   echo $ac_n "(cached) $ac_c" 1>&6
13843 else
13844   
13845     cat > conftest.$ac_ext <<EOF
13846 #line 13847 "configure"
13847 #include "confdefs.h"
13848 #include <pwd.h>
13849 int main() {
13850 struct passwd p; p.pw_age;
13851 ; return 0; }
13852 EOF
13853 if { (eval echo configure:13854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13854   rm -rf conftest*
13855   samba_cv_passwd_pw_age=yes
13856 else
13857   echo "configure: failed program was:" >&5
13858   cat conftest.$ac_ext >&5
13859   rm -rf conftest*
13860   samba_cv_passwd_pw_age=no
13861 fi
13862 rm -f conftest*
13863 fi
13864
13865 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
13866 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
13867    cat >> confdefs.h <<\EOF
13868 #define HAVE_PASSWD_PW_AGE 1
13869 EOF
13870
13871 fi
13872
13873 #################################################
13874 # Check to see if we should use the included popt 
13875
13876 # Check whether --with-included-popt or --without-included-popt was given.
13877 if test "${with_included_popt+set}" = set; then
13878   withval="$with_included_popt"
13879    
13880   case "$withval" in
13881         yes)
13882                 INCLUDED_POPT=yes
13883                 ;;
13884         no)
13885                 INCLUDED_POPT=no
13886                 ;;
13887   esac 
13888 fi
13889
13890 if test x"$INCLUDED_POPT" != x"yes"; then
13891     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13892 echo "configure:13893: checking for poptGetContext in -lpopt" >&5
13893 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13894 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13895   echo $ac_n "(cached) $ac_c" 1>&6
13896 else
13897   ac_save_LIBS="$LIBS"
13898 LIBS="-lpopt  $LIBS"
13899 cat > conftest.$ac_ext <<EOF
13900 #line 13901 "configure"
13901 #include "confdefs.h"
13902 /* Override any gcc2 internal prototype to avoid an error.  */
13903 /* We use char because int might match the return type of a gcc2
13904     builtin and then its argument prototype would still apply.  */
13905 char poptGetContext();
13906
13907 int main() {
13908 poptGetContext()
13909 ; return 0; }
13910 EOF
13911 if { (eval echo configure:13912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13912   rm -rf conftest*
13913   eval "ac_cv_lib_$ac_lib_var=yes"
13914 else
13915   echo "configure: failed program was:" >&5
13916   cat conftest.$ac_ext >&5
13917   rm -rf conftest*
13918   eval "ac_cv_lib_$ac_lib_var=no"
13919 fi
13920 rm -f conftest*
13921 LIBS="$ac_save_LIBS"
13922
13923 fi
13924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13925   echo "$ac_t""yes" 1>&6
13926   INCLUDED_POPT=no
13927 else
13928   echo "$ac_t""no" 1>&6
13929 INCLUDED_POPT=yes
13930 fi
13931
13932 fi
13933
13934 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13935 echo "configure:13936: checking whether to use included popt" >&5
13936 if test x"$INCLUDED_POPT" = x"yes"; then
13937     echo "$ac_t""$srcdir/popt" 1>&6
13938     BUILD_POPT='$(POPT_OBJS)'
13939     FLAGS1="-I$srcdir/popt"
13940 else
13941     echo "$ac_t""no" 1>&6
13942     LIBS="$LIBS -lpopt"
13943 fi
13944
13945
13946
13947 #################################################
13948 # do extra things if we are running insure
13949
13950 if test "${ac_cv_prog_CC}" = "insure"; then
13951         CPPFLAGS="$CPPFLAGS -D__INSURE__"
13952 fi
13953
13954 #################################################
13955 # final configure stuff
13956
13957 echo $ac_n "checking configure summary""... $ac_c" 1>&6
13958 echo "configure:13959: checking configure summary" >&5
13959 if test "$cross_compiling" = yes; then
13960   echo "configure: warning: cannot run when cross-compiling" 1>&2
13961 else
13962   cat > conftest.$ac_ext <<EOF
13963 #line 13964 "configure"
13964 #include "confdefs.h"
13965 #include "${srcdir-.}/tests/summary.c"
13966 EOF
13967 if { (eval echo configure:13968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13968 then
13969   echo "$ac_t""yes" 1>&6
13970 else
13971   echo "configure: failed program was:" >&5
13972   cat conftest.$ac_ext >&5
13973   rm -fr conftest*
13974   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
13975 fi
13976 rm -fr conftest*
13977 fi
13978
13979
13980 builddir=`pwd`
13981
13982
13983 trap '' 1 2 15
13984 cat > confcache <<\EOF
13985 # This file is a shell script that caches the results of configure
13986 # tests run on this system so they can be shared between configure
13987 # scripts and configure runs.  It is not useful on other systems.
13988 # If it contains results you don't want to keep, you may remove or edit it.
13989 #
13990 # By default, configure uses ./config.cache as the cache file,
13991 # creating it if it does not exist already.  You can give configure
13992 # the --cache-file=FILE option to use a different cache file; that is
13993 # what configure does when it calls configure scripts in
13994 # subdirectories, so they share the cache.
13995 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13996 # config.status only pays attention to the cache file if you give it the
13997 # --recheck option to rerun configure.
13998 #
13999 EOF
14000 # The following way of writing the cache mishandles newlines in values,
14001 # but we know of no workaround that is simple, portable, and efficient.
14002 # So, don't put newlines in cache variables' values.
14003 # Ultrix sh set writes to stderr and can't be redirected directly,
14004 # and sets the high bit in the cache file unless we assign to the vars.
14005 (set) 2>&1 |
14006   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14007   *ac_space=\ *)
14008     # `set' does not quote correctly, so add quotes (double-quote substitution
14009     # turns \\\\ into \\, and sed turns \\ into \).
14010     sed -n \
14011       -e "s/'/'\\\\''/g" \
14012       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14013     ;;
14014   *)
14015     # `set' quotes correctly as required by POSIX, so do not add quotes.
14016     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14017     ;;
14018   esac >> confcache
14019 if cmp -s $cache_file confcache; then
14020   :
14021 else
14022   if test -w $cache_file; then
14023     echo "updating cache $cache_file"
14024     cat confcache > $cache_file
14025   else
14026     echo "not updating unwritable cache $cache_file"
14027   fi
14028 fi
14029 rm -f confcache
14030
14031 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14032
14033 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14034 # Let make expand exec_prefix.
14035 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14036
14037 # Any assignment to VPATH causes Sun make to only execute
14038 # the first set of double-colon rules, so remove it if not needed.
14039 # If there is a colon in the path, we need to keep it.
14040 if test "x$srcdir" = x.; then
14041   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14042 fi
14043
14044 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14045
14046 DEFS=-DHAVE_CONFIG_H
14047
14048 # Without the "./", some shells look in PATH for config.status.
14049 : ${CONFIG_STATUS=./config.status}
14050
14051 echo creating $CONFIG_STATUS
14052 rm -f $CONFIG_STATUS
14053 cat > $CONFIG_STATUS <<EOF
14054 #! /bin/sh
14055 # Generated automatically by configure.
14056 # Run this file to recreate the current configuration.
14057 # This directory was configured as follows,
14058 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14059 #
14060 # $0 $ac_configure_args
14061 #
14062 # Compiler output produced by configure, useful for debugging
14063 # configure, is in ./config.log if it exists.
14064
14065 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14066 for ac_option
14067 do
14068   case "\$ac_option" in
14069   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14070     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14071     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14072   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14073     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14074     exit 0 ;;
14075   -help | --help | --hel | --he | --h)
14076     echo "\$ac_cs_usage"; exit 0 ;;
14077   *) echo "\$ac_cs_usage"; exit 1 ;;
14078   esac
14079 done
14080
14081 ac_given_srcdir=$srcdir
14082 ac_given_INSTALL="$INSTALL"
14083
14084 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14085 EOF
14086 cat >> $CONFIG_STATUS <<EOF
14087
14088 # Protect against being on the right side of a sed subst in config.status.
14089 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14090  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14091 $ac_vpsub
14092 $extrasub
14093 s%@SHELL@%$SHELL%g
14094 s%@CFLAGS@%$CFLAGS%g
14095 s%@CPPFLAGS@%$CPPFLAGS%g
14096 s%@CXXFLAGS@%$CXXFLAGS%g
14097 s%@FFLAGS@%$FFLAGS%g
14098 s%@DEFS@%$DEFS%g
14099 s%@LDFLAGS@%$LDFLAGS%g
14100 s%@LIBS@%$LIBS%g
14101 s%@exec_prefix@%$exec_prefix%g
14102 s%@prefix@%$prefix%g
14103 s%@program_transform_name@%$program_transform_name%g
14104 s%@bindir@%$bindir%g
14105 s%@sbindir@%$sbindir%g
14106 s%@libexecdir@%$libexecdir%g
14107 s%@datadir@%$datadir%g
14108 s%@sysconfdir@%$sysconfdir%g
14109 s%@sharedstatedir@%$sharedstatedir%g
14110 s%@localstatedir@%$localstatedir%g
14111 s%@libdir@%$libdir%g
14112 s%@includedir@%$includedir%g
14113 s%@oldincludedir@%$oldincludedir%g
14114 s%@infodir@%$infodir%g
14115 s%@mandir@%$mandir%g
14116 s%@configdir@%$configdir%g
14117 s%@lockdir@%$lockdir%g
14118 s%@piddir@%$piddir%g
14119 s%@logfilebase@%$logfilebase%g
14120 s%@privatedir@%$privatedir%g
14121 s%@swatdir@%$swatdir%g
14122 s%@RUNPROG@%$RUNPROG%g
14123 s%@MPROGS@%$MPROGS%g
14124 s%@LDSHFLAGS@%$LDSHFLAGS%g
14125 s%@SONAMEFLAG@%$SONAMEFLAG%g
14126 s%@SHLD@%$SHLD%g
14127 s%@HOST_OS@%$HOST_OS%g
14128 s%@PAM_MOD@%$PAM_MOD%g
14129 s%@WRAP@%$WRAP%g
14130 s%@WRAP32@%$WRAP32%g
14131 s%@WRAPPROG@%$WRAPPROG%g
14132 s%@PICFLAG@%$PICFLAG%g
14133 s%@PICSUFFIX@%$PICSUFFIX%g
14134 s%@POBAD_CC@%$POBAD_CC%g
14135 s%@SHLIBEXT@%$SHLIBEXT%g
14136 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14137 s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g
14138 s%@CC@%$CC%g
14139 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14140 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14141 s%@INSTALL_DATA@%$INSTALL_DATA%g
14142 s%@AWK@%$AWK%g
14143 s%@BROKEN_CC@%$BROKEN_CC%g
14144 s%@host@%$host%g
14145 s%@host_alias@%$host_alias%g
14146 s%@host_cpu@%$host_cpu%g
14147 s%@host_vendor@%$host_vendor%g
14148 s%@host_os@%$host_os%g
14149 s%@target@%$target%g
14150 s%@target_alias@%$target_alias%g
14151 s%@target_cpu@%$target_cpu%g
14152 s%@target_vendor@%$target_vendor%g
14153 s%@target_os@%$target_os%g
14154 s%@build@%$build%g
14155 s%@build_alias@%$build_alias%g
14156 s%@build_cpu@%$build_cpu%g
14157 s%@build_vendor@%$build_vendor%g
14158 s%@build_os@%$build_os%g
14159 s%@CPP@%$CPP%g
14160 s%@CUPS_CONFIG@%$CUPS_CONFIG%g
14161 s%@LIBOBJS@%$LIBOBJS%g
14162 s%@TERMLIBS@%$TERMLIBS%g
14163 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14164 s%@ROFF@%$ROFF%g
14165 s%@DYNEXP@%$DYNEXP%g
14166 s%@QUOTAOBJS@%$QUOTAOBJS%g
14167 s%@manlangs@%$manlangs%g
14168 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14169 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14170 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14171 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14172 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14173 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14174 s%@BUILD_POPT@%$BUILD_POPT%g
14175 s%@FLAGS1@%$FLAGS1%g
14176 s%@builddir@%$builddir%g
14177
14178 CEOF
14179 EOF
14180
14181 cat >> $CONFIG_STATUS <<\EOF
14182
14183 # Split the substitutions into bite-sized pieces for seds with
14184 # small command number limits, like on Digital OSF/1 and HP-UX.
14185 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14186 ac_file=1 # Number of current file.
14187 ac_beg=1 # First line for current file.
14188 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14189 ac_more_lines=:
14190 ac_sed_cmds=""
14191 while $ac_more_lines; do
14192   if test $ac_beg -gt 1; then
14193     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14194   else
14195     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14196   fi
14197   if test ! -s conftest.s$ac_file; then
14198     ac_more_lines=false
14199     rm -f conftest.s$ac_file
14200   else
14201     if test -z "$ac_sed_cmds"; then
14202       ac_sed_cmds="sed -f conftest.s$ac_file"
14203     else
14204       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14205     fi
14206     ac_file=`expr $ac_file + 1`
14207     ac_beg=$ac_end
14208     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14209   fi
14210 done
14211 if test -z "$ac_sed_cmds"; then
14212   ac_sed_cmds=cat
14213 fi
14214 EOF
14215
14216 cat >> $CONFIG_STATUS <<EOF
14217
14218 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb"}
14219 EOF
14220 cat >> $CONFIG_STATUS <<\EOF
14221 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14222   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14223   case "$ac_file" in
14224   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14225        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14226   *) ac_file_in="${ac_file}.in" ;;
14227   esac
14228
14229   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14230
14231   # Remove last slash and all that follows it.  Not all systems have dirname.
14232   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14233   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14234     # The file is in a subdirectory.
14235     test ! -d "$ac_dir" && mkdir "$ac_dir"
14236     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14237     # A "../" for each directory in $ac_dir_suffix.
14238     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14239   else
14240     ac_dir_suffix= ac_dots=
14241   fi
14242
14243   case "$ac_given_srcdir" in
14244   .)  srcdir=.
14245       if test -z "$ac_dots"; then top_srcdir=.
14246       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14247   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14248   *) # Relative path.
14249     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14250     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14251   esac
14252
14253   case "$ac_given_INSTALL" in
14254   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14255   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14256   esac
14257
14258   echo creating "$ac_file"
14259   rm -f "$ac_file"
14260   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14261   case "$ac_file" in
14262   *Makefile*) ac_comsub="1i\\
14263 # $configure_input" ;;
14264   *) ac_comsub= ;;
14265   esac
14266
14267   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14268   sed -e "$ac_comsub
14269 s%@configure_input@%$configure_input%g
14270 s%@srcdir@%$srcdir%g
14271 s%@top_srcdir@%$top_srcdir%g
14272 s%@INSTALL@%$INSTALL%g
14273 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14274 fi; done
14275 rm -f conftest.s*
14276
14277 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14278 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14279 #
14280 # ac_d sets the value in "#define NAME VALUE" lines.
14281 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14282 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14283 ac_dC='\3'
14284 ac_dD='%g'
14285 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14286 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14287 ac_uB='\([      ]\)%\1#\2define\3'
14288 ac_uC=' '
14289 ac_uD='\4%g'
14290 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14291 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14292 ac_eB='$%\1#\2define\3'
14293 ac_eC=' '
14294 ac_eD='%g'
14295
14296 if test "${CONFIG_HEADERS+set}" != set; then
14297 EOF
14298 cat >> $CONFIG_STATUS <<EOF
14299   CONFIG_HEADERS="include/config.h"
14300 EOF
14301 cat >> $CONFIG_STATUS <<\EOF
14302 fi
14303 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14304   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14305   case "$ac_file" in
14306   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14307        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14308   *) ac_file_in="${ac_file}.in" ;;
14309   esac
14310
14311   echo creating $ac_file
14312
14313   rm -f conftest.frag conftest.in conftest.out
14314   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14315   cat $ac_file_inputs > conftest.in
14316
14317 EOF
14318
14319 # Transform confdefs.h into a sed script conftest.vals that substitutes
14320 # the proper values into config.h.in to produce config.h.  And first:
14321 # Protect against being on the right side of a sed subst in config.status.
14322 # Protect against being in an unquoted here document in config.status.
14323 rm -f conftest.vals
14324 cat > conftest.hdr <<\EOF
14325 s/[\\&%]/\\&/g
14326 s%[\\$`]%\\&%g
14327 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14328 s%ac_d%ac_u%gp
14329 s%ac_u%ac_e%gp
14330 EOF
14331 sed -n -f conftest.hdr confdefs.h > conftest.vals
14332 rm -f conftest.hdr
14333
14334 # This sed command replaces #undef with comments.  This is necessary, for
14335 # example, in the case of _POSIX_SOURCE, which is predefined and required
14336 # on some systems where configure will not decide to define it.
14337 cat >> conftest.vals <<\EOF
14338 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14339 EOF
14340
14341 # Break up conftest.vals because some shells have a limit on
14342 # the size of here documents, and old seds have small limits too.
14343
14344 rm -f conftest.tail
14345 while :
14346 do
14347   ac_lines=`grep -c . conftest.vals`
14348   # grep -c gives empty output for an empty file on some AIX systems.
14349   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14350   # Write a limited-size here document to conftest.frag.
14351   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14352   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14353   echo 'CEOF
14354   sed -f conftest.frag conftest.in > conftest.out
14355   rm -f conftest.in
14356   mv conftest.out conftest.in
14357 ' >> $CONFIG_STATUS
14358   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14359   rm -f conftest.vals
14360   mv conftest.tail conftest.vals
14361 done
14362 rm -f conftest.vals
14363
14364 cat >> $CONFIG_STATUS <<\EOF
14365   rm -f conftest.frag conftest.h
14366   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14367   cat conftest.in >> conftest.h
14368   rm -f conftest.in
14369   if cmp -s $ac_file conftest.h 2>/dev/null; then
14370     echo "$ac_file is unchanged"
14371     rm -f conftest.h
14372   else
14373     # Remove last slash and all that follows it.  Not all systems have dirname.
14374       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14375       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14376       # The file is in a subdirectory.
14377       test ! -d "$ac_dir" && mkdir "$ac_dir"
14378     fi
14379     rm -f $ac_file
14380     mv conftest.h $ac_file
14381   fi
14382 fi; done
14383
14384 EOF
14385 cat >> $CONFIG_STATUS <<EOF
14386
14387 EOF
14388 cat >> $CONFIG_STATUS <<\EOF
14389
14390 exit 0
14391 EOF
14392 chmod +x $CONFIG_STATUS
14393 rm -fr confdefs* $ac_clean_files
14394 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14395
14396
14397 #################################################
14398 # Print very concise instructions on building/use
14399 if test "x$enable_dmalloc" = xyes
14400 then
14401         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14402         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14403 fi