06694c8e64a87c6c042a806bde5c704b2e26af9d
[kai/samba.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --with-fhs              Use FHS-compliant paths (default=no)"
17 ac_help="$ac_help
18   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
19 ac_help="$ac_help
20   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
21 ac_help="$ac_help
22   --with-piddir=DIR       Where to put pid files ($ac_default_prefix/var/locks)"
23 ac_help="$ac_help
24   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
25 ac_help="$ac_help
26   --with-configdir=DIR    Where to put configuration files (\$libdir)"
27 ac_help="$ac_help
28   --with-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 gawk mawk 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 int main()
2871 {
2872   FILE *f=fopen("conftestval", "w");
2873   if (!f) return(1);
2874   fprintf(f, "%d\n", sizeof(int));
2875   return(0);
2876 }
2877 EOF
2878 if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2879 then
2880   ac_cv_sizeof_int=`cat conftestval`
2881 else
2882   echo "configure: failed program was:" >&5
2883   cat conftest.$ac_ext >&5
2884   rm -fr conftest*
2885   ac_cv_sizeof_int=0
2886 fi
2887 rm -fr conftest*
2888 fi
2889
2890 fi
2891 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2892 cat >> confdefs.h <<EOF
2893 #define SIZEOF_INT $ac_cv_sizeof_int
2894 EOF
2895
2896
2897 echo $ac_n "checking size of long""... $ac_c" 1>&6
2898 echo "configure:2899: checking size of long" >&5
2899 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2900   echo $ac_n "(cached) $ac_c" 1>&6
2901 else
2902   if test "$cross_compiling" = yes; then
2903   ac_cv_sizeof_long=cross
2904 else
2905   cat > conftest.$ac_ext <<EOF
2906 #line 2907 "configure"
2907 #include "confdefs.h"
2908 #include <stdio.h>
2909 int main()
2910 {
2911   FILE *f=fopen("conftestval", "w");
2912   if (!f) return(1);
2913   fprintf(f, "%d\n", sizeof(long));
2914   return(0);
2915 }
2916 EOF
2917 if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2918 then
2919   ac_cv_sizeof_long=`cat conftestval`
2920 else
2921   echo "configure: failed program was:" >&5
2922   cat conftest.$ac_ext >&5
2923   rm -fr conftest*
2924   ac_cv_sizeof_long=0
2925 fi
2926 rm -fr conftest*
2927 fi
2928
2929 fi
2930 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2931 cat >> confdefs.h <<EOF
2932 #define SIZEOF_LONG $ac_cv_sizeof_long
2933 EOF
2934
2935
2936 echo $ac_n "checking size of short""... $ac_c" 1>&6
2937 echo "configure:2938: checking size of short" >&5
2938 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2939   echo $ac_n "(cached) $ac_c" 1>&6
2940 else
2941   if test "$cross_compiling" = yes; then
2942   ac_cv_sizeof_short=cross
2943 else
2944   cat > conftest.$ac_ext <<EOF
2945 #line 2946 "configure"
2946 #include "confdefs.h"
2947 #include <stdio.h>
2948 int main()
2949 {
2950   FILE *f=fopen("conftestval", "w");
2951   if (!f) return(1);
2952   fprintf(f, "%d\n", sizeof(short));
2953   return(0);
2954 }
2955 EOF
2956 if { (eval echo configure:2957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2957 then
2958   ac_cv_sizeof_short=`cat conftestval`
2959 else
2960   echo "configure: failed program was:" >&5
2961   cat conftest.$ac_ext >&5
2962   rm -fr conftest*
2963   ac_cv_sizeof_short=0
2964 fi
2965 rm -fr conftest*
2966 fi
2967
2968 fi
2969 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2970 cat >> confdefs.h <<EOF
2971 #define SIZEOF_SHORT $ac_cv_sizeof_short
2972 EOF
2973
2974
2975
2976 echo $ac_n "checking for working const""... $ac_c" 1>&6
2977 echo "configure:2978: checking for working const" >&5
2978 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2979   echo $ac_n "(cached) $ac_c" 1>&6
2980 else
2981   cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2984
2985 int main() {
2986
2987 /* Ultrix mips cc rejects this.  */
2988 typedef int charset[2]; const charset x;
2989 /* SunOS 4.1.1 cc rejects this.  */
2990 char const *const *ccp;
2991 char **p;
2992 /* NEC SVR4.0.2 mips cc rejects this.  */
2993 struct point {int x, y;};
2994 static struct point const zero = {0,0};
2995 /* AIX XL C 1.02.0.0 rejects this.
2996    It does not let you subtract one const X* pointer from another in an arm
2997    of an if-expression whose if-part is not a constant expression */
2998 const char *g = "string";
2999 ccp = &g + (g ? g-g : 0);
3000 /* HPUX 7.0 cc rejects these. */
3001 ++ccp;
3002 p = (char**) ccp;
3003 ccp = (char const *const *) p;
3004 { /* SCO 3.2v4 cc rejects this.  */
3005   char *t;
3006   char const *s = 0 ? (char *) 0 : (char const *) 0;
3007
3008   *t++ = 0;
3009 }
3010 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3011   int x[] = {25, 17};
3012   const int *foo = &x[0];
3013   ++foo;
3014 }
3015 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3016   typedef const int *iptr;
3017   iptr p = 0;
3018   ++p;
3019 }
3020 { /* AIX XL C 1.02.0.0 rejects this saying
3021      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3022   struct s { int j; const int *ap[3]; };
3023   struct s *b; b->j = 5;
3024 }
3025 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3026   const int foo = 10;
3027 }
3028
3029 ; return 0; }
3030 EOF
3031 if { (eval echo configure:3032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3032   rm -rf conftest*
3033   ac_cv_c_const=yes
3034 else
3035   echo "configure: failed program was:" >&5
3036   cat conftest.$ac_ext >&5
3037   rm -rf conftest*
3038   ac_cv_c_const=no
3039 fi
3040 rm -f conftest*
3041 fi
3042
3043 echo "$ac_t""$ac_cv_c_const" 1>&6
3044 if test $ac_cv_c_const = no; then
3045   cat >> confdefs.h <<\EOF
3046 #define const 
3047 EOF
3048
3049 fi
3050
3051 echo $ac_n "checking for inline""... $ac_c" 1>&6
3052 echo "configure:3053: checking for inline" >&5
3053 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3054   echo $ac_n "(cached) $ac_c" 1>&6
3055 else
3056   ac_cv_c_inline=no
3057 for ac_kw in inline __inline__ __inline; do
3058   cat > conftest.$ac_ext <<EOF
3059 #line 3060 "configure"
3060 #include "confdefs.h"
3061
3062 int main() {
3063 } $ac_kw foo() {
3064 ; return 0; }
3065 EOF
3066 if { (eval echo configure:3067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3067   rm -rf conftest*
3068   ac_cv_c_inline=$ac_kw; break
3069 else
3070   echo "configure: failed program was:" >&5
3071   cat conftest.$ac_ext >&5
3072 fi
3073 rm -f conftest*
3074 done
3075
3076 fi
3077
3078 echo "$ac_t""$ac_cv_c_inline" 1>&6
3079 case "$ac_cv_c_inline" in
3080   inline | yes) ;;
3081   no) cat >> confdefs.h <<\EOF
3082 #define inline 
3083 EOF
3084  ;;
3085   *)  cat >> confdefs.h <<EOF
3086 #define inline $ac_cv_c_inline
3087 EOF
3088  ;;
3089 esac
3090
3091 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3092 echo "configure:3093: checking whether byte ordering is bigendian" >&5
3093 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3094   echo $ac_n "(cached) $ac_c" 1>&6
3095 else
3096   ac_cv_c_bigendian=unknown
3097 # See if sys/param.h defines the BYTE_ORDER macro.
3098 cat > conftest.$ac_ext <<EOF
3099 #line 3100 "configure"
3100 #include "confdefs.h"
3101 #include <sys/types.h>
3102 #include <sys/param.h>
3103 int main() {
3104
3105 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3106  bogus endian macros
3107 #endif
3108 ; return 0; }
3109 EOF
3110 if { (eval echo configure:3111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3111   rm -rf conftest*
3112   # It does; now see whether it defined to BIG_ENDIAN or not.
3113 cat > conftest.$ac_ext <<EOF
3114 #line 3115 "configure"
3115 #include "confdefs.h"
3116 #include <sys/types.h>
3117 #include <sys/param.h>
3118 int main() {
3119
3120 #if BYTE_ORDER != BIG_ENDIAN
3121  not big endian
3122 #endif
3123 ; return 0; }
3124 EOF
3125 if { (eval echo configure:3126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3126   rm -rf conftest*
3127   ac_cv_c_bigendian=yes
3128 else
3129   echo "configure: failed program was:" >&5
3130   cat conftest.$ac_ext >&5
3131   rm -rf conftest*
3132   ac_cv_c_bigendian=no
3133 fi
3134 rm -f conftest*
3135 else
3136   echo "configure: failed program was:" >&5
3137   cat conftest.$ac_ext >&5
3138 fi
3139 rm -f conftest*
3140 if test $ac_cv_c_bigendian = unknown; then
3141 if test "$cross_compiling" = yes; then
3142     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3143 else
3144   cat > conftest.$ac_ext <<EOF
3145 #line 3146 "configure"
3146 #include "confdefs.h"
3147 main () {
3148   /* Are we little or big endian?  From Harbison&Steele.  */
3149   union
3150   {
3151     long l;
3152     char c[sizeof (long)];
3153   } u;
3154   u.l = 1;
3155   exit (u.c[sizeof (long) - 1] == 1);
3156 }
3157 EOF
3158 if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3159 then
3160   ac_cv_c_bigendian=no
3161 else
3162   echo "configure: failed program was:" >&5
3163   cat conftest.$ac_ext >&5
3164   rm -fr conftest*
3165   ac_cv_c_bigendian=yes
3166 fi
3167 rm -fr conftest*
3168 fi
3169
3170 fi
3171 fi
3172
3173 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3174 if test $ac_cv_c_bigendian = yes; then
3175   cat >> confdefs.h <<\EOF
3176 #define WORDS_BIGENDIAN 1
3177 EOF
3178
3179 fi
3180
3181 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3182 echo "configure:3183: checking whether char is unsigned" >&5
3183 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3184   echo $ac_n "(cached) $ac_c" 1>&6
3185 else
3186   if test "$GCC" = yes; then
3187   # GCC predefines this symbol on systems where it applies.
3188 cat > conftest.$ac_ext <<EOF
3189 #line 3190 "configure"
3190 #include "confdefs.h"
3191 #ifdef __CHAR_UNSIGNED__
3192   yes
3193 #endif
3194
3195 EOF
3196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3197   egrep "yes" >/dev/null 2>&1; then
3198   rm -rf conftest*
3199   ac_cv_c_char_unsigned=yes
3200 else
3201   rm -rf conftest*
3202   ac_cv_c_char_unsigned=no
3203 fi
3204 rm -f conftest*
3205
3206 else
3207 if test "$cross_compiling" = yes; then
3208     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3209 else
3210   cat > conftest.$ac_ext <<EOF
3211 #line 3212 "configure"
3212 #include "confdefs.h"
3213 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3214 #if !defined(__STDC__) || __STDC__ != 1
3215 #define volatile
3216 #endif
3217 main() {
3218   volatile char c = 255; exit(c < 0);
3219 }
3220 EOF
3221 if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3222 then
3223   ac_cv_c_char_unsigned=yes
3224 else
3225   echo "configure: failed program was:" >&5
3226   cat conftest.$ac_ext >&5
3227   rm -fr conftest*
3228   ac_cv_c_char_unsigned=no
3229 fi
3230 rm -fr conftest*
3231 fi
3232
3233 fi
3234 fi
3235
3236 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3237 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3238   cat >> confdefs.h <<\EOF
3239 #define __CHAR_UNSIGNED__ 1
3240 EOF
3241
3242 fi
3243
3244
3245 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3246 echo "configure:3247: checking return type of signal handlers" >&5
3247 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3248   echo $ac_n "(cached) $ac_c" 1>&6
3249 else
3250   cat > conftest.$ac_ext <<EOF
3251 #line 3252 "configure"
3252 #include "confdefs.h"
3253 #include <sys/types.h>
3254 #include <signal.h>
3255 #ifdef signal
3256 #undef signal
3257 #endif
3258 #ifdef __cplusplus
3259 extern "C" void (*signal (int, void (*)(int)))(int);
3260 #else
3261 void (*signal ()) ();
3262 #endif
3263
3264 int main() {
3265 int i;
3266 ; return 0; }
3267 EOF
3268 if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3269   rm -rf conftest*
3270   ac_cv_type_signal=void
3271 else
3272   echo "configure: failed program was:" >&5
3273   cat conftest.$ac_ext >&5
3274   rm -rf conftest*
3275   ac_cv_type_signal=int
3276 fi
3277 rm -f conftest*
3278 fi
3279
3280 echo "$ac_t""$ac_cv_type_signal" 1>&6
3281 cat >> confdefs.h <<EOF
3282 #define RETSIGTYPE $ac_cv_type_signal
3283 EOF
3284
3285
3286 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3287 echo "configure:3288: checking for uid_t in sys/types.h" >&5
3288 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3289   echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291   cat > conftest.$ac_ext <<EOF
3292 #line 3293 "configure"
3293 #include "confdefs.h"
3294 #include <sys/types.h>
3295 EOF
3296 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3297   egrep "uid_t" >/dev/null 2>&1; then
3298   rm -rf conftest*
3299   ac_cv_type_uid_t=yes
3300 else
3301   rm -rf conftest*
3302   ac_cv_type_uid_t=no
3303 fi
3304 rm -f conftest*
3305
3306 fi
3307
3308 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3309 if test $ac_cv_type_uid_t = no; then
3310   cat >> confdefs.h <<\EOF
3311 #define uid_t int
3312 EOF
3313
3314   cat >> confdefs.h <<\EOF
3315 #define gid_t int
3316 EOF
3317
3318 fi
3319
3320 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3321 echo "configure:3322: checking for mode_t" >&5
3322 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3323   echo $ac_n "(cached) $ac_c" 1>&6
3324 else
3325   cat > conftest.$ac_ext <<EOF
3326 #line 3327 "configure"
3327 #include "confdefs.h"
3328 #include <sys/types.h>
3329 #if STDC_HEADERS
3330 #include <stdlib.h>
3331 #include <stddef.h>
3332 #endif
3333 EOF
3334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3335   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3336   rm -rf conftest*
3337   ac_cv_type_mode_t=yes
3338 else
3339   rm -rf conftest*
3340   ac_cv_type_mode_t=no
3341 fi
3342 rm -f conftest*
3343
3344 fi
3345 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3346 if test $ac_cv_type_mode_t = no; then
3347   cat >> confdefs.h <<\EOF
3348 #define mode_t int
3349 EOF
3350
3351 fi
3352
3353 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3354 echo "configure:3355: checking for off_t" >&5
3355 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3356   echo $ac_n "(cached) $ac_c" 1>&6
3357 else
3358   cat > conftest.$ac_ext <<EOF
3359 #line 3360 "configure"
3360 #include "confdefs.h"
3361 #include <sys/types.h>
3362 #if STDC_HEADERS
3363 #include <stdlib.h>
3364 #include <stddef.h>
3365 #endif
3366 EOF
3367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3368   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3369   rm -rf conftest*
3370   ac_cv_type_off_t=yes
3371 else
3372   rm -rf conftest*
3373   ac_cv_type_off_t=no
3374 fi
3375 rm -f conftest*
3376
3377 fi
3378 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3379 if test $ac_cv_type_off_t = no; then
3380   cat >> confdefs.h <<\EOF
3381 #define off_t long
3382 EOF
3383
3384 fi
3385
3386 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3387 echo "configure:3388: checking for size_t" >&5
3388 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3389   echo $ac_n "(cached) $ac_c" 1>&6
3390 else
3391   cat > conftest.$ac_ext <<EOF
3392 #line 3393 "configure"
3393 #include "confdefs.h"
3394 #include <sys/types.h>
3395 #if STDC_HEADERS
3396 #include <stdlib.h>
3397 #include <stddef.h>
3398 #endif
3399 EOF
3400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3401   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3402   rm -rf conftest*
3403   ac_cv_type_size_t=yes
3404 else
3405   rm -rf conftest*
3406   ac_cv_type_size_t=no
3407 fi
3408 rm -f conftest*
3409
3410 fi
3411 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3412 if test $ac_cv_type_size_t = no; then
3413   cat >> confdefs.h <<\EOF
3414 #define size_t unsigned
3415 EOF
3416
3417 fi
3418
3419 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3420 echo "configure:3421: checking for pid_t" >&5
3421 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3422   echo $ac_n "(cached) $ac_c" 1>&6
3423 else
3424   cat > conftest.$ac_ext <<EOF
3425 #line 3426 "configure"
3426 #include "confdefs.h"
3427 #include <sys/types.h>
3428 #if STDC_HEADERS
3429 #include <stdlib.h>
3430 #include <stddef.h>
3431 #endif
3432 EOF
3433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3434   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3435   rm -rf conftest*
3436   ac_cv_type_pid_t=yes
3437 else
3438   rm -rf conftest*
3439   ac_cv_type_pid_t=no
3440 fi
3441 rm -f conftest*
3442
3443 fi
3444 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3445 if test $ac_cv_type_pid_t = no; then
3446   cat >> confdefs.h <<\EOF
3447 #define pid_t int
3448 EOF
3449
3450 fi
3451
3452 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3453 echo "configure:3454: checking for st_rdev in struct stat" >&5
3454 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3455   echo $ac_n "(cached) $ac_c" 1>&6
3456 else
3457   cat > conftest.$ac_ext <<EOF
3458 #line 3459 "configure"
3459 #include "confdefs.h"
3460 #include <sys/types.h>
3461 #include <sys/stat.h>
3462 int main() {
3463 struct stat s; s.st_rdev;
3464 ; return 0; }
3465 EOF
3466 if { (eval echo configure:3467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3467   rm -rf conftest*
3468   ac_cv_struct_st_rdev=yes
3469 else
3470   echo "configure: failed program was:" >&5
3471   cat conftest.$ac_ext >&5
3472   rm -rf conftest*
3473   ac_cv_struct_st_rdev=no
3474 fi
3475 rm -f conftest*
3476 fi
3477
3478 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3479 if test $ac_cv_struct_st_rdev = yes; then
3480   cat >> confdefs.h <<\EOF
3481 #define HAVE_ST_RDEV 1
3482 EOF
3483
3484 fi
3485
3486 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3487 echo "configure:3488: checking for d_off in dirent" >&5
3488 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3489   echo $ac_n "(cached) $ac_c" 1>&6
3490 else
3491   cat > conftest.$ac_ext <<EOF
3492 #line 3493 "configure"
3493 #include "confdefs.h"
3494
3495 #include <unistd.h>
3496 #include <sys/types.h>
3497 #include <dirent.h>
3498 int main() {
3499 struct dirent d; d.d_off;
3500 ; return 0; }
3501 EOF
3502 if { (eval echo configure:3503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3503   rm -rf conftest*
3504   ac_cv_dirent_d_off=yes
3505 else
3506   echo "configure: failed program was:" >&5
3507   cat conftest.$ac_ext >&5
3508   rm -rf conftest*
3509   ac_cv_dirent_d_off=no
3510 fi
3511 rm -f conftest*
3512 fi
3513
3514 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3515 if test $ac_cv_dirent_d_off = yes; then
3516   cat >> confdefs.h <<\EOF
3517 #define HAVE_DIRENT_D_OFF 1
3518 EOF
3519
3520 fi
3521
3522 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3523 echo "configure:3524: checking for ino_t" >&5
3524 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3525   echo $ac_n "(cached) $ac_c" 1>&6
3526 else
3527   cat > conftest.$ac_ext <<EOF
3528 #line 3529 "configure"
3529 #include "confdefs.h"
3530 #include <sys/types.h>
3531 #if STDC_HEADERS
3532 #include <stdlib.h>
3533 #include <stddef.h>
3534 #endif
3535 EOF
3536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3537   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3538   rm -rf conftest*
3539   ac_cv_type_ino_t=yes
3540 else
3541   rm -rf conftest*
3542   ac_cv_type_ino_t=no
3543 fi
3544 rm -f conftest*
3545
3546 fi
3547 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3548 if test $ac_cv_type_ino_t = no; then
3549   cat >> confdefs.h <<\EOF
3550 #define ino_t unsigned
3551 EOF
3552
3553 fi
3554
3555 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3556 echo "configure:3557: checking for loff_t" >&5
3557 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3558   echo $ac_n "(cached) $ac_c" 1>&6
3559 else
3560   cat > conftest.$ac_ext <<EOF
3561 #line 3562 "configure"
3562 #include "confdefs.h"
3563 #include <sys/types.h>
3564 #if STDC_HEADERS
3565 #include <stdlib.h>
3566 #include <stddef.h>
3567 #endif
3568 EOF
3569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3570   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3571   rm -rf conftest*
3572   ac_cv_type_loff_t=yes
3573 else
3574   rm -rf conftest*
3575   ac_cv_type_loff_t=no
3576 fi
3577 rm -f conftest*
3578
3579 fi
3580 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3581 if test $ac_cv_type_loff_t = no; then
3582   cat >> confdefs.h <<\EOF
3583 #define loff_t off_t
3584 EOF
3585
3586 fi
3587
3588 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3589 echo "configure:3590: checking for offset_t" >&5
3590 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3591   echo $ac_n "(cached) $ac_c" 1>&6
3592 else
3593   cat > conftest.$ac_ext <<EOF
3594 #line 3595 "configure"
3595 #include "confdefs.h"
3596 #include <sys/types.h>
3597 #if STDC_HEADERS
3598 #include <stdlib.h>
3599 #include <stddef.h>
3600 #endif
3601 EOF
3602 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3603   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3604   rm -rf conftest*
3605   ac_cv_type_offset_t=yes
3606 else
3607   rm -rf conftest*
3608   ac_cv_type_offset_t=no
3609 fi
3610 rm -f conftest*
3611
3612 fi
3613 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3614 if test $ac_cv_type_offset_t = no; then
3615   cat >> confdefs.h <<\EOF
3616 #define offset_t loff_t
3617 EOF
3618
3619 fi
3620
3621 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3622 echo "configure:3623: checking for ssize_t" >&5
3623 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3624   echo $ac_n "(cached) $ac_c" 1>&6
3625 else
3626   cat > conftest.$ac_ext <<EOF
3627 #line 3628 "configure"
3628 #include "confdefs.h"
3629 #include <sys/types.h>
3630 #if STDC_HEADERS
3631 #include <stdlib.h>
3632 #include <stddef.h>
3633 #endif
3634 EOF
3635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3636   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3637   rm -rf conftest*
3638   ac_cv_type_ssize_t=yes
3639 else
3640   rm -rf conftest*
3641   ac_cv_type_ssize_t=no
3642 fi
3643 rm -f conftest*
3644
3645 fi
3646 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3647 if test $ac_cv_type_ssize_t = no; then
3648   cat >> confdefs.h <<\EOF
3649 #define ssize_t int
3650 EOF
3651
3652 fi
3653
3654 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3655 echo "configure:3656: checking for wchar_t" >&5
3656 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3657   echo $ac_n "(cached) $ac_c" 1>&6
3658 else
3659   cat > conftest.$ac_ext <<EOF
3660 #line 3661 "configure"
3661 #include "confdefs.h"
3662 #include <sys/types.h>
3663 #if STDC_HEADERS
3664 #include <stdlib.h>
3665 #include <stddef.h>
3666 #endif
3667 EOF
3668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3669   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3670   rm -rf conftest*
3671   ac_cv_type_wchar_t=yes
3672 else
3673   rm -rf conftest*
3674   ac_cv_type_wchar_t=no
3675 fi
3676 rm -f conftest*
3677
3678 fi
3679 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3680 if test $ac_cv_type_wchar_t = no; then
3681   cat >> confdefs.h <<\EOF
3682 #define wchar_t unsigned short
3683 EOF
3684
3685 fi
3686
3687
3688 ############################################
3689 # for cups support we need libcups, and a handful of header files
3690
3691 # Check whether --enable-cups or --disable-cups was given.
3692 if test "${enable_cups+set}" = set; then
3693   enableval="$enable_cups"
3694   :
3695 fi
3696
3697
3698 if test x$enable_cups != xno; then
3699         # Extract the first word of "cups-config", so it can be a program name with args.
3700 set dummy cups-config; ac_word=$2
3701 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3702 echo "configure:3703: checking for $ac_word" >&5
3703 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then
3704   echo $ac_n "(cached) $ac_c" 1>&6
3705 else
3706   case "$CUPS_CONFIG" in
3707   /*)
3708   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path.
3709   ;;
3710   ?:/*)                  
3711   ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path.
3712   ;;
3713   *)
3714   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3715   ac_dummy="$PATH"
3716   for ac_dir in $ac_dummy; do 
3717     test -z "$ac_dir" && ac_dir=.
3718     if test -f $ac_dir/$ac_word; then
3719       ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word"
3720       break
3721     fi
3722   done
3723   IFS="$ac_save_ifs"
3724   ;;
3725 esac
3726 fi
3727 CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG"
3728 if test -n "$CUPS_CONFIG"; then
3729   echo "$ac_t""$CUPS_CONFIG" 1>&6
3730 else
3731   echo "$ac_t""no" 1>&6
3732 fi
3733
3734
3735         if test "x$CUPS_CONFIG" != x; then
3736                         cat >> confdefs.h <<\EOF
3737 #define HAVE_CUPS 1
3738 EOF
3739
3740                 CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
3741                 LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
3742                 LIBS="$LIBS `$CUPS_CONFIG --libs`"
3743         fi
3744 fi
3745
3746 ############################################
3747 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
3748 for ac_func in dlopen
3749 do
3750 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3751 echo "configure:3752: checking for $ac_func" >&5
3752 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3753   echo $ac_n "(cached) $ac_c" 1>&6
3754 else
3755   cat > conftest.$ac_ext <<EOF
3756 #line 3757 "configure"
3757 #include "confdefs.h"
3758 /* System header to define __stub macros and hopefully few prototypes,
3759     which can conflict with char $ac_func(); below.  */
3760 #include <assert.h>
3761 /* Override any gcc2 internal prototype to avoid an error.  */
3762 /* We use char because int might match the return type of a gcc2
3763     builtin and then its argument prototype would still apply.  */
3764 char $ac_func();
3765
3766 int main() {
3767
3768 /* The GNU C library defines this for functions which it implements
3769     to always fail with ENOSYS.  Some functions are actually named
3770     something starting with __ and the normal name is an alias.  */
3771 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3772 choke me
3773 #else
3774 $ac_func();
3775 #endif
3776
3777 ; return 0; }
3778 EOF
3779 if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3780   rm -rf conftest*
3781   eval "ac_cv_func_$ac_func=yes"
3782 else
3783   echo "configure: failed program was:" >&5
3784   cat conftest.$ac_ext >&5
3785   rm -rf conftest*
3786   eval "ac_cv_func_$ac_func=no"
3787 fi
3788 rm -f conftest*
3789 fi
3790
3791 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3792   echo "$ac_t""yes" 1>&6
3793     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3794   cat >> confdefs.h <<EOF
3795 #define $ac_tr_func 1
3796 EOF
3797  
3798 else
3799   echo "$ac_t""no" 1>&6
3800 fi
3801 done
3802
3803 if test x"$ac_cv_func_dlopen" = x"no"; then
3804     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3805 echo "configure:3806: checking for dlopen in -ldl" >&5
3806 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3807 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3808   echo $ac_n "(cached) $ac_c" 1>&6
3809 else
3810   ac_save_LIBS="$LIBS"
3811 LIBS="-ldl  $LIBS"
3812 cat > conftest.$ac_ext <<EOF
3813 #line 3814 "configure"
3814 #include "confdefs.h"
3815 /* Override any gcc2 internal prototype to avoid an error.  */
3816 /* We use char because int might match the return type of a gcc2
3817     builtin and then its argument prototype would still apply.  */
3818 char dlopen();
3819
3820 int main() {
3821 dlopen()
3822 ; return 0; }
3823 EOF
3824 if { (eval echo configure:3825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3825   rm -rf conftest*
3826   eval "ac_cv_lib_$ac_lib_var=yes"
3827 else
3828   echo "configure: failed program was:" >&5
3829   cat conftest.$ac_ext >&5
3830   rm -rf conftest*
3831   eval "ac_cv_lib_$ac_lib_var=no"
3832 fi
3833 rm -f conftest*
3834 LIBS="$ac_save_LIBS"
3835
3836 fi
3837 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3838   echo "$ac_t""yes" 1>&6
3839   LIBS="$LIBS -ldl";
3840         cat >> confdefs.h <<\EOF
3841 #define HAVE_DLOPEN 1
3842 EOF
3843
3844 else
3845   echo "$ac_t""no" 1>&6
3846 fi
3847
3848 fi
3849 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
3850
3851 ############################################
3852 # check if the compiler can do immediate structures
3853 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3854 echo "configure:3855: checking for immediate structures" >&5
3855 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3856   echo $ac_n "(cached) $ac_c" 1>&6
3857 else
3858   
3859     cat > conftest.$ac_ext <<EOF
3860 #line 3861 "configure"
3861 #include "confdefs.h"
3862
3863 #include <stdio.h>
3864 int main() {
3865
3866    typedef struct {unsigned x;} FOOBAR;
3867    #define X_FOOBAR(x) ((FOOBAR) { x })
3868    #define FOO_ONE X_FOOBAR(1)
3869    FOOBAR f = FOO_ONE;   
3870    static struct {
3871         FOOBAR y; 
3872         } f2[] = {
3873                 {FOO_ONE}
3874         };   
3875
3876 ; return 0; }
3877 EOF
3878 if { (eval echo configure:3879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3879   rm -rf conftest*
3880   samba_cv_immediate_structures=yes
3881 else
3882   echo "configure: failed program was:" >&5
3883   cat conftest.$ac_ext >&5
3884   rm -rf conftest*
3885   samba_cv_immediate_structures=no
3886 fi
3887 rm -f conftest*
3888 fi
3889
3890 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3891 if test x"$samba_cv_immediate_structures" = x"yes"; then
3892    cat >> confdefs.h <<\EOF
3893 #define HAVE_IMMEDIATE_STRUCTURES 1
3894 EOF
3895
3896 fi
3897
3898 ############################################
3899 # check for unix domain sockets
3900 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3901 echo "configure:3902: checking for unix domain sockets" >&5
3902 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3903   echo $ac_n "(cached) $ac_c" 1>&6
3904 else
3905   
3906     cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909
3910 #include <sys/types.h>
3911 #include <stdlib.h>
3912 #include <stddef.h>
3913 #include <sys/socket.h>
3914 #include <sys/un.h>
3915 int main() {
3916
3917   struct sockaddr_un sunaddr; 
3918   sunaddr.sun_family = AF_UNIX;
3919
3920 ; return 0; }
3921 EOF
3922 if { (eval echo configure:3923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3923   rm -rf conftest*
3924   samba_cv_unixsocket=yes
3925 else
3926   echo "configure: failed program was:" >&5
3927   cat conftest.$ac_ext >&5
3928   rm -rf conftest*
3929   samba_cv_unixsocket=no
3930 fi
3931 rm -f conftest*
3932 fi
3933
3934 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3935 if test x"$samba_cv_unixsocket" = x"yes"; then
3936    cat >> confdefs.h <<\EOF
3937 #define HAVE_UNIXSOCKET 1
3938 EOF
3939
3940 fi
3941
3942
3943 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3944 echo "configure:3945: checking for socklen_t type" >&5
3945 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3946   echo $ac_n "(cached) $ac_c" 1>&6
3947 else
3948   
3949     cat > conftest.$ac_ext <<EOF
3950 #line 3951 "configure"
3951 #include "confdefs.h"
3952
3953 #include <sys/types.h>
3954 #if STDC_HEADERS
3955 #include <stdlib.h>
3956 #include <stddef.h>
3957 #endif
3958 #include <sys/socket.h>
3959 int main() {
3960 socklen_t i = 0
3961 ; return 0; }
3962 EOF
3963 if { (eval echo configure:3964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3964   rm -rf conftest*
3965   samba_cv_socklen_t=yes
3966 else
3967   echo "configure: failed program was:" >&5
3968   cat conftest.$ac_ext >&5
3969   rm -rf conftest*
3970   samba_cv_socklen_t=no
3971 fi
3972 rm -f conftest*
3973 fi
3974
3975 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3976 if test x"$samba_cv_socklen_t" = x"yes"; then
3977    cat >> confdefs.h <<\EOF
3978 #define HAVE_SOCKLEN_T_TYPE 1
3979 EOF
3980
3981 fi
3982
3983 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3984 echo "configure:3985: checking for sig_atomic_t type" >&5
3985 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3986   echo $ac_n "(cached) $ac_c" 1>&6
3987 else
3988   
3989     cat > conftest.$ac_ext <<EOF
3990 #line 3991 "configure"
3991 #include "confdefs.h"
3992
3993 #include <sys/types.h>
3994 #if STDC_HEADERS
3995 #include <stdlib.h>
3996 #include <stddef.h>
3997 #endif
3998 #include <signal.h>
3999 int main() {
4000 sig_atomic_t i = 0
4001 ; return 0; }
4002 EOF
4003 if { (eval echo configure:4004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4004   rm -rf conftest*
4005   samba_cv_sig_atomic_t=yes
4006 else
4007   echo "configure: failed program was:" >&5
4008   cat conftest.$ac_ext >&5
4009   rm -rf conftest*
4010   samba_cv_sig_atomic_t=no
4011 fi
4012 rm -f conftest*
4013 fi
4014
4015 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
4016 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
4017    cat >> confdefs.h <<\EOF
4018 #define HAVE_SIG_ATOMIC_T_TYPE 1
4019 EOF
4020
4021 fi
4022
4023 # stupid headers have the functions but no declaration. grrrr.
4024
4025  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
4026 echo "configure:4027: checking for errno declaration" >&5
4027 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
4028   echo $ac_n "(cached) $ac_c" 1>&6
4029 else
4030   
4031     cat > conftest.$ac_ext <<EOF
4032 #line 4033 "configure"
4033 #include "confdefs.h"
4034 #include <errno.h>
4035 int main() {
4036 int i = (int)errno
4037 ; return 0; }
4038 EOF
4039 if { (eval echo configure:4040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4040   rm -rf conftest*
4041   ac_cv_have_errno_decl=yes
4042 else
4043   echo "configure: failed program was:" >&5
4044   cat conftest.$ac_ext >&5
4045   rm -rf conftest*
4046   ac_cv_have_errno_decl=no
4047 fi
4048 rm -f conftest*
4049 fi
4050
4051 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
4052  if test x"$ac_cv_have_errno_decl" = x"yes"; then
4053     cat >> confdefs.h <<\EOF
4054 #define HAVE_ERRNO_DECL 1
4055 EOF
4056
4057  fi
4058
4059
4060  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
4061 echo "configure:4062: checking for setresuid declaration" >&5
4062 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
4063   echo $ac_n "(cached) $ac_c" 1>&6
4064 else
4065   
4066     cat > conftest.$ac_ext <<EOF
4067 #line 4068 "configure"
4068 #include "confdefs.h"
4069 #include <unistd.h>
4070 int main() {
4071 int i = (int)setresuid
4072 ; return 0; }
4073 EOF
4074 if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4075   rm -rf conftest*
4076   ac_cv_have_setresuid_decl=yes
4077 else
4078   echo "configure: failed program was:" >&5
4079   cat conftest.$ac_ext >&5
4080   rm -rf conftest*
4081   ac_cv_have_setresuid_decl=no
4082 fi
4083 rm -f conftest*
4084 fi
4085
4086 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
4087  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
4088     cat >> confdefs.h <<\EOF
4089 #define HAVE_SETRESUID_DECL 1
4090 EOF
4091
4092  fi
4093
4094
4095  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
4096 echo "configure:4097: checking for setresgid declaration" >&5
4097 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
4098   echo $ac_n "(cached) $ac_c" 1>&6
4099 else
4100   
4101     cat > conftest.$ac_ext <<EOF
4102 #line 4103 "configure"
4103 #include "confdefs.h"
4104 #include <unistd.h>
4105 int main() {
4106 int i = (int)setresgid
4107 ; return 0; }
4108 EOF
4109 if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4110   rm -rf conftest*
4111   ac_cv_have_setresgid_decl=yes
4112 else
4113   echo "configure: failed program was:" >&5
4114   cat conftest.$ac_ext >&5
4115   rm -rf conftest*
4116   ac_cv_have_setresgid_decl=no
4117 fi
4118 rm -f conftest*
4119 fi
4120
4121 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
4122  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
4123     cat >> confdefs.h <<\EOF
4124 #define HAVE_SETRESGID_DECL 1
4125 EOF
4126
4127  fi
4128
4129
4130  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
4131 echo "configure:4132: checking for asprintf declaration" >&5
4132 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
4133   echo $ac_n "(cached) $ac_c" 1>&6
4134 else
4135   
4136     cat > conftest.$ac_ext <<EOF
4137 #line 4138 "configure"
4138 #include "confdefs.h"
4139 #include <stdio.h>
4140 int main() {
4141 int i = (int)asprintf
4142 ; return 0; }
4143 EOF
4144 if { (eval echo configure:4145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4145   rm -rf conftest*
4146   ac_cv_have_asprintf_decl=yes
4147 else
4148   echo "configure: failed program was:" >&5
4149   cat conftest.$ac_ext >&5
4150   rm -rf conftest*
4151   ac_cv_have_asprintf_decl=no
4152 fi
4153 rm -f conftest*
4154 fi
4155
4156 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
4157  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
4158     cat >> confdefs.h <<\EOF
4159 #define HAVE_ASPRINTF_DECL 1
4160 EOF
4161
4162  fi
4163
4164
4165  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
4166 echo "configure:4167: checking for vasprintf declaration" >&5
4167 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
4168   echo $ac_n "(cached) $ac_c" 1>&6
4169 else
4170   
4171     cat > conftest.$ac_ext <<EOF
4172 #line 4173 "configure"
4173 #include "confdefs.h"
4174 #include <stdio.h>
4175 int main() {
4176 int i = (int)vasprintf
4177 ; return 0; }
4178 EOF
4179 if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4180   rm -rf conftest*
4181   ac_cv_have_vasprintf_decl=yes
4182 else
4183   echo "configure: failed program was:" >&5
4184   cat conftest.$ac_ext >&5
4185   rm -rf conftest*
4186   ac_cv_have_vasprintf_decl=no
4187 fi
4188 rm -f conftest*
4189 fi
4190
4191 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
4192  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
4193     cat >> confdefs.h <<\EOF
4194 #define HAVE_VASPRINTF_DECL 1
4195 EOF
4196
4197  fi
4198
4199
4200  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
4201 echo "configure:4202: checking for vsnprintf declaration" >&5
4202 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
4203   echo $ac_n "(cached) $ac_c" 1>&6
4204 else
4205   
4206     cat > conftest.$ac_ext <<EOF
4207 #line 4208 "configure"
4208 #include "confdefs.h"
4209 #include <stdio.h>
4210 int main() {
4211 int i = (int)vsnprintf
4212 ; return 0; }
4213 EOF
4214 if { (eval echo configure:4215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4215   rm -rf conftest*
4216   ac_cv_have_vsnprintf_decl=yes
4217 else
4218   echo "configure: failed program was:" >&5
4219   cat conftest.$ac_ext >&5
4220   rm -rf conftest*
4221   ac_cv_have_vsnprintf_decl=no
4222 fi
4223 rm -f conftest*
4224 fi
4225
4226 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
4227  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
4228     cat >> confdefs.h <<\EOF
4229 #define HAVE_VSNPRINTF_DECL 1
4230 EOF
4231
4232  fi
4233
4234
4235  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
4236 echo "configure:4237: checking for snprintf declaration" >&5
4237 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
4238   echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240   
4241     cat > conftest.$ac_ext <<EOF
4242 #line 4243 "configure"
4243 #include "confdefs.h"
4244 #include <stdio.h>
4245 int main() {
4246 int i = (int)snprintf
4247 ; return 0; }
4248 EOF
4249 if { (eval echo configure:4250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4250   rm -rf conftest*
4251   ac_cv_have_snprintf_decl=yes
4252 else
4253   echo "configure: failed program was:" >&5
4254   cat conftest.$ac_ext >&5
4255   rm -rf conftest*
4256   ac_cv_have_snprintf_decl=no
4257 fi
4258 rm -f conftest*
4259 fi
4260
4261 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
4262  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
4263     cat >> confdefs.h <<\EOF
4264 #define HAVE_SNPRINTF_DECL 1
4265 EOF
4266
4267  fi
4268
4269
4270 # and glibc has setresuid under linux but the function does
4271 # nothing until kernel 2.1.44! very dumb.
4272 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4273 echo "configure:4274: checking for real setresuid" >&5
4274 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4275   echo $ac_n "(cached) $ac_c" 1>&6
4276 else
4277   
4278     if test "$cross_compiling" = yes; then
4279   samba_cv_have_setresuid=cross
4280 else
4281   cat > conftest.$ac_ext <<EOF
4282 #line 4283 "configure"
4283 #include "confdefs.h"
4284 #include <errno.h>
4285 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4286 EOF
4287 if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4288 then
4289   samba_cv_have_setresuid=yes
4290 else
4291   echo "configure: failed program was:" >&5
4292   cat conftest.$ac_ext >&5
4293   rm -fr conftest*
4294   samba_cv_have_setresuid=no
4295 fi
4296 rm -fr conftest*
4297 fi
4298
4299 fi
4300
4301 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4302 if test x"$samba_cv_have_setresuid" = x"yes"; then
4303     cat >> confdefs.h <<\EOF
4304 #define HAVE_SETRESUID 1
4305 EOF
4306
4307 fi
4308
4309 # Do the same check for setresguid...
4310 #
4311 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4312 echo "configure:4313: checking for real setresgid" >&5
4313 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4314   echo $ac_n "(cached) $ac_c" 1>&6
4315 else
4316   
4317     if test "$cross_compiling" = yes; then
4318   samba_cv_have_setresgid=cross
4319 else
4320   cat > conftest.$ac_ext <<EOF
4321 #line 4322 "configure"
4322 #include "confdefs.h"
4323 #include <unistd.h>
4324 #include <errno.h>
4325 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4326 EOF
4327 if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4328 then
4329   samba_cv_have_setresgid=yes
4330 else
4331   echo "configure: failed program was:" >&5
4332   cat conftest.$ac_ext >&5
4333   rm -fr conftest*
4334   samba_cv_have_setresgid=no
4335 fi
4336 rm -fr conftest*
4337 fi
4338
4339 fi
4340
4341 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4342 if test x"$samba_cv_have_setresgid" = x"yes"; then
4343     cat >> confdefs.h <<\EOF
4344 #define HAVE_SETRESGID 1
4345 EOF
4346
4347 fi
4348
4349 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4350 echo "configure:4351: checking for 8-bit clean memcmp" >&5
4351 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4352   echo $ac_n "(cached) $ac_c" 1>&6
4353 else
4354   if test "$cross_compiling" = yes; then
4355   ac_cv_func_memcmp_clean=no
4356 else
4357   cat > conftest.$ac_ext <<EOF
4358 #line 4359 "configure"
4359 #include "confdefs.h"
4360
4361 main()
4362 {
4363   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4364   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4365 }
4366
4367 EOF
4368 if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4369 then
4370   ac_cv_func_memcmp_clean=yes
4371 else
4372   echo "configure: failed program was:" >&5
4373   cat conftest.$ac_ext >&5
4374   rm -fr conftest*
4375   ac_cv_func_memcmp_clean=no
4376 fi
4377 rm -fr conftest*
4378 fi
4379
4380 fi
4381
4382 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4383 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4384
4385
4386 ###############################################
4387 # test for where we get crypt() from
4388 for ac_func in crypt
4389 do
4390 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4391 echo "configure:4392: checking for $ac_func" >&5
4392 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4393   echo $ac_n "(cached) $ac_c" 1>&6
4394 else
4395   cat > conftest.$ac_ext <<EOF
4396 #line 4397 "configure"
4397 #include "confdefs.h"
4398 /* System header to define __stub macros and hopefully few prototypes,
4399     which can conflict with char $ac_func(); below.  */
4400 #include <assert.h>
4401 /* Override any gcc2 internal prototype to avoid an error.  */
4402 /* We use char because int might match the return type of a gcc2
4403     builtin and then its argument prototype would still apply.  */
4404 char $ac_func();
4405
4406 int main() {
4407
4408 /* The GNU C library defines this for functions which it implements
4409     to always fail with ENOSYS.  Some functions are actually named
4410     something starting with __ and the normal name is an alias.  */
4411 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4412 choke me
4413 #else
4414 $ac_func();
4415 #endif
4416
4417 ; return 0; }
4418 EOF
4419 if { (eval echo configure:4420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4420   rm -rf conftest*
4421   eval "ac_cv_func_$ac_func=yes"
4422 else
4423   echo "configure: failed program was:" >&5
4424   cat conftest.$ac_ext >&5
4425   rm -rf conftest*
4426   eval "ac_cv_func_$ac_func=no"
4427 fi
4428 rm -f conftest*
4429 fi
4430
4431 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4432   echo "$ac_t""yes" 1>&6
4433     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4434   cat >> confdefs.h <<EOF
4435 #define $ac_tr_func 1
4436 EOF
4437  
4438 else
4439   echo "$ac_t""no" 1>&6
4440 fi
4441 done
4442
4443 if test x"$ac_cv_func_crypt" = x"no"; then
4444     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4445 echo "configure:4446: checking for crypt in -lcrypt" >&5
4446 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4447 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4448   echo $ac_n "(cached) $ac_c" 1>&6
4449 else
4450   ac_save_LIBS="$LIBS"
4451 LIBS="-lcrypt  $LIBS"
4452 cat > conftest.$ac_ext <<EOF
4453 #line 4454 "configure"
4454 #include "confdefs.h"
4455 /* Override any gcc2 internal prototype to avoid an error.  */
4456 /* We use char because int might match the return type of a gcc2
4457     builtin and then its argument prototype would still apply.  */
4458 char crypt();
4459
4460 int main() {
4461 crypt()
4462 ; return 0; }
4463 EOF
4464 if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4465   rm -rf conftest*
4466   eval "ac_cv_lib_$ac_lib_var=yes"
4467 else
4468   echo "configure: failed program was:" >&5
4469   cat conftest.$ac_ext >&5
4470   rm -rf conftest*
4471   eval "ac_cv_lib_$ac_lib_var=no"
4472 fi
4473 rm -f conftest*
4474 LIBS="$ac_save_LIBS"
4475
4476 fi
4477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4478   echo "$ac_t""yes" 1>&6
4479   LIBS="$LIBS -lcrypt";
4480         cat >> confdefs.h <<\EOF
4481 #define HAVE_CRYPT 1
4482 EOF
4483
4484 else
4485   echo "$ac_t""no" 1>&6
4486 fi
4487
4488 fi
4489
4490
4491 ###############################################
4492 # Readline included by default unless explicitly asked not to
4493 test "${with_readline+set}" != "set" && with_readline=yes
4494
4495 # test for where we get readline() from
4496 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4497 echo "configure:4498: checking whether to use readline" >&5
4498 # Check whether --with-readline or --without-readline was given.
4499 if test "${with_readline+set}" = set; then
4500   withval="$with_readline"
4501     case "$with_readline" in
4502   yes)
4503     echo "$ac_t""yes" 1>&6
4504
4505     for ac_hdr in readline.h history.h readline/readline.h
4506 do
4507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4508 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4509 echo "configure:4510: checking for $ac_hdr" >&5
4510 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4511   echo $ac_n "(cached) $ac_c" 1>&6
4512 else
4513   cat > conftest.$ac_ext <<EOF
4514 #line 4515 "configure"
4515 #include "confdefs.h"
4516 #include <$ac_hdr>
4517 EOF
4518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4519 { (eval echo configure:4520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4521 if test -z "$ac_err"; then
4522   rm -rf conftest*
4523   eval "ac_cv_header_$ac_safe=yes"
4524 else
4525   echo "$ac_err" >&5
4526   echo "configure: failed program was:" >&5
4527   cat conftest.$ac_ext >&5
4528   rm -rf conftest*
4529   eval "ac_cv_header_$ac_safe=no"
4530 fi
4531 rm -f conftest*
4532 fi
4533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4534   echo "$ac_t""yes" 1>&6
4535     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4536   cat >> confdefs.h <<EOF
4537 #define $ac_tr_hdr 1
4538 EOF
4539  
4540 else
4541   echo "$ac_t""no" 1>&6
4542 fi
4543 done
4544
4545     for ac_hdr in readline/history.h
4546 do
4547 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4548 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4549 echo "configure:4550: checking for $ac_hdr" >&5
4550 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4551   echo $ac_n "(cached) $ac_c" 1>&6
4552 else
4553   cat > conftest.$ac_ext <<EOF
4554 #line 4555 "configure"
4555 #include "confdefs.h"
4556 #include <$ac_hdr>
4557 EOF
4558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4559 { (eval echo configure:4560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4561 if test -z "$ac_err"; then
4562   rm -rf conftest*
4563   eval "ac_cv_header_$ac_safe=yes"
4564 else
4565   echo "$ac_err" >&5
4566   echo "configure: failed program was:" >&5
4567   cat conftest.$ac_ext >&5
4568   rm -rf conftest*
4569   eval "ac_cv_header_$ac_safe=no"
4570 fi
4571 rm -f conftest*
4572 fi
4573 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4574   echo "$ac_t""yes" 1>&6
4575     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4576   cat >> confdefs.h <<EOF
4577 #define $ac_tr_hdr 1
4578 EOF
4579  
4580 else
4581   echo "$ac_t""no" 1>&6
4582 fi
4583 done
4584
4585
4586     for ac_hdr in readline.h readline/readline.h
4587 do
4588 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4589 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4590 echo "configure:4591: checking for $ac_hdr" >&5
4591 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4592   echo $ac_n "(cached) $ac_c" 1>&6
4593 else
4594   cat > conftest.$ac_ext <<EOF
4595 #line 4596 "configure"
4596 #include "confdefs.h"
4597 #include <$ac_hdr>
4598 EOF
4599 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4600 { (eval echo configure:4601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4601 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4602 if test -z "$ac_err"; then
4603   rm -rf conftest*
4604   eval "ac_cv_header_$ac_safe=yes"
4605 else
4606   echo "$ac_err" >&5
4607   echo "configure: failed program was:" >&5
4608   cat conftest.$ac_ext >&5
4609   rm -rf conftest*
4610   eval "ac_cv_header_$ac_safe=no"
4611 fi
4612 rm -f conftest*
4613 fi
4614 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4615   echo "$ac_t""yes" 1>&6
4616     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4617   cat >> confdefs.h <<EOF
4618 #define $ac_tr_hdr 1
4619 EOF
4620  
4621       for termlib in ncurses curses termcap terminfo termlib; do
4622        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4623 echo "configure:4624: checking for tgetent in -l${termlib}" >&5
4624 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4625 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4626   echo $ac_n "(cached) $ac_c" 1>&6
4627 else
4628   ac_save_LIBS="$LIBS"
4629 LIBS="-l${termlib}  $LIBS"
4630 cat > conftest.$ac_ext <<EOF
4631 #line 4632 "configure"
4632 #include "confdefs.h"
4633 /* Override any gcc2 internal prototype to avoid an error.  */
4634 /* We use char because int might match the return type of a gcc2
4635     builtin and then its argument prototype would still apply.  */
4636 char tgetent();
4637
4638 int main() {
4639 tgetent()
4640 ; return 0; }
4641 EOF
4642 if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4643   rm -rf conftest*
4644   eval "ac_cv_lib_$ac_lib_var=yes"
4645 else
4646   echo "configure: failed program was:" >&5
4647   cat conftest.$ac_ext >&5
4648   rm -rf conftest*
4649   eval "ac_cv_lib_$ac_lib_var=no"
4650 fi
4651 rm -f conftest*
4652 LIBS="$ac_save_LIBS"
4653
4654 fi
4655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4656   echo "$ac_t""yes" 1>&6
4657   TERMLIBS="-l${termlib}"; break
4658 else
4659   echo "$ac_t""no" 1>&6
4660 fi
4661
4662       done
4663       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4664 echo "configure:4665: checking for rl_callback_handler_install in -lreadline" >&5
4665 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4666 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4667   echo $ac_n "(cached) $ac_c" 1>&6
4668 else
4669   ac_save_LIBS="$LIBS"
4670 LIBS="-lreadline $TERMLIBS $LIBS"
4671 cat > conftest.$ac_ext <<EOF
4672 #line 4673 "configure"
4673 #include "confdefs.h"
4674 /* Override any gcc2 internal prototype to avoid an error.  */
4675 /* We use char because int might match the return type of a gcc2
4676     builtin and then its argument prototype would still apply.  */
4677 char rl_callback_handler_install();
4678
4679 int main() {
4680 rl_callback_handler_install()
4681 ; return 0; }
4682 EOF
4683 if { (eval echo configure:4684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4684   rm -rf conftest*
4685   eval "ac_cv_lib_$ac_lib_var=yes"
4686 else
4687   echo "configure: failed program was:" >&5
4688   cat conftest.$ac_ext >&5
4689   rm -rf conftest*
4690   eval "ac_cv_lib_$ac_lib_var=no"
4691 fi
4692 rm -f conftest*
4693 LIBS="$ac_save_LIBS"
4694
4695 fi
4696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4697   echo "$ac_t""yes" 1>&6
4698   TERMLIBS="-lreadline $TERMLIBS"
4699        cat >> confdefs.h <<\EOF
4700 #define HAVE_LIBREADLINE 1
4701 EOF
4702
4703        break
4704 else
4705   echo "$ac_t""no" 1>&6
4706 TERMLIBS=
4707 fi
4708
4709 else
4710   echo "$ac_t""no" 1>&6
4711 fi
4712 done
4713
4714     ;;
4715   no)
4716     echo "$ac_t""no" 1>&6
4717     ;;
4718   *)
4719     echo "$ac_t""yes" 1>&6
4720
4721     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4722     # alternate readline path
4723     _ldflags=${LDFLAGS}
4724     _cppflags=${CPPFLAGS}
4725
4726     # Add additional search path
4727     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4728     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4729
4730     for ac_hdr in readline.h history.h readline/readline.h
4731 do
4732 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4733 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4734 echo "configure:4735: checking for $ac_hdr" >&5
4735 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4736   echo $ac_n "(cached) $ac_c" 1>&6
4737 else
4738   cat > conftest.$ac_ext <<EOF
4739 #line 4740 "configure"
4740 #include "confdefs.h"
4741 #include <$ac_hdr>
4742 EOF
4743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4744 { (eval echo configure:4745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4746 if test -z "$ac_err"; then
4747   rm -rf conftest*
4748   eval "ac_cv_header_$ac_safe=yes"
4749 else
4750   echo "$ac_err" >&5
4751   echo "configure: failed program was:" >&5
4752   cat conftest.$ac_ext >&5
4753   rm -rf conftest*
4754   eval "ac_cv_header_$ac_safe=no"
4755 fi
4756 rm -f conftest*
4757 fi
4758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4759   echo "$ac_t""yes" 1>&6
4760     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4761   cat >> confdefs.h <<EOF
4762 #define $ac_tr_hdr 1
4763 EOF
4764  
4765 else
4766   echo "$ac_t""no" 1>&6
4767 fi
4768 done
4769
4770     for ac_hdr in readline/history.h
4771 do
4772 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4773 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4774 echo "configure:4775: checking for $ac_hdr" >&5
4775 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4776   echo $ac_n "(cached) $ac_c" 1>&6
4777 else
4778   cat > conftest.$ac_ext <<EOF
4779 #line 4780 "configure"
4780 #include "confdefs.h"
4781 #include <$ac_hdr>
4782 EOF
4783 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4784 { (eval echo configure:4785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4785 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4786 if test -z "$ac_err"; then
4787   rm -rf conftest*
4788   eval "ac_cv_header_$ac_safe=yes"
4789 else
4790   echo "$ac_err" >&5
4791   echo "configure: failed program was:" >&5
4792   cat conftest.$ac_ext >&5
4793   rm -rf conftest*
4794   eval "ac_cv_header_$ac_safe=no"
4795 fi
4796 rm -f conftest*
4797 fi
4798 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4799   echo "$ac_t""yes" 1>&6
4800     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4801   cat >> confdefs.h <<EOF
4802 #define $ac_tr_hdr 1
4803 EOF
4804  
4805 else
4806   echo "$ac_t""no" 1>&6
4807 fi
4808 done
4809
4810
4811     for ac_hdr in readline.h readline/readline.h
4812 do
4813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4815 echo "configure:4816: checking for $ac_hdr" >&5
4816 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4817   echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819   cat > conftest.$ac_ext <<EOF
4820 #line 4821 "configure"
4821 #include "confdefs.h"
4822 #include <$ac_hdr>
4823 EOF
4824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4825 { (eval echo configure:4826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4827 if test -z "$ac_err"; then
4828   rm -rf conftest*
4829   eval "ac_cv_header_$ac_safe=yes"
4830 else
4831   echo "$ac_err" >&5
4832   echo "configure: failed program was:" >&5
4833   cat conftest.$ac_ext >&5
4834   rm -rf conftest*
4835   eval "ac_cv_header_$ac_safe=no"
4836 fi
4837 rm -f conftest*
4838 fi
4839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4840   echo "$ac_t""yes" 1>&6
4841     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4842   cat >> confdefs.h <<EOF
4843 #define $ac_tr_hdr 1
4844 EOF
4845  
4846       for termlib in ncurses curses termcap terminfo termlib; do
4847        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4848 echo "configure:4849: checking for tgetent in -l${termlib}" >&5
4849 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4850 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4851   echo $ac_n "(cached) $ac_c" 1>&6
4852 else
4853   ac_save_LIBS="$LIBS"
4854 LIBS="-l${termlib}  $LIBS"
4855 cat > conftest.$ac_ext <<EOF
4856 #line 4857 "configure"
4857 #include "confdefs.h"
4858 /* Override any gcc2 internal prototype to avoid an error.  */
4859 /* We use char because int might match the return type of a gcc2
4860     builtin and then its argument prototype would still apply.  */
4861 char tgetent();
4862
4863 int main() {
4864 tgetent()
4865 ; return 0; }
4866 EOF
4867 if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4868   rm -rf conftest*
4869   eval "ac_cv_lib_$ac_lib_var=yes"
4870 else
4871   echo "configure: failed program was:" >&5
4872   cat conftest.$ac_ext >&5
4873   rm -rf conftest*
4874   eval "ac_cv_lib_$ac_lib_var=no"
4875 fi
4876 rm -f conftest*
4877 LIBS="$ac_save_LIBS"
4878
4879 fi
4880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4881   echo "$ac_t""yes" 1>&6
4882   TERMLIBS="-l${termlib}"; break
4883 else
4884   echo "$ac_t""no" 1>&6
4885 fi
4886
4887       done
4888       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4889 echo "configure:4890: checking for rl_callback_handler_install in -lreadline" >&5
4890 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4891 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4892   echo $ac_n "(cached) $ac_c" 1>&6
4893 else
4894   ac_save_LIBS="$LIBS"
4895 LIBS="-lreadline $TERMLIBS $LIBS"
4896 cat > conftest.$ac_ext <<EOF
4897 #line 4898 "configure"
4898 #include "confdefs.h"
4899 /* Override any gcc2 internal prototype to avoid an error.  */
4900 /* We use char because int might match the return type of a gcc2
4901     builtin and then its argument prototype would still apply.  */
4902 char rl_callback_handler_install();
4903
4904 int main() {
4905 rl_callback_handler_install()
4906 ; return 0; }
4907 EOF
4908 if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4909   rm -rf conftest*
4910   eval "ac_cv_lib_$ac_lib_var=yes"
4911 else
4912   echo "configure: failed program was:" >&5
4913   cat conftest.$ac_ext >&5
4914   rm -rf conftest*
4915   eval "ac_cv_lib_$ac_lib_var=no"
4916 fi
4917 rm -f conftest*
4918 LIBS="$ac_save_LIBS"
4919
4920 fi
4921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4922   echo "$ac_t""yes" 1>&6
4923   TERMLDFLAGS="-L$with_readline/lib"
4924        TERMCPPFLAGS="-I$with_readline/include"
4925        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4926        TERMLIBS="-lreadline $TERMLIBS"
4927        cat >> confdefs.h <<\EOF
4928 #define HAVE_LIBREADLINE 1
4929 EOF
4930
4931        break
4932 else
4933   echo "$ac_t""no" 1>&6
4934 TERMLIBS= CPPFLAGS=$_cppflags
4935 fi
4936
4937 else
4938   echo "$ac_t""no" 1>&6
4939 fi
4940 done
4941
4942
4943     LDFLAGS=$_ldflags
4944     ;;
4945   esac
4946 else
4947   echo "$ac_t""no" 1>&6
4948
4949 fi
4950
4951
4952
4953
4954 # The readline API changed slightly from readline3 to readline4, so
4955 # code will generate warnings on one of them unless we have a few
4956 # special cases.
4957 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4958 echo "configure:4959: checking for rl_completion_matches in -lreadline" >&5
4959 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4960 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4961   echo $ac_n "(cached) $ac_c" 1>&6
4962 else
4963   ac_save_LIBS="$LIBS"
4964 LIBS="-lreadline $TERMLIBS $LIBS"
4965 cat > conftest.$ac_ext <<EOF
4966 #line 4967 "configure"
4967 #include "confdefs.h"
4968 /* Override any gcc2 internal prototype to avoid an error.  */
4969 /* We use char because int might match the return type of a gcc2
4970     builtin and then its argument prototype would still apply.  */
4971 char rl_completion_matches();
4972
4973 int main() {
4974 rl_completion_matches()
4975 ; return 0; }
4976 EOF
4977 if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4978   rm -rf conftest*
4979   eval "ac_cv_lib_$ac_lib_var=yes"
4980 else
4981   echo "configure: failed program was:" >&5
4982   cat conftest.$ac_ext >&5
4983   rm -rf conftest*
4984   eval "ac_cv_lib_$ac_lib_var=no"
4985 fi
4986 rm -f conftest*
4987 LIBS="$ac_save_LIBS"
4988
4989 fi
4990 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4991   echo "$ac_t""yes" 1>&6
4992   cat >> confdefs.h <<\EOF
4993 #define HAVE_NEW_LIBREADLINE 1
4994 EOF
4995
4996 else
4997   echo "$ac_t""no" 1>&6
4998 fi
4999
5000
5001 # The following test taken from the cvs sources
5002 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
5003 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
5004 # libsocket.so which has a bad implementation of gethostbyname (it
5005 # only looks in /etc/hosts), so we only look for -lsocket if we need
5006 # it.
5007 for ac_func in connect
5008 do
5009 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5010 echo "configure:5011: checking for $ac_func" >&5
5011 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5012   echo $ac_n "(cached) $ac_c" 1>&6
5013 else
5014   cat > conftest.$ac_ext <<EOF
5015 #line 5016 "configure"
5016 #include "confdefs.h"
5017 /* System header to define __stub macros and hopefully few prototypes,
5018     which can conflict with char $ac_func(); below.  */
5019 #include <assert.h>
5020 /* Override any gcc2 internal prototype to avoid an error.  */
5021 /* We use char because int might match the return type of a gcc2
5022     builtin and then its argument prototype would still apply.  */
5023 char $ac_func();
5024
5025 int main() {
5026
5027 /* The GNU C library defines this for functions which it implements
5028     to always fail with ENOSYS.  Some functions are actually named
5029     something starting with __ and the normal name is an alias.  */
5030 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5031 choke me
5032 #else
5033 $ac_func();
5034 #endif
5035
5036 ; return 0; }
5037 EOF
5038 if { (eval echo configure:5039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5039   rm -rf conftest*
5040   eval "ac_cv_func_$ac_func=yes"
5041 else
5042   echo "configure: failed program was:" >&5
5043   cat conftest.$ac_ext >&5
5044   rm -rf conftest*
5045   eval "ac_cv_func_$ac_func=no"
5046 fi
5047 rm -f conftest*
5048 fi
5049
5050 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5051   echo "$ac_t""yes" 1>&6
5052     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5053   cat >> confdefs.h <<EOF
5054 #define $ac_tr_func 1
5055 EOF
5056  
5057 else
5058   echo "$ac_t""no" 1>&6
5059 fi
5060 done
5061
5062 if test x"$ac_cv_func_connect" = x"no"; then
5063     case "$LIBS" in
5064     *-lnsl*) ;;
5065     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
5066 echo "configure:5067: checking for printf in -lnsl_s" >&5
5067 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
5068 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5069   echo $ac_n "(cached) $ac_c" 1>&6
5070 else
5071   ac_save_LIBS="$LIBS"
5072 LIBS="-lnsl_s  $LIBS"
5073 cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076 /* Override any gcc2 internal prototype to avoid an error.  */
5077 /* We use char because int might match the return type of a gcc2
5078     builtin and then its argument prototype would still apply.  */
5079 char printf();
5080
5081 int main() {
5082 printf()
5083 ; return 0; }
5084 EOF
5085 if { (eval echo configure:5086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5086   rm -rf conftest*
5087   eval "ac_cv_lib_$ac_lib_var=yes"
5088 else
5089   echo "configure: failed program was:" >&5
5090   cat conftest.$ac_ext >&5
5091   rm -rf conftest*
5092   eval "ac_cv_lib_$ac_lib_var=no"
5093 fi
5094 rm -f conftest*
5095 LIBS="$ac_save_LIBS"
5096
5097 fi
5098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5099   echo "$ac_t""yes" 1>&6
5100     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5101     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5102   cat >> confdefs.h <<EOF
5103 #define $ac_tr_lib 1
5104 EOF
5105
5106   LIBS="-lnsl_s $LIBS"
5107
5108 else
5109   echo "$ac_t""no" 1>&6
5110 fi
5111  ;;
5112     esac
5113     case "$LIBS" in
5114     *-lnsl*) ;;
5115     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
5116 echo "configure:5117: checking for printf in -lnsl" >&5
5117 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
5118 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5119   echo $ac_n "(cached) $ac_c" 1>&6
5120 else
5121   ac_save_LIBS="$LIBS"
5122 LIBS="-lnsl  $LIBS"
5123 cat > conftest.$ac_ext <<EOF
5124 #line 5125 "configure"
5125 #include "confdefs.h"
5126 /* Override any gcc2 internal prototype to avoid an error.  */
5127 /* We use char because int might match the return type of a gcc2
5128     builtin and then its argument prototype would still apply.  */
5129 char printf();
5130
5131 int main() {
5132 printf()
5133 ; return 0; }
5134 EOF
5135 if { (eval echo configure:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5136   rm -rf conftest*
5137   eval "ac_cv_lib_$ac_lib_var=yes"
5138 else
5139   echo "configure: failed program was:" >&5
5140   cat conftest.$ac_ext >&5
5141   rm -rf conftest*
5142   eval "ac_cv_lib_$ac_lib_var=no"
5143 fi
5144 rm -f conftest*
5145 LIBS="$ac_save_LIBS"
5146
5147 fi
5148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5149   echo "$ac_t""yes" 1>&6
5150     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5151     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5152   cat >> confdefs.h <<EOF
5153 #define $ac_tr_lib 1
5154 EOF
5155
5156   LIBS="-lnsl $LIBS"
5157
5158 else
5159   echo "$ac_t""no" 1>&6
5160 fi
5161  ;;
5162     esac
5163     case "$LIBS" in
5164     *-lsocket*) ;;
5165     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5166 echo "configure:5167: checking for connect in -lsocket" >&5
5167 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5168 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5169   echo $ac_n "(cached) $ac_c" 1>&6
5170 else
5171   ac_save_LIBS="$LIBS"
5172 LIBS="-lsocket  $LIBS"
5173 cat > conftest.$ac_ext <<EOF
5174 #line 5175 "configure"
5175 #include "confdefs.h"
5176 /* Override any gcc2 internal prototype to avoid an error.  */
5177 /* We use char because int might match the return type of a gcc2
5178     builtin and then its argument prototype would still apply.  */
5179 char connect();
5180
5181 int main() {
5182 connect()
5183 ; return 0; }
5184 EOF
5185 if { (eval echo configure:5186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5186   rm -rf conftest*
5187   eval "ac_cv_lib_$ac_lib_var=yes"
5188 else
5189   echo "configure: failed program was:" >&5
5190   cat conftest.$ac_ext >&5
5191   rm -rf conftest*
5192   eval "ac_cv_lib_$ac_lib_var=no"
5193 fi
5194 rm -f conftest*
5195 LIBS="$ac_save_LIBS"
5196
5197 fi
5198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5199   echo "$ac_t""yes" 1>&6
5200     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5201     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5202   cat >> confdefs.h <<EOF
5203 #define $ac_tr_lib 1
5204 EOF
5205
5206   LIBS="-lsocket $LIBS"
5207
5208 else
5209   echo "$ac_t""no" 1>&6
5210 fi
5211  ;;
5212     esac
5213     case "$LIBS" in
5214     *-linet*) ;;
5215     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
5216 echo "configure:5217: checking for connect in -linet" >&5
5217 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
5218 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5219   echo $ac_n "(cached) $ac_c" 1>&6
5220 else
5221   ac_save_LIBS="$LIBS"
5222 LIBS="-linet  $LIBS"
5223 cat > conftest.$ac_ext <<EOF
5224 #line 5225 "configure"
5225 #include "confdefs.h"
5226 /* Override any gcc2 internal prototype to avoid an error.  */
5227 /* We use char because int might match the return type of a gcc2
5228     builtin and then its argument prototype would still apply.  */
5229 char connect();
5230
5231 int main() {
5232 connect()
5233 ; return 0; }
5234 EOF
5235 if { (eval echo configure:5236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5236   rm -rf conftest*
5237   eval "ac_cv_lib_$ac_lib_var=yes"
5238 else
5239   echo "configure: failed program was:" >&5
5240   cat conftest.$ac_ext >&5
5241   rm -rf conftest*
5242   eval "ac_cv_lib_$ac_lib_var=no"
5243 fi
5244 rm -f conftest*
5245 LIBS="$ac_save_LIBS"
5246
5247 fi
5248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5249   echo "$ac_t""yes" 1>&6
5250     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5251     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5252   cat >> confdefs.h <<EOF
5253 #define $ac_tr_lib 1
5254 EOF
5255
5256   LIBS="-linet $LIBS"
5257
5258 else
5259   echo "$ac_t""no" 1>&6
5260 fi
5261  ;;
5262     esac
5263             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
5264        test x"$ac_cv_lib_inet_connect" = x"yes"; then
5265         # ac_cv_func_connect=yes
5266         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
5267         cat >> confdefs.h <<\EOF
5268 #define HAVE_CONNECT 1
5269 EOF
5270
5271     fi
5272 fi
5273
5274 ###############################################
5275 # test for where we get get_yp_default_domain() from
5276 for ac_func in yp_get_default_domain
5277 do
5278 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5279 echo "configure:5280: checking for $ac_func" >&5
5280 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5281   echo $ac_n "(cached) $ac_c" 1>&6
5282 else
5283   cat > conftest.$ac_ext <<EOF
5284 #line 5285 "configure"
5285 #include "confdefs.h"
5286 /* System header to define __stub macros and hopefully few prototypes,
5287     which can conflict with char $ac_func(); below.  */
5288 #include <assert.h>
5289 /* Override any gcc2 internal prototype to avoid an error.  */
5290 /* We use char because int might match the return type of a gcc2
5291     builtin and then its argument prototype would still apply.  */
5292 char $ac_func();
5293
5294 int main() {
5295
5296 /* The GNU C library defines this for functions which it implements
5297     to always fail with ENOSYS.  Some functions are actually named
5298     something starting with __ and the normal name is an alias.  */
5299 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5300 choke me
5301 #else
5302 $ac_func();
5303 #endif
5304
5305 ; return 0; }
5306 EOF
5307 if { (eval echo configure:5308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5308   rm -rf conftest*
5309   eval "ac_cv_func_$ac_func=yes"
5310 else
5311   echo "configure: failed program was:" >&5
5312   cat conftest.$ac_ext >&5
5313   rm -rf conftest*
5314   eval "ac_cv_func_$ac_func=no"
5315 fi
5316 rm -f conftest*
5317 fi
5318
5319 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5320   echo "$ac_t""yes" 1>&6
5321     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5322   cat >> confdefs.h <<EOF
5323 #define $ac_tr_func 1
5324 EOF
5325  
5326 else
5327   echo "$ac_t""no" 1>&6
5328 fi
5329 done
5330
5331 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5332         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5333 echo "configure:5334: checking for yp_get_default_domain in -lnsl" >&5
5334 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5335 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5336   echo $ac_n "(cached) $ac_c" 1>&6
5337 else
5338   ac_save_LIBS="$LIBS"
5339 LIBS="-lnsl  $LIBS"
5340 cat > conftest.$ac_ext <<EOF
5341 #line 5342 "configure"
5342 #include "confdefs.h"
5343 /* Override any gcc2 internal prototype to avoid an error.  */
5344 /* We use char because int might match the return type of a gcc2
5345     builtin and then its argument prototype would still apply.  */
5346 char yp_get_default_domain();
5347
5348 int main() {
5349 yp_get_default_domain()
5350 ; return 0; }
5351 EOF
5352 if { (eval echo configure:5353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5353   rm -rf conftest*
5354   eval "ac_cv_lib_$ac_lib_var=yes"
5355 else
5356   echo "configure: failed program was:" >&5
5357   cat conftest.$ac_ext >&5
5358   rm -rf conftest*
5359   eval "ac_cv_lib_$ac_lib_var=no"
5360 fi
5361 rm -f conftest*
5362 LIBS="$ac_save_LIBS"
5363
5364 fi
5365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5366   echo "$ac_t""yes" 1>&6
5367   LIBS="$LIBS -lnsl";
5368         cat >> confdefs.h <<\EOF
5369 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5370 EOF
5371
5372 else
5373   echo "$ac_t""no" 1>&6
5374 fi
5375  
5376 fi
5377
5378 # Check if we have execl, if not we need to compile smbrun.
5379 for ac_func in execl
5380 do
5381 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5382 echo "configure:5383: checking for $ac_func" >&5
5383 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5384   echo $ac_n "(cached) $ac_c" 1>&6
5385 else
5386   cat > conftest.$ac_ext <<EOF
5387 #line 5388 "configure"
5388 #include "confdefs.h"
5389 /* System header to define __stub macros and hopefully few prototypes,
5390     which can conflict with char $ac_func(); below.  */
5391 #include <assert.h>
5392 /* Override any gcc2 internal prototype to avoid an error.  */
5393 /* We use char because int might match the return type of a gcc2
5394     builtin and then its argument prototype would still apply.  */
5395 char $ac_func();
5396
5397 int main() {
5398
5399 /* The GNU C library defines this for functions which it implements
5400     to always fail with ENOSYS.  Some functions are actually named
5401     something starting with __ and the normal name is an alias.  */
5402 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5403 choke me
5404 #else
5405 $ac_func();
5406 #endif
5407
5408 ; return 0; }
5409 EOF
5410 if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5411   rm -rf conftest*
5412   eval "ac_cv_func_$ac_func=yes"
5413 else
5414   echo "configure: failed program was:" >&5
5415   cat conftest.$ac_ext >&5
5416   rm -rf conftest*
5417   eval "ac_cv_func_$ac_func=no"
5418 fi
5419 rm -f conftest*
5420 fi
5421
5422 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5423   echo "$ac_t""yes" 1>&6
5424     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5425   cat >> confdefs.h <<EOF
5426 #define $ac_tr_func 1
5427 EOF
5428  
5429 else
5430   echo "$ac_t""no" 1>&6
5431 fi
5432 done
5433
5434 if test x"$ac_cv_func_execl" = x"no"; then
5435     RUNPROG="bin/smbrun"
5436 else
5437     RUNPROG=""
5438 fi
5439
5440 for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64
5441 do
5442 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5443 echo "configure:5444: checking for $ac_func" >&5
5444 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5445   echo $ac_n "(cached) $ac_c" 1>&6
5446 else
5447   cat > conftest.$ac_ext <<EOF
5448 #line 5449 "configure"
5449 #include "confdefs.h"
5450 /* System header to define __stub macros and hopefully few prototypes,
5451     which can conflict with char $ac_func(); below.  */
5452 #include <assert.h>
5453 /* Override any gcc2 internal prototype to avoid an error.  */
5454 /* We use char because int might match the return type of a gcc2
5455     builtin and then its argument prototype would still apply.  */
5456 char $ac_func();
5457
5458 int main() {
5459
5460 /* The GNU C library defines this for functions which it implements
5461     to always fail with ENOSYS.  Some functions are actually named
5462     something starting with __ and the normal name is an alias.  */
5463 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5464 choke me
5465 #else
5466 $ac_func();
5467 #endif
5468
5469 ; return 0; }
5470 EOF
5471 if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5472   rm -rf conftest*
5473   eval "ac_cv_func_$ac_func=yes"
5474 else
5475   echo "configure: failed program was:" >&5
5476   cat conftest.$ac_ext >&5
5477   rm -rf conftest*
5478   eval "ac_cv_func_$ac_func=no"
5479 fi
5480 rm -f conftest*
5481 fi
5482
5483 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5484   echo "$ac_t""yes" 1>&6
5485     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5486   cat >> confdefs.h <<EOF
5487 #define $ac_tr_func 1
5488 EOF
5489  
5490 else
5491   echo "$ac_t""no" 1>&6
5492 fi
5493 done
5494
5495 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5496 do
5497 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5498 echo "configure:5499: checking for $ac_func" >&5
5499 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5500   echo $ac_n "(cached) $ac_c" 1>&6
5501 else
5502   cat > conftest.$ac_ext <<EOF
5503 #line 5504 "configure"
5504 #include "confdefs.h"
5505 /* System header to define __stub macros and hopefully few prototypes,
5506     which can conflict with char $ac_func(); below.  */
5507 #include <assert.h>
5508 /* Override any gcc2 internal prototype to avoid an error.  */
5509 /* We use char because int might match the return type of a gcc2
5510     builtin and then its argument prototype would still apply.  */
5511 char $ac_func();
5512
5513 int main() {
5514
5515 /* The GNU C library defines this for functions which it implements
5516     to always fail with ENOSYS.  Some functions are actually named
5517     something starting with __ and the normal name is an alias.  */
5518 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5519 choke me
5520 #else
5521 $ac_func();
5522 #endif
5523
5524 ; return 0; }
5525 EOF
5526 if { (eval echo configure:5527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5527   rm -rf conftest*
5528   eval "ac_cv_func_$ac_func=yes"
5529 else
5530   echo "configure: failed program was:" >&5
5531   cat conftest.$ac_ext >&5
5532   rm -rf conftest*
5533   eval "ac_cv_func_$ac_func=no"
5534 fi
5535 rm -f conftest*
5536 fi
5537
5538 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5539   echo "$ac_t""yes" 1>&6
5540     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5541   cat >> confdefs.h <<EOF
5542 #define $ac_tr_func 1
5543 EOF
5544  
5545 else
5546   echo "$ac_t""no" 1>&6
5547 fi
5548 done
5549
5550 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5551 do
5552 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5553 echo "configure:5554: checking for $ac_func" >&5
5554 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5555   echo $ac_n "(cached) $ac_c" 1>&6
5556 else
5557   cat > conftest.$ac_ext <<EOF
5558 #line 5559 "configure"
5559 #include "confdefs.h"
5560 /* System header to define __stub macros and hopefully few prototypes,
5561     which can conflict with char $ac_func(); below.  */
5562 #include <assert.h>
5563 /* Override any gcc2 internal prototype to avoid an error.  */
5564 /* We use char because int might match the return type of a gcc2
5565     builtin and then its argument prototype would still apply.  */
5566 char $ac_func();
5567
5568 int main() {
5569
5570 /* The GNU C library defines this for functions which it implements
5571     to always fail with ENOSYS.  Some functions are actually named
5572     something starting with __ and the normal name is an alias.  */
5573 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5574 choke me
5575 #else
5576 $ac_func();
5577 #endif
5578
5579 ; return 0; }
5580 EOF
5581 if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5582   rm -rf conftest*
5583   eval "ac_cv_func_$ac_func=yes"
5584 else
5585   echo "configure: failed program was:" >&5
5586   cat conftest.$ac_ext >&5
5587   rm -rf conftest*
5588   eval "ac_cv_func_$ac_func=no"
5589 fi
5590 rm -f conftest*
5591 fi
5592
5593 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5594   echo "$ac_t""yes" 1>&6
5595     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5596   cat >> confdefs.h <<EOF
5597 #define $ac_tr_func 1
5598 EOF
5599  
5600 else
5601   echo "$ac_t""no" 1>&6
5602 fi
5603 done
5604
5605 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5606 do
5607 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5608 echo "configure:5609: checking for $ac_func" >&5
5609 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5610   echo $ac_n "(cached) $ac_c" 1>&6
5611 else
5612   cat > conftest.$ac_ext <<EOF
5613 #line 5614 "configure"
5614 #include "confdefs.h"
5615 /* System header to define __stub macros and hopefully few prototypes,
5616     which can conflict with char $ac_func(); below.  */
5617 #include <assert.h>
5618 /* Override any gcc2 internal prototype to avoid an error.  */
5619 /* We use char because int might match the return type of a gcc2
5620     builtin and then its argument prototype would still apply.  */
5621 char $ac_func();
5622
5623 int main() {
5624
5625 /* The GNU C library defines this for functions which it implements
5626     to always fail with ENOSYS.  Some functions are actually named
5627     something starting with __ and the normal name is an alias.  */
5628 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5629 choke me
5630 #else
5631 $ac_func();
5632 #endif
5633
5634 ; return 0; }
5635 EOF
5636 if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5637   rm -rf conftest*
5638   eval "ac_cv_func_$ac_func=yes"
5639 else
5640   echo "configure: failed program was:" >&5
5641   cat conftest.$ac_ext >&5
5642   rm -rf conftest*
5643   eval "ac_cv_func_$ac_func=no"
5644 fi
5645 rm -f conftest*
5646 fi
5647
5648 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5649   echo "$ac_t""yes" 1>&6
5650     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5651   cat >> confdefs.h <<EOF
5652 #define $ac_tr_func 1
5653 EOF
5654  
5655 else
5656   echo "$ac_t""no" 1>&6
5657 fi
5658 done
5659
5660 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath
5661 do
5662 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5663 echo "configure:5664: checking for $ac_func" >&5
5664 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5665   echo $ac_n "(cached) $ac_c" 1>&6
5666 else
5667   cat > conftest.$ac_ext <<EOF
5668 #line 5669 "configure"
5669 #include "confdefs.h"
5670 /* System header to define __stub macros and hopefully few prototypes,
5671     which can conflict with char $ac_func(); below.  */
5672 #include <assert.h>
5673 /* Override any gcc2 internal prototype to avoid an error.  */
5674 /* We use char because int might match the return type of a gcc2
5675     builtin and then its argument prototype would still apply.  */
5676 char $ac_func();
5677
5678 int main() {
5679
5680 /* The GNU C library defines this for functions which it implements
5681     to always fail with ENOSYS.  Some functions are actually named
5682     something starting with __ and the normal name is an alias.  */
5683 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5684 choke me
5685 #else
5686 $ac_func();
5687 #endif
5688
5689 ; return 0; }
5690 EOF
5691 if { (eval echo configure:5692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5692   rm -rf conftest*
5693   eval "ac_cv_func_$ac_func=yes"
5694 else
5695   echo "configure: failed program was:" >&5
5696   cat conftest.$ac_ext >&5
5697   rm -rf conftest*
5698   eval "ac_cv_func_$ac_func=no"
5699 fi
5700 rm -f conftest*
5701 fi
5702
5703 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5704   echo "$ac_t""yes" 1>&6
5705     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5706   cat >> confdefs.h <<EOF
5707 #define $ac_tr_func 1
5708 EOF
5709  
5710 else
5711   echo "$ac_t""no" 1>&6
5712 fi
5713 done
5714
5715 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5716 do
5717 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5718 echo "configure:5719: checking for $ac_func" >&5
5719 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5720   echo $ac_n "(cached) $ac_c" 1>&6
5721 else
5722   cat > conftest.$ac_ext <<EOF
5723 #line 5724 "configure"
5724 #include "confdefs.h"
5725 /* System header to define __stub macros and hopefully few prototypes,
5726     which can conflict with char $ac_func(); below.  */
5727 #include <assert.h>
5728 /* Override any gcc2 internal prototype to avoid an error.  */
5729 /* We use char because int might match the return type of a gcc2
5730     builtin and then its argument prototype would still apply.  */
5731 char $ac_func();
5732
5733 int main() {
5734
5735 /* The GNU C library defines this for functions which it implements
5736     to always fail with ENOSYS.  Some functions are actually named
5737     something starting with __ and the normal name is an alias.  */
5738 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5739 choke me
5740 #else
5741 $ac_func();
5742 #endif
5743
5744 ; return 0; }
5745 EOF
5746 if { (eval echo configure:5747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5747   rm -rf conftest*
5748   eval "ac_cv_func_$ac_func=yes"
5749 else
5750   echo "configure: failed program was:" >&5
5751   cat conftest.$ac_ext >&5
5752   rm -rf conftest*
5753   eval "ac_cv_func_$ac_func=no"
5754 fi
5755 rm -f conftest*
5756 fi
5757
5758 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5759   echo "$ac_t""yes" 1>&6
5760     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5761   cat >> confdefs.h <<EOF
5762 #define $ac_tr_func 1
5763 EOF
5764  
5765 else
5766   echo "$ac_t""no" 1>&6
5767 fi
5768 done
5769
5770 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5771 do
5772 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5773 echo "configure:5774: checking for $ac_func" >&5
5774 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5775   echo $ac_n "(cached) $ac_c" 1>&6
5776 else
5777   cat > conftest.$ac_ext <<EOF
5778 #line 5779 "configure"
5779 #include "confdefs.h"
5780 /* System header to define __stub macros and hopefully few prototypes,
5781     which can conflict with char $ac_func(); below.  */
5782 #include <assert.h>
5783 /* Override any gcc2 internal prototype to avoid an error.  */
5784 /* We use char because int might match the return type of a gcc2
5785     builtin and then its argument prototype would still apply.  */
5786 char $ac_func();
5787
5788 int main() {
5789
5790 /* The GNU C library defines this for functions which it implements
5791     to always fail with ENOSYS.  Some functions are actually named
5792     something starting with __ and the normal name is an alias.  */
5793 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5794 choke me
5795 #else
5796 $ac_func();
5797 #endif
5798
5799 ; return 0; }
5800 EOF
5801 if { (eval echo configure:5802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5802   rm -rf conftest*
5803   eval "ac_cv_func_$ac_func=yes"
5804 else
5805   echo "configure: failed program was:" >&5
5806   cat conftest.$ac_ext >&5
5807   rm -rf conftest*
5808   eval "ac_cv_func_$ac_func=no"
5809 fi
5810 rm -f conftest*
5811 fi
5812
5813 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5814   echo "$ac_t""yes" 1>&6
5815     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5816   cat >> confdefs.h <<EOF
5817 #define $ac_tr_func 1
5818 EOF
5819  
5820 else
5821   echo "$ac_t""no" 1>&6
5822 fi
5823 done
5824
5825 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5826 do
5827 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5828 echo "configure:5829: checking for $ac_func" >&5
5829 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5830   echo $ac_n "(cached) $ac_c" 1>&6
5831 else
5832   cat > conftest.$ac_ext <<EOF
5833 #line 5834 "configure"
5834 #include "confdefs.h"
5835 /* System header to define __stub macros and hopefully few prototypes,
5836     which can conflict with char $ac_func(); below.  */
5837 #include <assert.h>
5838 /* Override any gcc2 internal prototype to avoid an error.  */
5839 /* We use char because int might match the return type of a gcc2
5840     builtin and then its argument prototype would still apply.  */
5841 char $ac_func();
5842
5843 int main() {
5844
5845 /* The GNU C library defines this for functions which it implements
5846     to always fail with ENOSYS.  Some functions are actually named
5847     something starting with __ and the normal name is an alias.  */
5848 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5849 choke me
5850 #else
5851 $ac_func();
5852 #endif
5853
5854 ; return 0; }
5855 EOF
5856 if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5857   rm -rf conftest*
5858   eval "ac_cv_func_$ac_func=yes"
5859 else
5860   echo "configure: failed program was:" >&5
5861   cat conftest.$ac_ext >&5
5862   rm -rf conftest*
5863   eval "ac_cv_func_$ac_func=no"
5864 fi
5865 rm -f conftest*
5866 fi
5867
5868 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5869   echo "$ac_t""yes" 1>&6
5870     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5871   cat >> confdefs.h <<EOF
5872 #define $ac_tr_func 1
5873 EOF
5874  
5875 else
5876   echo "$ac_t""no" 1>&6
5877 fi
5878 done
5879
5880 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5881 do
5882 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5883 echo "configure:5884: checking for $ac_func" >&5
5884 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5885   echo $ac_n "(cached) $ac_c" 1>&6
5886 else
5887   cat > conftest.$ac_ext <<EOF
5888 #line 5889 "configure"
5889 #include "confdefs.h"
5890 /* System header to define __stub macros and hopefully few prototypes,
5891     which can conflict with char $ac_func(); below.  */
5892 #include <assert.h>
5893 /* Override any gcc2 internal prototype to avoid an error.  */
5894 /* We use char because int might match the return type of a gcc2
5895     builtin and then its argument prototype would still apply.  */
5896 char $ac_func();
5897
5898 int main() {
5899
5900 /* The GNU C library defines this for functions which it implements
5901     to always fail with ENOSYS.  Some functions are actually named
5902     something starting with __ and the normal name is an alias.  */
5903 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5904 choke me
5905 #else
5906 $ac_func();
5907 #endif
5908
5909 ; return 0; }
5910 EOF
5911 if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5912   rm -rf conftest*
5913   eval "ac_cv_func_$ac_func=yes"
5914 else
5915   echo "configure: failed program was:" >&5
5916   cat conftest.$ac_ext >&5
5917   rm -rf conftest*
5918   eval "ac_cv_func_$ac_func=no"
5919 fi
5920 rm -f conftest*
5921 fi
5922
5923 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5924   echo "$ac_t""yes" 1>&6
5925     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5926   cat >> confdefs.h <<EOF
5927 #define $ac_tr_func 1
5928 EOF
5929  
5930 else
5931   echo "$ac_t""no" 1>&6
5932 fi
5933 done
5934
5935 for ac_func in syslog vsyslog getgrouplist
5936 do
5937 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5938 echo "configure:5939: checking for $ac_func" >&5
5939 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5940   echo $ac_n "(cached) $ac_c" 1>&6
5941 else
5942   cat > conftest.$ac_ext <<EOF
5943 #line 5944 "configure"
5944 #include "confdefs.h"
5945 /* System header to define __stub macros and hopefully few prototypes,
5946     which can conflict with char $ac_func(); below.  */
5947 #include <assert.h>
5948 /* Override any gcc2 internal prototype to avoid an error.  */
5949 /* We use char because int might match the return type of a gcc2
5950     builtin and then its argument prototype would still apply.  */
5951 char $ac_func();
5952
5953 int main() {
5954
5955 /* The GNU C library defines this for functions which it implements
5956     to always fail with ENOSYS.  Some functions are actually named
5957     something starting with __ and the normal name is an alias.  */
5958 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5959 choke me
5960 #else
5961 $ac_func();
5962 #endif
5963
5964 ; return 0; }
5965 EOF
5966 if { (eval echo configure:5967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5967   rm -rf conftest*
5968   eval "ac_cv_func_$ac_func=yes"
5969 else
5970   echo "configure: failed program was:" >&5
5971   cat conftest.$ac_ext >&5
5972   rm -rf conftest*
5973   eval "ac_cv_func_$ac_func=no"
5974 fi
5975 rm -f conftest*
5976 fi
5977
5978 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5979   echo "$ac_t""yes" 1>&6
5980     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5981   cat >> confdefs.h <<EOF
5982 #define $ac_tr_func 1
5983 EOF
5984  
5985 else
5986   echo "$ac_t""no" 1>&6
5987 fi
5988 done
5989
5990 # setbuffer is needed for smbtorture
5991 for ac_func in setbuffer
5992 do
5993 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5994 echo "configure:5995: checking for $ac_func" >&5
5995 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5996   echo $ac_n "(cached) $ac_c" 1>&6
5997 else
5998   cat > conftest.$ac_ext <<EOF
5999 #line 6000 "configure"
6000 #include "confdefs.h"
6001 /* System header to define __stub macros and hopefully few prototypes,
6002     which can conflict with char $ac_func(); below.  */
6003 #include <assert.h>
6004 /* Override any gcc2 internal prototype to avoid an error.  */
6005 /* We use char because int might match the return type of a gcc2
6006     builtin and then its argument prototype would still apply.  */
6007 char $ac_func();
6008
6009 int main() {
6010
6011 /* The GNU C library defines this for functions which it implements
6012     to always fail with ENOSYS.  Some functions are actually named
6013     something starting with __ and the normal name is an alias.  */
6014 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6015 choke me
6016 #else
6017 $ac_func();
6018 #endif
6019
6020 ; return 0; }
6021 EOF
6022 if { (eval echo configure:6023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6023   rm -rf conftest*
6024   eval "ac_cv_func_$ac_func=yes"
6025 else
6026   echo "configure: failed program was:" >&5
6027   cat conftest.$ac_ext >&5
6028   rm -rf conftest*
6029   eval "ac_cv_func_$ac_func=no"
6030 fi
6031 rm -f conftest*
6032 fi
6033
6034 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6035   echo "$ac_t""yes" 1>&6
6036     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6037   cat >> confdefs.h <<EOF
6038 #define $ac_tr_func 1
6039 EOF
6040  
6041 else
6042   echo "$ac_t""no" 1>&6
6043 fi
6044 done
6045
6046
6047 # syscall() is needed for smbwrapper.
6048 for ac_func in syscall
6049 do
6050 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6051 echo "configure:6052: checking for $ac_func" >&5
6052 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6053   echo $ac_n "(cached) $ac_c" 1>&6
6054 else
6055   cat > conftest.$ac_ext <<EOF
6056 #line 6057 "configure"
6057 #include "confdefs.h"
6058 /* System header to define __stub macros and hopefully few prototypes,
6059     which can conflict with char $ac_func(); below.  */
6060 #include <assert.h>
6061 /* Override any gcc2 internal prototype to avoid an error.  */
6062 /* We use char because int might match the return type of a gcc2
6063     builtin and then its argument prototype would still apply.  */
6064 char $ac_func();
6065
6066 int main() {
6067
6068 /* The GNU C library defines this for functions which it implements
6069     to always fail with ENOSYS.  Some functions are actually named
6070     something starting with __ and the normal name is an alias.  */
6071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6072 choke me
6073 #else
6074 $ac_func();
6075 #endif
6076
6077 ; return 0; }
6078 EOF
6079 if { (eval echo configure:6080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6080   rm -rf conftest*
6081   eval "ac_cv_func_$ac_func=yes"
6082 else
6083   echo "configure: failed program was:" >&5
6084   cat conftest.$ac_ext >&5
6085   rm -rf conftest*
6086   eval "ac_cv_func_$ac_func=no"
6087 fi
6088 rm -f conftest*
6089 fi
6090
6091 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6092   echo "$ac_t""yes" 1>&6
6093     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6094   cat >> confdefs.h <<EOF
6095 #define $ac_tr_func 1
6096 EOF
6097  
6098 else
6099   echo "$ac_t""no" 1>&6
6100 fi
6101 done
6102
6103
6104 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
6105 do
6106 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6107 echo "configure:6108: checking for $ac_func" >&5
6108 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6109   echo $ac_n "(cached) $ac_c" 1>&6
6110 else
6111   cat > conftest.$ac_ext <<EOF
6112 #line 6113 "configure"
6113 #include "confdefs.h"
6114 /* System header to define __stub macros and hopefully few prototypes,
6115     which can conflict with char $ac_func(); below.  */
6116 #include <assert.h>
6117 /* Override any gcc2 internal prototype to avoid an error.  */
6118 /* We use char because int might match the return type of a gcc2
6119     builtin and then its argument prototype would still apply.  */
6120 char $ac_func();
6121
6122 int main() {
6123
6124 /* The GNU C library defines this for functions which it implements
6125     to always fail with ENOSYS.  Some functions are actually named
6126     something starting with __ and the normal name is an alias.  */
6127 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6128 choke me
6129 #else
6130 $ac_func();
6131 #endif
6132
6133 ; return 0; }
6134 EOF
6135 if { (eval echo configure:6136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6136   rm -rf conftest*
6137   eval "ac_cv_func_$ac_func=yes"
6138 else
6139   echo "configure: failed program was:" >&5
6140   cat conftest.$ac_ext >&5
6141   rm -rf conftest*
6142   eval "ac_cv_func_$ac_func=no"
6143 fi
6144 rm -f conftest*
6145 fi
6146
6147 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6148   echo "$ac_t""yes" 1>&6
6149     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6150   cat >> confdefs.h <<EOF
6151 #define $ac_tr_func 1
6152 EOF
6153  
6154 else
6155   echo "$ac_t""no" 1>&6
6156 fi
6157 done
6158
6159 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
6160 do
6161 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6162 echo "configure:6163: checking for $ac_func" >&5
6163 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6164   echo $ac_n "(cached) $ac_c" 1>&6
6165 else
6166   cat > conftest.$ac_ext <<EOF
6167 #line 6168 "configure"
6168 #include "confdefs.h"
6169 /* System header to define __stub macros and hopefully few prototypes,
6170     which can conflict with char $ac_func(); below.  */
6171 #include <assert.h>
6172 /* Override any gcc2 internal prototype to avoid an error.  */
6173 /* We use char because int might match the return type of a gcc2
6174     builtin and then its argument prototype would still apply.  */
6175 char $ac_func();
6176
6177 int main() {
6178
6179 /* The GNU C library defines this for functions which it implements
6180     to always fail with ENOSYS.  Some functions are actually named
6181     something starting with __ and the normal name is an alias.  */
6182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6183 choke me
6184 #else
6185 $ac_func();
6186 #endif
6187
6188 ; return 0; }
6189 EOF
6190 if { (eval echo configure:6191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6191   rm -rf conftest*
6192   eval "ac_cv_func_$ac_func=yes"
6193 else
6194   echo "configure: failed program was:" >&5
6195   cat conftest.$ac_ext >&5
6196   rm -rf conftest*
6197   eval "ac_cv_func_$ac_func=no"
6198 fi
6199 rm -f conftest*
6200 fi
6201
6202 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6203   echo "$ac_t""yes" 1>&6
6204     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6205   cat >> confdefs.h <<EOF
6206 #define $ac_tr_func 1
6207 EOF
6208  
6209 else
6210   echo "$ac_t""no" 1>&6
6211 fi
6212 done
6213
6214 for ac_func in __getcwd _getcwd
6215 do
6216 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6217 echo "configure:6218: checking for $ac_func" >&5
6218 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6219   echo $ac_n "(cached) $ac_c" 1>&6
6220 else
6221   cat > conftest.$ac_ext <<EOF
6222 #line 6223 "configure"
6223 #include "confdefs.h"
6224 /* System header to define __stub macros and hopefully few prototypes,
6225     which can conflict with char $ac_func(); below.  */
6226 #include <assert.h>
6227 /* Override any gcc2 internal prototype to avoid an error.  */
6228 /* We use char because int might match the return type of a gcc2
6229     builtin and then its argument prototype would still apply.  */
6230 char $ac_func();
6231
6232 int main() {
6233
6234 /* The GNU C library defines this for functions which it implements
6235     to always fail with ENOSYS.  Some functions are actually named
6236     something starting with __ and the normal name is an alias.  */
6237 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6238 choke me
6239 #else
6240 $ac_func();
6241 #endif
6242
6243 ; return 0; }
6244 EOF
6245 if { (eval echo configure:6246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6246   rm -rf conftest*
6247   eval "ac_cv_func_$ac_func=yes"
6248 else
6249   echo "configure: failed program was:" >&5
6250   cat conftest.$ac_ext >&5
6251   rm -rf conftest*
6252   eval "ac_cv_func_$ac_func=no"
6253 fi
6254 rm -f conftest*
6255 fi
6256
6257 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6258   echo "$ac_t""yes" 1>&6
6259     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6260   cat >> confdefs.h <<EOF
6261 #define $ac_tr_func 1
6262 EOF
6263  
6264 else
6265   echo "$ac_t""no" 1>&6
6266 fi
6267 done
6268
6269 for ac_func in __xstat __fxstat __lxstat
6270 do
6271 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6272 echo "configure:6273: checking for $ac_func" >&5
6273 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6274   echo $ac_n "(cached) $ac_c" 1>&6
6275 else
6276   cat > conftest.$ac_ext <<EOF
6277 #line 6278 "configure"
6278 #include "confdefs.h"
6279 /* System header to define __stub macros and hopefully few prototypes,
6280     which can conflict with char $ac_func(); below.  */
6281 #include <assert.h>
6282 /* Override any gcc2 internal prototype to avoid an error.  */
6283 /* We use char because int might match the return type of a gcc2
6284     builtin and then its argument prototype would still apply.  */
6285 char $ac_func();
6286
6287 int main() {
6288
6289 /* The GNU C library defines this for functions which it implements
6290     to always fail with ENOSYS.  Some functions are actually named
6291     something starting with __ and the normal name is an alias.  */
6292 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6293 choke me
6294 #else
6295 $ac_func();
6296 #endif
6297
6298 ; return 0; }
6299 EOF
6300 if { (eval echo configure:6301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6301   rm -rf conftest*
6302   eval "ac_cv_func_$ac_func=yes"
6303 else
6304   echo "configure: failed program was:" >&5
6305   cat conftest.$ac_ext >&5
6306   rm -rf conftest*
6307   eval "ac_cv_func_$ac_func=no"
6308 fi
6309 rm -f conftest*
6310 fi
6311
6312 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6313   echo "$ac_t""yes" 1>&6
6314     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6315   cat >> confdefs.h <<EOF
6316 #define $ac_tr_func 1
6317 EOF
6318  
6319 else
6320   echo "$ac_t""no" 1>&6
6321 fi
6322 done
6323
6324 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6325 do
6326 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6327 echo "configure:6328: checking for $ac_func" >&5
6328 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6329   echo $ac_n "(cached) $ac_c" 1>&6
6330 else
6331   cat > conftest.$ac_ext <<EOF
6332 #line 6333 "configure"
6333 #include "confdefs.h"
6334 /* System header to define __stub macros and hopefully few prototypes,
6335     which can conflict with char $ac_func(); below.  */
6336 #include <assert.h>
6337 /* Override any gcc2 internal prototype to avoid an error.  */
6338 /* We use char because int might match the return type of a gcc2
6339     builtin and then its argument prototype would still apply.  */
6340 char $ac_func();
6341
6342 int main() {
6343
6344 /* The GNU C library defines this for functions which it implements
6345     to always fail with ENOSYS.  Some functions are actually named
6346     something starting with __ and the normal name is an alias.  */
6347 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6348 choke me
6349 #else
6350 $ac_func();
6351 #endif
6352
6353 ; return 0; }
6354 EOF
6355 if { (eval echo configure:6356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6356   rm -rf conftest*
6357   eval "ac_cv_func_$ac_func=yes"
6358 else
6359   echo "configure: failed program was:" >&5
6360   cat conftest.$ac_ext >&5
6361   rm -rf conftest*
6362   eval "ac_cv_func_$ac_func=no"
6363 fi
6364 rm -f conftest*
6365 fi
6366
6367 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6368   echo "$ac_t""yes" 1>&6
6369     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6370   cat >> confdefs.h <<EOF
6371 #define $ac_tr_func 1
6372 EOF
6373  
6374 else
6375   echo "$ac_t""no" 1>&6
6376 fi
6377 done
6378
6379 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6380 do
6381 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6382 echo "configure:6383: checking for $ac_func" >&5
6383 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6384   echo $ac_n "(cached) $ac_c" 1>&6
6385 else
6386   cat > conftest.$ac_ext <<EOF
6387 #line 6388 "configure"
6388 #include "confdefs.h"
6389 /* System header to define __stub macros and hopefully few prototypes,
6390     which can conflict with char $ac_func(); below.  */
6391 #include <assert.h>
6392 /* Override any gcc2 internal prototype to avoid an error.  */
6393 /* We use char because int might match the return type of a gcc2
6394     builtin and then its argument prototype would still apply.  */
6395 char $ac_func();
6396
6397 int main() {
6398
6399 /* The GNU C library defines this for functions which it implements
6400     to always fail with ENOSYS.  Some functions are actually named
6401     something starting with __ and the normal name is an alias.  */
6402 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6403 choke me
6404 #else
6405 $ac_func();
6406 #endif
6407
6408 ; return 0; }
6409 EOF
6410 if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6411   rm -rf conftest*
6412   eval "ac_cv_func_$ac_func=yes"
6413 else
6414   echo "configure: failed program was:" >&5
6415   cat conftest.$ac_ext >&5
6416   rm -rf conftest*
6417   eval "ac_cv_func_$ac_func=no"
6418 fi
6419 rm -f conftest*
6420 fi
6421
6422 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6423   echo "$ac_t""yes" 1>&6
6424     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6425   cat >> confdefs.h <<EOF
6426 #define $ac_tr_func 1
6427 EOF
6428  
6429 else
6430   echo "$ac_t""no" 1>&6
6431 fi
6432 done
6433
6434 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6435 do
6436 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6437 echo "configure:6438: checking for $ac_func" >&5
6438 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6439   echo $ac_n "(cached) $ac_c" 1>&6
6440 else
6441   cat > conftest.$ac_ext <<EOF
6442 #line 6443 "configure"
6443 #include "confdefs.h"
6444 /* System header to define __stub macros and hopefully few prototypes,
6445     which can conflict with char $ac_func(); below.  */
6446 #include <assert.h>
6447 /* Override any gcc2 internal prototype to avoid an error.  */
6448 /* We use char because int might match the return type of a gcc2
6449     builtin and then its argument prototype would still apply.  */
6450 char $ac_func();
6451
6452 int main() {
6453
6454 /* The GNU C library defines this for functions which it implements
6455     to always fail with ENOSYS.  Some functions are actually named
6456     something starting with __ and the normal name is an alias.  */
6457 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6458 choke me
6459 #else
6460 $ac_func();
6461 #endif
6462
6463 ; return 0; }
6464 EOF
6465 if { (eval echo configure:6466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6466   rm -rf conftest*
6467   eval "ac_cv_func_$ac_func=yes"
6468 else
6469   echo "configure: failed program was:" >&5
6470   cat conftest.$ac_ext >&5
6471   rm -rf conftest*
6472   eval "ac_cv_func_$ac_func=no"
6473 fi
6474 rm -f conftest*
6475 fi
6476
6477 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6478   echo "$ac_t""yes" 1>&6
6479     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6480   cat >> confdefs.h <<EOF
6481 #define $ac_tr_func 1
6482 EOF
6483  
6484 else
6485   echo "$ac_t""no" 1>&6
6486 fi
6487 done
6488
6489 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6490 do
6491 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6492 echo "configure:6493: checking for $ac_func" >&5
6493 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6494   echo $ac_n "(cached) $ac_c" 1>&6
6495 else
6496   cat > conftest.$ac_ext <<EOF
6497 #line 6498 "configure"
6498 #include "confdefs.h"
6499 /* System header to define __stub macros and hopefully few prototypes,
6500     which can conflict with char $ac_func(); below.  */
6501 #include <assert.h>
6502 /* Override any gcc2 internal prototype to avoid an error.  */
6503 /* We use char because int might match the return type of a gcc2
6504     builtin and then its argument prototype would still apply.  */
6505 char $ac_func();
6506
6507 int main() {
6508
6509 /* The GNU C library defines this for functions which it implements
6510     to always fail with ENOSYS.  Some functions are actually named
6511     something starting with __ and the normal name is an alias.  */
6512 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6513 choke me
6514 #else
6515 $ac_func();
6516 #endif
6517
6518 ; return 0; }
6519 EOF
6520 if { (eval echo configure:6521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6521   rm -rf conftest*
6522   eval "ac_cv_func_$ac_func=yes"
6523 else
6524   echo "configure: failed program was:" >&5
6525   cat conftest.$ac_ext >&5
6526   rm -rf conftest*
6527   eval "ac_cv_func_$ac_func=no"
6528 fi
6529 rm -f conftest*
6530 fi
6531
6532 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6533   echo "$ac_t""yes" 1>&6
6534     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6535   cat >> confdefs.h <<EOF
6536 #define $ac_tr_func 1
6537 EOF
6538  
6539 else
6540   echo "$ac_t""no" 1>&6
6541 fi
6542 done
6543
6544 for ac_func in _write __write _fork __fork
6545 do
6546 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6547 echo "configure:6548: checking for $ac_func" >&5
6548 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6549   echo $ac_n "(cached) $ac_c" 1>&6
6550 else
6551   cat > conftest.$ac_ext <<EOF
6552 #line 6553 "configure"
6553 #include "confdefs.h"
6554 /* System header to define __stub macros and hopefully few prototypes,
6555     which can conflict with char $ac_func(); below.  */
6556 #include <assert.h>
6557 /* Override any gcc2 internal prototype to avoid an error.  */
6558 /* We use char because int might match the return type of a gcc2
6559     builtin and then its argument prototype would still apply.  */
6560 char $ac_func();
6561
6562 int main() {
6563
6564 /* The GNU C library defines this for functions which it implements
6565     to always fail with ENOSYS.  Some functions are actually named
6566     something starting with __ and the normal name is an alias.  */
6567 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6568 choke me
6569 #else
6570 $ac_func();
6571 #endif
6572
6573 ; return 0; }
6574 EOF
6575 if { (eval echo configure:6576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6576   rm -rf conftest*
6577   eval "ac_cv_func_$ac_func=yes"
6578 else
6579   echo "configure: failed program was:" >&5
6580   cat conftest.$ac_ext >&5
6581   rm -rf conftest*
6582   eval "ac_cv_func_$ac_func=no"
6583 fi
6584 rm -f conftest*
6585 fi
6586
6587 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6588   echo "$ac_t""yes" 1>&6
6589     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6590   cat >> confdefs.h <<EOF
6591 #define $ac_tr_func 1
6592 EOF
6593  
6594 else
6595   echo "$ac_t""no" 1>&6
6596 fi
6597 done
6598
6599 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6600 do
6601 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6602 echo "configure:6603: checking for $ac_func" >&5
6603 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6604   echo $ac_n "(cached) $ac_c" 1>&6
6605 else
6606   cat > conftest.$ac_ext <<EOF
6607 #line 6608 "configure"
6608 #include "confdefs.h"
6609 /* System header to define __stub macros and hopefully few prototypes,
6610     which can conflict with char $ac_func(); below.  */
6611 #include <assert.h>
6612 /* Override any gcc2 internal prototype to avoid an error.  */
6613 /* We use char because int might match the return type of a gcc2
6614     builtin and then its argument prototype would still apply.  */
6615 char $ac_func();
6616
6617 int main() {
6618
6619 /* The GNU C library defines this for functions which it implements
6620     to always fail with ENOSYS.  Some functions are actually named
6621     something starting with __ and the normal name is an alias.  */
6622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6623 choke me
6624 #else
6625 $ac_func();
6626 #endif
6627
6628 ; return 0; }
6629 EOF
6630 if { (eval echo configure:6631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6631   rm -rf conftest*
6632   eval "ac_cv_func_$ac_func=yes"
6633 else
6634   echo "configure: failed program was:" >&5
6635   cat conftest.$ac_ext >&5
6636   rm -rf conftest*
6637   eval "ac_cv_func_$ac_func=no"
6638 fi
6639 rm -f conftest*
6640 fi
6641
6642 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6643   echo "$ac_t""yes" 1>&6
6644     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6645   cat >> confdefs.h <<EOF
6646 #define $ac_tr_func 1
6647 EOF
6648  
6649 else
6650   echo "$ac_t""no" 1>&6
6651 fi
6652 done
6653
6654 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6655 do
6656 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6657 echo "configure:6658: checking for $ac_func" >&5
6658 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6659   echo $ac_n "(cached) $ac_c" 1>&6
6660 else
6661   cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* System header to define __stub macros and hopefully few prototypes,
6665     which can conflict with char $ac_func(); below.  */
6666 #include <assert.h>
6667 /* Override any gcc2 internal prototype to avoid an error.  */
6668 /* We use char because int might match the return type of a gcc2
6669     builtin and then its argument prototype would still apply.  */
6670 char $ac_func();
6671
6672 int main() {
6673
6674 /* The GNU C library defines this for functions which it implements
6675     to always fail with ENOSYS.  Some functions are actually named
6676     something starting with __ and the normal name is an alias.  */
6677 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6678 choke me
6679 #else
6680 $ac_func();
6681 #endif
6682
6683 ; return 0; }
6684 EOF
6685 if { (eval echo configure:6686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6686   rm -rf conftest*
6687   eval "ac_cv_func_$ac_func=yes"
6688 else
6689   echo "configure: failed program was:" >&5
6690   cat conftest.$ac_ext >&5
6691   rm -rf conftest*
6692   eval "ac_cv_func_$ac_func=no"
6693 fi
6694 rm -f conftest*
6695 fi
6696
6697 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6698   echo "$ac_t""yes" 1>&6
6699     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6700   cat >> confdefs.h <<EOF
6701 #define $ac_tr_func 1
6702 EOF
6703  
6704 else
6705   echo "$ac_t""no" 1>&6
6706 fi
6707 done
6708
6709 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6710 do
6711 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6712 echo "configure:6713: checking for $ac_func" >&5
6713 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6714   echo $ac_n "(cached) $ac_c" 1>&6
6715 else
6716   cat > conftest.$ac_ext <<EOF
6717 #line 6718 "configure"
6718 #include "confdefs.h"
6719 /* System header to define __stub macros and hopefully few prototypes,
6720     which can conflict with char $ac_func(); below.  */
6721 #include <assert.h>
6722 /* Override any gcc2 internal prototype to avoid an error.  */
6723 /* We use char because int might match the return type of a gcc2
6724     builtin and then its argument prototype would still apply.  */
6725 char $ac_func();
6726
6727 int main() {
6728
6729 /* The GNU C library defines this for functions which it implements
6730     to always fail with ENOSYS.  Some functions are actually named
6731     something starting with __ and the normal name is an alias.  */
6732 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6733 choke me
6734 #else
6735 $ac_func();
6736 #endif
6737
6738 ; return 0; }
6739 EOF
6740 if { (eval echo configure:6741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6741   rm -rf conftest*
6742   eval "ac_cv_func_$ac_func=yes"
6743 else
6744   echo "configure: failed program was:" >&5
6745   cat conftest.$ac_ext >&5
6746   rm -rf conftest*
6747   eval "ac_cv_func_$ac_func=no"
6748 fi
6749 rm -f conftest*
6750 fi
6751
6752 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6753   echo "$ac_t""yes" 1>&6
6754     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6755   cat >> confdefs.h <<EOF
6756 #define $ac_tr_func 1
6757 EOF
6758  
6759 else
6760   echo "$ac_t""no" 1>&6
6761 fi
6762 done
6763
6764 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6765 do
6766 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6767 echo "configure:6768: checking for $ac_func" >&5
6768 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6769   echo $ac_n "(cached) $ac_c" 1>&6
6770 else
6771   cat > conftest.$ac_ext <<EOF
6772 #line 6773 "configure"
6773 #include "confdefs.h"
6774 /* System header to define __stub macros and hopefully few prototypes,
6775     which can conflict with char $ac_func(); below.  */
6776 #include <assert.h>
6777 /* Override any gcc2 internal prototype to avoid an error.  */
6778 /* We use char because int might match the return type of a gcc2
6779     builtin and then its argument prototype would still apply.  */
6780 char $ac_func();
6781
6782 int main() {
6783
6784 /* The GNU C library defines this for functions which it implements
6785     to always fail with ENOSYS.  Some functions are actually named
6786     something starting with __ and the normal name is an alias.  */
6787 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6788 choke me
6789 #else
6790 $ac_func();
6791 #endif
6792
6793 ; return 0; }
6794 EOF
6795 if { (eval echo configure:6796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6796   rm -rf conftest*
6797   eval "ac_cv_func_$ac_func=yes"
6798 else
6799   echo "configure: failed program was:" >&5
6800   cat conftest.$ac_ext >&5
6801   rm -rf conftest*
6802   eval "ac_cv_func_$ac_func=no"
6803 fi
6804 rm -f conftest*
6805 fi
6806
6807 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6808   echo "$ac_t""yes" 1>&6
6809     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6810   cat >> confdefs.h <<EOF
6811 #define $ac_tr_func 1
6812 EOF
6813  
6814 else
6815   echo "$ac_t""no" 1>&6
6816 fi
6817 done
6818
6819 for ac_func in open64 _open64 __open64 creat64
6820 do
6821 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6822 echo "configure:6823: checking for $ac_func" >&5
6823 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6824   echo $ac_n "(cached) $ac_c" 1>&6
6825 else
6826   cat > conftest.$ac_ext <<EOF
6827 #line 6828 "configure"
6828 #include "confdefs.h"
6829 /* System header to define __stub macros and hopefully few prototypes,
6830     which can conflict with char $ac_func(); below.  */
6831 #include <assert.h>
6832 /* Override any gcc2 internal prototype to avoid an error.  */
6833 /* We use char because int might match the return type of a gcc2
6834     builtin and then its argument prototype would still apply.  */
6835 char $ac_func();
6836
6837 int main() {
6838
6839 /* The GNU C library defines this for functions which it implements
6840     to always fail with ENOSYS.  Some functions are actually named
6841     something starting with __ and the normal name is an alias.  */
6842 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6843 choke me
6844 #else
6845 $ac_func();
6846 #endif
6847
6848 ; return 0; }
6849 EOF
6850 if { (eval echo configure:6851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6851   rm -rf conftest*
6852   eval "ac_cv_func_$ac_func=yes"
6853 else
6854   echo "configure: failed program was:" >&5
6855   cat conftest.$ac_ext >&5
6856   rm -rf conftest*
6857   eval "ac_cv_func_$ac_func=no"
6858 fi
6859 rm -f conftest*
6860 fi
6861
6862 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6863   echo "$ac_t""yes" 1>&6
6864     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6865   cat >> confdefs.h <<EOF
6866 #define $ac_tr_func 1
6867 EOF
6868  
6869 else
6870   echo "$ac_t""no" 1>&6
6871 fi
6872 done
6873
6874
6875 #
6876 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6877 #
6878
6879 if test x$ac_cv_func_stat64 = xno ; then
6880   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6881 echo "configure:6882: checking for stat64 in <sys/stat.h>" >&5
6882   cat > conftest.$ac_ext <<EOF
6883 #line 6884 "configure"
6884 #include "confdefs.h"
6885
6886 #if defined(HAVE_UNISTD_H)
6887 #include <unistd.h>
6888 #endif
6889 #include <sys/stat.h>
6890
6891 int main() {
6892 struct stat64 st64; exit(stat64(".",&st64));
6893 ; return 0; }
6894 EOF
6895 if { (eval echo configure:6896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6896   rm -rf conftest*
6897   ac_cv_func_stat64=yes
6898 else
6899   echo "configure: failed program was:" >&5
6900   cat conftest.$ac_ext >&5
6901 fi
6902 rm -f conftest*
6903   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6904   if test x$ac_cv_func_stat64 = xyes ; then
6905     cat >> confdefs.h <<\EOF
6906 #define HAVE_STAT64 1
6907 EOF
6908
6909   fi
6910 fi
6911
6912 if test x$ac_cv_func_lstat64 = xno ; then
6913   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6914 echo "configure:6915: checking for lstat64 in <sys/stat.h>" >&5
6915   cat > conftest.$ac_ext <<EOF
6916 #line 6917 "configure"
6917 #include "confdefs.h"
6918
6919 #if defined(HAVE_UNISTD_H)
6920 #include <unistd.h>
6921 #endif
6922 #include <sys/stat.h>
6923
6924 int main() {
6925 struct stat64 st64; exit(lstat64(".",&st64));
6926 ; return 0; }
6927 EOF
6928 if { (eval echo configure:6929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6929   rm -rf conftest*
6930   ac_cv_func_lstat64=yes
6931 else
6932   echo "configure: failed program was:" >&5
6933   cat conftest.$ac_ext >&5
6934 fi
6935 rm -f conftest*
6936   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6937   if test x$ac_cv_func_lstat64 = xyes ; then
6938     cat >> confdefs.h <<\EOF
6939 #define HAVE_LSTAT64 1
6940 EOF
6941
6942   fi
6943 fi
6944
6945 if test x$ac_cv_func_fstat64 = xno ; then
6946   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6947 echo "configure:6948: checking for fstat64 in <sys/stat.h>" >&5
6948   cat > conftest.$ac_ext <<EOF
6949 #line 6950 "configure"
6950 #include "confdefs.h"
6951
6952 #if defined(HAVE_UNISTD_H)
6953 #include <unistd.h>
6954 #endif
6955 #include <sys/stat.h>
6956
6957 int main() {
6958 struct stat64 st64; exit(fstat64(0,&st64));
6959 ; return 0; }
6960 EOF
6961 if { (eval echo configure:6962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6962   rm -rf conftest*
6963   ac_cv_func_fstat64=yes
6964 else
6965   echo "configure: failed program was:" >&5
6966   cat conftest.$ac_ext >&5
6967 fi
6968 rm -f conftest*
6969   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6970   if test x$ac_cv_func_fstat64 = xyes ; then
6971     cat >> confdefs.h <<\EOF
6972 #define HAVE_FSTAT64 1
6973 EOF
6974
6975   fi
6976 fi
6977
6978 #####################################
6979 # we might need the resolv library on some systems
6980 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6981 echo "configure:6982: checking for dn_expand in -lresolv" >&5
6982 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6983 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6984   echo $ac_n "(cached) $ac_c" 1>&6
6985 else
6986   ac_save_LIBS="$LIBS"
6987 LIBS="-lresolv  $LIBS"
6988 cat > conftest.$ac_ext <<EOF
6989 #line 6990 "configure"
6990 #include "confdefs.h"
6991 /* Override any gcc2 internal prototype to avoid an error.  */
6992 /* We use char because int might match the return type of a gcc2
6993     builtin and then its argument prototype would still apply.  */
6994 char dn_expand();
6995
6996 int main() {
6997 dn_expand()
6998 ; return 0; }
6999 EOF
7000 if { (eval echo configure:7001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7001   rm -rf conftest*
7002   eval "ac_cv_lib_$ac_lib_var=yes"
7003 else
7004   echo "configure: failed program was:" >&5
7005   cat conftest.$ac_ext >&5
7006   rm -rf conftest*
7007   eval "ac_cv_lib_$ac_lib_var=no"
7008 fi
7009 rm -f conftest*
7010 LIBS="$ac_save_LIBS"
7011
7012 fi
7013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7014   echo "$ac_t""yes" 1>&6
7015     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7016     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7017   cat >> confdefs.h <<EOF
7018 #define $ac_tr_lib 1
7019 EOF
7020
7021   LIBS="-lresolv $LIBS"
7022
7023 else
7024   echo "$ac_t""no" 1>&6
7025 fi
7026
7027
7028 #
7029 # Check for the functions putprpwnam, set_auth_parameters,
7030 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
7031 # Needed for OSF1 and HPUX.
7032 #
7033
7034 case "$LIBS" in
7035   *-lsecurity*) for ac_func in putprpwnam
7036 do
7037 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7038 echo "configure:7039: checking for $ac_func" >&5
7039 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7040   echo $ac_n "(cached) $ac_c" 1>&6
7041 else
7042   cat > conftest.$ac_ext <<EOF
7043 #line 7044 "configure"
7044 #include "confdefs.h"
7045 /* System header to define __stub macros and hopefully few prototypes,
7046     which can conflict with char $ac_func(); below.  */
7047 #include <assert.h>
7048 /* Override any gcc2 internal prototype to avoid an error.  */
7049 /* We use char because int might match the return type of a gcc2
7050     builtin and then its argument prototype would still apply.  */
7051 char $ac_func();
7052
7053 int main() {
7054
7055 /* The GNU C library defines this for functions which it implements
7056     to always fail with ENOSYS.  Some functions are actually named
7057     something starting with __ and the normal name is an alias.  */
7058 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7059 choke me
7060 #else
7061 $ac_func();
7062 #endif
7063
7064 ; return 0; }
7065 EOF
7066 if { (eval echo configure:7067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7067   rm -rf conftest*
7068   eval "ac_cv_func_$ac_func=yes"
7069 else
7070   echo "configure: failed program was:" >&5
7071   cat conftest.$ac_ext >&5
7072   rm -rf conftest*
7073   eval "ac_cv_func_$ac_func=no"
7074 fi
7075 rm -f conftest*
7076 fi
7077
7078 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7079   echo "$ac_t""yes" 1>&6
7080     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7081   cat >> confdefs.h <<EOF
7082 #define $ac_tr_func 1
7083 EOF
7084  
7085 else
7086   echo "$ac_t""no" 1>&6
7087 fi
7088 done
7089  ;;
7090   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
7091 echo "configure:7092: checking for putprpwnam in -lsecurity" >&5
7092 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
7093 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7094   echo $ac_n "(cached) $ac_c" 1>&6
7095 else
7096   ac_save_LIBS="$LIBS"
7097 LIBS="-lsecurity  $LIBS"
7098 cat > conftest.$ac_ext <<EOF
7099 #line 7100 "configure"
7100 #include "confdefs.h"
7101 /* Override any gcc2 internal prototype to avoid an error.  */
7102 /* We use char because int might match the return type of a gcc2
7103     builtin and then its argument prototype would still apply.  */
7104 char putprpwnam();
7105
7106 int main() {
7107 putprpwnam()
7108 ; return 0; }
7109 EOF
7110 if { (eval echo configure:7111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7111   rm -rf conftest*
7112   eval "ac_cv_lib_$ac_lib_var=yes"
7113 else
7114   echo "configure: failed program was:" >&5
7115   cat conftest.$ac_ext >&5
7116   rm -rf conftest*
7117   eval "ac_cv_lib_$ac_lib_var=no"
7118 fi
7119 rm -f conftest*
7120 LIBS="$ac_save_LIBS"
7121
7122 fi
7123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7124   echo "$ac_t""yes" 1>&6
7125     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7126     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7127   cat >> confdefs.h <<EOF
7128 #define $ac_tr_lib 1
7129 EOF
7130
7131   LIBS="-lsecurity $LIBS"
7132
7133 else
7134   echo "$ac_t""no" 1>&6
7135 fi
7136  
7137      for ac_func in putprpwnam
7138 do
7139 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7140 echo "configure:7141: checking for $ac_func" >&5
7141 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7142   echo $ac_n "(cached) $ac_c" 1>&6
7143 else
7144   cat > conftest.$ac_ext <<EOF
7145 #line 7146 "configure"
7146 #include "confdefs.h"
7147 /* System header to define __stub macros and hopefully few prototypes,
7148     which can conflict with char $ac_func(); below.  */
7149 #include <assert.h>
7150 /* Override any gcc2 internal prototype to avoid an error.  */
7151 /* We use char because int might match the return type of a gcc2
7152     builtin and then its argument prototype would still apply.  */
7153 char $ac_func();
7154
7155 int main() {
7156
7157 /* The GNU C library defines this for functions which it implements
7158     to always fail with ENOSYS.  Some functions are actually named
7159     something starting with __ and the normal name is an alias.  */
7160 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7161 choke me
7162 #else
7163 $ac_func();
7164 #endif
7165
7166 ; return 0; }
7167 EOF
7168 if { (eval echo configure:7169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7169   rm -rf conftest*
7170   eval "ac_cv_func_$ac_func=yes"
7171 else
7172   echo "configure: failed program was:" >&5
7173   cat conftest.$ac_ext >&5
7174   rm -rf conftest*
7175   eval "ac_cv_func_$ac_func=no"
7176 fi
7177 rm -f conftest*
7178 fi
7179
7180 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7181   echo "$ac_t""yes" 1>&6
7182     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7183   cat >> confdefs.h <<EOF
7184 #define $ac_tr_func 1
7185 EOF
7186  
7187 else
7188   echo "$ac_t""no" 1>&6
7189 fi
7190 done
7191
7192   ;;
7193   esac
7194
7195 case "$LIBS" in
7196   *-lsec*) for ac_func in putprpwnam
7197 do
7198 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7199 echo "configure:7200: checking for $ac_func" >&5
7200 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7201   echo $ac_n "(cached) $ac_c" 1>&6
7202 else
7203   cat > conftest.$ac_ext <<EOF
7204 #line 7205 "configure"
7205 #include "confdefs.h"
7206 /* System header to define __stub macros and hopefully few prototypes,
7207     which can conflict with char $ac_func(); below.  */
7208 #include <assert.h>
7209 /* Override any gcc2 internal prototype to avoid an error.  */
7210 /* We use char because int might match the return type of a gcc2
7211     builtin and then its argument prototype would still apply.  */
7212 char $ac_func();
7213
7214 int main() {
7215
7216 /* The GNU C library defines this for functions which it implements
7217     to always fail with ENOSYS.  Some functions are actually named
7218     something starting with __ and the normal name is an alias.  */
7219 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7220 choke me
7221 #else
7222 $ac_func();
7223 #endif
7224
7225 ; return 0; }
7226 EOF
7227 if { (eval echo configure:7228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7228   rm -rf conftest*
7229   eval "ac_cv_func_$ac_func=yes"
7230 else
7231   echo "configure: failed program was:" >&5
7232   cat conftest.$ac_ext >&5
7233   rm -rf conftest*
7234   eval "ac_cv_func_$ac_func=no"
7235 fi
7236 rm -f conftest*
7237 fi
7238
7239 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7240   echo "$ac_t""yes" 1>&6
7241     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7242   cat >> confdefs.h <<EOF
7243 #define $ac_tr_func 1
7244 EOF
7245  
7246 else
7247   echo "$ac_t""no" 1>&6
7248 fi
7249 done
7250  ;;
7251   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
7252 echo "configure:7253: checking for putprpwnam in -lsec" >&5
7253 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
7254 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7255   echo $ac_n "(cached) $ac_c" 1>&6
7256 else
7257   ac_save_LIBS="$LIBS"
7258 LIBS="-lsec  $LIBS"
7259 cat > conftest.$ac_ext <<EOF
7260 #line 7261 "configure"
7261 #include "confdefs.h"
7262 /* Override any gcc2 internal prototype to avoid an error.  */
7263 /* We use char because int might match the return type of a gcc2
7264     builtin and then its argument prototype would still apply.  */
7265 char putprpwnam();
7266
7267 int main() {
7268 putprpwnam()
7269 ; return 0; }
7270 EOF
7271 if { (eval echo configure:7272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7272   rm -rf conftest*
7273   eval "ac_cv_lib_$ac_lib_var=yes"
7274 else
7275   echo "configure: failed program was:" >&5
7276   cat conftest.$ac_ext >&5
7277   rm -rf conftest*
7278   eval "ac_cv_lib_$ac_lib_var=no"
7279 fi
7280 rm -f conftest*
7281 LIBS="$ac_save_LIBS"
7282
7283 fi
7284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7285   echo "$ac_t""yes" 1>&6
7286     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7287     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7288   cat >> confdefs.h <<EOF
7289 #define $ac_tr_lib 1
7290 EOF
7291
7292   LIBS="-lsec $LIBS"
7293
7294 else
7295   echo "$ac_t""no" 1>&6
7296 fi
7297  
7298      for ac_func in putprpwnam
7299 do
7300 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7301 echo "configure:7302: checking for $ac_func" >&5
7302 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7303   echo $ac_n "(cached) $ac_c" 1>&6
7304 else
7305   cat > conftest.$ac_ext <<EOF
7306 #line 7307 "configure"
7307 #include "confdefs.h"
7308 /* System header to define __stub macros and hopefully few prototypes,
7309     which can conflict with char $ac_func(); below.  */
7310 #include <assert.h>
7311 /* Override any gcc2 internal prototype to avoid an error.  */
7312 /* We use char because int might match the return type of a gcc2
7313     builtin and then its argument prototype would still apply.  */
7314 char $ac_func();
7315
7316 int main() {
7317
7318 /* The GNU C library defines this for functions which it implements
7319     to always fail with ENOSYS.  Some functions are actually named
7320     something starting with __ and the normal name is an alias.  */
7321 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7322 choke me
7323 #else
7324 $ac_func();
7325 #endif
7326
7327 ; return 0; }
7328 EOF
7329 if { (eval echo configure:7330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7330   rm -rf conftest*
7331   eval "ac_cv_func_$ac_func=yes"
7332 else
7333   echo "configure: failed program was:" >&5
7334   cat conftest.$ac_ext >&5
7335   rm -rf conftest*
7336   eval "ac_cv_func_$ac_func=no"
7337 fi
7338 rm -f conftest*
7339 fi
7340
7341 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7342   echo "$ac_t""yes" 1>&6
7343     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7344   cat >> confdefs.h <<EOF
7345 #define $ac_tr_func 1
7346 EOF
7347  
7348 else
7349   echo "$ac_t""no" 1>&6
7350 fi
7351 done
7352
7353   ;;
7354   esac
7355
7356
7357 case "$LIBS" in
7358   *-lsecurity*) for ac_func in set_auth_parameters
7359 do
7360 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7361 echo "configure:7362: checking for $ac_func" >&5
7362 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7363   echo $ac_n "(cached) $ac_c" 1>&6
7364 else
7365   cat > conftest.$ac_ext <<EOF
7366 #line 7367 "configure"
7367 #include "confdefs.h"
7368 /* System header to define __stub macros and hopefully few prototypes,
7369     which can conflict with char $ac_func(); below.  */
7370 #include <assert.h>
7371 /* Override any gcc2 internal prototype to avoid an error.  */
7372 /* We use char because int might match the return type of a gcc2
7373     builtin and then its argument prototype would still apply.  */
7374 char $ac_func();
7375
7376 int main() {
7377
7378 /* The GNU C library defines this for functions which it implements
7379     to always fail with ENOSYS.  Some functions are actually named
7380     something starting with __ and the normal name is an alias.  */
7381 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7382 choke me
7383 #else
7384 $ac_func();
7385 #endif
7386
7387 ; return 0; }
7388 EOF
7389 if { (eval echo configure:7390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7390   rm -rf conftest*
7391   eval "ac_cv_func_$ac_func=yes"
7392 else
7393   echo "configure: failed program was:" >&5
7394   cat conftest.$ac_ext >&5
7395   rm -rf conftest*
7396   eval "ac_cv_func_$ac_func=no"
7397 fi
7398 rm -f conftest*
7399 fi
7400
7401 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7402   echo "$ac_t""yes" 1>&6
7403     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7404   cat >> confdefs.h <<EOF
7405 #define $ac_tr_func 1
7406 EOF
7407  
7408 else
7409   echo "$ac_t""no" 1>&6
7410 fi
7411 done
7412  ;;
7413   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7414 echo "configure:7415: checking for set_auth_parameters in -lsecurity" >&5
7415 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7416 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7417   echo $ac_n "(cached) $ac_c" 1>&6
7418 else
7419   ac_save_LIBS="$LIBS"
7420 LIBS="-lsecurity  $LIBS"
7421 cat > conftest.$ac_ext <<EOF
7422 #line 7423 "configure"
7423 #include "confdefs.h"
7424 /* Override any gcc2 internal prototype to avoid an error.  */
7425 /* We use char because int might match the return type of a gcc2
7426     builtin and then its argument prototype would still apply.  */
7427 char set_auth_parameters();
7428
7429 int main() {
7430 set_auth_parameters()
7431 ; return 0; }
7432 EOF
7433 if { (eval echo configure:7434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7434   rm -rf conftest*
7435   eval "ac_cv_lib_$ac_lib_var=yes"
7436 else
7437   echo "configure: failed program was:" >&5
7438   cat conftest.$ac_ext >&5
7439   rm -rf conftest*
7440   eval "ac_cv_lib_$ac_lib_var=no"
7441 fi
7442 rm -f conftest*
7443 LIBS="$ac_save_LIBS"
7444
7445 fi
7446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7447   echo "$ac_t""yes" 1>&6
7448     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7449     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7450   cat >> confdefs.h <<EOF
7451 #define $ac_tr_lib 1
7452 EOF
7453
7454   LIBS="-lsecurity $LIBS"
7455
7456 else
7457   echo "$ac_t""no" 1>&6
7458 fi
7459  
7460      for ac_func in set_auth_parameters
7461 do
7462 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7463 echo "configure:7464: checking for $ac_func" >&5
7464 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7465   echo $ac_n "(cached) $ac_c" 1>&6
7466 else
7467   cat > conftest.$ac_ext <<EOF
7468 #line 7469 "configure"
7469 #include "confdefs.h"
7470 /* System header to define __stub macros and hopefully few prototypes,
7471     which can conflict with char $ac_func(); below.  */
7472 #include <assert.h>
7473 /* Override any gcc2 internal prototype to avoid an error.  */
7474 /* We use char because int might match the return type of a gcc2
7475     builtin and then its argument prototype would still apply.  */
7476 char $ac_func();
7477
7478 int main() {
7479
7480 /* The GNU C library defines this for functions which it implements
7481     to always fail with ENOSYS.  Some functions are actually named
7482     something starting with __ and the normal name is an alias.  */
7483 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7484 choke me
7485 #else
7486 $ac_func();
7487 #endif
7488
7489 ; return 0; }
7490 EOF
7491 if { (eval echo configure:7492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7492   rm -rf conftest*
7493   eval "ac_cv_func_$ac_func=yes"
7494 else
7495   echo "configure: failed program was:" >&5
7496   cat conftest.$ac_ext >&5
7497   rm -rf conftest*
7498   eval "ac_cv_func_$ac_func=no"
7499 fi
7500 rm -f conftest*
7501 fi
7502
7503 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7504   echo "$ac_t""yes" 1>&6
7505     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7506   cat >> confdefs.h <<EOF
7507 #define $ac_tr_func 1
7508 EOF
7509  
7510 else
7511   echo "$ac_t""no" 1>&6
7512 fi
7513 done
7514
7515   ;;
7516   esac
7517
7518 case "$LIBS" in
7519   *-lsec*) for ac_func in set_auth_parameters
7520 do
7521 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7522 echo "configure:7523: checking for $ac_func" >&5
7523 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7524   echo $ac_n "(cached) $ac_c" 1>&6
7525 else
7526   cat > conftest.$ac_ext <<EOF
7527 #line 7528 "configure"
7528 #include "confdefs.h"
7529 /* System header to define __stub macros and hopefully few prototypes,
7530     which can conflict with char $ac_func(); below.  */
7531 #include <assert.h>
7532 /* Override any gcc2 internal prototype to avoid an error.  */
7533 /* We use char because int might match the return type of a gcc2
7534     builtin and then its argument prototype would still apply.  */
7535 char $ac_func();
7536
7537 int main() {
7538
7539 /* The GNU C library defines this for functions which it implements
7540     to always fail with ENOSYS.  Some functions are actually named
7541     something starting with __ and the normal name is an alias.  */
7542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7543 choke me
7544 #else
7545 $ac_func();
7546 #endif
7547
7548 ; return 0; }
7549 EOF
7550 if { (eval echo configure:7551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7551   rm -rf conftest*
7552   eval "ac_cv_func_$ac_func=yes"
7553 else
7554   echo "configure: failed program was:" >&5
7555   cat conftest.$ac_ext >&5
7556   rm -rf conftest*
7557   eval "ac_cv_func_$ac_func=no"
7558 fi
7559 rm -f conftest*
7560 fi
7561
7562 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7563   echo "$ac_t""yes" 1>&6
7564     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7565   cat >> confdefs.h <<EOF
7566 #define $ac_tr_func 1
7567 EOF
7568  
7569 else
7570   echo "$ac_t""no" 1>&6
7571 fi
7572 done
7573  ;;
7574   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7575 echo "configure:7576: checking for set_auth_parameters in -lsec" >&5
7576 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7577 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7578   echo $ac_n "(cached) $ac_c" 1>&6
7579 else
7580   ac_save_LIBS="$LIBS"
7581 LIBS="-lsec  $LIBS"
7582 cat > conftest.$ac_ext <<EOF
7583 #line 7584 "configure"
7584 #include "confdefs.h"
7585 /* Override any gcc2 internal prototype to avoid an error.  */
7586 /* We use char because int might match the return type of a gcc2
7587     builtin and then its argument prototype would still apply.  */
7588 char set_auth_parameters();
7589
7590 int main() {
7591 set_auth_parameters()
7592 ; return 0; }
7593 EOF
7594 if { (eval echo configure:7595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7595   rm -rf conftest*
7596   eval "ac_cv_lib_$ac_lib_var=yes"
7597 else
7598   echo "configure: failed program was:" >&5
7599   cat conftest.$ac_ext >&5
7600   rm -rf conftest*
7601   eval "ac_cv_lib_$ac_lib_var=no"
7602 fi
7603 rm -f conftest*
7604 LIBS="$ac_save_LIBS"
7605
7606 fi
7607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7608   echo "$ac_t""yes" 1>&6
7609     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7610     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7611   cat >> confdefs.h <<EOF
7612 #define $ac_tr_lib 1
7613 EOF
7614
7615   LIBS="-lsec $LIBS"
7616
7617 else
7618   echo "$ac_t""no" 1>&6
7619 fi
7620  
7621      for ac_func in set_auth_parameters
7622 do
7623 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7624 echo "configure:7625: checking for $ac_func" >&5
7625 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7626   echo $ac_n "(cached) $ac_c" 1>&6
7627 else
7628   cat > conftest.$ac_ext <<EOF
7629 #line 7630 "configure"
7630 #include "confdefs.h"
7631 /* System header to define __stub macros and hopefully few prototypes,
7632     which can conflict with char $ac_func(); below.  */
7633 #include <assert.h>
7634 /* Override any gcc2 internal prototype to avoid an error.  */
7635 /* We use char because int might match the return type of a gcc2
7636     builtin and then its argument prototype would still apply.  */
7637 char $ac_func();
7638
7639 int main() {
7640
7641 /* The GNU C library defines this for functions which it implements
7642     to always fail with ENOSYS.  Some functions are actually named
7643     something starting with __ and the normal name is an alias.  */
7644 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7645 choke me
7646 #else
7647 $ac_func();
7648 #endif
7649
7650 ; return 0; }
7651 EOF
7652 if { (eval echo configure:7653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7653   rm -rf conftest*
7654   eval "ac_cv_func_$ac_func=yes"
7655 else
7656   echo "configure: failed program was:" >&5
7657   cat conftest.$ac_ext >&5
7658   rm -rf conftest*
7659   eval "ac_cv_func_$ac_func=no"
7660 fi
7661 rm -f conftest*
7662 fi
7663
7664 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7665   echo "$ac_t""yes" 1>&6
7666     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7667   cat >> confdefs.h <<EOF
7668 #define $ac_tr_func 1
7669 EOF
7670  
7671 else
7672   echo "$ac_t""no" 1>&6
7673 fi
7674 done
7675
7676   ;;
7677   esac
7678
7679
7680 # UnixWare 7.x has its getspnam in -lgen
7681 case "$LIBS" in
7682   *-lgen*) for ac_func in getspnam
7683 do
7684 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7685 echo "configure:7686: checking for $ac_func" >&5
7686 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7687   echo $ac_n "(cached) $ac_c" 1>&6
7688 else
7689   cat > conftest.$ac_ext <<EOF
7690 #line 7691 "configure"
7691 #include "confdefs.h"
7692 /* System header to define __stub macros and hopefully few prototypes,
7693     which can conflict with char $ac_func(); below.  */
7694 #include <assert.h>
7695 /* Override any gcc2 internal prototype to avoid an error.  */
7696 /* We use char because int might match the return type of a gcc2
7697     builtin and then its argument prototype would still apply.  */
7698 char $ac_func();
7699
7700 int main() {
7701
7702 /* The GNU C library defines this for functions which it implements
7703     to always fail with ENOSYS.  Some functions are actually named
7704     something starting with __ and the normal name is an alias.  */
7705 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7706 choke me
7707 #else
7708 $ac_func();
7709 #endif
7710
7711 ; return 0; }
7712 EOF
7713 if { (eval echo configure:7714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7714   rm -rf conftest*
7715   eval "ac_cv_func_$ac_func=yes"
7716 else
7717   echo "configure: failed program was:" >&5
7718   cat conftest.$ac_ext >&5
7719   rm -rf conftest*
7720   eval "ac_cv_func_$ac_func=no"
7721 fi
7722 rm -f conftest*
7723 fi
7724
7725 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7726   echo "$ac_t""yes" 1>&6
7727     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7728   cat >> confdefs.h <<EOF
7729 #define $ac_tr_func 1
7730 EOF
7731  
7732 else
7733   echo "$ac_t""no" 1>&6
7734 fi
7735 done
7736  ;;
7737   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7738 echo "configure:7739: checking for getspnam in -lgen" >&5
7739 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7740 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7741   echo $ac_n "(cached) $ac_c" 1>&6
7742 else
7743   ac_save_LIBS="$LIBS"
7744 LIBS="-lgen  $LIBS"
7745 cat > conftest.$ac_ext <<EOF
7746 #line 7747 "configure"
7747 #include "confdefs.h"
7748 /* Override any gcc2 internal prototype to avoid an error.  */
7749 /* We use char because int might match the return type of a gcc2
7750     builtin and then its argument prototype would still apply.  */
7751 char getspnam();
7752
7753 int main() {
7754 getspnam()
7755 ; return 0; }
7756 EOF
7757 if { (eval echo configure:7758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7758   rm -rf conftest*
7759   eval "ac_cv_lib_$ac_lib_var=yes"
7760 else
7761   echo "configure: failed program was:" >&5
7762   cat conftest.$ac_ext >&5
7763   rm -rf conftest*
7764   eval "ac_cv_lib_$ac_lib_var=no"
7765 fi
7766 rm -f conftest*
7767 LIBS="$ac_save_LIBS"
7768
7769 fi
7770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7771   echo "$ac_t""yes" 1>&6
7772     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7773     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7774   cat >> confdefs.h <<EOF
7775 #define $ac_tr_lib 1
7776 EOF
7777
7778   LIBS="-lgen $LIBS"
7779
7780 else
7781   echo "$ac_t""no" 1>&6
7782 fi
7783  
7784      for ac_func in getspnam
7785 do
7786 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7787 echo "configure:7788: checking for $ac_func" >&5
7788 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7789   echo $ac_n "(cached) $ac_c" 1>&6
7790 else
7791   cat > conftest.$ac_ext <<EOF
7792 #line 7793 "configure"
7793 #include "confdefs.h"
7794 /* System header to define __stub macros and hopefully few prototypes,
7795     which can conflict with char $ac_func(); below.  */
7796 #include <assert.h>
7797 /* Override any gcc2 internal prototype to avoid an error.  */
7798 /* We use char because int might match the return type of a gcc2
7799     builtin and then its argument prototype would still apply.  */
7800 char $ac_func();
7801
7802 int main() {
7803
7804 /* The GNU C library defines this for functions which it implements
7805     to always fail with ENOSYS.  Some functions are actually named
7806     something starting with __ and the normal name is an alias.  */
7807 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7808 choke me
7809 #else
7810 $ac_func();
7811 #endif
7812
7813 ; return 0; }
7814 EOF
7815 if { (eval echo configure:7816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7816   rm -rf conftest*
7817   eval "ac_cv_func_$ac_func=yes"
7818 else
7819   echo "configure: failed program was:" >&5
7820   cat conftest.$ac_ext >&5
7821   rm -rf conftest*
7822   eval "ac_cv_func_$ac_func=no"
7823 fi
7824 rm -f conftest*
7825 fi
7826
7827 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7828   echo "$ac_t""yes" 1>&6
7829     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7830   cat >> confdefs.h <<EOF
7831 #define $ac_tr_func 1
7832 EOF
7833  
7834 else
7835   echo "$ac_t""no" 1>&6
7836 fi
7837 done
7838
7839   ;;
7840   esac
7841
7842
7843 case "$LIBS" in
7844   *-lsecurity*) for ac_func in getspnam
7845 do
7846 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7847 echo "configure:7848: checking for $ac_func" >&5
7848 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7849   echo $ac_n "(cached) $ac_c" 1>&6
7850 else
7851   cat > conftest.$ac_ext <<EOF
7852 #line 7853 "configure"
7853 #include "confdefs.h"
7854 /* System header to define __stub macros and hopefully few prototypes,
7855     which can conflict with char $ac_func(); below.  */
7856 #include <assert.h>
7857 /* Override any gcc2 internal prototype to avoid an error.  */
7858 /* We use char because int might match the return type of a gcc2
7859     builtin and then its argument prototype would still apply.  */
7860 char $ac_func();
7861
7862 int main() {
7863
7864 /* The GNU C library defines this for functions which it implements
7865     to always fail with ENOSYS.  Some functions are actually named
7866     something starting with __ and the normal name is an alias.  */
7867 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7868 choke me
7869 #else
7870 $ac_func();
7871 #endif
7872
7873 ; return 0; }
7874 EOF
7875 if { (eval echo configure:7876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7876   rm -rf conftest*
7877   eval "ac_cv_func_$ac_func=yes"
7878 else
7879   echo "configure: failed program was:" >&5
7880   cat conftest.$ac_ext >&5
7881   rm -rf conftest*
7882   eval "ac_cv_func_$ac_func=no"
7883 fi
7884 rm -f conftest*
7885 fi
7886
7887 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7888   echo "$ac_t""yes" 1>&6
7889     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7890   cat >> confdefs.h <<EOF
7891 #define $ac_tr_func 1
7892 EOF
7893  
7894 else
7895   echo "$ac_t""no" 1>&6
7896 fi
7897 done
7898  ;;
7899   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7900 echo "configure:7901: checking for getspnam in -lsecurity" >&5
7901 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7902 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7903   echo $ac_n "(cached) $ac_c" 1>&6
7904 else
7905   ac_save_LIBS="$LIBS"
7906 LIBS="-lsecurity  $LIBS"
7907 cat > conftest.$ac_ext <<EOF
7908 #line 7909 "configure"
7909 #include "confdefs.h"
7910 /* Override any gcc2 internal prototype to avoid an error.  */
7911 /* We use char because int might match the return type of a gcc2
7912     builtin and then its argument prototype would still apply.  */
7913 char getspnam();
7914
7915 int main() {
7916 getspnam()
7917 ; return 0; }
7918 EOF
7919 if { (eval echo configure:7920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7920   rm -rf conftest*
7921   eval "ac_cv_lib_$ac_lib_var=yes"
7922 else
7923   echo "configure: failed program was:" >&5
7924   cat conftest.$ac_ext >&5
7925   rm -rf conftest*
7926   eval "ac_cv_lib_$ac_lib_var=no"
7927 fi
7928 rm -f conftest*
7929 LIBS="$ac_save_LIBS"
7930
7931 fi
7932 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7933   echo "$ac_t""yes" 1>&6
7934     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7935     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7936   cat >> confdefs.h <<EOF
7937 #define $ac_tr_lib 1
7938 EOF
7939
7940   LIBS="-lsecurity $LIBS"
7941
7942 else
7943   echo "$ac_t""no" 1>&6
7944 fi
7945  
7946      for ac_func in getspnam
7947 do
7948 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7949 echo "configure:7950: checking for $ac_func" >&5
7950 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7951   echo $ac_n "(cached) $ac_c" 1>&6
7952 else
7953   cat > conftest.$ac_ext <<EOF
7954 #line 7955 "configure"
7955 #include "confdefs.h"
7956 /* System header to define __stub macros and hopefully few prototypes,
7957     which can conflict with char $ac_func(); below.  */
7958 #include <assert.h>
7959 /* Override any gcc2 internal prototype to avoid an error.  */
7960 /* We use char because int might match the return type of a gcc2
7961     builtin and then its argument prototype would still apply.  */
7962 char $ac_func();
7963
7964 int main() {
7965
7966 /* The GNU C library defines this for functions which it implements
7967     to always fail with ENOSYS.  Some functions are actually named
7968     something starting with __ and the normal name is an alias.  */
7969 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7970 choke me
7971 #else
7972 $ac_func();
7973 #endif
7974
7975 ; return 0; }
7976 EOF
7977 if { (eval echo configure:7978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7978   rm -rf conftest*
7979   eval "ac_cv_func_$ac_func=yes"
7980 else
7981   echo "configure: failed program was:" >&5
7982   cat conftest.$ac_ext >&5
7983   rm -rf conftest*
7984   eval "ac_cv_func_$ac_func=no"
7985 fi
7986 rm -f conftest*
7987 fi
7988
7989 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7990   echo "$ac_t""yes" 1>&6
7991     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7992   cat >> confdefs.h <<EOF
7993 #define $ac_tr_func 1
7994 EOF
7995  
7996 else
7997   echo "$ac_t""no" 1>&6
7998 fi
7999 done
8000
8001   ;;
8002   esac
8003
8004 case "$LIBS" in
8005   *-lsec*) for ac_func in getspnam
8006 do
8007 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8008 echo "configure:8009: checking for $ac_func" >&5
8009 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8010   echo $ac_n "(cached) $ac_c" 1>&6
8011 else
8012   cat > conftest.$ac_ext <<EOF
8013 #line 8014 "configure"
8014 #include "confdefs.h"
8015 /* System header to define __stub macros and hopefully few prototypes,
8016     which can conflict with char $ac_func(); below.  */
8017 #include <assert.h>
8018 /* Override any gcc2 internal prototype to avoid an error.  */
8019 /* We use char because int might match the return type of a gcc2
8020     builtin and then its argument prototype would still apply.  */
8021 char $ac_func();
8022
8023 int main() {
8024
8025 /* The GNU C library defines this for functions which it implements
8026     to always fail with ENOSYS.  Some functions are actually named
8027     something starting with __ and the normal name is an alias.  */
8028 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8029 choke me
8030 #else
8031 $ac_func();
8032 #endif
8033
8034 ; return 0; }
8035 EOF
8036 if { (eval echo configure:8037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8037   rm -rf conftest*
8038   eval "ac_cv_func_$ac_func=yes"
8039 else
8040   echo "configure: failed program was:" >&5
8041   cat conftest.$ac_ext >&5
8042   rm -rf conftest*
8043   eval "ac_cv_func_$ac_func=no"
8044 fi
8045 rm -f conftest*
8046 fi
8047
8048 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8049   echo "$ac_t""yes" 1>&6
8050     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8051   cat >> confdefs.h <<EOF
8052 #define $ac_tr_func 1
8053 EOF
8054  
8055 else
8056   echo "$ac_t""no" 1>&6
8057 fi
8058 done
8059  ;;
8060   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
8061 echo "configure:8062: checking for getspnam in -lsec" >&5
8062 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
8063 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8064   echo $ac_n "(cached) $ac_c" 1>&6
8065 else
8066   ac_save_LIBS="$LIBS"
8067 LIBS="-lsec  $LIBS"
8068 cat > conftest.$ac_ext <<EOF
8069 #line 8070 "configure"
8070 #include "confdefs.h"
8071 /* Override any gcc2 internal prototype to avoid an error.  */
8072 /* We use char because int might match the return type of a gcc2
8073     builtin and then its argument prototype would still apply.  */
8074 char getspnam();
8075
8076 int main() {
8077 getspnam()
8078 ; return 0; }
8079 EOF
8080 if { (eval echo configure:8081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8081   rm -rf conftest*
8082   eval "ac_cv_lib_$ac_lib_var=yes"
8083 else
8084   echo "configure: failed program was:" >&5
8085   cat conftest.$ac_ext >&5
8086   rm -rf conftest*
8087   eval "ac_cv_lib_$ac_lib_var=no"
8088 fi
8089 rm -f conftest*
8090 LIBS="$ac_save_LIBS"
8091
8092 fi
8093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8094   echo "$ac_t""yes" 1>&6
8095     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8096     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8097   cat >> confdefs.h <<EOF
8098 #define $ac_tr_lib 1
8099 EOF
8100
8101   LIBS="-lsec $LIBS"
8102
8103 else
8104   echo "$ac_t""no" 1>&6
8105 fi
8106  
8107      for ac_func in getspnam
8108 do
8109 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8110 echo "configure:8111: checking for $ac_func" >&5
8111 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8112   echo $ac_n "(cached) $ac_c" 1>&6
8113 else
8114   cat > conftest.$ac_ext <<EOF
8115 #line 8116 "configure"
8116 #include "confdefs.h"
8117 /* System header to define __stub macros and hopefully few prototypes,
8118     which can conflict with char $ac_func(); below.  */
8119 #include <assert.h>
8120 /* Override any gcc2 internal prototype to avoid an error.  */
8121 /* We use char because int might match the return type of a gcc2
8122     builtin and then its argument prototype would still apply.  */
8123 char $ac_func();
8124
8125 int main() {
8126
8127 /* The GNU C library defines this for functions which it implements
8128     to always fail with ENOSYS.  Some functions are actually named
8129     something starting with __ and the normal name is an alias.  */
8130 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8131 choke me
8132 #else
8133 $ac_func();
8134 #endif
8135
8136 ; return 0; }
8137 EOF
8138 if { (eval echo configure:8139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8139   rm -rf conftest*
8140   eval "ac_cv_func_$ac_func=yes"
8141 else
8142   echo "configure: failed program was:" >&5
8143   cat conftest.$ac_ext >&5
8144   rm -rf conftest*
8145   eval "ac_cv_func_$ac_func=no"
8146 fi
8147 rm -f conftest*
8148 fi
8149
8150 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8151   echo "$ac_t""yes" 1>&6
8152     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8153   cat >> confdefs.h <<EOF
8154 #define $ac_tr_func 1
8155 EOF
8156  
8157 else
8158   echo "$ac_t""no" 1>&6
8159 fi
8160 done
8161
8162   ;;
8163   esac
8164
8165
8166 case "$LIBS" in
8167   *-lsecurity*) for ac_func in bigcrypt
8168 do
8169 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8170 echo "configure:8171: checking for $ac_func" >&5
8171 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8172   echo $ac_n "(cached) $ac_c" 1>&6
8173 else
8174   cat > conftest.$ac_ext <<EOF
8175 #line 8176 "configure"
8176 #include "confdefs.h"
8177 /* System header to define __stub macros and hopefully few prototypes,
8178     which can conflict with char $ac_func(); below.  */
8179 #include <assert.h>
8180 /* Override any gcc2 internal prototype to avoid an error.  */
8181 /* We use char because int might match the return type of a gcc2
8182     builtin and then its argument prototype would still apply.  */
8183 char $ac_func();
8184
8185 int main() {
8186
8187 /* The GNU C library defines this for functions which it implements
8188     to always fail with ENOSYS.  Some functions are actually named
8189     something starting with __ and the normal name is an alias.  */
8190 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8191 choke me
8192 #else
8193 $ac_func();
8194 #endif
8195
8196 ; return 0; }
8197 EOF
8198 if { (eval echo configure:8199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8199   rm -rf conftest*
8200   eval "ac_cv_func_$ac_func=yes"
8201 else
8202   echo "configure: failed program was:" >&5
8203   cat conftest.$ac_ext >&5
8204   rm -rf conftest*
8205   eval "ac_cv_func_$ac_func=no"
8206 fi
8207 rm -f conftest*
8208 fi
8209
8210 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8211   echo "$ac_t""yes" 1>&6
8212     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8213   cat >> confdefs.h <<EOF
8214 #define $ac_tr_func 1
8215 EOF
8216  
8217 else
8218   echo "$ac_t""no" 1>&6
8219 fi
8220 done
8221  ;;
8222   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
8223 echo "configure:8224: checking for bigcrypt in -lsecurity" >&5
8224 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
8225 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8226   echo $ac_n "(cached) $ac_c" 1>&6
8227 else
8228   ac_save_LIBS="$LIBS"
8229 LIBS="-lsecurity  $LIBS"
8230 cat > conftest.$ac_ext <<EOF
8231 #line 8232 "configure"
8232 #include "confdefs.h"
8233 /* Override any gcc2 internal prototype to avoid an error.  */
8234 /* We use char because int might match the return type of a gcc2
8235     builtin and then its argument prototype would still apply.  */
8236 char bigcrypt();
8237
8238 int main() {
8239 bigcrypt()
8240 ; return 0; }
8241 EOF
8242 if { (eval echo configure:8243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8243   rm -rf conftest*
8244   eval "ac_cv_lib_$ac_lib_var=yes"
8245 else
8246   echo "configure: failed program was:" >&5
8247   cat conftest.$ac_ext >&5
8248   rm -rf conftest*
8249   eval "ac_cv_lib_$ac_lib_var=no"
8250 fi
8251 rm -f conftest*
8252 LIBS="$ac_save_LIBS"
8253
8254 fi
8255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8256   echo "$ac_t""yes" 1>&6
8257     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8258     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8259   cat >> confdefs.h <<EOF
8260 #define $ac_tr_lib 1
8261 EOF
8262
8263   LIBS="-lsecurity $LIBS"
8264
8265 else
8266   echo "$ac_t""no" 1>&6
8267 fi
8268  
8269      for ac_func in bigcrypt
8270 do
8271 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8272 echo "configure:8273: checking for $ac_func" >&5
8273 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8274   echo $ac_n "(cached) $ac_c" 1>&6
8275 else
8276   cat > conftest.$ac_ext <<EOF
8277 #line 8278 "configure"
8278 #include "confdefs.h"
8279 /* System header to define __stub macros and hopefully few prototypes,
8280     which can conflict with char $ac_func(); below.  */
8281 #include <assert.h>
8282 /* Override any gcc2 internal prototype to avoid an error.  */
8283 /* We use char because int might match the return type of a gcc2
8284     builtin and then its argument prototype would still apply.  */
8285 char $ac_func();
8286
8287 int main() {
8288
8289 /* The GNU C library defines this for functions which it implements
8290     to always fail with ENOSYS.  Some functions are actually named
8291     something starting with __ and the normal name is an alias.  */
8292 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8293 choke me
8294 #else
8295 $ac_func();
8296 #endif
8297
8298 ; return 0; }
8299 EOF
8300 if { (eval echo configure:8301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8301   rm -rf conftest*
8302   eval "ac_cv_func_$ac_func=yes"
8303 else
8304   echo "configure: failed program was:" >&5
8305   cat conftest.$ac_ext >&5
8306   rm -rf conftest*
8307   eval "ac_cv_func_$ac_func=no"
8308 fi
8309 rm -f conftest*
8310 fi
8311
8312 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8313   echo "$ac_t""yes" 1>&6
8314     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8315   cat >> confdefs.h <<EOF
8316 #define $ac_tr_func 1
8317 EOF
8318  
8319 else
8320   echo "$ac_t""no" 1>&6
8321 fi
8322 done
8323
8324   ;;
8325   esac
8326
8327 case "$LIBS" in
8328   *-lsec*) for ac_func in bigcrypt
8329 do
8330 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8331 echo "configure:8332: checking for $ac_func" >&5
8332 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8333   echo $ac_n "(cached) $ac_c" 1>&6
8334 else
8335   cat > conftest.$ac_ext <<EOF
8336 #line 8337 "configure"
8337 #include "confdefs.h"
8338 /* System header to define __stub macros and hopefully few prototypes,
8339     which can conflict with char $ac_func(); below.  */
8340 #include <assert.h>
8341 /* Override any gcc2 internal prototype to avoid an error.  */
8342 /* We use char because int might match the return type of a gcc2
8343     builtin and then its argument prototype would still apply.  */
8344 char $ac_func();
8345
8346 int main() {
8347
8348 /* The GNU C library defines this for functions which it implements
8349     to always fail with ENOSYS.  Some functions are actually named
8350     something starting with __ and the normal name is an alias.  */
8351 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8352 choke me
8353 #else
8354 $ac_func();
8355 #endif
8356
8357 ; return 0; }
8358 EOF
8359 if { (eval echo configure:8360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8360   rm -rf conftest*
8361   eval "ac_cv_func_$ac_func=yes"
8362 else
8363   echo "configure: failed program was:" >&5
8364   cat conftest.$ac_ext >&5
8365   rm -rf conftest*
8366   eval "ac_cv_func_$ac_func=no"
8367 fi
8368 rm -f conftest*
8369 fi
8370
8371 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8372   echo "$ac_t""yes" 1>&6
8373     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8374   cat >> confdefs.h <<EOF
8375 #define $ac_tr_func 1
8376 EOF
8377  
8378 else
8379   echo "$ac_t""no" 1>&6
8380 fi
8381 done
8382  ;;
8383   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8384 echo "configure:8385: checking for bigcrypt in -lsec" >&5
8385 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8386 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8387   echo $ac_n "(cached) $ac_c" 1>&6
8388 else
8389   ac_save_LIBS="$LIBS"
8390 LIBS="-lsec  $LIBS"
8391 cat > conftest.$ac_ext <<EOF
8392 #line 8393 "configure"
8393 #include "confdefs.h"
8394 /* Override any gcc2 internal prototype to avoid an error.  */
8395 /* We use char because int might match the return type of a gcc2
8396     builtin and then its argument prototype would still apply.  */
8397 char bigcrypt();
8398
8399 int main() {
8400 bigcrypt()
8401 ; return 0; }
8402 EOF
8403 if { (eval echo configure:8404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8404   rm -rf conftest*
8405   eval "ac_cv_lib_$ac_lib_var=yes"
8406 else
8407   echo "configure: failed program was:" >&5
8408   cat conftest.$ac_ext >&5
8409   rm -rf conftest*
8410   eval "ac_cv_lib_$ac_lib_var=no"
8411 fi
8412 rm -f conftest*
8413 LIBS="$ac_save_LIBS"
8414
8415 fi
8416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8417   echo "$ac_t""yes" 1>&6
8418     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8419     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8420   cat >> confdefs.h <<EOF
8421 #define $ac_tr_lib 1
8422 EOF
8423
8424   LIBS="-lsec $LIBS"
8425
8426 else
8427   echo "$ac_t""no" 1>&6
8428 fi
8429  
8430      for ac_func in bigcrypt
8431 do
8432 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8433 echo "configure:8434: checking for $ac_func" >&5
8434 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8435   echo $ac_n "(cached) $ac_c" 1>&6
8436 else
8437   cat > conftest.$ac_ext <<EOF
8438 #line 8439 "configure"
8439 #include "confdefs.h"
8440 /* System header to define __stub macros and hopefully few prototypes,
8441     which can conflict with char $ac_func(); below.  */
8442 #include <assert.h>
8443 /* Override any gcc2 internal prototype to avoid an error.  */
8444 /* We use char because int might match the return type of a gcc2
8445     builtin and then its argument prototype would still apply.  */
8446 char $ac_func();
8447
8448 int main() {
8449
8450 /* The GNU C library defines this for functions which it implements
8451     to always fail with ENOSYS.  Some functions are actually named
8452     something starting with __ and the normal name is an alias.  */
8453 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8454 choke me
8455 #else
8456 $ac_func();
8457 #endif
8458
8459 ; return 0; }
8460 EOF
8461 if { (eval echo configure:8462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8462   rm -rf conftest*
8463   eval "ac_cv_func_$ac_func=yes"
8464 else
8465   echo "configure: failed program was:" >&5
8466   cat conftest.$ac_ext >&5
8467   rm -rf conftest*
8468   eval "ac_cv_func_$ac_func=no"
8469 fi
8470 rm -f conftest*
8471 fi
8472
8473 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8474   echo "$ac_t""yes" 1>&6
8475     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8476   cat >> confdefs.h <<EOF
8477 #define $ac_tr_func 1
8478 EOF
8479  
8480 else
8481   echo "$ac_t""no" 1>&6
8482 fi
8483 done
8484
8485   ;;
8486   esac
8487
8488
8489 case "$LIBS" in
8490   *-lsecurity*) for ac_func in getprpwnam
8491 do
8492 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8493 echo "configure:8494: checking for $ac_func" >&5
8494 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8495   echo $ac_n "(cached) $ac_c" 1>&6
8496 else
8497   cat > conftest.$ac_ext <<EOF
8498 #line 8499 "configure"
8499 #include "confdefs.h"
8500 /* System header to define __stub macros and hopefully few prototypes,
8501     which can conflict with char $ac_func(); below.  */
8502 #include <assert.h>
8503 /* Override any gcc2 internal prototype to avoid an error.  */
8504 /* We use char because int might match the return type of a gcc2
8505     builtin and then its argument prototype would still apply.  */
8506 char $ac_func();
8507
8508 int main() {
8509
8510 /* The GNU C library defines this for functions which it implements
8511     to always fail with ENOSYS.  Some functions are actually named
8512     something starting with __ and the normal name is an alias.  */
8513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8514 choke me
8515 #else
8516 $ac_func();
8517 #endif
8518
8519 ; return 0; }
8520 EOF
8521 if { (eval echo configure:8522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8522   rm -rf conftest*
8523   eval "ac_cv_func_$ac_func=yes"
8524 else
8525   echo "configure: failed program was:" >&5
8526   cat conftest.$ac_ext >&5
8527   rm -rf conftest*
8528   eval "ac_cv_func_$ac_func=no"
8529 fi
8530 rm -f conftest*
8531 fi
8532
8533 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8534   echo "$ac_t""yes" 1>&6
8535     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8536   cat >> confdefs.h <<EOF
8537 #define $ac_tr_func 1
8538 EOF
8539  
8540 else
8541   echo "$ac_t""no" 1>&6
8542 fi
8543 done
8544  ;;
8545   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8546 echo "configure:8547: checking for getprpwnam in -lsecurity" >&5
8547 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8548 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8549   echo $ac_n "(cached) $ac_c" 1>&6
8550 else
8551   ac_save_LIBS="$LIBS"
8552 LIBS="-lsecurity  $LIBS"
8553 cat > conftest.$ac_ext <<EOF
8554 #line 8555 "configure"
8555 #include "confdefs.h"
8556 /* Override any gcc2 internal prototype to avoid an error.  */
8557 /* We use char because int might match the return type of a gcc2
8558     builtin and then its argument prototype would still apply.  */
8559 char getprpwnam();
8560
8561 int main() {
8562 getprpwnam()
8563 ; return 0; }
8564 EOF
8565 if { (eval echo configure:8566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8566   rm -rf conftest*
8567   eval "ac_cv_lib_$ac_lib_var=yes"
8568 else
8569   echo "configure: failed program was:" >&5
8570   cat conftest.$ac_ext >&5
8571   rm -rf conftest*
8572   eval "ac_cv_lib_$ac_lib_var=no"
8573 fi
8574 rm -f conftest*
8575 LIBS="$ac_save_LIBS"
8576
8577 fi
8578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8579   echo "$ac_t""yes" 1>&6
8580     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8581     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8582   cat >> confdefs.h <<EOF
8583 #define $ac_tr_lib 1
8584 EOF
8585
8586   LIBS="-lsecurity $LIBS"
8587
8588 else
8589   echo "$ac_t""no" 1>&6
8590 fi
8591  
8592      for ac_func in getprpwnam
8593 do
8594 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8595 echo "configure:8596: checking for $ac_func" >&5
8596 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8597   echo $ac_n "(cached) $ac_c" 1>&6
8598 else
8599   cat > conftest.$ac_ext <<EOF
8600 #line 8601 "configure"
8601 #include "confdefs.h"
8602 /* System header to define __stub macros and hopefully few prototypes,
8603     which can conflict with char $ac_func(); below.  */
8604 #include <assert.h>
8605 /* Override any gcc2 internal prototype to avoid an error.  */
8606 /* We use char because int might match the return type of a gcc2
8607     builtin and then its argument prototype would still apply.  */
8608 char $ac_func();
8609
8610 int main() {
8611
8612 /* The GNU C library defines this for functions which it implements
8613     to always fail with ENOSYS.  Some functions are actually named
8614     something starting with __ and the normal name is an alias.  */
8615 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8616 choke me
8617 #else
8618 $ac_func();
8619 #endif
8620
8621 ; return 0; }
8622 EOF
8623 if { (eval echo configure:8624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8624   rm -rf conftest*
8625   eval "ac_cv_func_$ac_func=yes"
8626 else
8627   echo "configure: failed program was:" >&5
8628   cat conftest.$ac_ext >&5
8629   rm -rf conftest*
8630   eval "ac_cv_func_$ac_func=no"
8631 fi
8632 rm -f conftest*
8633 fi
8634
8635 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8636   echo "$ac_t""yes" 1>&6
8637     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8638   cat >> confdefs.h <<EOF
8639 #define $ac_tr_func 1
8640 EOF
8641  
8642 else
8643   echo "$ac_t""no" 1>&6
8644 fi
8645 done
8646
8647   ;;
8648   esac
8649
8650 case "$LIBS" in
8651   *-lsec*) for ac_func in getprpwnam
8652 do
8653 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8654 echo "configure:8655: checking for $ac_func" >&5
8655 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8656   echo $ac_n "(cached) $ac_c" 1>&6
8657 else
8658   cat > conftest.$ac_ext <<EOF
8659 #line 8660 "configure"
8660 #include "confdefs.h"
8661 /* System header to define __stub macros and hopefully few prototypes,
8662     which can conflict with char $ac_func(); below.  */
8663 #include <assert.h>
8664 /* Override any gcc2 internal prototype to avoid an error.  */
8665 /* We use char because int might match the return type of a gcc2
8666     builtin and then its argument prototype would still apply.  */
8667 char $ac_func();
8668
8669 int main() {
8670
8671 /* The GNU C library defines this for functions which it implements
8672     to always fail with ENOSYS.  Some functions are actually named
8673     something starting with __ and the normal name is an alias.  */
8674 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8675 choke me
8676 #else
8677 $ac_func();
8678 #endif
8679
8680 ; return 0; }
8681 EOF
8682 if { (eval echo configure:8683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8683   rm -rf conftest*
8684   eval "ac_cv_func_$ac_func=yes"
8685 else
8686   echo "configure: failed program was:" >&5
8687   cat conftest.$ac_ext >&5
8688   rm -rf conftest*
8689   eval "ac_cv_func_$ac_func=no"
8690 fi
8691 rm -f conftest*
8692 fi
8693
8694 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8695   echo "$ac_t""yes" 1>&6
8696     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8697   cat >> confdefs.h <<EOF
8698 #define $ac_tr_func 1
8699 EOF
8700  
8701 else
8702   echo "$ac_t""no" 1>&6
8703 fi
8704 done
8705  ;;
8706   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8707 echo "configure:8708: checking for getprpwnam in -lsec" >&5
8708 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8709 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8710   echo $ac_n "(cached) $ac_c" 1>&6
8711 else
8712   ac_save_LIBS="$LIBS"
8713 LIBS="-lsec  $LIBS"
8714 cat > conftest.$ac_ext <<EOF
8715 #line 8716 "configure"
8716 #include "confdefs.h"
8717 /* Override any gcc2 internal prototype to avoid an error.  */
8718 /* We use char because int might match the return type of a gcc2
8719     builtin and then its argument prototype would still apply.  */
8720 char getprpwnam();
8721
8722 int main() {
8723 getprpwnam()
8724 ; return 0; }
8725 EOF
8726 if { (eval echo configure:8727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8727   rm -rf conftest*
8728   eval "ac_cv_lib_$ac_lib_var=yes"
8729 else
8730   echo "configure: failed program was:" >&5
8731   cat conftest.$ac_ext >&5
8732   rm -rf conftest*
8733   eval "ac_cv_lib_$ac_lib_var=no"
8734 fi
8735 rm -f conftest*
8736 LIBS="$ac_save_LIBS"
8737
8738 fi
8739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8740   echo "$ac_t""yes" 1>&6
8741     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8742     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8743   cat >> confdefs.h <<EOF
8744 #define $ac_tr_lib 1
8745 EOF
8746
8747   LIBS="-lsec $LIBS"
8748
8749 else
8750   echo "$ac_t""no" 1>&6
8751 fi
8752  
8753      for ac_func in getprpwnam
8754 do
8755 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8756 echo "configure:8757: checking for $ac_func" >&5
8757 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8758   echo $ac_n "(cached) $ac_c" 1>&6
8759 else
8760   cat > conftest.$ac_ext <<EOF
8761 #line 8762 "configure"
8762 #include "confdefs.h"
8763 /* System header to define __stub macros and hopefully few prototypes,
8764     which can conflict with char $ac_func(); below.  */
8765 #include <assert.h>
8766 /* Override any gcc2 internal prototype to avoid an error.  */
8767 /* We use char because int might match the return type of a gcc2
8768     builtin and then its argument prototype would still apply.  */
8769 char $ac_func();
8770
8771 int main() {
8772
8773 /* The GNU C library defines this for functions which it implements
8774     to always fail with ENOSYS.  Some functions are actually named
8775     something starting with __ and the normal name is an alias.  */
8776 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8777 choke me
8778 #else
8779 $ac_func();
8780 #endif
8781
8782 ; return 0; }
8783 EOF
8784 if { (eval echo configure:8785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8785   rm -rf conftest*
8786   eval "ac_cv_func_$ac_func=yes"
8787 else
8788   echo "configure: failed program was:" >&5
8789   cat conftest.$ac_ext >&5
8790   rm -rf conftest*
8791   eval "ac_cv_func_$ac_func=no"
8792 fi
8793 rm -f conftest*
8794 fi
8795
8796 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8797   echo "$ac_t""yes" 1>&6
8798     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8799   cat >> confdefs.h <<EOF
8800 #define $ac_tr_func 1
8801 EOF
8802  
8803 else
8804   echo "$ac_t""no" 1>&6
8805 fi
8806 done
8807
8808   ;;
8809   esac
8810
8811
8812 # this bit needs to be modified for each OS that is suported by
8813 # smbwrapper. You need to specify how to created a shared library and
8814 # how to compile C code to produce PIC object files
8815
8816 # these are the defaults, good for lots of systems
8817 HOST_OS="$host_os"
8818 LDSHFLAGS="-shared"
8819 SONAMEFLAG="#"
8820 SHLD="\${CC}"
8821 PICFLAG=""
8822 PICSUFFIX="po"
8823 POBAD_CC="#"
8824 SHLIBEXT="so"
8825 # Assume non-shared by default and override below
8826 BLDSHARED="false"
8827 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8828 echo "configure:8829: checking ability to build shared libraries" >&5
8829
8830 # and these are for particular systems
8831 case "$host_os" in
8832                 *linux*)   cat >> confdefs.h <<\EOF
8833 #define LINUX 1
8834 EOF
8835
8836                         BLDSHARED="true"
8837                         LDSHFLAGS="-shared" 
8838                         DYNEXP="-Wl,--export-dynamic"
8839                         PICFLAG="-fPIC"
8840                         SONAMEFLAG="-Wl,-soname="
8841                         cat >> confdefs.h <<\EOF
8842 #define STAT_ST_BLOCKSIZE 512
8843 EOF
8844
8845                 ;;
8846                 *solaris*) cat >> confdefs.h <<\EOF
8847 #define SUNOS5 1
8848 EOF
8849
8850                         BLDSHARED="true"
8851                         LDSHFLAGS="-G"
8852                         SONAMEFLAG="-h "
8853                         if test "${GCC}" = "yes"; then
8854                                 PICFLAG="-fPIC"
8855                                 if test "${ac_cv_prog_gnu_ld}" = "yes"; then
8856                                         DYNEXP="-Wl,-E"
8857                                 fi
8858                         else
8859                                 PICFLAG="-KPIC"
8860                                 ## ${CFLAGS} added for building 64-bit shared 
8861                                 ## libs using Sun's Compiler
8862                                 LDSHFLAGS="-G \${CFLAGS}"
8863                                 POBAD_CC=""
8864                                 PICSUFFIX="po.o"
8865                         fi
8866                         cat >> confdefs.h <<\EOF
8867 #define STAT_ST_BLOCKSIZE 512
8868 EOF
8869
8870                 ;;
8871                 *sunos*) cat >> confdefs.h <<\EOF
8872 #define SUNOS4 1
8873 EOF
8874
8875                         BLDSHARED="true"
8876                         LDSHFLAGS="-G"
8877                         SONAMEFLAG="-Wl,-h,"
8878                         PICFLAG="-KPIC"   # Is this correct for SunOS
8879                 ;;
8880                 *bsd*)  BLDSHARED="true"
8881                         LDSHFLAGS="-shared"
8882                         DYNEXP="-Wl,-Bdynamic"
8883                         SONAMEFLAG="-Wl,-soname,"
8884                         PICFLAG="-fPIC"
8885                         cat >> confdefs.h <<\EOF
8886 #define STAT_ST_BLOCKSIZE 512
8887 EOF
8888
8889                 ;;
8890                 *irix*) cat >> confdefs.h <<\EOF
8891 #define IRIX 1
8892 EOF
8893
8894                         case "$host_os" in
8895                         *irix6*) cat >> confdefs.h <<\EOF
8896 #define IRIX6 1
8897 EOF
8898
8899                         ;;
8900                         esac
8901                         ATTEMPT_WRAP32_BUILD=yes
8902                         BLDSHARED="true"
8903                         LDSHFLAGS="-set_version sgi1.0 -shared"
8904                         SONAMEFLAG="-soname "
8905                         SHLD="\${LD}"
8906                         if test "${GCC}" = "yes"; then
8907                                 PICFLAG="-fPIC"
8908                         else 
8909                                 PICFLAG="-KPIC"
8910                         fi
8911                         cat >> confdefs.h <<\EOF
8912 #define STAT_ST_BLOCKSIZE 512
8913 EOF
8914
8915                 ;;
8916                 *aix*) cat >> confdefs.h <<\EOF
8917 #define AIX 1
8918 EOF
8919
8920                         BLDSHARED="true"
8921                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8922                         DYNEXP="-Wl,-brtl,-bexpall"
8923                         if test "${GCC}" = "yes"; then
8924                                 PICFLAG="-O2"
8925                         else
8926                         PICFLAG="-O2 -qmaxmem=6000"
8927                                 ## for funky AIX compiler using strncpy()
8928                                 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT"
8929                         fi
8930
8931                         cat >> confdefs.h <<\EOF
8932 #define STAT_ST_BLOCKSIZE DEV_BSIZE
8933 EOF
8934
8935                 ;;
8936                 *hpux*) cat >> confdefs.h <<\EOF
8937 #define HPUX 1
8938 EOF
8939
8940                         SHLIBEXT="sl"
8941                         # Use special PIC flags for the native HP-UX compiler.
8942                         if test $ac_cv_prog_cc_Ae = yes; then
8943                                 BLDSHARED="true"
8944                                 SHLD="/usr/bin/ld"
8945                                 LDSHFLAGS="-B symbolic -b -z"
8946                                 SONAMEFLAG="+h "
8947                                 PICFLAG="+z"
8948                         fi
8949                         DYNEXP="-Wl,-E"
8950                         cat >> confdefs.h <<\EOF
8951 #define STAT_ST_BLOCKSIZE 8192
8952 EOF
8953
8954                 ;;
8955                 *qnx*) cat >> confdefs.h <<\EOF
8956 #define QNX 1
8957 EOF
8958 ;;
8959                 *osf*) cat >> confdefs.h <<\EOF
8960 #define OSF1 1
8961 EOF
8962
8963                         BLDSHARED="true"
8964                         LDSHFLAGS="-shared"
8965                         SONAMEFLAG="-Wl,-soname,"
8966                         PICFLAG="-fPIC"
8967                 ;;
8968                 *sco*) cat >> confdefs.h <<\EOF
8969 #define SCO 1
8970 EOF
8971 ;;
8972                 *unixware*) cat >> confdefs.h <<\EOF
8973 #define UNIXWARE 1
8974 EOF
8975
8976                         BLDSHARED="true"
8977                         LDSHFLAGS="-shared"
8978                         SONAMEFLAG="-Wl,-soname,"
8979                         PICFLAG="-KPIC"
8980                 ;;
8981                 *next2*) cat >> confdefs.h <<\EOF
8982 #define NEXT2 1
8983 EOF
8984 ;;
8985                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8986 set dummy groff; ac_word=$2
8987 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8988 echo "configure:8989: checking for $ac_word" >&5
8989 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8990   echo $ac_n "(cached) $ac_c" 1>&6
8991 else
8992   if test -n "$ROFF"; then
8993   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8994 else
8995   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8996   ac_dummy="$PATH"
8997   for ac_dir in $ac_dummy; do
8998     test -z "$ac_dir" && ac_dir=.
8999     if test -f $ac_dir/$ac_word; then
9000       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
9001       break
9002     fi
9003   done
9004   IFS="$ac_save_ifs"
9005 fi
9006 fi
9007 ROFF="$ac_cv_prog_ROFF"
9008 if test -n "$ROFF"; then
9009   echo "$ac_t""$ROFF" 1>&6
9010 else
9011   echo "$ac_t""no" 1>&6
9012 fi
9013 ;;
9014                 *sysv4*)
9015                         case "$host" in
9016                                 *-univel-*)     if  test "$GCC" != yes ; then
9017                                                 cat >> confdefs.h <<\EOF
9018 #define HAVE_MEMSET 1
9019 EOF
9020
9021                                         fi
9022                                         LDSHFLAGS="-G"
9023                                         DYNEXP="-Bexport"
9024                                 ;;
9025                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
9026 #define RELIANTUNIX 1
9027 EOF
9028 ;;
9029                         esac
9030                 ;;
9031
9032                 *sysv5*)
9033                         if  test "$GCC" != yes ; then
9034                                 cat >> confdefs.h <<\EOF
9035 #define HAVE_MEMSET 1
9036 EOF
9037
9038                         fi
9039                         LDSHFLAGS="-G"
9040                 ;;
9041 esac
9042
9043 echo "$ac_t""$BLDSHARED" 1>&6
9044 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
9045 echo "configure:9046: checking linker flags for shared libraries" >&5
9046 echo "$ac_t""$LDSHFLAGS" 1>&6
9047 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
9048 echo "configure:9049: checking compiler flags for position-independent code" >&5
9049 echo "$ac_t""$PICFLAGS" 1>&6
9050
9051 #######################################################
9052 # test whether building a shared library actually works
9053 if test $BLDSHARED = true; then
9054 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
9055 echo "configure:9056: checking whether building shared libraries actually works" >&5
9056 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
9057   echo $ac_n "(cached) $ac_c" 1>&6
9058 else
9059   
9060    ac_cv_shlib_works=no
9061    # try building a trivial shared library
9062    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
9063      $CC $CPPFLAGS $CFLAGS $LDSHFLAGS -o shlib.so shlib.po &&
9064      ac_cv_shlib_works=yes
9065    rm -f shlib.so shlib.po
9066
9067 fi
9068
9069 echo "$ac_t""$ac_cv_shlib_works" 1>&6
9070 if test $ac_cv_shlib_works = no; then
9071    BLDSHARED=false
9072 fi
9073 fi
9074
9075
9076 # this updates our target list if we can build shared libs
9077 if test $BLDSHARED = true; then
9078    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
9079 else
9080    LIBSMBCLIENT_SHARED=
9081 fi
9082
9083 ################
9084
9085 echo $ac_n "checking for long long""... $ac_c" 1>&6
9086 echo "configure:9087: checking for long long" >&5
9087 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
9088   echo $ac_n "(cached) $ac_c" 1>&6
9089 else
9090   
9091 if test "$cross_compiling" = yes; then
9092   samba_cv_have_longlong=cross
9093 else
9094   cat > conftest.$ac_ext <<EOF
9095 #line 9096 "configure"
9096 #include "confdefs.h"
9097 #include <stdio.h>
9098 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
9099 EOF
9100 if { (eval echo configure:9101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9101 then
9102   samba_cv_have_longlong=yes
9103 else
9104   echo "configure: failed program was:" >&5
9105   cat conftest.$ac_ext >&5
9106   rm -fr conftest*
9107   samba_cv_have_longlong=no
9108 fi
9109 rm -fr conftest*
9110 fi
9111
9112 fi
9113
9114 echo "$ac_t""$samba_cv_have_longlong" 1>&6
9115 if test x"$samba_cv_have_longlong" = x"yes"; then
9116     cat >> confdefs.h <<\EOF
9117 #define HAVE_LONGLONG 1
9118 EOF
9119
9120 fi
9121
9122 #
9123 # Check if the compiler supports the LL prefix on long long integers.
9124 # AIX needs this.
9125
9126 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
9127 echo "configure:9128: checking for LL suffix on long long integers" >&5
9128 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
9129   echo $ac_n "(cached) $ac_c" 1>&6
9130 else
9131   
9132     cat > conftest.$ac_ext <<EOF
9133 #line 9134 "configure"
9134 #include "confdefs.h"
9135 #include <stdio.h>
9136 int main() {
9137 long long i = 0x8000000000LL
9138 ; return 0; }
9139 EOF
9140 if { (eval echo configure:9141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9141   rm -rf conftest*
9142   samba_cv_compiler_supports_ll=yes
9143 else
9144   echo "configure: failed program was:" >&5
9145   cat conftest.$ac_ext >&5
9146   rm -rf conftest*
9147   samba_cv_compiler_supports_ll=no
9148 fi
9149 rm -f conftest*
9150 fi
9151
9152 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
9153 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
9154    cat >> confdefs.h <<\EOF
9155 #define COMPILER_SUPPORTS_LL 1
9156 EOF
9157
9158 fi
9159
9160   
9161 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
9162 echo "configure:9163: checking for 64 bit off_t" >&5
9163 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
9164   echo $ac_n "(cached) $ac_c" 1>&6
9165 else
9166   
9167 if test "$cross_compiling" = yes; then
9168   samba_cv_SIZEOF_OFF_T=cross
9169 else
9170   cat > conftest.$ac_ext <<EOF
9171 #line 9172 "configure"
9172 #include "confdefs.h"
9173 #include <stdio.h>
9174 #include <sys/stat.h>
9175 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
9176 EOF
9177 if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9178 then
9179   samba_cv_SIZEOF_OFF_T=yes
9180 else
9181   echo "configure: failed program was:" >&5
9182   cat conftest.$ac_ext >&5
9183   rm -fr conftest*
9184   samba_cv_SIZEOF_OFF_T=no
9185 fi
9186 rm -fr conftest*
9187 fi
9188
9189 fi
9190
9191 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
9192 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
9193     cat >> confdefs.h <<\EOF
9194 #define SIZEOF_OFF_T 8
9195 EOF
9196
9197 fi
9198
9199 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
9200 echo "configure:9201: checking for off64_t" >&5
9201 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
9202   echo $ac_n "(cached) $ac_c" 1>&6
9203 else
9204   
9205 if test "$cross_compiling" = yes; then
9206   samba_cv_HAVE_OFF64_T=cross
9207 else
9208   cat > conftest.$ac_ext <<EOF
9209 #line 9210 "configure"
9210 #include "confdefs.h"
9211
9212 #if defined(HAVE_UNISTD_H)
9213 #include <unistd.h>
9214 #endif
9215 #include <stdio.h>
9216 #include <sys/stat.h>
9217 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9218 EOF
9219 if { (eval echo configure:9220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9220 then
9221   samba_cv_HAVE_OFF64_T=yes
9222 else
9223   echo "configure: failed program was:" >&5
9224   cat conftest.$ac_ext >&5
9225   rm -fr conftest*
9226   samba_cv_HAVE_OFF64_T=no
9227 fi
9228 rm -fr conftest*
9229 fi
9230
9231 fi
9232
9233 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
9234 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
9235     cat >> confdefs.h <<\EOF
9236 #define HAVE_OFF64_T 1
9237 EOF
9238
9239 fi
9240
9241 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
9242 echo "configure:9243: checking for 64 bit ino_t" >&5
9243 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
9244   echo $ac_n "(cached) $ac_c" 1>&6
9245 else
9246   
9247 if test "$cross_compiling" = yes; then
9248   samba_cv_SIZEOF_INO_T=cross
9249 else
9250   cat > conftest.$ac_ext <<EOF
9251 #line 9252 "configure"
9252 #include "confdefs.h"
9253 #include <stdio.h>
9254 #include <sys/stat.h>
9255 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
9256 EOF
9257 if { (eval echo configure:9258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9258 then
9259   samba_cv_SIZEOF_INO_T=yes
9260 else
9261   echo "configure: failed program was:" >&5
9262   cat conftest.$ac_ext >&5
9263   rm -fr conftest*
9264   samba_cv_SIZEOF_INO_T=no
9265 fi
9266 rm -fr conftest*
9267 fi
9268
9269 fi
9270
9271 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
9272 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
9273     cat >> confdefs.h <<\EOF
9274 #define SIZEOF_INO_T 8
9275 EOF
9276
9277 fi
9278
9279 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
9280 echo "configure:9281: checking for ino64_t" >&5
9281 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
9282   echo $ac_n "(cached) $ac_c" 1>&6
9283 else
9284   
9285 if test "$cross_compiling" = yes; then
9286   samba_cv_HAVE_INO64_T=cross
9287 else
9288   cat > conftest.$ac_ext <<EOF
9289 #line 9290 "configure"
9290 #include "confdefs.h"
9291
9292 #if defined(HAVE_UNISTD_H)
9293 #include <unistd.h>
9294 #endif
9295 #include <stdio.h>
9296 #include <sys/stat.h>
9297 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9298 EOF
9299 if { (eval echo configure:9300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9300 then
9301   samba_cv_HAVE_INO64_T=yes
9302 else
9303   echo "configure: failed program was:" >&5
9304   cat conftest.$ac_ext >&5
9305   rm -fr conftest*
9306   samba_cv_HAVE_INO64_T=no
9307 fi
9308 rm -fr conftest*
9309 fi
9310
9311 fi
9312
9313 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
9314 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
9315     cat >> confdefs.h <<\EOF
9316 #define HAVE_INO64_T 1
9317 EOF
9318
9319 fi
9320
9321 echo $ac_n "checking for dev64_t""... $ac_c" 1>&6
9322 echo "configure:9323: checking for dev64_t" >&5
9323 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then
9324   echo $ac_n "(cached) $ac_c" 1>&6
9325 else
9326   
9327 if test "$cross_compiling" = yes; then
9328   samba_cv_HAVE_DEV64_T=cross
9329 else
9330   cat > conftest.$ac_ext <<EOF
9331 #line 9332 "configure"
9332 #include "confdefs.h"
9333
9334 #if defined(HAVE_UNISTD_H)
9335 #include <unistd.h>
9336 #endif
9337 #include <stdio.h>
9338 #include <sys/stat.h>
9339 main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
9340 EOF
9341 if { (eval echo configure:9342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9342 then
9343   samba_cv_HAVE_DEV64_T=yes
9344 else
9345   echo "configure: failed program was:" >&5
9346   cat conftest.$ac_ext >&5
9347   rm -fr conftest*
9348   samba_cv_HAVE_DEV64_T=no
9349 fi
9350 rm -fr conftest*
9351 fi
9352
9353 fi
9354
9355 echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6
9356 if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then
9357     cat >> confdefs.h <<\EOF
9358 #define HAVE_DEV64_T 1
9359 EOF
9360
9361 fi
9362
9363 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
9364 echo "configure:9365: checking for struct dirent64" >&5
9365 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
9366   echo $ac_n "(cached) $ac_c" 1>&6
9367 else
9368   
9369 cat > conftest.$ac_ext <<EOF
9370 #line 9371 "configure"
9371 #include "confdefs.h"
9372
9373 #if defined(HAVE_UNISTD_H)
9374 #include <unistd.h>
9375 #endif
9376 #include <sys/types.h>
9377 #include <dirent.h>
9378 int main() {
9379 struct dirent64 de;
9380 ; return 0; }
9381 EOF
9382 if { (eval echo configure:9383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9383   rm -rf conftest*
9384   samba_cv_HAVE_STRUCT_DIRENT64=yes
9385 else
9386   echo "configure: failed program was:" >&5
9387   cat conftest.$ac_ext >&5
9388   rm -rf conftest*
9389   samba_cv_HAVE_STRUCT_DIRENT64=no
9390 fi
9391 rm -f conftest*
9392 fi
9393
9394 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9395 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
9396     cat >> confdefs.h <<\EOF
9397 #define HAVE_STRUCT_DIRENT64 1
9398 EOF
9399
9400 fi
9401
9402 echo $ac_n "checking for major macro""... $ac_c" 1>&6
9403 echo "configure:9404: checking for major macro" >&5
9404 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then
9405   echo $ac_n "(cached) $ac_c" 1>&6
9406 else
9407   
9408 if test "$cross_compiling" = yes; then
9409   samba_cv_HAVE_DEVICE_MAJOR_FN=cross
9410 else
9411   cat > conftest.$ac_ext <<EOF
9412 #line 9413 "configure"
9413 #include "confdefs.h"
9414
9415 #if defined(HAVE_UNISTD_H)
9416 #include <unistd.h>
9417 #endif
9418 #include <sys/types.h>
9419 main() { dev_t dev; int i = major(dev); return 0; }
9420 EOF
9421 if { (eval echo configure:9422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9422 then
9423   samba_cv_HAVE_DEVICE_MAJOR_FN=yes
9424 else
9425   echo "configure: failed program was:" >&5
9426   cat conftest.$ac_ext >&5
9427   rm -fr conftest*
9428   samba_cv_HAVE_DEVICE_MAJOR_FN=no
9429 fi
9430 rm -fr conftest*
9431 fi
9432
9433 fi
9434
9435 echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6
9436 if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then
9437     cat >> confdefs.h <<\EOF
9438 #define HAVE_DEVICE_MAJOR_FN 1
9439 EOF
9440
9441 fi
9442
9443 echo $ac_n "checking for minor macro""... $ac_c" 1>&6
9444 echo "configure:9445: checking for minor macro" >&5
9445 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then
9446   echo $ac_n "(cached) $ac_c" 1>&6
9447 else
9448   
9449 if test "$cross_compiling" = yes; then
9450   samba_cv_HAVE_DEVICE_MINOR_FN=cross
9451 else
9452   cat > conftest.$ac_ext <<EOF
9453 #line 9454 "configure"
9454 #include "confdefs.h"
9455
9456 #if defined(HAVE_UNISTD_H)
9457 #include <unistd.h>
9458 #endif
9459 #include <sys/types.h>
9460 main() { dev_t dev; int i = minor(dev); return 0; }
9461 EOF
9462 if { (eval echo configure:9463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9463 then
9464   samba_cv_HAVE_DEVICE_MINOR_FN=yes
9465 else
9466   echo "configure: failed program was:" >&5
9467   cat conftest.$ac_ext >&5
9468   rm -fr conftest*
9469   samba_cv_HAVE_DEVICE_MINOR_FN=no
9470 fi
9471 rm -fr conftest*
9472 fi
9473
9474 fi
9475
9476 echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6
9477 if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then
9478     cat >> confdefs.h <<\EOF
9479 #define HAVE_DEVICE_MINOR_FN 1
9480 EOF
9481
9482 fi
9483
9484 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9485 echo "configure:9486: checking for unsigned char" >&5
9486 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9487   echo $ac_n "(cached) $ac_c" 1>&6
9488 else
9489   
9490 if test "$cross_compiling" = yes; then
9491   samba_cv_HAVE_UNSIGNED_CHAR=cross
9492 else
9493   cat > conftest.$ac_ext <<EOF
9494 #line 9495 "configure"
9495 #include "confdefs.h"
9496 #include <stdio.h>
9497 main() { char c; c=250; exit((c > 0)?0:1); }
9498 EOF
9499 if { (eval echo configure:9500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9500 then
9501   samba_cv_HAVE_UNSIGNED_CHAR=yes
9502 else
9503   echo "configure: failed program was:" >&5
9504   cat conftest.$ac_ext >&5
9505   rm -fr conftest*
9506   samba_cv_HAVE_UNSIGNED_CHAR=no
9507 fi
9508 rm -fr conftest*
9509 fi
9510
9511 fi
9512
9513 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9514 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9515     cat >> confdefs.h <<\EOF
9516 #define HAVE_UNSIGNED_CHAR 1
9517 EOF
9518
9519 fi
9520
9521 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9522 echo "configure:9523: checking for sin_len in sock" >&5
9523 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9524   echo $ac_n "(cached) $ac_c" 1>&6
9525 else
9526   
9527 cat > conftest.$ac_ext <<EOF
9528 #line 9529 "configure"
9529 #include "confdefs.h"
9530 #include <sys/types.h>
9531 #include <sys/socket.h>
9532 #include <netinet/in.h>
9533 int main() {
9534 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9535 ; return 0; }
9536 EOF
9537 if { (eval echo configure:9538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9538   rm -rf conftest*
9539   samba_cv_HAVE_SOCK_SIN_LEN=yes
9540 else
9541   echo "configure: failed program was:" >&5
9542   cat conftest.$ac_ext >&5
9543   rm -rf conftest*
9544   samba_cv_HAVE_SOCK_SIN_LEN=no
9545 fi
9546 rm -f conftest*
9547 fi
9548
9549 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9550 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9551     cat >> confdefs.h <<\EOF
9552 #define HAVE_SOCK_SIN_LEN 1
9553 EOF
9554
9555 fi
9556
9557 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9558 echo "configure:9559: checking whether seekdir returns void" >&5
9559 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9560   echo $ac_n "(cached) $ac_c" 1>&6
9561 else
9562   
9563 cat > conftest.$ac_ext <<EOF
9564 #line 9565 "configure"
9565 #include "confdefs.h"
9566 #include <sys/types.h>
9567 #include <dirent.h>
9568 void seekdir(DIR *d, long loc) { return; }
9569 int main() {
9570 return 0;
9571 ; return 0; }
9572 EOF
9573 if { (eval echo configure:9574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9574   rm -rf conftest*
9575   samba_cv_SEEKDIR_RETURNS_VOID=yes
9576 else
9577   echo "configure: failed program was:" >&5
9578   cat conftest.$ac_ext >&5
9579   rm -rf conftest*
9580   samba_cv_SEEKDIR_RETURNS_VOID=no
9581 fi
9582 rm -f conftest*
9583 fi
9584
9585 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9586 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9587     cat >> confdefs.h <<\EOF
9588 #define SEEKDIR_RETURNS_VOID 1
9589 EOF
9590
9591 fi
9592
9593 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9594 echo "configure:9595: checking for __FILE__ macro" >&5
9595 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9596   echo $ac_n "(cached) $ac_c" 1>&6
9597 else
9598   
9599 cat > conftest.$ac_ext <<EOF
9600 #line 9601 "configure"
9601 #include "confdefs.h"
9602 #include <stdio.h>
9603 int main() {
9604 printf("%s\n", __FILE__);
9605 ; return 0; }
9606 EOF
9607 if { (eval echo configure:9608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9608   rm -rf conftest*
9609   samba_cv_HAVE_FILE_MACRO=yes
9610 else
9611   echo "configure: failed program was:" >&5
9612   cat conftest.$ac_ext >&5
9613   rm -rf conftest*
9614   samba_cv_HAVE_FILE_MACRO=no
9615 fi
9616 rm -f conftest*
9617 fi
9618
9619 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9620 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9621     cat >> confdefs.h <<\EOF
9622 #define HAVE_FILE_MACRO 1
9623 EOF
9624
9625 fi
9626
9627 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9628 echo "configure:9629: checking for __FUNCTION__ macro" >&5
9629 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9630   echo $ac_n "(cached) $ac_c" 1>&6
9631 else
9632   
9633 cat > conftest.$ac_ext <<EOF
9634 #line 9635 "configure"
9635 #include "confdefs.h"
9636 #include <stdio.h>
9637 int main() {
9638 printf("%s\n", __FUNCTION__);
9639 ; return 0; }
9640 EOF
9641 if { (eval echo configure:9642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9642   rm -rf conftest*
9643   samba_cv_HAVE_FUNCTION_MACRO=yes
9644 else
9645   echo "configure: failed program was:" >&5
9646   cat conftest.$ac_ext >&5
9647   rm -rf conftest*
9648   samba_cv_HAVE_FUNCTION_MACRO=no
9649 fi
9650 rm -f conftest*
9651 fi
9652
9653 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9654 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9655     cat >> confdefs.h <<\EOF
9656 #define HAVE_FUNCTION_MACRO 1
9657 EOF
9658
9659 fi
9660
9661 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9662 echo "configure:9663: checking if gettimeofday takes tz argument" >&5
9663 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9664   echo $ac_n "(cached) $ac_c" 1>&6
9665 else
9666   
9667 if test "$cross_compiling" = yes; then
9668   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9669 else
9670   cat > conftest.$ac_ext <<EOF
9671 #line 9672 "configure"
9672 #include "confdefs.h"
9673
9674 #include <sys/time.h>
9675 #include <unistd.h>
9676 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9677 EOF
9678 if { (eval echo configure:9679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9679 then
9680   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9681 else
9682   echo "configure: failed program was:" >&5
9683   cat conftest.$ac_ext >&5
9684   rm -fr conftest*
9685   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9686 fi
9687 rm -fr conftest*
9688 fi
9689
9690 fi
9691
9692 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9693 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9694     cat >> confdefs.h <<\EOF
9695 #define HAVE_GETTIMEOFDAY_TZ 1
9696 EOF
9697
9698 fi
9699
9700 echo $ac_n "checking for __va_copy""... $ac_c" 1>&6
9701 echo "configure:9702: checking for __va_copy" >&5
9702 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then
9703   echo $ac_n "(cached) $ac_c" 1>&6
9704 else
9705   
9706 cat > conftest.$ac_ext <<EOF
9707 #line 9708 "configure"
9708 #include "confdefs.h"
9709 #include <stdarg.h>
9710 va_list ap1,ap2;
9711 int main() {
9712 __va_copy(ap1,ap2);
9713 ; return 0; }
9714 EOF
9715 if { (eval echo configure:9716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9716   rm -rf conftest*
9717   samba_cv_HAVE_VA_COPY=yes
9718 else
9719   echo "configure: failed program was:" >&5
9720   cat conftest.$ac_ext >&5
9721   rm -rf conftest*
9722   samba_cv_HAVE_VA_COPY=no
9723 fi
9724 rm -f conftest*
9725 fi
9726
9727 echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6
9728 if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
9729     cat >> confdefs.h <<\EOF
9730 #define HAVE_VA_COPY 1
9731 EOF
9732
9733 fi
9734
9735 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9736 echo "configure:9737: checking for C99 vsnprintf" >&5
9737 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9738   echo $ac_n "(cached) $ac_c" 1>&6
9739 else
9740   
9741 if test "$cross_compiling" = yes; then
9742   samba_cv_HAVE_C99_VSNPRINTF=cross
9743 else
9744   cat > conftest.$ac_ext <<EOF
9745 #line 9746 "configure"
9746 #include "confdefs.h"
9747
9748 #include <sys/types.h>
9749 #include <stdarg.h>
9750 void foo(const char *format, ...) { 
9751        va_list ap;
9752        int len;
9753        char buf[5];
9754
9755        va_start(ap, format);
9756        len = vsnprintf(buf, 0, format, ap);
9757        va_end(ap);
9758        if (len != 5) exit(1);
9759
9760        va_start(ap, format);
9761        len = vsnprintf(0, 0, format, ap);
9762        va_end(ap);
9763        if (len != 5) exit(1);
9764
9765        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9766
9767        exit(0);
9768 }
9769 main() { foo("hello"); }
9770
9771 EOF
9772 if { (eval echo configure:9773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9773 then
9774   samba_cv_HAVE_C99_VSNPRINTF=yes
9775 else
9776   echo "configure: failed program was:" >&5
9777   cat conftest.$ac_ext >&5
9778   rm -fr conftest*
9779   samba_cv_HAVE_C99_VSNPRINTF=no
9780 fi
9781 rm -fr conftest*
9782 fi
9783
9784 fi
9785
9786 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9787 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9788     cat >> confdefs.h <<\EOF
9789 #define HAVE_C99_VSNPRINTF 1
9790 EOF
9791
9792 fi
9793
9794 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9795 echo "configure:9796: checking for broken readdir" >&5
9796 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9797   echo $ac_n "(cached) $ac_c" 1>&6
9798 else
9799   
9800 if test "$cross_compiling" = yes; then
9801   samba_cv_HAVE_BROKEN_READDIR=cross
9802 else
9803   cat > conftest.$ac_ext <<EOF
9804 #line 9805 "configure"
9805 #include "confdefs.h"
9806 #include <sys/types.h>
9807 #include <dirent.h>
9808 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9809 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9810 di->d_name[0] == 0) exit(0); exit(1);} 
9811 EOF
9812 if { (eval echo configure:9813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9813 then
9814   samba_cv_HAVE_BROKEN_READDIR=yes
9815 else
9816   echo "configure: failed program was:" >&5
9817   cat conftest.$ac_ext >&5
9818   rm -fr conftest*
9819   samba_cv_HAVE_BROKEN_READDIR=no
9820 fi
9821 rm -fr conftest*
9822 fi
9823
9824 fi
9825
9826 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9827 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9828     cat >> confdefs.h <<\EOF
9829 #define HAVE_BROKEN_READDIR 1
9830 EOF
9831
9832 fi
9833
9834 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9835 echo "configure:9836: checking for utimbuf" >&5
9836 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9837   echo $ac_n "(cached) $ac_c" 1>&6
9838 else
9839   
9840 cat > conftest.$ac_ext <<EOF
9841 #line 9842 "configure"
9842 #include "confdefs.h"
9843 #include <sys/types.h>
9844 #include <utime.h>
9845 int main() {
9846 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9847 ; return 0; }
9848 EOF
9849 if { (eval echo configure:9850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9850   rm -rf conftest*
9851   samba_cv_HAVE_UTIMBUF=yes
9852 else
9853   echo "configure: failed program was:" >&5
9854   cat conftest.$ac_ext >&5
9855   rm -rf conftest*
9856   samba_cv_HAVE_UTIMBUF=no
9857 fi
9858 rm -f conftest*
9859 fi
9860
9861 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9862 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9863     cat >> confdefs.h <<\EOF
9864 #define HAVE_UTIMBUF 1
9865 EOF
9866
9867 fi
9868
9869
9870 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9871 do
9872 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9873 echo "configure:9874: checking for $ac_func" >&5
9874 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9875   echo $ac_n "(cached) $ac_c" 1>&6
9876 else
9877   cat > conftest.$ac_ext <<EOF
9878 #line 9879 "configure"
9879 #include "confdefs.h"
9880 /* System header to define __stub macros and hopefully few prototypes,
9881     which can conflict with char $ac_func(); below.  */
9882 #include <assert.h>
9883 /* Override any gcc2 internal prototype to avoid an error.  */
9884 /* We use char because int might match the return type of a gcc2
9885     builtin and then its argument prototype would still apply.  */
9886 char $ac_func();
9887
9888 int main() {
9889
9890 /* The GNU C library defines this for functions which it implements
9891     to always fail with ENOSYS.  Some functions are actually named
9892     something starting with __ and the normal name is an alias.  */
9893 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9894 choke me
9895 #else
9896 $ac_func();
9897 #endif
9898
9899 ; return 0; }
9900 EOF
9901 if { (eval echo configure:9902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9902   rm -rf conftest*
9903   eval "ac_cv_func_$ac_func=yes"
9904 else
9905   echo "configure: failed program was:" >&5
9906   cat conftest.$ac_ext >&5
9907   rm -rf conftest*
9908   eval "ac_cv_func_$ac_func=no"
9909 fi
9910 rm -f conftest*
9911 fi
9912
9913 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9914   echo "$ac_t""yes" 1>&6
9915     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9916   cat >> confdefs.h <<EOF
9917 #define $ac_tr_func 1
9918 EOF
9919  
9920 else
9921   echo "$ac_t""no" 1>&6
9922 fi
9923 done
9924
9925
9926 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9927 echo "configure:9928: checking for ut_name in utmp" >&5
9928 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9929   echo $ac_n "(cached) $ac_c" 1>&6
9930 else
9931   
9932 cat > conftest.$ac_ext <<EOF
9933 #line 9934 "configure"
9934 #include "confdefs.h"
9935 #include <sys/types.h>
9936 #include <utmp.h>
9937 int main() {
9938 struct utmp ut;  ut.ut_name[0] = 'a';
9939 ; return 0; }
9940 EOF
9941 if { (eval echo configure:9942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9942   rm -rf conftest*
9943   samba_cv_HAVE_UT_UT_NAME=yes
9944 else
9945   echo "configure: failed program was:" >&5
9946   cat conftest.$ac_ext >&5
9947   rm -rf conftest*
9948   samba_cv_HAVE_UT_UT_NAME=no
9949 fi
9950 rm -f conftest*
9951 fi
9952
9953 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9954 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9955     cat >> confdefs.h <<\EOF
9956 #define HAVE_UT_UT_NAME 1
9957 EOF
9958
9959 fi 
9960
9961 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9962 echo "configure:9963: checking for ut_user in utmp" >&5
9963 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9964   echo $ac_n "(cached) $ac_c" 1>&6
9965 else
9966   
9967 cat > conftest.$ac_ext <<EOF
9968 #line 9969 "configure"
9969 #include "confdefs.h"
9970 #include <sys/types.h>
9971 #include <utmp.h>
9972 int main() {
9973 struct utmp ut;  ut.ut_user[0] = 'a';
9974 ; return 0; }
9975 EOF
9976 if { (eval echo configure:9977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9977   rm -rf conftest*
9978   samba_cv_HAVE_UT_UT_USER=yes
9979 else
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982   rm -rf conftest*
9983   samba_cv_HAVE_UT_UT_USER=no
9984 fi
9985 rm -f conftest*
9986 fi
9987
9988 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9989 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9990     cat >> confdefs.h <<\EOF
9991 #define HAVE_UT_UT_USER 1
9992 EOF
9993
9994 fi 
9995
9996 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9997 echo "configure:9998: checking for ut_id in utmp" >&5
9998 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9999   echo $ac_n "(cached) $ac_c" 1>&6
10000 else
10001   
10002 cat > conftest.$ac_ext <<EOF
10003 #line 10004 "configure"
10004 #include "confdefs.h"
10005 #include <sys/types.h>
10006 #include <utmp.h>
10007 int main() {
10008 struct utmp ut;  ut.ut_id[0] = 'a';
10009 ; return 0; }
10010 EOF
10011 if { (eval echo configure:10012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10012   rm -rf conftest*
10013   samba_cv_HAVE_UT_UT_ID=yes
10014 else
10015   echo "configure: failed program was:" >&5
10016   cat conftest.$ac_ext >&5
10017   rm -rf conftest*
10018   samba_cv_HAVE_UT_UT_ID=no
10019 fi
10020 rm -f conftest*
10021 fi
10022
10023 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
10024 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
10025     cat >> confdefs.h <<\EOF
10026 #define HAVE_UT_UT_ID 1
10027 EOF
10028
10029 fi 
10030
10031 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
10032 echo "configure:10033: checking for ut_host in utmp" >&5
10033 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
10034   echo $ac_n "(cached) $ac_c" 1>&6
10035 else
10036   
10037 cat > conftest.$ac_ext <<EOF
10038 #line 10039 "configure"
10039 #include "confdefs.h"
10040 #include <sys/types.h>
10041 #include <utmp.h>
10042 int main() {
10043 struct utmp ut;  ut.ut_host[0] = 'a';
10044 ; return 0; }
10045 EOF
10046 if { (eval echo configure:10047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10047   rm -rf conftest*
10048   samba_cv_HAVE_UT_UT_HOST=yes
10049 else
10050   echo "configure: failed program was:" >&5
10051   cat conftest.$ac_ext >&5
10052   rm -rf conftest*
10053   samba_cv_HAVE_UT_UT_HOST=no
10054 fi
10055 rm -f conftest*
10056 fi
10057
10058 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
10059 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
10060     cat >> confdefs.h <<\EOF
10061 #define HAVE_UT_UT_HOST 1
10062 EOF
10063
10064 fi 
10065
10066 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
10067 echo "configure:10068: checking for ut_time in utmp" >&5
10068 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
10069   echo $ac_n "(cached) $ac_c" 1>&6
10070 else
10071   
10072 cat > conftest.$ac_ext <<EOF
10073 #line 10074 "configure"
10074 #include "confdefs.h"
10075 #include <sys/types.h>
10076 #include <utmp.h>
10077 int main() {
10078 struct utmp ut;  time_t t; ut.ut_time = t;
10079 ; return 0; }
10080 EOF
10081 if { (eval echo configure:10082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10082   rm -rf conftest*
10083   samba_cv_HAVE_UT_UT_TIME=yes
10084 else
10085   echo "configure: failed program was:" >&5
10086   cat conftest.$ac_ext >&5
10087   rm -rf conftest*
10088   samba_cv_HAVE_UT_UT_TIME=no
10089 fi
10090 rm -f conftest*
10091 fi
10092
10093 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
10094 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
10095     cat >> confdefs.h <<\EOF
10096 #define HAVE_UT_UT_TIME 1
10097 EOF
10098
10099 fi 
10100
10101 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
10102 echo "configure:10103: checking for ut_tv in utmp" >&5
10103 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
10104   echo $ac_n "(cached) $ac_c" 1>&6
10105 else
10106   
10107 cat > conftest.$ac_ext <<EOF
10108 #line 10109 "configure"
10109 #include "confdefs.h"
10110 #include <sys/types.h>
10111 #include <utmp.h>
10112 int main() {
10113 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
10114 ; return 0; }
10115 EOF
10116 if { (eval echo configure:10117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10117   rm -rf conftest*
10118   samba_cv_HAVE_UT_UT_TV=yes
10119 else
10120   echo "configure: failed program was:" >&5
10121   cat conftest.$ac_ext >&5
10122   rm -rf conftest*
10123   samba_cv_HAVE_UT_UT_TV=no
10124 fi
10125 rm -f conftest*
10126 fi
10127
10128 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
10129 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
10130     cat >> confdefs.h <<\EOF
10131 #define HAVE_UT_UT_TV 1
10132 EOF
10133
10134 fi 
10135
10136 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
10137 echo "configure:10138: checking for ut_type in utmp" >&5
10138 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
10139   echo $ac_n "(cached) $ac_c" 1>&6
10140 else
10141   
10142 cat > conftest.$ac_ext <<EOF
10143 #line 10144 "configure"
10144 #include "confdefs.h"
10145 #include <sys/types.h>
10146 #include <utmp.h>
10147 int main() {
10148 struct utmp ut;  ut.ut_type = 0;
10149 ; return 0; }
10150 EOF
10151 if { (eval echo configure:10152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10152   rm -rf conftest*
10153   samba_cv_HAVE_UT_UT_TYPE=yes
10154 else
10155   echo "configure: failed program was:" >&5
10156   cat conftest.$ac_ext >&5
10157   rm -rf conftest*
10158   samba_cv_HAVE_UT_UT_TYPE=no
10159 fi
10160 rm -f conftest*
10161 fi
10162
10163 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
10164 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
10165     cat >> confdefs.h <<\EOF
10166 #define HAVE_UT_UT_TYPE 1
10167 EOF
10168
10169 fi 
10170
10171 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
10172 echo "configure:10173: checking for ut_pid in utmp" >&5
10173 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
10174   echo $ac_n "(cached) $ac_c" 1>&6
10175 else
10176   
10177 cat > conftest.$ac_ext <<EOF
10178 #line 10179 "configure"
10179 #include "confdefs.h"
10180 #include <sys/types.h>
10181 #include <utmp.h>
10182 int main() {
10183 struct utmp ut;  ut.ut_pid = 0;
10184 ; return 0; }
10185 EOF
10186 if { (eval echo configure:10187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10187   rm -rf conftest*
10188   samba_cv_HAVE_UT_UT_PID=yes
10189 else
10190   echo "configure: failed program was:" >&5
10191   cat conftest.$ac_ext >&5
10192   rm -rf conftest*
10193   samba_cv_HAVE_UT_UT_PID=no
10194 fi
10195 rm -f conftest*
10196 fi
10197
10198 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
10199 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
10200     cat >> confdefs.h <<\EOF
10201 #define HAVE_UT_UT_PID 1
10202 EOF
10203
10204 fi 
10205
10206 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
10207 echo "configure:10208: checking for ut_exit in utmp" >&5
10208 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
10209   echo $ac_n "(cached) $ac_c" 1>&6
10210 else
10211   
10212 cat > conftest.$ac_ext <<EOF
10213 #line 10214 "configure"
10214 #include "confdefs.h"
10215 #include <sys/types.h>
10216 #include <utmp.h>
10217 int main() {
10218 struct utmp ut;  ut.ut_exit.e_exit = 0;
10219 ; return 0; }
10220 EOF
10221 if { (eval echo configure:10222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10222   rm -rf conftest*
10223   samba_cv_HAVE_UT_UT_EXIT=yes
10224 else
10225   echo "configure: failed program was:" >&5
10226   cat conftest.$ac_ext >&5
10227   rm -rf conftest*
10228   samba_cv_HAVE_UT_UT_EXIT=no
10229 fi
10230 rm -f conftest*
10231 fi
10232
10233 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
10234 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
10235     cat >> confdefs.h <<\EOF
10236 #define HAVE_UT_UT_EXIT 1
10237 EOF
10238
10239 fi 
10240
10241 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
10242 echo "configure:10243: checking for ut_addr in utmp" >&5
10243 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
10244   echo $ac_n "(cached) $ac_c" 1>&6
10245 else
10246   
10247 cat > conftest.$ac_ext <<EOF
10248 #line 10249 "configure"
10249 #include "confdefs.h"
10250 #include <sys/types.h>
10251 #include <utmp.h>
10252 int main() {
10253 struct utmp ut;  ut.ut_addr = 0;
10254 ; return 0; }
10255 EOF
10256 if { (eval echo configure:10257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10257   rm -rf conftest*
10258   samba_cv_HAVE_UT_UT_ADDR=yes
10259 else
10260   echo "configure: failed program was:" >&5
10261   cat conftest.$ac_ext >&5
10262   rm -rf conftest*
10263   samba_cv_HAVE_UT_UT_ADDR=no
10264 fi
10265 rm -f conftest*
10266 fi
10267
10268 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
10269 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
10270     cat >> confdefs.h <<\EOF
10271 #define HAVE_UT_UT_ADDR 1
10272 EOF
10273
10274 fi 
10275
10276 if test x$ac_cv_func_pututline = xyes ; then
10277   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
10278 echo "configure:10279: checking whether pututline returns pointer" >&5
10279 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
10280   echo $ac_n "(cached) $ac_c" 1>&6
10281 else
10282   
10283   cat > conftest.$ac_ext <<EOF
10284 #line 10285 "configure"
10285 #include "confdefs.h"
10286 #include <sys/types.h>
10287 #include <utmp.h>
10288 int main() {
10289 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
10290 ; return 0; }
10291 EOF
10292 if { (eval echo configure:10293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10293   rm -rf conftest*
10294   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
10295 else
10296   echo "configure: failed program was:" >&5
10297   cat conftest.$ac_ext >&5
10298   rm -rf conftest*
10299   samba_cv_PUTUTLINE_RETURNS_UTMP=no
10300 fi
10301 rm -f conftest*
10302 fi
10303
10304 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
10305   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
10306       cat >> confdefs.h <<\EOF
10307 #define PUTUTLINE_RETURNS_UTMP 1
10308 EOF
10309
10310   fi
10311 fi
10312
10313 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
10314 echo "configure:10315: checking for ut_syslen in utmpx" >&5
10315 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
10316   echo $ac_n "(cached) $ac_c" 1>&6
10317 else
10318   
10319 cat > conftest.$ac_ext <<EOF
10320 #line 10321 "configure"
10321 #include "confdefs.h"
10322 #include <sys/types.h>
10323 #include <utmpx.h>
10324 int main() {
10325 struct utmpx ux;  ux.ut_syslen = 0;
10326 ; return 0; }
10327 EOF
10328 if { (eval echo configure:10329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10329   rm -rf conftest*
10330   samba_cv_HAVE_UX_UT_SYSLEN=yes
10331 else
10332   echo "configure: failed program was:" >&5
10333   cat conftest.$ac_ext >&5
10334   rm -rf conftest*
10335   samba_cv_HAVE_UX_UT_SYSLEN=no
10336 fi
10337 rm -f conftest*
10338 fi
10339
10340 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
10341 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
10342     cat >> confdefs.h <<\EOF
10343 #define HAVE_UX_UT_SYSLEN 1
10344 EOF
10345
10346 fi 
10347
10348
10349 #################################################
10350 # check for libiconv support
10351 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
10352 echo "configure:10353: checking whether to use libiconv" >&5
10353 # Check whether --with-libiconv or --without-libiconv was given.
10354 if test "${with_libiconv+set}" = set; then
10355   withval="$with_libiconv"
10356    case "$withval" in
10357   no)
10358     echo "$ac_t""no" 1>&6
10359     ;;
10360   *)
10361     echo "$ac_t""yes" 1>&6
10362     CFLAGS="$CFLAGS -I$withval/include"
10363     LDFLAGS="$LDFLAGS -L$withval/lib"
10364     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
10365 echo "configure:10366: checking for iconv_open in -liconv" >&5
10366 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
10367 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
10368   echo $ac_n "(cached) $ac_c" 1>&6
10369 else
10370   ac_save_LIBS="$LIBS"
10371 LIBS="-liconv  $LIBS"
10372 cat > conftest.$ac_ext <<EOF
10373 #line 10374 "configure"
10374 #include "confdefs.h"
10375 /* Override any gcc2 internal prototype to avoid an error.  */
10376 /* We use char because int might match the return type of a gcc2
10377     builtin and then its argument prototype would still apply.  */
10378 char iconv_open();
10379
10380 int main() {
10381 iconv_open()
10382 ; return 0; }
10383 EOF
10384 if { (eval echo configure:10385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10385   rm -rf conftest*
10386   eval "ac_cv_lib_$ac_lib_var=yes"
10387 else
10388   echo "configure: failed program was:" >&5
10389   cat conftest.$ac_ext >&5
10390   rm -rf conftest*
10391   eval "ac_cv_lib_$ac_lib_var=no"
10392 fi
10393 rm -f conftest*
10394 LIBS="$ac_save_LIBS"
10395
10396 fi
10397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10398   echo "$ac_t""yes" 1>&6
10399     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10400     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10401   cat >> confdefs.h <<EOF
10402 #define $ac_tr_lib 1
10403 EOF
10404
10405   LIBS="-liconv $LIBS"
10406
10407 else
10408   echo "$ac_t""no" 1>&6
10409 fi
10410
10411     cat >> confdefs.h <<EOF
10412 #define WITH_LIBICONV "${withval}"
10413 EOF
10414
10415     ;;
10416   esac 
10417 else
10418   echo "$ac_t""no" 1>&6
10419
10420 fi
10421
10422
10423
10424 ############
10425 # check for iconv in libc
10426 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
10427 echo "configure:10428: checking for working iconv" >&5
10428 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
10429   echo $ac_n "(cached) $ac_c" 1>&6
10430 else
10431   
10432 if test "$cross_compiling" = yes; then
10433   samba_cv_HAVE_NATIVE_ICONV=cross
10434 else
10435   cat > conftest.$ac_ext <<EOF
10436 #line 10437 "configure"
10437 #include "confdefs.h"
10438
10439 #include <iconv.h>
10440 main() {
10441        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
10442        if (cd == 0 || cd == (iconv_t)-1) return -1;
10443        return 0;
10444 }
10445
10446 EOF
10447 if { (eval echo configure:10448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10448 then
10449   samba_cv_HAVE_NATIVE_ICONV=yes
10450 else
10451   echo "configure: failed program was:" >&5
10452   cat conftest.$ac_ext >&5
10453   rm -fr conftest*
10454   samba_cv_HAVE_NATIVE_ICONV=no
10455 fi
10456 rm -fr conftest*
10457 fi
10458
10459 fi
10460
10461 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
10462 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
10463     cat >> confdefs.h <<\EOF
10464 #define HAVE_NATIVE_ICONV 1
10465 EOF
10466
10467 fi
10468
10469
10470 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
10471 echo "configure:10472: checking for Linux kernel oplocks" >&5
10472 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
10473   echo $ac_n "(cached) $ac_c" 1>&6
10474 else
10475   
10476 if test "$cross_compiling" = yes; then
10477   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
10478 else
10479   cat > conftest.$ac_ext <<EOF
10480 #line 10481 "configure"
10481 #include "confdefs.h"
10482
10483 #include <sys/types.h>
10484 #include <fcntl.h>
10485 #ifndef F_GETLEASE
10486 #define F_GETLEASE      1025
10487 #endif
10488 main() {
10489        int fd = open("/dev/null", O_RDONLY);
10490        return fcntl(fd, F_GETLEASE, 0) == -1;
10491 }
10492
10493 EOF
10494 if { (eval echo configure:10495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10495 then
10496   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
10497 else
10498   echo "configure: failed program was:" >&5
10499   cat conftest.$ac_ext >&5
10500   rm -fr conftest*
10501   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
10502 fi
10503 rm -fr conftest*
10504 fi
10505
10506 fi
10507
10508 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
10509 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
10510     cat >> confdefs.h <<\EOF
10511 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10512 EOF
10513
10514 fi
10515
10516 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10517 echo "configure:10518: checking for kernel change notify support" >&5
10518 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10519   echo $ac_n "(cached) $ac_c" 1>&6
10520 else
10521   
10522 if test "$cross_compiling" = yes; then
10523   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10524 else
10525   cat > conftest.$ac_ext <<EOF
10526 #line 10527 "configure"
10527 #include "confdefs.h"
10528
10529 #include <sys/types.h>
10530 #include <fcntl.h>
10531 #include <signal.h>
10532 #ifndef F_NOTIFY
10533 #define F_NOTIFY 1026
10534 #endif
10535 main() {
10536         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10537 }
10538
10539 EOF
10540 if { (eval echo configure:10541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10541 then
10542   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10543 else
10544   echo "configure: failed program was:" >&5
10545   cat conftest.$ac_ext >&5
10546   rm -fr conftest*
10547   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10548 fi
10549 rm -fr conftest*
10550 fi
10551
10552 fi
10553
10554 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10555 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10556     cat >> confdefs.h <<\EOF
10557 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10558 EOF
10559
10560 fi
10561
10562 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10563 echo "configure:10564: checking for kernel share modes" >&5
10564 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10565   echo $ac_n "(cached) $ac_c" 1>&6
10566 else
10567   
10568 if test "$cross_compiling" = yes; then
10569   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10570 else
10571   cat > conftest.$ac_ext <<EOF
10572 #line 10573 "configure"
10573 #include "confdefs.h"
10574
10575 #include <sys/types.h>
10576 #include <fcntl.h>
10577 #include <signal.h>
10578 #include <sys/file.h>
10579 #ifndef LOCK_MAND
10580 #define LOCK_MAND       32
10581 #define LOCK_READ       64
10582 #endif
10583 main() {
10584         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10585 }
10586
10587 EOF
10588 if { (eval echo configure:10589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10589 then
10590   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10591 else
10592   echo "configure: failed program was:" >&5
10593   cat conftest.$ac_ext >&5
10594   rm -fr conftest*
10595   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10596 fi
10597 rm -fr conftest*
10598 fi
10599
10600 fi
10601
10602 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10603 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10604     cat >> confdefs.h <<\EOF
10605 #define HAVE_KERNEL_SHARE_MODES 1
10606 EOF
10607
10608 fi
10609
10610
10611
10612
10613 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10614 echo "configure:10615: checking for IRIX kernel oplock type definitions" >&5
10615 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10616   echo $ac_n "(cached) $ac_c" 1>&6
10617 else
10618   
10619 cat > conftest.$ac_ext <<EOF
10620 #line 10621 "configure"
10621 #include "confdefs.h"
10622 #include <sys/types.h>
10623 #include <fcntl.h>
10624 int main() {
10625 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10626 ; return 0; }
10627 EOF
10628 if { (eval echo configure:10629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10629   rm -rf conftest*
10630   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10631 else
10632   echo "configure: failed program was:" >&5
10633   cat conftest.$ac_ext >&5
10634   rm -rf conftest*
10635   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10636 fi
10637 rm -f conftest*
10638 fi
10639
10640 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10641 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10642     cat >> confdefs.h <<\EOF
10643 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10644 EOF
10645
10646 fi
10647
10648 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10649 echo "configure:10650: checking for irix specific capabilities" >&5
10650 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10651   echo $ac_n "(cached) $ac_c" 1>&6
10652 else
10653   
10654 if test "$cross_compiling" = yes; then
10655   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10656 else
10657   cat > conftest.$ac_ext <<EOF
10658 #line 10659 "configure"
10659 #include "confdefs.h"
10660 #include <sys/types.h>
10661 #include <sys/capability.h>
10662 main() {
10663  cap_t cap;
10664  if ((cap = cap_get_proc()) == NULL)
10665    exit(1);
10666  cap->cap_effective |= CAP_NETWORK_MGT;
10667  cap->cap_inheritable |= CAP_NETWORK_MGT;
10668  cap_set_proc(cap);
10669  exit(0);
10670 }
10671
10672 EOF
10673 if { (eval echo configure:10674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10674 then
10675   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10676 else
10677   echo "configure: failed program was:" >&5
10678   cat conftest.$ac_ext >&5
10679   rm -fr conftest*
10680   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10681 fi
10682 rm -fr conftest*
10683 fi
10684
10685 fi
10686
10687 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10688 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10689     cat >> confdefs.h <<\EOF
10690 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10691 EOF
10692
10693 fi
10694
10695 #
10696 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10697 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10698 #
10699
10700 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10701 echo "configure:10702: checking for int16 typedef included by rpc/rpc.h" >&5
10702 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10703   echo $ac_n "(cached) $ac_c" 1>&6
10704 else
10705   
10706 cat > conftest.$ac_ext <<EOF
10707 #line 10708 "configure"
10708 #include "confdefs.h"
10709 #include <sys/types.h>
10710 #if defined(HAVE_RPC_RPC_H)
10711 #include <rpc/rpc.h>
10712 #endif
10713 int main() {
10714 int16 testvar;
10715 ; return 0; }
10716 EOF
10717 if { (eval echo configure:10718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10718   rm -rf conftest*
10719   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10720 else
10721   echo "configure: failed program was:" >&5
10722   cat conftest.$ac_ext >&5
10723   rm -rf conftest*
10724   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10725 fi
10726 rm -f conftest*
10727 fi
10728
10729 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10730 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10731     cat >> confdefs.h <<\EOF
10732 #define HAVE_INT16_FROM_RPC_RPC_H 1
10733 EOF
10734
10735 fi
10736
10737 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10738 echo "configure:10739: checking for uint16 typedef included by rpc/rpc.h" >&5
10739 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10740   echo $ac_n "(cached) $ac_c" 1>&6
10741 else
10742   
10743 cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746 #include <sys/types.h>
10747 #if defined(HAVE_RPC_RPC_H)
10748 #include <rpc/rpc.h>
10749 #endif
10750 int main() {
10751 uint16 testvar;
10752 ; return 0; }
10753 EOF
10754 if { (eval echo configure:10755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10755   rm -rf conftest*
10756   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10757 else
10758   echo "configure: failed program was:" >&5
10759   cat conftest.$ac_ext >&5
10760   rm -rf conftest*
10761   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10762 fi
10763 rm -f conftest*
10764 fi
10765
10766 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10767 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10768     cat >> confdefs.h <<\EOF
10769 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10770 EOF
10771
10772 fi
10773
10774 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10775 echo "configure:10776: checking for int32 typedef included by rpc/rpc.h" >&5
10776 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10777   echo $ac_n "(cached) $ac_c" 1>&6
10778 else
10779   
10780 cat > conftest.$ac_ext <<EOF
10781 #line 10782 "configure"
10782 #include "confdefs.h"
10783 #include <sys/types.h>
10784 #if defined(HAVE_RPC_RPC_H)
10785 #include <rpc/rpc.h>
10786 #endif
10787 int main() {
10788 int32 testvar;
10789 ; return 0; }
10790 EOF
10791 if { (eval echo configure:10792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10792   rm -rf conftest*
10793   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10794 else
10795   echo "configure: failed program was:" >&5
10796   cat conftest.$ac_ext >&5
10797   rm -rf conftest*
10798   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10799 fi
10800 rm -f conftest*
10801 fi
10802
10803 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10804 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10805     cat >> confdefs.h <<\EOF
10806 #define HAVE_INT32_FROM_RPC_RPC_H 1
10807 EOF
10808
10809 fi
10810
10811 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10812 echo "configure:10813: checking for uint32 typedef included by rpc/rpc.h" >&5
10813 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10814   echo $ac_n "(cached) $ac_c" 1>&6
10815 else
10816   
10817 cat > conftest.$ac_ext <<EOF
10818 #line 10819 "configure"
10819 #include "confdefs.h"
10820 #include <sys/types.h>
10821 #if defined(HAVE_RPC_RPC_H)
10822 #include <rpc/rpc.h>
10823 #endif
10824 int main() {
10825 uint32 testvar;
10826 ; return 0; }
10827 EOF
10828 if { (eval echo configure:10829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10829   rm -rf conftest*
10830   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10831 else
10832   echo "configure: failed program was:" >&5
10833   cat conftest.$ac_ext >&5
10834   rm -rf conftest*
10835   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10836 fi
10837 rm -f conftest*
10838 fi
10839
10840 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10841 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10842     cat >> confdefs.h <<\EOF
10843 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10844 EOF
10845
10846 fi
10847
10848
10849 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10850 echo "configure:10851: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10851 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10852   echo $ac_n "(cached) $ac_c" 1>&6
10853 else
10854   
10855 cat > conftest.$ac_ext <<EOF
10856 #line 10857 "configure"
10857 #include "confdefs.h"
10858 #include <sys/types.h>
10859 #ifdef HAVE_SYS_SECURITY_H
10860 #include <sys/security.h>
10861 #include <prot.h>
10862 #endif  /* HAVE_SYS_SECURITY_H */
10863 #if defined(HAVE_RPC_RPC_H)
10864 #include <rpc/rpc.h>
10865 #endif
10866 int main() {
10867 int testvar;
10868 ; return 0; }
10869 EOF
10870 if { (eval echo configure:10871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10871   rm -rf conftest*
10872   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10873 else
10874   echo "configure: failed program was:" >&5
10875   cat conftest.$ac_ext >&5
10876   rm -rf conftest*
10877   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10878 fi
10879 rm -f conftest*
10880 fi
10881
10882 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10883 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10884     cat >> confdefs.h <<\EOF
10885 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10886 EOF
10887
10888 fi
10889
10890 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10891 echo "configure:10892: checking for test routines" >&5
10892 if test "$cross_compiling" = yes; then
10893   echo "configure: warning: cannot run when cross-compiling" 1>&2
10894 else
10895   cat > conftest.$ac_ext <<EOF
10896 #line 10897 "configure"
10897 #include "confdefs.h"
10898 #include "${srcdir-.}/tests/trivial.c"
10899 EOF
10900 if { (eval echo configure:10901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10901 then
10902   echo "$ac_t""yes" 1>&6
10903 else
10904   echo "configure: failed program was:" >&5
10905   cat conftest.$ac_ext >&5
10906   rm -fr conftest*
10907   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10908 fi
10909 rm -fr conftest*
10910 fi
10911
10912
10913 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10914 echo "configure:10915: checking for ftruncate extend" >&5
10915 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10916   echo $ac_n "(cached) $ac_c" 1>&6
10917 else
10918   
10919 if test "$cross_compiling" = yes; then
10920   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10921 else
10922   cat > conftest.$ac_ext <<EOF
10923 #line 10924 "configure"
10924 #include "confdefs.h"
10925 #include "${srcdir-.}/tests/ftruncate.c"
10926 EOF
10927 if { (eval echo configure:10928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10928 then
10929   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10930 else
10931   echo "configure: failed program was:" >&5
10932   cat conftest.$ac_ext >&5
10933   rm -fr conftest*
10934   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10935 fi
10936 rm -fr conftest*
10937 fi
10938
10939 fi
10940
10941 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10942 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10943     cat >> confdefs.h <<\EOF
10944 #define HAVE_FTRUNCATE_EXTEND 1
10945 EOF
10946
10947 fi
10948
10949 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10950 echo "configure:10951: checking for AF_LOCAL socket support" >&5
10951 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10952   echo $ac_n "(cached) $ac_c" 1>&6
10953 else
10954   
10955 if test "$cross_compiling" = yes; then
10956   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10957 else
10958   cat > conftest.$ac_ext <<EOF
10959 #line 10960 "configure"
10960 #include "confdefs.h"
10961 #include "${srcdir-.}/tests/unixsock.c"
10962 EOF
10963 if { (eval echo configure:10964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10964 then
10965   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10966 else
10967   echo "configure: failed program was:" >&5
10968   cat conftest.$ac_ext >&5
10969   rm -fr conftest*
10970   samba_cv_HAVE_WORKING_AF_LOCAL=no
10971 fi
10972 rm -fr conftest*
10973 fi
10974
10975 fi
10976
10977 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10978 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10979 then
10980     cat >> confdefs.h <<\EOF
10981 #define HAVE_WORKING_AF_LOCAL 1
10982 EOF
10983
10984 fi
10985
10986 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10987 echo "configure:10988: checking for broken getgroups" >&5
10988 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10989   echo $ac_n "(cached) $ac_c" 1>&6
10990 else
10991   
10992 if test "$cross_compiling" = yes; then
10993   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10994 else
10995   cat > conftest.$ac_ext <<EOF
10996 #line 10997 "configure"
10997 #include "confdefs.h"
10998 #include "${srcdir-.}/tests/getgroups.c"
10999 EOF
11000 if { (eval echo configure:11001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11001 then
11002   samba_cv_HAVE_BROKEN_GETGROUPS=yes
11003 else
11004   echo "configure: failed program was:" >&5
11005   cat conftest.$ac_ext >&5
11006   rm -fr conftest*
11007   samba_cv_HAVE_BROKEN_GETGROUPS=no
11008 fi
11009 rm -fr conftest*
11010 fi
11011
11012 fi
11013
11014 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
11015 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
11016     cat >> confdefs.h <<\EOF
11017 #define HAVE_BROKEN_GETGROUPS 1
11018 EOF
11019
11020 fi
11021
11022 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
11023 echo "configure:11024: checking whether getpass should be replaced" >&5
11024 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
11025   echo $ac_n "(cached) $ac_c" 1>&6
11026 else
11027   
11028 SAVE_CPPFLAGS="$CPPFLAGS"
11029 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt  -I${srcdir-.}/smbwrapper"
11030 cat > conftest.$ac_ext <<EOF
11031 #line 11032 "configure"
11032 #include "confdefs.h"
11033
11034 #define REPLACE_GETPASS 1
11035 #define NO_CONFIG_H 1
11036 #define main dont_declare_main
11037 #include "${srcdir-.}/lib/getsmbpass.c"
11038 #undef main
11039
11040 int main() {
11041
11042 ; return 0; }
11043 EOF
11044 if { (eval echo configure:11045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11045   rm -rf conftest*
11046   samba_cv_REPLACE_GETPASS=yes
11047 else
11048   echo "configure: failed program was:" >&5
11049   cat conftest.$ac_ext >&5
11050   rm -rf conftest*
11051   samba_cv_REPLACE_GETPASS=no
11052 fi
11053 rm -f conftest*
11054 CPPFLAGS="$SAVE_CPPFLAGS"
11055
11056 fi
11057
11058 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
11059 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
11060         cat >> confdefs.h <<\EOF
11061 #define REPLACE_GETPASS 1
11062 EOF
11063
11064 fi
11065
11066 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
11067 echo "configure:11068: checking for broken inet_ntoa" >&5
11068 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
11069   echo $ac_n "(cached) $ac_c" 1>&6
11070 else
11071   
11072 if test "$cross_compiling" = yes; then
11073   samba_cv_REPLACE_INET_NTOA=cross
11074 else
11075   cat > conftest.$ac_ext <<EOF
11076 #line 11077 "configure"
11077 #include "confdefs.h"
11078
11079 #include <stdio.h>
11080 #include <sys/types.h>
11081 #include <netinet/in.h>
11082 #ifdef HAVE_ARPA_INET_H
11083 #include <arpa/inet.h>
11084 #endif
11085 main() { struct in_addr ip; ip.s_addr = 0x12345678;
11086 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
11087     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
11088 exit(1);}
11089 EOF
11090 if { (eval echo configure:11091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11091 then
11092   samba_cv_REPLACE_INET_NTOA=yes
11093 else
11094   echo "configure: failed program was:" >&5
11095   cat conftest.$ac_ext >&5
11096   rm -fr conftest*
11097   samba_cv_REPLACE_INET_NTOA=no
11098 fi
11099 rm -fr conftest*
11100 fi
11101
11102 fi
11103
11104 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
11105 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
11106     cat >> confdefs.h <<\EOF
11107 #define REPLACE_INET_NTOA 1
11108 EOF
11109
11110 fi
11111
11112 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
11113 echo "configure:11114: checking for secure mkstemp" >&5
11114 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
11115   echo $ac_n "(cached) $ac_c" 1>&6
11116 else
11117   
11118 if test "$cross_compiling" = yes; then
11119   samba_cv_HAVE_SECURE_MKSTEMP=cross
11120 else
11121   cat > conftest.$ac_ext <<EOF
11122 #line 11123 "configure"
11123 #include "confdefs.h"
11124 #include <stdlib.h>
11125 #include <sys/types.h>
11126 #include <sys/stat.h>
11127 #include <unistd.h>
11128 main() { 
11129   struct stat st;
11130   char tpl[20]="/tmp/test.XXXXXX"; 
11131   int fd = mkstemp(tpl); 
11132   if (fd == -1) exit(1);
11133   unlink(tpl);
11134   if (fstat(fd, &st) != 0) exit(1);
11135   if ((st.st_mode & 0777) != 0600) exit(1);
11136   exit(0);
11137 }
11138 EOF
11139 if { (eval echo configure:11140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11140 then
11141   samba_cv_HAVE_SECURE_MKSTEMP=yes
11142 else
11143   echo "configure: failed program was:" >&5
11144   cat conftest.$ac_ext >&5
11145   rm -fr conftest*
11146   samba_cv_HAVE_SECURE_MKSTEMP=no
11147 fi
11148 rm -fr conftest*
11149 fi
11150
11151 fi
11152
11153 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
11154 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
11155     cat >> confdefs.h <<\EOF
11156 #define HAVE_SECURE_MKSTEMP 1
11157 EOF
11158
11159 fi
11160
11161 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
11162 echo "configure:11163: checking for sysconf(_SC_NGROUPS_MAX)" >&5
11163 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
11164   echo $ac_n "(cached) $ac_c" 1>&6
11165 else
11166   
11167 if test "$cross_compiling" = yes; then
11168   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
11169 else
11170   cat > conftest.$ac_ext <<EOF
11171 #line 11172 "configure"
11172 #include "confdefs.h"
11173 #include <unistd.h>
11174 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
11175 EOF
11176 if { (eval echo configure:11177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11177 then
11178   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
11179 else
11180   echo "configure: failed program was:" >&5
11181   cat conftest.$ac_ext >&5
11182   rm -fr conftest*
11183   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
11184 fi
11185 rm -fr conftest*
11186 fi
11187
11188 fi
11189
11190 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
11191 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
11192     cat >> confdefs.h <<\EOF
11193 #define SYSCONF_SC_NGROUPS_MAX 1
11194 EOF
11195
11196 fi
11197
11198 echo $ac_n "checking for root""... $ac_c" 1>&6
11199 echo "configure:11200: checking for root" >&5
11200 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
11201   echo $ac_n "(cached) $ac_c" 1>&6
11202 else
11203   
11204 if test "$cross_compiling" = yes; then
11205   samba_cv_HAVE_ROOT=cross
11206 else
11207   cat > conftest.$ac_ext <<EOF
11208 #line 11209 "configure"
11209 #include "confdefs.h"
11210 main() { exit(getuid() != 0); }
11211 EOF
11212 if { (eval echo configure:11213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11213 then
11214   samba_cv_HAVE_ROOT=yes
11215 else
11216   echo "configure: failed program was:" >&5
11217   cat conftest.$ac_ext >&5
11218   rm -fr conftest*
11219   samba_cv_HAVE_ROOT=no
11220 fi
11221 rm -fr conftest*
11222 fi
11223
11224 fi
11225
11226 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
11227 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
11228     cat >> confdefs.h <<\EOF
11229 #define HAVE_ROOT 1
11230 EOF
11231
11232 else
11233     echo "configure: warning: running as non-root will disable some tests" 1>&2
11234 fi
11235
11236 ##################
11237 # look for a method of finding the list of network interfaces
11238 iface=no;
11239 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
11240 echo "configure:11241: checking for iface AIX" >&5
11241 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
11242   echo $ac_n "(cached) $ac_c" 1>&6
11243 else
11244   
11245 if test "$cross_compiling" = yes; then
11246   samba_cv_HAVE_IFACE_AIX=cross
11247 else
11248   cat > conftest.$ac_ext <<EOF
11249 #line 11250 "configure"
11250 #include "confdefs.h"
11251
11252 #define HAVE_IFACE_AIX 1
11253 #define AUTOCONF_TEST 1
11254 #include "confdefs.h"
11255 #include "${srcdir-.}/lib/interfaces.c"
11256 EOF
11257 if { (eval echo configure:11258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11258 then
11259   samba_cv_HAVE_IFACE_AIX=yes
11260 else
11261   echo "configure: failed program was:" >&5
11262   cat conftest.$ac_ext >&5
11263   rm -fr conftest*
11264   samba_cv_HAVE_IFACE_AIX=no
11265 fi
11266 rm -fr conftest*
11267 fi
11268
11269 fi
11270
11271 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
11272 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
11273     iface=yes;cat >> confdefs.h <<\EOF
11274 #define HAVE_IFACE_AIX 1
11275 EOF
11276
11277 fi
11278
11279 if test $iface = no; then
11280 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
11281 echo "configure:11282: checking for iface ifconf" >&5
11282 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
11283   echo $ac_n "(cached) $ac_c" 1>&6
11284 else
11285   
11286 if test "$cross_compiling" = yes; then
11287   samba_cv_HAVE_IFACE_IFCONF=cross
11288 else
11289   cat > conftest.$ac_ext <<EOF
11290 #line 11291 "configure"
11291 #include "confdefs.h"
11292
11293 #define HAVE_IFACE_IFCONF 1
11294 #define AUTOCONF_TEST 1
11295 #include "confdefs.h"
11296 #include "${srcdir-.}/lib/interfaces.c"
11297 EOF
11298 if { (eval echo configure:11299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11299 then
11300   samba_cv_HAVE_IFACE_IFCONF=yes
11301 else
11302   echo "configure: failed program was:" >&5
11303   cat conftest.$ac_ext >&5
11304   rm -fr conftest*
11305   samba_cv_HAVE_IFACE_IFCONF=no
11306 fi
11307 rm -fr conftest*
11308 fi
11309
11310 fi
11311
11312 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
11313 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
11314     iface=yes;cat >> confdefs.h <<\EOF
11315 #define HAVE_IFACE_IFCONF 1
11316 EOF
11317
11318 fi
11319 fi
11320
11321 if test $iface = no; then
11322 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
11323 echo "configure:11324: checking for iface ifreq" >&5
11324 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
11325   echo $ac_n "(cached) $ac_c" 1>&6
11326 else
11327   
11328 if test "$cross_compiling" = yes; then
11329   samba_cv_HAVE_IFACE_IFREQ=cross
11330 else
11331   cat > conftest.$ac_ext <<EOF
11332 #line 11333 "configure"
11333 #include "confdefs.h"
11334
11335 #define HAVE_IFACE_IFREQ 1
11336 #define AUTOCONF_TEST 1
11337 #include "confdefs.h"
11338 #include "${srcdir-.}/lib/interfaces.c"
11339 EOF
11340 if { (eval echo configure:11341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11341 then
11342   samba_cv_HAVE_IFACE_IFREQ=yes
11343 else
11344   echo "configure: failed program was:" >&5
11345   cat conftest.$ac_ext >&5
11346   rm -fr conftest*
11347   samba_cv_HAVE_IFACE_IFREQ=no
11348 fi
11349 rm -fr conftest*
11350 fi
11351
11352 fi
11353
11354 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
11355 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
11356     iface=yes;cat >> confdefs.h <<\EOF
11357 #define HAVE_IFACE_IFREQ 1
11358 EOF
11359
11360 fi
11361 fi
11362
11363
11364 ################################################
11365 # look for a method of setting the effective uid
11366 seteuid=no;
11367 if test $seteuid = no; then
11368 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
11369 echo "configure:11370: checking for setresuid" >&5
11370 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
11371   echo $ac_n "(cached) $ac_c" 1>&6
11372 else
11373   
11374 if test "$cross_compiling" = yes; then
11375   samba_cv_USE_SETRESUID=cross
11376 else
11377   cat > conftest.$ac_ext <<EOF
11378 #line 11379 "configure"
11379 #include "confdefs.h"
11380
11381 #define AUTOCONF_TEST 1
11382 #define USE_SETRESUID 1
11383 #include "confdefs.h"
11384 #include "${srcdir-.}/lib/util_sec.c"
11385 EOF
11386 if { (eval echo configure:11387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11387 then
11388   samba_cv_USE_SETRESUID=yes
11389 else
11390   echo "configure: failed program was:" >&5
11391   cat conftest.$ac_ext >&5
11392   rm -fr conftest*
11393   samba_cv_USE_SETRESUID=no
11394 fi
11395 rm -fr conftest*
11396 fi
11397
11398 fi
11399
11400 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
11401 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
11402     seteuid=yes;cat >> confdefs.h <<\EOF
11403 #define USE_SETRESUID 1
11404 EOF
11405
11406 fi
11407 fi
11408
11409
11410 if test $seteuid = no; then
11411 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
11412 echo "configure:11413: checking for setreuid" >&5
11413 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
11414   echo $ac_n "(cached) $ac_c" 1>&6
11415 else
11416   
11417 if test "$cross_compiling" = yes; then
11418   samba_cv_USE_SETREUID=cross
11419 else
11420   cat > conftest.$ac_ext <<EOF
11421 #line 11422 "configure"
11422 #include "confdefs.h"
11423
11424 #define AUTOCONF_TEST 1
11425 #define USE_SETREUID 1
11426 #include "confdefs.h"
11427 #include "${srcdir-.}/lib/util_sec.c"
11428 EOF
11429 if { (eval echo configure:11430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11430 then
11431   samba_cv_USE_SETREUID=yes
11432 else
11433   echo "configure: failed program was:" >&5
11434   cat conftest.$ac_ext >&5
11435   rm -fr conftest*
11436   samba_cv_USE_SETREUID=no
11437 fi
11438 rm -fr conftest*
11439 fi
11440
11441 fi
11442
11443 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
11444 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
11445     seteuid=yes;cat >> confdefs.h <<\EOF
11446 #define USE_SETREUID 1
11447 EOF
11448
11449 fi
11450 fi
11451
11452 if test $seteuid = no; then
11453 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
11454 echo "configure:11455: checking for seteuid" >&5
11455 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
11456   echo $ac_n "(cached) $ac_c" 1>&6
11457 else
11458   
11459 if test "$cross_compiling" = yes; then
11460   samba_cv_USE_SETEUID=cross
11461 else
11462   cat > conftest.$ac_ext <<EOF
11463 #line 11464 "configure"
11464 #include "confdefs.h"
11465
11466 #define AUTOCONF_TEST 1
11467 #define USE_SETEUID 1
11468 #include "confdefs.h"
11469 #include "${srcdir-.}/lib/util_sec.c"
11470 EOF
11471 if { (eval echo configure:11472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11472 then
11473   samba_cv_USE_SETEUID=yes
11474 else
11475   echo "configure: failed program was:" >&5
11476   cat conftest.$ac_ext >&5
11477   rm -fr conftest*
11478   samba_cv_USE_SETEUID=no
11479 fi
11480 rm -fr conftest*
11481 fi
11482
11483 fi
11484
11485 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
11486 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
11487     seteuid=yes;cat >> confdefs.h <<\EOF
11488 #define USE_SETEUID 1
11489 EOF
11490
11491 fi
11492 fi
11493
11494 if test $seteuid = no; then
11495 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
11496 echo "configure:11497: checking for setuidx" >&5
11497 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
11498   echo $ac_n "(cached) $ac_c" 1>&6
11499 else
11500   
11501 if test "$cross_compiling" = yes; then
11502   samba_cv_USE_SETUIDX=cross
11503 else
11504   cat > conftest.$ac_ext <<EOF
11505 #line 11506 "configure"
11506 #include "confdefs.h"
11507
11508 #define AUTOCONF_TEST 1
11509 #define USE_SETUIDX 1
11510 #include "confdefs.h"
11511 #include "${srcdir-.}/lib/util_sec.c"
11512 EOF
11513 if { (eval echo configure:11514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11514 then
11515   samba_cv_USE_SETUIDX=yes
11516 else
11517   echo "configure: failed program was:" >&5
11518   cat conftest.$ac_ext >&5
11519   rm -fr conftest*
11520   samba_cv_USE_SETUIDX=no
11521 fi
11522 rm -fr conftest*
11523 fi
11524
11525 fi
11526
11527 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11528 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11529     seteuid=yes;cat >> confdefs.h <<\EOF
11530 #define USE_SETUIDX 1
11531 EOF
11532
11533 fi
11534 fi
11535
11536
11537 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11538 echo "configure:11539: checking for working mmap" >&5
11539 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11540   echo $ac_n "(cached) $ac_c" 1>&6
11541 else
11542   
11543 if test "$cross_compiling" = yes; then
11544   samba_cv_HAVE_MMAP=cross
11545 else
11546   cat > conftest.$ac_ext <<EOF
11547 #line 11548 "configure"
11548 #include "confdefs.h"
11549 #include "${srcdir-.}/tests/shared_mmap.c"
11550 EOF
11551 if { (eval echo configure:11552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11552 then
11553   samba_cv_HAVE_MMAP=yes
11554 else
11555   echo "configure: failed program was:" >&5
11556   cat conftest.$ac_ext >&5
11557   rm -fr conftest*
11558   samba_cv_HAVE_MMAP=no
11559 fi
11560 rm -fr conftest*
11561 fi
11562
11563 fi
11564
11565 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11566 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11567     cat >> confdefs.h <<\EOF
11568 #define HAVE_MMAP 1
11569 EOF
11570
11571 fi
11572
11573 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11574 echo "configure:11575: checking for ftruncate needs root" >&5
11575 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11576   echo $ac_n "(cached) $ac_c" 1>&6
11577 else
11578   
11579 if test "$cross_compiling" = yes; then
11580   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11581 else
11582   cat > conftest.$ac_ext <<EOF
11583 #line 11584 "configure"
11584 #include "confdefs.h"
11585 #include "${srcdir-.}/tests/ftruncroot.c"
11586 EOF
11587 if { (eval echo configure:11588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11588 then
11589   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11590 else
11591   echo "configure: failed program was:" >&5
11592   cat conftest.$ac_ext >&5
11593   rm -fr conftest*
11594   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11595 fi
11596 rm -fr conftest*
11597 fi
11598
11599 fi
11600
11601 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11602 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11603     cat >> confdefs.h <<\EOF
11604 #define FTRUNCATE_NEEDS_ROOT 1
11605 EOF
11606
11607 fi
11608
11609 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11610 echo "configure:11611: checking for fcntl locking" >&5
11611 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11612   echo $ac_n "(cached) $ac_c" 1>&6
11613 else
11614   
11615 if test "$cross_compiling" = yes; then
11616   samba_cv_HAVE_FCNTL_LOCK=cross
11617 else
11618   cat > conftest.$ac_ext <<EOF
11619 #line 11620 "configure"
11620 #include "confdefs.h"
11621 #include "${srcdir-.}/tests/fcntl_lock.c"
11622 EOF
11623 if { (eval echo configure:11624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11624 then
11625   samba_cv_HAVE_FCNTL_LOCK=yes
11626 else
11627   echo "configure: failed program was:" >&5
11628   cat conftest.$ac_ext >&5
11629   rm -fr conftest*
11630   samba_cv_HAVE_FCNTL_LOCK=no
11631 fi
11632 rm -fr conftest*
11633 fi
11634
11635 fi
11636
11637 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11638 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11639     cat >> confdefs.h <<\EOF
11640 #define HAVE_FCNTL_LOCK 1
11641 EOF
11642
11643 fi
11644
11645 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11646 echo "configure:11647: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11647 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11648   echo $ac_n "(cached) $ac_c" 1>&6
11649 else
11650   
11651 if test "$cross_compiling" = yes; then
11652   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11653 else
11654   cat > conftest.$ac_ext <<EOF
11655 #line 11656 "configure"
11656 #include "confdefs.h"
11657 #include "${srcdir-.}/tests/fcntl_lock64.c"
11658 EOF
11659 if { (eval echo configure:11660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11660 then
11661   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11662 else
11663   echo "configure: failed program was:" >&5
11664   cat conftest.$ac_ext >&5
11665   rm -fr conftest*
11666   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11667 fi
11668 rm -fr conftest*
11669 fi
11670
11671 fi
11672
11673 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11674 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11675     cat >> confdefs.h <<\EOF
11676 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11677 EOF
11678
11679
11680 else
11681
11682
11683   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11684 echo "configure:11685: checking for 64 bit fcntl locking" >&5
11685 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11686   echo $ac_n "(cached) $ac_c" 1>&6
11687 else
11688   
11689   if test "$cross_compiling" = yes; then
11690   samba_cv_HAVE_STRUCT_FLOCK64=cross
11691 else
11692   cat > conftest.$ac_ext <<EOF
11693 #line 11694 "configure"
11694 #include "confdefs.h"
11695
11696 #if defined(HAVE_UNISTD_H)
11697 #include <unistd.h>
11698 #endif
11699 #include <stdio.h>
11700 #include <stdlib.h>
11701
11702 #ifdef HAVE_FCNTL_H
11703 #include <fcntl.h>
11704 #endif
11705
11706 #ifdef HAVE_SYS_FCNTL_H
11707 #include <sys/fcntl.h>
11708 #endif
11709 main() { struct flock64 fl64;
11710 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11711 exit(0);
11712 #else
11713 exit(1);
11714 #endif
11715 }
11716 EOF
11717 if { (eval echo configure:11718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11718 then
11719   samba_cv_HAVE_STRUCT_FLOCK64=yes
11720 else
11721   echo "configure: failed program was:" >&5
11722   cat conftest.$ac_ext >&5
11723   rm -fr conftest*
11724   samba_cv_HAVE_STRUCT_FLOCK64=no
11725 fi
11726 rm -fr conftest*
11727 fi
11728
11729 fi
11730
11731 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11732
11733   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11734       cat >> confdefs.h <<\EOF
11735 #define HAVE_STRUCT_FLOCK64 1
11736 EOF
11737
11738   fi
11739 fi
11740
11741 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
11742 echo "configure:11743: checking for st_blocks in struct stat" >&5
11743 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then
11744   echo $ac_n "(cached) $ac_c" 1>&6
11745 else
11746   
11747 cat > conftest.$ac_ext <<EOF
11748 #line 11749 "configure"
11749 #include "confdefs.h"
11750 #include <sys/types.h>
11751 #include <sys/stat.h>
11752 #include <unistd.h>
11753 int main() {
11754 struct stat st;  st.st_blocks = 0;
11755 ; return 0; }
11756 EOF
11757 if { (eval echo configure:11758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11758   rm -rf conftest*
11759   samba_cv_HAVE_STAT_ST_BLOCKS=yes
11760 else
11761   echo "configure: failed program was:" >&5
11762   cat conftest.$ac_ext >&5
11763   rm -rf conftest*
11764   samba_cv_HAVE_STAT_ST_BLOCKS=no
11765 fi
11766 rm -f conftest*
11767 fi
11768
11769 echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6
11770 if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
11771     cat >> confdefs.h <<\EOF
11772 #define HAVE_STAT_ST_BLOCKS 1
11773 EOF
11774
11775 fi 
11776
11777 case "$host_os" in
11778 *linux*)
11779 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11780 echo "configure:11781: checking for broken RedHat 7.2 system header files" >&5
11781 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11782   echo $ac_n "(cached) $ac_c" 1>&6
11783 else
11784   
11785 cat > conftest.$ac_ext <<EOF
11786 #line 11787 "configure"
11787 #include "confdefs.h"
11788
11789 #ifdef HAVE_SYS_VFS_H
11790 #include <sys/vfs.h>
11791 #endif
11792 #ifdef HAVE_SYS_CAPABILITY_H
11793 #include <sys/capability.h>
11794 #endif
11795
11796 int main() {
11797 int i;
11798 ; return 0; }
11799 EOF
11800 if { (eval echo configure:11801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11801   rm -rf conftest*
11802   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11803 else
11804   echo "configure: failed program was:" >&5
11805   cat conftest.$ac_ext >&5
11806   rm -rf conftest*
11807   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11808 fi
11809 rm -f conftest*
11810 fi
11811
11812 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11813 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11814    cat >> confdefs.h <<\EOF
11815 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11816 EOF
11817
11818 fi
11819 ;;
11820 esac
11821
11822 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11823 echo "configure:11824: checking for broken nisplus include files" >&5
11824 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11825   echo $ac_n "(cached) $ac_c" 1>&6
11826 else
11827   
11828 cat > conftest.$ac_ext <<EOF
11829 #line 11830 "configure"
11830 #include "confdefs.h"
11831 #include <sys/acl.h>
11832 #if defined(HAVE_RPCSVC_NIS_H)
11833 #include <rpcsvc/nis.h>
11834 #endif
11835 int main() {
11836 int i;
11837 ; return 0; }
11838 EOF
11839 if { (eval echo configure:11840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11840   rm -rf conftest*
11841   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11842 else
11843   echo "configure: failed program was:" >&5
11844   cat conftest.$ac_ext >&5
11845   rm -rf conftest*
11846   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11847 fi
11848 rm -f conftest*
11849 fi
11850
11851 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11852 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11853     cat >> confdefs.h <<\EOF
11854 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11855 EOF
11856
11857 fi
11858
11859
11860 #################################################
11861 # check for smbwrapper support
11862 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11863 echo "configure:11864: checking whether to use smbwrapper" >&5
11864 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11865 if test "${with_smbwrapper+set}" = set; then
11866   withval="$with_smbwrapper"
11867    case "$withval" in
11868   yes)
11869     echo "$ac_t""yes" 1>&6
11870     cat >> confdefs.h <<\EOF
11871 #define WITH_SMBWRAPPER 1
11872 EOF
11873
11874         WRAPPROG="bin/smbsh"
11875         WRAP="bin/smbwrapper.$SHLIBEXT"
11876
11877         if test x$ATTEMPT_WRAP32_BUILD = x; then
11878                 WRAP32=""
11879         else
11880                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11881         fi
11882
11883 # Conditions under which smbwrapper should not be built.
11884
11885         if test x$PICFLAG = x; then
11886            echo No support for PIC code - disabling smbwrapper and smbsh
11887            WRAPPROG=""
11888            WRAP=""
11889            WRAP32=""
11890         elif test x$ac_cv_func_syscall = xno; then
11891            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11892            WRAPPROG=""
11893            WRAP=""
11894            WRAP32=""
11895         fi
11896     ;;
11897   *)
11898     echo "$ac_t""no" 1>&6
11899     ;;
11900   esac 
11901 else
11902   echo "$ac_t""no" 1>&6
11903
11904 fi
11905
11906
11907 #################################################
11908 # check for AFS clear-text auth support
11909 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11910 echo "configure:11911: checking whether to use AFS clear-text auth" >&5
11911 # Check whether --with-afs or --without-afs was given.
11912 if test "${with_afs+set}" = set; then
11913   withval="$with_afs"
11914    case "$withval" in
11915   yes)
11916     echo "$ac_t""yes" 1>&6
11917     cat >> confdefs.h <<\EOF
11918 #define WITH_AFS 1
11919 EOF
11920
11921     ;;
11922   *)
11923     echo "$ac_t""no" 1>&6
11924     ;;
11925   esac 
11926 else
11927   echo "$ac_t""no" 1>&6
11928
11929 fi
11930
11931
11932
11933 #################################################
11934 # check for the DFS clear-text auth system
11935 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11936 echo "configure:11937: checking whether to use DFS clear-text auth" >&5
11937 # Check whether --with-dfs or --without-dfs was given.
11938 if test "${with_dfs+set}" = set; then
11939   withval="$with_dfs"
11940    case "$withval" in
11941   yes)
11942     echo "$ac_t""yes" 1>&6
11943     cat >> confdefs.h <<\EOF
11944 #define WITH_DFS 1
11945 EOF
11946
11947     ;;
11948   *)
11949     echo "$ac_t""no" 1>&6
11950     ;;
11951   esac 
11952 else
11953   echo "$ac_t""no" 1>&6
11954
11955 fi
11956
11957
11958
11959 #################################################
11960 # see if this box has the RedHat location for kerberos
11961 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11962 echo "configure:11963: checking for /usr/kerberos" >&5
11963 if test -d /usr/kerberos; then
11964     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11965     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11966     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11967     echo "$ac_t""yes" 1>&6
11968 else
11969     echo "$ac_t""no" 1>&6
11970 fi
11971
11972 #################################################
11973 # check for location of Kerberos 5 install
11974 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11975 echo "configure:11976: checking for kerberos 5 install path" >&5
11976 # Check whether --with-krb5 or --without-krb5 was given.
11977 if test "${with_krb5+set}" = set; then
11978   withval="$with_krb5"
11979    case "$withval" in
11980   no)
11981     echo "$ac_t""no" 1>&6
11982     ;;
11983   *)
11984     echo "$ac_t""yes" 1>&6
11985     LIBS="$LIBS -lkrb5"
11986     CFLAGS="$CFLAGS -I$withval/include"
11987     CPPFLAGS="$CPPFLAGS -I$withval/include"
11988     LDFLAGS="$LDFLAGS -L$withval/lib"
11989     ;;
11990   esac 
11991 else
11992   echo "$ac_t""no" 1>&6
11993
11994 fi
11995
11996
11997 # now check for krb5.h. Some systems have the libraries without the headers!
11998 # note that this check is done here to allow for different kerberos
11999 # include paths
12000 for ac_hdr in krb5.h
12001 do
12002 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12003 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12004 echo "configure:12005: checking for $ac_hdr" >&5
12005 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12006   echo $ac_n "(cached) $ac_c" 1>&6
12007 else
12008   cat > conftest.$ac_ext <<EOF
12009 #line 12010 "configure"
12010 #include "confdefs.h"
12011 #include <$ac_hdr>
12012 EOF
12013 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12014 { (eval echo configure:12015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12015 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12016 if test -z "$ac_err"; then
12017   rm -rf conftest*
12018   eval "ac_cv_header_$ac_safe=yes"
12019 else
12020   echo "$ac_err" >&5
12021   echo "configure: failed program was:" >&5
12022   cat conftest.$ac_ext >&5
12023   rm -rf conftest*
12024   eval "ac_cv_header_$ac_safe=no"
12025 fi
12026 rm -f conftest*
12027 fi
12028 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12029   echo "$ac_t""yes" 1>&6
12030     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12031   cat >> confdefs.h <<EOF
12032 #define $ac_tr_hdr 1
12033 EOF
12034  
12035 else
12036   echo "$ac_t""no" 1>&6
12037 fi
12038 done
12039
12040
12041 # now check for gssapi headers.  This is also done here to allow for
12042 # different kerberos include paths
12043 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
12044 do
12045 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12046 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12047 echo "configure:12048: checking for $ac_hdr" >&5
12048 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12049   echo $ac_n "(cached) $ac_c" 1>&6
12050 else
12051   cat > conftest.$ac_ext <<EOF
12052 #line 12053 "configure"
12053 #include "confdefs.h"
12054 #include <$ac_hdr>
12055 EOF
12056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12057 { (eval echo configure:12058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12059 if test -z "$ac_err"; then
12060   rm -rf conftest*
12061   eval "ac_cv_header_$ac_safe=yes"
12062 else
12063   echo "$ac_err" >&5
12064   echo "configure: failed program was:" >&5
12065   cat conftest.$ac_ext >&5
12066   rm -rf conftest*
12067   eval "ac_cv_header_$ac_safe=no"
12068 fi
12069 rm -f conftest*
12070 fi
12071 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12072   echo "$ac_t""yes" 1>&6
12073     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12074   cat >> confdefs.h <<EOF
12075 #define $ac_tr_hdr 1
12076 EOF
12077  
12078 else
12079   echo "$ac_t""no" 1>&6
12080 fi
12081 done
12082
12083
12084 ##################################################################
12085 # we might need the k5crypto and com_err libraries on some systems
12086 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
12087 echo "configure:12088: checking for _et_list in -lcom_err" >&5
12088 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
12089 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12090   echo $ac_n "(cached) $ac_c" 1>&6
12091 else
12092   ac_save_LIBS="$LIBS"
12093 LIBS="-lcom_err  $LIBS"
12094 cat > conftest.$ac_ext <<EOF
12095 #line 12096 "configure"
12096 #include "confdefs.h"
12097 /* Override any gcc2 internal prototype to avoid an error.  */
12098 /* We use char because int might match the return type of a gcc2
12099     builtin and then its argument prototype would still apply.  */
12100 char _et_list();
12101
12102 int main() {
12103 _et_list()
12104 ; return 0; }
12105 EOF
12106 if { (eval echo configure:12107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12107   rm -rf conftest*
12108   eval "ac_cv_lib_$ac_lib_var=yes"
12109 else
12110   echo "configure: failed program was:" >&5
12111   cat conftest.$ac_ext >&5
12112   rm -rf conftest*
12113   eval "ac_cv_lib_$ac_lib_var=no"
12114 fi
12115 rm -f conftest*
12116 LIBS="$ac_save_LIBS"
12117
12118 fi
12119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12120   echo "$ac_t""yes" 1>&6
12121   LIBS="$LIBS -lcom_err"
12122 else
12123   echo "$ac_t""no" 1>&6
12124 fi
12125
12126 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
12127 echo "configure:12128: checking for krb5_encrypt_data in -lk5crypto" >&5
12128 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
12129 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12130   echo $ac_n "(cached) $ac_c" 1>&6
12131 else
12132   ac_save_LIBS="$LIBS"
12133 LIBS="-lk5crypto  $LIBS"
12134 cat > conftest.$ac_ext <<EOF
12135 #line 12136 "configure"
12136 #include "confdefs.h"
12137 /* Override any gcc2 internal prototype to avoid an error.  */
12138 /* We use char because int might match the return type of a gcc2
12139     builtin and then its argument prototype would still apply.  */
12140 char krb5_encrypt_data();
12141
12142 int main() {
12143 krb5_encrypt_data()
12144 ; return 0; }
12145 EOF
12146 if { (eval echo configure:12147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12147   rm -rf conftest*
12148   eval "ac_cv_lib_$ac_lib_var=yes"
12149 else
12150   echo "configure: failed program was:" >&5
12151   cat conftest.$ac_ext >&5
12152   rm -rf conftest*
12153   eval "ac_cv_lib_$ac_lib_var=no"
12154 fi
12155 rm -f conftest*
12156 LIBS="$ac_save_LIBS"
12157
12158 fi
12159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12160   echo "$ac_t""yes" 1>&6
12161   LIBS="$LIBS -lk5crypto"
12162 else
12163   echo "$ac_t""no" 1>&6
12164 fi
12165
12166
12167 ########################################################
12168 # now see if we can find the krb5 libs in standard paths
12169 # or as specified above
12170 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
12171 echo "configure:12172: checking for krb5_mk_req_extended in -lkrb5" >&5
12172 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
12173 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12174   echo $ac_n "(cached) $ac_c" 1>&6
12175 else
12176   ac_save_LIBS="$LIBS"
12177 LIBS="-lkrb5  $LIBS"
12178 cat > conftest.$ac_ext <<EOF
12179 #line 12180 "configure"
12180 #include "confdefs.h"
12181 /* Override any gcc2 internal prototype to avoid an error.  */
12182 /* We use char because int might match the return type of a gcc2
12183     builtin and then its argument prototype would still apply.  */
12184 char krb5_mk_req_extended();
12185
12186 int main() {
12187 krb5_mk_req_extended()
12188 ; return 0; }
12189 EOF
12190 if { (eval echo configure:12191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12191   rm -rf conftest*
12192   eval "ac_cv_lib_$ac_lib_var=yes"
12193 else
12194   echo "configure: failed program was:" >&5
12195   cat conftest.$ac_ext >&5
12196   rm -rf conftest*
12197   eval "ac_cv_lib_$ac_lib_var=no"
12198 fi
12199 rm -f conftest*
12200 LIBS="$ac_save_LIBS"
12201
12202 fi
12203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12204   echo "$ac_t""yes" 1>&6
12205   LIBS="$LIBS -lkrb5";
12206         cat >> confdefs.h <<\EOF
12207 #define HAVE_KRB5 1
12208 EOF
12209
12210 else
12211   echo "$ac_t""no" 1>&6
12212 fi
12213
12214
12215 ########################################################
12216 # now see if we can find the gssapi libs in standard paths
12217 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
12218 echo "configure:12219: checking for gss_display_status in -lgssapi_krb5" >&5
12219 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
12220 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12221   echo $ac_n "(cached) $ac_c" 1>&6
12222 else
12223   ac_save_LIBS="$LIBS"
12224 LIBS="-lgssapi_krb5  $LIBS"
12225 cat > conftest.$ac_ext <<EOF
12226 #line 12227 "configure"
12227 #include "confdefs.h"
12228 /* Override any gcc2 internal prototype to avoid an error.  */
12229 /* We use char because int might match the return type of a gcc2
12230     builtin and then its argument prototype would still apply.  */
12231 char gss_display_status();
12232
12233 int main() {
12234 gss_display_status()
12235 ; return 0; }
12236 EOF
12237 if { (eval echo configure:12238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12238   rm -rf conftest*
12239   eval "ac_cv_lib_$ac_lib_var=yes"
12240 else
12241   echo "configure: failed program was:" >&5
12242   cat conftest.$ac_ext >&5
12243   rm -rf conftest*
12244   eval "ac_cv_lib_$ac_lib_var=no"
12245 fi
12246 rm -f conftest*
12247 LIBS="$ac_save_LIBS"
12248
12249 fi
12250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12251   echo "$ac_t""yes" 1>&6
12252   LIBS="$LIBS -lgssapi_krb5";
12253         cat >> confdefs.h <<\EOF
12254 #define HAVE_GSSAPI 1
12255 EOF
12256
12257 else
12258   echo "$ac_t""no" 1>&6
12259 fi
12260
12261
12262 ##################################################################
12263 # we might need the lber lib on some systems. To avoid link errors
12264 # this test must be before the libldap test
12265 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
12266 echo "configure:12267: checking for ber_scanf in -llber" >&5
12267 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
12268 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12269   echo $ac_n "(cached) $ac_c" 1>&6
12270 else
12271   ac_save_LIBS="$LIBS"
12272 LIBS="-llber  $LIBS"
12273 cat > conftest.$ac_ext <<EOF
12274 #line 12275 "configure"
12275 #include "confdefs.h"
12276 /* Override any gcc2 internal prototype to avoid an error.  */
12277 /* We use char because int might match the return type of a gcc2
12278     builtin and then its argument prototype would still apply.  */
12279 char ber_scanf();
12280
12281 int main() {
12282 ber_scanf()
12283 ; return 0; }
12284 EOF
12285 if { (eval echo configure:12286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12286   rm -rf conftest*
12287   eval "ac_cv_lib_$ac_lib_var=yes"
12288 else
12289   echo "configure: failed program was:" >&5
12290   cat conftest.$ac_ext >&5
12291   rm -rf conftest*
12292   eval "ac_cv_lib_$ac_lib_var=no"
12293 fi
12294 rm -f conftest*
12295 LIBS="$ac_save_LIBS"
12296
12297 fi
12298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12299   echo "$ac_t""yes" 1>&6
12300   LIBS="$LIBS -llber"
12301 else
12302   echo "$ac_t""no" 1>&6
12303 fi
12304
12305
12306 ########################################################
12307 # now see if we can find the ldap libs in standard paths
12308 if test x$have_ldap != xyes; then
12309 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
12310 echo "configure:12311: checking for ldap_domain2hostlist in -lldap" >&5
12311 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
12312 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12313   echo $ac_n "(cached) $ac_c" 1>&6
12314 else
12315   ac_save_LIBS="$LIBS"
12316 LIBS="-lldap  $LIBS"
12317 cat > conftest.$ac_ext <<EOF
12318 #line 12319 "configure"
12319 #include "confdefs.h"
12320 /* Override any gcc2 internal prototype to avoid an error.  */
12321 /* We use char because int might match the return type of a gcc2
12322     builtin and then its argument prototype would still apply.  */
12323 char ldap_domain2hostlist();
12324
12325 int main() {
12326 ldap_domain2hostlist()
12327 ; return 0; }
12328 EOF
12329 if { (eval echo configure:12330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12330   rm -rf conftest*
12331   eval "ac_cv_lib_$ac_lib_var=yes"
12332 else
12333   echo "configure: failed program was:" >&5
12334   cat conftest.$ac_ext >&5
12335   rm -rf conftest*
12336   eval "ac_cv_lib_$ac_lib_var=no"
12337 fi
12338 rm -f conftest*
12339 LIBS="$ac_save_LIBS"
12340
12341 fi
12342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12343   echo "$ac_t""yes" 1>&6
12344   LIBS="$LIBS -lldap";
12345         cat >> confdefs.h <<\EOF
12346 #define HAVE_LDAP 1
12347 EOF
12348
12349 else
12350   echo "$ac_t""no" 1>&6
12351 fi
12352
12353
12354         ########################################################
12355         # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?
12356         # Check found in pam_ldap 145.
12357         for ac_func in ldap_set_rebind_proc
12358 do
12359 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12360 echo "configure:12361: checking for $ac_func" >&5
12361 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12362   echo $ac_n "(cached) $ac_c" 1>&6
12363 else
12364   cat > conftest.$ac_ext <<EOF
12365 #line 12366 "configure"
12366 #include "confdefs.h"
12367 /* System header to define __stub macros and hopefully few prototypes,
12368     which can conflict with char $ac_func(); below.  */
12369 #include <assert.h>
12370 /* Override any gcc2 internal prototype to avoid an error.  */
12371 /* We use char because int might match the return type of a gcc2
12372     builtin and then its argument prototype would still apply.  */
12373 char $ac_func();
12374
12375 int main() {
12376
12377 /* The GNU C library defines this for functions which it implements
12378     to always fail with ENOSYS.  Some functions are actually named
12379     something starting with __ and the normal name is an alias.  */
12380 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12381 choke me
12382 #else
12383 $ac_func();
12384 #endif
12385
12386 ; return 0; }
12387 EOF
12388 if { (eval echo configure:12389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12389   rm -rf conftest*
12390   eval "ac_cv_func_$ac_func=yes"
12391 else
12392   echo "configure: failed program was:" >&5
12393   cat conftest.$ac_ext >&5
12394   rm -rf conftest*
12395   eval "ac_cv_func_$ac_func=no"
12396 fi
12397 rm -f conftest*
12398 fi
12399
12400 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12401   echo "$ac_t""yes" 1>&6
12402     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12403   cat >> confdefs.h <<EOF
12404 #define $ac_tr_func 1
12405 EOF
12406  
12407 else
12408   echo "$ac_t""no" 1>&6
12409 fi
12410 done
12411
12412         echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6
12413 echo "configure:12414: checking whether ldap_set_rebind_proc takes 3 arguments" >&5
12414 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then
12415   echo $ac_n "(cached) $ac_c" 1>&6
12416 else
12417   
12418         cat > conftest.$ac_ext <<EOF
12419 #line 12420 "configure"
12420 #include "confdefs.h"
12421
12422         #include <lber.h>
12423         #include <ldap.h>
12424 int main() {
12425 ldap_set_rebind_proc(0, 0, 0);
12426 ; return 0; }
12427 EOF
12428 if { (eval echo configure:12429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12429   rm -rf conftest*
12430   pam_ldap_cv_ldap_set_rebind_proc=3
12431 else
12432   echo "configure: failed program was:" >&5
12433   cat conftest.$ac_ext >&5
12434   rm -rf conftest*
12435   pam_ldap_cv_ldap_set_rebind_proc=2
12436 fi
12437 rm -f conftest* 
12438 fi
12439
12440 echo "$ac_t""$pam_ldap_cv_ldap_set_rebind_proc" 1>&6
12441         cat >> confdefs.h <<EOF
12442 #define LDAP_SET_REBIND_PROC_ARGS $pam_ldap_cv_ldap_set_rebind_proc
12443 EOF
12444
12445 fi
12446
12447 #################################################
12448 # check for automount support
12449 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
12450 echo "configure:12451: checking whether to use AUTOMOUNT" >&5
12451 # Check whether --with-automount or --without-automount was given.
12452 if test "${with_automount+set}" = set; then
12453   withval="$with_automount"
12454    case "$withval" in
12455   yes)
12456     echo "$ac_t""yes" 1>&6
12457     cat >> confdefs.h <<\EOF
12458 #define WITH_AUTOMOUNT 1
12459 EOF
12460
12461     ;;
12462   *)
12463     echo "$ac_t""no" 1>&6
12464     ;;
12465   esac 
12466 else
12467   echo "$ac_t""no" 1>&6
12468
12469 fi
12470
12471
12472 #################################################
12473 # check for smbmount support
12474 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
12475 echo "configure:12476: checking whether to use SMBMOUNT" >&5
12476 # Check whether --with-smbmount or --without-smbmount was given.
12477 if test "${with_smbmount+set}" = set; then
12478   withval="$with_smbmount"
12479    case "$withval" in
12480   yes)
12481         case "$host_os" in
12482         *linux*)
12483                 echo "$ac_t""yes" 1>&6
12484                 cat >> confdefs.h <<\EOF
12485 #define WITH_SMBMOUNT 1
12486 EOF
12487
12488                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
12489                 ;;
12490         *)
12491                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
12492                 ;;
12493         esac
12494     ;;
12495   *)
12496     echo "$ac_t""no" 1>&6
12497     MPROGS=
12498     ;;
12499   esac 
12500 else
12501   echo "$ac_t""no" 1>&6
12502   MPROGS=
12503
12504 fi
12505
12506
12507
12508 #################################################
12509 # check for a PAM clear-text auth, accounts, password and session support
12510 with_pam_for_crypt=no
12511 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
12512 echo "configure:12513: checking whether to use PAM" >&5
12513 # Check whether --with-pam or --without-pam was given.
12514 if test "${with_pam+set}" = set; then
12515   withval="$with_pam"
12516    case "$withval" in
12517   yes)
12518     echo "$ac_t""yes" 1>&6
12519     cat >> confdefs.h <<\EOF
12520 #define WITH_PAM 1
12521 EOF
12522
12523     LIBS="$LIBS -lpam"
12524     with_pam_for_crypt=yes
12525     ;;
12526   *)
12527     echo "$ac_t""no" 1>&6
12528     ;;
12529   esac 
12530 else
12531   echo "$ac_t""no" 1>&6
12532
12533 fi
12534
12535
12536 # we can't build a pam module if we don't have pam.
12537 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
12538 echo "configure:12539: checking for pam_get_data in -lpam" >&5
12539 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
12540 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12541   echo $ac_n "(cached) $ac_c" 1>&6
12542 else
12543   ac_save_LIBS="$LIBS"
12544 LIBS="-lpam  $LIBS"
12545 cat > conftest.$ac_ext <<EOF
12546 #line 12547 "configure"
12547 #include "confdefs.h"
12548 /* Override any gcc2 internal prototype to avoid an error.  */
12549 /* We use char because int might match the return type of a gcc2
12550     builtin and then its argument prototype would still apply.  */
12551 char pam_get_data();
12552
12553 int main() {
12554 pam_get_data()
12555 ; return 0; }
12556 EOF
12557 if { (eval echo configure:12558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12558   rm -rf conftest*
12559   eval "ac_cv_lib_$ac_lib_var=yes"
12560 else
12561   echo "configure: failed program was:" >&5
12562   cat conftest.$ac_ext >&5
12563   rm -rf conftest*
12564   eval "ac_cv_lib_$ac_lib_var=no"
12565 fi
12566 rm -f conftest*
12567 LIBS="$ac_save_LIBS"
12568
12569 fi
12570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12571   echo "$ac_t""yes" 1>&6
12572   cat >> confdefs.h <<\EOF
12573 #define HAVE_LIBPAM 1
12574 EOF
12575
12576 else
12577   echo "$ac_t""no" 1>&6
12578 fi
12579
12580
12581 #################################################
12582 # check for pam_smbpass support
12583 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
12584 echo "configure:12585: checking whether to use pam_smbpass" >&5
12585 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
12586 if test "${with_pam_smbpass+set}" = set; then
12587   withval="$with_pam_smbpass"
12588    case "$withval" in
12589   yes)
12590     echo "$ac_t""yes" 1>&6
12591
12592 # Conditions under which pam_smbpass should not be built.
12593
12594        if test x$PICFLAG = x; then
12595           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
12596           PAM_MOD=""
12597        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
12598           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
12599           PAM_MOD=""
12600        else
12601           PAM_MOD="bin/pam_smbpass.so"
12602        fi
12603     ;;
12604   *)
12605     echo "$ac_t""no" 1>&6
12606     ;;
12607   esac 
12608 else
12609   echo "$ac_t""no" 1>&6
12610
12611 fi
12612
12613
12614
12615 ###############################################
12616 # test for where we get crypt() from, but only
12617 # if not using PAM
12618 if test $with_pam_for_crypt = no; then
12619 for ac_func in crypt
12620 do
12621 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12622 echo "configure:12623: checking for $ac_func" >&5
12623 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12624   echo $ac_n "(cached) $ac_c" 1>&6
12625 else
12626   cat > conftest.$ac_ext <<EOF
12627 #line 12628 "configure"
12628 #include "confdefs.h"
12629 /* System header to define __stub macros and hopefully few prototypes,
12630     which can conflict with char $ac_func(); below.  */
12631 #include <assert.h>
12632 /* Override any gcc2 internal prototype to avoid an error.  */
12633 /* We use char because int might match the return type of a gcc2
12634     builtin and then its argument prototype would still apply.  */
12635 char $ac_func();
12636
12637 int main() {
12638
12639 /* The GNU C library defines this for functions which it implements
12640     to always fail with ENOSYS.  Some functions are actually named
12641     something starting with __ and the normal name is an alias.  */
12642 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12643 choke me
12644 #else
12645 $ac_func();
12646 #endif
12647
12648 ; return 0; }
12649 EOF
12650 if { (eval echo configure:12651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12651   rm -rf conftest*
12652   eval "ac_cv_func_$ac_func=yes"
12653 else
12654   echo "configure: failed program was:" >&5
12655   cat conftest.$ac_ext >&5
12656   rm -rf conftest*
12657   eval "ac_cv_func_$ac_func=no"
12658 fi
12659 rm -f conftest*
12660 fi
12661
12662 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12663   echo "$ac_t""yes" 1>&6
12664     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12665   cat >> confdefs.h <<EOF
12666 #define $ac_tr_func 1
12667 EOF
12668  
12669 else
12670   echo "$ac_t""no" 1>&6
12671 fi
12672 done
12673
12674 if test x"$ac_cv_func_crypt" = x"no"; then
12675     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12676 echo "configure:12677: checking for crypt in -lcrypt" >&5
12677 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12678 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12679   echo $ac_n "(cached) $ac_c" 1>&6
12680 else
12681   ac_save_LIBS="$LIBS"
12682 LIBS="-lcrypt  $LIBS"
12683 cat > conftest.$ac_ext <<EOF
12684 #line 12685 "configure"
12685 #include "confdefs.h"
12686 /* Override any gcc2 internal prototype to avoid an error.  */
12687 /* We use char because int might match the return type of a gcc2
12688     builtin and then its argument prototype would still apply.  */
12689 char crypt();
12690
12691 int main() {
12692 crypt()
12693 ; return 0; }
12694 EOF
12695 if { (eval echo configure:12696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12696   rm -rf conftest*
12697   eval "ac_cv_lib_$ac_lib_var=yes"
12698 else
12699   echo "configure: failed program was:" >&5
12700   cat conftest.$ac_ext >&5
12701   rm -rf conftest*
12702   eval "ac_cv_lib_$ac_lib_var=no"
12703 fi
12704 rm -f conftest*
12705 LIBS="$ac_save_LIBS"
12706
12707 fi
12708 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12709   echo "$ac_t""yes" 1>&6
12710   LIBS="$LIBS -lcrypt";
12711         cat >> confdefs.h <<\EOF
12712 #define HAVE_CRYPT 1
12713 EOF
12714
12715 else
12716   echo "$ac_t""no" 1>&6
12717 fi
12718
12719 fi
12720 fi
12721
12722 ##
12723 ## moved after the check for -lcrypt in order to
12724 ## ensure that the necessary libraries are included
12725 ## check checking for truncated salt.  Wrapped by the
12726 ## $with_pam_for_crypt variable as above   --jerry
12727 ##
12728 if test $with_pam_for_crypt = no; then
12729 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12730 echo "configure:12731: checking for a crypt that needs truncated salt" >&5
12731 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12732   echo $ac_n "(cached) $ac_c" 1>&6
12733 else
12734   
12735 if test "$cross_compiling" = yes; then
12736   samba_cv_HAVE_TRUNCATED_SALT=cross
12737 else
12738   cat > conftest.$ac_ext <<EOF
12739 #line 12740 "configure"
12740 #include "confdefs.h"
12741 #include "${srcdir-.}/tests/crypttest.c"
12742 EOF
12743 if { (eval echo configure:12744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12744 then
12745   samba_cv_HAVE_TRUNCATED_SALT=no
12746 else
12747   echo "configure: failed program was:" >&5
12748   cat conftest.$ac_ext >&5
12749   rm -fr conftest*
12750   samba_cv_HAVE_TRUNCATED_SALT=yes
12751 fi
12752 rm -fr conftest*
12753 fi
12754
12755 fi
12756
12757 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12758 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12759         cat >> confdefs.h <<\EOF
12760 #define HAVE_TRUNCATED_SALT 1
12761 EOF
12762
12763 fi
12764 fi
12765
12766
12767
12768 ########################################################################################
12769 ##
12770 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12771 ##
12772 ########################################################################################
12773
12774 #################################################
12775 # check for a TDB password database
12776 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12777 echo "configure:12778: checking whether to use TDB SAM database" >&5
12778 # Check whether --with-tdbsam or --without-tdbsam was given.
12779 if test "${with_tdbsam+set}" = set; then
12780   withval="$with_tdbsam"
12781    case "$withval" in
12782   yes)
12783     echo "$ac_t""yes" 1>&6
12784     cat >> confdefs.h <<\EOF
12785 #define WITH_TDB_SAM 1
12786 EOF
12787
12788     ;;
12789   *)
12790     echo "$ac_t""no" 1>&6
12791     ;;
12792   esac 
12793 else
12794   echo "$ac_t""no" 1>&6
12795
12796 fi
12797
12798
12799 #################################################
12800 # check for a NISPLUS password database
12801 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12802 echo "configure:12803: checking whether to use NISPLUS SAM database" >&5
12803 # Check whether --with-nisplussam or --without-nisplussam was given.
12804 if test "${with_nisplussam+set}" = set; then
12805   withval="$with_nisplussam"
12806    case "$withval" in
12807   yes)
12808     echo "$ac_t""yes" 1>&6
12809     cat >> confdefs.h <<\EOF
12810 #define WITH_NISPLUS_SAM 1
12811 EOF
12812
12813     ;;
12814   *)
12815     echo "$ac_t""no" 1>&6
12816     ;;
12817   esac 
12818 else
12819   echo "$ac_t""no" 1>&6
12820
12821 fi
12822
12823
12824 ########################################################################################
12825 ##
12826 ## END OF TESTS FOR SAM BACKENDS.  
12827 ##
12828 ########################################################################################
12829
12830 #################################################
12831 # check for a NISPLUS_HOME support 
12832 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12833 echo "configure:12834: checking whether to use NISPLUS_HOME" >&5
12834 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12835 if test "${with_nisplus_home+set}" = set; then
12836   withval="$with_nisplus_home"
12837    case "$withval" in
12838   yes)
12839     echo "$ac_t""yes" 1>&6
12840     cat >> confdefs.h <<\EOF
12841 #define WITH_NISPLUS_HOME 1
12842 EOF
12843
12844     ;;
12845   *)
12846     echo "$ac_t""no" 1>&6
12847     ;;
12848   esac 
12849 else
12850   echo "$ac_t""no" 1>&6
12851
12852 fi
12853
12854
12855 #################################################
12856 # check for syslog logging
12857 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12858 echo "configure:12859: checking whether to use syslog logging" >&5
12859 # Check whether --with-syslog or --without-syslog was given.
12860 if test "${with_syslog+set}" = set; then
12861   withval="$with_syslog"
12862    case "$withval" in
12863   yes)
12864     echo "$ac_t""yes" 1>&6
12865     cat >> confdefs.h <<\EOF
12866 #define WITH_SYSLOG 1
12867 EOF
12868
12869     ;;
12870   *)
12871     echo "$ac_t""no" 1>&6
12872     ;;
12873   esac 
12874 else
12875   echo "$ac_t""no" 1>&6
12876
12877 fi
12878
12879
12880 #################################################
12881 # check for a shared memory profiling support
12882 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12883 echo "configure:12884: checking whether to use profiling" >&5
12884 # Check whether --with-profiling-data or --without-profiling-data was given.
12885 if test "${with_profiling_data+set}" = set; then
12886   withval="$with_profiling_data"
12887    case "$withval" in
12888   yes)
12889     echo "$ac_t""yes" 1>&6
12890     cat >> confdefs.h <<\EOF
12891 #define WITH_PROFILE 1
12892 EOF
12893
12894     ;;
12895   *)
12896     echo "$ac_t""no" 1>&6
12897     ;;
12898   esac 
12899 else
12900   echo "$ac_t""no" 1>&6
12901
12902 fi
12903
12904
12905
12906 #################################################
12907 # check for experimental disk-quotas support
12908 QUOTAOBJS=smbd/noquotas.o
12909
12910 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12911 echo "configure:12912: checking whether to support disk-quotas" >&5
12912 # Check whether --with-quotas or --without-quotas was given.
12913 if test "${with_quotas+set}" = set; then
12914   withval="$with_quotas"
12915    case "$withval" in
12916   yes)
12917     echo "$ac_t""yes" 1>&6
12918     case "$host_os" in
12919       *linux*)
12920         # Check for kernel 2.4.x quota braindamage...
12921         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12922 echo "configure:12923: checking for linux 2.4.x quota braindamage.." >&5
12923 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12924   echo $ac_n "(cached) $ac_c" 1>&6
12925 else
12926   
12927         cat > conftest.$ac_ext <<EOF
12928 #line 12929 "configure"
12929 #include "confdefs.h"
12930 #include <stdio.h>
12931 #include <sys/types.h>
12932 #include <asm/types.h>
12933 #include <linux/quota.h>
12934 #include <mntent.h>
12935 #include <linux/unistd.h>
12936 int main() {
12937 struct mem_dqblk D;
12938 ; return 0; }
12939 EOF
12940 if { (eval echo configure:12941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12941   rm -rf conftest*
12942   samba_cv_linux_2_4_quota_braindamage=yes
12943 else
12944   echo "configure: failed program was:" >&5
12945   cat conftest.$ac_ext >&5
12946   rm -rf conftest*
12947   samba_cv_linux_2_4_quota_braindamage=no
12948 fi
12949 rm -f conftest*
12950 fi
12951
12952 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12953 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12954         cat >> confdefs.h <<\EOF
12955 #define LINUX_QUOTAS_2 1
12956 EOF
12957
12958 else
12959         cat >> confdefs.h <<\EOF
12960 #define LINUX_QUOTAS_1 1
12961 EOF
12962
12963 fi
12964         ;;
12965       *)
12966         ;;
12967     esac
12968     QUOTAOBJS=smbd/quotas.o
12969     cat >> confdefs.h <<\EOF
12970 #define WITH_QUOTAS 1
12971 EOF
12972
12973     ;;
12974   *)
12975     echo "$ac_t""no" 1>&6
12976     ;;
12977   esac 
12978 else
12979   echo "$ac_t""no" 1>&6
12980
12981 fi
12982
12983
12984
12985 #################################################
12986 # check for experimental utmp accounting
12987
12988 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12989 echo "configure:12990: checking whether to support utmp accounting" >&5
12990 # Check whether --with-utmp or --without-utmp was given.
12991 if test "${with_utmp+set}" = set; then
12992   withval="$with_utmp"
12993    case "$withval" in
12994   yes)
12995     echo "$ac_t""yes" 1>&6
12996     cat >> confdefs.h <<\EOF
12997 #define WITH_UTMP 1
12998 EOF
12999
13000     ;;
13001   *)
13002     echo "$ac_t""no" 1>&6
13003     ;;
13004   esac 
13005 else
13006   echo "$ac_t""no" 1>&6
13007
13008 fi
13009
13010
13011 #################################################
13012 # choose native language(s) of man pages
13013 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
13014 echo "configure:13015: checking chosen man pages' language(s)" >&5
13015 # Check whether --with-manpages-langs or --without-manpages-langs was given.
13016 if test "${with_manpages_langs+set}" = set; then
13017   withval="$with_manpages_langs"
13018    case "$withval" in
13019   yes|no)
13020     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
13021     manlangs="en"
13022   ;;
13023   *)
13024     manlangs="$withval"
13025   ;;
13026   esac
13027
13028   echo "$ac_t""$manlangs" 1>&6
13029   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
13030   
13031 else
13032   manlangs="en"
13033   echo "$ac_t""$manlangs" 1>&6
13034   
13035
13036 fi
13037
13038
13039 #################################################
13040 # should we build libsmbclient?
13041
13042 LIBSMBCLIENT_SHARED=
13043 LIBSMBCLIENT=
13044 echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6
13045 echo "configure:13046: checking whether to build the libsmbclient shared library" >&5
13046 # Check whether --with-libsmbclient or --without-libsmbclient was given.
13047 if test "${with_libsmbclient+set}" = set; then
13048   withval="$with_libsmbclient"
13049    case "$withval" in
13050   no) 
13051      echo "$ac_t""no" 1>&6
13052      ;;
13053   *)
13054      if test $BLDSHARED = true; then
13055         LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
13056         LIBSMBCLIENT=libsmbclient
13057         echo "$ac_t""yes" 1>&6
13058      else
13059         echo "$ac_t""no shared library support" 1>&6
13060      fi
13061      ;;
13062   esac 
13063 else
13064   echo "$ac_t""yes" 1>&6
13065
13066 fi
13067
13068
13069
13070 #################################################
13071 # these tests are taken from the GNU fileutils package
13072 echo "checking how to get filesystem space usage" 1>&6
13073 echo "configure:13074: checking how to get filesystem space usage" >&5
13074 space=no
13075
13076 # Test for statvfs64.
13077 if test $space = no; then
13078   # SVR4
13079   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
13080 echo "configure:13081: checking statvfs64 function (SVR4)" >&5
13081 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
13082   echo $ac_n "(cached) $ac_c" 1>&6
13083 else
13084   if test "$cross_compiling" = yes; then
13085   fu_cv_sys_stat_statvfs64=cross
13086 else
13087   cat > conftest.$ac_ext <<EOF
13088 #line 13089 "configure"
13089 #include "confdefs.h"
13090
13091 #if defined(HAVE_UNISTD_H)
13092 #include <unistd.h>
13093 #endif
13094 #include <sys/types.h>
13095 #include <sys/statvfs.h>
13096   main ()
13097   {
13098     struct statvfs64 fsd;
13099     exit (statvfs64 (".", &fsd));
13100   }
13101 EOF
13102 if { (eval echo configure:13103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13103 then
13104   fu_cv_sys_stat_statvfs64=yes
13105 else
13106   echo "configure: failed program was:" >&5
13107   cat conftest.$ac_ext >&5
13108   rm -fr conftest*
13109   fu_cv_sys_stat_statvfs64=no
13110 fi
13111 rm -fr conftest*
13112 fi
13113
13114 fi
13115
13116 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
13117   if test $fu_cv_sys_stat_statvfs64 = yes; then
13118     space=yes
13119     cat >> confdefs.h <<\EOF
13120 #define STAT_STATVFS64 1
13121 EOF
13122
13123   fi
13124 fi
13125
13126 # Perform only the link test since it seems there are no variants of the
13127 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
13128 # because that got a false positive on SCO OSR5.  Adding the declaration
13129 # of a `struct statvfs' causes this test to fail (as it should) on such
13130 # systems.  That system is reported to work fine with STAT_STATFS4 which
13131 # is what it gets when this test fails.
13132 if test $space = no; then
13133   # SVR4
13134   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
13135 echo "configure:13136: checking statvfs function (SVR4)" >&5
13136 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
13137   echo $ac_n "(cached) $ac_c" 1>&6
13138 else
13139   cat > conftest.$ac_ext <<EOF
13140 #line 13141 "configure"
13141 #include "confdefs.h"
13142 #include <sys/types.h>
13143 #include <sys/statvfs.h>
13144 int main() {
13145 struct statvfs fsd; statvfs (0, &fsd);
13146 ; return 0; }
13147 EOF
13148 if { (eval echo configure:13149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13149   rm -rf conftest*
13150   fu_cv_sys_stat_statvfs=yes
13151 else
13152   echo "configure: failed program was:" >&5
13153   cat conftest.$ac_ext >&5
13154   rm -rf conftest*
13155   fu_cv_sys_stat_statvfs=no
13156 fi
13157 rm -f conftest*
13158 fi
13159
13160 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
13161   if test $fu_cv_sys_stat_statvfs = yes; then
13162     space=yes
13163     cat >> confdefs.h <<\EOF
13164 #define STAT_STATVFS 1
13165 EOF
13166
13167   fi
13168 fi
13169
13170 if test $space = no; then
13171   # DEC Alpha running OSF/1
13172   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
13173 echo "configure:13174: checking for 3-argument statfs function (DEC OSF/1)" >&5
13174   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
13175   echo $ac_n "(cached) $ac_c" 1>&6
13176 else
13177   if test "$cross_compiling" = yes; then
13178   fu_cv_sys_stat_statfs3_osf1=no
13179 else
13180   cat > conftest.$ac_ext <<EOF
13181 #line 13182 "configure"
13182 #include "confdefs.h"
13183
13184 #include <sys/param.h>
13185 #include <sys/types.h>
13186 #include <sys/mount.h>
13187   main ()
13188   {
13189     struct statfs fsd;
13190     fsd.f_fsize = 0;
13191     exit (statfs (".", &fsd, sizeof (struct statfs)));
13192   }
13193 EOF
13194 if { (eval echo configure:13195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13195 then
13196   fu_cv_sys_stat_statfs3_osf1=yes
13197 else
13198   echo "configure: failed program was:" >&5
13199   cat conftest.$ac_ext >&5
13200   rm -fr conftest*
13201   fu_cv_sys_stat_statfs3_osf1=no
13202 fi
13203 rm -fr conftest*
13204 fi
13205
13206 fi
13207
13208   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
13209   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
13210     space=yes
13211     cat >> confdefs.h <<\EOF
13212 #define STAT_STATFS3_OSF1 1
13213 EOF
13214
13215   fi
13216 fi
13217
13218 if test $space = no; then
13219 # AIX
13220   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
13221 echo "configure:13222: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
13222   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
13223   echo $ac_n "(cached) $ac_c" 1>&6
13224 else
13225   if test "$cross_compiling" = yes; then
13226   fu_cv_sys_stat_statfs2_bsize=no
13227 else
13228   cat > conftest.$ac_ext <<EOF
13229 #line 13230 "configure"
13230 #include "confdefs.h"
13231
13232 #ifdef HAVE_SYS_PARAM_H
13233 #include <sys/param.h>
13234 #endif
13235 #ifdef HAVE_SYS_MOUNT_H
13236 #include <sys/mount.h>
13237 #endif
13238 #ifdef HAVE_SYS_VFS_H
13239 #include <sys/vfs.h>
13240 #endif
13241   main ()
13242   {
13243   struct statfs fsd;
13244   fsd.f_bsize = 0;
13245   exit (statfs (".", &fsd));
13246   }
13247 EOF
13248 if { (eval echo configure:13249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13249 then
13250   fu_cv_sys_stat_statfs2_bsize=yes
13251 else
13252   echo "configure: failed program was:" >&5
13253   cat conftest.$ac_ext >&5
13254   rm -fr conftest*
13255   fu_cv_sys_stat_statfs2_bsize=no
13256 fi
13257 rm -fr conftest*
13258 fi
13259
13260 fi
13261
13262   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
13263   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
13264     space=yes
13265     cat >> confdefs.h <<\EOF
13266 #define STAT_STATFS2_BSIZE 1
13267 EOF
13268
13269   fi
13270 fi
13271
13272 if test $space = no; then
13273 # SVR3
13274   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
13275 echo "configure:13276: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
13276   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
13277   echo $ac_n "(cached) $ac_c" 1>&6
13278 else
13279   if test "$cross_compiling" = yes; then
13280   fu_cv_sys_stat_statfs4=no
13281 else
13282   cat > conftest.$ac_ext <<EOF
13283 #line 13284 "configure"
13284 #include "confdefs.h"
13285 #include <sys/types.h>
13286 #include <sys/statfs.h>
13287   main ()
13288   {
13289   struct statfs fsd;
13290   exit (statfs (".", &fsd, sizeof fsd, 0));
13291   }
13292 EOF
13293 if { (eval echo configure:13294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13294 then
13295   fu_cv_sys_stat_statfs4=yes
13296 else
13297   echo "configure: failed program was:" >&5
13298   cat conftest.$ac_ext >&5
13299   rm -fr conftest*
13300   fu_cv_sys_stat_statfs4=no
13301 fi
13302 rm -fr conftest*
13303 fi
13304
13305 fi
13306
13307   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
13308   if test $fu_cv_sys_stat_statfs4 = yes; then
13309     space=yes
13310     cat >> confdefs.h <<\EOF
13311 #define STAT_STATFS4 1
13312 EOF
13313
13314   fi
13315 fi
13316
13317 if test $space = no; then
13318 # 4.4BSD and NetBSD
13319   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
13320 echo "configure:13321: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
13321   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
13322   echo $ac_n "(cached) $ac_c" 1>&6
13323 else
13324   if test "$cross_compiling" = yes; then
13325   fu_cv_sys_stat_statfs2_fsize=no
13326 else
13327   cat > conftest.$ac_ext <<EOF
13328 #line 13329 "configure"
13329 #include "confdefs.h"
13330 #include <sys/types.h>
13331 #ifdef HAVE_SYS_PARAM_H
13332 #include <sys/param.h>
13333 #endif
13334 #ifdef HAVE_SYS_MOUNT_H
13335 #include <sys/mount.h>
13336 #endif
13337   main ()
13338   {
13339   struct statfs fsd;
13340   fsd.f_fsize = 0;
13341   exit (statfs (".", &fsd));
13342   }
13343 EOF
13344 if { (eval echo configure:13345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13345 then
13346   fu_cv_sys_stat_statfs2_fsize=yes
13347 else
13348   echo "configure: failed program was:" >&5
13349   cat conftest.$ac_ext >&5
13350   rm -fr conftest*
13351   fu_cv_sys_stat_statfs2_fsize=no
13352 fi
13353 rm -fr conftest*
13354 fi
13355
13356 fi
13357
13358   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
13359   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
13360     space=yes
13361     cat >> confdefs.h <<\EOF
13362 #define STAT_STATFS2_FSIZE 1
13363 EOF
13364
13365   fi
13366 fi
13367
13368 if test $space = no; then
13369   # Ultrix
13370   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
13371 echo "configure:13372: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
13372   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
13373   echo $ac_n "(cached) $ac_c" 1>&6
13374 else
13375   if test "$cross_compiling" = yes; then
13376   fu_cv_sys_stat_fs_data=no
13377 else
13378   cat > conftest.$ac_ext <<EOF
13379 #line 13380 "configure"
13380 #include "confdefs.h"
13381 #include <sys/types.h>
13382 #ifdef HAVE_SYS_PARAM_H
13383 #include <sys/param.h>
13384 #endif
13385 #ifdef HAVE_SYS_MOUNT_H
13386 #include <sys/mount.h>
13387 #endif
13388 #ifdef HAVE_SYS_FS_TYPES_H
13389 #include <sys/fs_types.h>
13390 #endif
13391   main ()
13392   {
13393   struct fs_data fsd;
13394   /* Ultrix's statfs returns 1 for success,
13395      0 for not mounted, -1 for failure.  */
13396   exit (statfs (".", &fsd) != 1);
13397   }
13398 EOF
13399 if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13400 then
13401   fu_cv_sys_stat_fs_data=yes
13402 else
13403   echo "configure: failed program was:" >&5
13404   cat conftest.$ac_ext >&5
13405   rm -fr conftest*
13406   fu_cv_sys_stat_fs_data=no
13407 fi
13408 rm -fr conftest*
13409 fi
13410
13411 fi
13412
13413   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
13414   if test $fu_cv_sys_stat_fs_data = yes; then
13415     space=yes
13416     cat >> confdefs.h <<\EOF
13417 #define STAT_STATFS2_FS_DATA 1
13418 EOF
13419
13420   fi
13421 fi
13422
13423 #
13424 # As a gating factor for large file support, in order to
13425 # use <4GB files we must have the following minimal support
13426 # available.
13427 # long long, and a 64 bit off_t or off64_t.
13428 # If we don't have all of these then disable large
13429 # file support.
13430 #
13431 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
13432 echo "configure:13433: checking if large file support can be enabled" >&5
13433 cat > conftest.$ac_ext <<EOF
13434 #line 13435 "configure"
13435 #include "confdefs.h"
13436
13437 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13438 #include <sys/types.h>
13439 #else
13440 __COMPILE_ERROR_
13441 #endif
13442
13443 int main() {
13444 int i
13445 ; return 0; }
13446 EOF
13447 if { (eval echo configure:13448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13448   rm -rf conftest*
13449   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13450 else
13451   echo "configure: failed program was:" >&5
13452   cat conftest.$ac_ext >&5
13453   rm -rf conftest*
13454   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13455 fi
13456 rm -f conftest*
13457 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13458     cat >> confdefs.h <<\EOF
13459 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13460 EOF
13461
13462 fi
13463 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13464
13465 # Check whether --with-spinlocks or --without-spinlocks was given.
13466 if test "${with_spinlocks+set}" = set; then
13467   withval="$with_spinlocks"
13468   :
13469 fi
13470
13471 if test "x$with_spinlocks" = "xyes"; then
13472     cat >> confdefs.h <<\EOF
13473 #define USE_SPINLOCKS 1
13474 EOF
13475
13476
13477     case "$host_cpu" in
13478         sparc)
13479             cat >> confdefs.h <<\EOF
13480 #define SPARC_SPINLOCKS 1
13481 EOF
13482
13483             ;;
13484
13485         i386|i486|i586|i686)
13486             cat >> confdefs.h <<\EOF
13487 #define INTEL_SPINLOCKS 1
13488 EOF
13489
13490             ;;
13491
13492         mips)
13493             cat >> confdefs.h <<\EOF
13494 #define MIPS_SPINLOCKS 1
13495 EOF
13496
13497             ;;
13498
13499         powerpc)
13500             cat >> confdefs.h <<\EOF
13501 #define POWERPC_SPINLOCKS 1
13502 EOF
13503
13504             ;;
13505     esac
13506 fi
13507
13508 #################################################
13509 # check for ACL support
13510
13511 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13512 echo "configure:13513: checking whether to support ACLs" >&5
13513 # Check whether --with-acl-support or --without-acl-support was given.
13514 if test "${with_acl_support+set}" = set; then
13515   withval="$with_acl_support"
13516    case "$withval" in
13517   yes)
13518
13519         case "$host_os" in
13520         *sysv5*)
13521                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13522                 cat >> confdefs.h <<\EOF
13523 #define HAVE_UNIXWARE_ACLS 1
13524 EOF
13525
13526                 ;;
13527         *solaris*)
13528                 echo "$ac_t""Using solaris ACLs" 1>&6
13529                 cat >> confdefs.h <<\EOF
13530 #define HAVE_SOLARIS_ACLS 1
13531 EOF
13532
13533                 ;;
13534         *hpux*)
13535                 echo "$ac_t""Using HPUX ACLs" 1>&6
13536                 cat >> confdefs.h <<\EOF
13537 #define HAVE_HPUX_ACLS 1
13538 EOF
13539
13540                 ;;
13541         *irix*)
13542                 echo "$ac_t""Using IRIX ACLs" 1>&6
13543                 cat >> confdefs.h <<\EOF
13544 #define HAVE_IRIX_ACLS 1
13545 EOF
13546
13547                 ;;
13548         *aix*)
13549                 echo "$ac_t""Using AIX ACLs" 1>&6
13550                 cat >> confdefs.h <<\EOF
13551 #define HAVE_AIX_ACLS 1
13552 EOF
13553
13554                 ;;
13555         *osf*)
13556                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13557                 cat >> confdefs.h <<\EOF
13558 #define HAVE_TRU64_ACLS 1
13559 EOF
13560
13561                 LIBS="$LIBS -lpacl"
13562                 ;;
13563         *)
13564                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13565 echo "configure:13566: checking for acl_get_file in -lacl" >&5
13566 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13567 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13568   echo $ac_n "(cached) $ac_c" 1>&6
13569 else
13570   ac_save_LIBS="$LIBS"
13571 LIBS="-lacl  $LIBS"
13572 cat > conftest.$ac_ext <<EOF
13573 #line 13574 "configure"
13574 #include "confdefs.h"
13575 /* Override any gcc2 internal prototype to avoid an error.  */
13576 /* We use char because int might match the return type of a gcc2
13577     builtin and then its argument prototype would still apply.  */
13578 char acl_get_file();
13579
13580 int main() {
13581 acl_get_file()
13582 ; return 0; }
13583 EOF
13584 if { (eval echo configure:13585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13585   rm -rf conftest*
13586   eval "ac_cv_lib_$ac_lib_var=yes"
13587 else
13588   echo "configure: failed program was:" >&5
13589   cat conftest.$ac_ext >&5
13590   rm -rf conftest*
13591   eval "ac_cv_lib_$ac_lib_var=no"
13592 fi
13593 rm -f conftest*
13594 LIBS="$ac_save_LIBS"
13595
13596 fi
13597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13598   echo "$ac_t""yes" 1>&6
13599     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13600     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13601   cat >> confdefs.h <<EOF
13602 #define $ac_tr_lib 1
13603 EOF
13604
13605   LIBS="-lacl $LIBS"
13606
13607 else
13608   echo "$ac_t""no" 1>&6
13609 fi
13610
13611                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13612 echo "configure:13613: checking for ACL support" >&5
13613 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13614   echo $ac_n "(cached) $ac_c" 1>&6
13615 else
13616   
13617                 cat > conftest.$ac_ext <<EOF
13618 #line 13619 "configure"
13619 #include "confdefs.h"
13620 #include <sys/types.h>
13621 #include <sys/acl.h>
13622 int main() {
13623  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13624 ; return 0; }
13625 EOF
13626 if { (eval echo configure:13627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13627   rm -rf conftest*
13628   samba_cv_HAVE_POSIX_ACLS=yes
13629 else
13630   echo "configure: failed program was:" >&5
13631   cat conftest.$ac_ext >&5
13632   rm -rf conftest*
13633   samba_cv_HAVE_POSIX_ACLS=no
13634 fi
13635 rm -f conftest*
13636 fi
13637
13638 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13639                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13640                                 echo "$ac_t""Using posix ACLs" 1>&6
13641                                 cat >> confdefs.h <<\EOF
13642 #define HAVE_POSIX_ACLS 1
13643 EOF
13644
13645                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13646 echo "configure:13647: checking for acl_get_perm_np" >&5
13647 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13648   echo $ac_n "(cached) $ac_c" 1>&6
13649 else
13650   
13651                                 cat > conftest.$ac_ext <<EOF
13652 #line 13653 "configure"
13653 #include "confdefs.h"
13654 #include <sys/types.h>
13655 #include <sys/acl.h>
13656 int main() {
13657  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13658 ; return 0; }
13659 EOF
13660 if { (eval echo configure:13661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13661   rm -rf conftest*
13662   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13663 else
13664   echo "configure: failed program was:" >&5
13665   cat conftest.$ac_ext >&5
13666   rm -rf conftest*
13667   samba_cv_HAVE_ACL_GET_PERM_NP=no
13668 fi
13669 rm -f conftest*
13670 fi
13671
13672 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13673                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13674                                         cat >> confdefs.h <<\EOF
13675 #define HAVE_ACL_GET_PERM_NP 1
13676 EOF
13677
13678                                 fi
13679                         fi
13680             ;;
13681         esac
13682         ;;
13683   *)
13684     echo "$ac_t""no" 1>&6
13685     cat >> confdefs.h <<\EOF
13686 #define HAVE_NO_ACLS 1
13687 EOF
13688
13689     ;;
13690   esac 
13691 else
13692   cat >> confdefs.h <<\EOF
13693 #define HAVE_NO_ACLS 1
13694 EOF
13695
13696   echo "$ac_t""no" 1>&6
13697
13698 fi
13699
13700
13701 #################################################
13702 # Check whether winbind is supported on this platform.  If so we need to
13703 # build and install client programs (WINBIND_TARGETS), sbin programs
13704 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13705
13706 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13707 echo "configure:13708: checking whether to build winbind" >&5
13708
13709 # Initially, the value of $host_os decides whether winbind is supported
13710
13711 case "$host_os" in
13712         *linux*|*irix*)
13713                 HAVE_WINBIND=yes
13714                 ;;
13715         *solaris*)
13716                 HAVE_WINBIND=yes
13717                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13718                 WINBIND_NSS_EXTRA_LIBS="-lsocket"
13719                 ;;
13720         *hpux11*)
13721                 HAVE_WINBIND=yes
13722                 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
13723                 ;;
13724         *)
13725                 HAVE_WINBIND=no
13726                 winbind_no_reason=", unsupported on $host_os"
13727                 ;;
13728 esac
13729
13730 # Check the setting of --with-winbindd
13731
13732 # Check whether --with-winbind or --without-winbind was given.
13733 if test "${with_winbind+set}" = set; then
13734   withval="$with_winbind"
13735    
13736   case "$withval" in
13737         yes)
13738                 HAVE_WINBIND=yes
13739                 ;;
13740         no)
13741                 HAVE_WINBIND=no
13742                 winbind_reason=""
13743                 ;;
13744   esac 
13745 fi
13746
13747
13748 # We need unix domain sockets for winbind
13749
13750 if test x"$HAVE_WINBIND" = x"yes"; then
13751         if test x"$samba_cv_unixsocket" = x"no"; then
13752                 winbind_no_reason=", no unix domain socket support on $host_os"
13753                 HAVE_WINBIND=no
13754         fi
13755 fi
13756
13757 # Display test results
13758
13759 WINBIND_TARGETS=""
13760 WINBIND_STARGETS=""
13761 WINBIND_LTARGETS=""
13762 WINBIND_PAM_PROGS=""
13763
13764 if test x"$HAVE_WINBIND" = x"yes"; then
13765         echo "$ac_t""yes" 1>&6
13766         cat >> confdefs.h <<\EOF
13767 #define WITH_WINBIND 1
13768 EOF
13769
13770
13771         WINBIND_TARGETS="bin/wbinfo"
13772         WINBIND_STARGETS="bin/winbindd"
13773         if test x"$BLDSHARED" = x"true"; then
13774                 WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13775                 if test x"$with_pam" = x"yes"; then
13776                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13777                 fi
13778         fi
13779 else
13780         echo "$ac_t""no$winbind_no_reason" 1>&6
13781 fi
13782
13783
13784 # Substitution time!
13785
13786
13787
13788
13789
13790
13791
13792
13793 # Solaris has some extra fields in struct passwd that need to be
13794 # initialised otherwise nscd crashes.  Unfortunately autoconf < 2.50
13795 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
13796 # this. 
13797
13798 #AC_CHECK_MEMBER(struct passwd.pw_comment,
13799 #               AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
13800 #               [#include <pwd.h>])
13801
13802 echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6
13803 echo "configure:13804: checking whether struct passwd has pw_comment" >&5
13804 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then
13805   echo $ac_n "(cached) $ac_c" 1>&6
13806 else
13807   
13808     cat > conftest.$ac_ext <<EOF
13809 #line 13810 "configure"
13810 #include "confdefs.h"
13811 #include <pwd.h>
13812 int main() {
13813 struct passwd p; p.pw_comment;
13814 ; return 0; }
13815 EOF
13816 if { (eval echo configure:13817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13817   rm -rf conftest*
13818   samba_cv_passwd_pw_comment=yes
13819 else
13820   echo "configure: failed program was:" >&5
13821   cat conftest.$ac_ext >&5
13822   rm -rf conftest*
13823   samba_cv_passwd_pw_comment=no
13824 fi
13825 rm -f conftest*
13826 fi
13827
13828 echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6
13829 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
13830    cat >> confdefs.h <<\EOF
13831 #define HAVE_PASSWD_PW_COMMENT 1
13832 EOF
13833
13834 fi
13835
13836 #AC_CHECK_MEMBER(struct passwd.pw_age,
13837 #               AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
13838 #               [#include <pwd.h>])
13839
13840 echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6
13841 echo "configure:13842: checking whether struct passwd has pw_age" >&5
13842 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then
13843   echo $ac_n "(cached) $ac_c" 1>&6
13844 else
13845   
13846     cat > conftest.$ac_ext <<EOF
13847 #line 13848 "configure"
13848 #include "confdefs.h"
13849 #include <pwd.h>
13850 int main() {
13851 struct passwd p; p.pw_age;
13852 ; return 0; }
13853 EOF
13854 if { (eval echo configure:13855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13855   rm -rf conftest*
13856   samba_cv_passwd_pw_age=yes
13857 else
13858   echo "configure: failed program was:" >&5
13859   cat conftest.$ac_ext >&5
13860   rm -rf conftest*
13861   samba_cv_passwd_pw_age=no
13862 fi
13863 rm -f conftest*
13864 fi
13865
13866 echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6
13867 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
13868    cat >> confdefs.h <<\EOF
13869 #define HAVE_PASSWD_PW_AGE 1
13870 EOF
13871
13872 fi
13873
13874 #################################################
13875 # Check to see if we should use the included popt 
13876
13877 # Check whether --with-included-popt or --without-included-popt was given.
13878 if test "${with_included_popt+set}" = set; then
13879   withval="$with_included_popt"
13880    
13881   case "$withval" in
13882         yes)
13883                 INCLUDED_POPT=yes
13884                 ;;
13885         no)
13886                 INCLUDED_POPT=no
13887                 ;;
13888   esac 
13889 fi
13890
13891 if test x"$INCLUDED_POPT" != x"yes"; then
13892     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13893 echo "configure:13894: checking for poptGetContext in -lpopt" >&5
13894 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13895 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13896   echo $ac_n "(cached) $ac_c" 1>&6
13897 else
13898   ac_save_LIBS="$LIBS"
13899 LIBS="-lpopt  $LIBS"
13900 cat > conftest.$ac_ext <<EOF
13901 #line 13902 "configure"
13902 #include "confdefs.h"
13903 /* Override any gcc2 internal prototype to avoid an error.  */
13904 /* We use char because int might match the return type of a gcc2
13905     builtin and then its argument prototype would still apply.  */
13906 char poptGetContext();
13907
13908 int main() {
13909 poptGetContext()
13910 ; return 0; }
13911 EOF
13912 if { (eval echo configure:13913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13913   rm -rf conftest*
13914   eval "ac_cv_lib_$ac_lib_var=yes"
13915 else
13916   echo "configure: failed program was:" >&5
13917   cat conftest.$ac_ext >&5
13918   rm -rf conftest*
13919   eval "ac_cv_lib_$ac_lib_var=no"
13920 fi
13921 rm -f conftest*
13922 LIBS="$ac_save_LIBS"
13923
13924 fi
13925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13926   echo "$ac_t""yes" 1>&6
13927   INCLUDED_POPT=no
13928 else
13929   echo "$ac_t""no" 1>&6
13930 INCLUDED_POPT=yes
13931 fi
13932
13933 fi
13934
13935 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13936 echo "configure:13937: checking whether to use included popt" >&5
13937 if test x"$INCLUDED_POPT" = x"yes"; then
13938     echo "$ac_t""yes" 1>&6
13939     BUILD_POPT='$(POPT_OBJS)'
13940     FLAGS1="-I$srcdir/popt"
13941 else
13942     echo "$ac_t""no" 1>&6
13943     LIBS="$LIBS -lpopt"
13944 fi
13945
13946
13947
13948 #################################################
13949 # do extra things if we are running insure
13950
13951 if test "${ac_cv_prog_CC}" = "insure"; then
13952         CPPFLAGS="$CPPFLAGS -D__INSURE__"
13953 fi
13954
13955 #################################################
13956 # final configure stuff
13957
13958 echo $ac_n "checking configure summary""... $ac_c" 1>&6
13959 echo "configure:13960: checking configure summary" >&5
13960 if test "$cross_compiling" = yes; then
13961   echo "configure: warning: cannot run when cross-compiling" 1>&2
13962 else
13963   cat > conftest.$ac_ext <<EOF
13964 #line 13965 "configure"
13965 #include "confdefs.h"
13966 #include "${srcdir-.}/tests/summary.c"
13967 EOF
13968 if { (eval echo configure:13969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13969 then
13970   echo "$ac_t""yes" 1>&6
13971 else
13972   echo "configure: failed program was:" >&5
13973   cat conftest.$ac_ext >&5
13974   rm -fr conftest*
13975   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1;
13976 fi
13977 rm -fr conftest*
13978 fi
13979
13980
13981 builddir=`pwd`
13982
13983
13984 trap '' 1 2 15
13985 cat > confcache <<\EOF
13986 # This file is a shell script that caches the results of configure
13987 # tests run on this system so they can be shared between configure
13988 # scripts and configure runs.  It is not useful on other systems.
13989 # If it contains results you don't want to keep, you may remove or edit it.
13990 #
13991 # By default, configure uses ./config.cache as the cache file,
13992 # creating it if it does not exist already.  You can give configure
13993 # the --cache-file=FILE option to use a different cache file; that is
13994 # what configure does when it calls configure scripts in
13995 # subdirectories, so they share the cache.
13996 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13997 # config.status only pays attention to the cache file if you give it the
13998 # --recheck option to rerun configure.
13999 #
14000 EOF
14001 # The following way of writing the cache mishandles newlines in values,
14002 # but we know of no workaround that is simple, portable, and efficient.
14003 # So, don't put newlines in cache variables' values.
14004 # Ultrix sh set writes to stderr and can't be redirected directly,
14005 # and sets the high bit in the cache file unless we assign to the vars.
14006 (set) 2>&1 |
14007   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14008   *ac_space=\ *)
14009     # `set' does not quote correctly, so add quotes (double-quote substitution
14010     # turns \\\\ into \\, and sed turns \\ into \).
14011     sed -n \
14012       -e "s/'/'\\\\''/g" \
14013       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14014     ;;
14015   *)
14016     # `set' quotes correctly as required by POSIX, so do not add quotes.
14017     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14018     ;;
14019   esac >> confcache
14020 if cmp -s $cache_file confcache; then
14021   :
14022 else
14023   if test -w $cache_file; then
14024     echo "updating cache $cache_file"
14025     cat confcache > $cache_file
14026   else
14027     echo "not updating unwritable cache $cache_file"
14028   fi
14029 fi
14030 rm -f confcache
14031
14032 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14033
14034 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14035 # Let make expand exec_prefix.
14036 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14037
14038 # Any assignment to VPATH causes Sun make to only execute
14039 # the first set of double-colon rules, so remove it if not needed.
14040 # If there is a colon in the path, we need to keep it.
14041 if test "x$srcdir" = x.; then
14042   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14043 fi
14044
14045 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14046
14047 DEFS=-DHAVE_CONFIG_H
14048
14049 # Without the "./", some shells look in PATH for config.status.
14050 : ${CONFIG_STATUS=./config.status}
14051
14052 echo creating $CONFIG_STATUS
14053 rm -f $CONFIG_STATUS
14054 cat > $CONFIG_STATUS <<EOF
14055 #! /bin/sh
14056 # Generated automatically by configure.
14057 # Run this file to recreate the current configuration.
14058 # This directory was configured as follows,
14059 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14060 #
14061 # $0 $ac_configure_args
14062 #
14063 # Compiler output produced by configure, useful for debugging
14064 # configure, is in ./config.log if it exists.
14065
14066 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14067 for ac_option
14068 do
14069   case "\$ac_option" in
14070   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14071     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14072     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14073   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14074     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14075     exit 0 ;;
14076   -help | --help | --hel | --he | --h)
14077     echo "\$ac_cs_usage"; exit 0 ;;
14078   *) echo "\$ac_cs_usage"; exit 1 ;;
14079   esac
14080 done
14081
14082 ac_given_srcdir=$srcdir
14083 ac_given_INSTALL="$INSTALL"
14084
14085 trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/VFS/block/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14086 EOF
14087 cat >> $CONFIG_STATUS <<EOF
14088
14089 # Protect against being on the right side of a sed subst in config.status.
14090 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14091  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14092 $ac_vpsub
14093 $extrasub
14094 s%@SHELL@%$SHELL%g
14095 s%@CFLAGS@%$CFLAGS%g
14096 s%@CPPFLAGS@%$CPPFLAGS%g
14097 s%@CXXFLAGS@%$CXXFLAGS%g
14098 s%@FFLAGS@%$FFLAGS%g
14099 s%@DEFS@%$DEFS%g
14100 s%@LDFLAGS@%$LDFLAGS%g
14101 s%@LIBS@%$LIBS%g
14102 s%@exec_prefix@%$exec_prefix%g
14103 s%@prefix@%$prefix%g
14104 s%@program_transform_name@%$program_transform_name%g
14105 s%@bindir@%$bindir%g
14106 s%@sbindir@%$sbindir%g
14107 s%@libexecdir@%$libexecdir%g
14108 s%@datadir@%$datadir%g
14109 s%@sysconfdir@%$sysconfdir%g
14110 s%@sharedstatedir@%$sharedstatedir%g
14111 s%@localstatedir@%$localstatedir%g
14112 s%@libdir@%$libdir%g
14113 s%@includedir@%$includedir%g
14114 s%@oldincludedir@%$oldincludedir%g
14115 s%@infodir@%$infodir%g
14116 s%@mandir@%$mandir%g
14117 s%@configdir@%$configdir%g
14118 s%@lockdir@%$lockdir%g
14119 s%@piddir@%$piddir%g
14120 s%@logfilebase@%$logfilebase%g
14121 s%@privatedir@%$privatedir%g
14122 s%@swatdir@%$swatdir%g
14123 s%@RUNPROG@%$RUNPROG%g
14124 s%@MPROGS@%$MPROGS%g
14125 s%@LDSHFLAGS@%$LDSHFLAGS%g
14126 s%@SONAMEFLAG@%$SONAMEFLAG%g
14127 s%@SHLD@%$SHLD%g
14128 s%@HOST_OS@%$HOST_OS%g
14129 s%@PAM_MOD@%$PAM_MOD%g
14130 s%@WRAP@%$WRAP%g
14131 s%@WRAP32@%$WRAP32%g
14132 s%@WRAPPROG@%$WRAPPROG%g
14133 s%@PICFLAG@%$PICFLAG%g
14134 s%@PICSUFFIX@%$PICSUFFIX%g
14135 s%@POBAD_CC@%$POBAD_CC%g
14136 s%@SHLIBEXT@%$SHLIBEXT%g
14137 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14138 s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g
14139 s%@CC@%$CC%g
14140 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14141 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14142 s%@INSTALL_DATA@%$INSTALL_DATA%g
14143 s%@AWK@%$AWK%g
14144 s%@BROKEN_CC@%$BROKEN_CC%g
14145 s%@host@%$host%g
14146 s%@host_alias@%$host_alias%g
14147 s%@host_cpu@%$host_cpu%g
14148 s%@host_vendor@%$host_vendor%g
14149 s%@host_os@%$host_os%g
14150 s%@target@%$target%g
14151 s%@target_alias@%$target_alias%g
14152 s%@target_cpu@%$target_cpu%g
14153 s%@target_vendor@%$target_vendor%g
14154 s%@target_os@%$target_os%g
14155 s%@build@%$build%g
14156 s%@build_alias@%$build_alias%g
14157 s%@build_cpu@%$build_cpu%g
14158 s%@build_vendor@%$build_vendor%g
14159 s%@build_os@%$build_os%g
14160 s%@CPP@%$CPP%g
14161 s%@CUPS_CONFIG@%$CUPS_CONFIG%g
14162 s%@LIBOBJS@%$LIBOBJS%g
14163 s%@TERMLIBS@%$TERMLIBS%g
14164 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14165 s%@ROFF@%$ROFF%g
14166 s%@DYNEXP@%$DYNEXP%g
14167 s%@QUOTAOBJS@%$QUOTAOBJS%g
14168 s%@manlangs@%$manlangs%g
14169 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14170 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14171 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14172 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
14173 s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g
14174 s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g
14175 s%@BUILD_POPT@%$BUILD_POPT%g
14176 s%@FLAGS1@%$FLAGS1%g
14177 s%@builddir@%$builddir%g
14178
14179 CEOF
14180 EOF
14181
14182 cat >> $CONFIG_STATUS <<\EOF
14183
14184 # Split the substitutions into bite-sized pieces for seds with
14185 # small command number limits, like on Digital OSF/1 and HP-UX.
14186 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14187 ac_file=1 # Number of current file.
14188 ac_beg=1 # First line for current file.
14189 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14190 ac_more_lines=:
14191 ac_sed_cmds=""
14192 while $ac_more_lines; do
14193   if test $ac_beg -gt 1; then
14194     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14195   else
14196     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14197   fi
14198   if test ! -s conftest.s$ac_file; then
14199     ac_more_lines=false
14200     rm -f conftest.s$ac_file
14201   else
14202     if test -z "$ac_sed_cmds"; then
14203       ac_sed_cmds="sed -f conftest.s$ac_file"
14204     else
14205       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14206     fi
14207     ac_file=`expr $ac_file + 1`
14208     ac_beg=$ac_end
14209     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14210   fi
14211 done
14212 if test -z "$ac_sed_cmds"; then
14213   ac_sed_cmds=cat
14214 fi
14215 EOF
14216
14217 cat >> $CONFIG_STATUS <<EOF
14218
14219 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/VFS/block/Makefile"}
14220 EOF
14221 cat >> $CONFIG_STATUS <<\EOF
14222 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14223   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14224   case "$ac_file" in
14225   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14226        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14227   *) ac_file_in="${ac_file}.in" ;;
14228   esac
14229
14230   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14231
14232   # Remove last slash and all that follows it.  Not all systems have dirname.
14233   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14234   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14235     # The file is in a subdirectory.
14236     test ! -d "$ac_dir" && mkdir "$ac_dir"
14237     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14238     # A "../" for each directory in $ac_dir_suffix.
14239     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14240   else
14241     ac_dir_suffix= ac_dots=
14242   fi
14243
14244   case "$ac_given_srcdir" in
14245   .)  srcdir=.
14246       if test -z "$ac_dots"; then top_srcdir=.
14247       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14248   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14249   *) # Relative path.
14250     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14251     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14252   esac
14253
14254   case "$ac_given_INSTALL" in
14255   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14256   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14257   esac
14258
14259   echo creating "$ac_file"
14260   rm -f "$ac_file"
14261   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14262   case "$ac_file" in
14263   *Makefile*) ac_comsub="1i\\
14264 # $configure_input" ;;
14265   *) ac_comsub= ;;
14266   esac
14267
14268   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14269   sed -e "$ac_comsub
14270 s%@configure_input@%$configure_input%g
14271 s%@srcdir@%$srcdir%g
14272 s%@top_srcdir@%$top_srcdir%g
14273 s%@INSTALL@%$INSTALL%g
14274 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14275 fi; done
14276 rm -f conftest.s*
14277
14278 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14279 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14280 #
14281 # ac_d sets the value in "#define NAME VALUE" lines.
14282 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14283 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14284 ac_dC='\3'
14285 ac_dD='%g'
14286 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14287 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14288 ac_uB='\([      ]\)%\1#\2define\3'
14289 ac_uC=' '
14290 ac_uD='\4%g'
14291 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14292 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14293 ac_eB='$%\1#\2define\3'
14294 ac_eC=' '
14295 ac_eD='%g'
14296
14297 if test "${CONFIG_HEADERS+set}" != set; then
14298 EOF
14299 cat >> $CONFIG_STATUS <<EOF
14300   CONFIG_HEADERS="include/config.h"
14301 EOF
14302 cat >> $CONFIG_STATUS <<\EOF
14303 fi
14304 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14305   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14306   case "$ac_file" in
14307   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14308        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14309   *) ac_file_in="${ac_file}.in" ;;
14310   esac
14311
14312   echo creating $ac_file
14313
14314   rm -f conftest.frag conftest.in conftest.out
14315   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14316   cat $ac_file_inputs > conftest.in
14317
14318 EOF
14319
14320 # Transform confdefs.h into a sed script conftest.vals that substitutes
14321 # the proper values into config.h.in to produce config.h.  And first:
14322 # Protect against being on the right side of a sed subst in config.status.
14323 # Protect against being in an unquoted here document in config.status.
14324 rm -f conftest.vals
14325 cat > conftest.hdr <<\EOF
14326 s/[\\&%]/\\&/g
14327 s%[\\$`]%\\&%g
14328 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14329 s%ac_d%ac_u%gp
14330 s%ac_u%ac_e%gp
14331 EOF
14332 sed -n -f conftest.hdr confdefs.h > conftest.vals
14333 rm -f conftest.hdr
14334
14335 # This sed command replaces #undef with comments.  This is necessary, for
14336 # example, in the case of _POSIX_SOURCE, which is predefined and required
14337 # on some systems where configure will not decide to define it.
14338 cat >> conftest.vals <<\EOF
14339 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14340 EOF
14341
14342 # Break up conftest.vals because some shells have a limit on
14343 # the size of here documents, and old seds have small limits too.
14344
14345 rm -f conftest.tail
14346 while :
14347 do
14348   ac_lines=`grep -c . conftest.vals`
14349   # grep -c gives empty output for an empty file on some AIX systems.
14350   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14351   # Write a limited-size here document to conftest.frag.
14352   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14353   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14354   echo 'CEOF
14355   sed -f conftest.frag conftest.in > conftest.out
14356   rm -f conftest.in
14357   mv conftest.out conftest.in
14358 ' >> $CONFIG_STATUS
14359   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14360   rm -f conftest.vals
14361   mv conftest.tail conftest.vals
14362 done
14363 rm -f conftest.vals
14364
14365 cat >> $CONFIG_STATUS <<\EOF
14366   rm -f conftest.frag conftest.h
14367   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14368   cat conftest.in >> conftest.h
14369   rm -f conftest.in
14370   if cmp -s $ac_file conftest.h 2>/dev/null; then
14371     echo "$ac_file is unchanged"
14372     rm -f conftest.h
14373   else
14374     # Remove last slash and all that follows it.  Not all systems have dirname.
14375       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14376       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14377       # The file is in a subdirectory.
14378       test ! -d "$ac_dir" && mkdir "$ac_dir"
14379     fi
14380     rm -f $ac_file
14381     mv conftest.h $ac_file
14382   fi
14383 fi; done
14384
14385 EOF
14386 cat >> $CONFIG_STATUS <<EOF
14387
14388 EOF
14389 cat >> $CONFIG_STATUS <<\EOF
14390
14391 exit 0
14392 EOF
14393 chmod +x $CONFIG_STATUS
14394 rm -fr confdefs* $ac_clean_files
14395 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
14396
14397
14398 #################################################
14399 # Print very concise instructions on building/use
14400 if test "x$enable_dmalloc" = xyes
14401 then
14402         echo "$ac_t""Note: The dmalloc debug library will be included.  To turn it on use" 1>&6
14403         echo "$ac_t""      \$ eval \`dmalloc samba\`." 1>&6
14404 fi