Added AC_CHECK_FUNCS(syslog vsyslog).
[ira/wip.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --enable-debug          turn on debugging [default=no]"
17 ac_help="$ac_help
18   --enable-developer      turn on developer warnings and debugging [default=no]"
19 ac_help="$ac_help
20   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
21 ac_help="$ac_help
22   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
23 ac_help="$ac_help
24   --with-smbwrapper       Include SMB wrapper support (default=no) "
25 ac_help="$ac_help
26   --with-afs              Include AFS clear-text auth support (default=no) "
27 ac_help="$ac_help
28   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
29 ac_help="$ac_help
30   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
31 ac_help="$ac_help
32   --with-automount        Include AUTOMOUNT support (default=no)"
33 ac_help="$ac_help
34   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
35 ac_help="$ac_help
36   --with-pam              Include PAM support (default=no)"
37 ac_help="$ac_help
38   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
39 ac_help="$ac_help
40   --with-tdbsam           Include experimental TDB SAM support (default=no)"
41 ac_help="$ac_help
42   --with-ldapsam          Include experimental LDAP SAM support (default=no)"
43 ac_help="$ac_help
44   --with-nisplussam       Include NISPLUS SAM support (default=no)"
45 ac_help="$ac_help
46   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
47 ac_help="$ac_help
48   --with-ssl              Include SSL support (default=no)
49   --with-sslinc=DIR          Where the SSL includes are (defaults to /usr/local/ssl/include)
50   --with-ssllib=DIR          Where the SSL libraries are (defaults to /usr/local/ssl/lib)"
51 ac_help="$ac_help
52   --with-syslog           Include experimental SYSLOG support (default=no)"
53 ac_help="$ac_help
54   --with-profiling-data   Include gathering source code profile information (default=no)"
55 ac_help="$ac_help
56   --with-quotas           Include experimental disk-quota support (default=no)"
57 ac_help="$ac_help
58   --with-utmp             Include experimental utmp accounting (default=no)"
59 ac_help="$ac_help
60   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
61 ac_help="$ac_help
62   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
63 ac_help="$ac_help
64   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
65 ac_help="$ac_help
66   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
67 ac_help="$ac_help
68   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
69 ac_help="$ac_help
70   --with-acl-support      Include ACL support (default=no)"
71 ac_help="$ac_help
72   --with-winbind          Build winbind (default, if supported by OS)"
73 ac_help="$ac_help
74   --with-included-popt    use bundled popt library, not from system"
75
76 # Initialize some variables set by options.
77 # The variables have the same names as the options, with
78 # dashes changed to underlines.
79 build=NONE
80 cache_file=./config.cache
81 exec_prefix=NONE
82 host=NONE
83 no_create=
84 nonopt=NONE
85 no_recursion=
86 prefix=NONE
87 program_prefix=NONE
88 program_suffix=NONE
89 program_transform_name=s,x,x,
90 silent=
91 site=
92 srcdir=
93 target=NONE
94 verbose=
95 x_includes=NONE
96 x_libraries=NONE
97 bindir='${exec_prefix}/bin'
98 sbindir='${exec_prefix}/sbin'
99 libexecdir='${exec_prefix}/libexec'
100 datadir='${prefix}/share'
101 sysconfdir='${prefix}/etc'
102 sharedstatedir='${prefix}/com'
103 localstatedir='${prefix}/var'
104 libdir='${exec_prefix}/lib'
105 includedir='${prefix}/include'
106 oldincludedir='/usr/include'
107 infodir='${prefix}/info'
108 mandir='${prefix}/man'
109
110 # Initialize some other variables.
111 subdirs=
112 MFLAGS= MAKEFLAGS=
113 SHELL=${CONFIG_SHELL-/bin/sh}
114 # Maximum number of lines to put in a shell here document.
115 ac_max_here_lines=12
116
117 ac_prev=
118 for ac_option
119 do
120
121   # If the previous option needs an argument, assign it.
122   if test -n "$ac_prev"; then
123     eval "$ac_prev=\$ac_option"
124     ac_prev=
125     continue
126   fi
127
128   case "$ac_option" in
129   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
130   *) ac_optarg= ;;
131   esac
132
133   # Accept the important Cygnus configure options, so we can diagnose typos.
134
135   case "$ac_option" in
136
137   -bindir | --bindir | --bindi | --bind | --bin | --bi)
138     ac_prev=bindir ;;
139   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
140     bindir="$ac_optarg" ;;
141
142   -build | --build | --buil | --bui | --bu)
143     ac_prev=build ;;
144   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
145     build="$ac_optarg" ;;
146
147   -cache-file | --cache-file | --cache-fil | --cache-fi \
148   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
149     ac_prev=cache_file ;;
150   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
151   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
152     cache_file="$ac_optarg" ;;
153
154   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
155     ac_prev=datadir ;;
156   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
157   | --da=*)
158     datadir="$ac_optarg" ;;
159
160   -disable-* | --disable-*)
161     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
162     # Reject names that are not valid shell variable names.
163     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
164       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165     fi
166     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167     eval "enable_${ac_feature}=no" ;;
168
169   -enable-* | --enable-*)
170     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
171     # Reject names that are not valid shell variable names.
172     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
173       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
174     fi
175     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
176     case "$ac_option" in
177       *=*) ;;
178       *) ac_optarg=yes ;;
179     esac
180     eval "enable_${ac_feature}='$ac_optarg'" ;;
181
182   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
183   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
184   | --exec | --exe | --ex)
185     ac_prev=exec_prefix ;;
186   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
187   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
188   | --exec=* | --exe=* | --ex=*)
189     exec_prefix="$ac_optarg" ;;
190
191   -gas | --gas | --ga | --g)
192     # Obsolete; use --with-gas.
193     with_gas=yes ;;
194
195   -help | --help | --hel | --he)
196     # Omit some internal or obsolete options to make the list less imposing.
197     # This message is too long to be a string in the A/UX 3.1 sh.
198     cat << EOF
199 Usage: configure [options] [host]
200 Options: [defaults in brackets after descriptions]
201 Configuration:
202   --cache-file=FILE       cache test results in FILE
203   --help                  print this message
204   --no-create             do not create output files
205   --quiet, --silent       do not print \`checking...' messages
206   --version               print the version of autoconf that created configure
207 Directory and file names:
208   --prefix=PREFIX         install architecture-independent files in PREFIX
209                           [$ac_default_prefix]
210   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
211                           [same as prefix]
212   --bindir=DIR            user executables in DIR [EPREFIX/bin]
213   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
214   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
215   --datadir=DIR           read-only architecture-independent data in DIR
216                           [PREFIX/share]
217   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
218   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
219                           [PREFIX/com]
220   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
221   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
222   --includedir=DIR        C header files in DIR [PREFIX/include]
223   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
224   --infodir=DIR           info documentation in DIR [PREFIX/info]
225   --mandir=DIR            man documentation in DIR [PREFIX/man]
226   --srcdir=DIR            find the sources in DIR [configure dir or ..]
227   --program-prefix=PREFIX prepend PREFIX to installed program names
228   --program-suffix=SUFFIX append SUFFIX to installed program names
229   --program-transform-name=PROGRAM
230                           run sed PROGRAM on installed program names
231 EOF
232     cat << EOF
233 Host type:
234   --build=BUILD           configure for building on BUILD [BUILD=HOST]
235   --host=HOST             configure for HOST [guessed]
236   --target=TARGET         configure for TARGET [TARGET=HOST]
237 Features and packages:
238   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
239   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
240   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
241   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
242   --x-includes=DIR        X include files are in DIR
243   --x-libraries=DIR       X library files are in DIR
244 EOF
245     if test -n "$ac_help"; then
246       echo "--enable and --with options recognized:$ac_help"
247     fi
248     exit 0 ;;
249
250   -host | --host | --hos | --ho)
251     ac_prev=host ;;
252   -host=* | --host=* | --hos=* | --ho=*)
253     host="$ac_optarg" ;;
254
255   -includedir | --includedir | --includedi | --included | --include \
256   | --includ | --inclu | --incl | --inc)
257     ac_prev=includedir ;;
258   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
259   | --includ=* | --inclu=* | --incl=* | --inc=*)
260     includedir="$ac_optarg" ;;
261
262   -infodir | --infodir | --infodi | --infod | --info | --inf)
263     ac_prev=infodir ;;
264   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
265     infodir="$ac_optarg" ;;
266
267   -libdir | --libdir | --libdi | --libd)
268     ac_prev=libdir ;;
269   -libdir=* | --libdir=* | --libdi=* | --libd=*)
270     libdir="$ac_optarg" ;;
271
272   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
273   | --libexe | --libex | --libe)
274     ac_prev=libexecdir ;;
275   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
276   | --libexe=* | --libex=* | --libe=*)
277     libexecdir="$ac_optarg" ;;
278
279   -localstatedir | --localstatedir | --localstatedi | --localstated \
280   | --localstate | --localstat | --localsta | --localst \
281   | --locals | --local | --loca | --loc | --lo)
282     ac_prev=localstatedir ;;
283   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
284   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
285   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
286     localstatedir="$ac_optarg" ;;
287
288   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
289     ac_prev=mandir ;;
290   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
291     mandir="$ac_optarg" ;;
292
293   -nfp | --nfp | --nf)
294     # Obsolete; use --without-fp.
295     with_fp=no ;;
296
297   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
298   | --no-cr | --no-c)
299     no_create=yes ;;
300
301   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
302   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
303     no_recursion=yes ;;
304
305   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
306   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
307   | --oldin | --oldi | --old | --ol | --o)
308     ac_prev=oldincludedir ;;
309   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
310   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
311   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
312     oldincludedir="$ac_optarg" ;;
313
314   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
315     ac_prev=prefix ;;
316   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
317     prefix="$ac_optarg" ;;
318
319   -program-prefix | --program-prefix | --program-prefi | --program-pref \
320   | --program-pre | --program-pr | --program-p)
321     ac_prev=program_prefix ;;
322   -program-prefix=* | --program-prefix=* | --program-prefi=* \
323   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
324     program_prefix="$ac_optarg" ;;
325
326   -program-suffix | --program-suffix | --program-suffi | --program-suff \
327   | --program-suf | --program-su | --program-s)
328     ac_prev=program_suffix ;;
329   -program-suffix=* | --program-suffix=* | --program-suffi=* \
330   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
331     program_suffix="$ac_optarg" ;;
332
333   -program-transform-name | --program-transform-name \
334   | --program-transform-nam | --program-transform-na \
335   | --program-transform-n | --program-transform- \
336   | --program-transform | --program-transfor \
337   | --program-transfo | --program-transf \
338   | --program-trans | --program-tran \
339   | --progr-tra | --program-tr | --program-t)
340     ac_prev=program_transform_name ;;
341   -program-transform-name=* | --program-transform-name=* \
342   | --program-transform-nam=* | --program-transform-na=* \
343   | --program-transform-n=* | --program-transform-=* \
344   | --program-transform=* | --program-transfor=* \
345   | --program-transfo=* | --program-transf=* \
346   | --program-trans=* | --program-tran=* \
347   | --progr-tra=* | --program-tr=* | --program-t=*)
348     program_transform_name="$ac_optarg" ;;
349
350   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
351   | -silent | --silent | --silen | --sile | --sil)
352     silent=yes ;;
353
354   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
355     ac_prev=sbindir ;;
356   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
357   | --sbi=* | --sb=*)
358     sbindir="$ac_optarg" ;;
359
360   -sharedstatedir | --sharedstatedir | --sharedstatedi \
361   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
362   | --sharedst | --shareds | --shared | --share | --shar \
363   | --sha | --sh)
364     ac_prev=sharedstatedir ;;
365   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
366   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
367   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
368   | --sha=* | --sh=*)
369     sharedstatedir="$ac_optarg" ;;
370
371   -site | --site | --sit)
372     ac_prev=site ;;
373   -site=* | --site=* | --sit=*)
374     site="$ac_optarg" ;;
375
376   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
377     ac_prev=srcdir ;;
378   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
379     srcdir="$ac_optarg" ;;
380
381   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
382   | --syscon | --sysco | --sysc | --sys | --sy)
383     ac_prev=sysconfdir ;;
384   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
385   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
386     sysconfdir="$ac_optarg" ;;
387
388   -target | --target | --targe | --targ | --tar | --ta | --t)
389     ac_prev=target ;;
390   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
391     target="$ac_optarg" ;;
392
393   -v | -verbose | --verbose | --verbos | --verbo | --verb)
394     verbose=yes ;;
395
396   -version | --version | --versio | --versi | --vers)
397     echo "configure generated by autoconf version 2.13"
398     exit 0 ;;
399
400   -with-* | --with-*)
401     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
402     # Reject names that are not valid shell variable names.
403     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
404       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
405     fi
406     ac_package=`echo $ac_package| sed 's/-/_/g'`
407     case "$ac_option" in
408       *=*) ;;
409       *) ac_optarg=yes ;;
410     esac
411     eval "with_${ac_package}='$ac_optarg'" ;;
412
413   -without-* | --without-*)
414     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
417       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
418     fi
419     ac_package=`echo $ac_package| sed 's/-/_/g'`
420     eval "with_${ac_package}=no" ;;
421
422   --x)
423     # Obsolete; use --with-x.
424     with_x=yes ;;
425
426   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
427   | --x-incl | --x-inc | --x-in | --x-i)
428     ac_prev=x_includes ;;
429   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
430   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
431     x_includes="$ac_optarg" ;;
432
433   -x-libraries | --x-libraries | --x-librarie | --x-librari \
434   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
435     ac_prev=x_libraries ;;
436   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
437   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
438     x_libraries="$ac_optarg" ;;
439
440   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
441     ;;
442
443   *)
444     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
445       echo "configure: warning: $ac_option: invalid host type" 1>&2
446     fi
447     if test "x$nonopt" != xNONE; then
448       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
449     fi
450     nonopt="$ac_option"
451     ;;
452
453   esac
454 done
455
456 if test -n "$ac_prev"; then
457   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
458 fi
459
460 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
461
462 # File descriptor usage:
463 # 0 standard input
464 # 1 file creation
465 # 2 errors and warnings
466 # 3 some systems may open it to /dev/tty
467 # 4 used on the Kubota Titan
468 # 6 checking for... messages and results
469 # 5 compiler messages saved in config.log
470 if test "$silent" = yes; then
471   exec 6>/dev/null
472 else
473   exec 6>&1
474 fi
475 exec 5>./config.log
476
477 echo "\
478 This file contains any messages produced by compilers while
479 running configure, to aid debugging if configure makes a mistake.
480 " 1>&5
481
482 # Strip out --no-create and --no-recursion so they do not pile up.
483 # Also quote any args containing shell metacharacters.
484 ac_configure_args=
485 for ac_arg
486 do
487   case "$ac_arg" in
488   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
489   | --no-cr | --no-c) ;;
490   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
491   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
492   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
493   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
494   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
495   esac
496 done
497
498 # NLS nuisances.
499 # Only set these to C if already set.  These must not be set unconditionally
500 # because not all systems understand e.g. LANG=C (notably SCO).
501 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
502 # Non-C LC_CTYPE values break the ctype check.
503 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
504 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
505 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
506 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
507
508 # confdefs.h avoids OS command line length limits that DEFS can exceed.
509 rm -rf conftest* confdefs.h
510 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
511 echo > confdefs.h
512
513 # A filename unique to this package, relative to the directory that
514 # configure is in, which we can look for to find out if srcdir is correct.
515 ac_unique_file=include/includes.h
516
517 # Find the source files, if location was not specified.
518 if test -z "$srcdir"; then
519   ac_srcdir_defaulted=yes
520   # Try the directory containing this script, then its parent.
521   ac_prog=$0
522   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
523   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
524   srcdir=$ac_confdir
525   if test ! -r $srcdir/$ac_unique_file; then
526     srcdir=..
527   fi
528 else
529   ac_srcdir_defaulted=no
530 fi
531 if test ! -r $srcdir/$ac_unique_file; then
532   if test "$ac_srcdir_defaulted" = yes; then
533     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
534   else
535     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
536   fi
537 fi
538 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
539
540 # Prefer explicitly selected file to automatically selected ones.
541 if test -z "$CONFIG_SITE"; then
542   if test "x$prefix" != xNONE; then
543     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
544   else
545     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
546   fi
547 fi
548 for ac_site_file in $CONFIG_SITE; do
549   if test -r "$ac_site_file"; then
550     echo "loading site script $ac_site_file"
551     . "$ac_site_file"
552   fi
553 done
554
555 if test -r "$cache_file"; then
556   echo "loading cache $cache_file"
557   . $cache_file
558 else
559   echo "creating cache $cache_file"
560   > $cache_file
561 fi
562
563 ac_ext=c
564 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
565 ac_cpp='$CPP $CPPFLAGS'
566 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
567 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
568 cross_compiling=$ac_cv_prog_cc_cross
569
570 ac_exeext=
571 ac_objext=o
572 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
573   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
574   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
575     ac_n= ac_c='
576 ' ac_t='        '
577   else
578     ac_n=-n ac_c= ac_t=
579   fi
580 else
581   ac_n= ac_c='\c' ac_t=
582 fi
583
584
585
586 # we want to be compatibe with older versions of Samba
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604 # compile with optimisation and without debugging by default
605 CFLAGS="-O ${CFLAGS}"
606
607 # Check whether --enable-debug or --disable-debug was given.
608 if test "${enable_debug+set}" = set; then
609   enableval="$enable_debug"
610   if eval "test x$enable_debug = xyes"; then
611         CFLAGS="${CFLAGS} -g"
612     fi
613 fi
614
615
616 # Check whether --enable-developer or --disable-developer was given.
617 if test "${enable_developer+set}" = set; then
618   enableval="$enable_developer"
619   if eval "test x$enable_developer = xyes"; then
620         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
621     fi
622 fi
623
624
625 # Extract the first word of "gcc", so it can be a program name with args.
626 set dummy gcc; ac_word=$2
627 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
628 echo "configure:629: checking for $ac_word" >&5
629 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
630   echo $ac_n "(cached) $ac_c" 1>&6
631 else
632   if test -n "$CC"; then
633   ac_cv_prog_CC="$CC" # Let the user override the test.
634 else
635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
636   ac_dummy="$PATH"
637   for ac_dir in $ac_dummy; do
638     test -z "$ac_dir" && ac_dir=.
639     if test -f $ac_dir/$ac_word; then
640       ac_cv_prog_CC="gcc"
641       break
642     fi
643   done
644   IFS="$ac_save_ifs"
645 fi
646 fi
647 CC="$ac_cv_prog_CC"
648 if test -n "$CC"; then
649   echo "$ac_t""$CC" 1>&6
650 else
651   echo "$ac_t""no" 1>&6
652 fi
653
654 if test -z "$CC"; then
655   # Extract the first word of "cc", so it can be a program name with args.
656 set dummy cc; ac_word=$2
657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
658 echo "configure:659: checking for $ac_word" >&5
659 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
660   echo $ac_n "(cached) $ac_c" 1>&6
661 else
662   if test -n "$CC"; then
663   ac_cv_prog_CC="$CC" # Let the user override the test.
664 else
665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
666   ac_prog_rejected=no
667   ac_dummy="$PATH"
668   for ac_dir in $ac_dummy; do
669     test -z "$ac_dir" && ac_dir=.
670     if test -f $ac_dir/$ac_word; then
671       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
672         ac_prog_rejected=yes
673         continue
674       fi
675       ac_cv_prog_CC="cc"
676       break
677     fi
678   done
679   IFS="$ac_save_ifs"
680 if test $ac_prog_rejected = yes; then
681   # We found a bogon in the path, so make sure we never use it.
682   set dummy $ac_cv_prog_CC
683   shift
684   if test $# -gt 0; then
685     # We chose a different compiler from the bogus one.
686     # However, it has the same basename, so the bogon will be chosen
687     # first if we set CC to just the basename; use the full file name.
688     shift
689     set dummy "$ac_dir/$ac_word" "$@"
690     shift
691     ac_cv_prog_CC="$@"
692   fi
693 fi
694 fi
695 fi
696 CC="$ac_cv_prog_CC"
697 if test -n "$CC"; then
698   echo "$ac_t""$CC" 1>&6
699 else
700   echo "$ac_t""no" 1>&6
701 fi
702
703   if test -z "$CC"; then
704     case "`uname -s`" in
705     *win32* | *WIN32*)
706       # Extract the first word of "cl", so it can be a program name with args.
707 set dummy cl; ac_word=$2
708 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
709 echo "configure:710: checking for $ac_word" >&5
710 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
711   echo $ac_n "(cached) $ac_c" 1>&6
712 else
713   if test -n "$CC"; then
714   ac_cv_prog_CC="$CC" # Let the user override the test.
715 else
716   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
717   ac_dummy="$PATH"
718   for ac_dir in $ac_dummy; do
719     test -z "$ac_dir" && ac_dir=.
720     if test -f $ac_dir/$ac_word; then
721       ac_cv_prog_CC="cl"
722       break
723     fi
724   done
725   IFS="$ac_save_ifs"
726 fi
727 fi
728 CC="$ac_cv_prog_CC"
729 if test -n "$CC"; then
730   echo "$ac_t""$CC" 1>&6
731 else
732   echo "$ac_t""no" 1>&6
733 fi
734  ;;
735     esac
736   fi
737   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
738 fi
739
740 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
741 echo "configure:742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
742
743 ac_ext=c
744 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
745 ac_cpp='$CPP $CPPFLAGS'
746 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
747 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
748 cross_compiling=$ac_cv_prog_cc_cross
749
750 cat > conftest.$ac_ext << EOF
751
752 #line 753 "configure"
753 #include "confdefs.h"
754
755 main(){return(0);}
756 EOF
757 if { (eval echo configure:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
758   ac_cv_prog_cc_works=yes
759   # If we can't run a trivial program, we are probably using a cross compiler.
760   if (./conftest; exit) 2>/dev/null; then
761     ac_cv_prog_cc_cross=no
762   else
763     ac_cv_prog_cc_cross=yes
764   fi
765 else
766   echo "configure: failed program was:" >&5
767   cat conftest.$ac_ext >&5
768   ac_cv_prog_cc_works=no
769 fi
770 rm -fr conftest*
771 ac_ext=c
772 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
773 ac_cpp='$CPP $CPPFLAGS'
774 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
775 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
776 cross_compiling=$ac_cv_prog_cc_cross
777
778 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
779 if test $ac_cv_prog_cc_works = no; then
780   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
781 fi
782 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
783 echo "configure:784: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
784 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
785 cross_compiling=$ac_cv_prog_cc_cross
786
787 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
788 echo "configure:789: checking whether we are using GNU C" >&5
789 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
790   echo $ac_n "(cached) $ac_c" 1>&6
791 else
792   cat > conftest.c <<EOF
793 #ifdef __GNUC__
794   yes;
795 #endif
796 EOF
797 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
798   ac_cv_prog_gcc=yes
799 else
800   ac_cv_prog_gcc=no
801 fi
802 fi
803
804 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
805
806 if test $ac_cv_prog_gcc = yes; then
807   GCC=yes
808 else
809   GCC=
810 fi
811
812 ac_test_CFLAGS="${CFLAGS+set}"
813 ac_save_CFLAGS="$CFLAGS"
814 CFLAGS=
815 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
816 echo "configure:817: checking whether ${CC-cc} accepts -g" >&5
817 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
818   echo $ac_n "(cached) $ac_c" 1>&6
819 else
820   echo 'void f(){}' > conftest.c
821 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
822   ac_cv_prog_cc_g=yes
823 else
824   ac_cv_prog_cc_g=no
825 fi
826 rm -f conftest*
827
828 fi
829
830 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
831 if test "$ac_test_CFLAGS" = set; then
832   CFLAGS="$ac_save_CFLAGS"
833 elif test $ac_cv_prog_cc_g = yes; then
834   if test "$GCC" = yes; then
835     CFLAGS="-g -O2"
836   else
837     CFLAGS="-g"
838   fi
839 else
840   if test "$GCC" = yes; then
841     CFLAGS="-O2"
842   else
843     CFLAGS=
844   fi
845 fi
846
847 ac_aux_dir=
848 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
849   if test -f $ac_dir/install-sh; then
850     ac_aux_dir=$ac_dir
851     ac_install_sh="$ac_aux_dir/install-sh -c"
852     break
853   elif test -f $ac_dir/install.sh; then
854     ac_aux_dir=$ac_dir
855     ac_install_sh="$ac_aux_dir/install.sh -c"
856     break
857   fi
858 done
859 if test -z "$ac_aux_dir"; then
860   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
861 fi
862 ac_config_guess=$ac_aux_dir/config.guess
863 ac_config_sub=$ac_aux_dir/config.sub
864 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
865
866 # Find a good install program.  We prefer a C program (faster),
867 # so one script is as good as another.  But avoid the broken or
868 # incompatible versions:
869 # SysV /etc/install, /usr/sbin/install
870 # SunOS /usr/etc/install
871 # IRIX /sbin/install
872 # AIX /bin/install
873 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
874 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
875 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
876 # ./install, which can be erroneously created by make from ./install.sh.
877 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
878 echo "configure:879: checking for a BSD compatible install" >&5
879 if test -z "$INSTALL"; then
880 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
881   echo $ac_n "(cached) $ac_c" 1>&6
882 else
883     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
884   for ac_dir in $PATH; do
885     # Account for people who put trailing slashes in PATH elements.
886     case "$ac_dir/" in
887     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
888     *)
889       # OSF1 and SCO ODT 3.0 have their own names for install.
890       # Don't use installbsd from OSF since it installs stuff as root
891       # by default.
892       for ac_prog in ginstall scoinst install; do
893         if test -f $ac_dir/$ac_prog; then
894           if test $ac_prog = install &&
895             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
896             # AIX install.  It has an incompatible calling convention.
897             :
898           else
899             ac_cv_path_install="$ac_dir/$ac_prog -c"
900             break 2
901           fi
902         fi
903       done
904       ;;
905     esac
906   done
907   IFS="$ac_save_IFS"
908
909 fi
910   if test "${ac_cv_path_install+set}" = set; then
911     INSTALL="$ac_cv_path_install"
912   else
913     # As a last resort, use the slow shell script.  We don't cache a
914     # path for INSTALL within a source directory, because that will
915     # break other packages using the cache if that directory is
916     # removed, or if the path is relative.
917     INSTALL="$ac_install_sh"
918   fi
919 fi
920 echo "$ac_t""$INSTALL" 1>&6
921
922 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
923 # It thinks the first close brace ends the variable substitution.
924 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
925
926 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
927
928 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
929
930 for ac_prog in gawk mawk nawk awk
931 do
932 # Extract the first word of "$ac_prog", so it can be a program name with args.
933 set dummy $ac_prog; ac_word=$2
934 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
935 echo "configure:936: checking for $ac_word" >&5
936 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
937   echo $ac_n "(cached) $ac_c" 1>&6
938 else
939   if test -n "$AWK"; then
940   ac_cv_prog_AWK="$AWK" # Let the user override the test.
941 else
942   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
943   ac_dummy="$PATH"
944   for ac_dir in $ac_dummy; do
945     test -z "$ac_dir" && ac_dir=.
946     if test -f $ac_dir/$ac_word; then
947       ac_cv_prog_AWK="$ac_prog"
948       break
949     fi
950   done
951   IFS="$ac_save_ifs"
952 fi
953 fi
954 AWK="$ac_cv_prog_AWK"
955 if test -n "$AWK"; then
956   echo "$ac_t""$AWK" 1>&6
957 else
958   echo "$ac_t""no" 1>&6
959 fi
960
961 test -n "$AWK" && break
962 done
963
964
965 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
966 echo "configure:967: checking for POSIXized ISC" >&5
967 if test -d /etc/conf/kconfig.d &&
968   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
969 then
970   echo "$ac_t""yes" 1>&6
971   ISC=yes # If later tests want to check for ISC.
972   cat >> confdefs.h <<\EOF
973 #define _POSIX_SOURCE 1
974 EOF
975
976   if test "$GCC" = yes; then
977     CC="$CC -posix"
978   else
979     CC="$CC -Xp"
980   fi
981 else
982   echo "$ac_t""no" 1>&6
983   ISC=
984 fi
985
986
987 if test "x$CC" != xcc; then
988   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
989 echo "configure:990: checking whether $CC and cc understand -c and -o together" >&5
990 else
991   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
992 echo "configure:993: checking whether cc understands -c and -o together" >&5
993 fi
994 set dummy $CC; ac_cc="`echo $2 |
995                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
996 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
997   echo $ac_n "(cached) $ac_c" 1>&6
998 else
999   echo 'foo(){}' > conftest.c
1000 # Make sure it works both with $CC and with simple cc.
1001 # We do the test twice because some compilers refuse to overwrite an
1002 # existing .o file with -o, though they will create one.
1003 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1004 if { (eval echo configure:1005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1005    test -f conftest.o && { (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1006 then
1007   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1008   if test "x$CC" != xcc; then
1009     # Test first that cc exists at all.
1010     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1011       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1012       if { (eval echo configure:1013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1013          test -f conftest.o && { (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1014       then
1015         # cc works too.
1016         :
1017       else
1018         # cc exists but doesn't like -o.
1019         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1020       fi
1021     fi
1022   fi
1023 else
1024   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1025 fi
1026 rm -f conftest*
1027
1028 fi
1029 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1030   echo "$ac_t""yes" 1>&6
1031 else
1032   echo "$ac_t""no" 1>&6
1033   cat >> confdefs.h <<\EOF
1034 #define NO_MINUS_C_MINUS_O 1
1035 EOF
1036
1037 fi
1038
1039 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1040       BROKEN_CC=
1041 else
1042       BROKEN_CC=#
1043 fi
1044
1045
1046 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1047 echo "configure:1048: checking that the C compiler understands volatile" >&5
1048 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1049   echo $ac_n "(cached) $ac_c" 1>&6
1050 else
1051   
1052     cat > conftest.$ac_ext <<EOF
1053 #line 1054 "configure"
1054 #include "confdefs.h"
1055 #include <sys/types.h>
1056 int main() {
1057 volatile int i = 0
1058 ; return 0; }
1059 EOF
1060 if { (eval echo configure:1061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1061   rm -rf conftest*
1062   samba_cv_volatile=yes
1063 else
1064   echo "configure: failed program was:" >&5
1065   cat conftest.$ac_ext >&5
1066   rm -rf conftest*
1067   samba_cv_volatile=no
1068 fi
1069 rm -f conftest*
1070 fi
1071
1072 echo "$ac_t""$samba_cv_volatile" 1>&6
1073 if test x"$samba_cv_volatile" = x"yes"; then
1074    cat >> confdefs.h <<\EOF
1075 #define HAVE_VOLATILE 1
1076 EOF
1077
1078 fi
1079
1080
1081
1082 # Do some error checking and defaulting for the host and target type.
1083 # The inputs are:
1084 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1085 #
1086 # The rules are:
1087 # 1. You are not allowed to specify --host, --target, and nonopt at the
1088 #    same time.
1089 # 2. Host defaults to nonopt.
1090 # 3. If nonopt is not specified, then host defaults to the current host,
1091 #    as determined by config.guess.
1092 # 4. Target and build default to nonopt.
1093 # 5. If nonopt is not specified, then target and build default to host.
1094
1095 # The aliases save the names the user supplied, while $host etc.
1096 # will get canonicalized.
1097 case $host---$target---$nonopt in
1098 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1099 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1100 esac
1101
1102
1103 # Make sure we can run config.sub.
1104 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1105 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1106 fi
1107
1108 echo $ac_n "checking host system type""... $ac_c" 1>&6
1109 echo "configure:1110: checking host system type" >&5
1110
1111 host_alias=$host
1112 case "$host_alias" in
1113 NONE)
1114   case $nonopt in
1115   NONE)
1116     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1117     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1118     fi ;;
1119   *) host_alias=$nonopt ;;
1120   esac ;;
1121 esac
1122
1123 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1124 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1125 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1126 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1127 echo "$ac_t""$host" 1>&6
1128
1129 echo $ac_n "checking target system type""... $ac_c" 1>&6
1130 echo "configure:1131: checking target system type" >&5
1131
1132 target_alias=$target
1133 case "$target_alias" in
1134 NONE)
1135   case $nonopt in
1136   NONE) target_alias=$host_alias ;;
1137   *) target_alias=$nonopt ;;
1138   esac ;;
1139 esac
1140
1141 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1142 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1143 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1144 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1145 echo "$ac_t""$target" 1>&6
1146
1147 echo $ac_n "checking build system type""... $ac_c" 1>&6
1148 echo "configure:1149: checking build system type" >&5
1149
1150 build_alias=$build
1151 case "$build_alias" in
1152 NONE)
1153   case $nonopt in
1154   NONE) build_alias=$host_alias ;;
1155   *) build_alias=$nonopt ;;
1156   esac ;;
1157 esac
1158
1159 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1160 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1161 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1162 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1163 echo "$ac_t""$build" 1>&6
1164
1165 test "$host_alias" != "$target_alias" &&
1166   test "$program_prefix$program_suffix$program_transform_name" = \
1167     NONENONEs,x,x, &&
1168   program_prefix=${target_alias}-
1169
1170
1171   case "$host_os" in
1172         *irix6*) cat >> confdefs.h <<\EOF
1173 #include <standards.h>
1174 EOF
1175
1176         ;;
1177 esac
1178
1179
1180     
1181     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1182 echo "configure:1183: checking config.cache system type" >&5
1183     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1184          test x"$ac_cv_host_system_type" != x"$host"; } ||
1185        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1186          test x"$ac_cv_build_system_type" != x"$build"; } ||
1187        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1188          test x"$ac_cv_target_system_type" != x"$target"; }; then
1189         echo "$ac_t""different" 1>&6
1190         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1191     else
1192         echo "$ac_t""same" 1>&6
1193     fi
1194     ac_cv_host_system_type="$host"
1195     ac_cv_build_system_type="$build"
1196     ac_cv_target_system_type="$target"
1197
1198
1199 #
1200 # Config CPPFLAG settings for strange OS's that must be set
1201 # before other tests.
1202 #
1203 case "$host_os" in
1204 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1205     *hpux*)
1206       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1207 echo "configure:1208: checking whether ${CC-cc} accepts -Ae" >&5
1208 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1209   echo $ac_n "(cached) $ac_c" 1>&6
1210 else
1211   echo 'void f(){}' > conftest.c
1212 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1213   ac_cv_prog_cc_Ae=yes
1214 else
1215   ac_cv_prog_cc_Ae=no
1216 fi
1217 rm -f conftest*
1218
1219 fi
1220
1221 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1222       # mmap on HPUX is completely broken...
1223       cat >> confdefs.h <<\EOF
1224 #define MMAP_BLACKLIST 1
1225 EOF
1226
1227       if test $ac_cv_prog_cc_Ae = yes; then
1228         CPPFLAGS="$CPPFLAGS -Ae"
1229       fi
1230 #
1231 # Defines needed for HPUX support.
1232 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1233 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1234 #
1235       case `uname -r` in
1236                         *9*|*10*)
1237                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1238                                 cat >> confdefs.h <<\EOF
1239 #define USE_BOTH_CRYPT_CALLS 1
1240 EOF
1241
1242                                 ;;
1243                         *11*)
1244                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1245                                 cat >> confdefs.h <<\EOF
1246 #define USE_BOTH_CRYPT_CALLS 1
1247 EOF
1248
1249                                 ;;
1250       esac
1251       ;;
1252 #
1253 # AIX4.x doesn't even admit to having large
1254 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1255 #
1256     *aix4*)
1257           echo "$ac_t""enabling large file support" 1>&6
1258       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1259       ;;    
1260 #
1261 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1262 # to the existance of large files..
1263 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1264 # recommendations on large file support, however it makes the
1265 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1266 # recommendation makes the compile fail on gcc2.7. JRA.
1267 #
1268         *solaris*)
1269                 case `uname -r` in
1270                         5.0*|5.1*|5.2*|5.3*|5.5*)
1271                                 echo "$ac_t""no large file support" 1>&6
1272                                 ;;
1273                         5.*)
1274                         echo "$ac_t""enabling large file support" 1>&6
1275                         if test "$ac_cv_prog_gcc" = yes; then
1276                                 ${CC-cc} -v >conftest.c 2>&1
1277                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1278                                 rm -fr conftest.c
1279                                 case "$ac_cv_gcc_compiler_version_number" in
1280                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1281                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1282                                                 ;;
1283                                         *)
1284                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1285                                                 ;;
1286                                 esac
1287                         else
1288                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1289                         fi
1290                         ;;
1291                 esac
1292                 ;;
1293 #
1294 # Tests needed for SINIX large file support.
1295 #
1296     *sysv4*)
1297       if test $host = mips-sni-sysv4 ; then
1298         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1299 echo "configure:1300: checking for LFS support" >&5
1300         old_CPPFLAGS="$CPPFLAGS"
1301         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1302         if test "$cross_compiling" = yes; then
1303   SINIX_LFS_SUPPORT=cross
1304 else
1305   cat > conftest.$ac_ext <<EOF
1306 #line 1307 "configure"
1307 #include "confdefs.h"
1308
1309 #include <unistd.h>
1310 main () {
1311 #if _LFS64_LARGEFILE == 1
1312 exit(0);
1313 #else
1314 exit(1);
1315 #endif
1316 }
1317 EOF
1318 if { (eval echo configure:1319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1319 then
1320   SINIX_LFS_SUPPORT=yes
1321 else
1322   echo "configure: failed program was:" >&5
1323   cat conftest.$ac_ext >&5
1324   rm -fr conftest*
1325   SINIX_LFS_SUPPORT=no
1326 fi
1327 rm -fr conftest*
1328 fi
1329
1330         CPPFLAGS="$old_CPPFLAGS"
1331         if test x$SINIX_LFS_SUPPORT = xyes ; then
1332           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1333           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1334           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1335           LIBS="`getconf LFS64_LIBS` $LIBS"
1336         fi
1337       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1338       fi
1339     ;;
1340
1341 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1342 #
1343     *linux*)
1344         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1345 echo "configure:1346: checking for LFS support" >&5
1346         old_CPPFLAGS="$CPPFLAGS"
1347         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1348        if test "$cross_compiling" = yes; then
1349   LINUX_LFS_SUPPORT=cross
1350 else
1351   cat > conftest.$ac_ext <<EOF
1352 #line 1353 "configure"
1353 #include "confdefs.h"
1354
1355 #include <unistd.h>
1356 #include <sys/utsname.h>
1357 main() {
1358 #if _LFS64_LARGEFILE == 1
1359        struct utsname uts;
1360        char *release;
1361        int major, minor;
1362
1363        /* Ensure this is glibc 2.2 or higher */
1364 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1365        int libc_major = __GLIBC__;
1366        int libc_minor = __GLIBC_MINOR__;
1367
1368        if (libc_major < 2)
1369               exit(1);
1370        if (libc_minor < 2)
1371               exit(1);
1372 #endif
1373
1374        /* Ensure this is kernel 2.4 or higher */
1375
1376        uname(&uts);
1377        release = uts.release;
1378        major = atoi(strsep(&release, "."));
1379        minor = atoi(strsep(&release, "."));
1380
1381        if (major > 2 || (major == 2 && minor > 3))
1382                exit(0);
1383        exit(1);
1384 #else
1385        exit(1);
1386 #endif
1387 }
1388
1389 EOF
1390 if { (eval echo configure:1391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1391 then
1392   LINUX_LFS_SUPPORT=yes
1393 else
1394   echo "configure: failed program was:" >&5
1395   cat conftest.$ac_ext >&5
1396   rm -fr conftest*
1397   LINUX_LFS_SUPPORT=no
1398 fi
1399 rm -fr conftest*
1400 fi
1401
1402         CPPFLAGS="$old_CPPFLAGS"
1403         if test x$LINUX_LFS_SUPPORT = xyes ; then
1404           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1405         fi
1406        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1407                 ;;
1408
1409     *hurd*)
1410         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1411 echo "configure:1412: checking for LFS support" >&5
1412         old_CPPFLAGS="$CPPFLAGS"
1413         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1414         if test "$cross_compiling" = yes; then
1415   GLIBC_LFS_SUPPORT=cross
1416 else
1417   cat > conftest.$ac_ext <<EOF
1418 #line 1419 "configure"
1419 #include "confdefs.h"
1420
1421 #include <unistd.h>
1422 main () {
1423 #if _LFS64_LARGEFILE == 1
1424 exit(0);
1425 #else
1426 exit(1);
1427 #endif
1428 }
1429 EOF
1430 if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1431 then
1432   GLIBC_LFS_SUPPORT=yes
1433 else
1434   echo "configure: failed program was:" >&5
1435   cat conftest.$ac_ext >&5
1436   rm -fr conftest*
1437   GLIBC_LFS_SUPPORT=no
1438 fi
1439 rm -fr conftest*
1440 fi
1441
1442         CPPFLAGS="$old_CPPFLAGS"
1443         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1444           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1445         fi
1446       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1447     ;;
1448
1449 esac
1450
1451 echo $ac_n "checking for inline""... $ac_c" 1>&6
1452 echo "configure:1453: checking for inline" >&5
1453 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1454   echo $ac_n "(cached) $ac_c" 1>&6
1455 else
1456   ac_cv_c_inline=no
1457 for ac_kw in inline __inline__ __inline; do
1458   cat > conftest.$ac_ext <<EOF
1459 #line 1460 "configure"
1460 #include "confdefs.h"
1461
1462 int main() {
1463 } $ac_kw foo() {
1464 ; return 0; }
1465 EOF
1466 if { (eval echo configure:1467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1467   rm -rf conftest*
1468   ac_cv_c_inline=$ac_kw; break
1469 else
1470   echo "configure: failed program was:" >&5
1471   cat conftest.$ac_ext >&5
1472 fi
1473 rm -f conftest*
1474 done
1475
1476 fi
1477
1478 echo "$ac_t""$ac_cv_c_inline" 1>&6
1479 case "$ac_cv_c_inline" in
1480   inline | yes) ;;
1481   no) cat >> confdefs.h <<\EOF
1482 #define inline 
1483 EOF
1484  ;;
1485   *)  cat >> confdefs.h <<EOF
1486 #define inline $ac_cv_c_inline
1487 EOF
1488  ;;
1489 esac
1490
1491 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1492 echo "configure:1493: checking how to run the C preprocessor" >&5
1493 # On Suns, sometimes $CPP names a directory.
1494 if test -n "$CPP" && test -d "$CPP"; then
1495   CPP=
1496 fi
1497 if test -z "$CPP"; then
1498 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1499   echo $ac_n "(cached) $ac_c" 1>&6
1500 else
1501     # This must be in double quotes, not single quotes, because CPP may get
1502   # substituted into the Makefile and "${CC-cc}" will confuse make.
1503   CPP="${CC-cc} -E"
1504   # On the NeXT, cc -E runs the code through the compiler's parser,
1505   # not just through cpp.
1506   cat > conftest.$ac_ext <<EOF
1507 #line 1508 "configure"
1508 #include "confdefs.h"
1509 #include <assert.h>
1510 Syntax Error
1511 EOF
1512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1513 { (eval echo configure:1514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1515 if test -z "$ac_err"; then
1516   :
1517 else
1518   echo "$ac_err" >&5
1519   echo "configure: failed program was:" >&5
1520   cat conftest.$ac_ext >&5
1521   rm -rf conftest*
1522   CPP="${CC-cc} -E -traditional-cpp"
1523   cat > conftest.$ac_ext <<EOF
1524 #line 1525 "configure"
1525 #include "confdefs.h"
1526 #include <assert.h>
1527 Syntax Error
1528 EOF
1529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1530 { (eval echo configure:1531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1532 if test -z "$ac_err"; then
1533   :
1534 else
1535   echo "$ac_err" >&5
1536   echo "configure: failed program was:" >&5
1537   cat conftest.$ac_ext >&5
1538   rm -rf conftest*
1539   CPP="${CC-cc} -nologo -E"
1540   cat > conftest.$ac_ext <<EOF
1541 #line 1542 "configure"
1542 #include "confdefs.h"
1543 #include <assert.h>
1544 Syntax Error
1545 EOF
1546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1547 { (eval echo configure:1548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1549 if test -z "$ac_err"; then
1550   :
1551 else
1552   echo "$ac_err" >&5
1553   echo "configure: failed program was:" >&5
1554   cat conftest.$ac_ext >&5
1555   rm -rf conftest*
1556   CPP=/lib/cpp
1557 fi
1558 rm -f conftest*
1559 fi
1560 rm -f conftest*
1561 fi
1562 rm -f conftest*
1563   ac_cv_prog_CPP="$CPP"
1564 fi
1565   CPP="$ac_cv_prog_CPP"
1566 else
1567   ac_cv_prog_CPP="$CPP"
1568 fi
1569 echo "$ac_t""$CPP" 1>&6
1570
1571 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1572 echo "configure:1573: checking for ANSI C header files" >&5
1573 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1574   echo $ac_n "(cached) $ac_c" 1>&6
1575 else
1576   cat > conftest.$ac_ext <<EOF
1577 #line 1578 "configure"
1578 #include "confdefs.h"
1579 #include <stdlib.h>
1580 #include <stdarg.h>
1581 #include <string.h>
1582 #include <float.h>
1583 EOF
1584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1585 { (eval echo configure:1586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1587 if test -z "$ac_err"; then
1588   rm -rf conftest*
1589   ac_cv_header_stdc=yes
1590 else
1591   echo "$ac_err" >&5
1592   echo "configure: failed program was:" >&5
1593   cat conftest.$ac_ext >&5
1594   rm -rf conftest*
1595   ac_cv_header_stdc=no
1596 fi
1597 rm -f conftest*
1598
1599 if test $ac_cv_header_stdc = yes; then
1600   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1601 cat > conftest.$ac_ext <<EOF
1602 #line 1603 "configure"
1603 #include "confdefs.h"
1604 #include <string.h>
1605 EOF
1606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1607   egrep "memchr" >/dev/null 2>&1; then
1608   :
1609 else
1610   rm -rf conftest*
1611   ac_cv_header_stdc=no
1612 fi
1613 rm -f conftest*
1614
1615 fi
1616
1617 if test $ac_cv_header_stdc = yes; then
1618   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1619 cat > conftest.$ac_ext <<EOF
1620 #line 1621 "configure"
1621 #include "confdefs.h"
1622 #include <stdlib.h>
1623 EOF
1624 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1625   egrep "free" >/dev/null 2>&1; then
1626   :
1627 else
1628   rm -rf conftest*
1629   ac_cv_header_stdc=no
1630 fi
1631 rm -f conftest*
1632
1633 fi
1634
1635 if test $ac_cv_header_stdc = yes; then
1636   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1637 if test "$cross_compiling" = yes; then
1638   :
1639 else
1640   cat > conftest.$ac_ext <<EOF
1641 #line 1642 "configure"
1642 #include "confdefs.h"
1643 #include <ctype.h>
1644 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1645 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1646 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1647 int main () { int i; for (i = 0; i < 256; i++)
1648 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1649 exit (0); }
1650
1651 EOF
1652 if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1653 then
1654   :
1655 else
1656   echo "configure: failed program was:" >&5
1657   cat conftest.$ac_ext >&5
1658   rm -fr conftest*
1659   ac_cv_header_stdc=no
1660 fi
1661 rm -fr conftest*
1662 fi
1663
1664 fi
1665 fi
1666
1667 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1668 if test $ac_cv_header_stdc = yes; then
1669   cat >> confdefs.h <<\EOF
1670 #define STDC_HEADERS 1
1671 EOF
1672
1673 fi
1674
1675 ac_header_dirent=no
1676 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1677 do
1678 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1679 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1680 echo "configure:1681: checking for $ac_hdr that defines DIR" >&5
1681 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1682   echo $ac_n "(cached) $ac_c" 1>&6
1683 else
1684   cat > conftest.$ac_ext <<EOF
1685 #line 1686 "configure"
1686 #include "confdefs.h"
1687 #include <sys/types.h>
1688 #include <$ac_hdr>
1689 int main() {
1690 DIR *dirp = 0;
1691 ; return 0; }
1692 EOF
1693 if { (eval echo configure:1694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1694   rm -rf conftest*
1695   eval "ac_cv_header_dirent_$ac_safe=yes"
1696 else
1697   echo "configure: failed program was:" >&5
1698   cat conftest.$ac_ext >&5
1699   rm -rf conftest*
1700   eval "ac_cv_header_dirent_$ac_safe=no"
1701 fi
1702 rm -f conftest*
1703 fi
1704 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1705   echo "$ac_t""yes" 1>&6
1706     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1707   cat >> confdefs.h <<EOF
1708 #define $ac_tr_hdr 1
1709 EOF
1710  ac_header_dirent=$ac_hdr; break
1711 else
1712   echo "$ac_t""no" 1>&6
1713 fi
1714 done
1715 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1716 if test $ac_header_dirent = dirent.h; then
1717 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1718 echo "configure:1719: checking for opendir in -ldir" >&5
1719 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1720 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1721   echo $ac_n "(cached) $ac_c" 1>&6
1722 else
1723   ac_save_LIBS="$LIBS"
1724 LIBS="-ldir  $LIBS"
1725 cat > conftest.$ac_ext <<EOF
1726 #line 1727 "configure"
1727 #include "confdefs.h"
1728 /* Override any gcc2 internal prototype to avoid an error.  */
1729 /* We use char because int might match the return type of a gcc2
1730     builtin and then its argument prototype would still apply.  */
1731 char opendir();
1732
1733 int main() {
1734 opendir()
1735 ; return 0; }
1736 EOF
1737 if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1738   rm -rf conftest*
1739   eval "ac_cv_lib_$ac_lib_var=yes"
1740 else
1741   echo "configure: failed program was:" >&5
1742   cat conftest.$ac_ext >&5
1743   rm -rf conftest*
1744   eval "ac_cv_lib_$ac_lib_var=no"
1745 fi
1746 rm -f conftest*
1747 LIBS="$ac_save_LIBS"
1748
1749 fi
1750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1751   echo "$ac_t""yes" 1>&6
1752   LIBS="$LIBS -ldir"
1753 else
1754   echo "$ac_t""no" 1>&6
1755 fi
1756
1757 else
1758 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1759 echo "configure:1760: checking for opendir in -lx" >&5
1760 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1761 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1762   echo $ac_n "(cached) $ac_c" 1>&6
1763 else
1764   ac_save_LIBS="$LIBS"
1765 LIBS="-lx  $LIBS"
1766 cat > conftest.$ac_ext <<EOF
1767 #line 1768 "configure"
1768 #include "confdefs.h"
1769 /* Override any gcc2 internal prototype to avoid an error.  */
1770 /* We use char because int might match the return type of a gcc2
1771     builtin and then its argument prototype would still apply.  */
1772 char opendir();
1773
1774 int main() {
1775 opendir()
1776 ; return 0; }
1777 EOF
1778 if { (eval echo configure:1779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1779   rm -rf conftest*
1780   eval "ac_cv_lib_$ac_lib_var=yes"
1781 else
1782   echo "configure: failed program was:" >&5
1783   cat conftest.$ac_ext >&5
1784   rm -rf conftest*
1785   eval "ac_cv_lib_$ac_lib_var=no"
1786 fi
1787 rm -f conftest*
1788 LIBS="$ac_save_LIBS"
1789
1790 fi
1791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1792   echo "$ac_t""yes" 1>&6
1793   LIBS="$LIBS -lx"
1794 else
1795   echo "$ac_t""no" 1>&6
1796 fi
1797
1798 fi
1799
1800 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1801 echo "configure:1802: checking whether time.h and sys/time.h may both be included" >&5
1802 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1803   echo $ac_n "(cached) $ac_c" 1>&6
1804 else
1805   cat > conftest.$ac_ext <<EOF
1806 #line 1807 "configure"
1807 #include "confdefs.h"
1808 #include <sys/types.h>
1809 #include <sys/time.h>
1810 #include <time.h>
1811 int main() {
1812 struct tm *tp;
1813 ; return 0; }
1814 EOF
1815 if { (eval echo configure:1816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1816   rm -rf conftest*
1817   ac_cv_header_time=yes
1818 else
1819   echo "configure: failed program was:" >&5
1820   cat conftest.$ac_ext >&5
1821   rm -rf conftest*
1822   ac_cv_header_time=no
1823 fi
1824 rm -f conftest*
1825 fi
1826
1827 echo "$ac_t""$ac_cv_header_time" 1>&6
1828 if test $ac_cv_header_time = yes; then
1829   cat >> confdefs.h <<\EOF
1830 #define TIME_WITH_SYS_TIME 1
1831 EOF
1832
1833 fi
1834
1835 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1836 echo "configure:1837: checking for sys/wait.h that is POSIX.1 compatible" >&5
1837 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1838   echo $ac_n "(cached) $ac_c" 1>&6
1839 else
1840   cat > conftest.$ac_ext <<EOF
1841 #line 1842 "configure"
1842 #include "confdefs.h"
1843 #include <sys/types.h>
1844 #include <sys/wait.h>
1845 #ifndef WEXITSTATUS
1846 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1847 #endif
1848 #ifndef WIFEXITED
1849 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1850 #endif
1851 int main() {
1852 int s;
1853 wait (&s);
1854 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1855 ; return 0; }
1856 EOF
1857 if { (eval echo configure:1858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1858   rm -rf conftest*
1859   ac_cv_header_sys_wait_h=yes
1860 else
1861   echo "configure: failed program was:" >&5
1862   cat conftest.$ac_ext >&5
1863   rm -rf conftest*
1864   ac_cv_header_sys_wait_h=no
1865 fi
1866 rm -f conftest*
1867 fi
1868
1869 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1870 if test $ac_cv_header_sys_wait_h = yes; then
1871   cat >> confdefs.h <<\EOF
1872 #define HAVE_SYS_WAIT_H 1
1873 EOF
1874
1875 fi
1876
1877 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1878 do
1879 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1880 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1881 echo "configure:1882: checking for $ac_hdr" >&5
1882 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1883   echo $ac_n "(cached) $ac_c" 1>&6
1884 else
1885   cat > conftest.$ac_ext <<EOF
1886 #line 1887 "configure"
1887 #include "confdefs.h"
1888 #include <$ac_hdr>
1889 EOF
1890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1891 { (eval echo configure:1892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1893 if test -z "$ac_err"; then
1894   rm -rf conftest*
1895   eval "ac_cv_header_$ac_safe=yes"
1896 else
1897   echo "$ac_err" >&5
1898   echo "configure: failed program was:" >&5
1899   cat conftest.$ac_ext >&5
1900   rm -rf conftest*
1901   eval "ac_cv_header_$ac_safe=no"
1902 fi
1903 rm -f conftest*
1904 fi
1905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1906   echo "$ac_t""yes" 1>&6
1907     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1908   cat >> confdefs.h <<EOF
1909 #define $ac_tr_hdr 1
1910 EOF
1911  
1912 else
1913   echo "$ac_t""no" 1>&6
1914 fi
1915 done
1916
1917 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1918 do
1919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1921 echo "configure:1922: checking for $ac_hdr" >&5
1922 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1923   echo $ac_n "(cached) $ac_c" 1>&6
1924 else
1925   cat > conftest.$ac_ext <<EOF
1926 #line 1927 "configure"
1927 #include "confdefs.h"
1928 #include <$ac_hdr>
1929 EOF
1930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1931 { (eval echo configure:1932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1933 if test -z "$ac_err"; then
1934   rm -rf conftest*
1935   eval "ac_cv_header_$ac_safe=yes"
1936 else
1937   echo "$ac_err" >&5
1938   echo "configure: failed program was:" >&5
1939   cat conftest.$ac_ext >&5
1940   rm -rf conftest*
1941   eval "ac_cv_header_$ac_safe=no"
1942 fi
1943 rm -f conftest*
1944 fi
1945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1946   echo "$ac_t""yes" 1>&6
1947     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1948   cat >> confdefs.h <<EOF
1949 #define $ac_tr_hdr 1
1950 EOF
1951  
1952 else
1953   echo "$ac_t""no" 1>&6
1954 fi
1955 done
1956
1957 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1958 do
1959 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1960 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1961 echo "configure:1962: checking for $ac_hdr" >&5
1962 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1963   echo $ac_n "(cached) $ac_c" 1>&6
1964 else
1965   cat > conftest.$ac_ext <<EOF
1966 #line 1967 "configure"
1967 #include "confdefs.h"
1968 #include <$ac_hdr>
1969 EOF
1970 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1971 { (eval echo configure:1972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1972 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1973 if test -z "$ac_err"; then
1974   rm -rf conftest*
1975   eval "ac_cv_header_$ac_safe=yes"
1976 else
1977   echo "$ac_err" >&5
1978   echo "configure: failed program was:" >&5
1979   cat conftest.$ac_ext >&5
1980   rm -rf conftest*
1981   eval "ac_cv_header_$ac_safe=no"
1982 fi
1983 rm -f conftest*
1984 fi
1985 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1986   echo "$ac_t""yes" 1>&6
1987     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1988   cat >> confdefs.h <<EOF
1989 #define $ac_tr_hdr 1
1990 EOF
1991  
1992 else
1993   echo "$ac_t""no" 1>&6
1994 fi
1995 done
1996
1997 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
1998 do
1999 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2000 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2001 echo "configure:2002: checking for $ac_hdr" >&5
2002 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2003   echo $ac_n "(cached) $ac_c" 1>&6
2004 else
2005   cat > conftest.$ac_ext <<EOF
2006 #line 2007 "configure"
2007 #include "confdefs.h"
2008 #include <$ac_hdr>
2009 EOF
2010 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2011 { (eval echo configure:2012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2012 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2013 if test -z "$ac_err"; then
2014   rm -rf conftest*
2015   eval "ac_cv_header_$ac_safe=yes"
2016 else
2017   echo "$ac_err" >&5
2018   echo "configure: failed program was:" >&5
2019   cat conftest.$ac_ext >&5
2020   rm -rf conftest*
2021   eval "ac_cv_header_$ac_safe=no"
2022 fi
2023 rm -f conftest*
2024 fi
2025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2026   echo "$ac_t""yes" 1>&6
2027     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2028   cat >> confdefs.h <<EOF
2029 #define $ac_tr_hdr 1
2030 EOF
2031  
2032 else
2033   echo "$ac_t""no" 1>&6
2034 fi
2035 done
2036
2037 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
2038 do
2039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2041 echo "configure:2042: checking for $ac_hdr" >&5
2042 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2043   echo $ac_n "(cached) $ac_c" 1>&6
2044 else
2045   cat > conftest.$ac_ext <<EOF
2046 #line 2047 "configure"
2047 #include "confdefs.h"
2048 #include <$ac_hdr>
2049 EOF
2050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2051 { (eval echo configure:2052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2053 if test -z "$ac_err"; then
2054   rm -rf conftest*
2055   eval "ac_cv_header_$ac_safe=yes"
2056 else
2057   echo "$ac_err" >&5
2058   echo "configure: failed program was:" >&5
2059   cat conftest.$ac_ext >&5
2060   rm -rf conftest*
2061   eval "ac_cv_header_$ac_safe=no"
2062 fi
2063 rm -f conftest*
2064 fi
2065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2066   echo "$ac_t""yes" 1>&6
2067     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2068   cat >> confdefs.h <<EOF
2069 #define $ac_tr_hdr 1
2070 EOF
2071  
2072 else
2073   echo "$ac_t""no" 1>&6
2074 fi
2075 done
2076
2077 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2078 do
2079 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2080 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2081 echo "configure:2082: checking for $ac_hdr" >&5
2082 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2083   echo $ac_n "(cached) $ac_c" 1>&6
2084 else
2085   cat > conftest.$ac_ext <<EOF
2086 #line 2087 "configure"
2087 #include "confdefs.h"
2088 #include <$ac_hdr>
2089 EOF
2090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2091 { (eval echo configure:2092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2092 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2093 if test -z "$ac_err"; then
2094   rm -rf conftest*
2095   eval "ac_cv_header_$ac_safe=yes"
2096 else
2097   echo "$ac_err" >&5
2098   echo "configure: failed program was:" >&5
2099   cat conftest.$ac_ext >&5
2100   rm -rf conftest*
2101   eval "ac_cv_header_$ac_safe=no"
2102 fi
2103 rm -f conftest*
2104 fi
2105 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2106   echo "$ac_t""yes" 1>&6
2107     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2108   cat >> confdefs.h <<EOF
2109 #define $ac_tr_hdr 1
2110 EOF
2111  
2112 else
2113   echo "$ac_t""no" 1>&6
2114 fi
2115 done
2116
2117 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2118 do
2119 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2120 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2121 echo "configure:2122: checking for $ac_hdr" >&5
2122 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2123   echo $ac_n "(cached) $ac_c" 1>&6
2124 else
2125   cat > conftest.$ac_ext <<EOF
2126 #line 2127 "configure"
2127 #include "confdefs.h"
2128 #include <$ac_hdr>
2129 EOF
2130 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2131 { (eval echo configure:2132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2132 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2133 if test -z "$ac_err"; then
2134   rm -rf conftest*
2135   eval "ac_cv_header_$ac_safe=yes"
2136 else
2137   echo "$ac_err" >&5
2138   echo "configure: failed program was:" >&5
2139   cat conftest.$ac_ext >&5
2140   rm -rf conftest*
2141   eval "ac_cv_header_$ac_safe=no"
2142 fi
2143 rm -f conftest*
2144 fi
2145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2146   echo "$ac_t""yes" 1>&6
2147     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2148   cat >> confdefs.h <<EOF
2149 #define $ac_tr_hdr 1
2150 EOF
2151  
2152 else
2153   echo "$ac_t""no" 1>&6
2154 fi
2155 done
2156
2157 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h
2158 do
2159 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2160 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2161 echo "configure:2162: checking for $ac_hdr" >&5
2162 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2163   echo $ac_n "(cached) $ac_c" 1>&6
2164 else
2165   cat > conftest.$ac_ext <<EOF
2166 #line 2167 "configure"
2167 #include "confdefs.h"
2168 #include <$ac_hdr>
2169 EOF
2170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2171 { (eval echo configure:2172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2173 if test -z "$ac_err"; then
2174   rm -rf conftest*
2175   eval "ac_cv_header_$ac_safe=yes"
2176 else
2177   echo "$ac_err" >&5
2178   echo "configure: failed program was:" >&5
2179   cat conftest.$ac_ext >&5
2180   rm -rf conftest*
2181   eval "ac_cv_header_$ac_safe=no"
2182 fi
2183 rm -f conftest*
2184 fi
2185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2186   echo "$ac_t""yes" 1>&6
2187     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2188   cat >> confdefs.h <<EOF
2189 #define $ac_tr_hdr 1
2190 EOF
2191  
2192 else
2193   echo "$ac_t""no" 1>&6
2194 fi
2195 done
2196
2197
2198 #
2199 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2200 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2201 #
2202 case "$host_os" in
2203     *hpux*)
2204                 cat > conftest.$ac_ext <<EOF
2205 #line 2206 "configure"
2206 #include "confdefs.h"
2207 #include <shadow.h>
2208 int main() {
2209 struct spwd testme
2210 ; return 0; }
2211 EOF
2212 if { (eval echo configure:2213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2213   rm -rf conftest*
2214   ac_cv_header_shadow_h=yes
2215 else
2216   echo "configure: failed program was:" >&5
2217   cat conftest.$ac_ext >&5
2218   rm -rf conftest*
2219   ac_cv_header_shadow_h=no
2220 fi
2221 rm -f conftest*
2222                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2223                    cat >> confdefs.h <<\EOF
2224 #define HAVE_SHADOW_H 1
2225 EOF
2226
2227                 fi
2228         ;;
2229 esac
2230 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2231 do
2232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2234 echo "configure:2235: checking for $ac_hdr" >&5
2235 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2236   echo $ac_n "(cached) $ac_c" 1>&6
2237 else
2238   cat > conftest.$ac_ext <<EOF
2239 #line 2240 "configure"
2240 #include "confdefs.h"
2241 #include <$ac_hdr>
2242 EOF
2243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2244 { (eval echo configure:2245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2246 if test -z "$ac_err"; then
2247   rm -rf conftest*
2248   eval "ac_cv_header_$ac_safe=yes"
2249 else
2250   echo "$ac_err" >&5
2251   echo "configure: failed program was:" >&5
2252   cat conftest.$ac_ext >&5
2253   rm -rf conftest*
2254   eval "ac_cv_header_$ac_safe=no"
2255 fi
2256 rm -f conftest*
2257 fi
2258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2259   echo "$ac_t""yes" 1>&6
2260     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2261   cat >> confdefs.h <<EOF
2262 #define $ac_tr_hdr 1
2263 EOF
2264  
2265 else
2266   echo "$ac_t""no" 1>&6
2267 fi
2268 done
2269
2270 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2271 do
2272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2274 echo "configure:2275: checking for $ac_hdr" >&5
2275 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2276   echo $ac_n "(cached) $ac_c" 1>&6
2277 else
2278   cat > conftest.$ac_ext <<EOF
2279 #line 2280 "configure"
2280 #include "confdefs.h"
2281 #include <$ac_hdr>
2282 EOF
2283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2284 { (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2286 if test -z "$ac_err"; then
2287   rm -rf conftest*
2288   eval "ac_cv_header_$ac_safe=yes"
2289 else
2290   echo "$ac_err" >&5
2291   echo "configure: failed program was:" >&5
2292   cat conftest.$ac_ext >&5
2293   rm -rf conftest*
2294   eval "ac_cv_header_$ac_safe=no"
2295 fi
2296 rm -f conftest*
2297 fi
2298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2299   echo "$ac_t""yes" 1>&6
2300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2301   cat >> confdefs.h <<EOF
2302 #define $ac_tr_hdr 1
2303 EOF
2304  
2305 else
2306   echo "$ac_t""no" 1>&6
2307 fi
2308 done
2309
2310 for ac_hdr in stropts.h poll.h
2311 do
2312 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2313 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2314 echo "configure:2315: checking for $ac_hdr" >&5
2315 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2316   echo $ac_n "(cached) $ac_c" 1>&6
2317 else
2318   cat > conftest.$ac_ext <<EOF
2319 #line 2320 "configure"
2320 #include "confdefs.h"
2321 #include <$ac_hdr>
2322 EOF
2323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2324 { (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326 if test -z "$ac_err"; then
2327   rm -rf conftest*
2328   eval "ac_cv_header_$ac_safe=yes"
2329 else
2330   echo "$ac_err" >&5
2331   echo "configure: failed program was:" >&5
2332   cat conftest.$ac_ext >&5
2333   rm -rf conftest*
2334   eval "ac_cv_header_$ac_safe=no"
2335 fi
2336 rm -f conftest*
2337 fi
2338 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2339   echo "$ac_t""yes" 1>&6
2340     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2341   cat >> confdefs.h <<EOF
2342 #define $ac_tr_hdr 1
2343 EOF
2344  
2345 else
2346   echo "$ac_t""no" 1>&6
2347 fi
2348 done
2349
2350 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2351 do
2352 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2354 echo "configure:2355: checking for $ac_hdr" >&5
2355 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2356   echo $ac_n "(cached) $ac_c" 1>&6
2357 else
2358   cat > conftest.$ac_ext <<EOF
2359 #line 2360 "configure"
2360 #include "confdefs.h"
2361 #include <$ac_hdr>
2362 EOF
2363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2364 { (eval echo configure:2365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2366 if test -z "$ac_err"; then
2367   rm -rf conftest*
2368   eval "ac_cv_header_$ac_safe=yes"
2369 else
2370   echo "$ac_err" >&5
2371   echo "configure: failed program was:" >&5
2372   cat conftest.$ac_ext >&5
2373   rm -rf conftest*
2374   eval "ac_cv_header_$ac_safe=no"
2375 fi
2376 rm -f conftest*
2377 fi
2378 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2379   echo "$ac_t""yes" 1>&6
2380     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2381   cat >> confdefs.h <<EOF
2382 #define $ac_tr_hdr 1
2383 EOF
2384  
2385 else
2386   echo "$ac_t""no" 1>&6
2387 fi
2388 done
2389
2390 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2391 do
2392 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2393 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2394 echo "configure:2395: checking for $ac_hdr" >&5
2395 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2396   echo $ac_n "(cached) $ac_c" 1>&6
2397 else
2398   cat > conftest.$ac_ext <<EOF
2399 #line 2400 "configure"
2400 #include "confdefs.h"
2401 #include <$ac_hdr>
2402 EOF
2403 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2404 { (eval echo configure:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2405 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2406 if test -z "$ac_err"; then
2407   rm -rf conftest*
2408   eval "ac_cv_header_$ac_safe=yes"
2409 else
2410   echo "$ac_err" >&5
2411   echo "configure: failed program was:" >&5
2412   cat conftest.$ac_ext >&5
2413   rm -rf conftest*
2414   eval "ac_cv_header_$ac_safe=no"
2415 fi
2416 rm -f conftest*
2417 fi
2418 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2419   echo "$ac_t""yes" 1>&6
2420     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2421   cat >> confdefs.h <<EOF
2422 #define $ac_tr_hdr 1
2423 EOF
2424  
2425 else
2426   echo "$ac_t""no" 1>&6
2427 fi
2428 done
2429
2430
2431 # For experimental utmp support (lastlog on some BSD-like systems)
2432 for ac_hdr in utmp.h utmpx.h lastlog.h
2433 do
2434 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2435 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2436 echo "configure:2437: checking for $ac_hdr" >&5
2437 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2438   echo $ac_n "(cached) $ac_c" 1>&6
2439 else
2440   cat > conftest.$ac_ext <<EOF
2441 #line 2442 "configure"
2442 #include "confdefs.h"
2443 #include <$ac_hdr>
2444 EOF
2445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2446 { (eval echo configure:2447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2448 if test -z "$ac_err"; then
2449   rm -rf conftest*
2450   eval "ac_cv_header_$ac_safe=yes"
2451 else
2452   echo "$ac_err" >&5
2453   echo "configure: failed program was:" >&5
2454   cat conftest.$ac_ext >&5
2455   rm -rf conftest*
2456   eval "ac_cv_header_$ac_safe=no"
2457 fi
2458 rm -f conftest*
2459 fi
2460 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2461   echo "$ac_t""yes" 1>&6
2462     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2463   cat >> confdefs.h <<EOF
2464 #define $ac_tr_hdr 1
2465 EOF
2466  
2467 else
2468   echo "$ac_t""no" 1>&6
2469 fi
2470 done
2471
2472  
2473 # For quotas on Veritas VxFS filesystems
2474 for ac_hdr in sys/fs/vx_quota.h
2475 do
2476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2478 echo "configure:2479: checking for $ac_hdr" >&5
2479 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2480   echo $ac_n "(cached) $ac_c" 1>&6
2481 else
2482   cat > conftest.$ac_ext <<EOF
2483 #line 2484 "configure"
2484 #include "confdefs.h"
2485 #include <$ac_hdr>
2486 EOF
2487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2488 { (eval echo configure:2489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2490 if test -z "$ac_err"; then
2491   rm -rf conftest*
2492   eval "ac_cv_header_$ac_safe=yes"
2493 else
2494   echo "$ac_err" >&5
2495   echo "configure: failed program was:" >&5
2496   cat conftest.$ac_ext >&5
2497   rm -rf conftest*
2498   eval "ac_cv_header_$ac_safe=no"
2499 fi
2500 rm -f conftest*
2501 fi
2502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2503   echo "$ac_t""yes" 1>&6
2504     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2505   cat >> confdefs.h <<EOF
2506 #define $ac_tr_hdr 1
2507 EOF
2508  
2509 else
2510   echo "$ac_t""no" 1>&6
2511 fi
2512 done
2513
2514
2515 # For quotas on Linux XFS filesystems
2516 for ac_hdr in linux/xqm.h
2517 do
2518 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2519 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2520 echo "configure:2521: checking for $ac_hdr" >&5
2521 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2522   echo $ac_n "(cached) $ac_c" 1>&6
2523 else
2524   cat > conftest.$ac_ext <<EOF
2525 #line 2526 "configure"
2526 #include "confdefs.h"
2527 #include <$ac_hdr>
2528 EOF
2529 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2530 { (eval echo configure:2531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2531 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2532 if test -z "$ac_err"; then
2533   rm -rf conftest*
2534   eval "ac_cv_header_$ac_safe=yes"
2535 else
2536   echo "$ac_err" >&5
2537   echo "configure: failed program was:" >&5
2538   cat conftest.$ac_ext >&5
2539   rm -rf conftest*
2540   eval "ac_cv_header_$ac_safe=no"
2541 fi
2542 rm -f conftest*
2543 fi
2544 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2545   echo "$ac_t""yes" 1>&6
2546     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2547   cat >> confdefs.h <<EOF
2548 #define $ac_tr_hdr 1
2549 EOF
2550  
2551 else
2552   echo "$ac_t""no" 1>&6
2553 fi
2554 done
2555
2556
2557 echo $ac_n "checking size of int""... $ac_c" 1>&6
2558 echo "configure:2559: checking size of int" >&5
2559 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2560   echo $ac_n "(cached) $ac_c" 1>&6
2561 else
2562   if test "$cross_compiling" = yes; then
2563   ac_cv_sizeof_int=cross
2564 else
2565   cat > conftest.$ac_ext <<EOF
2566 #line 2567 "configure"
2567 #include "confdefs.h"
2568 #include <stdio.h>
2569 int main()
2570 {
2571   FILE *f=fopen("conftestval", "w");
2572   if (!f) return(1);
2573   fprintf(f, "%d\n", sizeof(int));
2574   return(0);
2575 }
2576 EOF
2577 if { (eval echo configure:2578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2578 then
2579   ac_cv_sizeof_int=`cat conftestval`
2580 else
2581   echo "configure: failed program was:" >&5
2582   cat conftest.$ac_ext >&5
2583   rm -fr conftest*
2584   ac_cv_sizeof_int=0
2585 fi
2586 rm -fr conftest*
2587 fi
2588
2589 fi
2590 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2591 cat >> confdefs.h <<EOF
2592 #define SIZEOF_INT $ac_cv_sizeof_int
2593 EOF
2594
2595
2596 echo $ac_n "checking size of long""... $ac_c" 1>&6
2597 echo "configure:2598: checking size of long" >&5
2598 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2599   echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601   if test "$cross_compiling" = yes; then
2602   ac_cv_sizeof_long=cross
2603 else
2604   cat > conftest.$ac_ext <<EOF
2605 #line 2606 "configure"
2606 #include "confdefs.h"
2607 #include <stdio.h>
2608 int main()
2609 {
2610   FILE *f=fopen("conftestval", "w");
2611   if (!f) return(1);
2612   fprintf(f, "%d\n", sizeof(long));
2613   return(0);
2614 }
2615 EOF
2616 if { (eval echo configure:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2617 then
2618   ac_cv_sizeof_long=`cat conftestval`
2619 else
2620   echo "configure: failed program was:" >&5
2621   cat conftest.$ac_ext >&5
2622   rm -fr conftest*
2623   ac_cv_sizeof_long=0
2624 fi
2625 rm -fr conftest*
2626 fi
2627
2628 fi
2629 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2630 cat >> confdefs.h <<EOF
2631 #define SIZEOF_LONG $ac_cv_sizeof_long
2632 EOF
2633
2634
2635 echo $ac_n "checking size of short""... $ac_c" 1>&6
2636 echo "configure:2637: checking size of short" >&5
2637 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2638   echo $ac_n "(cached) $ac_c" 1>&6
2639 else
2640   if test "$cross_compiling" = yes; then
2641   ac_cv_sizeof_short=cross
2642 else
2643   cat > conftest.$ac_ext <<EOF
2644 #line 2645 "configure"
2645 #include "confdefs.h"
2646 #include <stdio.h>
2647 int main()
2648 {
2649   FILE *f=fopen("conftestval", "w");
2650   if (!f) return(1);
2651   fprintf(f, "%d\n", sizeof(short));
2652   return(0);
2653 }
2654 EOF
2655 if { (eval echo configure:2656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2656 then
2657   ac_cv_sizeof_short=`cat conftestval`
2658 else
2659   echo "configure: failed program was:" >&5
2660   cat conftest.$ac_ext >&5
2661   rm -fr conftest*
2662   ac_cv_sizeof_short=0
2663 fi
2664 rm -fr conftest*
2665 fi
2666
2667 fi
2668 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2669 cat >> confdefs.h <<EOF
2670 #define SIZEOF_SHORT $ac_cv_sizeof_short
2671 EOF
2672
2673
2674
2675 echo $ac_n "checking for working const""... $ac_c" 1>&6
2676 echo "configure:2677: checking for working const" >&5
2677 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2678   echo $ac_n "(cached) $ac_c" 1>&6
2679 else
2680   cat > conftest.$ac_ext <<EOF
2681 #line 2682 "configure"
2682 #include "confdefs.h"
2683
2684 int main() {
2685
2686 /* Ultrix mips cc rejects this.  */
2687 typedef int charset[2]; const charset x;
2688 /* SunOS 4.1.1 cc rejects this.  */
2689 char const *const *ccp;
2690 char **p;
2691 /* NEC SVR4.0.2 mips cc rejects this.  */
2692 struct point {int x, y;};
2693 static struct point const zero = {0,0};
2694 /* AIX XL C 1.02.0.0 rejects this.
2695    It does not let you subtract one const X* pointer from another in an arm
2696    of an if-expression whose if-part is not a constant expression */
2697 const char *g = "string";
2698 ccp = &g + (g ? g-g : 0);
2699 /* HPUX 7.0 cc rejects these. */
2700 ++ccp;
2701 p = (char**) ccp;
2702 ccp = (char const *const *) p;
2703 { /* SCO 3.2v4 cc rejects this.  */
2704   char *t;
2705   char const *s = 0 ? (char *) 0 : (char const *) 0;
2706
2707   *t++ = 0;
2708 }
2709 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2710   int x[] = {25, 17};
2711   const int *foo = &x[0];
2712   ++foo;
2713 }
2714 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2715   typedef const int *iptr;
2716   iptr p = 0;
2717   ++p;
2718 }
2719 { /* AIX XL C 1.02.0.0 rejects this saying
2720      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2721   struct s { int j; const int *ap[3]; };
2722   struct s *b; b->j = 5;
2723 }
2724 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2725   const int foo = 10;
2726 }
2727
2728 ; return 0; }
2729 EOF
2730 if { (eval echo configure:2731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2731   rm -rf conftest*
2732   ac_cv_c_const=yes
2733 else
2734   echo "configure: failed program was:" >&5
2735   cat conftest.$ac_ext >&5
2736   rm -rf conftest*
2737   ac_cv_c_const=no
2738 fi
2739 rm -f conftest*
2740 fi
2741
2742 echo "$ac_t""$ac_cv_c_const" 1>&6
2743 if test $ac_cv_c_const = no; then
2744   cat >> confdefs.h <<\EOF
2745 #define const 
2746 EOF
2747
2748 fi
2749
2750 echo $ac_n "checking for inline""... $ac_c" 1>&6
2751 echo "configure:2752: checking for inline" >&5
2752 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2753   echo $ac_n "(cached) $ac_c" 1>&6
2754 else
2755   ac_cv_c_inline=no
2756 for ac_kw in inline __inline__ __inline; do
2757   cat > conftest.$ac_ext <<EOF
2758 #line 2759 "configure"
2759 #include "confdefs.h"
2760
2761 int main() {
2762 } $ac_kw foo() {
2763 ; return 0; }
2764 EOF
2765 if { (eval echo configure:2766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2766   rm -rf conftest*
2767   ac_cv_c_inline=$ac_kw; break
2768 else
2769   echo "configure: failed program was:" >&5
2770   cat conftest.$ac_ext >&5
2771 fi
2772 rm -f conftest*
2773 done
2774
2775 fi
2776
2777 echo "$ac_t""$ac_cv_c_inline" 1>&6
2778 case "$ac_cv_c_inline" in
2779   inline | yes) ;;
2780   no) cat >> confdefs.h <<\EOF
2781 #define inline 
2782 EOF
2783  ;;
2784   *)  cat >> confdefs.h <<EOF
2785 #define inline $ac_cv_c_inline
2786 EOF
2787  ;;
2788 esac
2789
2790 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2791 echo "configure:2792: checking whether byte ordering is bigendian" >&5
2792 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2793   echo $ac_n "(cached) $ac_c" 1>&6
2794 else
2795   ac_cv_c_bigendian=unknown
2796 # See if sys/param.h defines the BYTE_ORDER macro.
2797 cat > conftest.$ac_ext <<EOF
2798 #line 2799 "configure"
2799 #include "confdefs.h"
2800 #include <sys/types.h>
2801 #include <sys/param.h>
2802 int main() {
2803
2804 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2805  bogus endian macros
2806 #endif
2807 ; return 0; }
2808 EOF
2809 if { (eval echo configure:2810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2810   rm -rf conftest*
2811   # It does; now see whether it defined to BIG_ENDIAN or not.
2812 cat > conftest.$ac_ext <<EOF
2813 #line 2814 "configure"
2814 #include "confdefs.h"
2815 #include <sys/types.h>
2816 #include <sys/param.h>
2817 int main() {
2818
2819 #if BYTE_ORDER != BIG_ENDIAN
2820  not big endian
2821 #endif
2822 ; return 0; }
2823 EOF
2824 if { (eval echo configure:2825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2825   rm -rf conftest*
2826   ac_cv_c_bigendian=yes
2827 else
2828   echo "configure: failed program was:" >&5
2829   cat conftest.$ac_ext >&5
2830   rm -rf conftest*
2831   ac_cv_c_bigendian=no
2832 fi
2833 rm -f conftest*
2834 else
2835   echo "configure: failed program was:" >&5
2836   cat conftest.$ac_ext >&5
2837 fi
2838 rm -f conftest*
2839 if test $ac_cv_c_bigendian = unknown; then
2840 if test "$cross_compiling" = yes; then
2841     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2842 else
2843   cat > conftest.$ac_ext <<EOF
2844 #line 2845 "configure"
2845 #include "confdefs.h"
2846 main () {
2847   /* Are we little or big endian?  From Harbison&Steele.  */
2848   union
2849   {
2850     long l;
2851     char c[sizeof (long)];
2852   } u;
2853   u.l = 1;
2854   exit (u.c[sizeof (long) - 1] == 1);
2855 }
2856 EOF
2857 if { (eval echo configure:2858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2858 then
2859   ac_cv_c_bigendian=no
2860 else
2861   echo "configure: failed program was:" >&5
2862   cat conftest.$ac_ext >&5
2863   rm -fr conftest*
2864   ac_cv_c_bigendian=yes
2865 fi
2866 rm -fr conftest*
2867 fi
2868
2869 fi
2870 fi
2871
2872 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2873 if test $ac_cv_c_bigendian = yes; then
2874   cat >> confdefs.h <<\EOF
2875 #define WORDS_BIGENDIAN 1
2876 EOF
2877
2878 fi
2879
2880 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2881 echo "configure:2882: checking whether char is unsigned" >&5
2882 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2883   echo $ac_n "(cached) $ac_c" 1>&6
2884 else
2885   if test "$GCC" = yes; then
2886   # GCC predefines this symbol on systems where it applies.
2887 cat > conftest.$ac_ext <<EOF
2888 #line 2889 "configure"
2889 #include "confdefs.h"
2890 #ifdef __CHAR_UNSIGNED__
2891   yes
2892 #endif
2893
2894 EOF
2895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2896   egrep "yes" >/dev/null 2>&1; then
2897   rm -rf conftest*
2898   ac_cv_c_char_unsigned=yes
2899 else
2900   rm -rf conftest*
2901   ac_cv_c_char_unsigned=no
2902 fi
2903 rm -f conftest*
2904
2905 else
2906 if test "$cross_compiling" = yes; then
2907     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2908 else
2909   cat > conftest.$ac_ext <<EOF
2910 #line 2911 "configure"
2911 #include "confdefs.h"
2912 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2913 #if !defined(__STDC__) || __STDC__ != 1
2914 #define volatile
2915 #endif
2916 main() {
2917   volatile char c = 255; exit(c < 0);
2918 }
2919 EOF
2920 if { (eval echo configure:2921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2921 then
2922   ac_cv_c_char_unsigned=yes
2923 else
2924   echo "configure: failed program was:" >&5
2925   cat conftest.$ac_ext >&5
2926   rm -fr conftest*
2927   ac_cv_c_char_unsigned=no
2928 fi
2929 rm -fr conftest*
2930 fi
2931
2932 fi
2933 fi
2934
2935 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2936 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2937   cat >> confdefs.h <<\EOF
2938 #define __CHAR_UNSIGNED__ 1
2939 EOF
2940
2941 fi
2942
2943
2944 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2945 echo "configure:2946: checking return type of signal handlers" >&5
2946 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2947   echo $ac_n "(cached) $ac_c" 1>&6
2948 else
2949   cat > conftest.$ac_ext <<EOF
2950 #line 2951 "configure"
2951 #include "confdefs.h"
2952 #include <sys/types.h>
2953 #include <signal.h>
2954 #ifdef signal
2955 #undef signal
2956 #endif
2957 #ifdef __cplusplus
2958 extern "C" void (*signal (int, void (*)(int)))(int);
2959 #else
2960 void (*signal ()) ();
2961 #endif
2962
2963 int main() {
2964 int i;
2965 ; return 0; }
2966 EOF
2967 if { (eval echo configure:2968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2968   rm -rf conftest*
2969   ac_cv_type_signal=void
2970 else
2971   echo "configure: failed program was:" >&5
2972   cat conftest.$ac_ext >&5
2973   rm -rf conftest*
2974   ac_cv_type_signal=int
2975 fi
2976 rm -f conftest*
2977 fi
2978
2979 echo "$ac_t""$ac_cv_type_signal" 1>&6
2980 cat >> confdefs.h <<EOF
2981 #define RETSIGTYPE $ac_cv_type_signal
2982 EOF
2983
2984
2985 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2986 echo "configure:2987: checking for uid_t in sys/types.h" >&5
2987 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2988   echo $ac_n "(cached) $ac_c" 1>&6
2989 else
2990   cat > conftest.$ac_ext <<EOF
2991 #line 2992 "configure"
2992 #include "confdefs.h"
2993 #include <sys/types.h>
2994 EOF
2995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2996   egrep "uid_t" >/dev/null 2>&1; then
2997   rm -rf conftest*
2998   ac_cv_type_uid_t=yes
2999 else
3000   rm -rf conftest*
3001   ac_cv_type_uid_t=no
3002 fi
3003 rm -f conftest*
3004
3005 fi
3006
3007 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3008 if test $ac_cv_type_uid_t = no; then
3009   cat >> confdefs.h <<\EOF
3010 #define uid_t int
3011 EOF
3012
3013   cat >> confdefs.h <<\EOF
3014 #define gid_t int
3015 EOF
3016
3017 fi
3018
3019 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3020 echo "configure:3021: checking for mode_t" >&5
3021 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3022   echo $ac_n "(cached) $ac_c" 1>&6
3023 else
3024   cat > conftest.$ac_ext <<EOF
3025 #line 3026 "configure"
3026 #include "confdefs.h"
3027 #include <sys/types.h>
3028 #if STDC_HEADERS
3029 #include <stdlib.h>
3030 #include <stddef.h>
3031 #endif
3032 EOF
3033 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3034   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3035   rm -rf conftest*
3036   ac_cv_type_mode_t=yes
3037 else
3038   rm -rf conftest*
3039   ac_cv_type_mode_t=no
3040 fi
3041 rm -f conftest*
3042
3043 fi
3044 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3045 if test $ac_cv_type_mode_t = no; then
3046   cat >> confdefs.h <<\EOF
3047 #define mode_t int
3048 EOF
3049
3050 fi
3051
3052 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3053 echo "configure:3054: checking for off_t" >&5
3054 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3055   echo $ac_n "(cached) $ac_c" 1>&6
3056 else
3057   cat > conftest.$ac_ext <<EOF
3058 #line 3059 "configure"
3059 #include "confdefs.h"
3060 #include <sys/types.h>
3061 #if STDC_HEADERS
3062 #include <stdlib.h>
3063 #include <stddef.h>
3064 #endif
3065 EOF
3066 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3067   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3068   rm -rf conftest*
3069   ac_cv_type_off_t=yes
3070 else
3071   rm -rf conftest*
3072   ac_cv_type_off_t=no
3073 fi
3074 rm -f conftest*
3075
3076 fi
3077 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3078 if test $ac_cv_type_off_t = no; then
3079   cat >> confdefs.h <<\EOF
3080 #define off_t long
3081 EOF
3082
3083 fi
3084
3085 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3086 echo "configure:3087: checking for size_t" >&5
3087 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3088   echo $ac_n "(cached) $ac_c" 1>&6
3089 else
3090   cat > conftest.$ac_ext <<EOF
3091 #line 3092 "configure"
3092 #include "confdefs.h"
3093 #include <sys/types.h>
3094 #if STDC_HEADERS
3095 #include <stdlib.h>
3096 #include <stddef.h>
3097 #endif
3098 EOF
3099 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3100   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3101   rm -rf conftest*
3102   ac_cv_type_size_t=yes
3103 else
3104   rm -rf conftest*
3105   ac_cv_type_size_t=no
3106 fi
3107 rm -f conftest*
3108
3109 fi
3110 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3111 if test $ac_cv_type_size_t = no; then
3112   cat >> confdefs.h <<\EOF
3113 #define size_t unsigned
3114 EOF
3115
3116 fi
3117
3118 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3119 echo "configure:3120: checking for pid_t" >&5
3120 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3121   echo $ac_n "(cached) $ac_c" 1>&6
3122 else
3123   cat > conftest.$ac_ext <<EOF
3124 #line 3125 "configure"
3125 #include "confdefs.h"
3126 #include <sys/types.h>
3127 #if STDC_HEADERS
3128 #include <stdlib.h>
3129 #include <stddef.h>
3130 #endif
3131 EOF
3132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3133   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3134   rm -rf conftest*
3135   ac_cv_type_pid_t=yes
3136 else
3137   rm -rf conftest*
3138   ac_cv_type_pid_t=no
3139 fi
3140 rm -f conftest*
3141
3142 fi
3143 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3144 if test $ac_cv_type_pid_t = no; then
3145   cat >> confdefs.h <<\EOF
3146 #define pid_t int
3147 EOF
3148
3149 fi
3150
3151 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3152 echo "configure:3153: checking for st_rdev in struct stat" >&5
3153 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3154   echo $ac_n "(cached) $ac_c" 1>&6
3155 else
3156   cat > conftest.$ac_ext <<EOF
3157 #line 3158 "configure"
3158 #include "confdefs.h"
3159 #include <sys/types.h>
3160 #include <sys/stat.h>
3161 int main() {
3162 struct stat s; s.st_rdev;
3163 ; return 0; }
3164 EOF
3165 if { (eval echo configure:3166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3166   rm -rf conftest*
3167   ac_cv_struct_st_rdev=yes
3168 else
3169   echo "configure: failed program was:" >&5
3170   cat conftest.$ac_ext >&5
3171   rm -rf conftest*
3172   ac_cv_struct_st_rdev=no
3173 fi
3174 rm -f conftest*
3175 fi
3176
3177 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3178 if test $ac_cv_struct_st_rdev = yes; then
3179   cat >> confdefs.h <<\EOF
3180 #define HAVE_ST_RDEV 1
3181 EOF
3182
3183 fi
3184
3185 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3186 echo "configure:3187: checking for d_off in dirent" >&5
3187 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3188   echo $ac_n "(cached) $ac_c" 1>&6
3189 else
3190   cat > conftest.$ac_ext <<EOF
3191 #line 3192 "configure"
3192 #include "confdefs.h"
3193
3194 #include <unistd.h>
3195 #include <sys/types.h>
3196 #include <dirent.h>
3197 int main() {
3198 struct dirent d; d.d_off;
3199 ; return 0; }
3200 EOF
3201 if { (eval echo configure:3202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3202   rm -rf conftest*
3203   ac_cv_dirent_d_off=yes
3204 else
3205   echo "configure: failed program was:" >&5
3206   cat conftest.$ac_ext >&5
3207   rm -rf conftest*
3208   ac_cv_dirent_d_off=no
3209 fi
3210 rm -f conftest*
3211 fi
3212
3213 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3214 if test $ac_cv_dirent_d_off = yes; then
3215   cat >> confdefs.h <<\EOF
3216 #define HAVE_DIRENT_D_OFF 1
3217 EOF
3218
3219 fi
3220
3221 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3222 echo "configure:3223: checking for ino_t" >&5
3223 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3224   echo $ac_n "(cached) $ac_c" 1>&6
3225 else
3226   cat > conftest.$ac_ext <<EOF
3227 #line 3228 "configure"
3228 #include "confdefs.h"
3229 #include <sys/types.h>
3230 #if STDC_HEADERS
3231 #include <stdlib.h>
3232 #include <stddef.h>
3233 #endif
3234 EOF
3235 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3236   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3237   rm -rf conftest*
3238   ac_cv_type_ino_t=yes
3239 else
3240   rm -rf conftest*
3241   ac_cv_type_ino_t=no
3242 fi
3243 rm -f conftest*
3244
3245 fi
3246 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3247 if test $ac_cv_type_ino_t = no; then
3248   cat >> confdefs.h <<\EOF
3249 #define ino_t unsigned
3250 EOF
3251
3252 fi
3253
3254 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3255 echo "configure:3256: checking for loff_t" >&5
3256 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3257   echo $ac_n "(cached) $ac_c" 1>&6
3258 else
3259   cat > conftest.$ac_ext <<EOF
3260 #line 3261 "configure"
3261 #include "confdefs.h"
3262 #include <sys/types.h>
3263 #if STDC_HEADERS
3264 #include <stdlib.h>
3265 #include <stddef.h>
3266 #endif
3267 EOF
3268 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3269   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3270   rm -rf conftest*
3271   ac_cv_type_loff_t=yes
3272 else
3273   rm -rf conftest*
3274   ac_cv_type_loff_t=no
3275 fi
3276 rm -f conftest*
3277
3278 fi
3279 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3280 if test $ac_cv_type_loff_t = no; then
3281   cat >> confdefs.h <<\EOF
3282 #define loff_t off_t
3283 EOF
3284
3285 fi
3286
3287 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3288 echo "configure:3289: checking for offset_t" >&5
3289 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3290   echo $ac_n "(cached) $ac_c" 1>&6
3291 else
3292   cat > conftest.$ac_ext <<EOF
3293 #line 3294 "configure"
3294 #include "confdefs.h"
3295 #include <sys/types.h>
3296 #if STDC_HEADERS
3297 #include <stdlib.h>
3298 #include <stddef.h>
3299 #endif
3300 EOF
3301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3302   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3303   rm -rf conftest*
3304   ac_cv_type_offset_t=yes
3305 else
3306   rm -rf conftest*
3307   ac_cv_type_offset_t=no
3308 fi
3309 rm -f conftest*
3310
3311 fi
3312 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3313 if test $ac_cv_type_offset_t = no; then
3314   cat >> confdefs.h <<\EOF
3315 #define offset_t loff_t
3316 EOF
3317
3318 fi
3319
3320 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3321 echo "configure:3322: checking for ssize_t" >&5
3322 if eval "test \"`echo '$''{'ac_cv_type_ssize_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])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3336   rm -rf conftest*
3337   ac_cv_type_ssize_t=yes
3338 else
3339   rm -rf conftest*
3340   ac_cv_type_ssize_t=no
3341 fi
3342 rm -f conftest*
3343
3344 fi
3345 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3346 if test $ac_cv_type_ssize_t = no; then
3347   cat >> confdefs.h <<\EOF
3348 #define ssize_t int
3349 EOF
3350
3351 fi
3352
3353 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3354 echo "configure:3355: checking for wchar_t" >&5
3355 if eval "test \"`echo '$''{'ac_cv_type_wchar_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])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3369   rm -rf conftest*
3370   ac_cv_type_wchar_t=yes
3371 else
3372   rm -rf conftest*
3373   ac_cv_type_wchar_t=no
3374 fi
3375 rm -f conftest*
3376
3377 fi
3378 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3379 if test $ac_cv_type_wchar_t = no; then
3380   cat >> confdefs.h <<\EOF
3381 #define wchar_t unsigned short
3382 EOF
3383
3384 fi
3385
3386
3387 ############################################
3388 # for cups support we need libcups, and a handful of header files
3389
3390 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3391 echo "configure:3392: checking for httpConnect in -lcups" >&5
3392 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3393 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3394   echo $ac_n "(cached) $ac_c" 1>&6
3395 else
3396   ac_save_LIBS="$LIBS"
3397 LIBS="-lcups  $LIBS"
3398 cat > conftest.$ac_ext <<EOF
3399 #line 3400 "configure"
3400 #include "confdefs.h"
3401 /* Override any gcc2 internal prototype to avoid an error.  */
3402 /* We use char because int might match the return type of a gcc2
3403     builtin and then its argument prototype would still apply.  */
3404 char httpConnect();
3405
3406 int main() {
3407 httpConnect()
3408 ; return 0; }
3409 EOF
3410 if { (eval echo configure:3411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3411   rm -rf conftest*
3412   eval "ac_cv_lib_$ac_lib_var=yes"
3413 else
3414   echo "configure: failed program was:" >&5
3415   cat conftest.$ac_ext >&5
3416   rm -rf conftest*
3417   eval "ac_cv_lib_$ac_lib_var=no"
3418 fi
3419 rm -f conftest*
3420 LIBS="$ac_save_LIBS"
3421
3422 fi
3423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3424   echo "$ac_t""yes" 1>&6
3425     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3426     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3427   cat >> confdefs.h <<EOF
3428 #define $ac_tr_lib 1
3429 EOF
3430
3431   LIBS="-lcups $LIBS"
3432
3433 else
3434   echo "$ac_t""no" 1>&6
3435 fi
3436
3437
3438 # I wonder if there is a nicer way of doing this?
3439
3440 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3441         for ac_hdr in cups/cups.h cups/language.h
3442 do
3443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3445 echo "configure:3446: checking for $ac_hdr" >&5
3446 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3447   echo $ac_n "(cached) $ac_c" 1>&6
3448 else
3449   cat > conftest.$ac_ext <<EOF
3450 #line 3451 "configure"
3451 #include "confdefs.h"
3452 #include <$ac_hdr>
3453 EOF
3454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3455 { (eval echo configure:3456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3457 if test -z "$ac_err"; then
3458   rm -rf conftest*
3459   eval "ac_cv_header_$ac_safe=yes"
3460 else
3461   echo "$ac_err" >&5
3462   echo "configure: failed program was:" >&5
3463   cat conftest.$ac_ext >&5
3464   rm -rf conftest*
3465   eval "ac_cv_header_$ac_safe=no"
3466 fi
3467 rm -f conftest*
3468 fi
3469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3470   echo "$ac_t""yes" 1>&6
3471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3472   cat >> confdefs.h <<EOF
3473 #define $ac_tr_hdr 1
3474 EOF
3475  
3476 else
3477   echo "$ac_t""no" 1>&6
3478 fi
3479 done
3480
3481         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3482                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3483                         cat >> confdefs.h <<\EOF
3484 #define HAVE_CUPS 1
3485 EOF
3486
3487                 fi
3488         fi
3489 fi
3490
3491 ############################################
3492 # we need libdl for PAM and the new VFS code
3493 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3494 echo "configure:3495: checking for dlopen in -ldl" >&5
3495 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3496 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3497   echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499   ac_save_LIBS="$LIBS"
3500 LIBS="-ldl  $LIBS"
3501 cat > conftest.$ac_ext <<EOF
3502 #line 3503 "configure"
3503 #include "confdefs.h"
3504 /* Override any gcc2 internal prototype to avoid an error.  */
3505 /* We use char because int might match the return type of a gcc2
3506     builtin and then its argument prototype would still apply.  */
3507 char dlopen();
3508
3509 int main() {
3510 dlopen()
3511 ; return 0; }
3512 EOF
3513 if { (eval echo configure:3514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3514   rm -rf conftest*
3515   eval "ac_cv_lib_$ac_lib_var=yes"
3516 else
3517   echo "configure: failed program was:" >&5
3518   cat conftest.$ac_ext >&5
3519   rm -rf conftest*
3520   eval "ac_cv_lib_$ac_lib_var=no"
3521 fi
3522 rm -f conftest*
3523 LIBS="$ac_save_LIBS"
3524
3525 fi
3526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3527   echo "$ac_t""yes" 1>&6
3528   LIBS="$LIBS -ldl";
3529         cat >> confdefs.h <<\EOF
3530 #define HAVE_LIBDL 1
3531 EOF
3532
3533 else
3534   echo "$ac_t""no" 1>&6
3535 fi
3536
3537
3538 ############################################
3539 # check if the compiler can do immediate structures
3540 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3541 echo "configure:3542: checking for immediate structures" >&5
3542 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3543   echo $ac_n "(cached) $ac_c" 1>&6
3544 else
3545   
3546     cat > conftest.$ac_ext <<EOF
3547 #line 3548 "configure"
3548 #include "confdefs.h"
3549
3550 #include <stdio.h>
3551 int main() {
3552
3553    #define X_FOOBAR(x) ((FOOBAR) { x })
3554    typedef struct {unsigned x;} FOOBAR;
3555    FOOBAR f = X_FOOBAR(1);   
3556
3557 ; return 0; }
3558 EOF
3559 if { (eval echo configure:3560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3560   rm -rf conftest*
3561   samba_cv_immediate_structures=yes
3562 else
3563   echo "configure: failed program was:" >&5
3564   cat conftest.$ac_ext >&5
3565   rm -rf conftest*
3566   samba_cv_immediate_structures=no
3567 fi
3568 rm -f conftest*
3569 fi
3570
3571 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3572 if test x"$samba_cv_immediate_structures" = x"yes"; then
3573    cat >> confdefs.h <<\EOF
3574 #define HAVE_IMMEDIATE_STRUCTURES 1
3575 EOF
3576
3577 fi
3578
3579 ############################################
3580 # check for unix domain sockets
3581 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3582 echo "configure:3583: checking for unix domain sockets" >&5
3583 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3584   echo $ac_n "(cached) $ac_c" 1>&6
3585 else
3586   
3587     cat > conftest.$ac_ext <<EOF
3588 #line 3589 "configure"
3589 #include "confdefs.h"
3590
3591 #include <sys/types.h>
3592 #include <stdlib.h>
3593 #include <stddef.h>
3594 #include <sys/socket.h>
3595 #include <sys/un.h>
3596 int main() {
3597
3598   struct sockaddr_un sunaddr; 
3599   sunaddr.sun_family = AF_UNIX;
3600
3601 ; return 0; }
3602 EOF
3603 if { (eval echo configure:3604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3604   rm -rf conftest*
3605   samba_cv_unixsocket=yes
3606 else
3607   echo "configure: failed program was:" >&5
3608   cat conftest.$ac_ext >&5
3609   rm -rf conftest*
3610   samba_cv_unixsocket=no
3611 fi
3612 rm -f conftest*
3613 fi
3614
3615 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3616 if test x"$samba_cv_unixsocket" = x"yes"; then
3617    cat >> confdefs.h <<\EOF
3618 #define HAVE_UNIXSOCKET 1
3619 EOF
3620
3621 fi
3622
3623
3624 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3625 echo "configure:3626: checking for socklen_t type" >&5
3626 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3627   echo $ac_n "(cached) $ac_c" 1>&6
3628 else
3629   
3630     cat > conftest.$ac_ext <<EOF
3631 #line 3632 "configure"
3632 #include "confdefs.h"
3633
3634 #include <sys/types.h>
3635 #if STDC_HEADERS
3636 #include <stdlib.h>
3637 #include <stddef.h>
3638 #endif
3639 #include <sys/socket.h>
3640 int main() {
3641 socklen_t i = 0
3642 ; return 0; }
3643 EOF
3644 if { (eval echo configure:3645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3645   rm -rf conftest*
3646   samba_cv_socklen_t=yes
3647 else
3648   echo "configure: failed program was:" >&5
3649   cat conftest.$ac_ext >&5
3650   rm -rf conftest*
3651   samba_cv_socklen_t=no
3652 fi
3653 rm -f conftest*
3654 fi
3655
3656 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3657 if test x"$samba_cv_socklen_t" = x"yes"; then
3658    cat >> confdefs.h <<\EOF
3659 #define HAVE_SOCKLEN_T_TYPE 1
3660 EOF
3661
3662 fi
3663
3664 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3665 echo "configure:3666: checking for sig_atomic_t type" >&5
3666 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3667   echo $ac_n "(cached) $ac_c" 1>&6
3668 else
3669   
3670     cat > conftest.$ac_ext <<EOF
3671 #line 3672 "configure"
3672 #include "confdefs.h"
3673
3674 #include <sys/types.h>
3675 #if STDC_HEADERS
3676 #include <stdlib.h>
3677 #include <stddef.h>
3678 #endif
3679 #include <signal.h>
3680 int main() {
3681 sig_atomic_t i = 0
3682 ; return 0; }
3683 EOF
3684 if { (eval echo configure:3685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3685   rm -rf conftest*
3686   samba_cv_sig_atomic_t=yes
3687 else
3688   echo "configure: failed program was:" >&5
3689   cat conftest.$ac_ext >&5
3690   rm -rf conftest*
3691   samba_cv_sig_atomic_t=no
3692 fi
3693 rm -f conftest*
3694 fi
3695
3696 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3697 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3698    cat >> confdefs.h <<\EOF
3699 #define HAVE_SIG_ATOMIC_T_TYPE 1
3700 EOF
3701
3702 fi
3703
3704 # stupid headers have the functions but no declaration. grrrr.
3705
3706  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3707 echo "configure:3708: checking for errno declaration" >&5
3708 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3709   echo $ac_n "(cached) $ac_c" 1>&6
3710 else
3711   
3712     cat > conftest.$ac_ext <<EOF
3713 #line 3714 "configure"
3714 #include "confdefs.h"
3715 #include <errno.h>
3716 int main() {
3717 int i = (int)errno
3718 ; return 0; }
3719 EOF
3720 if { (eval echo configure:3721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3721   rm -rf conftest*
3722   ac_cv_have_errno_decl=yes
3723 else
3724   echo "configure: failed program was:" >&5
3725   cat conftest.$ac_ext >&5
3726   rm -rf conftest*
3727   ac_cv_have_errno_decl=no
3728 fi
3729 rm -f conftest*
3730 fi
3731
3732 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3733  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3734     cat >> confdefs.h <<\EOF
3735 #define HAVE_ERRNO_DECL 1
3736 EOF
3737
3738  fi
3739
3740
3741  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3742 echo "configure:3743: checking for setresuid declaration" >&5
3743 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3744   echo $ac_n "(cached) $ac_c" 1>&6
3745 else
3746   
3747     cat > conftest.$ac_ext <<EOF
3748 #line 3749 "configure"
3749 #include "confdefs.h"
3750 #include <unistd.h>
3751 int main() {
3752 int i = (int)setresuid
3753 ; return 0; }
3754 EOF
3755 if { (eval echo configure:3756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3756   rm -rf conftest*
3757   ac_cv_have_setresuid_decl=yes
3758 else
3759   echo "configure: failed program was:" >&5
3760   cat conftest.$ac_ext >&5
3761   rm -rf conftest*
3762   ac_cv_have_setresuid_decl=no
3763 fi
3764 rm -f conftest*
3765 fi
3766
3767 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3768  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3769     cat >> confdefs.h <<\EOF
3770 #define HAVE_SETRESUID_DECL 1
3771 EOF
3772
3773  fi
3774
3775
3776  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3777 echo "configure:3778: checking for setresgid declaration" >&5
3778 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3779   echo $ac_n "(cached) $ac_c" 1>&6
3780 else
3781   
3782     cat > conftest.$ac_ext <<EOF
3783 #line 3784 "configure"
3784 #include "confdefs.h"
3785 #include <unistd.h>
3786 int main() {
3787 int i = (int)setresgid
3788 ; return 0; }
3789 EOF
3790 if { (eval echo configure:3791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3791   rm -rf conftest*
3792   ac_cv_have_setresgid_decl=yes
3793 else
3794   echo "configure: failed program was:" >&5
3795   cat conftest.$ac_ext >&5
3796   rm -rf conftest*
3797   ac_cv_have_setresgid_decl=no
3798 fi
3799 rm -f conftest*
3800 fi
3801
3802 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3803  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3804     cat >> confdefs.h <<\EOF
3805 #define HAVE_SETRESGID_DECL 1
3806 EOF
3807
3808  fi
3809
3810
3811  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3812 echo "configure:3813: checking for asprintf declaration" >&5
3813 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3814   echo $ac_n "(cached) $ac_c" 1>&6
3815 else
3816   
3817     cat > conftest.$ac_ext <<EOF
3818 #line 3819 "configure"
3819 #include "confdefs.h"
3820 #include <stdio.h>
3821 int main() {
3822 int i = (int)asprintf
3823 ; return 0; }
3824 EOF
3825 if { (eval echo configure:3826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3826   rm -rf conftest*
3827   ac_cv_have_asprintf_decl=yes
3828 else
3829   echo "configure: failed program was:" >&5
3830   cat conftest.$ac_ext >&5
3831   rm -rf conftest*
3832   ac_cv_have_asprintf_decl=no
3833 fi
3834 rm -f conftest*
3835 fi
3836
3837 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3838  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3839     cat >> confdefs.h <<\EOF
3840 #define HAVE_ASPRINTF_DECL 1
3841 EOF
3842
3843  fi
3844
3845
3846  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3847 echo "configure:3848: checking for vasprintf declaration" >&5
3848 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3849   echo $ac_n "(cached) $ac_c" 1>&6
3850 else
3851   
3852     cat > conftest.$ac_ext <<EOF
3853 #line 3854 "configure"
3854 #include "confdefs.h"
3855 #include <stdio.h>
3856 int main() {
3857 int i = (int)vasprintf
3858 ; return 0; }
3859 EOF
3860 if { (eval echo configure:3861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3861   rm -rf conftest*
3862   ac_cv_have_vasprintf_decl=yes
3863 else
3864   echo "configure: failed program was:" >&5
3865   cat conftest.$ac_ext >&5
3866   rm -rf conftest*
3867   ac_cv_have_vasprintf_decl=no
3868 fi
3869 rm -f conftest*
3870 fi
3871
3872 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3873  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3874     cat >> confdefs.h <<\EOF
3875 #define HAVE_VASPRINTF_DECL 1
3876 EOF
3877
3878  fi
3879
3880
3881  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3882 echo "configure:3883: checking for vsnprintf declaration" >&5
3883 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3884   echo $ac_n "(cached) $ac_c" 1>&6
3885 else
3886   
3887     cat > conftest.$ac_ext <<EOF
3888 #line 3889 "configure"
3889 #include "confdefs.h"
3890 #include <stdio.h>
3891 int main() {
3892 int i = (int)vsnprintf
3893 ; return 0; }
3894 EOF
3895 if { (eval echo configure:3896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3896   rm -rf conftest*
3897   ac_cv_have_vsnprintf_decl=yes
3898 else
3899   echo "configure: failed program was:" >&5
3900   cat conftest.$ac_ext >&5
3901   rm -rf conftest*
3902   ac_cv_have_vsnprintf_decl=no
3903 fi
3904 rm -f conftest*
3905 fi
3906
3907 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3908  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3909     cat >> confdefs.h <<\EOF
3910 #define HAVE_VSNPRINTF_DECL 1
3911 EOF
3912
3913  fi
3914
3915
3916  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3917 echo "configure:3918: checking for snprintf declaration" >&5
3918 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3919   echo $ac_n "(cached) $ac_c" 1>&6
3920 else
3921   
3922     cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3925 #include <stdio.h>
3926 int main() {
3927 int i = (int)snprintf
3928 ; return 0; }
3929 EOF
3930 if { (eval echo configure:3931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3931   rm -rf conftest*
3932   ac_cv_have_snprintf_decl=yes
3933 else
3934   echo "configure: failed program was:" >&5
3935   cat conftest.$ac_ext >&5
3936   rm -rf conftest*
3937   ac_cv_have_snprintf_decl=no
3938 fi
3939 rm -f conftest*
3940 fi
3941
3942 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3943  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3944     cat >> confdefs.h <<\EOF
3945 #define HAVE_SNPRINTF_DECL 1
3946 EOF
3947
3948  fi
3949
3950
3951 # and glibc has setresuid under linux but the function does
3952 # nothing until kernel 2.1.44! very dumb.
3953 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3954 echo "configure:3955: checking for real setresuid" >&5
3955 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3956   echo $ac_n "(cached) $ac_c" 1>&6
3957 else
3958   
3959     if test "$cross_compiling" = yes; then
3960   samba_cv_have_setresuid=cross
3961 else
3962   cat > conftest.$ac_ext <<EOF
3963 #line 3964 "configure"
3964 #include "confdefs.h"
3965 #include <errno.h>
3966 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3967 EOF
3968 if { (eval echo configure:3969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3969 then
3970   samba_cv_have_setresuid=yes
3971 else
3972   echo "configure: failed program was:" >&5
3973   cat conftest.$ac_ext >&5
3974   rm -fr conftest*
3975   samba_cv_have_setresuid=no
3976 fi
3977 rm -fr conftest*
3978 fi
3979
3980 fi
3981
3982 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3983 if test x"$samba_cv_have_setresuid" = x"yes"; then
3984     cat >> confdefs.h <<\EOF
3985 #define HAVE_SETRESUID 1
3986 EOF
3987
3988 fi
3989
3990 # Do the same check for setresguid...
3991 #
3992 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3993 echo "configure:3994: checking for real setresgid" >&5
3994 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
3995   echo $ac_n "(cached) $ac_c" 1>&6
3996 else
3997   
3998     if test "$cross_compiling" = yes; then
3999   samba_cv_have_setresgid=cross
4000 else
4001   cat > conftest.$ac_ext <<EOF
4002 #line 4003 "configure"
4003 #include "confdefs.h"
4004 #include <unistd.h>
4005 #include <errno.h>
4006 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4007 EOF
4008 if { (eval echo configure:4009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4009 then
4010   samba_cv_have_setresgid=yes
4011 else
4012   echo "configure: failed program was:" >&5
4013   cat conftest.$ac_ext >&5
4014   rm -fr conftest*
4015   samba_cv_have_setresgid=no
4016 fi
4017 rm -fr conftest*
4018 fi
4019
4020 fi
4021
4022 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4023 if test x"$samba_cv_have_setresgid" = x"yes"; then
4024     cat >> confdefs.h <<\EOF
4025 #define HAVE_SETRESGID 1
4026 EOF
4027
4028 fi
4029
4030 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4031 echo "configure:4032: checking for 8-bit clean memcmp" >&5
4032 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4033   echo $ac_n "(cached) $ac_c" 1>&6
4034 else
4035   if test "$cross_compiling" = yes; then
4036   ac_cv_func_memcmp_clean=no
4037 else
4038   cat > conftest.$ac_ext <<EOF
4039 #line 4040 "configure"
4040 #include "confdefs.h"
4041
4042 main()
4043 {
4044   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4045   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4046 }
4047
4048 EOF
4049 if { (eval echo configure:4050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4050 then
4051   ac_cv_func_memcmp_clean=yes
4052 else
4053   echo "configure: failed program was:" >&5
4054   cat conftest.$ac_ext >&5
4055   rm -fr conftest*
4056   ac_cv_func_memcmp_clean=no
4057 fi
4058 rm -fr conftest*
4059 fi
4060
4061 fi
4062
4063 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4064 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4065
4066
4067 ###############################################
4068 # test for where we get crypt() from
4069 for ac_func in crypt
4070 do
4071 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4072 echo "configure:4073: checking for $ac_func" >&5
4073 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4074   echo $ac_n "(cached) $ac_c" 1>&6
4075 else
4076   cat > conftest.$ac_ext <<EOF
4077 #line 4078 "configure"
4078 #include "confdefs.h"
4079 /* System header to define __stub macros and hopefully few prototypes,
4080     which can conflict with char $ac_func(); below.  */
4081 #include <assert.h>
4082 /* Override any gcc2 internal prototype to avoid an error.  */
4083 /* We use char because int might match the return type of a gcc2
4084     builtin and then its argument prototype would still apply.  */
4085 char $ac_func();
4086
4087 int main() {
4088
4089 /* The GNU C library defines this for functions which it implements
4090     to always fail with ENOSYS.  Some functions are actually named
4091     something starting with __ and the normal name is an alias.  */
4092 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4093 choke me
4094 #else
4095 $ac_func();
4096 #endif
4097
4098 ; return 0; }
4099 EOF
4100 if { (eval echo configure:4101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4101   rm -rf conftest*
4102   eval "ac_cv_func_$ac_func=yes"
4103 else
4104   echo "configure: failed program was:" >&5
4105   cat conftest.$ac_ext >&5
4106   rm -rf conftest*
4107   eval "ac_cv_func_$ac_func=no"
4108 fi
4109 rm -f conftest*
4110 fi
4111
4112 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4113   echo "$ac_t""yes" 1>&6
4114     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4115   cat >> confdefs.h <<EOF
4116 #define $ac_tr_func 1
4117 EOF
4118  
4119 else
4120   echo "$ac_t""no" 1>&6
4121 fi
4122 done
4123
4124 if test x"$ac_cv_func_crypt" = x"no"; then
4125     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4126 echo "configure:4127: checking for crypt in -lcrypt" >&5
4127 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4128 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4129   echo $ac_n "(cached) $ac_c" 1>&6
4130 else
4131   ac_save_LIBS="$LIBS"
4132 LIBS="-lcrypt  $LIBS"
4133 cat > conftest.$ac_ext <<EOF
4134 #line 4135 "configure"
4135 #include "confdefs.h"
4136 /* Override any gcc2 internal prototype to avoid an error.  */
4137 /* We use char because int might match the return type of a gcc2
4138     builtin and then its argument prototype would still apply.  */
4139 char crypt();
4140
4141 int main() {
4142 crypt()
4143 ; return 0; }
4144 EOF
4145 if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4146   rm -rf conftest*
4147   eval "ac_cv_lib_$ac_lib_var=yes"
4148 else
4149   echo "configure: failed program was:" >&5
4150   cat conftest.$ac_ext >&5
4151   rm -rf conftest*
4152   eval "ac_cv_lib_$ac_lib_var=no"
4153 fi
4154 rm -f conftest*
4155 LIBS="$ac_save_LIBS"
4156
4157 fi
4158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4159   echo "$ac_t""yes" 1>&6
4160   LIBS="$LIBS -lcrypt";
4161         cat >> confdefs.h <<\EOF
4162 #define HAVE_CRYPT 1
4163 EOF
4164
4165 else
4166   echo "$ac_t""no" 1>&6
4167 fi
4168
4169 fi
4170
4171
4172 ###############################################
4173 # Readline included by default unless explicitly asked not to
4174 test "${with_readline+set}" != "set" && with_readline=yes
4175
4176 # test for where we get readline() from
4177 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4178 echo "configure:4179: checking whether to use readline" >&5
4179 # Check whether --with-readline or --without-readline was given.
4180 if test "${with_readline+set}" = set; then
4181   withval="$with_readline"
4182     case "$with_readline" in
4183   yes)
4184     echo "$ac_t""yes" 1>&6
4185
4186     for ac_hdr in readline.h history.h readline/readline.h
4187 do
4188 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4189 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4190 echo "configure:4191: checking for $ac_hdr" >&5
4191 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4192   echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194   cat > conftest.$ac_ext <<EOF
4195 #line 4196 "configure"
4196 #include "confdefs.h"
4197 #include <$ac_hdr>
4198 EOF
4199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4200 { (eval echo configure:4201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4202 if test -z "$ac_err"; then
4203   rm -rf conftest*
4204   eval "ac_cv_header_$ac_safe=yes"
4205 else
4206   echo "$ac_err" >&5
4207   echo "configure: failed program was:" >&5
4208   cat conftest.$ac_ext >&5
4209   rm -rf conftest*
4210   eval "ac_cv_header_$ac_safe=no"
4211 fi
4212 rm -f conftest*
4213 fi
4214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4215   echo "$ac_t""yes" 1>&6
4216     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4217   cat >> confdefs.h <<EOF
4218 #define $ac_tr_hdr 1
4219 EOF
4220  
4221 else
4222   echo "$ac_t""no" 1>&6
4223 fi
4224 done
4225
4226     for ac_hdr in readline/history.h
4227 do
4228 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4229 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4230 echo "configure:4231: checking for $ac_hdr" >&5
4231 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4232   echo $ac_n "(cached) $ac_c" 1>&6
4233 else
4234   cat > conftest.$ac_ext <<EOF
4235 #line 4236 "configure"
4236 #include "confdefs.h"
4237 #include <$ac_hdr>
4238 EOF
4239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4240 { (eval echo configure:4241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4242 if test -z "$ac_err"; then
4243   rm -rf conftest*
4244   eval "ac_cv_header_$ac_safe=yes"
4245 else
4246   echo "$ac_err" >&5
4247   echo "configure: failed program was:" >&5
4248   cat conftest.$ac_ext >&5
4249   rm -rf conftest*
4250   eval "ac_cv_header_$ac_safe=no"
4251 fi
4252 rm -f conftest*
4253 fi
4254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4255   echo "$ac_t""yes" 1>&6
4256     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4257   cat >> confdefs.h <<EOF
4258 #define $ac_tr_hdr 1
4259 EOF
4260  
4261 else
4262   echo "$ac_t""no" 1>&6
4263 fi
4264 done
4265
4266
4267     for ac_hdr in readline.h readline/readline.h
4268 do
4269 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4270 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4271 echo "configure:4272: checking for $ac_hdr" >&5
4272 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4273   echo $ac_n "(cached) $ac_c" 1>&6
4274 else
4275   cat > conftest.$ac_ext <<EOF
4276 #line 4277 "configure"
4277 #include "confdefs.h"
4278 #include <$ac_hdr>
4279 EOF
4280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4281 { (eval echo configure:4282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4283 if test -z "$ac_err"; then
4284   rm -rf conftest*
4285   eval "ac_cv_header_$ac_safe=yes"
4286 else
4287   echo "$ac_err" >&5
4288   echo "configure: failed program was:" >&5
4289   cat conftest.$ac_ext >&5
4290   rm -rf conftest*
4291   eval "ac_cv_header_$ac_safe=no"
4292 fi
4293 rm -f conftest*
4294 fi
4295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4296   echo "$ac_t""yes" 1>&6
4297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4298   cat >> confdefs.h <<EOF
4299 #define $ac_tr_hdr 1
4300 EOF
4301  
4302       for termlib in ncurses curses termcap terminfo termlib; do
4303        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4304 echo "configure:4305: checking for tgetent in -l${termlib}" >&5
4305 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4306 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4307   echo $ac_n "(cached) $ac_c" 1>&6
4308 else
4309   ac_save_LIBS="$LIBS"
4310 LIBS="-l${termlib}  $LIBS"
4311 cat > conftest.$ac_ext <<EOF
4312 #line 4313 "configure"
4313 #include "confdefs.h"
4314 /* Override any gcc2 internal prototype to avoid an error.  */
4315 /* We use char because int might match the return type of a gcc2
4316     builtin and then its argument prototype would still apply.  */
4317 char tgetent();
4318
4319 int main() {
4320 tgetent()
4321 ; return 0; }
4322 EOF
4323 if { (eval echo configure:4324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4324   rm -rf conftest*
4325   eval "ac_cv_lib_$ac_lib_var=yes"
4326 else
4327   echo "configure: failed program was:" >&5
4328   cat conftest.$ac_ext >&5
4329   rm -rf conftest*
4330   eval "ac_cv_lib_$ac_lib_var=no"
4331 fi
4332 rm -f conftest*
4333 LIBS="$ac_save_LIBS"
4334
4335 fi
4336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4337   echo "$ac_t""yes" 1>&6
4338   TERMLIBS="-l${termlib}"; break
4339 else
4340   echo "$ac_t""no" 1>&6
4341 fi
4342
4343       done
4344       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4345 echo "configure:4346: checking for rl_callback_handler_install in -lreadline" >&5
4346 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4347 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4348   echo $ac_n "(cached) $ac_c" 1>&6
4349 else
4350   ac_save_LIBS="$LIBS"
4351 LIBS="-lreadline $TERMLIBS $LIBS"
4352 cat > conftest.$ac_ext <<EOF
4353 #line 4354 "configure"
4354 #include "confdefs.h"
4355 /* Override any gcc2 internal prototype to avoid an error.  */
4356 /* We use char because int might match the return type of a gcc2
4357     builtin and then its argument prototype would still apply.  */
4358 char rl_callback_handler_install();
4359
4360 int main() {
4361 rl_callback_handler_install()
4362 ; return 0; }
4363 EOF
4364 if { (eval echo configure:4365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4365   rm -rf conftest*
4366   eval "ac_cv_lib_$ac_lib_var=yes"
4367 else
4368   echo "configure: failed program was:" >&5
4369   cat conftest.$ac_ext >&5
4370   rm -rf conftest*
4371   eval "ac_cv_lib_$ac_lib_var=no"
4372 fi
4373 rm -f conftest*
4374 LIBS="$ac_save_LIBS"
4375
4376 fi
4377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4378   echo "$ac_t""yes" 1>&6
4379   TERMLIBS="-lreadline $TERMLIBS"
4380        cat >> confdefs.h <<\EOF
4381 #define HAVE_LIBREADLINE 1
4382 EOF
4383
4384        break
4385 else
4386   echo "$ac_t""no" 1>&6
4387 TERMLIBS=
4388 fi
4389
4390 else
4391   echo "$ac_t""no" 1>&6
4392 fi
4393 done
4394
4395     ;;
4396   no)
4397     echo "$ac_t""no" 1>&6
4398     ;;
4399   *)
4400     echo "$ac_t""yes" 1>&6
4401
4402     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4403     # alternate readline path
4404     _ldflags=${LDFLAGS}
4405     _cppflags=${CPPFLAGS}
4406
4407     # Add additional search path
4408     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4409     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4410
4411     for ac_hdr in readline.h history.h readline/readline.h
4412 do
4413 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4414 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4415 echo "configure:4416: checking for $ac_hdr" >&5
4416 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4417   echo $ac_n "(cached) $ac_c" 1>&6
4418 else
4419   cat > conftest.$ac_ext <<EOF
4420 #line 4421 "configure"
4421 #include "confdefs.h"
4422 #include <$ac_hdr>
4423 EOF
4424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4425 { (eval echo configure:4426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4427 if test -z "$ac_err"; then
4428   rm -rf conftest*
4429   eval "ac_cv_header_$ac_safe=yes"
4430 else
4431   echo "$ac_err" >&5
4432   echo "configure: failed program was:" >&5
4433   cat conftest.$ac_ext >&5
4434   rm -rf conftest*
4435   eval "ac_cv_header_$ac_safe=no"
4436 fi
4437 rm -f conftest*
4438 fi
4439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4440   echo "$ac_t""yes" 1>&6
4441     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4442   cat >> confdefs.h <<EOF
4443 #define $ac_tr_hdr 1
4444 EOF
4445  
4446 else
4447   echo "$ac_t""no" 1>&6
4448 fi
4449 done
4450
4451     for ac_hdr in readline/history.h
4452 do
4453 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4454 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4455 echo "configure:4456: checking for $ac_hdr" >&5
4456 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4457   echo $ac_n "(cached) $ac_c" 1>&6
4458 else
4459   cat > conftest.$ac_ext <<EOF
4460 #line 4461 "configure"
4461 #include "confdefs.h"
4462 #include <$ac_hdr>
4463 EOF
4464 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4465 { (eval echo configure:4466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4466 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4467 if test -z "$ac_err"; then
4468   rm -rf conftest*
4469   eval "ac_cv_header_$ac_safe=yes"
4470 else
4471   echo "$ac_err" >&5
4472   echo "configure: failed program was:" >&5
4473   cat conftest.$ac_ext >&5
4474   rm -rf conftest*
4475   eval "ac_cv_header_$ac_safe=no"
4476 fi
4477 rm -f conftest*
4478 fi
4479 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4480   echo "$ac_t""yes" 1>&6
4481     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4482   cat >> confdefs.h <<EOF
4483 #define $ac_tr_hdr 1
4484 EOF
4485  
4486 else
4487   echo "$ac_t""no" 1>&6
4488 fi
4489 done
4490
4491
4492     for ac_hdr in readline.h readline/readline.h
4493 do
4494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4496 echo "configure:4497: checking for $ac_hdr" >&5
4497 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4498   echo $ac_n "(cached) $ac_c" 1>&6
4499 else
4500   cat > conftest.$ac_ext <<EOF
4501 #line 4502 "configure"
4502 #include "confdefs.h"
4503 #include <$ac_hdr>
4504 EOF
4505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4506 { (eval echo configure:4507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4508 if test -z "$ac_err"; then
4509   rm -rf conftest*
4510   eval "ac_cv_header_$ac_safe=yes"
4511 else
4512   echo "$ac_err" >&5
4513   echo "configure: failed program was:" >&5
4514   cat conftest.$ac_ext >&5
4515   rm -rf conftest*
4516   eval "ac_cv_header_$ac_safe=no"
4517 fi
4518 rm -f conftest*
4519 fi
4520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4521   echo "$ac_t""yes" 1>&6
4522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4523   cat >> confdefs.h <<EOF
4524 #define $ac_tr_hdr 1
4525 EOF
4526  
4527       for termlib in ncurses curses termcap terminfo termlib; do
4528        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4529 echo "configure:4530: checking for tgetent in -l${termlib}" >&5
4530 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4531 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4532   echo $ac_n "(cached) $ac_c" 1>&6
4533 else
4534   ac_save_LIBS="$LIBS"
4535 LIBS="-l${termlib}  $LIBS"
4536 cat > conftest.$ac_ext <<EOF
4537 #line 4538 "configure"
4538 #include "confdefs.h"
4539 /* Override any gcc2 internal prototype to avoid an error.  */
4540 /* We use char because int might match the return type of a gcc2
4541     builtin and then its argument prototype would still apply.  */
4542 char tgetent();
4543
4544 int main() {
4545 tgetent()
4546 ; return 0; }
4547 EOF
4548 if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4549   rm -rf conftest*
4550   eval "ac_cv_lib_$ac_lib_var=yes"
4551 else
4552   echo "configure: failed program was:" >&5
4553   cat conftest.$ac_ext >&5
4554   rm -rf conftest*
4555   eval "ac_cv_lib_$ac_lib_var=no"
4556 fi
4557 rm -f conftest*
4558 LIBS="$ac_save_LIBS"
4559
4560 fi
4561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4562   echo "$ac_t""yes" 1>&6
4563   TERMLIBS="-l${termlib}"; break
4564 else
4565   echo "$ac_t""no" 1>&6
4566 fi
4567
4568       done
4569       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4570 echo "configure:4571: checking for rl_callback_handler_install in -lreadline" >&5
4571 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4572 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4573   echo $ac_n "(cached) $ac_c" 1>&6
4574 else
4575   ac_save_LIBS="$LIBS"
4576 LIBS="-lreadline $TERMLIBS $LIBS"
4577 cat > conftest.$ac_ext <<EOF
4578 #line 4579 "configure"
4579 #include "confdefs.h"
4580 /* Override any gcc2 internal prototype to avoid an error.  */
4581 /* We use char because int might match the return type of a gcc2
4582     builtin and then its argument prototype would still apply.  */
4583 char rl_callback_handler_install();
4584
4585 int main() {
4586 rl_callback_handler_install()
4587 ; return 0; }
4588 EOF
4589 if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4590   rm -rf conftest*
4591   eval "ac_cv_lib_$ac_lib_var=yes"
4592 else
4593   echo "configure: failed program was:" >&5
4594   cat conftest.$ac_ext >&5
4595   rm -rf conftest*
4596   eval "ac_cv_lib_$ac_lib_var=no"
4597 fi
4598 rm -f conftest*
4599 LIBS="$ac_save_LIBS"
4600
4601 fi
4602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4603   echo "$ac_t""yes" 1>&6
4604   TERMLDFLAGS="-L$with_readline/lib"
4605        TERMCPPFLAGS="-I$with_readline/include"
4606        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4607        TERMLIBS="-lreadline $TERMLIBS"
4608        cat >> confdefs.h <<\EOF
4609 #define HAVE_LIBREADLINE 1
4610 EOF
4611
4612        break
4613 else
4614   echo "$ac_t""no" 1>&6
4615 TERMLIBS= CPPFLAGS=$_cppflags
4616 fi
4617
4618 else
4619   echo "$ac_t""no" 1>&6
4620 fi
4621 done
4622
4623
4624     LDFLAGS=$_ldflags
4625     ;;
4626   esac
4627 else
4628   echo "$ac_t""no" 1>&6
4629
4630 fi
4631
4632
4633
4634
4635 # The readline API changed slightly from readline3 to readline4, so
4636 # code will generate warnings on one of them unless we have a few
4637 # special cases.
4638 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4639 echo "configure:4640: checking for rl_completion_matches in -lreadline" >&5
4640 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4641 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4642   echo $ac_n "(cached) $ac_c" 1>&6
4643 else
4644   ac_save_LIBS="$LIBS"
4645 LIBS="-lreadline $TERMLIBS $LIBS"
4646 cat > conftest.$ac_ext <<EOF
4647 #line 4648 "configure"
4648 #include "confdefs.h"
4649 /* Override any gcc2 internal prototype to avoid an error.  */
4650 /* We use char because int might match the return type of a gcc2
4651     builtin and then its argument prototype would still apply.  */
4652 char rl_completion_matches();
4653
4654 int main() {
4655 rl_completion_matches()
4656 ; return 0; }
4657 EOF
4658 if { (eval echo configure:4659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4659   rm -rf conftest*
4660   eval "ac_cv_lib_$ac_lib_var=yes"
4661 else
4662   echo "configure: failed program was:" >&5
4663   cat conftest.$ac_ext >&5
4664   rm -rf conftest*
4665   eval "ac_cv_lib_$ac_lib_var=no"
4666 fi
4667 rm -f conftest*
4668 LIBS="$ac_save_LIBS"
4669
4670 fi
4671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4672   echo "$ac_t""yes" 1>&6
4673   cat >> confdefs.h <<\EOF
4674 #define HAVE_NEW_LIBREADLINE 1
4675 EOF
4676
4677 else
4678   echo "$ac_t""no" 1>&6
4679 fi
4680
4681
4682 # The following test taken from the cvs sources
4683 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4684 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4685 # libsocket.so which has a bad implementation of gethostbyname (it
4686 # only looks in /etc/hosts), so we only look for -lsocket if we need
4687 # it.
4688 for ac_func in connect
4689 do
4690 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4691 echo "configure:4692: checking for $ac_func" >&5
4692 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4693   echo $ac_n "(cached) $ac_c" 1>&6
4694 else
4695   cat > conftest.$ac_ext <<EOF
4696 #line 4697 "configure"
4697 #include "confdefs.h"
4698 /* System header to define __stub macros and hopefully few prototypes,
4699     which can conflict with char $ac_func(); below.  */
4700 #include <assert.h>
4701 /* Override any gcc2 internal prototype to avoid an error.  */
4702 /* We use char because int might match the return type of a gcc2
4703     builtin and then its argument prototype would still apply.  */
4704 char $ac_func();
4705
4706 int main() {
4707
4708 /* The GNU C library defines this for functions which it implements
4709     to always fail with ENOSYS.  Some functions are actually named
4710     something starting with __ and the normal name is an alias.  */
4711 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4712 choke me
4713 #else
4714 $ac_func();
4715 #endif
4716
4717 ; return 0; }
4718 EOF
4719 if { (eval echo configure:4720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4720   rm -rf conftest*
4721   eval "ac_cv_func_$ac_func=yes"
4722 else
4723   echo "configure: failed program was:" >&5
4724   cat conftest.$ac_ext >&5
4725   rm -rf conftest*
4726   eval "ac_cv_func_$ac_func=no"
4727 fi
4728 rm -f conftest*
4729 fi
4730
4731 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4732   echo "$ac_t""yes" 1>&6
4733     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4734   cat >> confdefs.h <<EOF
4735 #define $ac_tr_func 1
4736 EOF
4737  
4738 else
4739   echo "$ac_t""no" 1>&6
4740 fi
4741 done
4742
4743 if test x"$ac_cv_func_connect" = x"no"; then
4744     case "$LIBS" in
4745     *-lnsl*) ;;
4746     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4747 echo "configure:4748: checking for printf in -lnsl_s" >&5
4748 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4749 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4750   echo $ac_n "(cached) $ac_c" 1>&6
4751 else
4752   ac_save_LIBS="$LIBS"
4753 LIBS="-lnsl_s  $LIBS"
4754 cat > conftest.$ac_ext <<EOF
4755 #line 4756 "configure"
4756 #include "confdefs.h"
4757 /* Override any gcc2 internal prototype to avoid an error.  */
4758 /* We use char because int might match the return type of a gcc2
4759     builtin and then its argument prototype would still apply.  */
4760 char printf();
4761
4762 int main() {
4763 printf()
4764 ; return 0; }
4765 EOF
4766 if { (eval echo configure:4767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4767   rm -rf conftest*
4768   eval "ac_cv_lib_$ac_lib_var=yes"
4769 else
4770   echo "configure: failed program was:" >&5
4771   cat conftest.$ac_ext >&5
4772   rm -rf conftest*
4773   eval "ac_cv_lib_$ac_lib_var=no"
4774 fi
4775 rm -f conftest*
4776 LIBS="$ac_save_LIBS"
4777
4778 fi
4779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4780   echo "$ac_t""yes" 1>&6
4781     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4782     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4783   cat >> confdefs.h <<EOF
4784 #define $ac_tr_lib 1
4785 EOF
4786
4787   LIBS="-lnsl_s $LIBS"
4788
4789 else
4790   echo "$ac_t""no" 1>&6
4791 fi
4792  ;;
4793     esac
4794     case "$LIBS" in
4795     *-lnsl*) ;;
4796     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4797 echo "configure:4798: checking for printf in -lnsl" >&5
4798 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4799 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4800   echo $ac_n "(cached) $ac_c" 1>&6
4801 else
4802   ac_save_LIBS="$LIBS"
4803 LIBS="-lnsl  $LIBS"
4804 cat > conftest.$ac_ext <<EOF
4805 #line 4806 "configure"
4806 #include "confdefs.h"
4807 /* Override any gcc2 internal prototype to avoid an error.  */
4808 /* We use char because int might match the return type of a gcc2
4809     builtin and then its argument prototype would still apply.  */
4810 char printf();
4811
4812 int main() {
4813 printf()
4814 ; return 0; }
4815 EOF
4816 if { (eval echo configure:4817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4817   rm -rf conftest*
4818   eval "ac_cv_lib_$ac_lib_var=yes"
4819 else
4820   echo "configure: failed program was:" >&5
4821   cat conftest.$ac_ext >&5
4822   rm -rf conftest*
4823   eval "ac_cv_lib_$ac_lib_var=no"
4824 fi
4825 rm -f conftest*
4826 LIBS="$ac_save_LIBS"
4827
4828 fi
4829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4830   echo "$ac_t""yes" 1>&6
4831     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4832     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4833   cat >> confdefs.h <<EOF
4834 #define $ac_tr_lib 1
4835 EOF
4836
4837   LIBS="-lnsl $LIBS"
4838
4839 else
4840   echo "$ac_t""no" 1>&6
4841 fi
4842  ;;
4843     esac
4844     case "$LIBS" in
4845     *-lsocket*) ;;
4846     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4847 echo "configure:4848: checking for connect in -lsocket" >&5
4848 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4849 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4850   echo $ac_n "(cached) $ac_c" 1>&6
4851 else
4852   ac_save_LIBS="$LIBS"
4853 LIBS="-lsocket  $LIBS"
4854 cat > conftest.$ac_ext <<EOF
4855 #line 4856 "configure"
4856 #include "confdefs.h"
4857 /* Override any gcc2 internal prototype to avoid an error.  */
4858 /* We use char because int might match the return type of a gcc2
4859     builtin and then its argument prototype would still apply.  */
4860 char connect();
4861
4862 int main() {
4863 connect()
4864 ; return 0; }
4865 EOF
4866 if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4867   rm -rf conftest*
4868   eval "ac_cv_lib_$ac_lib_var=yes"
4869 else
4870   echo "configure: failed program was:" >&5
4871   cat conftest.$ac_ext >&5
4872   rm -rf conftest*
4873   eval "ac_cv_lib_$ac_lib_var=no"
4874 fi
4875 rm -f conftest*
4876 LIBS="$ac_save_LIBS"
4877
4878 fi
4879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4880   echo "$ac_t""yes" 1>&6
4881     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4882     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4883   cat >> confdefs.h <<EOF
4884 #define $ac_tr_lib 1
4885 EOF
4886
4887   LIBS="-lsocket $LIBS"
4888
4889 else
4890   echo "$ac_t""no" 1>&6
4891 fi
4892  ;;
4893     esac
4894     case "$LIBS" in
4895     *-linet*) ;;
4896     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4897 echo "configure:4898: checking for connect in -linet" >&5
4898 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4899 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4900   echo $ac_n "(cached) $ac_c" 1>&6
4901 else
4902   ac_save_LIBS="$LIBS"
4903 LIBS="-linet  $LIBS"
4904 cat > conftest.$ac_ext <<EOF
4905 #line 4906 "configure"
4906 #include "confdefs.h"
4907 /* Override any gcc2 internal prototype to avoid an error.  */
4908 /* We use char because int might match the return type of a gcc2
4909     builtin and then its argument prototype would still apply.  */
4910 char connect();
4911
4912 int main() {
4913 connect()
4914 ; return 0; }
4915 EOF
4916 if { (eval echo configure:4917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4917   rm -rf conftest*
4918   eval "ac_cv_lib_$ac_lib_var=yes"
4919 else
4920   echo "configure: failed program was:" >&5
4921   cat conftest.$ac_ext >&5
4922   rm -rf conftest*
4923   eval "ac_cv_lib_$ac_lib_var=no"
4924 fi
4925 rm -f conftest*
4926 LIBS="$ac_save_LIBS"
4927
4928 fi
4929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4930   echo "$ac_t""yes" 1>&6
4931     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4932     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4933   cat >> confdefs.h <<EOF
4934 #define $ac_tr_lib 1
4935 EOF
4936
4937   LIBS="-linet $LIBS"
4938
4939 else
4940   echo "$ac_t""no" 1>&6
4941 fi
4942  ;;
4943     esac
4944             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4945        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4946         # ac_cv_func_connect=yes
4947         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4948         cat >> confdefs.h <<\EOF
4949 #define HAVE_CONNECT 1
4950 EOF
4951
4952     fi
4953 fi
4954
4955 ###############################################
4956 # test for where we get get_yp_default_domain() from
4957 for ac_func in yp_get_default_domain
4958 do
4959 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4960 echo "configure:4961: checking for $ac_func" >&5
4961 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4962   echo $ac_n "(cached) $ac_c" 1>&6
4963 else
4964   cat > conftest.$ac_ext <<EOF
4965 #line 4966 "configure"
4966 #include "confdefs.h"
4967 /* System header to define __stub macros and hopefully few prototypes,
4968     which can conflict with char $ac_func(); below.  */
4969 #include <assert.h>
4970 /* Override any gcc2 internal prototype to avoid an error.  */
4971 /* We use char because int might match the return type of a gcc2
4972     builtin and then its argument prototype would still apply.  */
4973 char $ac_func();
4974
4975 int main() {
4976
4977 /* The GNU C library defines this for functions which it implements
4978     to always fail with ENOSYS.  Some functions are actually named
4979     something starting with __ and the normal name is an alias.  */
4980 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4981 choke me
4982 #else
4983 $ac_func();
4984 #endif
4985
4986 ; return 0; }
4987 EOF
4988 if { (eval echo configure:4989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4989   rm -rf conftest*
4990   eval "ac_cv_func_$ac_func=yes"
4991 else
4992   echo "configure: failed program was:" >&5
4993   cat conftest.$ac_ext >&5
4994   rm -rf conftest*
4995   eval "ac_cv_func_$ac_func=no"
4996 fi
4997 rm -f conftest*
4998 fi
4999
5000 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5001   echo "$ac_t""yes" 1>&6
5002     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5003   cat >> confdefs.h <<EOF
5004 #define $ac_tr_func 1
5005 EOF
5006  
5007 else
5008   echo "$ac_t""no" 1>&6
5009 fi
5010 done
5011
5012 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5013         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5014 echo "configure:5015: checking for yp_get_default_domain in -lnsl" >&5
5015 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5016 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5017   echo $ac_n "(cached) $ac_c" 1>&6
5018 else
5019   ac_save_LIBS="$LIBS"
5020 LIBS="-lnsl  $LIBS"
5021 cat > conftest.$ac_ext <<EOF
5022 #line 5023 "configure"
5023 #include "confdefs.h"
5024 /* Override any gcc2 internal prototype to avoid an error.  */
5025 /* We use char because int might match the return type of a gcc2
5026     builtin and then its argument prototype would still apply.  */
5027 char yp_get_default_domain();
5028
5029 int main() {
5030 yp_get_default_domain()
5031 ; return 0; }
5032 EOF
5033 if { (eval echo configure:5034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5034   rm -rf conftest*
5035   eval "ac_cv_lib_$ac_lib_var=yes"
5036 else
5037   echo "configure: failed program was:" >&5
5038   cat conftest.$ac_ext >&5
5039   rm -rf conftest*
5040   eval "ac_cv_lib_$ac_lib_var=no"
5041 fi
5042 rm -f conftest*
5043 LIBS="$ac_save_LIBS"
5044
5045 fi
5046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5047   echo "$ac_t""yes" 1>&6
5048   LIBS="$LIBS -lnsl";
5049         cat >> confdefs.h <<\EOF
5050 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5051 EOF
5052
5053 else
5054   echo "$ac_t""no" 1>&6
5055 fi
5056  
5057 fi
5058
5059 # Check if we have execl, if not we need to compile smbrun.
5060 for ac_func in execl
5061 do
5062 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5063 echo "configure:5064: checking for $ac_func" >&5
5064 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5065   echo $ac_n "(cached) $ac_c" 1>&6
5066 else
5067   cat > conftest.$ac_ext <<EOF
5068 #line 5069 "configure"
5069 #include "confdefs.h"
5070 /* System header to define __stub macros and hopefully few prototypes,
5071     which can conflict with char $ac_func(); below.  */
5072 #include <assert.h>
5073 /* Override any gcc2 internal prototype to avoid an error.  */
5074 /* We use char because int might match the return type of a gcc2
5075     builtin and then its argument prototype would still apply.  */
5076 char $ac_func();
5077
5078 int main() {
5079
5080 /* The GNU C library defines this for functions which it implements
5081     to always fail with ENOSYS.  Some functions are actually named
5082     something starting with __ and the normal name is an alias.  */
5083 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5084 choke me
5085 #else
5086 $ac_func();
5087 #endif
5088
5089 ; return 0; }
5090 EOF
5091 if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5092   rm -rf conftest*
5093   eval "ac_cv_func_$ac_func=yes"
5094 else
5095   echo "configure: failed program was:" >&5
5096   cat conftest.$ac_ext >&5
5097   rm -rf conftest*
5098   eval "ac_cv_func_$ac_func=no"
5099 fi
5100 rm -f conftest*
5101 fi
5102
5103 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5104   echo "$ac_t""yes" 1>&6
5105     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5106   cat >> confdefs.h <<EOF
5107 #define $ac_tr_func 1
5108 EOF
5109  
5110 else
5111   echo "$ac_t""no" 1>&6
5112 fi
5113 done
5114
5115 if test x"$ac_cv_func_execl" = x"no"; then
5116     RUNPROG="bin/smbrun"
5117 else
5118     RUNPROG=""
5119 fi
5120
5121 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
5122 do
5123 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5124 echo "configure:5125: checking for $ac_func" >&5
5125 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5126   echo $ac_n "(cached) $ac_c" 1>&6
5127 else
5128   cat > conftest.$ac_ext <<EOF
5129 #line 5130 "configure"
5130 #include "confdefs.h"
5131 /* System header to define __stub macros and hopefully few prototypes,
5132     which can conflict with char $ac_func(); below.  */
5133 #include <assert.h>
5134 /* Override any gcc2 internal prototype to avoid an error.  */
5135 /* We use char because int might match the return type of a gcc2
5136     builtin and then its argument prototype would still apply.  */
5137 char $ac_func();
5138
5139 int main() {
5140
5141 /* The GNU C library defines this for functions which it implements
5142     to always fail with ENOSYS.  Some functions are actually named
5143     something starting with __ and the normal name is an alias.  */
5144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5145 choke me
5146 #else
5147 $ac_func();
5148 #endif
5149
5150 ; return 0; }
5151 EOF
5152 if { (eval echo configure:5153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5153   rm -rf conftest*
5154   eval "ac_cv_func_$ac_func=yes"
5155 else
5156   echo "configure: failed program was:" >&5
5157   cat conftest.$ac_ext >&5
5158   rm -rf conftest*
5159   eval "ac_cv_func_$ac_func=no"
5160 fi
5161 rm -f conftest*
5162 fi
5163
5164 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5165   echo "$ac_t""yes" 1>&6
5166     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5167   cat >> confdefs.h <<EOF
5168 #define $ac_tr_func 1
5169 EOF
5170  
5171 else
5172   echo "$ac_t""no" 1>&6
5173 fi
5174 done
5175
5176 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat
5177 do
5178 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5179 echo "configure:5180: checking for $ac_func" >&5
5180 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5181   echo $ac_n "(cached) $ac_c" 1>&6
5182 else
5183   cat > conftest.$ac_ext <<EOF
5184 #line 5185 "configure"
5185 #include "confdefs.h"
5186 /* System header to define __stub macros and hopefully few prototypes,
5187     which can conflict with char $ac_func(); below.  */
5188 #include <assert.h>
5189 /* Override any gcc2 internal prototype to avoid an error.  */
5190 /* We use char because int might match the return type of a gcc2
5191     builtin and then its argument prototype would still apply.  */
5192 char $ac_func();
5193
5194 int main() {
5195
5196 /* The GNU C library defines this for functions which it implements
5197     to always fail with ENOSYS.  Some functions are actually named
5198     something starting with __ and the normal name is an alias.  */
5199 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5200 choke me
5201 #else
5202 $ac_func();
5203 #endif
5204
5205 ; return 0; }
5206 EOF
5207 if { (eval echo configure:5208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5208   rm -rf conftest*
5209   eval "ac_cv_func_$ac_func=yes"
5210 else
5211   echo "configure: failed program was:" >&5
5212   cat conftest.$ac_ext >&5
5213   rm -rf conftest*
5214   eval "ac_cv_func_$ac_func=no"
5215 fi
5216 rm -f conftest*
5217 fi
5218
5219 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5220   echo "$ac_t""yes" 1>&6
5221     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5222   cat >> confdefs.h <<EOF
5223 #define $ac_tr_func 1
5224 EOF
5225  
5226 else
5227   echo "$ac_t""no" 1>&6
5228 fi
5229 done
5230
5231 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5232 do
5233 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5234 echo "configure:5235: checking for $ac_func" >&5
5235 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5236   echo $ac_n "(cached) $ac_c" 1>&6
5237 else
5238   cat > conftest.$ac_ext <<EOF
5239 #line 5240 "configure"
5240 #include "confdefs.h"
5241 /* System header to define __stub macros and hopefully few prototypes,
5242     which can conflict with char $ac_func(); below.  */
5243 #include <assert.h>
5244 /* Override any gcc2 internal prototype to avoid an error.  */
5245 /* We use char because int might match the return type of a gcc2
5246     builtin and then its argument prototype would still apply.  */
5247 char $ac_func();
5248
5249 int main() {
5250
5251 /* The GNU C library defines this for functions which it implements
5252     to always fail with ENOSYS.  Some functions are actually named
5253     something starting with __ and the normal name is an alias.  */
5254 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5255 choke me
5256 #else
5257 $ac_func();
5258 #endif
5259
5260 ; return 0; }
5261 EOF
5262 if { (eval echo configure:5263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5263   rm -rf conftest*
5264   eval "ac_cv_func_$ac_func=yes"
5265 else
5266   echo "configure: failed program was:" >&5
5267   cat conftest.$ac_ext >&5
5268   rm -rf conftest*
5269   eval "ac_cv_func_$ac_func=no"
5270 fi
5271 rm -f conftest*
5272 fi
5273
5274 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5275   echo "$ac_t""yes" 1>&6
5276     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5277   cat >> confdefs.h <<EOF
5278 #define $ac_tr_func 1
5279 EOF
5280  
5281 else
5282   echo "$ac_t""no" 1>&6
5283 fi
5284 done
5285
5286 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5287 do
5288 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5289 echo "configure:5290: checking for $ac_func" >&5
5290 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5291   echo $ac_n "(cached) $ac_c" 1>&6
5292 else
5293   cat > conftest.$ac_ext <<EOF
5294 #line 5295 "configure"
5295 #include "confdefs.h"
5296 /* System header to define __stub macros and hopefully few prototypes,
5297     which can conflict with char $ac_func(); below.  */
5298 #include <assert.h>
5299 /* Override any gcc2 internal prototype to avoid an error.  */
5300 /* We use char because int might match the return type of a gcc2
5301     builtin and then its argument prototype would still apply.  */
5302 char $ac_func();
5303
5304 int main() {
5305
5306 /* The GNU C library defines this for functions which it implements
5307     to always fail with ENOSYS.  Some functions are actually named
5308     something starting with __ and the normal name is an alias.  */
5309 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5310 choke me
5311 #else
5312 $ac_func();
5313 #endif
5314
5315 ; return 0; }
5316 EOF
5317 if { (eval echo configure:5318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5318   rm -rf conftest*
5319   eval "ac_cv_func_$ac_func=yes"
5320 else
5321   echo "configure: failed program was:" >&5
5322   cat conftest.$ac_ext >&5
5323   rm -rf conftest*
5324   eval "ac_cv_func_$ac_func=no"
5325 fi
5326 rm -f conftest*
5327 fi
5328
5329 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5330   echo "$ac_t""yes" 1>&6
5331     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5332   cat >> confdefs.h <<EOF
5333 #define $ac_tr_func 1
5334 EOF
5335  
5336 else
5337   echo "$ac_t""no" 1>&6
5338 fi
5339 done
5340
5341 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5342 do
5343 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5344 echo "configure:5345: checking for $ac_func" >&5
5345 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5346   echo $ac_n "(cached) $ac_c" 1>&6
5347 else
5348   cat > conftest.$ac_ext <<EOF
5349 #line 5350 "configure"
5350 #include "confdefs.h"
5351 /* System header to define __stub macros and hopefully few prototypes,
5352     which can conflict with char $ac_func(); below.  */
5353 #include <assert.h>
5354 /* Override any gcc2 internal prototype to avoid an error.  */
5355 /* We use char because int might match the return type of a gcc2
5356     builtin and then its argument prototype would still apply.  */
5357 char $ac_func();
5358
5359 int main() {
5360
5361 /* The GNU C library defines this for functions which it implements
5362     to always fail with ENOSYS.  Some functions are actually named
5363     something starting with __ and the normal name is an alias.  */
5364 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5365 choke me
5366 #else
5367 $ac_func();
5368 #endif
5369
5370 ; return 0; }
5371 EOF
5372 if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5373   rm -rf conftest*
5374   eval "ac_cv_func_$ac_func=yes"
5375 else
5376   echo "configure: failed program was:" >&5
5377   cat conftest.$ac_ext >&5
5378   rm -rf conftest*
5379   eval "ac_cv_func_$ac_func=no"
5380 fi
5381 rm -f conftest*
5382 fi
5383
5384 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5385   echo "$ac_t""yes" 1>&6
5386     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5387   cat >> confdefs.h <<EOF
5388 #define $ac_tr_func 1
5389 EOF
5390  
5391 else
5392   echo "$ac_t""no" 1>&6
5393 fi
5394 done
5395
5396 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5397 do
5398 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5399 echo "configure:5400: checking for $ac_func" >&5
5400 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5401   echo $ac_n "(cached) $ac_c" 1>&6
5402 else
5403   cat > conftest.$ac_ext <<EOF
5404 #line 5405 "configure"
5405 #include "confdefs.h"
5406 /* System header to define __stub macros and hopefully few prototypes,
5407     which can conflict with char $ac_func(); below.  */
5408 #include <assert.h>
5409 /* Override any gcc2 internal prototype to avoid an error.  */
5410 /* We use char because int might match the return type of a gcc2
5411     builtin and then its argument prototype would still apply.  */
5412 char $ac_func();
5413
5414 int main() {
5415
5416 /* The GNU C library defines this for functions which it implements
5417     to always fail with ENOSYS.  Some functions are actually named
5418     something starting with __ and the normal name is an alias.  */
5419 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5420 choke me
5421 #else
5422 $ac_func();
5423 #endif
5424
5425 ; return 0; }
5426 EOF
5427 if { (eval echo configure:5428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5428   rm -rf conftest*
5429   eval "ac_cv_func_$ac_func=yes"
5430 else
5431   echo "configure: failed program was:" >&5
5432   cat conftest.$ac_ext >&5
5433   rm -rf conftest*
5434   eval "ac_cv_func_$ac_func=no"
5435 fi
5436 rm -f conftest*
5437 fi
5438
5439 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5440   echo "$ac_t""yes" 1>&6
5441     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5442   cat >> confdefs.h <<EOF
5443 #define $ac_tr_func 1
5444 EOF
5445  
5446 else
5447   echo "$ac_t""no" 1>&6
5448 fi
5449 done
5450
5451 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5452 do
5453 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5454 echo "configure:5455: checking for $ac_func" >&5
5455 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5456   echo $ac_n "(cached) $ac_c" 1>&6
5457 else
5458   cat > conftest.$ac_ext <<EOF
5459 #line 5460 "configure"
5460 #include "confdefs.h"
5461 /* System header to define __stub macros and hopefully few prototypes,
5462     which can conflict with char $ac_func(); below.  */
5463 #include <assert.h>
5464 /* Override any gcc2 internal prototype to avoid an error.  */
5465 /* We use char because int might match the return type of a gcc2
5466     builtin and then its argument prototype would still apply.  */
5467 char $ac_func();
5468
5469 int main() {
5470
5471 /* The GNU C library defines this for functions which it implements
5472     to always fail with ENOSYS.  Some functions are actually named
5473     something starting with __ and the normal name is an alias.  */
5474 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5475 choke me
5476 #else
5477 $ac_func();
5478 #endif
5479
5480 ; return 0; }
5481 EOF
5482 if { (eval echo configure:5483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5483   rm -rf conftest*
5484   eval "ac_cv_func_$ac_func=yes"
5485 else
5486   echo "configure: failed program was:" >&5
5487   cat conftest.$ac_ext >&5
5488   rm -rf conftest*
5489   eval "ac_cv_func_$ac_func=no"
5490 fi
5491 rm -f conftest*
5492 fi
5493
5494 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5495   echo "$ac_t""yes" 1>&6
5496     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5497   cat >> confdefs.h <<EOF
5498 #define $ac_tr_func 1
5499 EOF
5500  
5501 else
5502   echo "$ac_t""no" 1>&6
5503 fi
5504 done
5505
5506 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5507 do
5508 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5509 echo "configure:5510: checking for $ac_func" >&5
5510 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5511   echo $ac_n "(cached) $ac_c" 1>&6
5512 else
5513   cat > conftest.$ac_ext <<EOF
5514 #line 5515 "configure"
5515 #include "confdefs.h"
5516 /* System header to define __stub macros and hopefully few prototypes,
5517     which can conflict with char $ac_func(); below.  */
5518 #include <assert.h>
5519 /* Override any gcc2 internal prototype to avoid an error.  */
5520 /* We use char because int might match the return type of a gcc2
5521     builtin and then its argument prototype would still apply.  */
5522 char $ac_func();
5523
5524 int main() {
5525
5526 /* The GNU C library defines this for functions which it implements
5527     to always fail with ENOSYS.  Some functions are actually named
5528     something starting with __ and the normal name is an alias.  */
5529 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5530 choke me
5531 #else
5532 $ac_func();
5533 #endif
5534
5535 ; return 0; }
5536 EOF
5537 if { (eval echo configure:5538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5538   rm -rf conftest*
5539   eval "ac_cv_func_$ac_func=yes"
5540 else
5541   echo "configure: failed program was:" >&5
5542   cat conftest.$ac_ext >&5
5543   rm -rf conftest*
5544   eval "ac_cv_func_$ac_func=no"
5545 fi
5546 rm -f conftest*
5547 fi
5548
5549 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5550   echo "$ac_t""yes" 1>&6
5551     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5552   cat >> confdefs.h <<EOF
5553 #define $ac_tr_func 1
5554 EOF
5555  
5556 else
5557   echo "$ac_t""no" 1>&6
5558 fi
5559 done
5560
5561 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5562 do
5563 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5564 echo "configure:5565: checking for $ac_func" >&5
5565 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5566   echo $ac_n "(cached) $ac_c" 1>&6
5567 else
5568   cat > conftest.$ac_ext <<EOF
5569 #line 5570 "configure"
5570 #include "confdefs.h"
5571 /* System header to define __stub macros and hopefully few prototypes,
5572     which can conflict with char $ac_func(); below.  */
5573 #include <assert.h>
5574 /* Override any gcc2 internal prototype to avoid an error.  */
5575 /* We use char because int might match the return type of a gcc2
5576     builtin and then its argument prototype would still apply.  */
5577 char $ac_func();
5578
5579 int main() {
5580
5581 /* The GNU C library defines this for functions which it implements
5582     to always fail with ENOSYS.  Some functions are actually named
5583     something starting with __ and the normal name is an alias.  */
5584 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5585 choke me
5586 #else
5587 $ac_func();
5588 #endif
5589
5590 ; return 0; }
5591 EOF
5592 if { (eval echo configure:5593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5593   rm -rf conftest*
5594   eval "ac_cv_func_$ac_func=yes"
5595 else
5596   echo "configure: failed program was:" >&5
5597   cat conftest.$ac_ext >&5
5598   rm -rf conftest*
5599   eval "ac_cv_func_$ac_func=no"
5600 fi
5601 rm -f conftest*
5602 fi
5603
5604 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5605   echo "$ac_t""yes" 1>&6
5606     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5607   cat >> confdefs.h <<EOF
5608 #define $ac_tr_func 1
5609 EOF
5610  
5611 else
5612   echo "$ac_t""no" 1>&6
5613 fi
5614 done
5615
5616 for ac_func in syslog vsyslog
5617 do
5618 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5619 echo "configure:5620: checking for $ac_func" >&5
5620 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5621   echo $ac_n "(cached) $ac_c" 1>&6
5622 else
5623   cat > conftest.$ac_ext <<EOF
5624 #line 5625 "configure"
5625 #include "confdefs.h"
5626 /* System header to define __stub macros and hopefully few prototypes,
5627     which can conflict with char $ac_func(); below.  */
5628 #include <assert.h>
5629 /* Override any gcc2 internal prototype to avoid an error.  */
5630 /* We use char because int might match the return type of a gcc2
5631     builtin and then its argument prototype would still apply.  */
5632 char $ac_func();
5633
5634 int main() {
5635
5636 /* The GNU C library defines this for functions which it implements
5637     to always fail with ENOSYS.  Some functions are actually named
5638     something starting with __ and the normal name is an alias.  */
5639 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5640 choke me
5641 #else
5642 $ac_func();
5643 #endif
5644
5645 ; return 0; }
5646 EOF
5647 if { (eval echo configure:5648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5648   rm -rf conftest*
5649   eval "ac_cv_func_$ac_func=yes"
5650 else
5651   echo "configure: failed program was:" >&5
5652   cat conftest.$ac_ext >&5
5653   rm -rf conftest*
5654   eval "ac_cv_func_$ac_func=no"
5655 fi
5656 rm -f conftest*
5657 fi
5658
5659 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5660   echo "$ac_t""yes" 1>&6
5661     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5662   cat >> confdefs.h <<EOF
5663 #define $ac_tr_func 1
5664 EOF
5665  
5666 else
5667   echo "$ac_t""no" 1>&6
5668 fi
5669 done
5670
5671 # setbuffer is needed for smbtorture
5672 for ac_func in setbuffer
5673 do
5674 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5675 echo "configure:5676: checking for $ac_func" >&5
5676 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5677   echo $ac_n "(cached) $ac_c" 1>&6
5678 else
5679   cat > conftest.$ac_ext <<EOF
5680 #line 5681 "configure"
5681 #include "confdefs.h"
5682 /* System header to define __stub macros and hopefully few prototypes,
5683     which can conflict with char $ac_func(); below.  */
5684 #include <assert.h>
5685 /* Override any gcc2 internal prototype to avoid an error.  */
5686 /* We use char because int might match the return type of a gcc2
5687     builtin and then its argument prototype would still apply.  */
5688 char $ac_func();
5689
5690 int main() {
5691
5692 /* The GNU C library defines this for functions which it implements
5693     to always fail with ENOSYS.  Some functions are actually named
5694     something starting with __ and the normal name is an alias.  */
5695 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5696 choke me
5697 #else
5698 $ac_func();
5699 #endif
5700
5701 ; return 0; }
5702 EOF
5703 if { (eval echo configure:5704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5704   rm -rf conftest*
5705   eval "ac_cv_func_$ac_func=yes"
5706 else
5707   echo "configure: failed program was:" >&5
5708   cat conftest.$ac_ext >&5
5709   rm -rf conftest*
5710   eval "ac_cv_func_$ac_func=no"
5711 fi
5712 rm -f conftest*
5713 fi
5714
5715 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5716   echo "$ac_t""yes" 1>&6
5717     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5718   cat >> confdefs.h <<EOF
5719 #define $ac_tr_func 1
5720 EOF
5721  
5722 else
5723   echo "$ac_t""no" 1>&6
5724 fi
5725 done
5726
5727
5728 # syscall() is needed for smbwrapper.
5729 for ac_func in syscall
5730 do
5731 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5732 echo "configure:5733: checking for $ac_func" >&5
5733 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5734   echo $ac_n "(cached) $ac_c" 1>&6
5735 else
5736   cat > conftest.$ac_ext <<EOF
5737 #line 5738 "configure"
5738 #include "confdefs.h"
5739 /* System header to define __stub macros and hopefully few prototypes,
5740     which can conflict with char $ac_func(); below.  */
5741 #include <assert.h>
5742 /* Override any gcc2 internal prototype to avoid an error.  */
5743 /* We use char because int might match the return type of a gcc2
5744     builtin and then its argument prototype would still apply.  */
5745 char $ac_func();
5746
5747 int main() {
5748
5749 /* The GNU C library defines this for functions which it implements
5750     to always fail with ENOSYS.  Some functions are actually named
5751     something starting with __ and the normal name is an alias.  */
5752 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5753 choke me
5754 #else
5755 $ac_func();
5756 #endif
5757
5758 ; return 0; }
5759 EOF
5760 if { (eval echo configure:5761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5761   rm -rf conftest*
5762   eval "ac_cv_func_$ac_func=yes"
5763 else
5764   echo "configure: failed program was:" >&5
5765   cat conftest.$ac_ext >&5
5766   rm -rf conftest*
5767   eval "ac_cv_func_$ac_func=no"
5768 fi
5769 rm -f conftest*
5770 fi
5771
5772 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5773   echo "$ac_t""yes" 1>&6
5774     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5775   cat >> confdefs.h <<EOF
5776 #define $ac_tr_func 1
5777 EOF
5778  
5779 else
5780   echo "$ac_t""no" 1>&6
5781 fi
5782 done
5783
5784
5785 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5786 do
5787 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5788 echo "configure:5789: checking for $ac_func" >&5
5789 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5790   echo $ac_n "(cached) $ac_c" 1>&6
5791 else
5792   cat > conftest.$ac_ext <<EOF
5793 #line 5794 "configure"
5794 #include "confdefs.h"
5795 /* System header to define __stub macros and hopefully few prototypes,
5796     which can conflict with char $ac_func(); below.  */
5797 #include <assert.h>
5798 /* Override any gcc2 internal prototype to avoid an error.  */
5799 /* We use char because int might match the return type of a gcc2
5800     builtin and then its argument prototype would still apply.  */
5801 char $ac_func();
5802
5803 int main() {
5804
5805 /* The GNU C library defines this for functions which it implements
5806     to always fail with ENOSYS.  Some functions are actually named
5807     something starting with __ and the normal name is an alias.  */
5808 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5809 choke me
5810 #else
5811 $ac_func();
5812 #endif
5813
5814 ; return 0; }
5815 EOF
5816 if { (eval echo configure:5817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5817   rm -rf conftest*
5818   eval "ac_cv_func_$ac_func=yes"
5819 else
5820   echo "configure: failed program was:" >&5
5821   cat conftest.$ac_ext >&5
5822   rm -rf conftest*
5823   eval "ac_cv_func_$ac_func=no"
5824 fi
5825 rm -f conftest*
5826 fi
5827
5828 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5829   echo "$ac_t""yes" 1>&6
5830     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5831   cat >> confdefs.h <<EOF
5832 #define $ac_tr_func 1
5833 EOF
5834  
5835 else
5836   echo "$ac_t""no" 1>&6
5837 fi
5838 done
5839
5840 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5841 do
5842 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5843 echo "configure:5844: checking for $ac_func" >&5
5844 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5845   echo $ac_n "(cached) $ac_c" 1>&6
5846 else
5847   cat > conftest.$ac_ext <<EOF
5848 #line 5849 "configure"
5849 #include "confdefs.h"
5850 /* System header to define __stub macros and hopefully few prototypes,
5851     which can conflict with char $ac_func(); below.  */
5852 #include <assert.h>
5853 /* Override any gcc2 internal prototype to avoid an error.  */
5854 /* We use char because int might match the return type of a gcc2
5855     builtin and then its argument prototype would still apply.  */
5856 char $ac_func();
5857
5858 int main() {
5859
5860 /* The GNU C library defines this for functions which it implements
5861     to always fail with ENOSYS.  Some functions are actually named
5862     something starting with __ and the normal name is an alias.  */
5863 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5864 choke me
5865 #else
5866 $ac_func();
5867 #endif
5868
5869 ; return 0; }
5870 EOF
5871 if { (eval echo configure:5872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5872   rm -rf conftest*
5873   eval "ac_cv_func_$ac_func=yes"
5874 else
5875   echo "configure: failed program was:" >&5
5876   cat conftest.$ac_ext >&5
5877   rm -rf conftest*
5878   eval "ac_cv_func_$ac_func=no"
5879 fi
5880 rm -f conftest*
5881 fi
5882
5883 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5884   echo "$ac_t""yes" 1>&6
5885     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5886   cat >> confdefs.h <<EOF
5887 #define $ac_tr_func 1
5888 EOF
5889  
5890 else
5891   echo "$ac_t""no" 1>&6
5892 fi
5893 done
5894
5895 for ac_func in __getcwd _getcwd
5896 do
5897 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5898 echo "configure:5899: checking for $ac_func" >&5
5899 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5900   echo $ac_n "(cached) $ac_c" 1>&6
5901 else
5902   cat > conftest.$ac_ext <<EOF
5903 #line 5904 "configure"
5904 #include "confdefs.h"
5905 /* System header to define __stub macros and hopefully few prototypes,
5906     which can conflict with char $ac_func(); below.  */
5907 #include <assert.h>
5908 /* Override any gcc2 internal prototype to avoid an error.  */
5909 /* We use char because int might match the return type of a gcc2
5910     builtin and then its argument prototype would still apply.  */
5911 char $ac_func();
5912
5913 int main() {
5914
5915 /* The GNU C library defines this for functions which it implements
5916     to always fail with ENOSYS.  Some functions are actually named
5917     something starting with __ and the normal name is an alias.  */
5918 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5919 choke me
5920 #else
5921 $ac_func();
5922 #endif
5923
5924 ; return 0; }
5925 EOF
5926 if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5927   rm -rf conftest*
5928   eval "ac_cv_func_$ac_func=yes"
5929 else
5930   echo "configure: failed program was:" >&5
5931   cat conftest.$ac_ext >&5
5932   rm -rf conftest*
5933   eval "ac_cv_func_$ac_func=no"
5934 fi
5935 rm -f conftest*
5936 fi
5937
5938 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5939   echo "$ac_t""yes" 1>&6
5940     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5941   cat >> confdefs.h <<EOF
5942 #define $ac_tr_func 1
5943 EOF
5944  
5945 else
5946   echo "$ac_t""no" 1>&6
5947 fi
5948 done
5949
5950 for ac_func in __xstat __fxstat __lxstat
5951 do
5952 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5953 echo "configure:5954: checking for $ac_func" >&5
5954 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5955   echo $ac_n "(cached) $ac_c" 1>&6
5956 else
5957   cat > conftest.$ac_ext <<EOF
5958 #line 5959 "configure"
5959 #include "confdefs.h"
5960 /* System header to define __stub macros and hopefully few prototypes,
5961     which can conflict with char $ac_func(); below.  */
5962 #include <assert.h>
5963 /* Override any gcc2 internal prototype to avoid an error.  */
5964 /* We use char because int might match the return type of a gcc2
5965     builtin and then its argument prototype would still apply.  */
5966 char $ac_func();
5967
5968 int main() {
5969
5970 /* The GNU C library defines this for functions which it implements
5971     to always fail with ENOSYS.  Some functions are actually named
5972     something starting with __ and the normal name is an alias.  */
5973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5974 choke me
5975 #else
5976 $ac_func();
5977 #endif
5978
5979 ; return 0; }
5980 EOF
5981 if { (eval echo configure:5982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5982   rm -rf conftest*
5983   eval "ac_cv_func_$ac_func=yes"
5984 else
5985   echo "configure: failed program was:" >&5
5986   cat conftest.$ac_ext >&5
5987   rm -rf conftest*
5988   eval "ac_cv_func_$ac_func=no"
5989 fi
5990 rm -f conftest*
5991 fi
5992
5993 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5994   echo "$ac_t""yes" 1>&6
5995     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5996   cat >> confdefs.h <<EOF
5997 #define $ac_tr_func 1
5998 EOF
5999  
6000 else
6001   echo "$ac_t""no" 1>&6
6002 fi
6003 done
6004
6005 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6006 do
6007 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6008 echo "configure:6009: checking for $ac_func" >&5
6009 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6010   echo $ac_n "(cached) $ac_c" 1>&6
6011 else
6012   cat > conftest.$ac_ext <<EOF
6013 #line 6014 "configure"
6014 #include "confdefs.h"
6015 /* System header to define __stub macros and hopefully few prototypes,
6016     which can conflict with char $ac_func(); below.  */
6017 #include <assert.h>
6018 /* Override any gcc2 internal prototype to avoid an error.  */
6019 /* We use char because int might match the return type of a gcc2
6020     builtin and then its argument prototype would still apply.  */
6021 char $ac_func();
6022
6023 int main() {
6024
6025 /* The GNU C library defines this for functions which it implements
6026     to always fail with ENOSYS.  Some functions are actually named
6027     something starting with __ and the normal name is an alias.  */
6028 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6029 choke me
6030 #else
6031 $ac_func();
6032 #endif
6033
6034 ; return 0; }
6035 EOF
6036 if { (eval echo configure:6037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6037   rm -rf conftest*
6038   eval "ac_cv_func_$ac_func=yes"
6039 else
6040   echo "configure: failed program was:" >&5
6041   cat conftest.$ac_ext >&5
6042   rm -rf conftest*
6043   eval "ac_cv_func_$ac_func=no"
6044 fi
6045 rm -f conftest*
6046 fi
6047
6048 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6049   echo "$ac_t""yes" 1>&6
6050     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6051   cat >> confdefs.h <<EOF
6052 #define $ac_tr_func 1
6053 EOF
6054  
6055 else
6056   echo "$ac_t""no" 1>&6
6057 fi
6058 done
6059
6060 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6061 do
6062 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6063 echo "configure:6064: checking for $ac_func" >&5
6064 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6065   echo $ac_n "(cached) $ac_c" 1>&6
6066 else
6067   cat > conftest.$ac_ext <<EOF
6068 #line 6069 "configure"
6069 #include "confdefs.h"
6070 /* System header to define __stub macros and hopefully few prototypes,
6071     which can conflict with char $ac_func(); below.  */
6072 #include <assert.h>
6073 /* Override any gcc2 internal prototype to avoid an error.  */
6074 /* We use char because int might match the return type of a gcc2
6075     builtin and then its argument prototype would still apply.  */
6076 char $ac_func();
6077
6078 int main() {
6079
6080 /* The GNU C library defines this for functions which it implements
6081     to always fail with ENOSYS.  Some functions are actually named
6082     something starting with __ and the normal name is an alias.  */
6083 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6084 choke me
6085 #else
6086 $ac_func();
6087 #endif
6088
6089 ; return 0; }
6090 EOF
6091 if { (eval echo configure:6092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6092   rm -rf conftest*
6093   eval "ac_cv_func_$ac_func=yes"
6094 else
6095   echo "configure: failed program was:" >&5
6096   cat conftest.$ac_ext >&5
6097   rm -rf conftest*
6098   eval "ac_cv_func_$ac_func=no"
6099 fi
6100 rm -f conftest*
6101 fi
6102
6103 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6104   echo "$ac_t""yes" 1>&6
6105     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6106   cat >> confdefs.h <<EOF
6107 #define $ac_tr_func 1
6108 EOF
6109  
6110 else
6111   echo "$ac_t""no" 1>&6
6112 fi
6113 done
6114
6115 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6116 do
6117 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6118 echo "configure:6119: checking for $ac_func" >&5
6119 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6120   echo $ac_n "(cached) $ac_c" 1>&6
6121 else
6122   cat > conftest.$ac_ext <<EOF
6123 #line 6124 "configure"
6124 #include "confdefs.h"
6125 /* System header to define __stub macros and hopefully few prototypes,
6126     which can conflict with char $ac_func(); below.  */
6127 #include <assert.h>
6128 /* Override any gcc2 internal prototype to avoid an error.  */
6129 /* We use char because int might match the return type of a gcc2
6130     builtin and then its argument prototype would still apply.  */
6131 char $ac_func();
6132
6133 int main() {
6134
6135 /* The GNU C library defines this for functions which it implements
6136     to always fail with ENOSYS.  Some functions are actually named
6137     something starting with __ and the normal name is an alias.  */
6138 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6139 choke me
6140 #else
6141 $ac_func();
6142 #endif
6143
6144 ; return 0; }
6145 EOF
6146 if { (eval echo configure:6147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6147   rm -rf conftest*
6148   eval "ac_cv_func_$ac_func=yes"
6149 else
6150   echo "configure: failed program was:" >&5
6151   cat conftest.$ac_ext >&5
6152   rm -rf conftest*
6153   eval "ac_cv_func_$ac_func=no"
6154 fi
6155 rm -f conftest*
6156 fi
6157
6158 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6159   echo "$ac_t""yes" 1>&6
6160     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6161   cat >> confdefs.h <<EOF
6162 #define $ac_tr_func 1
6163 EOF
6164  
6165 else
6166   echo "$ac_t""no" 1>&6
6167 fi
6168 done
6169
6170 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6171 do
6172 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6173 echo "configure:6174: checking for $ac_func" >&5
6174 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6175   echo $ac_n "(cached) $ac_c" 1>&6
6176 else
6177   cat > conftest.$ac_ext <<EOF
6178 #line 6179 "configure"
6179 #include "confdefs.h"
6180 /* System header to define __stub macros and hopefully few prototypes,
6181     which can conflict with char $ac_func(); below.  */
6182 #include <assert.h>
6183 /* Override any gcc2 internal prototype to avoid an error.  */
6184 /* We use char because int might match the return type of a gcc2
6185     builtin and then its argument prototype would still apply.  */
6186 char $ac_func();
6187
6188 int main() {
6189
6190 /* The GNU C library defines this for functions which it implements
6191     to always fail with ENOSYS.  Some functions are actually named
6192     something starting with __ and the normal name is an alias.  */
6193 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6194 choke me
6195 #else
6196 $ac_func();
6197 #endif
6198
6199 ; return 0; }
6200 EOF
6201 if { (eval echo configure:6202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6202   rm -rf conftest*
6203   eval "ac_cv_func_$ac_func=yes"
6204 else
6205   echo "configure: failed program was:" >&5
6206   cat conftest.$ac_ext >&5
6207   rm -rf conftest*
6208   eval "ac_cv_func_$ac_func=no"
6209 fi
6210 rm -f conftest*
6211 fi
6212
6213 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6214   echo "$ac_t""yes" 1>&6
6215     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6216   cat >> confdefs.h <<EOF
6217 #define $ac_tr_func 1
6218 EOF
6219  
6220 else
6221   echo "$ac_t""no" 1>&6
6222 fi
6223 done
6224
6225 for ac_func in _write __write _fork __fork
6226 do
6227 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6228 echo "configure:6229: checking for $ac_func" >&5
6229 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6230   echo $ac_n "(cached) $ac_c" 1>&6
6231 else
6232   cat > conftest.$ac_ext <<EOF
6233 #line 6234 "configure"
6234 #include "confdefs.h"
6235 /* System header to define __stub macros and hopefully few prototypes,
6236     which can conflict with char $ac_func(); below.  */
6237 #include <assert.h>
6238 /* Override any gcc2 internal prototype to avoid an error.  */
6239 /* We use char because int might match the return type of a gcc2
6240     builtin and then its argument prototype would still apply.  */
6241 char $ac_func();
6242
6243 int main() {
6244
6245 /* The GNU C library defines this for functions which it implements
6246     to always fail with ENOSYS.  Some functions are actually named
6247     something starting with __ and the normal name is an alias.  */
6248 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6249 choke me
6250 #else
6251 $ac_func();
6252 #endif
6253
6254 ; return 0; }
6255 EOF
6256 if { (eval echo configure:6257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6257   rm -rf conftest*
6258   eval "ac_cv_func_$ac_func=yes"
6259 else
6260   echo "configure: failed program was:" >&5
6261   cat conftest.$ac_ext >&5
6262   rm -rf conftest*
6263   eval "ac_cv_func_$ac_func=no"
6264 fi
6265 rm -f conftest*
6266 fi
6267
6268 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6269   echo "$ac_t""yes" 1>&6
6270     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6271   cat >> confdefs.h <<EOF
6272 #define $ac_tr_func 1
6273 EOF
6274  
6275 else
6276   echo "$ac_t""no" 1>&6
6277 fi
6278 done
6279
6280 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6281 do
6282 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6283 echo "configure:6284: checking for $ac_func" >&5
6284 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6285   echo $ac_n "(cached) $ac_c" 1>&6
6286 else
6287   cat > conftest.$ac_ext <<EOF
6288 #line 6289 "configure"
6289 #include "confdefs.h"
6290 /* System header to define __stub macros and hopefully few prototypes,
6291     which can conflict with char $ac_func(); below.  */
6292 #include <assert.h>
6293 /* Override any gcc2 internal prototype to avoid an error.  */
6294 /* We use char because int might match the return type of a gcc2
6295     builtin and then its argument prototype would still apply.  */
6296 char $ac_func();
6297
6298 int main() {
6299
6300 /* The GNU C library defines this for functions which it implements
6301     to always fail with ENOSYS.  Some functions are actually named
6302     something starting with __ and the normal name is an alias.  */
6303 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6304 choke me
6305 #else
6306 $ac_func();
6307 #endif
6308
6309 ; return 0; }
6310 EOF
6311 if { (eval echo configure:6312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6312   rm -rf conftest*
6313   eval "ac_cv_func_$ac_func=yes"
6314 else
6315   echo "configure: failed program was:" >&5
6316   cat conftest.$ac_ext >&5
6317   rm -rf conftest*
6318   eval "ac_cv_func_$ac_func=no"
6319 fi
6320 rm -f conftest*
6321 fi
6322
6323 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6324   echo "$ac_t""yes" 1>&6
6325     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6326   cat >> confdefs.h <<EOF
6327 #define $ac_tr_func 1
6328 EOF
6329  
6330 else
6331   echo "$ac_t""no" 1>&6
6332 fi
6333 done
6334
6335 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6336 do
6337 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6338 echo "configure:6339: checking for $ac_func" >&5
6339 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6340   echo $ac_n "(cached) $ac_c" 1>&6
6341 else
6342   cat > conftest.$ac_ext <<EOF
6343 #line 6344 "configure"
6344 #include "confdefs.h"
6345 /* System header to define __stub macros and hopefully few prototypes,
6346     which can conflict with char $ac_func(); below.  */
6347 #include <assert.h>
6348 /* Override any gcc2 internal prototype to avoid an error.  */
6349 /* We use char because int might match the return type of a gcc2
6350     builtin and then its argument prototype would still apply.  */
6351 char $ac_func();
6352
6353 int main() {
6354
6355 /* The GNU C library defines this for functions which it implements
6356     to always fail with ENOSYS.  Some functions are actually named
6357     something starting with __ and the normal name is an alias.  */
6358 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6359 choke me
6360 #else
6361 $ac_func();
6362 #endif
6363
6364 ; return 0; }
6365 EOF
6366 if { (eval echo configure:6367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6367   rm -rf conftest*
6368   eval "ac_cv_func_$ac_func=yes"
6369 else
6370   echo "configure: failed program was:" >&5
6371   cat conftest.$ac_ext >&5
6372   rm -rf conftest*
6373   eval "ac_cv_func_$ac_func=no"
6374 fi
6375 rm -f conftest*
6376 fi
6377
6378 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6379   echo "$ac_t""yes" 1>&6
6380     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6381   cat >> confdefs.h <<EOF
6382 #define $ac_tr_func 1
6383 EOF
6384  
6385 else
6386   echo "$ac_t""no" 1>&6
6387 fi
6388 done
6389
6390 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6391 do
6392 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6393 echo "configure:6394: checking for $ac_func" >&5
6394 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6395   echo $ac_n "(cached) $ac_c" 1>&6
6396 else
6397   cat > conftest.$ac_ext <<EOF
6398 #line 6399 "configure"
6399 #include "confdefs.h"
6400 /* System header to define __stub macros and hopefully few prototypes,
6401     which can conflict with char $ac_func(); below.  */
6402 #include <assert.h>
6403 /* Override any gcc2 internal prototype to avoid an error.  */
6404 /* We use char because int might match the return type of a gcc2
6405     builtin and then its argument prototype would still apply.  */
6406 char $ac_func();
6407
6408 int main() {
6409
6410 /* The GNU C library defines this for functions which it implements
6411     to always fail with ENOSYS.  Some functions are actually named
6412     something starting with __ and the normal name is an alias.  */
6413 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6414 choke me
6415 #else
6416 $ac_func();
6417 #endif
6418
6419 ; return 0; }
6420 EOF
6421 if { (eval echo configure:6422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6422   rm -rf conftest*
6423   eval "ac_cv_func_$ac_func=yes"
6424 else
6425   echo "configure: failed program was:" >&5
6426   cat conftest.$ac_ext >&5
6427   rm -rf conftest*
6428   eval "ac_cv_func_$ac_func=no"
6429 fi
6430 rm -f conftest*
6431 fi
6432
6433 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6434   echo "$ac_t""yes" 1>&6
6435     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6436   cat >> confdefs.h <<EOF
6437 #define $ac_tr_func 1
6438 EOF
6439  
6440 else
6441   echo "$ac_t""no" 1>&6
6442 fi
6443 done
6444
6445 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6446 do
6447 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6448 echo "configure:6449: checking for $ac_func" >&5
6449 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6450   echo $ac_n "(cached) $ac_c" 1>&6
6451 else
6452   cat > conftest.$ac_ext <<EOF
6453 #line 6454 "configure"
6454 #include "confdefs.h"
6455 /* System header to define __stub macros and hopefully few prototypes,
6456     which can conflict with char $ac_func(); below.  */
6457 #include <assert.h>
6458 /* Override any gcc2 internal prototype to avoid an error.  */
6459 /* We use char because int might match the return type of a gcc2
6460     builtin and then its argument prototype would still apply.  */
6461 char $ac_func();
6462
6463 int main() {
6464
6465 /* The GNU C library defines this for functions which it implements
6466     to always fail with ENOSYS.  Some functions are actually named
6467     something starting with __ and the normal name is an alias.  */
6468 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6469 choke me
6470 #else
6471 $ac_func();
6472 #endif
6473
6474 ; return 0; }
6475 EOF
6476 if { (eval echo configure:6477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6477   rm -rf conftest*
6478   eval "ac_cv_func_$ac_func=yes"
6479 else
6480   echo "configure: failed program was:" >&5
6481   cat conftest.$ac_ext >&5
6482   rm -rf conftest*
6483   eval "ac_cv_func_$ac_func=no"
6484 fi
6485 rm -f conftest*
6486 fi
6487
6488 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6489   echo "$ac_t""yes" 1>&6
6490     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6491   cat >> confdefs.h <<EOF
6492 #define $ac_tr_func 1
6493 EOF
6494  
6495 else
6496   echo "$ac_t""no" 1>&6
6497 fi
6498 done
6499
6500 for ac_func in open64 _open64 __open64 creat64
6501 do
6502 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6503 echo "configure:6504: checking for $ac_func" >&5
6504 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6505   echo $ac_n "(cached) $ac_c" 1>&6
6506 else
6507   cat > conftest.$ac_ext <<EOF
6508 #line 6509 "configure"
6509 #include "confdefs.h"
6510 /* System header to define __stub macros and hopefully few prototypes,
6511     which can conflict with char $ac_func(); below.  */
6512 #include <assert.h>
6513 /* Override any gcc2 internal prototype to avoid an error.  */
6514 /* We use char because int might match the return type of a gcc2
6515     builtin and then its argument prototype would still apply.  */
6516 char $ac_func();
6517
6518 int main() {
6519
6520 /* The GNU C library defines this for functions which it implements
6521     to always fail with ENOSYS.  Some functions are actually named
6522     something starting with __ and the normal name is an alias.  */
6523 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6524 choke me
6525 #else
6526 $ac_func();
6527 #endif
6528
6529 ; return 0; }
6530 EOF
6531 if { (eval echo configure:6532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6532   rm -rf conftest*
6533   eval "ac_cv_func_$ac_func=yes"
6534 else
6535   echo "configure: failed program was:" >&5
6536   cat conftest.$ac_ext >&5
6537   rm -rf conftest*
6538   eval "ac_cv_func_$ac_func=no"
6539 fi
6540 rm -f conftest*
6541 fi
6542
6543 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6544   echo "$ac_t""yes" 1>&6
6545     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6546   cat >> confdefs.h <<EOF
6547 #define $ac_tr_func 1
6548 EOF
6549  
6550 else
6551   echo "$ac_t""no" 1>&6
6552 fi
6553 done
6554
6555
6556 #
6557 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6558 #
6559
6560 if test x$ac_cv_func_stat64 = xno ; then
6561   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6562 echo "configure:6563: checking for stat64 in <sys/stat.h>" >&5
6563   cat > conftest.$ac_ext <<EOF
6564 #line 6565 "configure"
6565 #include "confdefs.h"
6566
6567 #if defined(HAVE_UNISTD_H)
6568 #include <unistd.h>
6569 #endif
6570 #include <sys/stat.h>
6571
6572 int main() {
6573 struct stat64 st64; exit(stat64(".",&st64));
6574 ; return 0; }
6575 EOF
6576 if { (eval echo configure:6577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6577   rm -rf conftest*
6578   ac_cv_func_stat64=yes
6579 else
6580   echo "configure: failed program was:" >&5
6581   cat conftest.$ac_ext >&5
6582 fi
6583 rm -f conftest*
6584   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6585   if test x$ac_cv_func_stat64 = xyes ; then
6586     cat >> confdefs.h <<\EOF
6587 #define HAVE_STAT64 1
6588 EOF
6589
6590   fi
6591 fi
6592
6593 if test x$ac_cv_func_lstat64 = xno ; then
6594   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6595 echo "configure:6596: checking for lstat64 in <sys/stat.h>" >&5
6596   cat > conftest.$ac_ext <<EOF
6597 #line 6598 "configure"
6598 #include "confdefs.h"
6599
6600 #if defined(HAVE_UNISTD_H)
6601 #include <unistd.h>
6602 #endif
6603 #include <sys/stat.h>
6604
6605 int main() {
6606 struct stat64 st64; exit(lstat64(".",&st64));
6607 ; return 0; }
6608 EOF
6609 if { (eval echo configure:6610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6610   rm -rf conftest*
6611   ac_cv_func_lstat64=yes
6612 else
6613   echo "configure: failed program was:" >&5
6614   cat conftest.$ac_ext >&5
6615 fi
6616 rm -f conftest*
6617   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6618   if test x$ac_cv_func_lstat64 = xyes ; then
6619     cat >> confdefs.h <<\EOF
6620 #define HAVE_LSTAT64 1
6621 EOF
6622
6623   fi
6624 fi
6625
6626 if test x$ac_cv_func_fstat64 = xno ; then
6627   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6628 echo "configure:6629: checking for fstat64 in <sys/stat.h>" >&5
6629   cat > conftest.$ac_ext <<EOF
6630 #line 6631 "configure"
6631 #include "confdefs.h"
6632
6633 #if defined(HAVE_UNISTD_H)
6634 #include <unistd.h>
6635 #endif
6636 #include <sys/stat.h>
6637
6638 int main() {
6639 struct stat64 st64; exit(fstat64(0,&st64));
6640 ; return 0; }
6641 EOF
6642 if { (eval echo configure:6643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6643   rm -rf conftest*
6644   ac_cv_func_fstat64=yes
6645 else
6646   echo "configure: failed program was:" >&5
6647   cat conftest.$ac_ext >&5
6648 fi
6649 rm -f conftest*
6650   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6651   if test x$ac_cv_func_fstat64 = xyes ; then
6652     cat >> confdefs.h <<\EOF
6653 #define HAVE_FSTAT64 1
6654 EOF
6655
6656   fi
6657 fi
6658
6659 #####################################
6660 # we might need the resolv library on some systems
6661 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6662 echo "configure:6663: checking for dn_expand in -lresolv" >&5
6663 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6664 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6665   echo $ac_n "(cached) $ac_c" 1>&6
6666 else
6667   ac_save_LIBS="$LIBS"
6668 LIBS="-lresolv  $LIBS"
6669 cat > conftest.$ac_ext <<EOF
6670 #line 6671 "configure"
6671 #include "confdefs.h"
6672 /* Override any gcc2 internal prototype to avoid an error.  */
6673 /* We use char because int might match the return type of a gcc2
6674     builtin and then its argument prototype would still apply.  */
6675 char dn_expand();
6676
6677 int main() {
6678 dn_expand()
6679 ; return 0; }
6680 EOF
6681 if { (eval echo configure:6682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6682   rm -rf conftest*
6683   eval "ac_cv_lib_$ac_lib_var=yes"
6684 else
6685   echo "configure: failed program was:" >&5
6686   cat conftest.$ac_ext >&5
6687   rm -rf conftest*
6688   eval "ac_cv_lib_$ac_lib_var=no"
6689 fi
6690 rm -f conftest*
6691 LIBS="$ac_save_LIBS"
6692
6693 fi
6694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6695   echo "$ac_t""yes" 1>&6
6696     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6697     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6698   cat >> confdefs.h <<EOF
6699 #define $ac_tr_lib 1
6700 EOF
6701
6702   LIBS="-lresolv $LIBS"
6703
6704 else
6705   echo "$ac_t""no" 1>&6
6706 fi
6707
6708
6709 #
6710 # Check for the functions putprpwnam, set_auth_parameters,
6711 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6712 # Needed for OSF1 and HPUX.
6713 #
6714
6715 case "$LIBS" in
6716   *-lsecurity*) for ac_func in putprpwnam
6717 do
6718 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6719 echo "configure:6720: checking for $ac_func" >&5
6720 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6721   echo $ac_n "(cached) $ac_c" 1>&6
6722 else
6723   cat > conftest.$ac_ext <<EOF
6724 #line 6725 "configure"
6725 #include "confdefs.h"
6726 /* System header to define __stub macros and hopefully few prototypes,
6727     which can conflict with char $ac_func(); below.  */
6728 #include <assert.h>
6729 /* Override any gcc2 internal prototype to avoid an error.  */
6730 /* We use char because int might match the return type of a gcc2
6731     builtin and then its argument prototype would still apply.  */
6732 char $ac_func();
6733
6734 int main() {
6735
6736 /* The GNU C library defines this for functions which it implements
6737     to always fail with ENOSYS.  Some functions are actually named
6738     something starting with __ and the normal name is an alias.  */
6739 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6740 choke me
6741 #else
6742 $ac_func();
6743 #endif
6744
6745 ; return 0; }
6746 EOF
6747 if { (eval echo configure:6748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6748   rm -rf conftest*
6749   eval "ac_cv_func_$ac_func=yes"
6750 else
6751   echo "configure: failed program was:" >&5
6752   cat conftest.$ac_ext >&5
6753   rm -rf conftest*
6754   eval "ac_cv_func_$ac_func=no"
6755 fi
6756 rm -f conftest*
6757 fi
6758
6759 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6760   echo "$ac_t""yes" 1>&6
6761     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6762   cat >> confdefs.h <<EOF
6763 #define $ac_tr_func 1
6764 EOF
6765  
6766 else
6767   echo "$ac_t""no" 1>&6
6768 fi
6769 done
6770  ;;
6771   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6772 echo "configure:6773: checking for putprpwnam in -lsecurity" >&5
6773 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6774 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6775   echo $ac_n "(cached) $ac_c" 1>&6
6776 else
6777   ac_save_LIBS="$LIBS"
6778 LIBS="-lsecurity  $LIBS"
6779 cat > conftest.$ac_ext <<EOF
6780 #line 6781 "configure"
6781 #include "confdefs.h"
6782 /* Override any gcc2 internal prototype to avoid an error.  */
6783 /* We use char because int might match the return type of a gcc2
6784     builtin and then its argument prototype would still apply.  */
6785 char putprpwnam();
6786
6787 int main() {
6788 putprpwnam()
6789 ; return 0; }
6790 EOF
6791 if { (eval echo configure:6792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6792   rm -rf conftest*
6793   eval "ac_cv_lib_$ac_lib_var=yes"
6794 else
6795   echo "configure: failed program was:" >&5
6796   cat conftest.$ac_ext >&5
6797   rm -rf conftest*
6798   eval "ac_cv_lib_$ac_lib_var=no"
6799 fi
6800 rm -f conftest*
6801 LIBS="$ac_save_LIBS"
6802
6803 fi
6804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6805   echo "$ac_t""yes" 1>&6
6806     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6807     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6808   cat >> confdefs.h <<EOF
6809 #define $ac_tr_lib 1
6810 EOF
6811
6812   LIBS="-lsecurity $LIBS"
6813
6814 else
6815   echo "$ac_t""no" 1>&6
6816 fi
6817  
6818      for ac_func in putprpwnam
6819 do
6820 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6821 echo "configure:6822: checking for $ac_func" >&5
6822 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6823   echo $ac_n "(cached) $ac_c" 1>&6
6824 else
6825   cat > conftest.$ac_ext <<EOF
6826 #line 6827 "configure"
6827 #include "confdefs.h"
6828 /* System header to define __stub macros and hopefully few prototypes,
6829     which can conflict with char $ac_func(); below.  */
6830 #include <assert.h>
6831 /* Override any gcc2 internal prototype to avoid an error.  */
6832 /* We use char because int might match the return type of a gcc2
6833     builtin and then its argument prototype would still apply.  */
6834 char $ac_func();
6835
6836 int main() {
6837
6838 /* The GNU C library defines this for functions which it implements
6839     to always fail with ENOSYS.  Some functions are actually named
6840     something starting with __ and the normal name is an alias.  */
6841 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6842 choke me
6843 #else
6844 $ac_func();
6845 #endif
6846
6847 ; return 0; }
6848 EOF
6849 if { (eval echo configure:6850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6850   rm -rf conftest*
6851   eval "ac_cv_func_$ac_func=yes"
6852 else
6853   echo "configure: failed program was:" >&5
6854   cat conftest.$ac_ext >&5
6855   rm -rf conftest*
6856   eval "ac_cv_func_$ac_func=no"
6857 fi
6858 rm -f conftest*
6859 fi
6860
6861 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6862   echo "$ac_t""yes" 1>&6
6863     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6864   cat >> confdefs.h <<EOF
6865 #define $ac_tr_func 1
6866 EOF
6867  
6868 else
6869   echo "$ac_t""no" 1>&6
6870 fi
6871 done
6872
6873   ;;
6874   esac
6875
6876 case "$LIBS" in
6877   *-lsec*) for ac_func in putprpwnam
6878 do
6879 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6880 echo "configure:6881: checking for $ac_func" >&5
6881 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6882   echo $ac_n "(cached) $ac_c" 1>&6
6883 else
6884   cat > conftest.$ac_ext <<EOF
6885 #line 6886 "configure"
6886 #include "confdefs.h"
6887 /* System header to define __stub macros and hopefully few prototypes,
6888     which can conflict with char $ac_func(); below.  */
6889 #include <assert.h>
6890 /* Override any gcc2 internal prototype to avoid an error.  */
6891 /* We use char because int might match the return type of a gcc2
6892     builtin and then its argument prototype would still apply.  */
6893 char $ac_func();
6894
6895 int main() {
6896
6897 /* The GNU C library defines this for functions which it implements
6898     to always fail with ENOSYS.  Some functions are actually named
6899     something starting with __ and the normal name is an alias.  */
6900 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6901 choke me
6902 #else
6903 $ac_func();
6904 #endif
6905
6906 ; return 0; }
6907 EOF
6908 if { (eval echo configure:6909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6909   rm -rf conftest*
6910   eval "ac_cv_func_$ac_func=yes"
6911 else
6912   echo "configure: failed program was:" >&5
6913   cat conftest.$ac_ext >&5
6914   rm -rf conftest*
6915   eval "ac_cv_func_$ac_func=no"
6916 fi
6917 rm -f conftest*
6918 fi
6919
6920 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6921   echo "$ac_t""yes" 1>&6
6922     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6923   cat >> confdefs.h <<EOF
6924 #define $ac_tr_func 1
6925 EOF
6926  
6927 else
6928   echo "$ac_t""no" 1>&6
6929 fi
6930 done
6931  ;;
6932   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6933 echo "configure:6934: checking for putprpwnam in -lsec" >&5
6934 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6935 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6936   echo $ac_n "(cached) $ac_c" 1>&6
6937 else
6938   ac_save_LIBS="$LIBS"
6939 LIBS="-lsec  $LIBS"
6940 cat > conftest.$ac_ext <<EOF
6941 #line 6942 "configure"
6942 #include "confdefs.h"
6943 /* Override any gcc2 internal prototype to avoid an error.  */
6944 /* We use char because int might match the return type of a gcc2
6945     builtin and then its argument prototype would still apply.  */
6946 char putprpwnam();
6947
6948 int main() {
6949 putprpwnam()
6950 ; return 0; }
6951 EOF
6952 if { (eval echo configure:6953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6953   rm -rf conftest*
6954   eval "ac_cv_lib_$ac_lib_var=yes"
6955 else
6956   echo "configure: failed program was:" >&5
6957   cat conftest.$ac_ext >&5
6958   rm -rf conftest*
6959   eval "ac_cv_lib_$ac_lib_var=no"
6960 fi
6961 rm -f conftest*
6962 LIBS="$ac_save_LIBS"
6963
6964 fi
6965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6966   echo "$ac_t""yes" 1>&6
6967     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6968     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6969   cat >> confdefs.h <<EOF
6970 #define $ac_tr_lib 1
6971 EOF
6972
6973   LIBS="-lsec $LIBS"
6974
6975 else
6976   echo "$ac_t""no" 1>&6
6977 fi
6978  
6979      for ac_func in putprpwnam
6980 do
6981 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6982 echo "configure:6983: checking for $ac_func" >&5
6983 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6984   echo $ac_n "(cached) $ac_c" 1>&6
6985 else
6986   cat > conftest.$ac_ext <<EOF
6987 #line 6988 "configure"
6988 #include "confdefs.h"
6989 /* System header to define __stub macros and hopefully few prototypes,
6990     which can conflict with char $ac_func(); below.  */
6991 #include <assert.h>
6992 /* Override any gcc2 internal prototype to avoid an error.  */
6993 /* We use char because int might match the return type of a gcc2
6994     builtin and then its argument prototype would still apply.  */
6995 char $ac_func();
6996
6997 int main() {
6998
6999 /* The GNU C library defines this for functions which it implements
7000     to always fail with ENOSYS.  Some functions are actually named
7001     something starting with __ and the normal name is an alias.  */
7002 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7003 choke me
7004 #else
7005 $ac_func();
7006 #endif
7007
7008 ; return 0; }
7009 EOF
7010 if { (eval echo configure:7011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7011   rm -rf conftest*
7012   eval "ac_cv_func_$ac_func=yes"
7013 else
7014   echo "configure: failed program was:" >&5
7015   cat conftest.$ac_ext >&5
7016   rm -rf conftest*
7017   eval "ac_cv_func_$ac_func=no"
7018 fi
7019 rm -f conftest*
7020 fi
7021
7022 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7023   echo "$ac_t""yes" 1>&6
7024     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7025   cat >> confdefs.h <<EOF
7026 #define $ac_tr_func 1
7027 EOF
7028  
7029 else
7030   echo "$ac_t""no" 1>&6
7031 fi
7032 done
7033
7034   ;;
7035   esac
7036
7037
7038 case "$LIBS" in
7039   *-lsecurity*) for ac_func in set_auth_parameters
7040 do
7041 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7042 echo "configure:7043: checking for $ac_func" >&5
7043 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7044   echo $ac_n "(cached) $ac_c" 1>&6
7045 else
7046   cat > conftest.$ac_ext <<EOF
7047 #line 7048 "configure"
7048 #include "confdefs.h"
7049 /* System header to define __stub macros and hopefully few prototypes,
7050     which can conflict with char $ac_func(); below.  */
7051 #include <assert.h>
7052 /* Override any gcc2 internal prototype to avoid an error.  */
7053 /* We use char because int might match the return type of a gcc2
7054     builtin and then its argument prototype would still apply.  */
7055 char $ac_func();
7056
7057 int main() {
7058
7059 /* The GNU C library defines this for functions which it implements
7060     to always fail with ENOSYS.  Some functions are actually named
7061     something starting with __ and the normal name is an alias.  */
7062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7063 choke me
7064 #else
7065 $ac_func();
7066 #endif
7067
7068 ; return 0; }
7069 EOF
7070 if { (eval echo configure:7071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7071   rm -rf conftest*
7072   eval "ac_cv_func_$ac_func=yes"
7073 else
7074   echo "configure: failed program was:" >&5
7075   cat conftest.$ac_ext >&5
7076   rm -rf conftest*
7077   eval "ac_cv_func_$ac_func=no"
7078 fi
7079 rm -f conftest*
7080 fi
7081
7082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7083   echo "$ac_t""yes" 1>&6
7084     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7085   cat >> confdefs.h <<EOF
7086 #define $ac_tr_func 1
7087 EOF
7088  
7089 else
7090   echo "$ac_t""no" 1>&6
7091 fi
7092 done
7093  ;;
7094   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7095 echo "configure:7096: checking for set_auth_parameters in -lsecurity" >&5
7096 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7097 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7098   echo $ac_n "(cached) $ac_c" 1>&6
7099 else
7100   ac_save_LIBS="$LIBS"
7101 LIBS="-lsecurity  $LIBS"
7102 cat > conftest.$ac_ext <<EOF
7103 #line 7104 "configure"
7104 #include "confdefs.h"
7105 /* Override any gcc2 internal prototype to avoid an error.  */
7106 /* We use char because int might match the return type of a gcc2
7107     builtin and then its argument prototype would still apply.  */
7108 char set_auth_parameters();
7109
7110 int main() {
7111 set_auth_parameters()
7112 ; return 0; }
7113 EOF
7114 if { (eval echo configure:7115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7115   rm -rf conftest*
7116   eval "ac_cv_lib_$ac_lib_var=yes"
7117 else
7118   echo "configure: failed program was:" >&5
7119   cat conftest.$ac_ext >&5
7120   rm -rf conftest*
7121   eval "ac_cv_lib_$ac_lib_var=no"
7122 fi
7123 rm -f conftest*
7124 LIBS="$ac_save_LIBS"
7125
7126 fi
7127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7128   echo "$ac_t""yes" 1>&6
7129     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7130     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7131   cat >> confdefs.h <<EOF
7132 #define $ac_tr_lib 1
7133 EOF
7134
7135   LIBS="-lsecurity $LIBS"
7136
7137 else
7138   echo "$ac_t""no" 1>&6
7139 fi
7140  
7141      for ac_func in set_auth_parameters
7142 do
7143 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7144 echo "configure:7145: checking for $ac_func" >&5
7145 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7146   echo $ac_n "(cached) $ac_c" 1>&6
7147 else
7148   cat > conftest.$ac_ext <<EOF
7149 #line 7150 "configure"
7150 #include "confdefs.h"
7151 /* System header to define __stub macros and hopefully few prototypes,
7152     which can conflict with char $ac_func(); below.  */
7153 #include <assert.h>
7154 /* Override any gcc2 internal prototype to avoid an error.  */
7155 /* We use char because int might match the return type of a gcc2
7156     builtin and then its argument prototype would still apply.  */
7157 char $ac_func();
7158
7159 int main() {
7160
7161 /* The GNU C library defines this for functions which it implements
7162     to always fail with ENOSYS.  Some functions are actually named
7163     something starting with __ and the normal name is an alias.  */
7164 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7165 choke me
7166 #else
7167 $ac_func();
7168 #endif
7169
7170 ; return 0; }
7171 EOF
7172 if { (eval echo configure:7173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7173   rm -rf conftest*
7174   eval "ac_cv_func_$ac_func=yes"
7175 else
7176   echo "configure: failed program was:" >&5
7177   cat conftest.$ac_ext >&5
7178   rm -rf conftest*
7179   eval "ac_cv_func_$ac_func=no"
7180 fi
7181 rm -f conftest*
7182 fi
7183
7184 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7185   echo "$ac_t""yes" 1>&6
7186     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7187   cat >> confdefs.h <<EOF
7188 #define $ac_tr_func 1
7189 EOF
7190  
7191 else
7192   echo "$ac_t""no" 1>&6
7193 fi
7194 done
7195
7196   ;;
7197   esac
7198
7199 case "$LIBS" in
7200   *-lsec*) for ac_func in set_auth_parameters
7201 do
7202 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7203 echo "configure:7204: checking for $ac_func" >&5
7204 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7205   echo $ac_n "(cached) $ac_c" 1>&6
7206 else
7207   cat > conftest.$ac_ext <<EOF
7208 #line 7209 "configure"
7209 #include "confdefs.h"
7210 /* System header to define __stub macros and hopefully few prototypes,
7211     which can conflict with char $ac_func(); below.  */
7212 #include <assert.h>
7213 /* Override any gcc2 internal prototype to avoid an error.  */
7214 /* We use char because int might match the return type of a gcc2
7215     builtin and then its argument prototype would still apply.  */
7216 char $ac_func();
7217
7218 int main() {
7219
7220 /* The GNU C library defines this for functions which it implements
7221     to always fail with ENOSYS.  Some functions are actually named
7222     something starting with __ and the normal name is an alias.  */
7223 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7224 choke me
7225 #else
7226 $ac_func();
7227 #endif
7228
7229 ; return 0; }
7230 EOF
7231 if { (eval echo configure:7232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7232   rm -rf conftest*
7233   eval "ac_cv_func_$ac_func=yes"
7234 else
7235   echo "configure: failed program was:" >&5
7236   cat conftest.$ac_ext >&5
7237   rm -rf conftest*
7238   eval "ac_cv_func_$ac_func=no"
7239 fi
7240 rm -f conftest*
7241 fi
7242
7243 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7244   echo "$ac_t""yes" 1>&6
7245     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7246   cat >> confdefs.h <<EOF
7247 #define $ac_tr_func 1
7248 EOF
7249  
7250 else
7251   echo "$ac_t""no" 1>&6
7252 fi
7253 done
7254  ;;
7255   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7256 echo "configure:7257: checking for set_auth_parameters in -lsec" >&5
7257 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7258 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7259   echo $ac_n "(cached) $ac_c" 1>&6
7260 else
7261   ac_save_LIBS="$LIBS"
7262 LIBS="-lsec  $LIBS"
7263 cat > conftest.$ac_ext <<EOF
7264 #line 7265 "configure"
7265 #include "confdefs.h"
7266 /* Override any gcc2 internal prototype to avoid an error.  */
7267 /* We use char because int might match the return type of a gcc2
7268     builtin and then its argument prototype would still apply.  */
7269 char set_auth_parameters();
7270
7271 int main() {
7272 set_auth_parameters()
7273 ; return 0; }
7274 EOF
7275 if { (eval echo configure:7276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7276   rm -rf conftest*
7277   eval "ac_cv_lib_$ac_lib_var=yes"
7278 else
7279   echo "configure: failed program was:" >&5
7280   cat conftest.$ac_ext >&5
7281   rm -rf conftest*
7282   eval "ac_cv_lib_$ac_lib_var=no"
7283 fi
7284 rm -f conftest*
7285 LIBS="$ac_save_LIBS"
7286
7287 fi
7288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7289   echo "$ac_t""yes" 1>&6
7290     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7291     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7292   cat >> confdefs.h <<EOF
7293 #define $ac_tr_lib 1
7294 EOF
7295
7296   LIBS="-lsec $LIBS"
7297
7298 else
7299   echo "$ac_t""no" 1>&6
7300 fi
7301  
7302      for ac_func in set_auth_parameters
7303 do
7304 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7305 echo "configure:7306: checking for $ac_func" >&5
7306 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7307   echo $ac_n "(cached) $ac_c" 1>&6
7308 else
7309   cat > conftest.$ac_ext <<EOF
7310 #line 7311 "configure"
7311 #include "confdefs.h"
7312 /* System header to define __stub macros and hopefully few prototypes,
7313     which can conflict with char $ac_func(); below.  */
7314 #include <assert.h>
7315 /* Override any gcc2 internal prototype to avoid an error.  */
7316 /* We use char because int might match the return type of a gcc2
7317     builtin and then its argument prototype would still apply.  */
7318 char $ac_func();
7319
7320 int main() {
7321
7322 /* The GNU C library defines this for functions which it implements
7323     to always fail with ENOSYS.  Some functions are actually named
7324     something starting with __ and the normal name is an alias.  */
7325 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7326 choke me
7327 #else
7328 $ac_func();
7329 #endif
7330
7331 ; return 0; }
7332 EOF
7333 if { (eval echo configure:7334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7334   rm -rf conftest*
7335   eval "ac_cv_func_$ac_func=yes"
7336 else
7337   echo "configure: failed program was:" >&5
7338   cat conftest.$ac_ext >&5
7339   rm -rf conftest*
7340   eval "ac_cv_func_$ac_func=no"
7341 fi
7342 rm -f conftest*
7343 fi
7344
7345 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7346   echo "$ac_t""yes" 1>&6
7347     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7348   cat >> confdefs.h <<EOF
7349 #define $ac_tr_func 1
7350 EOF
7351  
7352 else
7353   echo "$ac_t""no" 1>&6
7354 fi
7355 done
7356
7357   ;;
7358   esac
7359
7360
7361 # UnixWare 7.x has its getspnam in -lgen
7362 case "$LIBS" in
7363   *-lgen*) for ac_func in getspnam
7364 do
7365 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7366 echo "configure:7367: checking for $ac_func" >&5
7367 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7368   echo $ac_n "(cached) $ac_c" 1>&6
7369 else
7370   cat > conftest.$ac_ext <<EOF
7371 #line 7372 "configure"
7372 #include "confdefs.h"
7373 /* System header to define __stub macros and hopefully few prototypes,
7374     which can conflict with char $ac_func(); below.  */
7375 #include <assert.h>
7376 /* Override any gcc2 internal prototype to avoid an error.  */
7377 /* We use char because int might match the return type of a gcc2
7378     builtin and then its argument prototype would still apply.  */
7379 char $ac_func();
7380
7381 int main() {
7382
7383 /* The GNU C library defines this for functions which it implements
7384     to always fail with ENOSYS.  Some functions are actually named
7385     something starting with __ and the normal name is an alias.  */
7386 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7387 choke me
7388 #else
7389 $ac_func();
7390 #endif
7391
7392 ; return 0; }
7393 EOF
7394 if { (eval echo configure:7395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7395   rm -rf conftest*
7396   eval "ac_cv_func_$ac_func=yes"
7397 else
7398   echo "configure: failed program was:" >&5
7399   cat conftest.$ac_ext >&5
7400   rm -rf conftest*
7401   eval "ac_cv_func_$ac_func=no"
7402 fi
7403 rm -f conftest*
7404 fi
7405
7406 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7407   echo "$ac_t""yes" 1>&6
7408     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7409   cat >> confdefs.h <<EOF
7410 #define $ac_tr_func 1
7411 EOF
7412  
7413 else
7414   echo "$ac_t""no" 1>&6
7415 fi
7416 done
7417  ;;
7418   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7419 echo "configure:7420: checking for getspnam in -lgen" >&5
7420 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7421 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7422   echo $ac_n "(cached) $ac_c" 1>&6
7423 else
7424   ac_save_LIBS="$LIBS"
7425 LIBS="-lgen  $LIBS"
7426 cat > conftest.$ac_ext <<EOF
7427 #line 7428 "configure"
7428 #include "confdefs.h"
7429 /* Override any gcc2 internal prototype to avoid an error.  */
7430 /* We use char because int might match the return type of a gcc2
7431     builtin and then its argument prototype would still apply.  */
7432 char getspnam();
7433
7434 int main() {
7435 getspnam()
7436 ; return 0; }
7437 EOF
7438 if { (eval echo configure:7439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7439   rm -rf conftest*
7440   eval "ac_cv_lib_$ac_lib_var=yes"
7441 else
7442   echo "configure: failed program was:" >&5
7443   cat conftest.$ac_ext >&5
7444   rm -rf conftest*
7445   eval "ac_cv_lib_$ac_lib_var=no"
7446 fi
7447 rm -f conftest*
7448 LIBS="$ac_save_LIBS"
7449
7450 fi
7451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7452   echo "$ac_t""yes" 1>&6
7453     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7454     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7455   cat >> confdefs.h <<EOF
7456 #define $ac_tr_lib 1
7457 EOF
7458
7459   LIBS="-lgen $LIBS"
7460
7461 else
7462   echo "$ac_t""no" 1>&6
7463 fi
7464  
7465      for ac_func in getspnam
7466 do
7467 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7468 echo "configure:7469: checking for $ac_func" >&5
7469 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7470   echo $ac_n "(cached) $ac_c" 1>&6
7471 else
7472   cat > conftest.$ac_ext <<EOF
7473 #line 7474 "configure"
7474 #include "confdefs.h"
7475 /* System header to define __stub macros and hopefully few prototypes,
7476     which can conflict with char $ac_func(); below.  */
7477 #include <assert.h>
7478 /* Override any gcc2 internal prototype to avoid an error.  */
7479 /* We use char because int might match the return type of a gcc2
7480     builtin and then its argument prototype would still apply.  */
7481 char $ac_func();
7482
7483 int main() {
7484
7485 /* The GNU C library defines this for functions which it implements
7486     to always fail with ENOSYS.  Some functions are actually named
7487     something starting with __ and the normal name is an alias.  */
7488 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7489 choke me
7490 #else
7491 $ac_func();
7492 #endif
7493
7494 ; return 0; }
7495 EOF
7496 if { (eval echo configure:7497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7497   rm -rf conftest*
7498   eval "ac_cv_func_$ac_func=yes"
7499 else
7500   echo "configure: failed program was:" >&5
7501   cat conftest.$ac_ext >&5
7502   rm -rf conftest*
7503   eval "ac_cv_func_$ac_func=no"
7504 fi
7505 rm -f conftest*
7506 fi
7507
7508 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7509   echo "$ac_t""yes" 1>&6
7510     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7511   cat >> confdefs.h <<EOF
7512 #define $ac_tr_func 1
7513 EOF
7514  
7515 else
7516   echo "$ac_t""no" 1>&6
7517 fi
7518 done
7519
7520   ;;
7521   esac
7522
7523
7524 case "$LIBS" in
7525   *-lsecurity*) for ac_func in getspnam
7526 do
7527 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7528 echo "configure:7529: checking for $ac_func" >&5
7529 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7530   echo $ac_n "(cached) $ac_c" 1>&6
7531 else
7532   cat > conftest.$ac_ext <<EOF
7533 #line 7534 "configure"
7534 #include "confdefs.h"
7535 /* System header to define __stub macros and hopefully few prototypes,
7536     which can conflict with char $ac_func(); below.  */
7537 #include <assert.h>
7538 /* Override any gcc2 internal prototype to avoid an error.  */
7539 /* We use char because int might match the return type of a gcc2
7540     builtin and then its argument prototype would still apply.  */
7541 char $ac_func();
7542
7543 int main() {
7544
7545 /* The GNU C library defines this for functions which it implements
7546     to always fail with ENOSYS.  Some functions are actually named
7547     something starting with __ and the normal name is an alias.  */
7548 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7549 choke me
7550 #else
7551 $ac_func();
7552 #endif
7553
7554 ; return 0; }
7555 EOF
7556 if { (eval echo configure:7557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7557   rm -rf conftest*
7558   eval "ac_cv_func_$ac_func=yes"
7559 else
7560   echo "configure: failed program was:" >&5
7561   cat conftest.$ac_ext >&5
7562   rm -rf conftest*
7563   eval "ac_cv_func_$ac_func=no"
7564 fi
7565 rm -f conftest*
7566 fi
7567
7568 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7569   echo "$ac_t""yes" 1>&6
7570     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7571   cat >> confdefs.h <<EOF
7572 #define $ac_tr_func 1
7573 EOF
7574  
7575 else
7576   echo "$ac_t""no" 1>&6
7577 fi
7578 done
7579  ;;
7580   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7581 echo "configure:7582: checking for getspnam in -lsecurity" >&5
7582 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7583 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7584   echo $ac_n "(cached) $ac_c" 1>&6
7585 else
7586   ac_save_LIBS="$LIBS"
7587 LIBS="-lsecurity  $LIBS"
7588 cat > conftest.$ac_ext <<EOF
7589 #line 7590 "configure"
7590 #include "confdefs.h"
7591 /* Override any gcc2 internal prototype to avoid an error.  */
7592 /* We use char because int might match the return type of a gcc2
7593     builtin and then its argument prototype would still apply.  */
7594 char getspnam();
7595
7596 int main() {
7597 getspnam()
7598 ; return 0; }
7599 EOF
7600 if { (eval echo configure:7601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7601   rm -rf conftest*
7602   eval "ac_cv_lib_$ac_lib_var=yes"
7603 else
7604   echo "configure: failed program was:" >&5
7605   cat conftest.$ac_ext >&5
7606   rm -rf conftest*
7607   eval "ac_cv_lib_$ac_lib_var=no"
7608 fi
7609 rm -f conftest*
7610 LIBS="$ac_save_LIBS"
7611
7612 fi
7613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7614   echo "$ac_t""yes" 1>&6
7615     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7616     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7617   cat >> confdefs.h <<EOF
7618 #define $ac_tr_lib 1
7619 EOF
7620
7621   LIBS="-lsecurity $LIBS"
7622
7623 else
7624   echo "$ac_t""no" 1>&6
7625 fi
7626  
7627      for ac_func in getspnam
7628 do
7629 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7630 echo "configure:7631: checking for $ac_func" >&5
7631 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7632   echo $ac_n "(cached) $ac_c" 1>&6
7633 else
7634   cat > conftest.$ac_ext <<EOF
7635 #line 7636 "configure"
7636 #include "confdefs.h"
7637 /* System header to define __stub macros and hopefully few prototypes,
7638     which can conflict with char $ac_func(); below.  */
7639 #include <assert.h>
7640 /* Override any gcc2 internal prototype to avoid an error.  */
7641 /* We use char because int might match the return type of a gcc2
7642     builtin and then its argument prototype would still apply.  */
7643 char $ac_func();
7644
7645 int main() {
7646
7647 /* The GNU C library defines this for functions which it implements
7648     to always fail with ENOSYS.  Some functions are actually named
7649     something starting with __ and the normal name is an alias.  */
7650 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7651 choke me
7652 #else
7653 $ac_func();
7654 #endif
7655
7656 ; return 0; }
7657 EOF
7658 if { (eval echo configure:7659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7659   rm -rf conftest*
7660   eval "ac_cv_func_$ac_func=yes"
7661 else
7662   echo "configure: failed program was:" >&5
7663   cat conftest.$ac_ext >&5
7664   rm -rf conftest*
7665   eval "ac_cv_func_$ac_func=no"
7666 fi
7667 rm -f conftest*
7668 fi
7669
7670 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7671   echo "$ac_t""yes" 1>&6
7672     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7673   cat >> confdefs.h <<EOF
7674 #define $ac_tr_func 1
7675 EOF
7676  
7677 else
7678   echo "$ac_t""no" 1>&6
7679 fi
7680 done
7681
7682   ;;
7683   esac
7684
7685 case "$LIBS" in
7686   *-lsec*) for ac_func in getspnam
7687 do
7688 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7689 echo "configure:7690: checking for $ac_func" >&5
7690 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7691   echo $ac_n "(cached) $ac_c" 1>&6
7692 else
7693   cat > conftest.$ac_ext <<EOF
7694 #line 7695 "configure"
7695 #include "confdefs.h"
7696 /* System header to define __stub macros and hopefully few prototypes,
7697     which can conflict with char $ac_func(); below.  */
7698 #include <assert.h>
7699 /* Override any gcc2 internal prototype to avoid an error.  */
7700 /* We use char because int might match the return type of a gcc2
7701     builtin and then its argument prototype would still apply.  */
7702 char $ac_func();
7703
7704 int main() {
7705
7706 /* The GNU C library defines this for functions which it implements
7707     to always fail with ENOSYS.  Some functions are actually named
7708     something starting with __ and the normal name is an alias.  */
7709 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7710 choke me
7711 #else
7712 $ac_func();
7713 #endif
7714
7715 ; return 0; }
7716 EOF
7717 if { (eval echo configure:7718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7718   rm -rf conftest*
7719   eval "ac_cv_func_$ac_func=yes"
7720 else
7721   echo "configure: failed program was:" >&5
7722   cat conftest.$ac_ext >&5
7723   rm -rf conftest*
7724   eval "ac_cv_func_$ac_func=no"
7725 fi
7726 rm -f conftest*
7727 fi
7728
7729 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7730   echo "$ac_t""yes" 1>&6
7731     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7732   cat >> confdefs.h <<EOF
7733 #define $ac_tr_func 1
7734 EOF
7735  
7736 else
7737   echo "$ac_t""no" 1>&6
7738 fi
7739 done
7740  ;;
7741   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7742 echo "configure:7743: checking for getspnam in -lsec" >&5
7743 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7744 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7745   echo $ac_n "(cached) $ac_c" 1>&6
7746 else
7747   ac_save_LIBS="$LIBS"
7748 LIBS="-lsec  $LIBS"
7749 cat > conftest.$ac_ext <<EOF
7750 #line 7751 "configure"
7751 #include "confdefs.h"
7752 /* Override any gcc2 internal prototype to avoid an error.  */
7753 /* We use char because int might match the return type of a gcc2
7754     builtin and then its argument prototype would still apply.  */
7755 char getspnam();
7756
7757 int main() {
7758 getspnam()
7759 ; return 0; }
7760 EOF
7761 if { (eval echo configure:7762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7762   rm -rf conftest*
7763   eval "ac_cv_lib_$ac_lib_var=yes"
7764 else
7765   echo "configure: failed program was:" >&5
7766   cat conftest.$ac_ext >&5
7767   rm -rf conftest*
7768   eval "ac_cv_lib_$ac_lib_var=no"
7769 fi
7770 rm -f conftest*
7771 LIBS="$ac_save_LIBS"
7772
7773 fi
7774 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7775   echo "$ac_t""yes" 1>&6
7776     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7777     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7778   cat >> confdefs.h <<EOF
7779 #define $ac_tr_lib 1
7780 EOF
7781
7782   LIBS="-lsec $LIBS"
7783
7784 else
7785   echo "$ac_t""no" 1>&6
7786 fi
7787  
7788      for ac_func in getspnam
7789 do
7790 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7791 echo "configure:7792: checking for $ac_func" >&5
7792 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7793   echo $ac_n "(cached) $ac_c" 1>&6
7794 else
7795   cat > conftest.$ac_ext <<EOF
7796 #line 7797 "configure"
7797 #include "confdefs.h"
7798 /* System header to define __stub macros and hopefully few prototypes,
7799     which can conflict with char $ac_func(); below.  */
7800 #include <assert.h>
7801 /* Override any gcc2 internal prototype to avoid an error.  */
7802 /* We use char because int might match the return type of a gcc2
7803     builtin and then its argument prototype would still apply.  */
7804 char $ac_func();
7805
7806 int main() {
7807
7808 /* The GNU C library defines this for functions which it implements
7809     to always fail with ENOSYS.  Some functions are actually named
7810     something starting with __ and the normal name is an alias.  */
7811 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7812 choke me
7813 #else
7814 $ac_func();
7815 #endif
7816
7817 ; return 0; }
7818 EOF
7819 if { (eval echo configure:7820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7820   rm -rf conftest*
7821   eval "ac_cv_func_$ac_func=yes"
7822 else
7823   echo "configure: failed program was:" >&5
7824   cat conftest.$ac_ext >&5
7825   rm -rf conftest*
7826   eval "ac_cv_func_$ac_func=no"
7827 fi
7828 rm -f conftest*
7829 fi
7830
7831 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7832   echo "$ac_t""yes" 1>&6
7833     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7834   cat >> confdefs.h <<EOF
7835 #define $ac_tr_func 1
7836 EOF
7837  
7838 else
7839   echo "$ac_t""no" 1>&6
7840 fi
7841 done
7842
7843   ;;
7844   esac
7845
7846
7847 case "$LIBS" in
7848   *-lsecurity*) for ac_func in bigcrypt
7849 do
7850 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7851 echo "configure:7852: checking for $ac_func" >&5
7852 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7853   echo $ac_n "(cached) $ac_c" 1>&6
7854 else
7855   cat > conftest.$ac_ext <<EOF
7856 #line 7857 "configure"
7857 #include "confdefs.h"
7858 /* System header to define __stub macros and hopefully few prototypes,
7859     which can conflict with char $ac_func(); below.  */
7860 #include <assert.h>
7861 /* Override any gcc2 internal prototype to avoid an error.  */
7862 /* We use char because int might match the return type of a gcc2
7863     builtin and then its argument prototype would still apply.  */
7864 char $ac_func();
7865
7866 int main() {
7867
7868 /* The GNU C library defines this for functions which it implements
7869     to always fail with ENOSYS.  Some functions are actually named
7870     something starting with __ and the normal name is an alias.  */
7871 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7872 choke me
7873 #else
7874 $ac_func();
7875 #endif
7876
7877 ; return 0; }
7878 EOF
7879 if { (eval echo configure:7880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7880   rm -rf conftest*
7881   eval "ac_cv_func_$ac_func=yes"
7882 else
7883   echo "configure: failed program was:" >&5
7884   cat conftest.$ac_ext >&5
7885   rm -rf conftest*
7886   eval "ac_cv_func_$ac_func=no"
7887 fi
7888 rm -f conftest*
7889 fi
7890
7891 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7892   echo "$ac_t""yes" 1>&6
7893     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7894   cat >> confdefs.h <<EOF
7895 #define $ac_tr_func 1
7896 EOF
7897  
7898 else
7899   echo "$ac_t""no" 1>&6
7900 fi
7901 done
7902  ;;
7903   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7904 echo "configure:7905: checking for bigcrypt in -lsecurity" >&5
7905 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7906 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7907   echo $ac_n "(cached) $ac_c" 1>&6
7908 else
7909   ac_save_LIBS="$LIBS"
7910 LIBS="-lsecurity  $LIBS"
7911 cat > conftest.$ac_ext <<EOF
7912 #line 7913 "configure"
7913 #include "confdefs.h"
7914 /* Override any gcc2 internal prototype to avoid an error.  */
7915 /* We use char because int might match the return type of a gcc2
7916     builtin and then its argument prototype would still apply.  */
7917 char bigcrypt();
7918
7919 int main() {
7920 bigcrypt()
7921 ; return 0; }
7922 EOF
7923 if { (eval echo configure:7924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7924   rm -rf conftest*
7925   eval "ac_cv_lib_$ac_lib_var=yes"
7926 else
7927   echo "configure: failed program was:" >&5
7928   cat conftest.$ac_ext >&5
7929   rm -rf conftest*
7930   eval "ac_cv_lib_$ac_lib_var=no"
7931 fi
7932 rm -f conftest*
7933 LIBS="$ac_save_LIBS"
7934
7935 fi
7936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7937   echo "$ac_t""yes" 1>&6
7938     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7939     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7940   cat >> confdefs.h <<EOF
7941 #define $ac_tr_lib 1
7942 EOF
7943
7944   LIBS="-lsecurity $LIBS"
7945
7946 else
7947   echo "$ac_t""no" 1>&6
7948 fi
7949  
7950      for ac_func in bigcrypt
7951 do
7952 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7953 echo "configure:7954: checking for $ac_func" >&5
7954 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7955   echo $ac_n "(cached) $ac_c" 1>&6
7956 else
7957   cat > conftest.$ac_ext <<EOF
7958 #line 7959 "configure"
7959 #include "confdefs.h"
7960 /* System header to define __stub macros and hopefully few prototypes,
7961     which can conflict with char $ac_func(); below.  */
7962 #include <assert.h>
7963 /* Override any gcc2 internal prototype to avoid an error.  */
7964 /* We use char because int might match the return type of a gcc2
7965     builtin and then its argument prototype would still apply.  */
7966 char $ac_func();
7967
7968 int main() {
7969
7970 /* The GNU C library defines this for functions which it implements
7971     to always fail with ENOSYS.  Some functions are actually named
7972     something starting with __ and the normal name is an alias.  */
7973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7974 choke me
7975 #else
7976 $ac_func();
7977 #endif
7978
7979 ; return 0; }
7980 EOF
7981 if { (eval echo configure:7982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7982   rm -rf conftest*
7983   eval "ac_cv_func_$ac_func=yes"
7984 else
7985   echo "configure: failed program was:" >&5
7986   cat conftest.$ac_ext >&5
7987   rm -rf conftest*
7988   eval "ac_cv_func_$ac_func=no"
7989 fi
7990 rm -f conftest*
7991 fi
7992
7993 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7994   echo "$ac_t""yes" 1>&6
7995     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7996   cat >> confdefs.h <<EOF
7997 #define $ac_tr_func 1
7998 EOF
7999  
8000 else
8001   echo "$ac_t""no" 1>&6
8002 fi
8003 done
8004
8005   ;;
8006   esac
8007
8008 case "$LIBS" in
8009   *-lsec*) for ac_func in bigcrypt
8010 do
8011 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8012 echo "configure:8013: checking for $ac_func" >&5
8013 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8014   echo $ac_n "(cached) $ac_c" 1>&6
8015 else
8016   cat > conftest.$ac_ext <<EOF
8017 #line 8018 "configure"
8018 #include "confdefs.h"
8019 /* System header to define __stub macros and hopefully few prototypes,
8020     which can conflict with char $ac_func(); below.  */
8021 #include <assert.h>
8022 /* Override any gcc2 internal prototype to avoid an error.  */
8023 /* We use char because int might match the return type of a gcc2
8024     builtin and then its argument prototype would still apply.  */
8025 char $ac_func();
8026
8027 int main() {
8028
8029 /* The GNU C library defines this for functions which it implements
8030     to always fail with ENOSYS.  Some functions are actually named
8031     something starting with __ and the normal name is an alias.  */
8032 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8033 choke me
8034 #else
8035 $ac_func();
8036 #endif
8037
8038 ; return 0; }
8039 EOF
8040 if { (eval echo configure:8041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8041   rm -rf conftest*
8042   eval "ac_cv_func_$ac_func=yes"
8043 else
8044   echo "configure: failed program was:" >&5
8045   cat conftest.$ac_ext >&5
8046   rm -rf conftest*
8047   eval "ac_cv_func_$ac_func=no"
8048 fi
8049 rm -f conftest*
8050 fi
8051
8052 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8053   echo "$ac_t""yes" 1>&6
8054     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8055   cat >> confdefs.h <<EOF
8056 #define $ac_tr_func 1
8057 EOF
8058  
8059 else
8060   echo "$ac_t""no" 1>&6
8061 fi
8062 done
8063  ;;
8064   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8065 echo "configure:8066: checking for bigcrypt in -lsec" >&5
8066 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8067 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8068   echo $ac_n "(cached) $ac_c" 1>&6
8069 else
8070   ac_save_LIBS="$LIBS"
8071 LIBS="-lsec  $LIBS"
8072 cat > conftest.$ac_ext <<EOF
8073 #line 8074 "configure"
8074 #include "confdefs.h"
8075 /* Override any gcc2 internal prototype to avoid an error.  */
8076 /* We use char because int might match the return type of a gcc2
8077     builtin and then its argument prototype would still apply.  */
8078 char bigcrypt();
8079
8080 int main() {
8081 bigcrypt()
8082 ; return 0; }
8083 EOF
8084 if { (eval echo configure:8085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8085   rm -rf conftest*
8086   eval "ac_cv_lib_$ac_lib_var=yes"
8087 else
8088   echo "configure: failed program was:" >&5
8089   cat conftest.$ac_ext >&5
8090   rm -rf conftest*
8091   eval "ac_cv_lib_$ac_lib_var=no"
8092 fi
8093 rm -f conftest*
8094 LIBS="$ac_save_LIBS"
8095
8096 fi
8097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8098   echo "$ac_t""yes" 1>&6
8099     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8100     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8101   cat >> confdefs.h <<EOF
8102 #define $ac_tr_lib 1
8103 EOF
8104
8105   LIBS="-lsec $LIBS"
8106
8107 else
8108   echo "$ac_t""no" 1>&6
8109 fi
8110  
8111      for ac_func in bigcrypt
8112 do
8113 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8114 echo "configure:8115: checking for $ac_func" >&5
8115 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8116   echo $ac_n "(cached) $ac_c" 1>&6
8117 else
8118   cat > conftest.$ac_ext <<EOF
8119 #line 8120 "configure"
8120 #include "confdefs.h"
8121 /* System header to define __stub macros and hopefully few prototypes,
8122     which can conflict with char $ac_func(); below.  */
8123 #include <assert.h>
8124 /* Override any gcc2 internal prototype to avoid an error.  */
8125 /* We use char because int might match the return type of a gcc2
8126     builtin and then its argument prototype would still apply.  */
8127 char $ac_func();
8128
8129 int main() {
8130
8131 /* The GNU C library defines this for functions which it implements
8132     to always fail with ENOSYS.  Some functions are actually named
8133     something starting with __ and the normal name is an alias.  */
8134 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8135 choke me
8136 #else
8137 $ac_func();
8138 #endif
8139
8140 ; return 0; }
8141 EOF
8142 if { (eval echo configure:8143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8143   rm -rf conftest*
8144   eval "ac_cv_func_$ac_func=yes"
8145 else
8146   echo "configure: failed program was:" >&5
8147   cat conftest.$ac_ext >&5
8148   rm -rf conftest*
8149   eval "ac_cv_func_$ac_func=no"
8150 fi
8151 rm -f conftest*
8152 fi
8153
8154 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8155   echo "$ac_t""yes" 1>&6
8156     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8157   cat >> confdefs.h <<EOF
8158 #define $ac_tr_func 1
8159 EOF
8160  
8161 else
8162   echo "$ac_t""no" 1>&6
8163 fi
8164 done
8165
8166   ;;
8167   esac
8168
8169
8170 case "$LIBS" in
8171   *-lsecurity*) for ac_func in getprpwnam
8172 do
8173 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8174 echo "configure:8175: checking for $ac_func" >&5
8175 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8176   echo $ac_n "(cached) $ac_c" 1>&6
8177 else
8178   cat > conftest.$ac_ext <<EOF
8179 #line 8180 "configure"
8180 #include "confdefs.h"
8181 /* System header to define __stub macros and hopefully few prototypes,
8182     which can conflict with char $ac_func(); below.  */
8183 #include <assert.h>
8184 /* Override any gcc2 internal prototype to avoid an error.  */
8185 /* We use char because int might match the return type of a gcc2
8186     builtin and then its argument prototype would still apply.  */
8187 char $ac_func();
8188
8189 int main() {
8190
8191 /* The GNU C library defines this for functions which it implements
8192     to always fail with ENOSYS.  Some functions are actually named
8193     something starting with __ and the normal name is an alias.  */
8194 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8195 choke me
8196 #else
8197 $ac_func();
8198 #endif
8199
8200 ; return 0; }
8201 EOF
8202 if { (eval echo configure:8203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8203   rm -rf conftest*
8204   eval "ac_cv_func_$ac_func=yes"
8205 else
8206   echo "configure: failed program was:" >&5
8207   cat conftest.$ac_ext >&5
8208   rm -rf conftest*
8209   eval "ac_cv_func_$ac_func=no"
8210 fi
8211 rm -f conftest*
8212 fi
8213
8214 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8215   echo "$ac_t""yes" 1>&6
8216     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8217   cat >> confdefs.h <<EOF
8218 #define $ac_tr_func 1
8219 EOF
8220  
8221 else
8222   echo "$ac_t""no" 1>&6
8223 fi
8224 done
8225  ;;
8226   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8227 echo "configure:8228: checking for getprpwnam in -lsecurity" >&5
8228 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8229 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8230   echo $ac_n "(cached) $ac_c" 1>&6
8231 else
8232   ac_save_LIBS="$LIBS"
8233 LIBS="-lsecurity  $LIBS"
8234 cat > conftest.$ac_ext <<EOF
8235 #line 8236 "configure"
8236 #include "confdefs.h"
8237 /* Override any gcc2 internal prototype to avoid an error.  */
8238 /* We use char because int might match the return type of a gcc2
8239     builtin and then its argument prototype would still apply.  */
8240 char getprpwnam();
8241
8242 int main() {
8243 getprpwnam()
8244 ; return 0; }
8245 EOF
8246 if { (eval echo configure:8247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8247   rm -rf conftest*
8248   eval "ac_cv_lib_$ac_lib_var=yes"
8249 else
8250   echo "configure: failed program was:" >&5
8251   cat conftest.$ac_ext >&5
8252   rm -rf conftest*
8253   eval "ac_cv_lib_$ac_lib_var=no"
8254 fi
8255 rm -f conftest*
8256 LIBS="$ac_save_LIBS"
8257
8258 fi
8259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8260   echo "$ac_t""yes" 1>&6
8261     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8262     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8263   cat >> confdefs.h <<EOF
8264 #define $ac_tr_lib 1
8265 EOF
8266
8267   LIBS="-lsecurity $LIBS"
8268
8269 else
8270   echo "$ac_t""no" 1>&6
8271 fi
8272  
8273      for ac_func in getprpwnam
8274 do
8275 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8276 echo "configure:8277: checking for $ac_func" >&5
8277 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8278   echo $ac_n "(cached) $ac_c" 1>&6
8279 else
8280   cat > conftest.$ac_ext <<EOF
8281 #line 8282 "configure"
8282 #include "confdefs.h"
8283 /* System header to define __stub macros and hopefully few prototypes,
8284     which can conflict with char $ac_func(); below.  */
8285 #include <assert.h>
8286 /* Override any gcc2 internal prototype to avoid an error.  */
8287 /* We use char because int might match the return type of a gcc2
8288     builtin and then its argument prototype would still apply.  */
8289 char $ac_func();
8290
8291 int main() {
8292
8293 /* The GNU C library defines this for functions which it implements
8294     to always fail with ENOSYS.  Some functions are actually named
8295     something starting with __ and the normal name is an alias.  */
8296 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8297 choke me
8298 #else
8299 $ac_func();
8300 #endif
8301
8302 ; return 0; }
8303 EOF
8304 if { (eval echo configure:8305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8305   rm -rf conftest*
8306   eval "ac_cv_func_$ac_func=yes"
8307 else
8308   echo "configure: failed program was:" >&5
8309   cat conftest.$ac_ext >&5
8310   rm -rf conftest*
8311   eval "ac_cv_func_$ac_func=no"
8312 fi
8313 rm -f conftest*
8314 fi
8315
8316 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8317   echo "$ac_t""yes" 1>&6
8318     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8319   cat >> confdefs.h <<EOF
8320 #define $ac_tr_func 1
8321 EOF
8322  
8323 else
8324   echo "$ac_t""no" 1>&6
8325 fi
8326 done
8327
8328   ;;
8329   esac
8330
8331 case "$LIBS" in
8332   *-lsec*) for ac_func in getprpwnam
8333 do
8334 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8335 echo "configure:8336: checking for $ac_func" >&5
8336 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8337   echo $ac_n "(cached) $ac_c" 1>&6
8338 else
8339   cat > conftest.$ac_ext <<EOF
8340 #line 8341 "configure"
8341 #include "confdefs.h"
8342 /* System header to define __stub macros and hopefully few prototypes,
8343     which can conflict with char $ac_func(); below.  */
8344 #include <assert.h>
8345 /* Override any gcc2 internal prototype to avoid an error.  */
8346 /* We use char because int might match the return type of a gcc2
8347     builtin and then its argument prototype would still apply.  */
8348 char $ac_func();
8349
8350 int main() {
8351
8352 /* The GNU C library defines this for functions which it implements
8353     to always fail with ENOSYS.  Some functions are actually named
8354     something starting with __ and the normal name is an alias.  */
8355 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8356 choke me
8357 #else
8358 $ac_func();
8359 #endif
8360
8361 ; return 0; }
8362 EOF
8363 if { (eval echo configure:8364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8364   rm -rf conftest*
8365   eval "ac_cv_func_$ac_func=yes"
8366 else
8367   echo "configure: failed program was:" >&5
8368   cat conftest.$ac_ext >&5
8369   rm -rf conftest*
8370   eval "ac_cv_func_$ac_func=no"
8371 fi
8372 rm -f conftest*
8373 fi
8374
8375 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8376   echo "$ac_t""yes" 1>&6
8377     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8378   cat >> confdefs.h <<EOF
8379 #define $ac_tr_func 1
8380 EOF
8381  
8382 else
8383   echo "$ac_t""no" 1>&6
8384 fi
8385 done
8386  ;;
8387   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8388 echo "configure:8389: checking for getprpwnam in -lsec" >&5
8389 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8390 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8391   echo $ac_n "(cached) $ac_c" 1>&6
8392 else
8393   ac_save_LIBS="$LIBS"
8394 LIBS="-lsec  $LIBS"
8395 cat > conftest.$ac_ext <<EOF
8396 #line 8397 "configure"
8397 #include "confdefs.h"
8398 /* Override any gcc2 internal prototype to avoid an error.  */
8399 /* We use char because int might match the return type of a gcc2
8400     builtin and then its argument prototype would still apply.  */
8401 char getprpwnam();
8402
8403 int main() {
8404 getprpwnam()
8405 ; return 0; }
8406 EOF
8407 if { (eval echo configure:8408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8408   rm -rf conftest*
8409   eval "ac_cv_lib_$ac_lib_var=yes"
8410 else
8411   echo "configure: failed program was:" >&5
8412   cat conftest.$ac_ext >&5
8413   rm -rf conftest*
8414   eval "ac_cv_lib_$ac_lib_var=no"
8415 fi
8416 rm -f conftest*
8417 LIBS="$ac_save_LIBS"
8418
8419 fi
8420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8421   echo "$ac_t""yes" 1>&6
8422     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8423     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8424   cat >> confdefs.h <<EOF
8425 #define $ac_tr_lib 1
8426 EOF
8427
8428   LIBS="-lsec $LIBS"
8429
8430 else
8431   echo "$ac_t""no" 1>&6
8432 fi
8433  
8434      for ac_func in getprpwnam
8435 do
8436 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8437 echo "configure:8438: checking for $ac_func" >&5
8438 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8439   echo $ac_n "(cached) $ac_c" 1>&6
8440 else
8441   cat > conftest.$ac_ext <<EOF
8442 #line 8443 "configure"
8443 #include "confdefs.h"
8444 /* System header to define __stub macros and hopefully few prototypes,
8445     which can conflict with char $ac_func(); below.  */
8446 #include <assert.h>
8447 /* Override any gcc2 internal prototype to avoid an error.  */
8448 /* We use char because int might match the return type of a gcc2
8449     builtin and then its argument prototype would still apply.  */
8450 char $ac_func();
8451
8452 int main() {
8453
8454 /* The GNU C library defines this for functions which it implements
8455     to always fail with ENOSYS.  Some functions are actually named
8456     something starting with __ and the normal name is an alias.  */
8457 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8458 choke me
8459 #else
8460 $ac_func();
8461 #endif
8462
8463 ; return 0; }
8464 EOF
8465 if { (eval echo configure:8466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8466   rm -rf conftest*
8467   eval "ac_cv_func_$ac_func=yes"
8468 else
8469   echo "configure: failed program was:" >&5
8470   cat conftest.$ac_ext >&5
8471   rm -rf conftest*
8472   eval "ac_cv_func_$ac_func=no"
8473 fi
8474 rm -f conftest*
8475 fi
8476
8477 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8478   echo "$ac_t""yes" 1>&6
8479     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8480   cat >> confdefs.h <<EOF
8481 #define $ac_tr_func 1
8482 EOF
8483  
8484 else
8485   echo "$ac_t""no" 1>&6
8486 fi
8487 done
8488
8489   ;;
8490   esac
8491
8492
8493 # this bit needs to be modified for each OS that is suported by
8494 # smbwrapper. You need to specify how to created a shared library and
8495 # how to compile C code to produce PIC object files
8496
8497 # these are the defaults, good for lots of systems
8498 HOST_OS="$host_os"
8499 LDSHFLAGS="-shared"
8500 SHLD="\${CC}"
8501 PICFLAG=""
8502 PICSUFFIX="po"
8503 POBAD_CC="#"
8504 SHLIBEXT="so"
8505 # Assume non-shared by default and override below
8506 BLDSHARED="false"
8507 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8508 echo "configure:8509: checking ability to build shared libraries" >&5
8509
8510 # and these are for particular systems
8511 case "$host_os" in
8512                 *linux*)   cat >> confdefs.h <<\EOF
8513 #define LINUX 1
8514 EOF
8515
8516                         BLDSHARED="true"
8517                         LDSHFLAGS="-shared" 
8518                         PICFLAG="-fPIC"
8519                 ;;
8520                 *solaris*) cat >> confdefs.h <<\EOF
8521 #define SUNOS5 1
8522 EOF
8523
8524                         BLDSHARED="true"
8525                         LDSHFLAGS="-h \$@ -G"
8526                         if test "${ac_cv_prog_CC}" = "gcc"; then
8527                                 PICFLAG="-fPIC"
8528                         else
8529                                 PICFLAG="-KPIC"
8530                                 POBAD_CC=""
8531                                 PICSUFFIX="po.o"
8532                         fi
8533                 ;;
8534                 *sunos*) cat >> confdefs.h <<\EOF
8535 #define SUNOS4 1
8536 EOF
8537
8538                         BLDSHARED="true"
8539                         LDSHFLAGS="-Wl,-h,\$@ -G"
8540                         PICFLAG="-KPIC"   # Is this correct for SunOS
8541                 ;;
8542                 *bsd*)  BLDSHARED="true"
8543                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8544                         PICFLAG="-fPIC"
8545                 ;;
8546                 *irix*) cat >> confdefs.h <<\EOF
8547 #define IRIX 1
8548 EOF
8549
8550                         case "$host_os" in
8551                         *irix6*) cat >> confdefs.h <<\EOF
8552 #define IRIX6 1
8553 EOF
8554
8555                         ;;
8556                         esac
8557                         ATTEMPT_WRAP32_BUILD=yes
8558                         BLDSHARED="true"
8559                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8560                         if test "${ac_cv_prog_CC}" = "gcc"; then
8561                                 PICFLAG="-fPIC"
8562                         else 
8563                                 PICFLAG="-KPIC"
8564                         fi
8565                 ;;
8566                 *aix*) cat >> confdefs.h <<\EOF
8567 #define AIX 1
8568 EOF
8569
8570                         BLDSHARED="true"
8571                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8572                         PICFLAG="-O2 -qmaxmem=6000"
8573                 ;;
8574                 *hpux*) cat >> confdefs.h <<\EOF
8575 #define HPUX 1
8576 EOF
8577
8578                         SHLIBEXT="sl"
8579                         # Use special PIC flags for the native HP-UX compiler.
8580                         if test $ac_cv_prog_cc_Ae = yes; then
8581                                 #BLDSHARED="true"
8582                                 LDSHFLAGS="-b -z +h \$@"
8583                                 PICFLAG="+z"
8584                         fi
8585                 ;;
8586                 *qnx*) cat >> confdefs.h <<\EOF
8587 #define QNX 1
8588 EOF
8589 ;;
8590                 *osf*) cat >> confdefs.h <<\EOF
8591 #define OSF1 1
8592 EOF
8593
8594                         BLDSHARED="true"
8595                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8596                         PICFLAG="-fPIC"
8597                 ;;
8598                 *sco*) cat >> confdefs.h <<\EOF
8599 #define SCO 1
8600 EOF
8601 ;;
8602                 *unixware*) cat >> confdefs.h <<\EOF
8603 #define UNIXWARE 1
8604 EOF
8605
8606                         BLDSHARED="true"
8607                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8608                         PICFLAG="-KPIC"
8609                 ;;
8610                 *next2*) cat >> confdefs.h <<\EOF
8611 #define NEXT2 1
8612 EOF
8613 ;;
8614                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8615 set dummy groff; ac_word=$2
8616 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8617 echo "configure:8618: checking for $ac_word" >&5
8618 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8619   echo $ac_n "(cached) $ac_c" 1>&6
8620 else
8621   if test -n "$ROFF"; then
8622   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8623 else
8624   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8625   ac_dummy="$PATH"
8626   for ac_dir in $ac_dummy; do
8627     test -z "$ac_dir" && ac_dir=.
8628     if test -f $ac_dir/$ac_word; then
8629       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8630       break
8631     fi
8632   done
8633   IFS="$ac_save_ifs"
8634 fi
8635 fi
8636 ROFF="$ac_cv_prog_ROFF"
8637 if test -n "$ROFF"; then
8638   echo "$ac_t""$ROFF" 1>&6
8639 else
8640   echo "$ac_t""no" 1>&6
8641 fi
8642 ;;
8643                 *sysv4*)
8644                         case "$host" in
8645                                 *-univel-*)     if  test "$GCC" != yes ; then
8646                                                                         cat >> confdefs.h <<\EOF
8647 #define HAVE_MEMSET 1
8648 EOF
8649
8650                                                                 fi
8651                                                                 LDSHFLAGS="-G"
8652                                 ;;
8653                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8654 #define RELIANTUNIX 1
8655 EOF
8656 ;;
8657                         esac
8658                         ;;
8659                 *sysv5*)
8660                         if  test "$GCC" != yes ; then
8661                                 cat >> confdefs.h <<\EOF
8662 #define HAVE_MEMSET 1
8663 EOF
8664
8665                         fi
8666                         LDSHFLAGS="-G"
8667                         ;;
8668 esac
8669 echo "$ac_t""$BLDSHARED" 1>&6
8670 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
8671 echo "configure:8672: checking linker flags for shared libraries" >&5
8672 echo "$ac_t""$LDSHFLAGS" 1>&6
8673 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
8674 echo "configure:8675: checking compiler flags for position-independent code" >&5
8675 echo "$ac_t""$PICFLAGS" 1>&6
8676
8677 # this updates our target list if we can build shared libs
8678 if test $BLDSHARED = true; then
8679    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8680 else
8681    LIBSMBCLIENT_SHARED=
8682 fi
8683
8684 ################
8685
8686 echo $ac_n "checking for long long""... $ac_c" 1>&6
8687 echo "configure:8688: checking for long long" >&5
8688 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8689   echo $ac_n "(cached) $ac_c" 1>&6
8690 else
8691   
8692 if test "$cross_compiling" = yes; then
8693   samba_cv_have_longlong=cross
8694 else
8695   cat > conftest.$ac_ext <<EOF
8696 #line 8697 "configure"
8697 #include "confdefs.h"
8698 #include <stdio.h>
8699 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8700 EOF
8701 if { (eval echo configure:8702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8702 then
8703   samba_cv_have_longlong=yes
8704 else
8705   echo "configure: failed program was:" >&5
8706   cat conftest.$ac_ext >&5
8707   rm -fr conftest*
8708   samba_cv_have_longlong=no
8709 fi
8710 rm -fr conftest*
8711 fi
8712
8713 fi
8714
8715 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8716 if test x"$samba_cv_have_longlong" = x"yes"; then
8717     cat >> confdefs.h <<\EOF
8718 #define HAVE_LONGLONG 1
8719 EOF
8720
8721 fi
8722
8723 #
8724 # Check if the compiler supports the LL prefix on long long integers.
8725 # AIX needs this.
8726
8727 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8728 echo "configure:8729: checking for LL suffix on long long integers" >&5
8729 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8730   echo $ac_n "(cached) $ac_c" 1>&6
8731 else
8732   
8733     cat > conftest.$ac_ext <<EOF
8734 #line 8735 "configure"
8735 #include "confdefs.h"
8736 #include <stdio.h>
8737 int main() {
8738 long long i = 0x8000000000LL
8739 ; return 0; }
8740 EOF
8741 if { (eval echo configure:8742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8742   rm -rf conftest*
8743   samba_cv_compiler_supports_ll=yes
8744 else
8745   echo "configure: failed program was:" >&5
8746   cat conftest.$ac_ext >&5
8747   rm -rf conftest*
8748   samba_cv_compiler_supports_ll=no
8749 fi
8750 rm -f conftest*
8751 fi
8752
8753 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8754 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8755    cat >> confdefs.h <<\EOF
8756 #define COMPILER_SUPPORTS_LL 1
8757 EOF
8758
8759 fi
8760
8761   
8762 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8763 echo "configure:8764: checking for 64 bit off_t" >&5
8764 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8765   echo $ac_n "(cached) $ac_c" 1>&6
8766 else
8767   
8768 if test "$cross_compiling" = yes; then
8769   samba_cv_SIZEOF_OFF_T=cross
8770 else
8771   cat > conftest.$ac_ext <<EOF
8772 #line 8773 "configure"
8773 #include "confdefs.h"
8774 #include <stdio.h>
8775 #include <sys/stat.h>
8776 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8777 EOF
8778 if { (eval echo configure:8779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8779 then
8780   samba_cv_SIZEOF_OFF_T=yes
8781 else
8782   echo "configure: failed program was:" >&5
8783   cat conftest.$ac_ext >&5
8784   rm -fr conftest*
8785   samba_cv_SIZEOF_OFF_T=no
8786 fi
8787 rm -fr conftest*
8788 fi
8789
8790 fi
8791
8792 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8793 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8794     cat >> confdefs.h <<\EOF
8795 #define SIZEOF_OFF_T 8
8796 EOF
8797
8798 fi
8799
8800 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8801 echo "configure:8802: checking for off64_t" >&5
8802 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8803   echo $ac_n "(cached) $ac_c" 1>&6
8804 else
8805   
8806 if test "$cross_compiling" = yes; then
8807   samba_cv_HAVE_OFF64_T=cross
8808 else
8809   cat > conftest.$ac_ext <<EOF
8810 #line 8811 "configure"
8811 #include "confdefs.h"
8812
8813 #if defined(HAVE_UNISTD_H)
8814 #include <unistd.h>
8815 #endif
8816 #include <stdio.h>
8817 #include <sys/stat.h>
8818 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8819 EOF
8820 if { (eval echo configure:8821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8821 then
8822   samba_cv_HAVE_OFF64_T=yes
8823 else
8824   echo "configure: failed program was:" >&5
8825   cat conftest.$ac_ext >&5
8826   rm -fr conftest*
8827   samba_cv_HAVE_OFF64_T=no
8828 fi
8829 rm -fr conftest*
8830 fi
8831
8832 fi
8833
8834 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8835 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8836     cat >> confdefs.h <<\EOF
8837 #define HAVE_OFF64_T 1
8838 EOF
8839
8840 fi
8841
8842 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8843 echo "configure:8844: checking for 64 bit ino_t" >&5
8844 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8845   echo $ac_n "(cached) $ac_c" 1>&6
8846 else
8847   
8848 if test "$cross_compiling" = yes; then
8849   samba_cv_SIZEOF_INO_T=cross
8850 else
8851   cat > conftest.$ac_ext <<EOF
8852 #line 8853 "configure"
8853 #include "confdefs.h"
8854 #include <stdio.h>
8855 #include <sys/stat.h>
8856 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8857 EOF
8858 if { (eval echo configure:8859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8859 then
8860   samba_cv_SIZEOF_INO_T=yes
8861 else
8862   echo "configure: failed program was:" >&5
8863   cat conftest.$ac_ext >&5
8864   rm -fr conftest*
8865   samba_cv_SIZEOF_INO_T=no
8866 fi
8867 rm -fr conftest*
8868 fi
8869
8870 fi
8871
8872 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8873 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8874     cat >> confdefs.h <<\EOF
8875 #define SIZEOF_INO_T 8
8876 EOF
8877
8878 fi
8879
8880 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8881 echo "configure:8882: checking for ino64_t" >&5
8882 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8883   echo $ac_n "(cached) $ac_c" 1>&6
8884 else
8885   
8886 if test "$cross_compiling" = yes; then
8887   samba_cv_HAVE_INO64_T=cross
8888 else
8889   cat > conftest.$ac_ext <<EOF
8890 #line 8891 "configure"
8891 #include "confdefs.h"
8892
8893 #if defined(HAVE_UNISTD_H)
8894 #include <unistd.h>
8895 #endif
8896 #include <stdio.h>
8897 #include <sys/stat.h>
8898 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8899 EOF
8900 if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8901 then
8902   samba_cv_HAVE_INO64_T=yes
8903 else
8904   echo "configure: failed program was:" >&5
8905   cat conftest.$ac_ext >&5
8906   rm -fr conftest*
8907   samba_cv_HAVE_INO64_T=no
8908 fi
8909 rm -fr conftest*
8910 fi
8911
8912 fi
8913
8914 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8915 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8916     cat >> confdefs.h <<\EOF
8917 #define HAVE_INO64_T 1
8918 EOF
8919
8920 fi
8921
8922 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8923 echo "configure:8924: checking for struct dirent64" >&5
8924 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8925   echo $ac_n "(cached) $ac_c" 1>&6
8926 else
8927   
8928 cat > conftest.$ac_ext <<EOF
8929 #line 8930 "configure"
8930 #include "confdefs.h"
8931
8932 #if defined(HAVE_UNISTD_H)
8933 #include <unistd.h>
8934 #endif
8935 #include <sys/types.h>
8936 #include <dirent.h>
8937 int main() {
8938 struct dirent64 de;
8939 ; return 0; }
8940 EOF
8941 if { (eval echo configure:8942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8942   rm -rf conftest*
8943   samba_cv_HAVE_STRUCT_DIRENT64=yes
8944 else
8945   echo "configure: failed program was:" >&5
8946   cat conftest.$ac_ext >&5
8947   rm -rf conftest*
8948   samba_cv_HAVE_STRUCT_DIRENT64=no
8949 fi
8950 rm -f conftest*
8951 fi
8952
8953 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8954 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8955     cat >> confdefs.h <<\EOF
8956 #define HAVE_STRUCT_DIRENT64 1
8957 EOF
8958
8959 fi
8960
8961 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8962 echo "configure:8963: checking for unsigned char" >&5
8963 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8964   echo $ac_n "(cached) $ac_c" 1>&6
8965 else
8966   
8967 if test "$cross_compiling" = yes; then
8968   samba_cv_HAVE_UNSIGNED_CHAR=cross
8969 else
8970   cat > conftest.$ac_ext <<EOF
8971 #line 8972 "configure"
8972 #include "confdefs.h"
8973 #include <stdio.h>
8974 main() { char c; c=250; exit((c > 0)?0:1); }
8975 EOF
8976 if { (eval echo configure:8977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8977 then
8978   samba_cv_HAVE_UNSIGNED_CHAR=yes
8979 else
8980   echo "configure: failed program was:" >&5
8981   cat conftest.$ac_ext >&5
8982   rm -fr conftest*
8983   samba_cv_HAVE_UNSIGNED_CHAR=no
8984 fi
8985 rm -fr conftest*
8986 fi
8987
8988 fi
8989
8990 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8991 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8992     cat >> confdefs.h <<\EOF
8993 #define HAVE_UNSIGNED_CHAR 1
8994 EOF
8995
8996 fi
8997
8998 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8999 echo "configure:9000: checking for sin_len in sock" >&5
9000 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9001   echo $ac_n "(cached) $ac_c" 1>&6
9002 else
9003   
9004 cat > conftest.$ac_ext <<EOF
9005 #line 9006 "configure"
9006 #include "confdefs.h"
9007 #include <sys/types.h>
9008 #include <sys/socket.h>
9009 #include <netinet/in.h>
9010 int main() {
9011 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9012 ; return 0; }
9013 EOF
9014 if { (eval echo configure:9015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9015   rm -rf conftest*
9016   samba_cv_HAVE_SOCK_SIN_LEN=yes
9017 else
9018   echo "configure: failed program was:" >&5
9019   cat conftest.$ac_ext >&5
9020   rm -rf conftest*
9021   samba_cv_HAVE_SOCK_SIN_LEN=no
9022 fi
9023 rm -f conftest*
9024 fi
9025
9026 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9027 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9028     cat >> confdefs.h <<\EOF
9029 #define HAVE_SOCK_SIN_LEN 1
9030 EOF
9031
9032 fi
9033
9034 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9035 echo "configure:9036: checking whether seekdir returns void" >&5
9036 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9037   echo $ac_n "(cached) $ac_c" 1>&6
9038 else
9039   
9040 cat > conftest.$ac_ext <<EOF
9041 #line 9042 "configure"
9042 #include "confdefs.h"
9043 #include <sys/types.h>
9044 #include <dirent.h>
9045 void seekdir(DIR *d, long loc) { return; }
9046 int main() {
9047 return 0;
9048 ; return 0; }
9049 EOF
9050 if { (eval echo configure:9051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9051   rm -rf conftest*
9052   samba_cv_SEEKDIR_RETURNS_VOID=yes
9053 else
9054   echo "configure: failed program was:" >&5
9055   cat conftest.$ac_ext >&5
9056   rm -rf conftest*
9057   samba_cv_SEEKDIR_RETURNS_VOID=no
9058 fi
9059 rm -f conftest*
9060 fi
9061
9062 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9063 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9064     cat >> confdefs.h <<\EOF
9065 #define SEEKDIR_RETURNS_VOID 1
9066 EOF
9067
9068 fi
9069
9070 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9071 echo "configure:9072: checking for __FILE__ macro" >&5
9072 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9073   echo $ac_n "(cached) $ac_c" 1>&6
9074 else
9075   
9076 cat > conftest.$ac_ext <<EOF
9077 #line 9078 "configure"
9078 #include "confdefs.h"
9079 #include <stdio.h>
9080 int main() {
9081 printf("%s\n", __FILE__);
9082 ; return 0; }
9083 EOF
9084 if { (eval echo configure:9085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9085   rm -rf conftest*
9086   samba_cv_HAVE_FILE_MACRO=yes
9087 else
9088   echo "configure: failed program was:" >&5
9089   cat conftest.$ac_ext >&5
9090   rm -rf conftest*
9091   samba_cv_HAVE_FILE_MACRO=no
9092 fi
9093 rm -f conftest*
9094 fi
9095
9096 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9097 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9098     cat >> confdefs.h <<\EOF
9099 #define HAVE_FILE_MACRO 1
9100 EOF
9101
9102 fi
9103
9104 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9105 echo "configure:9106: checking for __FUNCTION__ macro" >&5
9106 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9107   echo $ac_n "(cached) $ac_c" 1>&6
9108 else
9109   
9110 cat > conftest.$ac_ext <<EOF
9111 #line 9112 "configure"
9112 #include "confdefs.h"
9113 #include <stdio.h>
9114 int main() {
9115 printf("%s\n", __FUNCTION__);
9116 ; return 0; }
9117 EOF
9118 if { (eval echo configure:9119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9119   rm -rf conftest*
9120   samba_cv_HAVE_FUNCTION_MACRO=yes
9121 else
9122   echo "configure: failed program was:" >&5
9123   cat conftest.$ac_ext >&5
9124   rm -rf conftest*
9125   samba_cv_HAVE_FUNCTION_MACRO=no
9126 fi
9127 rm -f conftest*
9128 fi
9129
9130 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9131 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9132     cat >> confdefs.h <<\EOF
9133 #define HAVE_FUNCTION_MACRO 1
9134 EOF
9135
9136 fi
9137
9138 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9139 echo "configure:9140: checking if gettimeofday takes tz argument" >&5
9140 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9141   echo $ac_n "(cached) $ac_c" 1>&6
9142 else
9143   
9144 if test "$cross_compiling" = yes; then
9145   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9146 else
9147   cat > conftest.$ac_ext <<EOF
9148 #line 9149 "configure"
9149 #include "confdefs.h"
9150
9151 #include <sys/time.h>
9152 #include <unistd.h>
9153 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9154 EOF
9155 if { (eval echo configure:9156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9156 then
9157   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9158 else
9159   echo "configure: failed program was:" >&5
9160   cat conftest.$ac_ext >&5
9161   rm -fr conftest*
9162   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9163 fi
9164 rm -fr conftest*
9165 fi
9166
9167 fi
9168
9169 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9170 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9171     cat >> confdefs.h <<\EOF
9172 #define HAVE_GETTIMEOFDAY_TZ 1
9173 EOF
9174
9175 fi
9176
9177 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9178 echo "configure:9179: checking for C99 vsnprintf" >&5
9179 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9180   echo $ac_n "(cached) $ac_c" 1>&6
9181 else
9182   
9183 if test "$cross_compiling" = yes; then
9184   samba_cv_HAVE_C99_VSNPRINTF=cross
9185 else
9186   cat > conftest.$ac_ext <<EOF
9187 #line 9188 "configure"
9188 #include "confdefs.h"
9189
9190 #include <sys/types.h>
9191 #include <stdarg.h>
9192 void foo(const char *format, ...) { 
9193        va_list ap;
9194        int len;
9195        char buf[5];
9196
9197        va_start(ap, format);
9198        len = vsnprintf(0, 0, format, ap);
9199        va_end(ap);
9200        if (len != 5) exit(1);
9201
9202        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9203
9204        exit(0);
9205 }
9206 main() { foo("hello"); }
9207
9208 EOF
9209 if { (eval echo configure:9210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9210 then
9211   samba_cv_HAVE_C99_VSNPRINTF=yes
9212 else
9213   echo "configure: failed program was:" >&5
9214   cat conftest.$ac_ext >&5
9215   rm -fr conftest*
9216   samba_cv_HAVE_C99_VSNPRINTF=no
9217 fi
9218 rm -fr conftest*
9219 fi
9220
9221 fi
9222
9223 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9224 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9225     cat >> confdefs.h <<\EOF
9226 #define HAVE_C99_VSNPRINTF 1
9227 EOF
9228
9229 fi
9230
9231 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9232 echo "configure:9233: checking for broken readdir" >&5
9233 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9234   echo $ac_n "(cached) $ac_c" 1>&6
9235 else
9236   
9237 if test "$cross_compiling" = yes; then
9238   samba_cv_HAVE_BROKEN_READDIR=cross
9239 else
9240   cat > conftest.$ac_ext <<EOF
9241 #line 9242 "configure"
9242 #include "confdefs.h"
9243 #include <sys/types.h>
9244 #include <dirent.h>
9245 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9246 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9247 di->d_name[0] == 0) exit(0); exit(1);} 
9248 EOF
9249 if { (eval echo configure:9250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9250 then
9251   samba_cv_HAVE_BROKEN_READDIR=yes
9252 else
9253   echo "configure: failed program was:" >&5
9254   cat conftest.$ac_ext >&5
9255   rm -fr conftest*
9256   samba_cv_HAVE_BROKEN_READDIR=no
9257 fi
9258 rm -fr conftest*
9259 fi
9260
9261 fi
9262
9263 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9264 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9265     cat >> confdefs.h <<\EOF
9266 #define HAVE_BROKEN_READDIR 1
9267 EOF
9268
9269 fi
9270
9271 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9272 echo "configure:9273: checking for utimbuf" >&5
9273 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9274   echo $ac_n "(cached) $ac_c" 1>&6
9275 else
9276   
9277 cat > conftest.$ac_ext <<EOF
9278 #line 9279 "configure"
9279 #include "confdefs.h"
9280 #include <sys/types.h>
9281 #include <utime.h>
9282 int main() {
9283 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9284 ; return 0; }
9285 EOF
9286 if { (eval echo configure:9287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9287   rm -rf conftest*
9288   samba_cv_HAVE_UTIMBUF=yes
9289 else
9290   echo "configure: failed program was:" >&5
9291   cat conftest.$ac_ext >&5
9292   rm -rf conftest*
9293   samba_cv_HAVE_UTIMBUF=no
9294 fi
9295 rm -f conftest*
9296 fi
9297
9298 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9299 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9300     cat >> confdefs.h <<\EOF
9301 #define HAVE_UTIMBUF 1
9302 EOF
9303
9304 fi
9305
9306
9307 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9308 do
9309 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9310 echo "configure:9311: checking for $ac_func" >&5
9311 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9312   echo $ac_n "(cached) $ac_c" 1>&6
9313 else
9314   cat > conftest.$ac_ext <<EOF
9315 #line 9316 "configure"
9316 #include "confdefs.h"
9317 /* System header to define __stub macros and hopefully few prototypes,
9318     which can conflict with char $ac_func(); below.  */
9319 #include <assert.h>
9320 /* Override any gcc2 internal prototype to avoid an error.  */
9321 /* We use char because int might match the return type of a gcc2
9322     builtin and then its argument prototype would still apply.  */
9323 char $ac_func();
9324
9325 int main() {
9326
9327 /* The GNU C library defines this for functions which it implements
9328     to always fail with ENOSYS.  Some functions are actually named
9329     something starting with __ and the normal name is an alias.  */
9330 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9331 choke me
9332 #else
9333 $ac_func();
9334 #endif
9335
9336 ; return 0; }
9337 EOF
9338 if { (eval echo configure:9339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9339   rm -rf conftest*
9340   eval "ac_cv_func_$ac_func=yes"
9341 else
9342   echo "configure: failed program was:" >&5
9343   cat conftest.$ac_ext >&5
9344   rm -rf conftest*
9345   eval "ac_cv_func_$ac_func=no"
9346 fi
9347 rm -f conftest*
9348 fi
9349
9350 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9351   echo "$ac_t""yes" 1>&6
9352     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9353   cat >> confdefs.h <<EOF
9354 #define $ac_tr_func 1
9355 EOF
9356  
9357 else
9358   echo "$ac_t""no" 1>&6
9359 fi
9360 done
9361
9362
9363 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9364 echo "configure:9365: checking for ut_name in utmp" >&5
9365 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+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 #include <sys/types.h>
9373 #include <utmp.h>
9374 int main() {
9375 struct utmp ut;  ut.ut_name[0] = 'a';
9376 ; return 0; }
9377 EOF
9378 if { (eval echo configure:9379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9379   rm -rf conftest*
9380   samba_cv_HAVE_UT_UT_NAME=yes
9381 else
9382   echo "configure: failed program was:" >&5
9383   cat conftest.$ac_ext >&5
9384   rm -rf conftest*
9385   samba_cv_HAVE_UT_UT_NAME=no
9386 fi
9387 rm -f conftest*
9388 fi
9389
9390 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9391 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9392     cat >> confdefs.h <<\EOF
9393 #define HAVE_UT_UT_NAME 1
9394 EOF
9395
9396 fi 
9397
9398 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9399 echo "configure:9400: checking for ut_user in utmp" >&5
9400 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9401   echo $ac_n "(cached) $ac_c" 1>&6
9402 else
9403   
9404 cat > conftest.$ac_ext <<EOF
9405 #line 9406 "configure"
9406 #include "confdefs.h"
9407 #include <sys/types.h>
9408 #include <utmp.h>
9409 int main() {
9410 struct utmp ut;  ut.ut_user[0] = 'a';
9411 ; return 0; }
9412 EOF
9413 if { (eval echo configure:9414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9414   rm -rf conftest*
9415   samba_cv_HAVE_UT_UT_USER=yes
9416 else
9417   echo "configure: failed program was:" >&5
9418   cat conftest.$ac_ext >&5
9419   rm -rf conftest*
9420   samba_cv_HAVE_UT_UT_USER=no
9421 fi
9422 rm -f conftest*
9423 fi
9424
9425 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9426 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9427     cat >> confdefs.h <<\EOF
9428 #define HAVE_UT_UT_USER 1
9429 EOF
9430
9431 fi 
9432
9433 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9434 echo "configure:9435: checking for ut_id in utmp" >&5
9435 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9436   echo $ac_n "(cached) $ac_c" 1>&6
9437 else
9438   
9439 cat > conftest.$ac_ext <<EOF
9440 #line 9441 "configure"
9441 #include "confdefs.h"
9442 #include <sys/types.h>
9443 #include <utmp.h>
9444 int main() {
9445 struct utmp ut;  ut.ut_id[0] = 'a';
9446 ; return 0; }
9447 EOF
9448 if { (eval echo configure:9449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9449   rm -rf conftest*
9450   samba_cv_HAVE_UT_UT_ID=yes
9451 else
9452   echo "configure: failed program was:" >&5
9453   cat conftest.$ac_ext >&5
9454   rm -rf conftest*
9455   samba_cv_HAVE_UT_UT_ID=no
9456 fi
9457 rm -f conftest*
9458 fi
9459
9460 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9461 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9462     cat >> confdefs.h <<\EOF
9463 #define HAVE_UT_UT_ID 1
9464 EOF
9465
9466 fi 
9467
9468 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9469 echo "configure:9470: checking for ut_host in utmp" >&5
9470 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9471   echo $ac_n "(cached) $ac_c" 1>&6
9472 else
9473   
9474 cat > conftest.$ac_ext <<EOF
9475 #line 9476 "configure"
9476 #include "confdefs.h"
9477 #include <sys/types.h>
9478 #include <utmp.h>
9479 int main() {
9480 struct utmp ut;  ut.ut_host[0] = 'a';
9481 ; return 0; }
9482 EOF
9483 if { (eval echo configure:9484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9484   rm -rf conftest*
9485   samba_cv_HAVE_UT_UT_HOST=yes
9486 else
9487   echo "configure: failed program was:" >&5
9488   cat conftest.$ac_ext >&5
9489   rm -rf conftest*
9490   samba_cv_HAVE_UT_UT_HOST=no
9491 fi
9492 rm -f conftest*
9493 fi
9494
9495 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9496 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9497     cat >> confdefs.h <<\EOF
9498 #define HAVE_UT_UT_HOST 1
9499 EOF
9500
9501 fi 
9502
9503 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9504 echo "configure:9505: checking for ut_time in utmp" >&5
9505 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9506   echo $ac_n "(cached) $ac_c" 1>&6
9507 else
9508   
9509 cat > conftest.$ac_ext <<EOF
9510 #line 9511 "configure"
9511 #include "confdefs.h"
9512 #include <sys/types.h>
9513 #include <utmp.h>
9514 int main() {
9515 struct utmp ut;  time_t t; ut.ut_time = t;
9516 ; return 0; }
9517 EOF
9518 if { (eval echo configure:9519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9519   rm -rf conftest*
9520   samba_cv_HAVE_UT_UT_TIME=yes
9521 else
9522   echo "configure: failed program was:" >&5
9523   cat conftest.$ac_ext >&5
9524   rm -rf conftest*
9525   samba_cv_HAVE_UT_UT_TIME=no
9526 fi
9527 rm -f conftest*
9528 fi
9529
9530 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9531 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9532     cat >> confdefs.h <<\EOF
9533 #define HAVE_UT_UT_TIME 1
9534 EOF
9535
9536 fi 
9537
9538 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9539 echo "configure:9540: checking for ut_tv in utmp" >&5
9540 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9541   echo $ac_n "(cached) $ac_c" 1>&6
9542 else
9543   
9544 cat > conftest.$ac_ext <<EOF
9545 #line 9546 "configure"
9546 #include "confdefs.h"
9547 #include <sys/types.h>
9548 #include <utmp.h>
9549 int main() {
9550 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9551 ; return 0; }
9552 EOF
9553 if { (eval echo configure:9554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9554   rm -rf conftest*
9555   samba_cv_HAVE_UT_UT_TV=yes
9556 else
9557   echo "configure: failed program was:" >&5
9558   cat conftest.$ac_ext >&5
9559   rm -rf conftest*
9560   samba_cv_HAVE_UT_UT_TV=no
9561 fi
9562 rm -f conftest*
9563 fi
9564
9565 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9566 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9567     cat >> confdefs.h <<\EOF
9568 #define HAVE_UT_UT_TV 1
9569 EOF
9570
9571 fi 
9572
9573 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9574 echo "configure:9575: checking for ut_type in utmp" >&5
9575 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9576   echo $ac_n "(cached) $ac_c" 1>&6
9577 else
9578   
9579 cat > conftest.$ac_ext <<EOF
9580 #line 9581 "configure"
9581 #include "confdefs.h"
9582 #include <sys/types.h>
9583 #include <utmp.h>
9584 int main() {
9585 struct utmp ut;  ut.ut_type = 0;
9586 ; return 0; }
9587 EOF
9588 if { (eval echo configure:9589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9589   rm -rf conftest*
9590   samba_cv_HAVE_UT_UT_TYPE=yes
9591 else
9592   echo "configure: failed program was:" >&5
9593   cat conftest.$ac_ext >&5
9594   rm -rf conftest*
9595   samba_cv_HAVE_UT_UT_TYPE=no
9596 fi
9597 rm -f conftest*
9598 fi
9599
9600 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9601 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9602     cat >> confdefs.h <<\EOF
9603 #define HAVE_UT_UT_TYPE 1
9604 EOF
9605
9606 fi 
9607
9608 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9609 echo "configure:9610: checking for ut_pid in utmp" >&5
9610 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9611   echo $ac_n "(cached) $ac_c" 1>&6
9612 else
9613   
9614 cat > conftest.$ac_ext <<EOF
9615 #line 9616 "configure"
9616 #include "confdefs.h"
9617 #include <sys/types.h>
9618 #include <utmp.h>
9619 int main() {
9620 struct utmp ut;  ut.ut_pid = 0;
9621 ; return 0; }
9622 EOF
9623 if { (eval echo configure:9624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9624   rm -rf conftest*
9625   samba_cv_HAVE_UT_UT_PID=yes
9626 else
9627   echo "configure: failed program was:" >&5
9628   cat conftest.$ac_ext >&5
9629   rm -rf conftest*
9630   samba_cv_HAVE_UT_UT_PID=no
9631 fi
9632 rm -f conftest*
9633 fi
9634
9635 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9636 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9637     cat >> confdefs.h <<\EOF
9638 #define HAVE_UT_UT_PID 1
9639 EOF
9640
9641 fi 
9642
9643 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9644 echo "configure:9645: checking for ut_exit in utmp" >&5
9645 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9646   echo $ac_n "(cached) $ac_c" 1>&6
9647 else
9648   
9649 cat > conftest.$ac_ext <<EOF
9650 #line 9651 "configure"
9651 #include "confdefs.h"
9652 #include <sys/types.h>
9653 #include <utmp.h>
9654 int main() {
9655 struct utmp ut;  ut.ut_exit.e_exit = 0;
9656 ; return 0; }
9657 EOF
9658 if { (eval echo configure:9659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9659   rm -rf conftest*
9660   samba_cv_HAVE_UT_UT_EXIT=yes
9661 else
9662   echo "configure: failed program was:" >&5
9663   cat conftest.$ac_ext >&5
9664   rm -rf conftest*
9665   samba_cv_HAVE_UT_UT_EXIT=no
9666 fi
9667 rm -f conftest*
9668 fi
9669
9670 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9671 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9672     cat >> confdefs.h <<\EOF
9673 #define HAVE_UT_UT_EXIT 1
9674 EOF
9675
9676 fi 
9677
9678 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9679 echo "configure:9680: checking for ut_addr in utmp" >&5
9680 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9681   echo $ac_n "(cached) $ac_c" 1>&6
9682 else
9683   
9684 cat > conftest.$ac_ext <<EOF
9685 #line 9686 "configure"
9686 #include "confdefs.h"
9687 #include <sys/types.h>
9688 #include <utmp.h>
9689 int main() {
9690 struct utmp ut;  ut.ut_addr = 0;
9691 ; return 0; }
9692 EOF
9693 if { (eval echo configure:9694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9694   rm -rf conftest*
9695   samba_cv_HAVE_UT_UT_ADDR=yes
9696 else
9697   echo "configure: failed program was:" >&5
9698   cat conftest.$ac_ext >&5
9699   rm -rf conftest*
9700   samba_cv_HAVE_UT_UT_ADDR=no
9701 fi
9702 rm -f conftest*
9703 fi
9704
9705 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9706 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9707     cat >> confdefs.h <<\EOF
9708 #define HAVE_UT_UT_ADDR 1
9709 EOF
9710
9711 fi 
9712
9713 if test x$ac_cv_func_pututline = xyes ; then
9714   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9715 echo "configure:9716: checking whether pututline returns pointer" >&5
9716 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9717   echo $ac_n "(cached) $ac_c" 1>&6
9718 else
9719   
9720   cat > conftest.$ac_ext <<EOF
9721 #line 9722 "configure"
9722 #include "confdefs.h"
9723 #include <sys/types.h>
9724 #include <utmp.h>
9725 int main() {
9726 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9727 ; return 0; }
9728 EOF
9729 if { (eval echo configure:9730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9730   rm -rf conftest*
9731   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9732 else
9733   echo "configure: failed program was:" >&5
9734   cat conftest.$ac_ext >&5
9735   rm -rf conftest*
9736   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9737 fi
9738 rm -f conftest*
9739 fi
9740
9741 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9742   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9743       cat >> confdefs.h <<\EOF
9744 #define PUTUTLINE_RETURNS_UTMP 1
9745 EOF
9746
9747   fi
9748 fi
9749
9750 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9751 echo "configure:9752: checking for ut_syslen in utmpx" >&5
9752 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9753   echo $ac_n "(cached) $ac_c" 1>&6
9754 else
9755   
9756 cat > conftest.$ac_ext <<EOF
9757 #line 9758 "configure"
9758 #include "confdefs.h"
9759 #include <sys/types.h>
9760 #include <utmpx.h>
9761 int main() {
9762 struct utmpx ux;  ux.ut_syslen = 0;
9763 ; return 0; }
9764 EOF
9765 if { (eval echo configure:9766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9766   rm -rf conftest*
9767   samba_cv_HAVE_UX_UT_SYSLEN=yes
9768 else
9769   echo "configure: failed program was:" >&5
9770   cat conftest.$ac_ext >&5
9771   rm -rf conftest*
9772   samba_cv_HAVE_UX_UT_SYSLEN=no
9773 fi
9774 rm -f conftest*
9775 fi
9776
9777 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9778 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9779     cat >> confdefs.h <<\EOF
9780 #define HAVE_UX_UT_SYSLEN 1
9781 EOF
9782
9783 fi 
9784
9785
9786 #################################################
9787 # check for libiconv support
9788 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9789 echo "configure:9790: checking whether to use libiconv" >&5
9790 # Check whether --with-libiconv or --without-libiconv was given.
9791 if test "${with_libiconv+set}" = set; then
9792   withval="$with_libiconv"
9793    case "$withval" in
9794   no)
9795     echo "$ac_t""no" 1>&6
9796     ;;
9797   *)
9798     echo "$ac_t""yes" 1>&6
9799     CFLAGS="$CFLAGS -I$withval/include"
9800     LDFLAGS="$LDFLAGS -L$withval/lib"
9801     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9802 echo "configure:9803: checking for iconv_open in -liconv" >&5
9803 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9804 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9805   echo $ac_n "(cached) $ac_c" 1>&6
9806 else
9807   ac_save_LIBS="$LIBS"
9808 LIBS="-liconv  $LIBS"
9809 cat > conftest.$ac_ext <<EOF
9810 #line 9811 "configure"
9811 #include "confdefs.h"
9812 /* Override any gcc2 internal prototype to avoid an error.  */
9813 /* We use char because int might match the return type of a gcc2
9814     builtin and then its argument prototype would still apply.  */
9815 char iconv_open();
9816
9817 int main() {
9818 iconv_open()
9819 ; return 0; }
9820 EOF
9821 if { (eval echo configure:9822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9822   rm -rf conftest*
9823   eval "ac_cv_lib_$ac_lib_var=yes"
9824 else
9825   echo "configure: failed program was:" >&5
9826   cat conftest.$ac_ext >&5
9827   rm -rf conftest*
9828   eval "ac_cv_lib_$ac_lib_var=no"
9829 fi
9830 rm -f conftest*
9831 LIBS="$ac_save_LIBS"
9832
9833 fi
9834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9835   echo "$ac_t""yes" 1>&6
9836     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9837     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9838   cat >> confdefs.h <<EOF
9839 #define $ac_tr_lib 1
9840 EOF
9841
9842   LIBS="-liconv $LIBS"
9843
9844 else
9845   echo "$ac_t""no" 1>&6
9846 fi
9847
9848     cat >> confdefs.h <<EOF
9849 #define WITH_LIBICONV "${withval}"
9850 EOF
9851
9852     ;;
9853   esac 
9854 else
9855   echo "$ac_t""no" 1>&6
9856
9857 fi
9858
9859
9860
9861 ############
9862 # check for iconv in libc
9863 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9864 echo "configure:9865: checking for working iconv" >&5
9865 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9866   echo $ac_n "(cached) $ac_c" 1>&6
9867 else
9868   
9869 if test "$cross_compiling" = yes; then
9870   samba_cv_HAVE_NATIVE_ICONV=cross
9871 else
9872   cat > conftest.$ac_ext <<EOF
9873 #line 9874 "configure"
9874 #include "confdefs.h"
9875
9876 #include <iconv.h>
9877 main() {
9878        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9879        if (cd == 0 || cd == (iconv_t)-1) return -1;
9880        return 0;
9881 }
9882
9883 EOF
9884 if { (eval echo configure:9885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9885 then
9886   samba_cv_HAVE_NATIVE_ICONV=yes
9887 else
9888   echo "configure: failed program was:" >&5
9889   cat conftest.$ac_ext >&5
9890   rm -fr conftest*
9891   samba_cv_HAVE_NATIVE_ICONV=no
9892 fi
9893 rm -fr conftest*
9894 fi
9895
9896 fi
9897
9898 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9899 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9900     cat >> confdefs.h <<\EOF
9901 #define HAVE_NATIVE_ICONV 1
9902 EOF
9903
9904 fi
9905
9906
9907 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9908 echo "configure:9909: checking for Linux kernel oplocks" >&5
9909 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9910   echo $ac_n "(cached) $ac_c" 1>&6
9911 else
9912   
9913 if test "$cross_compiling" = yes; then
9914   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9915 else
9916   cat > conftest.$ac_ext <<EOF
9917 #line 9918 "configure"
9918 #include "confdefs.h"
9919
9920 #include <sys/types.h>
9921 #include <fcntl.h>
9922 #ifndef F_GETLEASE
9923 #define F_GETLEASE      1025
9924 #endif
9925 main() {
9926        int fd = open("/dev/null", O_RDONLY);
9927        return fcntl(fd, F_GETLEASE, 0) == -1;
9928 }
9929
9930 EOF
9931 if { (eval echo configure:9932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9932 then
9933   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9934 else
9935   echo "configure: failed program was:" >&5
9936   cat conftest.$ac_ext >&5
9937   rm -fr conftest*
9938   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9939 fi
9940 rm -fr conftest*
9941 fi
9942
9943 fi
9944
9945 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9946 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9947     cat >> confdefs.h <<\EOF
9948 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9949 EOF
9950
9951 fi
9952
9953 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9954 echo "configure:9955: checking for kernel change notify support" >&5
9955 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9956   echo $ac_n "(cached) $ac_c" 1>&6
9957 else
9958   
9959 if test "$cross_compiling" = yes; then
9960   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9961 else
9962   cat > conftest.$ac_ext <<EOF
9963 #line 9964 "configure"
9964 #include "confdefs.h"
9965
9966 #include <sys/types.h>
9967 #include <fcntl.h>
9968 #include <signal.h>
9969 #ifndef F_NOTIFY
9970 #define F_NOTIFY 1026
9971 #endif
9972 main() {
9973         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9974 }
9975
9976 EOF
9977 if { (eval echo configure:9978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9978 then
9979   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9980 else
9981   echo "configure: failed program was:" >&5
9982   cat conftest.$ac_ext >&5
9983   rm -fr conftest*
9984   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9985 fi
9986 rm -fr conftest*
9987 fi
9988
9989 fi
9990
9991 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9992 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9993     cat >> confdefs.h <<\EOF
9994 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9995 EOF
9996
9997 fi
9998
9999 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10000 echo "configure:10001: checking for kernel share modes" >&5
10001 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10002   echo $ac_n "(cached) $ac_c" 1>&6
10003 else
10004   
10005 if test "$cross_compiling" = yes; then
10006   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10007 else
10008   cat > conftest.$ac_ext <<EOF
10009 #line 10010 "configure"
10010 #include "confdefs.h"
10011
10012 #include <sys/types.h>
10013 #include <fcntl.h>
10014 #include <signal.h>
10015 #include <sys/file.h>
10016 #ifndef LOCK_MAND
10017 #define LOCK_MAND       32
10018 #define LOCK_READ       64
10019 #endif
10020 main() {
10021         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10022 }
10023
10024 EOF
10025 if { (eval echo configure:10026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10026 then
10027   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10028 else
10029   echo "configure: failed program was:" >&5
10030   cat conftest.$ac_ext >&5
10031   rm -fr conftest*
10032   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10033 fi
10034 rm -fr conftest*
10035 fi
10036
10037 fi
10038
10039 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10040 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10041     cat >> confdefs.h <<\EOF
10042 #define HAVE_KERNEL_SHARE_MODES 1
10043 EOF
10044
10045 fi
10046
10047
10048
10049
10050 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10051 echo "configure:10052: checking for IRIX kernel oplock type definitions" >&5
10052 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10053   echo $ac_n "(cached) $ac_c" 1>&6
10054 else
10055   
10056 cat > conftest.$ac_ext <<EOF
10057 #line 10058 "configure"
10058 #include "confdefs.h"
10059 #include <sys/types.h>
10060 #include <fcntl.h>
10061 int main() {
10062 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10063 ; return 0; }
10064 EOF
10065 if { (eval echo configure:10066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10066   rm -rf conftest*
10067   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10068 else
10069   echo "configure: failed program was:" >&5
10070   cat conftest.$ac_ext >&5
10071   rm -rf conftest*
10072   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10073 fi
10074 rm -f conftest*
10075 fi
10076
10077 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10078 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10079     cat >> confdefs.h <<\EOF
10080 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10081 EOF
10082
10083 fi
10084
10085 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10086 echo "configure:10087: checking for irix specific capabilities" >&5
10087 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10088   echo $ac_n "(cached) $ac_c" 1>&6
10089 else
10090   
10091 if test "$cross_compiling" = yes; then
10092   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10093 else
10094   cat > conftest.$ac_ext <<EOF
10095 #line 10096 "configure"
10096 #include "confdefs.h"
10097 #include <sys/types.h>
10098 #include <sys/capability.h>
10099 main() {
10100  cap_t cap;
10101  if ((cap = cap_get_proc()) == NULL)
10102    exit(1);
10103  cap->cap_effective |= CAP_NETWORK_MGT;
10104  cap->cap_inheritable |= CAP_NETWORK_MGT;
10105  cap_set_proc(cap);
10106  exit(0);
10107 }
10108
10109 EOF
10110 if { (eval echo configure:10111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10111 then
10112   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10113 else
10114   echo "configure: failed program was:" >&5
10115   cat conftest.$ac_ext >&5
10116   rm -fr conftest*
10117   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10118 fi
10119 rm -fr conftest*
10120 fi
10121
10122 fi
10123
10124 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10125 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10126     cat >> confdefs.h <<\EOF
10127 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10128 EOF
10129
10130 fi
10131
10132 #
10133 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10134 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10135 #
10136
10137 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10138 echo "configure:10139: checking for int16 typedef included by rpc/rpc.h" >&5
10139 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10140   echo $ac_n "(cached) $ac_c" 1>&6
10141 else
10142   
10143 cat > conftest.$ac_ext <<EOF
10144 #line 10145 "configure"
10145 #include "confdefs.h"
10146 #include <sys/types.h>
10147 #if defined(HAVE_RPC_RPC_H)
10148 #include <rpc/rpc.h>
10149 #endif
10150 int main() {
10151 int16 testvar;
10152 ; return 0; }
10153 EOF
10154 if { (eval echo configure:10155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10155   rm -rf conftest*
10156   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10157 else
10158   echo "configure: failed program was:" >&5
10159   cat conftest.$ac_ext >&5
10160   rm -rf conftest*
10161   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10162 fi
10163 rm -f conftest*
10164 fi
10165
10166 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10167 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10168     cat >> confdefs.h <<\EOF
10169 #define HAVE_INT16_FROM_RPC_RPC_H 1
10170 EOF
10171
10172 fi
10173
10174 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10175 echo "configure:10176: checking for uint16 typedef included by rpc/rpc.h" >&5
10176 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10177   echo $ac_n "(cached) $ac_c" 1>&6
10178 else
10179   
10180 cat > conftest.$ac_ext <<EOF
10181 #line 10182 "configure"
10182 #include "confdefs.h"
10183 #include <sys/types.h>
10184 #if defined(HAVE_RPC_RPC_H)
10185 #include <rpc/rpc.h>
10186 #endif
10187 int main() {
10188 uint16 testvar;
10189 ; return 0; }
10190 EOF
10191 if { (eval echo configure:10192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10192   rm -rf conftest*
10193   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10194 else
10195   echo "configure: failed program was:" >&5
10196   cat conftest.$ac_ext >&5
10197   rm -rf conftest*
10198   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10199 fi
10200 rm -f conftest*
10201 fi
10202
10203 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10204 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10205     cat >> confdefs.h <<\EOF
10206 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10207 EOF
10208
10209 fi
10210
10211 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10212 echo "configure:10213: checking for int32 typedef included by rpc/rpc.h" >&5
10213 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10214   echo $ac_n "(cached) $ac_c" 1>&6
10215 else
10216   
10217 cat > conftest.$ac_ext <<EOF
10218 #line 10219 "configure"
10219 #include "confdefs.h"
10220 #include <sys/types.h>
10221 #if defined(HAVE_RPC_RPC_H)
10222 #include <rpc/rpc.h>
10223 #endif
10224 int main() {
10225 int32 testvar;
10226 ; return 0; }
10227 EOF
10228 if { (eval echo configure:10229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10229   rm -rf conftest*
10230   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10231 else
10232   echo "configure: failed program was:" >&5
10233   cat conftest.$ac_ext >&5
10234   rm -rf conftest*
10235   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10236 fi
10237 rm -f conftest*
10238 fi
10239
10240 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10241 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10242     cat >> confdefs.h <<\EOF
10243 #define HAVE_INT32_FROM_RPC_RPC_H 1
10244 EOF
10245
10246 fi
10247
10248 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10249 echo "configure:10250: checking for uint32 typedef included by rpc/rpc.h" >&5
10250 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10251   echo $ac_n "(cached) $ac_c" 1>&6
10252 else
10253   
10254 cat > conftest.$ac_ext <<EOF
10255 #line 10256 "configure"
10256 #include "confdefs.h"
10257 #include <sys/types.h>
10258 #if defined(HAVE_RPC_RPC_H)
10259 #include <rpc/rpc.h>
10260 #endif
10261 int main() {
10262 uint32 testvar;
10263 ; return 0; }
10264 EOF
10265 if { (eval echo configure:10266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10266   rm -rf conftest*
10267   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10268 else
10269   echo "configure: failed program was:" >&5
10270   cat conftest.$ac_ext >&5
10271   rm -rf conftest*
10272   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10273 fi
10274 rm -f conftest*
10275 fi
10276
10277 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10278 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10279     cat >> confdefs.h <<\EOF
10280 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10281 EOF
10282
10283 fi
10284
10285
10286 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10287 echo "configure:10288: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10288 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10289   echo $ac_n "(cached) $ac_c" 1>&6
10290 else
10291   
10292 cat > conftest.$ac_ext <<EOF
10293 #line 10294 "configure"
10294 #include "confdefs.h"
10295 #include <sys/types.h>
10296 #ifdef HAVE_SYS_SECURITY_H
10297 #include <sys/security.h>
10298 #include <prot.h>
10299 #endif  /* HAVE_SYS_SECURITY_H */
10300 #if defined(HAVE_RPC_RPC_H)
10301 #include <rpc/rpc.h>
10302 #endif
10303 int main() {
10304 int testvar;
10305 ; return 0; }
10306 EOF
10307 if { (eval echo configure:10308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10308   rm -rf conftest*
10309   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10310 else
10311   echo "configure: failed program was:" >&5
10312   cat conftest.$ac_ext >&5
10313   rm -rf conftest*
10314   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10315 fi
10316 rm -f conftest*
10317 fi
10318
10319 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10320 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10321     cat >> confdefs.h <<\EOF
10322 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10323 EOF
10324
10325 fi
10326
10327 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10328 echo "configure:10329: checking for test routines" >&5
10329 if test "$cross_compiling" = yes; then
10330   echo "configure: warning: cannot run when cross-compiling" 1>&2
10331 else
10332   cat > conftest.$ac_ext <<EOF
10333 #line 10334 "configure"
10334 #include "confdefs.h"
10335 #include "${srcdir-.}/tests/trivial.c"
10336 EOF
10337 if { (eval echo configure:10338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10338 then
10339   echo "$ac_t""yes" 1>&6
10340 else
10341   echo "configure: failed program was:" >&5
10342   cat conftest.$ac_ext >&5
10343   rm -fr conftest*
10344   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10345 fi
10346 rm -fr conftest*
10347 fi
10348
10349
10350 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10351 echo "configure:10352: checking for ftruncate extend" >&5
10352 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10353   echo $ac_n "(cached) $ac_c" 1>&6
10354 else
10355   
10356 if test "$cross_compiling" = yes; then
10357   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10358 else
10359   cat > conftest.$ac_ext <<EOF
10360 #line 10361 "configure"
10361 #include "confdefs.h"
10362 #include "${srcdir-.}/tests/ftruncate.c"
10363 EOF
10364 if { (eval echo configure:10365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10365 then
10366   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10367 else
10368   echo "configure: failed program was:" >&5
10369   cat conftest.$ac_ext >&5
10370   rm -fr conftest*
10371   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10372 fi
10373 rm -fr conftest*
10374 fi
10375
10376 fi
10377
10378 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10379 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10380     cat >> confdefs.h <<\EOF
10381 #define HAVE_FTRUNCATE_EXTEND 1
10382 EOF
10383
10384 fi
10385
10386 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10387 echo "configure:10388: checking for AF_LOCAL socket support" >&5
10388 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10389   echo $ac_n "(cached) $ac_c" 1>&6
10390 else
10391   
10392 if test "$cross_compiling" = yes; then
10393   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10394 else
10395   cat > conftest.$ac_ext <<EOF
10396 #line 10397 "configure"
10397 #include "confdefs.h"
10398 #include "${srcdir-.}/tests/unixsock.c"
10399 EOF
10400 if { (eval echo configure:10401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10401 then
10402   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10403 else
10404   echo "configure: failed program was:" >&5
10405   cat conftest.$ac_ext >&5
10406   rm -fr conftest*
10407   samba_cv_HAVE_WORKING_AF_LOCAL=no
10408 fi
10409 rm -fr conftest*
10410 fi
10411
10412 fi
10413
10414 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10415 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10416 then
10417     cat >> confdefs.h <<\EOF
10418 #define HAVE_WORKING_AF_LOCAL 1
10419 EOF
10420
10421 fi
10422
10423 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10424 echo "configure:10425: checking for broken getgroups" >&5
10425 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10426   echo $ac_n "(cached) $ac_c" 1>&6
10427 else
10428   
10429 if test "$cross_compiling" = yes; then
10430   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10431 else
10432   cat > conftest.$ac_ext <<EOF
10433 #line 10434 "configure"
10434 #include "confdefs.h"
10435 #include "${srcdir-.}/tests/getgroups.c"
10436 EOF
10437 if { (eval echo configure:10438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10438 then
10439   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10440 else
10441   echo "configure: failed program was:" >&5
10442   cat conftest.$ac_ext >&5
10443   rm -fr conftest*
10444   samba_cv_HAVE_BROKEN_GETGROUPS=no
10445 fi
10446 rm -fr conftest*
10447 fi
10448
10449 fi
10450
10451 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10452 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10453     cat >> confdefs.h <<\EOF
10454 #define HAVE_BROKEN_GETGROUPS 1
10455 EOF
10456
10457 fi
10458
10459 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10460 echo "configure:10461: checking whether getpass should be replaced" >&5
10461 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10462   echo $ac_n "(cached) $ac_c" 1>&6
10463 else
10464   
10465 SAVE_CPPFLAGS="$CPPFLAGS"
10466 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10467 cat > conftest.$ac_ext <<EOF
10468 #line 10469 "configure"
10469 #include "confdefs.h"
10470
10471 #define REPLACE_GETPASS 1
10472 #define NO_CONFIG_H 1
10473 #define main dont_declare_main
10474 #include "${srcdir-.}/lib/getsmbpass.c"
10475 #undef main
10476
10477 int main() {
10478
10479 ; return 0; }
10480 EOF
10481 if { (eval echo configure:10482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10482   rm -rf conftest*
10483   samba_cv_REPLACE_GETPASS=yes
10484 else
10485   echo "configure: failed program was:" >&5
10486   cat conftest.$ac_ext >&5
10487   rm -rf conftest*
10488   samba_cv_REPLACE_GETPASS=no
10489 fi
10490 rm -f conftest*
10491 CPPFLAGS="$SAVE_CPPFLAGS"
10492
10493 fi
10494
10495 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10496 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10497         cat >> confdefs.h <<\EOF
10498 #define REPLACE_GETPASS 1
10499 EOF
10500
10501 fi
10502
10503 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10504 echo "configure:10505: checking for broken inet_ntoa" >&5
10505 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10506   echo $ac_n "(cached) $ac_c" 1>&6
10507 else
10508   
10509 if test "$cross_compiling" = yes; then
10510   samba_cv_REPLACE_INET_NTOA=cross
10511 else
10512   cat > conftest.$ac_ext <<EOF
10513 #line 10514 "configure"
10514 #include "confdefs.h"
10515
10516 #include <stdio.h>
10517 #include <sys/types.h>
10518 #include <netinet/in.h>
10519 #ifdef HAVE_ARPA_INET_H
10520 #include <arpa/inet.h>
10521 #endif
10522 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10523 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10524     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10525 exit(1);}
10526 EOF
10527 if { (eval echo configure:10528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10528 then
10529   samba_cv_REPLACE_INET_NTOA=yes
10530 else
10531   echo "configure: failed program was:" >&5
10532   cat conftest.$ac_ext >&5
10533   rm -fr conftest*
10534   samba_cv_REPLACE_INET_NTOA=no
10535 fi
10536 rm -fr conftest*
10537 fi
10538
10539 fi
10540
10541 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10542 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10543     cat >> confdefs.h <<\EOF
10544 #define REPLACE_INET_NTOA 1
10545 EOF
10546
10547 fi
10548
10549 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10550 echo "configure:10551: checking for secure mkstemp" >&5
10551 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10552   echo $ac_n "(cached) $ac_c" 1>&6
10553 else
10554   
10555 if test "$cross_compiling" = yes; then
10556   samba_cv_HAVE_SECURE_MKSTEMP=cross
10557 else
10558   cat > conftest.$ac_ext <<EOF
10559 #line 10560 "configure"
10560 #include "confdefs.h"
10561 #include <stdlib.h>
10562 #include <sys/types.h>
10563 #include <sys/stat.h>
10564 #include <unistd.h>
10565 main() { 
10566   struct stat st;
10567   char tpl[20]="/tmp/test.XXXXXX"; 
10568   int fd = mkstemp(tpl); 
10569   if (fd == -1) exit(1);
10570   unlink(tpl);
10571   if (fstat(fd, &st) != 0) exit(1);
10572   if ((st.st_mode & 0777) != 0600) exit(1);
10573   exit(0);
10574 }
10575 EOF
10576 if { (eval echo configure:10577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10577 then
10578   samba_cv_HAVE_SECURE_MKSTEMP=yes
10579 else
10580   echo "configure: failed program was:" >&5
10581   cat conftest.$ac_ext >&5
10582   rm -fr conftest*
10583   samba_cv_HAVE_SECURE_MKSTEMP=no
10584 fi
10585 rm -fr conftest*
10586 fi
10587
10588 fi
10589
10590 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10591 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10592     cat >> confdefs.h <<\EOF
10593 #define HAVE_SECURE_MKSTEMP 1
10594 EOF
10595
10596 fi
10597
10598 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10599 echo "configure:10600: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10600 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10601   echo $ac_n "(cached) $ac_c" 1>&6
10602 else
10603   
10604 if test "$cross_compiling" = yes; then
10605   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10606 else
10607   cat > conftest.$ac_ext <<EOF
10608 #line 10609 "configure"
10609 #include "confdefs.h"
10610 #include <unistd.h>
10611 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10612 EOF
10613 if { (eval echo configure:10614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10614 then
10615   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10616 else
10617   echo "configure: failed program was:" >&5
10618   cat conftest.$ac_ext >&5
10619   rm -fr conftest*
10620   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10621 fi
10622 rm -fr conftest*
10623 fi
10624
10625 fi
10626
10627 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10628 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10629     cat >> confdefs.h <<\EOF
10630 #define SYSCONF_SC_NGROUPS_MAX 1
10631 EOF
10632
10633 fi
10634
10635 echo $ac_n "checking for root""... $ac_c" 1>&6
10636 echo "configure:10637: checking for root" >&5
10637 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10638   echo $ac_n "(cached) $ac_c" 1>&6
10639 else
10640   
10641 if test "$cross_compiling" = yes; then
10642   samba_cv_HAVE_ROOT=cross
10643 else
10644   cat > conftest.$ac_ext <<EOF
10645 #line 10646 "configure"
10646 #include "confdefs.h"
10647 main() { exit(getuid() != 0); }
10648 EOF
10649 if { (eval echo configure:10650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10650 then
10651   samba_cv_HAVE_ROOT=yes
10652 else
10653   echo "configure: failed program was:" >&5
10654   cat conftest.$ac_ext >&5
10655   rm -fr conftest*
10656   samba_cv_HAVE_ROOT=no
10657 fi
10658 rm -fr conftest*
10659 fi
10660
10661 fi
10662
10663 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10664 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10665     cat >> confdefs.h <<\EOF
10666 #define HAVE_ROOT 1
10667 EOF
10668
10669 else
10670     echo "configure: warning: running as non-root will disable some tests" 1>&2
10671 fi
10672
10673 ##################
10674 # look for a method of finding the list of network interfaces
10675 iface=no;
10676 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10677 echo "configure:10678: checking for iface AIX" >&5
10678 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10679   echo $ac_n "(cached) $ac_c" 1>&6
10680 else
10681   
10682 if test "$cross_compiling" = yes; then
10683   samba_cv_HAVE_IFACE_AIX=cross
10684 else
10685   cat > conftest.$ac_ext <<EOF
10686 #line 10687 "configure"
10687 #include "confdefs.h"
10688
10689 #define HAVE_IFACE_AIX 1
10690 #define AUTOCONF_TEST 1
10691 #include "confdefs.h"
10692 #include "${srcdir-.}/lib/interfaces.c"
10693 EOF
10694 if { (eval echo configure:10695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10695 then
10696   samba_cv_HAVE_IFACE_AIX=yes
10697 else
10698   echo "configure: failed program was:" >&5
10699   cat conftest.$ac_ext >&5
10700   rm -fr conftest*
10701   samba_cv_HAVE_IFACE_AIX=no
10702 fi
10703 rm -fr conftest*
10704 fi
10705
10706 fi
10707
10708 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10709 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10710     iface=yes;cat >> confdefs.h <<\EOF
10711 #define HAVE_IFACE_AIX 1
10712 EOF
10713
10714 fi
10715
10716 if test $iface = no; then
10717 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10718 echo "configure:10719: checking for iface ifconf" >&5
10719 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10720   echo $ac_n "(cached) $ac_c" 1>&6
10721 else
10722   
10723 if test "$cross_compiling" = yes; then
10724   samba_cv_HAVE_IFACE_IFCONF=cross
10725 else
10726   cat > conftest.$ac_ext <<EOF
10727 #line 10728 "configure"
10728 #include "confdefs.h"
10729
10730 #define HAVE_IFACE_IFCONF 1
10731 #define AUTOCONF_TEST 1
10732 #include "confdefs.h"
10733 #include "${srcdir-.}/lib/interfaces.c"
10734 EOF
10735 if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10736 then
10737   samba_cv_HAVE_IFACE_IFCONF=yes
10738 else
10739   echo "configure: failed program was:" >&5
10740   cat conftest.$ac_ext >&5
10741   rm -fr conftest*
10742   samba_cv_HAVE_IFACE_IFCONF=no
10743 fi
10744 rm -fr conftest*
10745 fi
10746
10747 fi
10748
10749 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10750 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10751     iface=yes;cat >> confdefs.h <<\EOF
10752 #define HAVE_IFACE_IFCONF 1
10753 EOF
10754
10755 fi
10756 fi
10757
10758 if test $iface = no; then
10759 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10760 echo "configure:10761: checking for iface ifreq" >&5
10761 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10762   echo $ac_n "(cached) $ac_c" 1>&6
10763 else
10764   
10765 if test "$cross_compiling" = yes; then
10766   samba_cv_HAVE_IFACE_IFREQ=cross
10767 else
10768   cat > conftest.$ac_ext <<EOF
10769 #line 10770 "configure"
10770 #include "confdefs.h"
10771
10772 #define HAVE_IFACE_IFREQ 1
10773 #define AUTOCONF_TEST 1
10774 #include "confdefs.h"
10775 #include "${srcdir-.}/lib/interfaces.c"
10776 EOF
10777 if { (eval echo configure:10778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10778 then
10779   samba_cv_HAVE_IFACE_IFREQ=yes
10780 else
10781   echo "configure: failed program was:" >&5
10782   cat conftest.$ac_ext >&5
10783   rm -fr conftest*
10784   samba_cv_HAVE_IFACE_IFREQ=no
10785 fi
10786 rm -fr conftest*
10787 fi
10788
10789 fi
10790
10791 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10792 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10793     iface=yes;cat >> confdefs.h <<\EOF
10794 #define HAVE_IFACE_IFREQ 1
10795 EOF
10796
10797 fi
10798 fi
10799
10800
10801 ################################################
10802 # look for a method of setting the effective uid
10803 seteuid=no;
10804 if test $seteuid = no; then
10805 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10806 echo "configure:10807: checking for setresuid" >&5
10807 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10808   echo $ac_n "(cached) $ac_c" 1>&6
10809 else
10810   
10811 if test "$cross_compiling" = yes; then
10812   samba_cv_USE_SETRESUID=cross
10813 else
10814   cat > conftest.$ac_ext <<EOF
10815 #line 10816 "configure"
10816 #include "confdefs.h"
10817
10818 #define AUTOCONF_TEST 1
10819 #define USE_SETRESUID 1
10820 #include "confdefs.h"
10821 #include "${srcdir-.}/lib/util_sec.c"
10822 EOF
10823 if { (eval echo configure:10824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10824 then
10825   samba_cv_USE_SETRESUID=yes
10826 else
10827   echo "configure: failed program was:" >&5
10828   cat conftest.$ac_ext >&5
10829   rm -fr conftest*
10830   samba_cv_USE_SETRESUID=no
10831 fi
10832 rm -fr conftest*
10833 fi
10834
10835 fi
10836
10837 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10838 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10839     seteuid=yes;cat >> confdefs.h <<\EOF
10840 #define USE_SETRESUID 1
10841 EOF
10842
10843 fi
10844 fi
10845
10846
10847 if test $seteuid = no; then
10848 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10849 echo "configure:10850: checking for setreuid" >&5
10850 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10851   echo $ac_n "(cached) $ac_c" 1>&6
10852 else
10853   
10854 if test "$cross_compiling" = yes; then
10855   samba_cv_USE_SETREUID=cross
10856 else
10857   cat > conftest.$ac_ext <<EOF
10858 #line 10859 "configure"
10859 #include "confdefs.h"
10860
10861 #define AUTOCONF_TEST 1
10862 #define USE_SETREUID 1
10863 #include "confdefs.h"
10864 #include "${srcdir-.}/lib/util_sec.c"
10865 EOF
10866 if { (eval echo configure:10867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10867 then
10868   samba_cv_USE_SETREUID=yes
10869 else
10870   echo "configure: failed program was:" >&5
10871   cat conftest.$ac_ext >&5
10872   rm -fr conftest*
10873   samba_cv_USE_SETREUID=no
10874 fi
10875 rm -fr conftest*
10876 fi
10877
10878 fi
10879
10880 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10881 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10882     seteuid=yes;cat >> confdefs.h <<\EOF
10883 #define USE_SETREUID 1
10884 EOF
10885
10886 fi
10887 fi
10888
10889 if test $seteuid = no; then
10890 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10891 echo "configure:10892: checking for seteuid" >&5
10892 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10893   echo $ac_n "(cached) $ac_c" 1>&6
10894 else
10895   
10896 if test "$cross_compiling" = yes; then
10897   samba_cv_USE_SETEUID=cross
10898 else
10899   cat > conftest.$ac_ext <<EOF
10900 #line 10901 "configure"
10901 #include "confdefs.h"
10902
10903 #define AUTOCONF_TEST 1
10904 #define USE_SETEUID 1
10905 #include "confdefs.h"
10906 #include "${srcdir-.}/lib/util_sec.c"
10907 EOF
10908 if { (eval echo configure:10909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10909 then
10910   samba_cv_USE_SETEUID=yes
10911 else
10912   echo "configure: failed program was:" >&5
10913   cat conftest.$ac_ext >&5
10914   rm -fr conftest*
10915   samba_cv_USE_SETEUID=no
10916 fi
10917 rm -fr conftest*
10918 fi
10919
10920 fi
10921
10922 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10923 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10924     seteuid=yes;cat >> confdefs.h <<\EOF
10925 #define USE_SETEUID 1
10926 EOF
10927
10928 fi
10929 fi
10930
10931 if test $seteuid = no; then
10932 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10933 echo "configure:10934: checking for setuidx" >&5
10934 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10935   echo $ac_n "(cached) $ac_c" 1>&6
10936 else
10937   
10938 if test "$cross_compiling" = yes; then
10939   samba_cv_USE_SETUIDX=cross
10940 else
10941   cat > conftest.$ac_ext <<EOF
10942 #line 10943 "configure"
10943 #include "confdefs.h"
10944
10945 #define AUTOCONF_TEST 1
10946 #define USE_SETUIDX 1
10947 #include "confdefs.h"
10948 #include "${srcdir-.}/lib/util_sec.c"
10949 EOF
10950 if { (eval echo configure:10951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10951 then
10952   samba_cv_USE_SETUIDX=yes
10953 else
10954   echo "configure: failed program was:" >&5
10955   cat conftest.$ac_ext >&5
10956   rm -fr conftest*
10957   samba_cv_USE_SETUIDX=no
10958 fi
10959 rm -fr conftest*
10960 fi
10961
10962 fi
10963
10964 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10965 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10966     seteuid=yes;cat >> confdefs.h <<\EOF
10967 #define USE_SETUIDX 1
10968 EOF
10969
10970 fi
10971 fi
10972
10973
10974 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10975 echo "configure:10976: checking for working mmap" >&5
10976 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10977   echo $ac_n "(cached) $ac_c" 1>&6
10978 else
10979   
10980 if test "$cross_compiling" = yes; then
10981   samba_cv_HAVE_MMAP=cross
10982 else
10983   cat > conftest.$ac_ext <<EOF
10984 #line 10985 "configure"
10985 #include "confdefs.h"
10986 #include "${srcdir-.}/tests/shared_mmap.c"
10987 EOF
10988 if { (eval echo configure:10989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10989 then
10990   samba_cv_HAVE_MMAP=yes
10991 else
10992   echo "configure: failed program was:" >&5
10993   cat conftest.$ac_ext >&5
10994   rm -fr conftest*
10995   samba_cv_HAVE_MMAP=no
10996 fi
10997 rm -fr conftest*
10998 fi
10999
11000 fi
11001
11002 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11003 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11004     cat >> confdefs.h <<\EOF
11005 #define HAVE_MMAP 1
11006 EOF
11007
11008 fi
11009
11010 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11011 echo "configure:11012: checking for ftruncate needs root" >&5
11012 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11013   echo $ac_n "(cached) $ac_c" 1>&6
11014 else
11015   
11016 if test "$cross_compiling" = yes; then
11017   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11018 else
11019   cat > conftest.$ac_ext <<EOF
11020 #line 11021 "configure"
11021 #include "confdefs.h"
11022 #include "${srcdir-.}/tests/ftruncroot.c"
11023 EOF
11024 if { (eval echo configure:11025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11025 then
11026   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11027 else
11028   echo "configure: failed program was:" >&5
11029   cat conftest.$ac_ext >&5
11030   rm -fr conftest*
11031   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11032 fi
11033 rm -fr conftest*
11034 fi
11035
11036 fi
11037
11038 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11039 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11040     cat >> confdefs.h <<\EOF
11041 #define FTRUNCATE_NEEDS_ROOT 1
11042 EOF
11043
11044 fi
11045
11046 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11047 echo "configure:11048: checking for fcntl locking" >&5
11048 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11049   echo $ac_n "(cached) $ac_c" 1>&6
11050 else
11051   
11052 if test "$cross_compiling" = yes; then
11053   samba_cv_HAVE_FCNTL_LOCK=cross
11054 else
11055   cat > conftest.$ac_ext <<EOF
11056 #line 11057 "configure"
11057 #include "confdefs.h"
11058 #include "${srcdir-.}/tests/fcntl_lock.c"
11059 EOF
11060 if { (eval echo configure:11061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11061 then
11062   samba_cv_HAVE_FCNTL_LOCK=yes
11063 else
11064   echo "configure: failed program was:" >&5
11065   cat conftest.$ac_ext >&5
11066   rm -fr conftest*
11067   samba_cv_HAVE_FCNTL_LOCK=no
11068 fi
11069 rm -fr conftest*
11070 fi
11071
11072 fi
11073
11074 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11075 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11076     cat >> confdefs.h <<\EOF
11077 #define HAVE_FCNTL_LOCK 1
11078 EOF
11079
11080 fi
11081
11082 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11083 echo "configure:11084: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11084 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11085   echo $ac_n "(cached) $ac_c" 1>&6
11086 else
11087   
11088 if test "$cross_compiling" = yes; then
11089   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11090 else
11091   cat > conftest.$ac_ext <<EOF
11092 #line 11093 "configure"
11093 #include "confdefs.h"
11094 #include "${srcdir-.}/tests/fcntl_lock64.c"
11095 EOF
11096 if { (eval echo configure:11097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11097 then
11098   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11099 else
11100   echo "configure: failed program was:" >&5
11101   cat conftest.$ac_ext >&5
11102   rm -fr conftest*
11103   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11104 fi
11105 rm -fr conftest*
11106 fi
11107
11108 fi
11109
11110 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11111 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11112     cat >> confdefs.h <<\EOF
11113 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11114 EOF
11115
11116
11117 else
11118
11119
11120   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11121 echo "configure:11122: checking for 64 bit fcntl locking" >&5
11122 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11123   echo $ac_n "(cached) $ac_c" 1>&6
11124 else
11125   
11126   if test "$cross_compiling" = yes; then
11127   samba_cv_HAVE_STRUCT_FLOCK64=cross
11128 else
11129   cat > conftest.$ac_ext <<EOF
11130 #line 11131 "configure"
11131 #include "confdefs.h"
11132
11133 #if defined(HAVE_UNISTD_H)
11134 #include <unistd.h>
11135 #endif
11136 #include <stdio.h>
11137 #include <stdlib.h>
11138
11139 #ifdef HAVE_FCNTL_H
11140 #include <fcntl.h>
11141 #endif
11142
11143 #ifdef HAVE_SYS_FCNTL_H
11144 #include <sys/fcntl.h>
11145 #endif
11146 main() { struct flock64 fl64;
11147 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11148 exit(0);
11149 #else
11150 exit(1);
11151 #endif
11152 }
11153 EOF
11154 if { (eval echo configure:11155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11155 then
11156   samba_cv_HAVE_STRUCT_FLOCK64=yes
11157 else
11158   echo "configure: failed program was:" >&5
11159   cat conftest.$ac_ext >&5
11160   rm -fr conftest*
11161   samba_cv_HAVE_STRUCT_FLOCK64=no
11162 fi
11163 rm -fr conftest*
11164 fi
11165
11166 fi
11167
11168 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11169
11170   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11171       cat >> confdefs.h <<\EOF
11172 #define HAVE_STRUCT_FLOCK64 1
11173 EOF
11174
11175   fi
11176 fi
11177
11178
11179 case "$host_os" in
11180 *linux*)
11181 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11182 echo "configure:11183: checking for broken RedHat 7.2 system header files" >&5
11183 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11184   echo $ac_n "(cached) $ac_c" 1>&6
11185 else
11186   
11187 cat > conftest.$ac_ext <<EOF
11188 #line 11189 "configure"
11189 #include "confdefs.h"
11190
11191 #ifdef HAVE_SYS_VFS_H
11192 #include <sys/vfs.h>
11193 #endif
11194 #ifdef HAVE_SYS_CAPABILITY_H
11195 #include <sys/capability.h>
11196 #endif
11197
11198 int main() {
11199 int i;
11200 ; return 0; }
11201 EOF
11202 if { (eval echo configure:11203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11203   rm -rf conftest*
11204   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11205 else
11206   echo "configure: failed program was:" >&5
11207   cat conftest.$ac_ext >&5
11208   rm -rf conftest*
11209   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11210 fi
11211 rm -f conftest*
11212 fi
11213
11214 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11215 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11216    cat >> confdefs.h <<\EOF
11217 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11218 EOF
11219
11220 fi
11221 ;;
11222 esac
11223
11224 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11225 echo "configure:11226: checking for broken nisplus include files" >&5
11226 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11227   echo $ac_n "(cached) $ac_c" 1>&6
11228 else
11229   
11230 cat > conftest.$ac_ext <<EOF
11231 #line 11232 "configure"
11232 #include "confdefs.h"
11233 #include <sys/acl.h>
11234 #if defined(HAVE_RPCSVC_NIS_H)
11235 #include <rpcsvc/nis.h>
11236 #endif
11237 int main() {
11238 int i;
11239 ; return 0; }
11240 EOF
11241 if { (eval echo configure:11242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11242   rm -rf conftest*
11243   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11244 else
11245   echo "configure: failed program was:" >&5
11246   cat conftest.$ac_ext >&5
11247   rm -rf conftest*
11248   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11249 fi
11250 rm -f conftest*
11251 fi
11252
11253 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11254 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11255     cat >> confdefs.h <<\EOF
11256 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11257 EOF
11258
11259 fi
11260
11261
11262 #################################################
11263 # check for smbwrapper support
11264 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11265 echo "configure:11266: checking whether to use smbwrapper" >&5
11266 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11267 if test "${with_smbwrapper+set}" = set; then
11268   withval="$with_smbwrapper"
11269    case "$withval" in
11270   yes)
11271     echo "$ac_t""yes" 1>&6
11272     cat >> confdefs.h <<\EOF
11273 #define WITH_SMBWRAPPER 1
11274 EOF
11275
11276         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11277
11278         if test x$ATTEMPT_WRAP32_BUILD = x; then
11279                 WRAP32=""
11280         else
11281                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11282         fi
11283
11284 # Conditions under which smbwrapper should not be built.
11285
11286         if test x$PICFLAG = x; then
11287            echo No support for PIC code - disabling smbwrapper and smbsh
11288            WRAP=""
11289            WRAP32=""
11290         elif test x$ac_cv_func_syscall = xno; then
11291            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11292            WRAP=""
11293            WRAP32=""
11294         fi
11295     ;;
11296   *)
11297     echo "$ac_t""no" 1>&6
11298     ;;
11299   esac 
11300 else
11301   echo "$ac_t""no" 1>&6
11302
11303 fi
11304
11305
11306 #################################################
11307 # check for AFS clear-text auth support
11308 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11309 echo "configure:11310: checking whether to use AFS clear-text auth" >&5
11310 # Check whether --with-afs or --without-afs was given.
11311 if test "${with_afs+set}" = set; then
11312   withval="$with_afs"
11313    case "$withval" in
11314   yes)
11315     echo "$ac_t""yes" 1>&6
11316     cat >> confdefs.h <<\EOF
11317 #define WITH_AFS 1
11318 EOF
11319
11320     ;;
11321   *)
11322     echo "$ac_t""no" 1>&6
11323     ;;
11324   esac 
11325 else
11326   echo "$ac_t""no" 1>&6
11327
11328 fi
11329
11330
11331
11332 #################################################
11333 # check for the DFS clear-text auth system
11334 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11335 echo "configure:11336: checking whether to use DFS clear-text auth" >&5
11336 # Check whether --with-dfs or --without-dfs was given.
11337 if test "${with_dfs+set}" = set; then
11338   withval="$with_dfs"
11339    case "$withval" in
11340   yes)
11341     echo "$ac_t""yes" 1>&6
11342     cat >> confdefs.h <<\EOF
11343 #define WITH_DFS 1
11344 EOF
11345
11346     ;;
11347   *)
11348     echo "$ac_t""no" 1>&6
11349     ;;
11350   esac 
11351 else
11352   echo "$ac_t""no" 1>&6
11353
11354 fi
11355
11356
11357
11358 #################################################
11359 # see if this box has the RedHat location for kerberos
11360 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11361 echo "configure:11362: checking for /usr/kerberos" >&5
11362 if test -d /usr/kerberos; then
11363     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11364     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11365     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11366     echo "$ac_t""yes" 1>&6
11367 else
11368     echo "$ac_t""no" 1>&6
11369 fi
11370
11371 #################################################
11372 # check for location of Kerberos 5 install
11373 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11374 echo "configure:11375: checking for kerberos 5 install path" >&5
11375 # Check whether --with-krb5 or --without-krb5 was given.
11376 if test "${with_krb5+set}" = set; then
11377   withval="$with_krb5"
11378    case "$withval" in
11379   no)
11380     echo "$ac_t""no" 1>&6
11381     ;;
11382   *)
11383     echo "$ac_t""yes" 1>&6
11384     LIBS="$LIBS -lkrb5"
11385     CFLAGS="$CFLAGS -I$withval/include"
11386     CPPFLAGS="$CPPFLAGS -I$withval/include"
11387     LDFLAGS="$LDFLAGS -L$withval/lib"
11388     ;;
11389   esac 
11390 else
11391   echo "$ac_t""no" 1>&6
11392
11393 fi
11394
11395
11396 # now check for krb5.h. Some systems have the libraries without the headers!
11397 # note that this check is done here to allow for different kerberos
11398 # include paths
11399 for ac_hdr in krb5.h
11400 do
11401 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11402 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11403 echo "configure:11404: checking for $ac_hdr" >&5
11404 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11405   echo $ac_n "(cached) $ac_c" 1>&6
11406 else
11407   cat > conftest.$ac_ext <<EOF
11408 #line 11409 "configure"
11409 #include "confdefs.h"
11410 #include <$ac_hdr>
11411 EOF
11412 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11413 { (eval echo configure:11414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11414 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11415 if test -z "$ac_err"; then
11416   rm -rf conftest*
11417   eval "ac_cv_header_$ac_safe=yes"
11418 else
11419   echo "$ac_err" >&5
11420   echo "configure: failed program was:" >&5
11421   cat conftest.$ac_ext >&5
11422   rm -rf conftest*
11423   eval "ac_cv_header_$ac_safe=no"
11424 fi
11425 rm -f conftest*
11426 fi
11427 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11428   echo "$ac_t""yes" 1>&6
11429     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11430   cat >> confdefs.h <<EOF
11431 #define $ac_tr_hdr 1
11432 EOF
11433  
11434 else
11435   echo "$ac_t""no" 1>&6
11436 fi
11437 done
11438
11439
11440 # now check for gssapi headers.  This is also done here to allow for
11441 # different kerberos include paths
11442 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
11443 do
11444 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11445 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11446 echo "configure:11447: checking for $ac_hdr" >&5
11447 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11448   echo $ac_n "(cached) $ac_c" 1>&6
11449 else
11450   cat > conftest.$ac_ext <<EOF
11451 #line 11452 "configure"
11452 #include "confdefs.h"
11453 #include <$ac_hdr>
11454 EOF
11455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11456 { (eval echo configure:11457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11458 if test -z "$ac_err"; then
11459   rm -rf conftest*
11460   eval "ac_cv_header_$ac_safe=yes"
11461 else
11462   echo "$ac_err" >&5
11463   echo "configure: failed program was:" >&5
11464   cat conftest.$ac_ext >&5
11465   rm -rf conftest*
11466   eval "ac_cv_header_$ac_safe=no"
11467 fi
11468 rm -f conftest*
11469 fi
11470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11471   echo "$ac_t""yes" 1>&6
11472     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11473   cat >> confdefs.h <<EOF
11474 #define $ac_tr_hdr 1
11475 EOF
11476  
11477 else
11478   echo "$ac_t""no" 1>&6
11479 fi
11480 done
11481
11482
11483 ##################################################################
11484 # we might need the k5crypto and com_err libraries on some systems
11485 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11486 echo "configure:11487: checking for _et_list in -lcom_err" >&5
11487 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11488 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11489   echo $ac_n "(cached) $ac_c" 1>&6
11490 else
11491   ac_save_LIBS="$LIBS"
11492 LIBS="-lcom_err  $LIBS"
11493 cat > conftest.$ac_ext <<EOF
11494 #line 11495 "configure"
11495 #include "confdefs.h"
11496 /* Override any gcc2 internal prototype to avoid an error.  */
11497 /* We use char because int might match the return type of a gcc2
11498     builtin and then its argument prototype would still apply.  */
11499 char _et_list();
11500
11501 int main() {
11502 _et_list()
11503 ; return 0; }
11504 EOF
11505 if { (eval echo configure:11506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11506   rm -rf conftest*
11507   eval "ac_cv_lib_$ac_lib_var=yes"
11508 else
11509   echo "configure: failed program was:" >&5
11510   cat conftest.$ac_ext >&5
11511   rm -rf conftest*
11512   eval "ac_cv_lib_$ac_lib_var=no"
11513 fi
11514 rm -f conftest*
11515 LIBS="$ac_save_LIBS"
11516
11517 fi
11518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11519   echo "$ac_t""yes" 1>&6
11520   LIBS="$LIBS -lcom_err"
11521 else
11522   echo "$ac_t""no" 1>&6
11523 fi
11524
11525 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11526 echo "configure:11527: checking for krb5_encrypt_data in -lk5crypto" >&5
11527 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11528 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11529   echo $ac_n "(cached) $ac_c" 1>&6
11530 else
11531   ac_save_LIBS="$LIBS"
11532 LIBS="-lk5crypto  $LIBS"
11533 cat > conftest.$ac_ext <<EOF
11534 #line 11535 "configure"
11535 #include "confdefs.h"
11536 /* Override any gcc2 internal prototype to avoid an error.  */
11537 /* We use char because int might match the return type of a gcc2
11538     builtin and then its argument prototype would still apply.  */
11539 char krb5_encrypt_data();
11540
11541 int main() {
11542 krb5_encrypt_data()
11543 ; return 0; }
11544 EOF
11545 if { (eval echo configure:11546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11546   rm -rf conftest*
11547   eval "ac_cv_lib_$ac_lib_var=yes"
11548 else
11549   echo "configure: failed program was:" >&5
11550   cat conftest.$ac_ext >&5
11551   rm -rf conftest*
11552   eval "ac_cv_lib_$ac_lib_var=no"
11553 fi
11554 rm -f conftest*
11555 LIBS="$ac_save_LIBS"
11556
11557 fi
11558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11559   echo "$ac_t""yes" 1>&6
11560   LIBS="$LIBS -lk5crypto"
11561 else
11562   echo "$ac_t""no" 1>&6
11563 fi
11564
11565 echo $ac_n "checking for gss_import_name in -lgssapi_krb5""... $ac_c" 1>&6
11566 echo "configure:11567: checking for gss_import_name in -lgssapi_krb5" >&5
11567 ac_lib_var=`echo gssapi_krb5'_'gss_import_name | sed 'y%./+-%__p_%'`
11568 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11569   echo $ac_n "(cached) $ac_c" 1>&6
11570 else
11571   ac_save_LIBS="$LIBS"
11572 LIBS="-lgssapi_krb5  $LIBS"
11573 cat > conftest.$ac_ext <<EOF
11574 #line 11575 "configure"
11575 #include "confdefs.h"
11576 /* Override any gcc2 internal prototype to avoid an error.  */
11577 /* We use char because int might match the return type of a gcc2
11578     builtin and then its argument prototype would still apply.  */
11579 char gss_import_name();
11580
11581 int main() {
11582 gss_import_name()
11583 ; return 0; }
11584 EOF
11585 if { (eval echo configure:11586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11586   rm -rf conftest*
11587   eval "ac_cv_lib_$ac_lib_var=yes"
11588 else
11589   echo "configure: failed program was:" >&5
11590   cat conftest.$ac_ext >&5
11591   rm -rf conftest*
11592   eval "ac_cv_lib_$ac_lib_var=no"
11593 fi
11594 rm -f conftest*
11595 LIBS="$ac_save_LIBS"
11596
11597 fi
11598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11599   echo "$ac_t""yes" 1>&6
11600   LIBS="$LIBS -lgssapi_krb5"
11601 else
11602   echo "$ac_t""no" 1>&6
11603 fi
11604
11605
11606
11607 ########################################################
11608 # now see if we can find the krb5 libs in standard paths
11609 # or as specified above
11610 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11611 echo "configure:11612: checking for krb5_mk_req_extended in -lkrb5" >&5
11612 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11613 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11614   echo $ac_n "(cached) $ac_c" 1>&6
11615 else
11616   ac_save_LIBS="$LIBS"
11617 LIBS="-lkrb5  $LIBS"
11618 cat > conftest.$ac_ext <<EOF
11619 #line 11620 "configure"
11620 #include "confdefs.h"
11621 /* Override any gcc2 internal prototype to avoid an error.  */
11622 /* We use char because int might match the return type of a gcc2
11623     builtin and then its argument prototype would still apply.  */
11624 char krb5_mk_req_extended();
11625
11626 int main() {
11627 krb5_mk_req_extended()
11628 ; return 0; }
11629 EOF
11630 if { (eval echo configure:11631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11631   rm -rf conftest*
11632   eval "ac_cv_lib_$ac_lib_var=yes"
11633 else
11634   echo "configure: failed program was:" >&5
11635   cat conftest.$ac_ext >&5
11636   rm -rf conftest*
11637   eval "ac_cv_lib_$ac_lib_var=no"
11638 fi
11639 rm -f conftest*
11640 LIBS="$ac_save_LIBS"
11641
11642 fi
11643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11644   echo "$ac_t""yes" 1>&6
11645   LIBS="$LIBS -lkrb5";
11646         cat >> confdefs.h <<\EOF
11647 #define HAVE_KRB5 1
11648 EOF
11649
11650 else
11651   echo "$ac_t""no" 1>&6
11652 fi
11653
11654
11655
11656 ##################################################################
11657 # we might need the lber lib on some systems. To avoid link errors
11658 # this test must be before the libldap test
11659 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11660 echo "configure:11661: checking for ber_scanf in -llber" >&5
11661 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11662 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11663   echo $ac_n "(cached) $ac_c" 1>&6
11664 else
11665   ac_save_LIBS="$LIBS"
11666 LIBS="-llber  $LIBS"
11667 cat > conftest.$ac_ext <<EOF
11668 #line 11669 "configure"
11669 #include "confdefs.h"
11670 /* Override any gcc2 internal prototype to avoid an error.  */
11671 /* We use char because int might match the return type of a gcc2
11672     builtin and then its argument prototype would still apply.  */
11673 char ber_scanf();
11674
11675 int main() {
11676 ber_scanf()
11677 ; return 0; }
11678 EOF
11679 if { (eval echo configure:11680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11680   rm -rf conftest*
11681   eval "ac_cv_lib_$ac_lib_var=yes"
11682 else
11683   echo "configure: failed program was:" >&5
11684   cat conftest.$ac_ext >&5
11685   rm -rf conftest*
11686   eval "ac_cv_lib_$ac_lib_var=no"
11687 fi
11688 rm -f conftest*
11689 LIBS="$ac_save_LIBS"
11690
11691 fi
11692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11693   echo "$ac_t""yes" 1>&6
11694   LIBS="$LIBS -llber"
11695 else
11696   echo "$ac_t""no" 1>&6
11697 fi
11698
11699
11700 ########################################################
11701 # now see if we can find the ldap libs in standard paths
11702 if test x$have_ldap != xyes; then
11703 echo $ac_n "checking for ldap_open in -lldap""... $ac_c" 1>&6
11704 echo "configure:11705: checking for ldap_open in -lldap" >&5
11705 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
11706 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11707   echo $ac_n "(cached) $ac_c" 1>&6
11708 else
11709   ac_save_LIBS="$LIBS"
11710 LIBS="-lldap  $LIBS"
11711 cat > conftest.$ac_ext <<EOF
11712 #line 11713 "configure"
11713 #include "confdefs.h"
11714 /* Override any gcc2 internal prototype to avoid an error.  */
11715 /* We use char because int might match the return type of a gcc2
11716     builtin and then its argument prototype would still apply.  */
11717 char ldap_open();
11718
11719 int main() {
11720 ldap_open()
11721 ; return 0; }
11722 EOF
11723 if { (eval echo configure:11724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11724   rm -rf conftest*
11725   eval "ac_cv_lib_$ac_lib_var=yes"
11726 else
11727   echo "configure: failed program was:" >&5
11728   cat conftest.$ac_ext >&5
11729   rm -rf conftest*
11730   eval "ac_cv_lib_$ac_lib_var=no"
11731 fi
11732 rm -f conftest*
11733 LIBS="$ac_save_LIBS"
11734
11735 fi
11736 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11737   echo "$ac_t""yes" 1>&6
11738   LIBS="$LIBS -lldap";
11739         cat >> confdefs.h <<\EOF
11740 #define HAVE_LDAP 1
11741 EOF
11742
11743 else
11744   echo "$ac_t""no" 1>&6
11745 fi
11746
11747 fi
11748
11749
11750 #################################################
11751 # check for automount support
11752 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11753 echo "configure:11754: checking whether to use AUTOMOUNT" >&5
11754 # Check whether --with-automount or --without-automount was given.
11755 if test "${with_automount+set}" = set; then
11756   withval="$with_automount"
11757    case "$withval" in
11758   yes)
11759     echo "$ac_t""yes" 1>&6
11760     cat >> confdefs.h <<\EOF
11761 #define WITH_AUTOMOUNT 1
11762 EOF
11763
11764     ;;
11765   *)
11766     echo "$ac_t""no" 1>&6
11767     ;;
11768   esac 
11769 else
11770   echo "$ac_t""no" 1>&6
11771
11772 fi
11773
11774
11775 #################################################
11776 # check for smbmount support
11777 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11778 echo "configure:11779: checking whether to use SMBMOUNT" >&5
11779 # Check whether --with-smbmount or --without-smbmount was given.
11780 if test "${with_smbmount+set}" = set; then
11781   withval="$with_smbmount"
11782    case "$withval" in
11783   yes)
11784         case "$host_os" in
11785         *linux*)
11786                 echo "$ac_t""yes" 1>&6
11787                 cat >> confdefs.h <<\EOF
11788 #define WITH_SMBMOUNT 1
11789 EOF
11790
11791                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11792                 ;;
11793         *)
11794                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
11795                 ;;
11796         esac
11797     ;;
11798   *)
11799     echo "$ac_t""no" 1>&6
11800     MPROGS=
11801     ;;
11802   esac 
11803 else
11804   echo "$ac_t""no" 1>&6
11805   MPROGS=
11806
11807 fi
11808
11809
11810
11811 #################################################
11812 # check for a PAM clear-text auth, accounts, password and session support
11813 with_pam_for_crypt=no
11814 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
11815 echo "configure:11816: checking whether to use PAM" >&5
11816 # Check whether --with-pam or --without-pam was given.
11817 if test "${with_pam+set}" = set; then
11818   withval="$with_pam"
11819    case "$withval" in
11820   yes)
11821     echo "$ac_t""yes" 1>&6
11822     cat >> confdefs.h <<\EOF
11823 #define WITH_PAM 1
11824 EOF
11825
11826     LIBS="$LIBS -lpam"
11827     with_pam_for_crypt=yes
11828     ;;
11829   *)
11830     echo "$ac_t""no" 1>&6
11831     ;;
11832   esac 
11833 else
11834   echo "$ac_t""no" 1>&6
11835
11836 fi
11837
11838
11839 # we can't build a pam module if we don't have pam.
11840 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11841 echo "configure:11842: checking for pam_get_data in -lpam" >&5
11842 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11843 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11844   echo $ac_n "(cached) $ac_c" 1>&6
11845 else
11846   ac_save_LIBS="$LIBS"
11847 LIBS="-lpam  $LIBS"
11848 cat > conftest.$ac_ext <<EOF
11849 #line 11850 "configure"
11850 #include "confdefs.h"
11851 /* Override any gcc2 internal prototype to avoid an error.  */
11852 /* We use char because int might match the return type of a gcc2
11853     builtin and then its argument prototype would still apply.  */
11854 char pam_get_data();
11855
11856 int main() {
11857 pam_get_data()
11858 ; return 0; }
11859 EOF
11860 if { (eval echo configure:11861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11861   rm -rf conftest*
11862   eval "ac_cv_lib_$ac_lib_var=yes"
11863 else
11864   echo "configure: failed program was:" >&5
11865   cat conftest.$ac_ext >&5
11866   rm -rf conftest*
11867   eval "ac_cv_lib_$ac_lib_var=no"
11868 fi
11869 rm -f conftest*
11870 LIBS="$ac_save_LIBS"
11871
11872 fi
11873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11874   echo "$ac_t""yes" 1>&6
11875   cat >> confdefs.h <<\EOF
11876 #define HAVE_LIBPAM 1
11877 EOF
11878
11879 else
11880   echo "$ac_t""no" 1>&6
11881 fi
11882
11883
11884 #################################################
11885 # check for pam_smbpass support
11886 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11887 echo "configure:11888: checking whether to use pam_smbpass" >&5
11888 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11889 if test "${with_pam_smbpass+set}" = set; then
11890   withval="$with_pam_smbpass"
11891    case "$withval" in
11892   yes)
11893     echo "$ac_t""yes" 1>&6
11894
11895 # Conditions under which pam_smbpass should not be built.
11896
11897        if test x$PICFLAG = x; then
11898           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11899           PAM_MOD=""
11900        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11901           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11902           PAM_MOD=""
11903        else
11904           PAM_MOD="bin/pam_smbpass.so"
11905        fi
11906     ;;
11907   *)
11908     echo "$ac_t""no" 1>&6
11909     ;;
11910   esac 
11911 else
11912   echo "$ac_t""no" 1>&6
11913
11914 fi
11915
11916
11917
11918 ###############################################
11919 # test for where we get crypt() from, but only
11920 # if not using PAM
11921 if test $with_pam_for_crypt = no; then
11922 for ac_func in crypt
11923 do
11924 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11925 echo "configure:11926: checking for $ac_func" >&5
11926 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11927   echo $ac_n "(cached) $ac_c" 1>&6
11928 else
11929   cat > conftest.$ac_ext <<EOF
11930 #line 11931 "configure"
11931 #include "confdefs.h"
11932 /* System header to define __stub macros and hopefully few prototypes,
11933     which can conflict with char $ac_func(); below.  */
11934 #include <assert.h>
11935 /* Override any gcc2 internal prototype to avoid an error.  */
11936 /* We use char because int might match the return type of a gcc2
11937     builtin and then its argument prototype would still apply.  */
11938 char $ac_func();
11939
11940 int main() {
11941
11942 /* The GNU C library defines this for functions which it implements
11943     to always fail with ENOSYS.  Some functions are actually named
11944     something starting with __ and the normal name is an alias.  */
11945 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11946 choke me
11947 #else
11948 $ac_func();
11949 #endif
11950
11951 ; return 0; }
11952 EOF
11953 if { (eval echo configure:11954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11954   rm -rf conftest*
11955   eval "ac_cv_func_$ac_func=yes"
11956 else
11957   echo "configure: failed program was:" >&5
11958   cat conftest.$ac_ext >&5
11959   rm -rf conftest*
11960   eval "ac_cv_func_$ac_func=no"
11961 fi
11962 rm -f conftest*
11963 fi
11964
11965 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11966   echo "$ac_t""yes" 1>&6
11967     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11968   cat >> confdefs.h <<EOF
11969 #define $ac_tr_func 1
11970 EOF
11971  
11972 else
11973   echo "$ac_t""no" 1>&6
11974 fi
11975 done
11976
11977 if test x"$ac_cv_func_crypt" = x"no"; then
11978     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11979 echo "configure:11980: checking for crypt in -lcrypt" >&5
11980 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11981 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11982   echo $ac_n "(cached) $ac_c" 1>&6
11983 else
11984   ac_save_LIBS="$LIBS"
11985 LIBS="-lcrypt  $LIBS"
11986 cat > conftest.$ac_ext <<EOF
11987 #line 11988 "configure"
11988 #include "confdefs.h"
11989 /* Override any gcc2 internal prototype to avoid an error.  */
11990 /* We use char because int might match the return type of a gcc2
11991     builtin and then its argument prototype would still apply.  */
11992 char crypt();
11993
11994 int main() {
11995 crypt()
11996 ; return 0; }
11997 EOF
11998 if { (eval echo configure:11999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11999   rm -rf conftest*
12000   eval "ac_cv_lib_$ac_lib_var=yes"
12001 else
12002   echo "configure: failed program was:" >&5
12003   cat conftest.$ac_ext >&5
12004   rm -rf conftest*
12005   eval "ac_cv_lib_$ac_lib_var=no"
12006 fi
12007 rm -f conftest*
12008 LIBS="$ac_save_LIBS"
12009
12010 fi
12011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12012   echo "$ac_t""yes" 1>&6
12013   LIBS="$LIBS -lcrypt";
12014         cat >> confdefs.h <<\EOF
12015 #define HAVE_CRYPT 1
12016 EOF
12017
12018 else
12019   echo "$ac_t""no" 1>&6
12020 fi
12021
12022 fi
12023 fi
12024
12025 ##
12026 ## moved after the check for -lcrypt in order to
12027 ## ensure that the necessary libraries are included
12028 ## check checking for truncated salt.  Wrapped by the
12029 ## $with_pam_for_crypt variable as above   --jerry
12030 ##
12031 if test $with_pam_for_crypt = no; then
12032 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12033 echo "configure:12034: checking for a crypt that needs truncated salt" >&5
12034 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12035   echo $ac_n "(cached) $ac_c" 1>&6
12036 else
12037   
12038 if test "$cross_compiling" = yes; then
12039   samba_cv_HAVE_TRUNCATED_SALT=cross
12040 else
12041   cat > conftest.$ac_ext <<EOF
12042 #line 12043 "configure"
12043 #include "confdefs.h"
12044 #include "${srcdir-.}/tests/crypttest.c"
12045 EOF
12046 if { (eval echo configure:12047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12047 then
12048   samba_cv_HAVE_TRUNCATED_SALT=no
12049 else
12050   echo "configure: failed program was:" >&5
12051   cat conftest.$ac_ext >&5
12052   rm -fr conftest*
12053   samba_cv_HAVE_TRUNCATED_SALT=yes
12054 fi
12055 rm -fr conftest*
12056 fi
12057
12058 fi
12059
12060 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12061 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12062         cat >> confdefs.h <<\EOF
12063 #define HAVE_TRUNCATED_SALT 1
12064 EOF
12065
12066 fi
12067 fi
12068
12069
12070
12071 ########################################################################################
12072 ##
12073 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12074 ##
12075 ########################################################################################
12076
12077 ## set the with_smbpasswd_sam as the default
12078 with_smbpasswd_sam=yes
12079
12080
12081 #################################################
12082 # check for a TDB password database
12083 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12084 echo "configure:12085: checking whether to use TDB SAM database" >&5
12085 # Check whether --with-tdbsam or --without-tdbsam was given.
12086 if test "${with_tdbsam+set}" = set; then
12087   withval="$with_tdbsam"
12088    case "$withval" in
12089   yes)
12090     echo "$ac_t""yes" 1>&6
12091     cat >> confdefs.h <<\EOF
12092 #define WITH_TDB_SAM 1
12093 EOF
12094
12095     with_smbpasswd_sam=no
12096     ;;
12097   *)
12098     echo "$ac_t""no" 1>&6
12099     ;;
12100   esac 
12101 else
12102   echo "$ac_t""no" 1>&6
12103
12104 fi
12105
12106
12107 #################################################
12108 # check for a LDAP password database
12109 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12110 echo "configure:12111: checking whether to use LDAP SAM database" >&5
12111 # Check whether --with-ldapsam or --without-ldapsam was given.
12112 if test "${with_ldapsam+set}" = set; then
12113   withval="$with_ldapsam"
12114    case "$withval" in
12115   yes)
12116     echo "$ac_t""yes" 1>&6
12117     cat >> confdefs.h <<\EOF
12118 #define WITH_LDAP_SAM 1
12119 EOF
12120
12121     LIBS="-lldap -llber $LIBS"
12122     with_smbpasswd_sam=no
12123     ;;
12124   *)
12125     echo "$ac_t""no" 1>&6
12126     ;;
12127   esac 
12128 else
12129   echo "$ac_t""no" 1>&6
12130
12131 fi
12132
12133
12134 #################################################
12135 # check for a NISPLUS password database
12136 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12137 echo "configure:12138: checking whether to use NISPLUS SAM database" >&5
12138 # Check whether --with-nisplussam or --without-nisplussam was given.
12139 if test "${with_nisplussam+set}" = set; then
12140   withval="$with_nisplussam"
12141    case "$withval" in
12142   yes)
12143     echo "$ac_t""yes" 1>&6
12144     cat >> confdefs.h <<\EOF
12145 #define WITH_NISPLUS_SAM 1
12146 EOF
12147
12148     with_smbpasswd_sam=no
12149     ;;
12150   *)
12151     echo "$ac_t""no" 1>&6
12152     ;;
12153   esac 
12154 else
12155   echo "$ac_t""no" 1>&6
12156
12157 fi
12158
12159
12160 ################################################
12161 # This test should come last because the
12162 # smbpasswd SAM is only used if another format
12163 # has not been defined
12164 echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6
12165 echo "configure:12166: checking whether to use traditional smbpasswd file" >&5
12166 if test $with_smbpasswd_sam = yes; then
12167         echo "$ac_t""yes" 1>&6
12168         cat >> confdefs.h <<\EOF
12169 #define WITH_SMBPASSWD_SAM 1
12170 EOF
12171
12172 else
12173         echo "$ac_t""no" 1>&6
12174 fi
12175
12176 ########################################################################################
12177 ##
12178 ## END OF TESTS FOR SAM BACKENDS.  
12179 ##
12180 ########################################################################################
12181
12182 #################################################
12183 # check for a NISPLUS_HOME support 
12184 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12185 echo "configure:12186: checking whether to use NISPLUS_HOME" >&5
12186 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12187 if test "${with_nisplus_home+set}" = set; then
12188   withval="$with_nisplus_home"
12189    case "$withval" in
12190   yes)
12191     echo "$ac_t""yes" 1>&6
12192     cat >> confdefs.h <<\EOF
12193 #define WITH_NISPLUS_HOME 1
12194 EOF
12195
12196     ;;
12197   *)
12198     echo "$ac_t""no" 1>&6
12199     ;;
12200   esac 
12201 else
12202   echo "$ac_t""no" 1>&6
12203
12204 fi
12205
12206
12207 #################################################
12208 # check for the secure socket layer
12209 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12210 echo "configure:12211: checking whether to use SSL" >&5
12211 # Check whether --with-ssl or --without-ssl was given.
12212 if test "${with_ssl+set}" = set; then
12213   withval="$with_ssl"
12214    case "$withval" in
12215   yes)
12216     echo "$ac_t""yes" 1>&6
12217     cat >> confdefs.h <<\EOF
12218 #define WITH_SSL 1
12219 EOF
12220
12221     withval="/usr/local/ssl"     # default
12222
12223     if test "${with_sslinc+set}" = set; then
12224
12225         withval="$with_sslinc"
12226         case "$withval" in
12227         yes|no)
12228           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12229           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12230         ;;
12231         * )
12232           CFLAGS="-I${withval} $CFLAGS"
12233         ;;
12234         esac
12235
12236     else
12237
12238         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12239
12240     fi
12241
12242     if test "${with_ssllib+set}" = set; then
12243
12244         withval="$with_ssllib"
12245         case "$withval" in
12246         yes|no)
12247           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12248           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12249         ;;
12250         * )
12251           LDFLAGS="-L${withval}/lib $LDFLAGS"
12252         ;;
12253         esac
12254
12255     else
12256
12257         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12258
12259     fi
12260
12261     LIBS="-lssl -lcrypto $LIBS"
12262
12263 #    if test ! -d ${withval}; then
12264 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12265 #      exit 1
12266 #    fi 
12267
12268     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12269
12270     ;;
12271   *)
12272     echo "$ac_t""no" 1>&6
12273     ;;
12274   esac 
12275 else
12276   echo "$ac_t""no" 1>&6
12277
12278 fi
12279
12280
12281 #################################################
12282 # check for syslog logging
12283 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12284 echo "configure:12285: checking whether to use syslog logging" >&5
12285 # Check whether --with-syslog or --without-syslog was given.
12286 if test "${with_syslog+set}" = set; then
12287   withval="$with_syslog"
12288    case "$withval" in
12289   yes)
12290     echo "$ac_t""yes" 1>&6
12291     cat >> confdefs.h <<\EOF
12292 #define WITH_SYSLOG 1
12293 EOF
12294
12295     ;;
12296   *)
12297     echo "$ac_t""no" 1>&6
12298     ;;
12299   esac 
12300 else
12301   echo "$ac_t""no" 1>&6
12302
12303 fi
12304
12305
12306 #################################################
12307 # check for a shared memory profiling support
12308 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12309 echo "configure:12310: checking whether to use profiling" >&5
12310 # Check whether --with-profiling-data or --without-profiling-data was given.
12311 if test "${with_profiling_data+set}" = set; then
12312   withval="$with_profiling_data"
12313    case "$withval" in
12314   yes)
12315     echo "$ac_t""yes" 1>&6
12316     cat >> confdefs.h <<\EOF
12317 #define WITH_PROFILE 1
12318 EOF
12319
12320     ;;
12321   *)
12322     echo "$ac_t""no" 1>&6
12323     ;;
12324   esac 
12325 else
12326   echo "$ac_t""no" 1>&6
12327
12328 fi
12329
12330
12331
12332 #################################################
12333 # check for experimental disk-quotas support
12334 QUOTAOBJS=smbd/noquotas.o
12335
12336 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12337 echo "configure:12338: checking whether to support disk-quotas" >&5
12338 # Check whether --with-quotas or --without-quotas was given.
12339 if test "${with_quotas+set}" = set; then
12340   withval="$with_quotas"
12341    case "$withval" in
12342   yes)
12343     echo "$ac_t""yes" 1>&6
12344     case "$host_os" in
12345       *linux*)
12346         # Check for kernel 2.4.x quota braindamage...
12347         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12348 echo "configure:12349: checking for linux 2.4.x quota braindamage.." >&5
12349 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12350   echo $ac_n "(cached) $ac_c" 1>&6
12351 else
12352   
12353         cat > conftest.$ac_ext <<EOF
12354 #line 12355 "configure"
12355 #include "confdefs.h"
12356 #include <stdio.h>
12357 #include <sys/types.h>
12358 #include <asm/types.h>
12359 #include <linux/quota.h>
12360 #include <mntent.h>
12361 #include <linux/unistd.h>
12362 int main() {
12363 struct mem_dqblk D;
12364 ; return 0; }
12365 EOF
12366 if { (eval echo configure:12367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12367   rm -rf conftest*
12368   samba_cv_linux_2_4_quota_braindamage=yes
12369 else
12370   echo "configure: failed program was:" >&5
12371   cat conftest.$ac_ext >&5
12372   rm -rf conftest*
12373   samba_cv_linux_2_4_quota_braindamage=no
12374 fi
12375 rm -f conftest*
12376 fi
12377
12378 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12379 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12380         cat >> confdefs.h <<\EOF
12381 #define LINUX_QUOTAS_2 1
12382 EOF
12383
12384 else
12385         cat >> confdefs.h <<\EOF
12386 #define LINUX_QUOTAS_1 1
12387 EOF
12388
12389 fi
12390         ;;
12391       *)
12392         ;;
12393     esac
12394     QUOTAOBJS=smbd/quotas.o
12395     cat >> confdefs.h <<\EOF
12396 #define WITH_QUOTAS 1
12397 EOF
12398
12399     ;;
12400   *)
12401     echo "$ac_t""no" 1>&6
12402     ;;
12403   esac 
12404 else
12405   echo "$ac_t""no" 1>&6
12406
12407 fi
12408
12409
12410
12411 #################################################
12412 # check for experimental utmp accounting
12413
12414 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12415 echo "configure:12416: checking whether to support utmp accounting" >&5
12416 # Check whether --with-utmp or --without-utmp was given.
12417 if test "${with_utmp+set}" = set; then
12418   withval="$with_utmp"
12419    case "$withval" in
12420   yes)
12421     echo "$ac_t""yes" 1>&6
12422     cat >> confdefs.h <<\EOF
12423 #define WITH_UTMP 1
12424 EOF
12425
12426     ;;
12427   *)
12428     echo "$ac_t""no" 1>&6
12429     ;;
12430   esac 
12431 else
12432   echo "$ac_t""no" 1>&6
12433
12434 fi
12435
12436
12437 #################################################
12438 # set private directory location
12439 # Check whether --with-privatedir or --without-privatedir was given.
12440 if test "${with_privatedir+set}" = set; then
12441   withval="$with_privatedir"
12442    case "$withval" in
12443   yes|no)
12444   #
12445   # Just in case anybody calls it without argument
12446   #
12447     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12448     privatedir='${prefix}/private'
12449   ;;
12450   * )
12451     privatedir="$withval"
12452     ;;
12453   esac
12454   
12455 else
12456   privatedir='${prefix}/private'
12457    
12458
12459 fi
12460
12461
12462 #################################################
12463 # set lock directory location
12464 # Check whether --with-lockdir or --without-lockdir was given.
12465 if test "${with_lockdir+set}" = set; then
12466   withval="$with_lockdir"
12467    case "$withval" in
12468   yes|no)
12469   #
12470   # Just in case anybody calls it without argument
12471   #
12472     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12473     lockdir='$(VARDIR)/locks'
12474   ;;
12475   * )
12476     lockdir="$withval"
12477     ;;
12478   esac
12479   
12480 else
12481   lockdir='$(VARDIR)/locks'
12482    
12483
12484 fi
12485
12486
12487 #################################################
12488 # set SWAT directory location
12489 # Check whether --with-swatdir or --without-swatdir was given.
12490 if test "${with_swatdir+set}" = set; then
12491   withval="$with_swatdir"
12492    case "$withval" in
12493   yes|no)
12494   #
12495   # Just in case anybody does it
12496   #
12497     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12498     swatdir='${prefix}/swat'
12499   ;;
12500   * )
12501     swatdir="$withval"
12502     ;;
12503   esac
12504   
12505 else
12506   swatdir='${prefix}/swat'
12507    
12508
12509 fi
12510
12511
12512 #################################################
12513 # choose native language(s) of man pages
12514 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12515 echo "configure:12516: checking chosen man pages' language(s)" >&5
12516 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12517 if test "${with_manpages_langs+set}" = set; then
12518   withval="$with_manpages_langs"
12519    case "$withval" in
12520   yes|no)
12521     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12522     manlangs="en"
12523   ;;
12524   *)
12525     manlangs="$withval"
12526   ;;
12527   esac
12528
12529   echo "$ac_t""$manlangs" 1>&6
12530   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12531   
12532 else
12533   manlangs="en"
12534   echo "$ac_t""$manlangs" 1>&6
12535   
12536
12537 fi
12538
12539
12540 #################################################
12541 # these tests are taken from the GNU fileutils package
12542 echo "checking how to get filesystem space usage" 1>&6
12543 echo "configure:12544: checking how to get filesystem space usage" >&5
12544 space=no
12545
12546 # Test for statvfs64.
12547 if test $space = no; then
12548   # SVR4
12549   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12550 echo "configure:12551: checking statvfs64 function (SVR4)" >&5
12551 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12552   echo $ac_n "(cached) $ac_c" 1>&6
12553 else
12554   if test "$cross_compiling" = yes; then
12555   fu_cv_sys_stat_statvfs64=cross
12556 else
12557   cat > conftest.$ac_ext <<EOF
12558 #line 12559 "configure"
12559 #include "confdefs.h"
12560
12561 #if defined(HAVE_UNISTD_H)
12562 #include <unistd.h>
12563 #endif
12564 #include <sys/types.h>
12565 #include <sys/statvfs.h>
12566   main ()
12567   {
12568     struct statvfs64 fsd;
12569     exit (statvfs64 (".", &fsd));
12570   }
12571 EOF
12572 if { (eval echo configure:12573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12573 then
12574   fu_cv_sys_stat_statvfs64=yes
12575 else
12576   echo "configure: failed program was:" >&5
12577   cat conftest.$ac_ext >&5
12578   rm -fr conftest*
12579   fu_cv_sys_stat_statvfs64=no
12580 fi
12581 rm -fr conftest*
12582 fi
12583
12584 fi
12585
12586 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12587   if test $fu_cv_sys_stat_statvfs64 = yes; then
12588     space=yes
12589     cat >> confdefs.h <<\EOF
12590 #define STAT_STATVFS64 1
12591 EOF
12592
12593   fi
12594 fi
12595
12596 # Perform only the link test since it seems there are no variants of the
12597 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12598 # because that got a false positive on SCO OSR5.  Adding the declaration
12599 # of a `struct statvfs' causes this test to fail (as it should) on such
12600 # systems.  That system is reported to work fine with STAT_STATFS4 which
12601 # is what it gets when this test fails.
12602 if test $space = no; then
12603   # SVR4
12604   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12605 echo "configure:12606: checking statvfs function (SVR4)" >&5
12606 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12607   echo $ac_n "(cached) $ac_c" 1>&6
12608 else
12609   cat > conftest.$ac_ext <<EOF
12610 #line 12611 "configure"
12611 #include "confdefs.h"
12612 #include <sys/types.h>
12613 #include <sys/statvfs.h>
12614 int main() {
12615 struct statvfs fsd; statvfs (0, &fsd);
12616 ; return 0; }
12617 EOF
12618 if { (eval echo configure:12619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12619   rm -rf conftest*
12620   fu_cv_sys_stat_statvfs=yes
12621 else
12622   echo "configure: failed program was:" >&5
12623   cat conftest.$ac_ext >&5
12624   rm -rf conftest*
12625   fu_cv_sys_stat_statvfs=no
12626 fi
12627 rm -f conftest*
12628 fi
12629
12630 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12631   if test $fu_cv_sys_stat_statvfs = yes; then
12632     space=yes
12633     cat >> confdefs.h <<\EOF
12634 #define STAT_STATVFS 1
12635 EOF
12636
12637   fi
12638 fi
12639
12640 if test $space = no; then
12641   # DEC Alpha running OSF/1
12642   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12643 echo "configure:12644: checking for 3-argument statfs function (DEC OSF/1)" >&5
12644   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12645   echo $ac_n "(cached) $ac_c" 1>&6
12646 else
12647   if test "$cross_compiling" = yes; then
12648   fu_cv_sys_stat_statfs3_osf1=no
12649 else
12650   cat > conftest.$ac_ext <<EOF
12651 #line 12652 "configure"
12652 #include "confdefs.h"
12653
12654 #include <sys/param.h>
12655 #include <sys/types.h>
12656 #include <sys/mount.h>
12657   main ()
12658   {
12659     struct statfs fsd;
12660     fsd.f_fsize = 0;
12661     exit (statfs (".", &fsd, sizeof (struct statfs)));
12662   }
12663 EOF
12664 if { (eval echo configure:12665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12665 then
12666   fu_cv_sys_stat_statfs3_osf1=yes
12667 else
12668   echo "configure: failed program was:" >&5
12669   cat conftest.$ac_ext >&5
12670   rm -fr conftest*
12671   fu_cv_sys_stat_statfs3_osf1=no
12672 fi
12673 rm -fr conftest*
12674 fi
12675
12676 fi
12677
12678   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12679   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12680     space=yes
12681     cat >> confdefs.h <<\EOF
12682 #define STAT_STATFS3_OSF1 1
12683 EOF
12684
12685   fi
12686 fi
12687
12688 if test $space = no; then
12689 # AIX
12690   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12691 echo "configure:12692: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12692   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12693   echo $ac_n "(cached) $ac_c" 1>&6
12694 else
12695   if test "$cross_compiling" = yes; then
12696   fu_cv_sys_stat_statfs2_bsize=no
12697 else
12698   cat > conftest.$ac_ext <<EOF
12699 #line 12700 "configure"
12700 #include "confdefs.h"
12701
12702 #ifdef HAVE_SYS_PARAM_H
12703 #include <sys/param.h>
12704 #endif
12705 #ifdef HAVE_SYS_MOUNT_H
12706 #include <sys/mount.h>
12707 #endif
12708 #ifdef HAVE_SYS_VFS_H
12709 #include <sys/vfs.h>
12710 #endif
12711   main ()
12712   {
12713   struct statfs fsd;
12714   fsd.f_bsize = 0;
12715   exit (statfs (".", &fsd));
12716   }
12717 EOF
12718 if { (eval echo configure:12719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12719 then
12720   fu_cv_sys_stat_statfs2_bsize=yes
12721 else
12722   echo "configure: failed program was:" >&5
12723   cat conftest.$ac_ext >&5
12724   rm -fr conftest*
12725   fu_cv_sys_stat_statfs2_bsize=no
12726 fi
12727 rm -fr conftest*
12728 fi
12729
12730 fi
12731
12732   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12733   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12734     space=yes
12735     cat >> confdefs.h <<\EOF
12736 #define STAT_STATFS2_BSIZE 1
12737 EOF
12738
12739   fi
12740 fi
12741
12742 if test $space = no; then
12743 # SVR3
12744   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12745 echo "configure:12746: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12746   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12747   echo $ac_n "(cached) $ac_c" 1>&6
12748 else
12749   if test "$cross_compiling" = yes; then
12750   fu_cv_sys_stat_statfs4=no
12751 else
12752   cat > conftest.$ac_ext <<EOF
12753 #line 12754 "configure"
12754 #include "confdefs.h"
12755 #include <sys/types.h>
12756 #include <sys/statfs.h>
12757   main ()
12758   {
12759   struct statfs fsd;
12760   exit (statfs (".", &fsd, sizeof fsd, 0));
12761   }
12762 EOF
12763 if { (eval echo configure:12764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12764 then
12765   fu_cv_sys_stat_statfs4=yes
12766 else
12767   echo "configure: failed program was:" >&5
12768   cat conftest.$ac_ext >&5
12769   rm -fr conftest*
12770   fu_cv_sys_stat_statfs4=no
12771 fi
12772 rm -fr conftest*
12773 fi
12774
12775 fi
12776
12777   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12778   if test $fu_cv_sys_stat_statfs4 = yes; then
12779     space=yes
12780     cat >> confdefs.h <<\EOF
12781 #define STAT_STATFS4 1
12782 EOF
12783
12784   fi
12785 fi
12786
12787 if test $space = no; then
12788 # 4.4BSD and NetBSD
12789   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12790 echo "configure:12791: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12791   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12792   echo $ac_n "(cached) $ac_c" 1>&6
12793 else
12794   if test "$cross_compiling" = yes; then
12795   fu_cv_sys_stat_statfs2_fsize=no
12796 else
12797   cat > conftest.$ac_ext <<EOF
12798 #line 12799 "configure"
12799 #include "confdefs.h"
12800 #include <sys/types.h>
12801 #ifdef HAVE_SYS_PARAM_H
12802 #include <sys/param.h>
12803 #endif
12804 #ifdef HAVE_SYS_MOUNT_H
12805 #include <sys/mount.h>
12806 #endif
12807   main ()
12808   {
12809   struct statfs fsd;
12810   fsd.f_fsize = 0;
12811   exit (statfs (".", &fsd));
12812   }
12813 EOF
12814 if { (eval echo configure:12815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12815 then
12816   fu_cv_sys_stat_statfs2_fsize=yes
12817 else
12818   echo "configure: failed program was:" >&5
12819   cat conftest.$ac_ext >&5
12820   rm -fr conftest*
12821   fu_cv_sys_stat_statfs2_fsize=no
12822 fi
12823 rm -fr conftest*
12824 fi
12825
12826 fi
12827
12828   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12829   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12830     space=yes
12831     cat >> confdefs.h <<\EOF
12832 #define STAT_STATFS2_FSIZE 1
12833 EOF
12834
12835   fi
12836 fi
12837
12838 if test $space = no; then
12839   # Ultrix
12840   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12841 echo "configure:12842: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12842   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12843   echo $ac_n "(cached) $ac_c" 1>&6
12844 else
12845   if test "$cross_compiling" = yes; then
12846   fu_cv_sys_stat_fs_data=no
12847 else
12848   cat > conftest.$ac_ext <<EOF
12849 #line 12850 "configure"
12850 #include "confdefs.h"
12851 #include <sys/types.h>
12852 #ifdef HAVE_SYS_PARAM_H
12853 #include <sys/param.h>
12854 #endif
12855 #ifdef HAVE_SYS_MOUNT_H
12856 #include <sys/mount.h>
12857 #endif
12858 #ifdef HAVE_SYS_FS_TYPES_H
12859 #include <sys/fs_types.h>
12860 #endif
12861   main ()
12862   {
12863   struct fs_data fsd;
12864   /* Ultrix's statfs returns 1 for success,
12865      0 for not mounted, -1 for failure.  */
12866   exit (statfs (".", &fsd) != 1);
12867   }
12868 EOF
12869 if { (eval echo configure:12870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12870 then
12871   fu_cv_sys_stat_fs_data=yes
12872 else
12873   echo "configure: failed program was:" >&5
12874   cat conftest.$ac_ext >&5
12875   rm -fr conftest*
12876   fu_cv_sys_stat_fs_data=no
12877 fi
12878 rm -fr conftest*
12879 fi
12880
12881 fi
12882
12883   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12884   if test $fu_cv_sys_stat_fs_data = yes; then
12885     space=yes
12886     cat >> confdefs.h <<\EOF
12887 #define STAT_STATFS2_FS_DATA 1
12888 EOF
12889
12890   fi
12891 fi
12892
12893 #
12894 # As a gating factor for large file support, in order to
12895 # use <4GB files we must have the following minimal support
12896 # available.
12897 # long long, and a 64 bit off_t or off64_t.
12898 # If we don't have all of these then disable large
12899 # file support.
12900 #
12901 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12902 echo "configure:12903: checking if large file support can be enabled" >&5
12903 cat > conftest.$ac_ext <<EOF
12904 #line 12905 "configure"
12905 #include "confdefs.h"
12906
12907 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12908 #include <sys/types.h>
12909 #else
12910 __COMPILE_ERROR_
12911 #endif
12912
12913 int main() {
12914 int i
12915 ; return 0; }
12916 EOF
12917 if { (eval echo configure:12918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12918   rm -rf conftest*
12919   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12920 else
12921   echo "configure: failed program was:" >&5
12922   cat conftest.$ac_ext >&5
12923   rm -rf conftest*
12924   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12925 fi
12926 rm -f conftest*
12927 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12928     cat >> confdefs.h <<\EOF
12929 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12930 EOF
12931
12932 fi
12933 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12934
12935 # Check whether --with-spinlocks or --without-spinlocks was given.
12936 if test "${with_spinlocks+set}" = set; then
12937   withval="$with_spinlocks"
12938   :
12939 fi
12940
12941 if test "x$with_spinlocks" = "xyes"; then
12942     cat >> confdefs.h <<\EOF
12943 #define USE_SPINLOCKS 1
12944 EOF
12945
12946
12947     case "$host_cpu" in
12948         sparc)
12949             cat >> confdefs.h <<\EOF
12950 #define SPARC_SPINLOCKS 1
12951 EOF
12952
12953             ;;
12954
12955         i386|i486|i586|i686)
12956             cat >> confdefs.h <<\EOF
12957 #define INTEL_SPINLOCKS 1
12958 EOF
12959
12960             ;;
12961
12962         mips)
12963             cat >> confdefs.h <<\EOF
12964 #define MIPS_SPINLOCKS 1
12965 EOF
12966
12967             ;;
12968
12969         powerpc)
12970             cat >> confdefs.h <<\EOF
12971 #define POWERPC_SPINLOCKS 1
12972 EOF
12973
12974             ;;
12975     esac
12976 fi
12977
12978 #################################################
12979 # check for ACL support
12980
12981 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12982 echo "configure:12983: checking whether to support ACLs" >&5
12983 # Check whether --with-acl-support or --without-acl-support was given.
12984 if test "${with_acl_support+set}" = set; then
12985   withval="$with_acl_support"
12986    case "$withval" in
12987   yes)
12988
12989         case "$host_os" in
12990         *sysv5*)
12991                 echo "$ac_t""Using UnixWare ACLs" 1>&6
12992                 cat >> confdefs.h <<\EOF
12993 #define HAVE_UNIXWARE_ACLS 1
12994 EOF
12995
12996                 ;;
12997         *solaris*)
12998                 echo "$ac_t""Using solaris ACLs" 1>&6
12999                 cat >> confdefs.h <<\EOF
13000 #define HAVE_SOLARIS_ACLS 1
13001 EOF
13002
13003                 ;;
13004         *hpux*)
13005                 echo "$ac_t""Using HPUX ACLs" 1>&6
13006                 cat >> confdefs.h <<\EOF
13007 #define HAVE_HPUX_ACLS 1
13008 EOF
13009
13010                 ;;
13011         *irix*)
13012                 echo "$ac_t""Using IRIX ACLs" 1>&6
13013                 cat >> confdefs.h <<\EOF
13014 #define HAVE_IRIX_ACLS 1
13015 EOF
13016
13017                 ;;
13018         *aix*)
13019                 echo "$ac_t""Using AIX ACLs" 1>&6
13020                 cat >> confdefs.h <<\EOF
13021 #define HAVE_AIX_ACLS 1
13022 EOF
13023
13024                 ;;
13025         *osf*)
13026                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13027                 cat >> confdefs.h <<\EOF
13028 #define HAVE_TRU64_ACLS 1
13029 EOF
13030
13031                 LIBS="$LIBS -lpacl"
13032                 ;;
13033         *)
13034                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13035 echo "configure:13036: checking for acl_get_file in -lacl" >&5
13036 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13037 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13038   echo $ac_n "(cached) $ac_c" 1>&6
13039 else
13040   ac_save_LIBS="$LIBS"
13041 LIBS="-lacl  $LIBS"
13042 cat > conftest.$ac_ext <<EOF
13043 #line 13044 "configure"
13044 #include "confdefs.h"
13045 /* Override any gcc2 internal prototype to avoid an error.  */
13046 /* We use char because int might match the return type of a gcc2
13047     builtin and then its argument prototype would still apply.  */
13048 char acl_get_file();
13049
13050 int main() {
13051 acl_get_file()
13052 ; return 0; }
13053 EOF
13054 if { (eval echo configure:13055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13055   rm -rf conftest*
13056   eval "ac_cv_lib_$ac_lib_var=yes"
13057 else
13058   echo "configure: failed program was:" >&5
13059   cat conftest.$ac_ext >&5
13060   rm -rf conftest*
13061   eval "ac_cv_lib_$ac_lib_var=no"
13062 fi
13063 rm -f conftest*
13064 LIBS="$ac_save_LIBS"
13065
13066 fi
13067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13068   echo "$ac_t""yes" 1>&6
13069     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13071   cat >> confdefs.h <<EOF
13072 #define $ac_tr_lib 1
13073 EOF
13074
13075   LIBS="-lacl $LIBS"
13076
13077 else
13078   echo "$ac_t""no" 1>&6
13079 fi
13080
13081                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13082 echo "configure:13083: checking for ACL support" >&5
13083 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13084   echo $ac_n "(cached) $ac_c" 1>&6
13085 else
13086   
13087                 cat > conftest.$ac_ext <<EOF
13088 #line 13089 "configure"
13089 #include "confdefs.h"
13090 #include <sys/types.h>
13091 #include <sys/acl.h>
13092 int main() {
13093  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13094 ; return 0; }
13095 EOF
13096 if { (eval echo configure:13097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13097   rm -rf conftest*
13098   samba_cv_HAVE_POSIX_ACLS=yes
13099 else
13100   echo "configure: failed program was:" >&5
13101   cat conftest.$ac_ext >&5
13102   rm -rf conftest*
13103   samba_cv_HAVE_POSIX_ACLS=no
13104 fi
13105 rm -f conftest*
13106 fi
13107
13108 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13109                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13110                                 echo "$ac_t""Using posix ACLs" 1>&6
13111                                 cat >> confdefs.h <<\EOF
13112 #define HAVE_POSIX_ACLS 1
13113 EOF
13114
13115                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13116 echo "configure:13117: checking for acl_get_perm_np" >&5
13117 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13118   echo $ac_n "(cached) $ac_c" 1>&6
13119 else
13120   
13121                                 cat > conftest.$ac_ext <<EOF
13122 #line 13123 "configure"
13123 #include "confdefs.h"
13124 #include <sys/types.h>
13125 #include <sys/acl.h>
13126 int main() {
13127  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13128 ; return 0; }
13129 EOF
13130 if { (eval echo configure:13131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13131   rm -rf conftest*
13132   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13133 else
13134   echo "configure: failed program was:" >&5
13135   cat conftest.$ac_ext >&5
13136   rm -rf conftest*
13137   samba_cv_HAVE_ACL_GET_PERM_NP=no
13138 fi
13139 rm -f conftest*
13140 fi
13141
13142 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13143                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13144                                         cat >> confdefs.h <<\EOF
13145 #define HAVE_ACL_GET_PERM_NP 1
13146 EOF
13147
13148                                 fi
13149                         fi
13150             ;;
13151         esac
13152         ;;
13153   *)
13154     echo "$ac_t""no" 1>&6
13155     cat >> confdefs.h <<\EOF
13156 #define HAVE_NO_ACLS 1
13157 EOF
13158
13159     ;;
13160   esac 
13161 else
13162   cat >> confdefs.h <<\EOF
13163 #define HAVE_NO_ACLS 1
13164 EOF
13165
13166   echo "$ac_t""no" 1>&6
13167
13168 fi
13169
13170
13171 #################################################
13172 # Check whether winbind is supported on this platform.  If so we need to
13173 # build and install client programs (WINBIND_TARGETS), sbin programs
13174 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13175
13176 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13177 echo "configure:13178: checking whether to build winbind" >&5
13178
13179 # Initially, the value of $host_os decides whether winbind is supported
13180
13181 case "$host_os" in 
13182         *linux*|*solaris*)
13183                 HAVE_WINBIND=yes
13184                 ;;
13185         *)
13186                 HAVE_WINBIND=no
13187                 winbind_no_reason=", unsupported on $host_os"
13188                 ;;
13189 esac
13190
13191 # Check the setting of --with-winbindd
13192
13193 # Check whether --with-winbind or --without-winbind was given.
13194 if test "${with_winbind+set}" = set; then
13195   withval="$with_winbind"
13196    
13197   case "$withval" in
13198         yes)
13199                 HAVE_WINBIND=yes
13200                 ;;
13201         no)
13202                 HAVE_WINBIND=no
13203                 winbind_reason=""
13204                 ;;
13205   esac 
13206 fi
13207
13208
13209 # We need unix domain sockets for winbind
13210
13211 if test x"$HAVE_WINBIND" = x"yes"; then
13212         if test x"$samba_cv_unixsocket" = x"no"; then
13213                 winbind_no_reason=", no unix domain socket support on $host_os"
13214                 HAVE_WINBIND=no
13215         fi
13216 fi
13217
13218 # Display test results
13219
13220 if test x"$HAVE_WINBIND" = x"yes"; then
13221
13222         echo "$ac_t""yes" 1>&6
13223
13224         WINBIND_TARGETS="bin/wbinfo"
13225         WINBIND_STARGETS="bin/winbindd"
13226         WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13227         case "$with_pam" in
13228                 yes)
13229                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13230                 ;;
13231         esac
13232 else
13233         echo "$ac_t""no$winbind_no_reason" 1>&6
13234
13235         WINBIND_TARGETS=""
13236         WINBIND_STARGETS=""
13237         WINBIND_LTARGETS=""
13238         WINBIND_PAM_PROGS=""
13239 fi
13240
13241 # Substitution time!
13242
13243
13244
13245
13246
13247
13248 #################################################
13249 # Check to see if we should use the included popt 
13250
13251 # Check whether --with-included-popt or --without-included-popt was given.
13252 if test "${with_included_popt+set}" = set; then
13253   withval="$with_included_popt"
13254    
13255   case "$withval" in
13256         yes)
13257                 INCLUDED_POPT=yes
13258                 ;;
13259         no)
13260                 INCLUDED_POPT=no
13261                 ;;
13262   esac 
13263 fi
13264
13265 if test x"$INCLUDED_POPT" != x"yes"; then
13266     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13267 echo "configure:13268: checking for poptGetContext in -lpopt" >&5
13268 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13269 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13270   echo $ac_n "(cached) $ac_c" 1>&6
13271 else
13272   ac_save_LIBS="$LIBS"
13273 LIBS="-lpopt  $LIBS"
13274 cat > conftest.$ac_ext <<EOF
13275 #line 13276 "configure"
13276 #include "confdefs.h"
13277 /* Override any gcc2 internal prototype to avoid an error.  */
13278 /* We use char because int might match the return type of a gcc2
13279     builtin and then its argument prototype would still apply.  */
13280 char poptGetContext();
13281
13282 int main() {
13283 poptGetContext()
13284 ; return 0; }
13285 EOF
13286 if { (eval echo configure:13287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13287   rm -rf conftest*
13288   eval "ac_cv_lib_$ac_lib_var=yes"
13289 else
13290   echo "configure: failed program was:" >&5
13291   cat conftest.$ac_ext >&5
13292   rm -rf conftest*
13293   eval "ac_cv_lib_$ac_lib_var=no"
13294 fi
13295 rm -f conftest*
13296 LIBS="$ac_save_LIBS"
13297
13298 fi
13299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13300   echo "$ac_t""yes" 1>&6
13301   INCLUDED_POPT=no
13302 else
13303   echo "$ac_t""no" 1>&6
13304 INCLUDED_POPT=yes
13305 fi
13306
13307 fi
13308
13309 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13310 echo "configure:13311: checking whether to use included popt" >&5
13311 if test x"$INCLUDED_POPT" = x"yes"; then
13312     echo "$ac_t""$srcdir/popt" 1>&6
13313     BUILD_POPT='$(POPT_OBJS)'
13314     FLAGS1="-I$srcdir/popt"
13315 else
13316     echo "$ac_t""no" 1>&6
13317     LIBS="$LIBS -lpopt"
13318 fi
13319
13320
13321
13322 #################################################
13323 # final configure stuff
13324
13325 echo "checking configure summary"
13326 if test "$cross_compiling" = yes; then
13327   :
13328 else
13329   cat > conftest.$ac_ext <<EOF
13330 #line 13331 "configure"
13331 #include "confdefs.h"
13332 #include "${srcdir-.}/tests/summary.c"
13333 EOF
13334 if { (eval echo configure:13335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13335 then
13336   echo "configure OK";
13337 else
13338   echo "configure: failed program was:" >&5
13339   cat conftest.$ac_ext >&5
13340   rm -fr conftest*
13341   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
13342 fi
13343 rm -fr conftest*
13344 fi
13345
13346
13347 builddir=`pwd`
13348
13349
13350 trap '' 1 2 15
13351 cat > confcache <<\EOF
13352 # This file is a shell script that caches the results of configure
13353 # tests run on this system so they can be shared between configure
13354 # scripts and configure runs.  It is not useful on other systems.
13355 # If it contains results you don't want to keep, you may remove or edit it.
13356 #
13357 # By default, configure uses ./config.cache as the cache file,
13358 # creating it if it does not exist already.  You can give configure
13359 # the --cache-file=FILE option to use a different cache file; that is
13360 # what configure does when it calls configure scripts in
13361 # subdirectories, so they share the cache.
13362 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13363 # config.status only pays attention to the cache file if you give it the
13364 # --recheck option to rerun configure.
13365 #
13366 EOF
13367 # The following way of writing the cache mishandles newlines in values,
13368 # but we know of no workaround that is simple, portable, and efficient.
13369 # So, don't put newlines in cache variables' values.
13370 # Ultrix sh set writes to stderr and can't be redirected directly,
13371 # and sets the high bit in the cache file unless we assign to the vars.
13372 (set) 2>&1 |
13373   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13374   *ac_space=\ *)
13375     # `set' does not quote correctly, so add quotes (double-quote substitution
13376     # turns \\\\ into \\, and sed turns \\ into \).
13377     sed -n \
13378       -e "s/'/'\\\\''/g" \
13379       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13380     ;;
13381   *)
13382     # `set' quotes correctly as required by POSIX, so do not add quotes.
13383     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13384     ;;
13385   esac >> confcache
13386 if cmp -s $cache_file confcache; then
13387   :
13388 else
13389   if test -w $cache_file; then
13390     echo "updating cache $cache_file"
13391     cat confcache > $cache_file
13392   else
13393     echo "not updating unwritable cache $cache_file"
13394   fi
13395 fi
13396 rm -f confcache
13397
13398 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13399
13400 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13401 # Let make expand exec_prefix.
13402 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13403
13404 # Any assignment to VPATH causes Sun make to only execute
13405 # the first set of double-colon rules, so remove it if not needed.
13406 # If there is a colon in the path, we need to keep it.
13407 if test "x$srcdir" = x.; then
13408   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13409 fi
13410
13411 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13412
13413 DEFS=-DHAVE_CONFIG_H
13414
13415 # Without the "./", some shells look in PATH for config.status.
13416 : ${CONFIG_STATUS=./config.status}
13417
13418 echo creating $CONFIG_STATUS
13419 rm -f $CONFIG_STATUS
13420 cat > $CONFIG_STATUS <<EOF
13421 #! /bin/sh
13422 # Generated automatically by configure.
13423 # Run this file to recreate the current configuration.
13424 # This directory was configured as follows,
13425 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13426 #
13427 # $0 $ac_configure_args
13428 #
13429 # Compiler output produced by configure, useful for debugging
13430 # configure, is in ./config.log if it exists.
13431
13432 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13433 for ac_option
13434 do
13435   case "\$ac_option" in
13436   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13437     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13438     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13439   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13440     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13441     exit 0 ;;
13442   -help | --help | --hel | --he | --h)
13443     echo "\$ac_cs_usage"; exit 0 ;;
13444   *) echo "\$ac_cs_usage"; exit 1 ;;
13445   esac
13446 done
13447
13448 ac_given_srcdir=$srcdir
13449 ac_given_INSTALL="$INSTALL"
13450
13451 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13452 EOF
13453 cat >> $CONFIG_STATUS <<EOF
13454
13455 # Protect against being on the right side of a sed subst in config.status.
13456 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13457  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13458 $ac_vpsub
13459 $extrasub
13460 s%@SHELL@%$SHELL%g
13461 s%@CFLAGS@%$CFLAGS%g
13462 s%@CPPFLAGS@%$CPPFLAGS%g
13463 s%@CXXFLAGS@%$CXXFLAGS%g
13464 s%@FFLAGS@%$FFLAGS%g
13465 s%@DEFS@%$DEFS%g
13466 s%@LDFLAGS@%$LDFLAGS%g
13467 s%@LIBS@%$LIBS%g
13468 s%@exec_prefix@%$exec_prefix%g
13469 s%@prefix@%$prefix%g
13470 s%@program_transform_name@%$program_transform_name%g
13471 s%@bindir@%$bindir%g
13472 s%@sbindir@%$sbindir%g
13473 s%@libexecdir@%$libexecdir%g
13474 s%@datadir@%$datadir%g
13475 s%@sysconfdir@%$sysconfdir%g
13476 s%@sharedstatedir@%$sharedstatedir%g
13477 s%@localstatedir@%$localstatedir%g
13478 s%@libdir@%$libdir%g
13479 s%@includedir@%$includedir%g
13480 s%@oldincludedir@%$oldincludedir%g
13481 s%@infodir@%$infodir%g
13482 s%@mandir@%$mandir%g
13483 s%@RUNPROG@%$RUNPROG%g
13484 s%@MPROGS@%$MPROGS%g
13485 s%@LDSHFLAGS@%$LDSHFLAGS%g
13486 s%@SHLD@%$SHLD%g
13487 s%@HOST_OS@%$HOST_OS%g
13488 s%@PAM_MOD@%$PAM_MOD%g
13489 s%@WRAP@%$WRAP%g
13490 s%@WRAP32@%$WRAP32%g
13491 s%@PICFLAG@%$PICFLAG%g
13492 s%@PICSUFFIX@%$PICSUFFIX%g
13493 s%@POBAD_CC@%$POBAD_CC%g
13494 s%@SHLIBEXT@%$SHLIBEXT%g
13495 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13496 s%@CC@%$CC%g
13497 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13498 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13499 s%@INSTALL_DATA@%$INSTALL_DATA%g
13500 s%@AWK@%$AWK%g
13501 s%@BROKEN_CC@%$BROKEN_CC%g
13502 s%@host@%$host%g
13503 s%@host_alias@%$host_alias%g
13504 s%@host_cpu@%$host_cpu%g
13505 s%@host_vendor@%$host_vendor%g
13506 s%@host_os@%$host_os%g
13507 s%@target@%$target%g
13508 s%@target_alias@%$target_alias%g
13509 s%@target_cpu@%$target_cpu%g
13510 s%@target_vendor@%$target_vendor%g
13511 s%@target_os@%$target_os%g
13512 s%@build@%$build%g
13513 s%@build_alias@%$build_alias%g
13514 s%@build_cpu@%$build_cpu%g
13515 s%@build_vendor@%$build_vendor%g
13516 s%@build_os@%$build_os%g
13517 s%@CPP@%$CPP%g
13518 s%@LIBOBJS@%$LIBOBJS%g
13519 s%@TERMLIBS@%$TERMLIBS%g
13520 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13521 s%@ROFF@%$ROFF%g
13522 s%@QUOTAOBJS@%$QUOTAOBJS%g
13523 s%@privatedir@%$privatedir%g
13524 s%@lockdir@%$lockdir%g
13525 s%@swatdir@%$swatdir%g
13526 s%@manlangs@%$manlangs%g
13527 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13528 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13529 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13530 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
13531 s%@BUILD_POPT@%$BUILD_POPT%g
13532 s%@FLAGS1@%$FLAGS1%g
13533 s%@builddir@%$builddir%g
13534
13535 CEOF
13536 EOF
13537
13538 cat >> $CONFIG_STATUS <<\EOF
13539
13540 # Split the substitutions into bite-sized pieces for seds with
13541 # small command number limits, like on Digital OSF/1 and HP-UX.
13542 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13543 ac_file=1 # Number of current file.
13544 ac_beg=1 # First line for current file.
13545 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13546 ac_more_lines=:
13547 ac_sed_cmds=""
13548 while $ac_more_lines; do
13549   if test $ac_beg -gt 1; then
13550     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13551   else
13552     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13553   fi
13554   if test ! -s conftest.s$ac_file; then
13555     ac_more_lines=false
13556     rm -f conftest.s$ac_file
13557   else
13558     if test -z "$ac_sed_cmds"; then
13559       ac_sed_cmds="sed -f conftest.s$ac_file"
13560     else
13561       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13562     fi
13563     ac_file=`expr $ac_file + 1`
13564     ac_beg=$ac_end
13565     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13566   fi
13567 done
13568 if test -z "$ac_sed_cmds"; then
13569   ac_sed_cmds=cat
13570 fi
13571 EOF
13572
13573 cat >> $CONFIG_STATUS <<EOF
13574
13575 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13576 EOF
13577 cat >> $CONFIG_STATUS <<\EOF
13578 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13579   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13580   case "$ac_file" in
13581   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13582        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13583   *) ac_file_in="${ac_file}.in" ;;
13584   esac
13585
13586   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13587
13588   # Remove last slash and all that follows it.  Not all systems have dirname.
13589   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13590   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13591     # The file is in a subdirectory.
13592     test ! -d "$ac_dir" && mkdir "$ac_dir"
13593     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13594     # A "../" for each directory in $ac_dir_suffix.
13595     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13596   else
13597     ac_dir_suffix= ac_dots=
13598   fi
13599
13600   case "$ac_given_srcdir" in
13601   .)  srcdir=.
13602       if test -z "$ac_dots"; then top_srcdir=.
13603       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13604   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13605   *) # Relative path.
13606     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13607     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13608   esac
13609
13610   case "$ac_given_INSTALL" in
13611   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13612   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13613   esac
13614
13615   echo creating "$ac_file"
13616   rm -f "$ac_file"
13617   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13618   case "$ac_file" in
13619   *Makefile*) ac_comsub="1i\\
13620 # $configure_input" ;;
13621   *) ac_comsub= ;;
13622   esac
13623
13624   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13625   sed -e "$ac_comsub
13626 s%@configure_input@%$configure_input%g
13627 s%@srcdir@%$srcdir%g
13628 s%@top_srcdir@%$top_srcdir%g
13629 s%@INSTALL@%$INSTALL%g
13630 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13631 fi; done
13632 rm -f conftest.s*
13633
13634 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13635 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13636 #
13637 # ac_d sets the value in "#define NAME VALUE" lines.
13638 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13639 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13640 ac_dC='\3'
13641 ac_dD='%g'
13642 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13643 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13644 ac_uB='\([      ]\)%\1#\2define\3'
13645 ac_uC=' '
13646 ac_uD='\4%g'
13647 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13648 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13649 ac_eB='$%\1#\2define\3'
13650 ac_eC=' '
13651 ac_eD='%g'
13652
13653 if test "${CONFIG_HEADERS+set}" != set; then
13654 EOF
13655 cat >> $CONFIG_STATUS <<EOF
13656   CONFIG_HEADERS="include/config.h"
13657 EOF
13658 cat >> $CONFIG_STATUS <<\EOF
13659 fi
13660 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13661   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13662   case "$ac_file" in
13663   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13664        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13665   *) ac_file_in="${ac_file}.in" ;;
13666   esac
13667
13668   echo creating $ac_file
13669
13670   rm -f conftest.frag conftest.in conftest.out
13671   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13672   cat $ac_file_inputs > conftest.in
13673
13674 EOF
13675
13676 # Transform confdefs.h into a sed script conftest.vals that substitutes
13677 # the proper values into config.h.in to produce config.h.  And first:
13678 # Protect against being on the right side of a sed subst in config.status.
13679 # Protect against being in an unquoted here document in config.status.
13680 rm -f conftest.vals
13681 cat > conftest.hdr <<\EOF
13682 s/[\\&%]/\\&/g
13683 s%[\\$`]%\\&%g
13684 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13685 s%ac_d%ac_u%gp
13686 s%ac_u%ac_e%gp
13687 EOF
13688 sed -n -f conftest.hdr confdefs.h > conftest.vals
13689 rm -f conftest.hdr
13690
13691 # This sed command replaces #undef with comments.  This is necessary, for
13692 # example, in the case of _POSIX_SOURCE, which is predefined and required
13693 # on some systems where configure will not decide to define it.
13694 cat >> conftest.vals <<\EOF
13695 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13696 EOF
13697
13698 # Break up conftest.vals because some shells have a limit on
13699 # the size of here documents, and old seds have small limits too.
13700
13701 rm -f conftest.tail
13702 while :
13703 do
13704   ac_lines=`grep -c . conftest.vals`
13705   # grep -c gives empty output for an empty file on some AIX systems.
13706   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13707   # Write a limited-size here document to conftest.frag.
13708   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13709   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13710   echo 'CEOF
13711   sed -f conftest.frag conftest.in > conftest.out
13712   rm -f conftest.in
13713   mv conftest.out conftest.in
13714 ' >> $CONFIG_STATUS
13715   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13716   rm -f conftest.vals
13717   mv conftest.tail conftest.vals
13718 done
13719 rm -f conftest.vals
13720
13721 cat >> $CONFIG_STATUS <<\EOF
13722   rm -f conftest.frag conftest.h
13723   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13724   cat conftest.in >> conftest.h
13725   rm -f conftest.in
13726   if cmp -s $ac_file conftest.h 2>/dev/null; then
13727     echo "$ac_file is unchanged"
13728     rm -f conftest.h
13729   else
13730     # Remove last slash and all that follows it.  Not all systems have dirname.
13731       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13732       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13733       # The file is in a subdirectory.
13734       test ! -d "$ac_dir" && mkdir "$ac_dir"
13735     fi
13736     rm -f $ac_file
13737     mv conftest.h $ac_file
13738   fi
13739 fi; done
13740
13741 EOF
13742 cat >> $CONFIG_STATUS <<EOF
13743
13744 EOF
13745 cat >> $CONFIG_STATUS <<\EOF
13746
13747 exit 0
13748 EOF
13749 chmod +x $CONFIG_STATUS
13750 rm -fr confdefs* $ac_clean_files
13751 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13752