Updated Solaris link options from DaveCB.
[kai/samba.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --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 main()
2570 {
2571   FILE *f=fopen("conftestval", "w");
2572   if (!f) exit(1);
2573   fprintf(f, "%d\n", sizeof(int));
2574   exit(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 main()
2609 {
2610   FILE *f=fopen("conftestval", "w");
2611   if (!f) exit(1);
2612   fprintf(f, "%d\n", sizeof(long));
2613   exit(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 main()
2648 {
2649   FILE *f=fopen("conftestval", "w");
2650   if (!f) exit(1);
2651   fprintf(f, "%d\n", sizeof(short));
2652   exit(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 # setbuffer is needed for smbtorture
5617 for ac_func in setbuffer
5618 do
5619 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5620 echo "configure:5621: checking for $ac_func" >&5
5621 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5622   echo $ac_n "(cached) $ac_c" 1>&6
5623 else
5624   cat > conftest.$ac_ext <<EOF
5625 #line 5626 "configure"
5626 #include "confdefs.h"
5627 /* System header to define __stub macros and hopefully few prototypes,
5628     which can conflict with char $ac_func(); below.  */
5629 #include <assert.h>
5630 /* Override any gcc2 internal prototype to avoid an error.  */
5631 /* We use char because int might match the return type of a gcc2
5632     builtin and then its argument prototype would still apply.  */
5633 char $ac_func();
5634
5635 int main() {
5636
5637 /* The GNU C library defines this for functions which it implements
5638     to always fail with ENOSYS.  Some functions are actually named
5639     something starting with __ and the normal name is an alias.  */
5640 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5641 choke me
5642 #else
5643 $ac_func();
5644 #endif
5645
5646 ; return 0; }
5647 EOF
5648 if { (eval echo configure:5649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5649   rm -rf conftest*
5650   eval "ac_cv_func_$ac_func=yes"
5651 else
5652   echo "configure: failed program was:" >&5
5653   cat conftest.$ac_ext >&5
5654   rm -rf conftest*
5655   eval "ac_cv_func_$ac_func=no"
5656 fi
5657 rm -f conftest*
5658 fi
5659
5660 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5661   echo "$ac_t""yes" 1>&6
5662     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5663   cat >> confdefs.h <<EOF
5664 #define $ac_tr_func 1
5665 EOF
5666  
5667 else
5668   echo "$ac_t""no" 1>&6
5669 fi
5670 done
5671
5672
5673 # syscall() is needed for smbwrapper.
5674 for ac_func in syscall
5675 do
5676 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5677 echo "configure:5678: checking for $ac_func" >&5
5678 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5679   echo $ac_n "(cached) $ac_c" 1>&6
5680 else
5681   cat > conftest.$ac_ext <<EOF
5682 #line 5683 "configure"
5683 #include "confdefs.h"
5684 /* System header to define __stub macros and hopefully few prototypes,
5685     which can conflict with char $ac_func(); below.  */
5686 #include <assert.h>
5687 /* Override any gcc2 internal prototype to avoid an error.  */
5688 /* We use char because int might match the return type of a gcc2
5689     builtin and then its argument prototype would still apply.  */
5690 char $ac_func();
5691
5692 int main() {
5693
5694 /* The GNU C library defines this for functions which it implements
5695     to always fail with ENOSYS.  Some functions are actually named
5696     something starting with __ and the normal name is an alias.  */
5697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5698 choke me
5699 #else
5700 $ac_func();
5701 #endif
5702
5703 ; return 0; }
5704 EOF
5705 if { (eval echo configure:5706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5706   rm -rf conftest*
5707   eval "ac_cv_func_$ac_func=yes"
5708 else
5709   echo "configure: failed program was:" >&5
5710   cat conftest.$ac_ext >&5
5711   rm -rf conftest*
5712   eval "ac_cv_func_$ac_func=no"
5713 fi
5714 rm -f conftest*
5715 fi
5716
5717 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5718   echo "$ac_t""yes" 1>&6
5719     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5720   cat >> confdefs.h <<EOF
5721 #define $ac_tr_func 1
5722 EOF
5723  
5724 else
5725   echo "$ac_t""no" 1>&6
5726 fi
5727 done
5728
5729
5730 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5731 do
5732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5733 echo "configure:5734: checking for $ac_func" >&5
5734 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5735   echo $ac_n "(cached) $ac_c" 1>&6
5736 else
5737   cat > conftest.$ac_ext <<EOF
5738 #line 5739 "configure"
5739 #include "confdefs.h"
5740 /* System header to define __stub macros and hopefully few prototypes,
5741     which can conflict with char $ac_func(); below.  */
5742 #include <assert.h>
5743 /* Override any gcc2 internal prototype to avoid an error.  */
5744 /* We use char because int might match the return type of a gcc2
5745     builtin and then its argument prototype would still apply.  */
5746 char $ac_func();
5747
5748 int main() {
5749
5750 /* The GNU C library defines this for functions which it implements
5751     to always fail with ENOSYS.  Some functions are actually named
5752     something starting with __ and the normal name is an alias.  */
5753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5754 choke me
5755 #else
5756 $ac_func();
5757 #endif
5758
5759 ; return 0; }
5760 EOF
5761 if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5762   rm -rf conftest*
5763   eval "ac_cv_func_$ac_func=yes"
5764 else
5765   echo "configure: failed program was:" >&5
5766   cat conftest.$ac_ext >&5
5767   rm -rf conftest*
5768   eval "ac_cv_func_$ac_func=no"
5769 fi
5770 rm -f conftest*
5771 fi
5772
5773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5774   echo "$ac_t""yes" 1>&6
5775     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5776   cat >> confdefs.h <<EOF
5777 #define $ac_tr_func 1
5778 EOF
5779  
5780 else
5781   echo "$ac_t""no" 1>&6
5782 fi
5783 done
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 __getcwd _getcwd
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 __xstat __fxstat __lxstat
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 _stat _lstat _fstat __stat __lstat __fstat
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 _acl __acl _facl __facl _open __open _chdir __chdir
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 _close __close _fchdir __fchdir _fcntl __fcntl
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 getdents _getdents __getdents _lseek __lseek _read __read
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 _write __write _fork __fork
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 _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
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 __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
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 pread _pread __pread pread64 _pread64 __pread64
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 pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
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 open64 _open64 __open64 creat64
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
6501 #
6502 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6503 #
6504
6505 if test x$ac_cv_func_stat64 = xno ; then
6506   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6507 echo "configure:6508: checking for stat64 in <sys/stat.h>" >&5
6508   cat > conftest.$ac_ext <<EOF
6509 #line 6510 "configure"
6510 #include "confdefs.h"
6511
6512 #if defined(HAVE_UNISTD_H)
6513 #include <unistd.h>
6514 #endif
6515 #include <sys/stat.h>
6516
6517 int main() {
6518 struct stat64 st64; exit(stat64(".",&st64));
6519 ; return 0; }
6520 EOF
6521 if { (eval echo configure:6522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6522   rm -rf conftest*
6523   ac_cv_func_stat64=yes
6524 else
6525   echo "configure: failed program was:" >&5
6526   cat conftest.$ac_ext >&5
6527 fi
6528 rm -f conftest*
6529   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6530   if test x$ac_cv_func_stat64 = xyes ; then
6531     cat >> confdefs.h <<\EOF
6532 #define HAVE_STAT64 1
6533 EOF
6534
6535   fi
6536 fi
6537
6538 if test x$ac_cv_func_lstat64 = xno ; then
6539   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6540 echo "configure:6541: checking for lstat64 in <sys/stat.h>" >&5
6541   cat > conftest.$ac_ext <<EOF
6542 #line 6543 "configure"
6543 #include "confdefs.h"
6544
6545 #if defined(HAVE_UNISTD_H)
6546 #include <unistd.h>
6547 #endif
6548 #include <sys/stat.h>
6549
6550 int main() {
6551 struct stat64 st64; exit(lstat64(".",&st64));
6552 ; return 0; }
6553 EOF
6554 if { (eval echo configure:6555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6555   rm -rf conftest*
6556   ac_cv_func_lstat64=yes
6557 else
6558   echo "configure: failed program was:" >&5
6559   cat conftest.$ac_ext >&5
6560 fi
6561 rm -f conftest*
6562   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6563   if test x$ac_cv_func_lstat64 = xyes ; then
6564     cat >> confdefs.h <<\EOF
6565 #define HAVE_LSTAT64 1
6566 EOF
6567
6568   fi
6569 fi
6570
6571 if test x$ac_cv_func_fstat64 = xno ; then
6572   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6573 echo "configure:6574: checking for fstat64 in <sys/stat.h>" >&5
6574   cat > conftest.$ac_ext <<EOF
6575 #line 6576 "configure"
6576 #include "confdefs.h"
6577
6578 #if defined(HAVE_UNISTD_H)
6579 #include <unistd.h>
6580 #endif
6581 #include <sys/stat.h>
6582
6583 int main() {
6584 struct stat64 st64; exit(fstat64(0,&st64));
6585 ; return 0; }
6586 EOF
6587 if { (eval echo configure:6588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6588   rm -rf conftest*
6589   ac_cv_func_fstat64=yes
6590 else
6591   echo "configure: failed program was:" >&5
6592   cat conftest.$ac_ext >&5
6593 fi
6594 rm -f conftest*
6595   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6596   if test x$ac_cv_func_fstat64 = xyes ; then
6597     cat >> confdefs.h <<\EOF
6598 #define HAVE_FSTAT64 1
6599 EOF
6600
6601   fi
6602 fi
6603
6604 #####################################
6605 # we might need the resolv library on some systems
6606 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6607 echo "configure:6608: checking for dn_expand in -lresolv" >&5
6608 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6609 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6610   echo $ac_n "(cached) $ac_c" 1>&6
6611 else
6612   ac_save_LIBS="$LIBS"
6613 LIBS="-lresolv  $LIBS"
6614 cat > conftest.$ac_ext <<EOF
6615 #line 6616 "configure"
6616 #include "confdefs.h"
6617 /* Override any gcc2 internal prototype to avoid an error.  */
6618 /* We use char because int might match the return type of a gcc2
6619     builtin and then its argument prototype would still apply.  */
6620 char dn_expand();
6621
6622 int main() {
6623 dn_expand()
6624 ; return 0; }
6625 EOF
6626 if { (eval echo configure:6627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6627   rm -rf conftest*
6628   eval "ac_cv_lib_$ac_lib_var=yes"
6629 else
6630   echo "configure: failed program was:" >&5
6631   cat conftest.$ac_ext >&5
6632   rm -rf conftest*
6633   eval "ac_cv_lib_$ac_lib_var=no"
6634 fi
6635 rm -f conftest*
6636 LIBS="$ac_save_LIBS"
6637
6638 fi
6639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6640   echo "$ac_t""yes" 1>&6
6641     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6642     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6643   cat >> confdefs.h <<EOF
6644 #define $ac_tr_lib 1
6645 EOF
6646
6647   LIBS="-lresolv $LIBS"
6648
6649 else
6650   echo "$ac_t""no" 1>&6
6651 fi
6652
6653
6654 #
6655 # Check for the functions putprpwnam, set_auth_parameters,
6656 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6657 # Needed for OSF1 and HPUX.
6658 #
6659
6660 case "$LIBS" in
6661   *-lsecurity*) for ac_func in putprpwnam
6662 do
6663 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6664 echo "configure:6665: checking for $ac_func" >&5
6665 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6666   echo $ac_n "(cached) $ac_c" 1>&6
6667 else
6668   cat > conftest.$ac_ext <<EOF
6669 #line 6670 "configure"
6670 #include "confdefs.h"
6671 /* System header to define __stub macros and hopefully few prototypes,
6672     which can conflict with char $ac_func(); below.  */
6673 #include <assert.h>
6674 /* Override any gcc2 internal prototype to avoid an error.  */
6675 /* We use char because int might match the return type of a gcc2
6676     builtin and then its argument prototype would still apply.  */
6677 char $ac_func();
6678
6679 int main() {
6680
6681 /* The GNU C library defines this for functions which it implements
6682     to always fail with ENOSYS.  Some functions are actually named
6683     something starting with __ and the normal name is an alias.  */
6684 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6685 choke me
6686 #else
6687 $ac_func();
6688 #endif
6689
6690 ; return 0; }
6691 EOF
6692 if { (eval echo configure:6693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6693   rm -rf conftest*
6694   eval "ac_cv_func_$ac_func=yes"
6695 else
6696   echo "configure: failed program was:" >&5
6697   cat conftest.$ac_ext >&5
6698   rm -rf conftest*
6699   eval "ac_cv_func_$ac_func=no"
6700 fi
6701 rm -f conftest*
6702 fi
6703
6704 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6705   echo "$ac_t""yes" 1>&6
6706     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6707   cat >> confdefs.h <<EOF
6708 #define $ac_tr_func 1
6709 EOF
6710  
6711 else
6712   echo "$ac_t""no" 1>&6
6713 fi
6714 done
6715  ;;
6716   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6717 echo "configure:6718: checking for putprpwnam in -lsecurity" >&5
6718 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6719 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6720   echo $ac_n "(cached) $ac_c" 1>&6
6721 else
6722   ac_save_LIBS="$LIBS"
6723 LIBS="-lsecurity  $LIBS"
6724 cat > conftest.$ac_ext <<EOF
6725 #line 6726 "configure"
6726 #include "confdefs.h"
6727 /* Override any gcc2 internal prototype to avoid an error.  */
6728 /* We use char because int might match the return type of a gcc2
6729     builtin and then its argument prototype would still apply.  */
6730 char putprpwnam();
6731
6732 int main() {
6733 putprpwnam()
6734 ; return 0; }
6735 EOF
6736 if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6737   rm -rf conftest*
6738   eval "ac_cv_lib_$ac_lib_var=yes"
6739 else
6740   echo "configure: failed program was:" >&5
6741   cat conftest.$ac_ext >&5
6742   rm -rf conftest*
6743   eval "ac_cv_lib_$ac_lib_var=no"
6744 fi
6745 rm -f conftest*
6746 LIBS="$ac_save_LIBS"
6747
6748 fi
6749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6750   echo "$ac_t""yes" 1>&6
6751     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6752     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6753   cat >> confdefs.h <<EOF
6754 #define $ac_tr_lib 1
6755 EOF
6756
6757   LIBS="-lsecurity $LIBS"
6758
6759 else
6760   echo "$ac_t""no" 1>&6
6761 fi
6762  
6763      for ac_func in putprpwnam
6764 do
6765 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6766 echo "configure:6767: checking for $ac_func" >&5
6767 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6768   echo $ac_n "(cached) $ac_c" 1>&6
6769 else
6770   cat > conftest.$ac_ext <<EOF
6771 #line 6772 "configure"
6772 #include "confdefs.h"
6773 /* System header to define __stub macros and hopefully few prototypes,
6774     which can conflict with char $ac_func(); below.  */
6775 #include <assert.h>
6776 /* Override any gcc2 internal prototype to avoid an error.  */
6777 /* We use char because int might match the return type of a gcc2
6778     builtin and then its argument prototype would still apply.  */
6779 char $ac_func();
6780
6781 int main() {
6782
6783 /* The GNU C library defines this for functions which it implements
6784     to always fail with ENOSYS.  Some functions are actually named
6785     something starting with __ and the normal name is an alias.  */
6786 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6787 choke me
6788 #else
6789 $ac_func();
6790 #endif
6791
6792 ; return 0; }
6793 EOF
6794 if { (eval echo configure:6795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6795   rm -rf conftest*
6796   eval "ac_cv_func_$ac_func=yes"
6797 else
6798   echo "configure: failed program was:" >&5
6799   cat conftest.$ac_ext >&5
6800   rm -rf conftest*
6801   eval "ac_cv_func_$ac_func=no"
6802 fi
6803 rm -f conftest*
6804 fi
6805
6806 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6807   echo "$ac_t""yes" 1>&6
6808     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6809   cat >> confdefs.h <<EOF
6810 #define $ac_tr_func 1
6811 EOF
6812  
6813 else
6814   echo "$ac_t""no" 1>&6
6815 fi
6816 done
6817
6818   ;;
6819   esac
6820
6821 case "$LIBS" in
6822   *-lsec*) for ac_func in putprpwnam
6823 do
6824 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6825 echo "configure:6826: checking for $ac_func" >&5
6826 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6827   echo $ac_n "(cached) $ac_c" 1>&6
6828 else
6829   cat > conftest.$ac_ext <<EOF
6830 #line 6831 "configure"
6831 #include "confdefs.h"
6832 /* System header to define __stub macros and hopefully few prototypes,
6833     which can conflict with char $ac_func(); below.  */
6834 #include <assert.h>
6835 /* Override any gcc2 internal prototype to avoid an error.  */
6836 /* We use char because int might match the return type of a gcc2
6837     builtin and then its argument prototype would still apply.  */
6838 char $ac_func();
6839
6840 int main() {
6841
6842 /* The GNU C library defines this for functions which it implements
6843     to always fail with ENOSYS.  Some functions are actually named
6844     something starting with __ and the normal name is an alias.  */
6845 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6846 choke me
6847 #else
6848 $ac_func();
6849 #endif
6850
6851 ; return 0; }
6852 EOF
6853 if { (eval echo configure:6854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6854   rm -rf conftest*
6855   eval "ac_cv_func_$ac_func=yes"
6856 else
6857   echo "configure: failed program was:" >&5
6858   cat conftest.$ac_ext >&5
6859   rm -rf conftest*
6860   eval "ac_cv_func_$ac_func=no"
6861 fi
6862 rm -f conftest*
6863 fi
6864
6865 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6866   echo "$ac_t""yes" 1>&6
6867     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6868   cat >> confdefs.h <<EOF
6869 #define $ac_tr_func 1
6870 EOF
6871  
6872 else
6873   echo "$ac_t""no" 1>&6
6874 fi
6875 done
6876  ;;
6877   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6878 echo "configure:6879: checking for putprpwnam in -lsec" >&5
6879 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6880 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6881   echo $ac_n "(cached) $ac_c" 1>&6
6882 else
6883   ac_save_LIBS="$LIBS"
6884 LIBS="-lsec  $LIBS"
6885 cat > conftest.$ac_ext <<EOF
6886 #line 6887 "configure"
6887 #include "confdefs.h"
6888 /* Override any gcc2 internal prototype to avoid an error.  */
6889 /* We use char because int might match the return type of a gcc2
6890     builtin and then its argument prototype would still apply.  */
6891 char putprpwnam();
6892
6893 int main() {
6894 putprpwnam()
6895 ; return 0; }
6896 EOF
6897 if { (eval echo configure:6898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6898   rm -rf conftest*
6899   eval "ac_cv_lib_$ac_lib_var=yes"
6900 else
6901   echo "configure: failed program was:" >&5
6902   cat conftest.$ac_ext >&5
6903   rm -rf conftest*
6904   eval "ac_cv_lib_$ac_lib_var=no"
6905 fi
6906 rm -f conftest*
6907 LIBS="$ac_save_LIBS"
6908
6909 fi
6910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6911   echo "$ac_t""yes" 1>&6
6912     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6913     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6914   cat >> confdefs.h <<EOF
6915 #define $ac_tr_lib 1
6916 EOF
6917
6918   LIBS="-lsec $LIBS"
6919
6920 else
6921   echo "$ac_t""no" 1>&6
6922 fi
6923  
6924      for ac_func in putprpwnam
6925 do
6926 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6927 echo "configure:6928: checking for $ac_func" >&5
6928 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6929   echo $ac_n "(cached) $ac_c" 1>&6
6930 else
6931   cat > conftest.$ac_ext <<EOF
6932 #line 6933 "configure"
6933 #include "confdefs.h"
6934 /* System header to define __stub macros and hopefully few prototypes,
6935     which can conflict with char $ac_func(); below.  */
6936 #include <assert.h>
6937 /* Override any gcc2 internal prototype to avoid an error.  */
6938 /* We use char because int might match the return type of a gcc2
6939     builtin and then its argument prototype would still apply.  */
6940 char $ac_func();
6941
6942 int main() {
6943
6944 /* The GNU C library defines this for functions which it implements
6945     to always fail with ENOSYS.  Some functions are actually named
6946     something starting with __ and the normal name is an alias.  */
6947 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6948 choke me
6949 #else
6950 $ac_func();
6951 #endif
6952
6953 ; return 0; }
6954 EOF
6955 if { (eval echo configure:6956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6956   rm -rf conftest*
6957   eval "ac_cv_func_$ac_func=yes"
6958 else
6959   echo "configure: failed program was:" >&5
6960   cat conftest.$ac_ext >&5
6961   rm -rf conftest*
6962   eval "ac_cv_func_$ac_func=no"
6963 fi
6964 rm -f conftest*
6965 fi
6966
6967 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6968   echo "$ac_t""yes" 1>&6
6969     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6970   cat >> confdefs.h <<EOF
6971 #define $ac_tr_func 1
6972 EOF
6973  
6974 else
6975   echo "$ac_t""no" 1>&6
6976 fi
6977 done
6978
6979   ;;
6980   esac
6981
6982
6983 case "$LIBS" in
6984   *-lsecurity*) for ac_func in set_auth_parameters
6985 do
6986 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6987 echo "configure:6988: checking for $ac_func" >&5
6988 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6989   echo $ac_n "(cached) $ac_c" 1>&6
6990 else
6991   cat > conftest.$ac_ext <<EOF
6992 #line 6993 "configure"
6993 #include "confdefs.h"
6994 /* System header to define __stub macros and hopefully few prototypes,
6995     which can conflict with char $ac_func(); below.  */
6996 #include <assert.h>
6997 /* Override any gcc2 internal prototype to avoid an error.  */
6998 /* We use char because int might match the return type of a gcc2
6999     builtin and then its argument prototype would still apply.  */
7000 char $ac_func();
7001
7002 int main() {
7003
7004 /* The GNU C library defines this for functions which it implements
7005     to always fail with ENOSYS.  Some functions are actually named
7006     something starting with __ and the normal name is an alias.  */
7007 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7008 choke me
7009 #else
7010 $ac_func();
7011 #endif
7012
7013 ; return 0; }
7014 EOF
7015 if { (eval echo configure:7016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7016   rm -rf conftest*
7017   eval "ac_cv_func_$ac_func=yes"
7018 else
7019   echo "configure: failed program was:" >&5
7020   cat conftest.$ac_ext >&5
7021   rm -rf conftest*
7022   eval "ac_cv_func_$ac_func=no"
7023 fi
7024 rm -f conftest*
7025 fi
7026
7027 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7028   echo "$ac_t""yes" 1>&6
7029     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7030   cat >> confdefs.h <<EOF
7031 #define $ac_tr_func 1
7032 EOF
7033  
7034 else
7035   echo "$ac_t""no" 1>&6
7036 fi
7037 done
7038  ;;
7039   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7040 echo "configure:7041: checking for set_auth_parameters in -lsecurity" >&5
7041 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7042 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7043   echo $ac_n "(cached) $ac_c" 1>&6
7044 else
7045   ac_save_LIBS="$LIBS"
7046 LIBS="-lsecurity  $LIBS"
7047 cat > conftest.$ac_ext <<EOF
7048 #line 7049 "configure"
7049 #include "confdefs.h"
7050 /* Override any gcc2 internal prototype to avoid an error.  */
7051 /* We use char because int might match the return type of a gcc2
7052     builtin and then its argument prototype would still apply.  */
7053 char set_auth_parameters();
7054
7055 int main() {
7056 set_auth_parameters()
7057 ; return 0; }
7058 EOF
7059 if { (eval echo configure:7060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7060   rm -rf conftest*
7061   eval "ac_cv_lib_$ac_lib_var=yes"
7062 else
7063   echo "configure: failed program was:" >&5
7064   cat conftest.$ac_ext >&5
7065   rm -rf conftest*
7066   eval "ac_cv_lib_$ac_lib_var=no"
7067 fi
7068 rm -f conftest*
7069 LIBS="$ac_save_LIBS"
7070
7071 fi
7072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7073   echo "$ac_t""yes" 1>&6
7074     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7075     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7076   cat >> confdefs.h <<EOF
7077 #define $ac_tr_lib 1
7078 EOF
7079
7080   LIBS="-lsecurity $LIBS"
7081
7082 else
7083   echo "$ac_t""no" 1>&6
7084 fi
7085  
7086      for ac_func in set_auth_parameters
7087 do
7088 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7089 echo "configure:7090: checking for $ac_func" >&5
7090 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7091   echo $ac_n "(cached) $ac_c" 1>&6
7092 else
7093   cat > conftest.$ac_ext <<EOF
7094 #line 7095 "configure"
7095 #include "confdefs.h"
7096 /* System header to define __stub macros and hopefully few prototypes,
7097     which can conflict with char $ac_func(); below.  */
7098 #include <assert.h>
7099 /* Override any gcc2 internal prototype to avoid an error.  */
7100 /* We use char because int might match the return type of a gcc2
7101     builtin and then its argument prototype would still apply.  */
7102 char $ac_func();
7103
7104 int main() {
7105
7106 /* The GNU C library defines this for functions which it implements
7107     to always fail with ENOSYS.  Some functions are actually named
7108     something starting with __ and the normal name is an alias.  */
7109 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7110 choke me
7111 #else
7112 $ac_func();
7113 #endif
7114
7115 ; return 0; }
7116 EOF
7117 if { (eval echo configure:7118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7118   rm -rf conftest*
7119   eval "ac_cv_func_$ac_func=yes"
7120 else
7121   echo "configure: failed program was:" >&5
7122   cat conftest.$ac_ext >&5
7123   rm -rf conftest*
7124   eval "ac_cv_func_$ac_func=no"
7125 fi
7126 rm -f conftest*
7127 fi
7128
7129 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7130   echo "$ac_t""yes" 1>&6
7131     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7132   cat >> confdefs.h <<EOF
7133 #define $ac_tr_func 1
7134 EOF
7135  
7136 else
7137   echo "$ac_t""no" 1>&6
7138 fi
7139 done
7140
7141   ;;
7142   esac
7143
7144 case "$LIBS" in
7145   *-lsec*) for ac_func in set_auth_parameters
7146 do
7147 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7148 echo "configure:7149: checking for $ac_func" >&5
7149 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7150   echo $ac_n "(cached) $ac_c" 1>&6
7151 else
7152   cat > conftest.$ac_ext <<EOF
7153 #line 7154 "configure"
7154 #include "confdefs.h"
7155 /* System header to define __stub macros and hopefully few prototypes,
7156     which can conflict with char $ac_func(); below.  */
7157 #include <assert.h>
7158 /* Override any gcc2 internal prototype to avoid an error.  */
7159 /* We use char because int might match the return type of a gcc2
7160     builtin and then its argument prototype would still apply.  */
7161 char $ac_func();
7162
7163 int main() {
7164
7165 /* The GNU C library defines this for functions which it implements
7166     to always fail with ENOSYS.  Some functions are actually named
7167     something starting with __ and the normal name is an alias.  */
7168 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7169 choke me
7170 #else
7171 $ac_func();
7172 #endif
7173
7174 ; return 0; }
7175 EOF
7176 if { (eval echo configure:7177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7177   rm -rf conftest*
7178   eval "ac_cv_func_$ac_func=yes"
7179 else
7180   echo "configure: failed program was:" >&5
7181   cat conftest.$ac_ext >&5
7182   rm -rf conftest*
7183   eval "ac_cv_func_$ac_func=no"
7184 fi
7185 rm -f conftest*
7186 fi
7187
7188 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7189   echo "$ac_t""yes" 1>&6
7190     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7191   cat >> confdefs.h <<EOF
7192 #define $ac_tr_func 1
7193 EOF
7194  
7195 else
7196   echo "$ac_t""no" 1>&6
7197 fi
7198 done
7199  ;;
7200   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7201 echo "configure:7202: checking for set_auth_parameters in -lsec" >&5
7202 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7203 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7204   echo $ac_n "(cached) $ac_c" 1>&6
7205 else
7206   ac_save_LIBS="$LIBS"
7207 LIBS="-lsec  $LIBS"
7208 cat > conftest.$ac_ext <<EOF
7209 #line 7210 "configure"
7210 #include "confdefs.h"
7211 /* Override any gcc2 internal prototype to avoid an error.  */
7212 /* We use char because int might match the return type of a gcc2
7213     builtin and then its argument prototype would still apply.  */
7214 char set_auth_parameters();
7215
7216 int main() {
7217 set_auth_parameters()
7218 ; return 0; }
7219 EOF
7220 if { (eval echo configure:7221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7221   rm -rf conftest*
7222   eval "ac_cv_lib_$ac_lib_var=yes"
7223 else
7224   echo "configure: failed program was:" >&5
7225   cat conftest.$ac_ext >&5
7226   rm -rf conftest*
7227   eval "ac_cv_lib_$ac_lib_var=no"
7228 fi
7229 rm -f conftest*
7230 LIBS="$ac_save_LIBS"
7231
7232 fi
7233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7234   echo "$ac_t""yes" 1>&6
7235     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7236     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7237   cat >> confdefs.h <<EOF
7238 #define $ac_tr_lib 1
7239 EOF
7240
7241   LIBS="-lsec $LIBS"
7242
7243 else
7244   echo "$ac_t""no" 1>&6
7245 fi
7246  
7247      for ac_func in set_auth_parameters
7248 do
7249 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7250 echo "configure:7251: checking for $ac_func" >&5
7251 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7252   echo $ac_n "(cached) $ac_c" 1>&6
7253 else
7254   cat > conftest.$ac_ext <<EOF
7255 #line 7256 "configure"
7256 #include "confdefs.h"
7257 /* System header to define __stub macros and hopefully few prototypes,
7258     which can conflict with char $ac_func(); below.  */
7259 #include <assert.h>
7260 /* Override any gcc2 internal prototype to avoid an error.  */
7261 /* We use char because int might match the return type of a gcc2
7262     builtin and then its argument prototype would still apply.  */
7263 char $ac_func();
7264
7265 int main() {
7266
7267 /* The GNU C library defines this for functions which it implements
7268     to always fail with ENOSYS.  Some functions are actually named
7269     something starting with __ and the normal name is an alias.  */
7270 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7271 choke me
7272 #else
7273 $ac_func();
7274 #endif
7275
7276 ; return 0; }
7277 EOF
7278 if { (eval echo configure:7279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7279   rm -rf conftest*
7280   eval "ac_cv_func_$ac_func=yes"
7281 else
7282   echo "configure: failed program was:" >&5
7283   cat conftest.$ac_ext >&5
7284   rm -rf conftest*
7285   eval "ac_cv_func_$ac_func=no"
7286 fi
7287 rm -f conftest*
7288 fi
7289
7290 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7291   echo "$ac_t""yes" 1>&6
7292     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7293   cat >> confdefs.h <<EOF
7294 #define $ac_tr_func 1
7295 EOF
7296  
7297 else
7298   echo "$ac_t""no" 1>&6
7299 fi
7300 done
7301
7302   ;;
7303   esac
7304
7305
7306 # UnixWare 7.x has its getspnam in -lgen
7307 case "$LIBS" in
7308   *-lgen*) for ac_func in getspnam
7309 do
7310 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7311 echo "configure:7312: checking for $ac_func" >&5
7312 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7313   echo $ac_n "(cached) $ac_c" 1>&6
7314 else
7315   cat > conftest.$ac_ext <<EOF
7316 #line 7317 "configure"
7317 #include "confdefs.h"
7318 /* System header to define __stub macros and hopefully few prototypes,
7319     which can conflict with char $ac_func(); below.  */
7320 #include <assert.h>
7321 /* Override any gcc2 internal prototype to avoid an error.  */
7322 /* We use char because int might match the return type of a gcc2
7323     builtin and then its argument prototype would still apply.  */
7324 char $ac_func();
7325
7326 int main() {
7327
7328 /* The GNU C library defines this for functions which it implements
7329     to always fail with ENOSYS.  Some functions are actually named
7330     something starting with __ and the normal name is an alias.  */
7331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7332 choke me
7333 #else
7334 $ac_func();
7335 #endif
7336
7337 ; return 0; }
7338 EOF
7339 if { (eval echo configure:7340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7340   rm -rf conftest*
7341   eval "ac_cv_func_$ac_func=yes"
7342 else
7343   echo "configure: failed program was:" >&5
7344   cat conftest.$ac_ext >&5
7345   rm -rf conftest*
7346   eval "ac_cv_func_$ac_func=no"
7347 fi
7348 rm -f conftest*
7349 fi
7350
7351 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7352   echo "$ac_t""yes" 1>&6
7353     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7354   cat >> confdefs.h <<EOF
7355 #define $ac_tr_func 1
7356 EOF
7357  
7358 else
7359   echo "$ac_t""no" 1>&6
7360 fi
7361 done
7362  ;;
7363   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7364 echo "configure:7365: checking for getspnam in -lgen" >&5
7365 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7366 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7367   echo $ac_n "(cached) $ac_c" 1>&6
7368 else
7369   ac_save_LIBS="$LIBS"
7370 LIBS="-lgen  $LIBS"
7371 cat > conftest.$ac_ext <<EOF
7372 #line 7373 "configure"
7373 #include "confdefs.h"
7374 /* Override any gcc2 internal prototype to avoid an error.  */
7375 /* We use char because int might match the return type of a gcc2
7376     builtin and then its argument prototype would still apply.  */
7377 char getspnam();
7378
7379 int main() {
7380 getspnam()
7381 ; return 0; }
7382 EOF
7383 if { (eval echo configure:7384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7384   rm -rf conftest*
7385   eval "ac_cv_lib_$ac_lib_var=yes"
7386 else
7387   echo "configure: failed program was:" >&5
7388   cat conftest.$ac_ext >&5
7389   rm -rf conftest*
7390   eval "ac_cv_lib_$ac_lib_var=no"
7391 fi
7392 rm -f conftest*
7393 LIBS="$ac_save_LIBS"
7394
7395 fi
7396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7397   echo "$ac_t""yes" 1>&6
7398     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7399     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7400   cat >> confdefs.h <<EOF
7401 #define $ac_tr_lib 1
7402 EOF
7403
7404   LIBS="-lgen $LIBS"
7405
7406 else
7407   echo "$ac_t""no" 1>&6
7408 fi
7409  
7410      for ac_func in getspnam
7411 do
7412 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7413 echo "configure:7414: checking for $ac_func" >&5
7414 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7415   echo $ac_n "(cached) $ac_c" 1>&6
7416 else
7417   cat > conftest.$ac_ext <<EOF
7418 #line 7419 "configure"
7419 #include "confdefs.h"
7420 /* System header to define __stub macros and hopefully few prototypes,
7421     which can conflict with char $ac_func(); below.  */
7422 #include <assert.h>
7423 /* Override any gcc2 internal prototype to avoid an error.  */
7424 /* We use char because int might match the return type of a gcc2
7425     builtin and then its argument prototype would still apply.  */
7426 char $ac_func();
7427
7428 int main() {
7429
7430 /* The GNU C library defines this for functions which it implements
7431     to always fail with ENOSYS.  Some functions are actually named
7432     something starting with __ and the normal name is an alias.  */
7433 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7434 choke me
7435 #else
7436 $ac_func();
7437 #endif
7438
7439 ; return 0; }
7440 EOF
7441 if { (eval echo configure:7442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7442   rm -rf conftest*
7443   eval "ac_cv_func_$ac_func=yes"
7444 else
7445   echo "configure: failed program was:" >&5
7446   cat conftest.$ac_ext >&5
7447   rm -rf conftest*
7448   eval "ac_cv_func_$ac_func=no"
7449 fi
7450 rm -f conftest*
7451 fi
7452
7453 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7454   echo "$ac_t""yes" 1>&6
7455     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7456   cat >> confdefs.h <<EOF
7457 #define $ac_tr_func 1
7458 EOF
7459  
7460 else
7461   echo "$ac_t""no" 1>&6
7462 fi
7463 done
7464
7465   ;;
7466   esac
7467
7468
7469 case "$LIBS" in
7470   *-lsecurity*) for ac_func in getspnam
7471 do
7472 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7473 echo "configure:7474: checking for $ac_func" >&5
7474 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7475   echo $ac_n "(cached) $ac_c" 1>&6
7476 else
7477   cat > conftest.$ac_ext <<EOF
7478 #line 7479 "configure"
7479 #include "confdefs.h"
7480 /* System header to define __stub macros and hopefully few prototypes,
7481     which can conflict with char $ac_func(); below.  */
7482 #include <assert.h>
7483 /* Override any gcc2 internal prototype to avoid an error.  */
7484 /* We use char because int might match the return type of a gcc2
7485     builtin and then its argument prototype would still apply.  */
7486 char $ac_func();
7487
7488 int main() {
7489
7490 /* The GNU C library defines this for functions which it implements
7491     to always fail with ENOSYS.  Some functions are actually named
7492     something starting with __ and the normal name is an alias.  */
7493 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7494 choke me
7495 #else
7496 $ac_func();
7497 #endif
7498
7499 ; return 0; }
7500 EOF
7501 if { (eval echo configure:7502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7502   rm -rf conftest*
7503   eval "ac_cv_func_$ac_func=yes"
7504 else
7505   echo "configure: failed program was:" >&5
7506   cat conftest.$ac_ext >&5
7507   rm -rf conftest*
7508   eval "ac_cv_func_$ac_func=no"
7509 fi
7510 rm -f conftest*
7511 fi
7512
7513 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7514   echo "$ac_t""yes" 1>&6
7515     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7516   cat >> confdefs.h <<EOF
7517 #define $ac_tr_func 1
7518 EOF
7519  
7520 else
7521   echo "$ac_t""no" 1>&6
7522 fi
7523 done
7524  ;;
7525   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7526 echo "configure:7527: checking for getspnam in -lsecurity" >&5
7527 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7528 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7529   echo $ac_n "(cached) $ac_c" 1>&6
7530 else
7531   ac_save_LIBS="$LIBS"
7532 LIBS="-lsecurity  $LIBS"
7533 cat > conftest.$ac_ext <<EOF
7534 #line 7535 "configure"
7535 #include "confdefs.h"
7536 /* Override any gcc2 internal prototype to avoid an error.  */
7537 /* We use char because int might match the return type of a gcc2
7538     builtin and then its argument prototype would still apply.  */
7539 char getspnam();
7540
7541 int main() {
7542 getspnam()
7543 ; return 0; }
7544 EOF
7545 if { (eval echo configure:7546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7546   rm -rf conftest*
7547   eval "ac_cv_lib_$ac_lib_var=yes"
7548 else
7549   echo "configure: failed program was:" >&5
7550   cat conftest.$ac_ext >&5
7551   rm -rf conftest*
7552   eval "ac_cv_lib_$ac_lib_var=no"
7553 fi
7554 rm -f conftest*
7555 LIBS="$ac_save_LIBS"
7556
7557 fi
7558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7559   echo "$ac_t""yes" 1>&6
7560     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7561     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7562   cat >> confdefs.h <<EOF
7563 #define $ac_tr_lib 1
7564 EOF
7565
7566   LIBS="-lsecurity $LIBS"
7567
7568 else
7569   echo "$ac_t""no" 1>&6
7570 fi
7571  
7572      for ac_func in getspnam
7573 do
7574 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7575 echo "configure:7576: checking for $ac_func" >&5
7576 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7577   echo $ac_n "(cached) $ac_c" 1>&6
7578 else
7579   cat > conftest.$ac_ext <<EOF
7580 #line 7581 "configure"
7581 #include "confdefs.h"
7582 /* System header to define __stub macros and hopefully few prototypes,
7583     which can conflict with char $ac_func(); below.  */
7584 #include <assert.h>
7585 /* Override any gcc2 internal prototype to avoid an error.  */
7586 /* We use char because int might match the return type of a gcc2
7587     builtin and then its argument prototype would still apply.  */
7588 char $ac_func();
7589
7590 int main() {
7591
7592 /* The GNU C library defines this for functions which it implements
7593     to always fail with ENOSYS.  Some functions are actually named
7594     something starting with __ and the normal name is an alias.  */
7595 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7596 choke me
7597 #else
7598 $ac_func();
7599 #endif
7600
7601 ; return 0; }
7602 EOF
7603 if { (eval echo configure:7604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7604   rm -rf conftest*
7605   eval "ac_cv_func_$ac_func=yes"
7606 else
7607   echo "configure: failed program was:" >&5
7608   cat conftest.$ac_ext >&5
7609   rm -rf conftest*
7610   eval "ac_cv_func_$ac_func=no"
7611 fi
7612 rm -f conftest*
7613 fi
7614
7615 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7616   echo "$ac_t""yes" 1>&6
7617     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7618   cat >> confdefs.h <<EOF
7619 #define $ac_tr_func 1
7620 EOF
7621  
7622 else
7623   echo "$ac_t""no" 1>&6
7624 fi
7625 done
7626
7627   ;;
7628   esac
7629
7630 case "$LIBS" in
7631   *-lsec*) for ac_func in getspnam
7632 do
7633 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7634 echo "configure:7635: checking for $ac_func" >&5
7635 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7636   echo $ac_n "(cached) $ac_c" 1>&6
7637 else
7638   cat > conftest.$ac_ext <<EOF
7639 #line 7640 "configure"
7640 #include "confdefs.h"
7641 /* System header to define __stub macros and hopefully few prototypes,
7642     which can conflict with char $ac_func(); below.  */
7643 #include <assert.h>
7644 /* Override any gcc2 internal prototype to avoid an error.  */
7645 /* We use char because int might match the return type of a gcc2
7646     builtin and then its argument prototype would still apply.  */
7647 char $ac_func();
7648
7649 int main() {
7650
7651 /* The GNU C library defines this for functions which it implements
7652     to always fail with ENOSYS.  Some functions are actually named
7653     something starting with __ and the normal name is an alias.  */
7654 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7655 choke me
7656 #else
7657 $ac_func();
7658 #endif
7659
7660 ; return 0; }
7661 EOF
7662 if { (eval echo configure:7663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7663   rm -rf conftest*
7664   eval "ac_cv_func_$ac_func=yes"
7665 else
7666   echo "configure: failed program was:" >&5
7667   cat conftest.$ac_ext >&5
7668   rm -rf conftest*
7669   eval "ac_cv_func_$ac_func=no"
7670 fi
7671 rm -f conftest*
7672 fi
7673
7674 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7675   echo "$ac_t""yes" 1>&6
7676     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7677   cat >> confdefs.h <<EOF
7678 #define $ac_tr_func 1
7679 EOF
7680  
7681 else
7682   echo "$ac_t""no" 1>&6
7683 fi
7684 done
7685  ;;
7686   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7687 echo "configure:7688: checking for getspnam in -lsec" >&5
7688 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7689 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7690   echo $ac_n "(cached) $ac_c" 1>&6
7691 else
7692   ac_save_LIBS="$LIBS"
7693 LIBS="-lsec  $LIBS"
7694 cat > conftest.$ac_ext <<EOF
7695 #line 7696 "configure"
7696 #include "confdefs.h"
7697 /* Override any gcc2 internal prototype to avoid an error.  */
7698 /* We use char because int might match the return type of a gcc2
7699     builtin and then its argument prototype would still apply.  */
7700 char getspnam();
7701
7702 int main() {
7703 getspnam()
7704 ; return 0; }
7705 EOF
7706 if { (eval echo configure:7707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7707   rm -rf conftest*
7708   eval "ac_cv_lib_$ac_lib_var=yes"
7709 else
7710   echo "configure: failed program was:" >&5
7711   cat conftest.$ac_ext >&5
7712   rm -rf conftest*
7713   eval "ac_cv_lib_$ac_lib_var=no"
7714 fi
7715 rm -f conftest*
7716 LIBS="$ac_save_LIBS"
7717
7718 fi
7719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7720   echo "$ac_t""yes" 1>&6
7721     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7722     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7723   cat >> confdefs.h <<EOF
7724 #define $ac_tr_lib 1
7725 EOF
7726
7727   LIBS="-lsec $LIBS"
7728
7729 else
7730   echo "$ac_t""no" 1>&6
7731 fi
7732  
7733      for ac_func in getspnam
7734 do
7735 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7736 echo "configure:7737: checking for $ac_func" >&5
7737 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7738   echo $ac_n "(cached) $ac_c" 1>&6
7739 else
7740   cat > conftest.$ac_ext <<EOF
7741 #line 7742 "configure"
7742 #include "confdefs.h"
7743 /* System header to define __stub macros and hopefully few prototypes,
7744     which can conflict with char $ac_func(); below.  */
7745 #include <assert.h>
7746 /* Override any gcc2 internal prototype to avoid an error.  */
7747 /* We use char because int might match the return type of a gcc2
7748     builtin and then its argument prototype would still apply.  */
7749 char $ac_func();
7750
7751 int main() {
7752
7753 /* The GNU C library defines this for functions which it implements
7754     to always fail with ENOSYS.  Some functions are actually named
7755     something starting with __ and the normal name is an alias.  */
7756 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7757 choke me
7758 #else
7759 $ac_func();
7760 #endif
7761
7762 ; return 0; }
7763 EOF
7764 if { (eval echo configure:7765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7765   rm -rf conftest*
7766   eval "ac_cv_func_$ac_func=yes"
7767 else
7768   echo "configure: failed program was:" >&5
7769   cat conftest.$ac_ext >&5
7770   rm -rf conftest*
7771   eval "ac_cv_func_$ac_func=no"
7772 fi
7773 rm -f conftest*
7774 fi
7775
7776 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7777   echo "$ac_t""yes" 1>&6
7778     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7779   cat >> confdefs.h <<EOF
7780 #define $ac_tr_func 1
7781 EOF
7782  
7783 else
7784   echo "$ac_t""no" 1>&6
7785 fi
7786 done
7787
7788   ;;
7789   esac
7790
7791
7792 case "$LIBS" in
7793   *-lsecurity*) for ac_func in bigcrypt
7794 do
7795 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7796 echo "configure:7797: checking for $ac_func" >&5
7797 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7798   echo $ac_n "(cached) $ac_c" 1>&6
7799 else
7800   cat > conftest.$ac_ext <<EOF
7801 #line 7802 "configure"
7802 #include "confdefs.h"
7803 /* System header to define __stub macros and hopefully few prototypes,
7804     which can conflict with char $ac_func(); below.  */
7805 #include <assert.h>
7806 /* Override any gcc2 internal prototype to avoid an error.  */
7807 /* We use char because int might match the return type of a gcc2
7808     builtin and then its argument prototype would still apply.  */
7809 char $ac_func();
7810
7811 int main() {
7812
7813 /* The GNU C library defines this for functions which it implements
7814     to always fail with ENOSYS.  Some functions are actually named
7815     something starting with __ and the normal name is an alias.  */
7816 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7817 choke me
7818 #else
7819 $ac_func();
7820 #endif
7821
7822 ; return 0; }
7823 EOF
7824 if { (eval echo configure:7825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7825   rm -rf conftest*
7826   eval "ac_cv_func_$ac_func=yes"
7827 else
7828   echo "configure: failed program was:" >&5
7829   cat conftest.$ac_ext >&5
7830   rm -rf conftest*
7831   eval "ac_cv_func_$ac_func=no"
7832 fi
7833 rm -f conftest*
7834 fi
7835
7836 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7837   echo "$ac_t""yes" 1>&6
7838     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7839   cat >> confdefs.h <<EOF
7840 #define $ac_tr_func 1
7841 EOF
7842  
7843 else
7844   echo "$ac_t""no" 1>&6
7845 fi
7846 done
7847  ;;
7848   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7849 echo "configure:7850: checking for bigcrypt in -lsecurity" >&5
7850 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7851 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7852   echo $ac_n "(cached) $ac_c" 1>&6
7853 else
7854   ac_save_LIBS="$LIBS"
7855 LIBS="-lsecurity  $LIBS"
7856 cat > conftest.$ac_ext <<EOF
7857 #line 7858 "configure"
7858 #include "confdefs.h"
7859 /* Override any gcc2 internal prototype to avoid an error.  */
7860 /* We use char because int might match the return type of a gcc2
7861     builtin and then its argument prototype would still apply.  */
7862 char bigcrypt();
7863
7864 int main() {
7865 bigcrypt()
7866 ; return 0; }
7867 EOF
7868 if { (eval echo configure:7869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7869   rm -rf conftest*
7870   eval "ac_cv_lib_$ac_lib_var=yes"
7871 else
7872   echo "configure: failed program was:" >&5
7873   cat conftest.$ac_ext >&5
7874   rm -rf conftest*
7875   eval "ac_cv_lib_$ac_lib_var=no"
7876 fi
7877 rm -f conftest*
7878 LIBS="$ac_save_LIBS"
7879
7880 fi
7881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7882   echo "$ac_t""yes" 1>&6
7883     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7884     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7885   cat >> confdefs.h <<EOF
7886 #define $ac_tr_lib 1
7887 EOF
7888
7889   LIBS="-lsecurity $LIBS"
7890
7891 else
7892   echo "$ac_t""no" 1>&6
7893 fi
7894  
7895      for ac_func in bigcrypt
7896 do
7897 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7898 echo "configure:7899: checking for $ac_func" >&5
7899 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7900   echo $ac_n "(cached) $ac_c" 1>&6
7901 else
7902   cat > conftest.$ac_ext <<EOF
7903 #line 7904 "configure"
7904 #include "confdefs.h"
7905 /* System header to define __stub macros and hopefully few prototypes,
7906     which can conflict with char $ac_func(); below.  */
7907 #include <assert.h>
7908 /* Override any gcc2 internal prototype to avoid an error.  */
7909 /* We use char because int might match the return type of a gcc2
7910     builtin and then its argument prototype would still apply.  */
7911 char $ac_func();
7912
7913 int main() {
7914
7915 /* The GNU C library defines this for functions which it implements
7916     to always fail with ENOSYS.  Some functions are actually named
7917     something starting with __ and the normal name is an alias.  */
7918 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7919 choke me
7920 #else
7921 $ac_func();
7922 #endif
7923
7924 ; return 0; }
7925 EOF
7926 if { (eval echo configure:7927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7927   rm -rf conftest*
7928   eval "ac_cv_func_$ac_func=yes"
7929 else
7930   echo "configure: failed program was:" >&5
7931   cat conftest.$ac_ext >&5
7932   rm -rf conftest*
7933   eval "ac_cv_func_$ac_func=no"
7934 fi
7935 rm -f conftest*
7936 fi
7937
7938 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7939   echo "$ac_t""yes" 1>&6
7940     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7941   cat >> confdefs.h <<EOF
7942 #define $ac_tr_func 1
7943 EOF
7944  
7945 else
7946   echo "$ac_t""no" 1>&6
7947 fi
7948 done
7949
7950   ;;
7951   esac
7952
7953 case "$LIBS" in
7954   *-lsec*) for ac_func in bigcrypt
7955 do
7956 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7957 echo "configure:7958: checking for $ac_func" >&5
7958 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7959   echo $ac_n "(cached) $ac_c" 1>&6
7960 else
7961   cat > conftest.$ac_ext <<EOF
7962 #line 7963 "configure"
7963 #include "confdefs.h"
7964 /* System header to define __stub macros and hopefully few prototypes,
7965     which can conflict with char $ac_func(); below.  */
7966 #include <assert.h>
7967 /* Override any gcc2 internal prototype to avoid an error.  */
7968 /* We use char because int might match the return type of a gcc2
7969     builtin and then its argument prototype would still apply.  */
7970 char $ac_func();
7971
7972 int main() {
7973
7974 /* The GNU C library defines this for functions which it implements
7975     to always fail with ENOSYS.  Some functions are actually named
7976     something starting with __ and the normal name is an alias.  */
7977 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7978 choke me
7979 #else
7980 $ac_func();
7981 #endif
7982
7983 ; return 0; }
7984 EOF
7985 if { (eval echo configure:7986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7986   rm -rf conftest*
7987   eval "ac_cv_func_$ac_func=yes"
7988 else
7989   echo "configure: failed program was:" >&5
7990   cat conftest.$ac_ext >&5
7991   rm -rf conftest*
7992   eval "ac_cv_func_$ac_func=no"
7993 fi
7994 rm -f conftest*
7995 fi
7996
7997 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7998   echo "$ac_t""yes" 1>&6
7999     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8000   cat >> confdefs.h <<EOF
8001 #define $ac_tr_func 1
8002 EOF
8003  
8004 else
8005   echo "$ac_t""no" 1>&6
8006 fi
8007 done
8008  ;;
8009   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8010 echo "configure:8011: checking for bigcrypt in -lsec" >&5
8011 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8012 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8013   echo $ac_n "(cached) $ac_c" 1>&6
8014 else
8015   ac_save_LIBS="$LIBS"
8016 LIBS="-lsec  $LIBS"
8017 cat > conftest.$ac_ext <<EOF
8018 #line 8019 "configure"
8019 #include "confdefs.h"
8020 /* Override any gcc2 internal prototype to avoid an error.  */
8021 /* We use char because int might match the return type of a gcc2
8022     builtin and then its argument prototype would still apply.  */
8023 char bigcrypt();
8024
8025 int main() {
8026 bigcrypt()
8027 ; return 0; }
8028 EOF
8029 if { (eval echo configure:8030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8030   rm -rf conftest*
8031   eval "ac_cv_lib_$ac_lib_var=yes"
8032 else
8033   echo "configure: failed program was:" >&5
8034   cat conftest.$ac_ext >&5
8035   rm -rf conftest*
8036   eval "ac_cv_lib_$ac_lib_var=no"
8037 fi
8038 rm -f conftest*
8039 LIBS="$ac_save_LIBS"
8040
8041 fi
8042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8043   echo "$ac_t""yes" 1>&6
8044     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8045     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8046   cat >> confdefs.h <<EOF
8047 #define $ac_tr_lib 1
8048 EOF
8049
8050   LIBS="-lsec $LIBS"
8051
8052 else
8053   echo "$ac_t""no" 1>&6
8054 fi
8055  
8056      for ac_func in bigcrypt
8057 do
8058 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8059 echo "configure:8060: checking for $ac_func" >&5
8060 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8061   echo $ac_n "(cached) $ac_c" 1>&6
8062 else
8063   cat > conftest.$ac_ext <<EOF
8064 #line 8065 "configure"
8065 #include "confdefs.h"
8066 /* System header to define __stub macros and hopefully few prototypes,
8067     which can conflict with char $ac_func(); below.  */
8068 #include <assert.h>
8069 /* Override any gcc2 internal prototype to avoid an error.  */
8070 /* We use char because int might match the return type of a gcc2
8071     builtin and then its argument prototype would still apply.  */
8072 char $ac_func();
8073
8074 int main() {
8075
8076 /* The GNU C library defines this for functions which it implements
8077     to always fail with ENOSYS.  Some functions are actually named
8078     something starting with __ and the normal name is an alias.  */
8079 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8080 choke me
8081 #else
8082 $ac_func();
8083 #endif
8084
8085 ; return 0; }
8086 EOF
8087 if { (eval echo configure:8088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8088   rm -rf conftest*
8089   eval "ac_cv_func_$ac_func=yes"
8090 else
8091   echo "configure: failed program was:" >&5
8092   cat conftest.$ac_ext >&5
8093   rm -rf conftest*
8094   eval "ac_cv_func_$ac_func=no"
8095 fi
8096 rm -f conftest*
8097 fi
8098
8099 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8100   echo "$ac_t""yes" 1>&6
8101     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8102   cat >> confdefs.h <<EOF
8103 #define $ac_tr_func 1
8104 EOF
8105  
8106 else
8107   echo "$ac_t""no" 1>&6
8108 fi
8109 done
8110
8111   ;;
8112   esac
8113
8114
8115 case "$LIBS" in
8116   *-lsecurity*) for ac_func in getprpwnam
8117 do
8118 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8119 echo "configure:8120: checking for $ac_func" >&5
8120 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8121   echo $ac_n "(cached) $ac_c" 1>&6
8122 else
8123   cat > conftest.$ac_ext <<EOF
8124 #line 8125 "configure"
8125 #include "confdefs.h"
8126 /* System header to define __stub macros and hopefully few prototypes,
8127     which can conflict with char $ac_func(); below.  */
8128 #include <assert.h>
8129 /* Override any gcc2 internal prototype to avoid an error.  */
8130 /* We use char because int might match the return type of a gcc2
8131     builtin and then its argument prototype would still apply.  */
8132 char $ac_func();
8133
8134 int main() {
8135
8136 /* The GNU C library defines this for functions which it implements
8137     to always fail with ENOSYS.  Some functions are actually named
8138     something starting with __ and the normal name is an alias.  */
8139 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8140 choke me
8141 #else
8142 $ac_func();
8143 #endif
8144
8145 ; return 0; }
8146 EOF
8147 if { (eval echo configure:8148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8148   rm -rf conftest*
8149   eval "ac_cv_func_$ac_func=yes"
8150 else
8151   echo "configure: failed program was:" >&5
8152   cat conftest.$ac_ext >&5
8153   rm -rf conftest*
8154   eval "ac_cv_func_$ac_func=no"
8155 fi
8156 rm -f conftest*
8157 fi
8158
8159 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8160   echo "$ac_t""yes" 1>&6
8161     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8162   cat >> confdefs.h <<EOF
8163 #define $ac_tr_func 1
8164 EOF
8165  
8166 else
8167   echo "$ac_t""no" 1>&6
8168 fi
8169 done
8170  ;;
8171   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8172 echo "configure:8173: checking for getprpwnam in -lsecurity" >&5
8173 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8174 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8175   echo $ac_n "(cached) $ac_c" 1>&6
8176 else
8177   ac_save_LIBS="$LIBS"
8178 LIBS="-lsecurity  $LIBS"
8179 cat > conftest.$ac_ext <<EOF
8180 #line 8181 "configure"
8181 #include "confdefs.h"
8182 /* Override any gcc2 internal prototype to avoid an error.  */
8183 /* We use char because int might match the return type of a gcc2
8184     builtin and then its argument prototype would still apply.  */
8185 char getprpwnam();
8186
8187 int main() {
8188 getprpwnam()
8189 ; return 0; }
8190 EOF
8191 if { (eval echo configure:8192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8192   rm -rf conftest*
8193   eval "ac_cv_lib_$ac_lib_var=yes"
8194 else
8195   echo "configure: failed program was:" >&5
8196   cat conftest.$ac_ext >&5
8197   rm -rf conftest*
8198   eval "ac_cv_lib_$ac_lib_var=no"
8199 fi
8200 rm -f conftest*
8201 LIBS="$ac_save_LIBS"
8202
8203 fi
8204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8205   echo "$ac_t""yes" 1>&6
8206     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8207     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8208   cat >> confdefs.h <<EOF
8209 #define $ac_tr_lib 1
8210 EOF
8211
8212   LIBS="-lsecurity $LIBS"
8213
8214 else
8215   echo "$ac_t""no" 1>&6
8216 fi
8217  
8218      for ac_func in getprpwnam
8219 do
8220 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8221 echo "configure:8222: checking for $ac_func" >&5
8222 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8223   echo $ac_n "(cached) $ac_c" 1>&6
8224 else
8225   cat > conftest.$ac_ext <<EOF
8226 #line 8227 "configure"
8227 #include "confdefs.h"
8228 /* System header to define __stub macros and hopefully few prototypes,
8229     which can conflict with char $ac_func(); below.  */
8230 #include <assert.h>
8231 /* Override any gcc2 internal prototype to avoid an error.  */
8232 /* We use char because int might match the return type of a gcc2
8233     builtin and then its argument prototype would still apply.  */
8234 char $ac_func();
8235
8236 int main() {
8237
8238 /* The GNU C library defines this for functions which it implements
8239     to always fail with ENOSYS.  Some functions are actually named
8240     something starting with __ and the normal name is an alias.  */
8241 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8242 choke me
8243 #else
8244 $ac_func();
8245 #endif
8246
8247 ; return 0; }
8248 EOF
8249 if { (eval echo configure:8250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8250   rm -rf conftest*
8251   eval "ac_cv_func_$ac_func=yes"
8252 else
8253   echo "configure: failed program was:" >&5
8254   cat conftest.$ac_ext >&5
8255   rm -rf conftest*
8256   eval "ac_cv_func_$ac_func=no"
8257 fi
8258 rm -f conftest*
8259 fi
8260
8261 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8262   echo "$ac_t""yes" 1>&6
8263     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8264   cat >> confdefs.h <<EOF
8265 #define $ac_tr_func 1
8266 EOF
8267  
8268 else
8269   echo "$ac_t""no" 1>&6
8270 fi
8271 done
8272
8273   ;;
8274   esac
8275
8276 case "$LIBS" in
8277   *-lsec*) for ac_func in getprpwnam
8278 do
8279 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8280 echo "configure:8281: checking for $ac_func" >&5
8281 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8282   echo $ac_n "(cached) $ac_c" 1>&6
8283 else
8284   cat > conftest.$ac_ext <<EOF
8285 #line 8286 "configure"
8286 #include "confdefs.h"
8287 /* System header to define __stub macros and hopefully few prototypes,
8288     which can conflict with char $ac_func(); below.  */
8289 #include <assert.h>
8290 /* Override any gcc2 internal prototype to avoid an error.  */
8291 /* We use char because int might match the return type of a gcc2
8292     builtin and then its argument prototype would still apply.  */
8293 char $ac_func();
8294
8295 int main() {
8296
8297 /* The GNU C library defines this for functions which it implements
8298     to always fail with ENOSYS.  Some functions are actually named
8299     something starting with __ and the normal name is an alias.  */
8300 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8301 choke me
8302 #else
8303 $ac_func();
8304 #endif
8305
8306 ; return 0; }
8307 EOF
8308 if { (eval echo configure:8309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8309   rm -rf conftest*
8310   eval "ac_cv_func_$ac_func=yes"
8311 else
8312   echo "configure: failed program was:" >&5
8313   cat conftest.$ac_ext >&5
8314   rm -rf conftest*
8315   eval "ac_cv_func_$ac_func=no"
8316 fi
8317 rm -f conftest*
8318 fi
8319
8320 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8321   echo "$ac_t""yes" 1>&6
8322     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8323   cat >> confdefs.h <<EOF
8324 #define $ac_tr_func 1
8325 EOF
8326  
8327 else
8328   echo "$ac_t""no" 1>&6
8329 fi
8330 done
8331  ;;
8332   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8333 echo "configure:8334: checking for getprpwnam in -lsec" >&5
8334 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8335 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8336   echo $ac_n "(cached) $ac_c" 1>&6
8337 else
8338   ac_save_LIBS="$LIBS"
8339 LIBS="-lsec  $LIBS"
8340 cat > conftest.$ac_ext <<EOF
8341 #line 8342 "configure"
8342 #include "confdefs.h"
8343 /* Override any gcc2 internal prototype to avoid an error.  */
8344 /* We use char because int might match the return type of a gcc2
8345     builtin and then its argument prototype would still apply.  */
8346 char getprpwnam();
8347
8348 int main() {
8349 getprpwnam()
8350 ; return 0; }
8351 EOF
8352 if { (eval echo configure:8353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8353   rm -rf conftest*
8354   eval "ac_cv_lib_$ac_lib_var=yes"
8355 else
8356   echo "configure: failed program was:" >&5
8357   cat conftest.$ac_ext >&5
8358   rm -rf conftest*
8359   eval "ac_cv_lib_$ac_lib_var=no"
8360 fi
8361 rm -f conftest*
8362 LIBS="$ac_save_LIBS"
8363
8364 fi
8365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8366   echo "$ac_t""yes" 1>&6
8367     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8368     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8369   cat >> confdefs.h <<EOF
8370 #define $ac_tr_lib 1
8371 EOF
8372
8373   LIBS="-lsec $LIBS"
8374
8375 else
8376   echo "$ac_t""no" 1>&6
8377 fi
8378  
8379      for ac_func in getprpwnam
8380 do
8381 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8382 echo "configure:8383: checking for $ac_func" >&5
8383 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8384   echo $ac_n "(cached) $ac_c" 1>&6
8385 else
8386   cat > conftest.$ac_ext <<EOF
8387 #line 8388 "configure"
8388 #include "confdefs.h"
8389 /* System header to define __stub macros and hopefully few prototypes,
8390     which can conflict with char $ac_func(); below.  */
8391 #include <assert.h>
8392 /* Override any gcc2 internal prototype to avoid an error.  */
8393 /* We use char because int might match the return type of a gcc2
8394     builtin and then its argument prototype would still apply.  */
8395 char $ac_func();
8396
8397 int main() {
8398
8399 /* The GNU C library defines this for functions which it implements
8400     to always fail with ENOSYS.  Some functions are actually named
8401     something starting with __ and the normal name is an alias.  */
8402 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8403 choke me
8404 #else
8405 $ac_func();
8406 #endif
8407
8408 ; return 0; }
8409 EOF
8410 if { (eval echo configure:8411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8411   rm -rf conftest*
8412   eval "ac_cv_func_$ac_func=yes"
8413 else
8414   echo "configure: failed program was:" >&5
8415   cat conftest.$ac_ext >&5
8416   rm -rf conftest*
8417   eval "ac_cv_func_$ac_func=no"
8418 fi
8419 rm -f conftest*
8420 fi
8421
8422 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8423   echo "$ac_t""yes" 1>&6
8424     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8425   cat >> confdefs.h <<EOF
8426 #define $ac_tr_func 1
8427 EOF
8428  
8429 else
8430   echo "$ac_t""no" 1>&6
8431 fi
8432 done
8433
8434   ;;
8435   esac
8436
8437
8438 # this bit needs to be modified for each OS that is suported by
8439 # smbwrapper. You need to specify how to created a shared library and
8440 # how to compile C code to produce PIC object files
8441
8442 # these are the defaults, good for lots of systems
8443 HOST_OS="$host_os"
8444 LDSHFLAGS="-shared"
8445 SHLD="\${CC}"
8446 PICFLAG=""
8447 PICSUFFIX="po"
8448 POBAD_CC="#"
8449 SHLIBEXT="so"
8450 # Assume non-shared by default and override below
8451 BLDSHARED="false"
8452 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8453 echo "configure:8454: checking ability to build shared libraries" >&5
8454
8455 # and these are for particular systems
8456 case "$host_os" in
8457                 *linux*)   cat >> confdefs.h <<\EOF
8458 #define LINUX 1
8459 EOF
8460
8461                         BLDSHARED="true"
8462                         LDSHFLAGS="-shared" 
8463                         PICFLAG="-fPIC"
8464                 ;;
8465                 *solaris*) cat >> confdefs.h <<\EOF
8466 #define SUNOS5 1
8467 EOF
8468
8469                         BLDSHARED="true"
8470                         LDSHFLAGS="-h \$@ -G"
8471                         if test "${ac_cv_prog_CC}" = "gcc"; then
8472                                 PICFLAG="-fPIC"
8473                         else
8474                                 PICFLAG="-KPIC"
8475                                 POBAD_CC=""
8476                                 PICSUFFIX="po.o"
8477                         fi
8478                 ;;
8479                 *sunos*) cat >> confdefs.h <<\EOF
8480 #define SUNOS4 1
8481 EOF
8482
8483                         BLDSHARED="true"
8484                         LDSHFLAGS="-Wl,-h,\$@ -G"
8485                         PICFLAG="-KPIC"   # Is this correct for SunOS
8486                 ;;
8487                 *bsd*)  BLDSHARED="true"
8488                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8489                         PICFLAG="-fPIC"
8490                 ;;
8491                 *irix*) cat >> confdefs.h <<\EOF
8492 #define IRIX 1
8493 EOF
8494
8495                         case "$host_os" in
8496                         *irix6*) cat >> confdefs.h <<\EOF
8497 #define IRIX6 1
8498 EOF
8499
8500                         ;;
8501                         esac
8502                         ATTEMPT_WRAP32_BUILD=yes
8503                         BLDSHARED="true"
8504                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8505                         if test "${ac_cv_prog_CC}" = "gcc"; then
8506                                 PICFLAG="-fPIC"
8507                         else 
8508                                 PICFLAG="-KPIC"
8509                         fi
8510                 ;;
8511                 *aix*) cat >> confdefs.h <<\EOF
8512 #define AIX 1
8513 EOF
8514
8515                         BLDSHARED="true"
8516                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8517                         PICFLAG="-O2 -qmaxmem=6000"
8518                 ;;
8519                 *hpux*) cat >> confdefs.h <<\EOF
8520 #define HPUX 1
8521 EOF
8522
8523                         SHLIBEXT="sl"
8524                         # Use special PIC flags for the native HP-UX compiler.
8525                         if test $ac_cv_prog_cc_Ae = yes; then
8526                                 #BLDSHARED="true"
8527                                 LDSHFLAGS="-b -z +h \$@"
8528                                 PICFLAG="+z"
8529                         fi
8530                 ;;
8531                 *qnx*) cat >> confdefs.h <<\EOF
8532 #define QNX 1
8533 EOF
8534 ;;
8535                 *osf*) cat >> confdefs.h <<\EOF
8536 #define OSF1 1
8537 EOF
8538
8539                         BLDSHARED="true"
8540                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8541                         PICFLAG="-fPIC"
8542                 ;;
8543                 *sco*) cat >> confdefs.h <<\EOF
8544 #define SCO 1
8545 EOF
8546 ;;
8547                 *unixware*) cat >> confdefs.h <<\EOF
8548 #define UNIXWARE 1
8549 EOF
8550
8551                         BLDSHARED="true"
8552                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8553                         PICFLAG="-KPIC"
8554                 ;;
8555                 *next2*) cat >> confdefs.h <<\EOF
8556 #define NEXT2 1
8557 EOF
8558 ;;
8559                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8560 set dummy groff; ac_word=$2
8561 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8562 echo "configure:8563: checking for $ac_word" >&5
8563 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8564   echo $ac_n "(cached) $ac_c" 1>&6
8565 else
8566   if test -n "$ROFF"; then
8567   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8568 else
8569   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8570   ac_dummy="$PATH"
8571   for ac_dir in $ac_dummy; do
8572     test -z "$ac_dir" && ac_dir=.
8573     if test -f $ac_dir/$ac_word; then
8574       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8575       break
8576     fi
8577   done
8578   IFS="$ac_save_ifs"
8579 fi
8580 fi
8581 ROFF="$ac_cv_prog_ROFF"
8582 if test -n "$ROFF"; then
8583   echo "$ac_t""$ROFF" 1>&6
8584 else
8585   echo "$ac_t""no" 1>&6
8586 fi
8587 ;;
8588                 *sysv4*)
8589                         case "$host" in
8590                                 *-univel-*)     if  test "$GCC" != yes ; then
8591                                                                         cat >> confdefs.h <<\EOF
8592 #define HAVE_MEMSET 1
8593 EOF
8594
8595                                                                 fi
8596                                                                 LDSHFLAGS="-G"
8597                                 ;;
8598                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8599 #define RELIANTUNIX 1
8600 EOF
8601 ;;
8602                         esac
8603                         ;;
8604                 *sysv5*)
8605                         if  test "$GCC" != yes ; then
8606                                 cat >> confdefs.h <<\EOF
8607 #define HAVE_MEMSET 1
8608 EOF
8609
8610                         fi
8611                         LDSHFLAGS="-G"
8612                         ;;
8613 esac
8614 echo "$ac_t""$BLDSHARED" 1>&6
8615 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
8616 echo "configure:8617: checking linker flags for shared libraries" >&5
8617 echo "$ac_t""$LDSHFLAGS" 1>&6
8618 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
8619 echo "configure:8620: checking compiler flags for position-independent code" >&5
8620 echo "$ac_t""$PICFLAGS" 1>&6
8621
8622 # this updates our target list if we can build shared libs
8623 if test $BLDSHARED = true; then
8624    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8625 else
8626    LIBSMBCLIENT_SHARED=
8627 fi
8628
8629 ################
8630
8631 echo $ac_n "checking for long long""... $ac_c" 1>&6
8632 echo "configure:8633: checking for long long" >&5
8633 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8634   echo $ac_n "(cached) $ac_c" 1>&6
8635 else
8636   
8637 if test "$cross_compiling" = yes; then
8638   samba_cv_have_longlong=cross
8639 else
8640   cat > conftest.$ac_ext <<EOF
8641 #line 8642 "configure"
8642 #include "confdefs.h"
8643 #include <stdio.h>
8644 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8645 EOF
8646 if { (eval echo configure:8647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8647 then
8648   samba_cv_have_longlong=yes
8649 else
8650   echo "configure: failed program was:" >&5
8651   cat conftest.$ac_ext >&5
8652   rm -fr conftest*
8653   samba_cv_have_longlong=no
8654 fi
8655 rm -fr conftest*
8656 fi
8657
8658 fi
8659
8660 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8661 if test x"$samba_cv_have_longlong" = x"yes"; then
8662     cat >> confdefs.h <<\EOF
8663 #define HAVE_LONGLONG 1
8664 EOF
8665
8666 fi
8667
8668 #
8669 # Check if the compiler supports the LL prefix on long long integers.
8670 # AIX needs this.
8671
8672 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8673 echo "configure:8674: checking for LL suffix on long long integers" >&5
8674 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8675   echo $ac_n "(cached) $ac_c" 1>&6
8676 else
8677   
8678     cat > conftest.$ac_ext <<EOF
8679 #line 8680 "configure"
8680 #include "confdefs.h"
8681 #include <stdio.h>
8682 int main() {
8683 long long i = 0x8000000000LL
8684 ; return 0; }
8685 EOF
8686 if { (eval echo configure:8687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8687   rm -rf conftest*
8688   samba_cv_compiler_supports_ll=yes
8689 else
8690   echo "configure: failed program was:" >&5
8691   cat conftest.$ac_ext >&5
8692   rm -rf conftest*
8693   samba_cv_compiler_supports_ll=no
8694 fi
8695 rm -f conftest*
8696 fi
8697
8698 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8699 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8700    cat >> confdefs.h <<\EOF
8701 #define COMPILER_SUPPORTS_LL 1
8702 EOF
8703
8704 fi
8705
8706   
8707 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8708 echo "configure:8709: checking for 64 bit off_t" >&5
8709 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8710   echo $ac_n "(cached) $ac_c" 1>&6
8711 else
8712   
8713 if test "$cross_compiling" = yes; then
8714   samba_cv_SIZEOF_OFF_T=cross
8715 else
8716   cat > conftest.$ac_ext <<EOF
8717 #line 8718 "configure"
8718 #include "confdefs.h"
8719 #include <stdio.h>
8720 #include <sys/stat.h>
8721 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8722 EOF
8723 if { (eval echo configure:8724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8724 then
8725   samba_cv_SIZEOF_OFF_T=yes
8726 else
8727   echo "configure: failed program was:" >&5
8728   cat conftest.$ac_ext >&5
8729   rm -fr conftest*
8730   samba_cv_SIZEOF_OFF_T=no
8731 fi
8732 rm -fr conftest*
8733 fi
8734
8735 fi
8736
8737 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8738 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8739     cat >> confdefs.h <<\EOF
8740 #define SIZEOF_OFF_T 8
8741 EOF
8742
8743 fi
8744
8745 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8746 echo "configure:8747: checking for off64_t" >&5
8747 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8748   echo $ac_n "(cached) $ac_c" 1>&6
8749 else
8750   
8751 if test "$cross_compiling" = yes; then
8752   samba_cv_HAVE_OFF64_T=cross
8753 else
8754   cat > conftest.$ac_ext <<EOF
8755 #line 8756 "configure"
8756 #include "confdefs.h"
8757
8758 #if defined(HAVE_UNISTD_H)
8759 #include <unistd.h>
8760 #endif
8761 #include <stdio.h>
8762 #include <sys/stat.h>
8763 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8764 EOF
8765 if { (eval echo configure:8766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8766 then
8767   samba_cv_HAVE_OFF64_T=yes
8768 else
8769   echo "configure: failed program was:" >&5
8770   cat conftest.$ac_ext >&5
8771   rm -fr conftest*
8772   samba_cv_HAVE_OFF64_T=no
8773 fi
8774 rm -fr conftest*
8775 fi
8776
8777 fi
8778
8779 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8780 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8781     cat >> confdefs.h <<\EOF
8782 #define HAVE_OFF64_T 1
8783 EOF
8784
8785 fi
8786
8787 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8788 echo "configure:8789: checking for 64 bit ino_t" >&5
8789 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8790   echo $ac_n "(cached) $ac_c" 1>&6
8791 else
8792   
8793 if test "$cross_compiling" = yes; then
8794   samba_cv_SIZEOF_INO_T=cross
8795 else
8796   cat > conftest.$ac_ext <<EOF
8797 #line 8798 "configure"
8798 #include "confdefs.h"
8799 #include <stdio.h>
8800 #include <sys/stat.h>
8801 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8802 EOF
8803 if { (eval echo configure:8804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8804 then
8805   samba_cv_SIZEOF_INO_T=yes
8806 else
8807   echo "configure: failed program was:" >&5
8808   cat conftest.$ac_ext >&5
8809   rm -fr conftest*
8810   samba_cv_SIZEOF_INO_T=no
8811 fi
8812 rm -fr conftest*
8813 fi
8814
8815 fi
8816
8817 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8818 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8819     cat >> confdefs.h <<\EOF
8820 #define SIZEOF_INO_T 8
8821 EOF
8822
8823 fi
8824
8825 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8826 echo "configure:8827: checking for ino64_t" >&5
8827 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8828   echo $ac_n "(cached) $ac_c" 1>&6
8829 else
8830   
8831 if test "$cross_compiling" = yes; then
8832   samba_cv_HAVE_INO64_T=cross
8833 else
8834   cat > conftest.$ac_ext <<EOF
8835 #line 8836 "configure"
8836 #include "confdefs.h"
8837
8838 #if defined(HAVE_UNISTD_H)
8839 #include <unistd.h>
8840 #endif
8841 #include <stdio.h>
8842 #include <sys/stat.h>
8843 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8844 EOF
8845 if { (eval echo configure:8846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8846 then
8847   samba_cv_HAVE_INO64_T=yes
8848 else
8849   echo "configure: failed program was:" >&5
8850   cat conftest.$ac_ext >&5
8851   rm -fr conftest*
8852   samba_cv_HAVE_INO64_T=no
8853 fi
8854 rm -fr conftest*
8855 fi
8856
8857 fi
8858
8859 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8860 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8861     cat >> confdefs.h <<\EOF
8862 #define HAVE_INO64_T 1
8863 EOF
8864
8865 fi
8866
8867 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8868 echo "configure:8869: checking for struct dirent64" >&5
8869 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8870   echo $ac_n "(cached) $ac_c" 1>&6
8871 else
8872   
8873 cat > conftest.$ac_ext <<EOF
8874 #line 8875 "configure"
8875 #include "confdefs.h"
8876
8877 #if defined(HAVE_UNISTD_H)
8878 #include <unistd.h>
8879 #endif
8880 #include <sys/types.h>
8881 #include <dirent.h>
8882 int main() {
8883 struct dirent64 de;
8884 ; return 0; }
8885 EOF
8886 if { (eval echo configure:8887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8887   rm -rf conftest*
8888   samba_cv_HAVE_STRUCT_DIRENT64=yes
8889 else
8890   echo "configure: failed program was:" >&5
8891   cat conftest.$ac_ext >&5
8892   rm -rf conftest*
8893   samba_cv_HAVE_STRUCT_DIRENT64=no
8894 fi
8895 rm -f conftest*
8896 fi
8897
8898 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8899 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8900     cat >> confdefs.h <<\EOF
8901 #define HAVE_STRUCT_DIRENT64 1
8902 EOF
8903
8904 fi
8905
8906 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8907 echo "configure:8908: checking for unsigned char" >&5
8908 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8909   echo $ac_n "(cached) $ac_c" 1>&6
8910 else
8911   
8912 if test "$cross_compiling" = yes; then
8913   samba_cv_HAVE_UNSIGNED_CHAR=cross
8914 else
8915   cat > conftest.$ac_ext <<EOF
8916 #line 8917 "configure"
8917 #include "confdefs.h"
8918 #include <stdio.h>
8919 main() { char c; c=250; exit((c > 0)?0:1); }
8920 EOF
8921 if { (eval echo configure:8922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8922 then
8923   samba_cv_HAVE_UNSIGNED_CHAR=yes
8924 else
8925   echo "configure: failed program was:" >&5
8926   cat conftest.$ac_ext >&5
8927   rm -fr conftest*
8928   samba_cv_HAVE_UNSIGNED_CHAR=no
8929 fi
8930 rm -fr conftest*
8931 fi
8932
8933 fi
8934
8935 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8936 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8937     cat >> confdefs.h <<\EOF
8938 #define HAVE_UNSIGNED_CHAR 1
8939 EOF
8940
8941 fi
8942
8943 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8944 echo "configure:8945: checking for sin_len in sock" >&5
8945 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8946   echo $ac_n "(cached) $ac_c" 1>&6
8947 else
8948   
8949 cat > conftest.$ac_ext <<EOF
8950 #line 8951 "configure"
8951 #include "confdefs.h"
8952 #include <sys/types.h>
8953 #include <sys/socket.h>
8954 #include <netinet/in.h>
8955 int main() {
8956 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8957 ; return 0; }
8958 EOF
8959 if { (eval echo configure:8960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8960   rm -rf conftest*
8961   samba_cv_HAVE_SOCK_SIN_LEN=yes
8962 else
8963   echo "configure: failed program was:" >&5
8964   cat conftest.$ac_ext >&5
8965   rm -rf conftest*
8966   samba_cv_HAVE_SOCK_SIN_LEN=no
8967 fi
8968 rm -f conftest*
8969 fi
8970
8971 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8972 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8973     cat >> confdefs.h <<\EOF
8974 #define HAVE_SOCK_SIN_LEN 1
8975 EOF
8976
8977 fi
8978
8979 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8980 echo "configure:8981: checking whether seekdir returns void" >&5
8981 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8982   echo $ac_n "(cached) $ac_c" 1>&6
8983 else
8984   
8985 cat > conftest.$ac_ext <<EOF
8986 #line 8987 "configure"
8987 #include "confdefs.h"
8988 #include <sys/types.h>
8989 #include <dirent.h>
8990 void seekdir(DIR *d, long loc) { return; }
8991 int main() {
8992 return 0;
8993 ; return 0; }
8994 EOF
8995 if { (eval echo configure:8996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8996   rm -rf conftest*
8997   samba_cv_SEEKDIR_RETURNS_VOID=yes
8998 else
8999   echo "configure: failed program was:" >&5
9000   cat conftest.$ac_ext >&5
9001   rm -rf conftest*
9002   samba_cv_SEEKDIR_RETURNS_VOID=no
9003 fi
9004 rm -f conftest*
9005 fi
9006
9007 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9008 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9009     cat >> confdefs.h <<\EOF
9010 #define SEEKDIR_RETURNS_VOID 1
9011 EOF
9012
9013 fi
9014
9015 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9016 echo "configure:9017: checking for __FILE__ macro" >&5
9017 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9018   echo $ac_n "(cached) $ac_c" 1>&6
9019 else
9020   
9021 cat > conftest.$ac_ext <<EOF
9022 #line 9023 "configure"
9023 #include "confdefs.h"
9024 #include <stdio.h>
9025 int main() {
9026 printf("%s\n", __FILE__);
9027 ; return 0; }
9028 EOF
9029 if { (eval echo configure:9030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9030   rm -rf conftest*
9031   samba_cv_HAVE_FILE_MACRO=yes
9032 else
9033   echo "configure: failed program was:" >&5
9034   cat conftest.$ac_ext >&5
9035   rm -rf conftest*
9036   samba_cv_HAVE_FILE_MACRO=no
9037 fi
9038 rm -f conftest*
9039 fi
9040
9041 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9042 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9043     cat >> confdefs.h <<\EOF
9044 #define HAVE_FILE_MACRO 1
9045 EOF
9046
9047 fi
9048
9049 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9050 echo "configure:9051: checking for __FUNCTION__ macro" >&5
9051 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9052   echo $ac_n "(cached) $ac_c" 1>&6
9053 else
9054   
9055 cat > conftest.$ac_ext <<EOF
9056 #line 9057 "configure"
9057 #include "confdefs.h"
9058 #include <stdio.h>
9059 int main() {
9060 printf("%s\n", __FUNCTION__);
9061 ; return 0; }
9062 EOF
9063 if { (eval echo configure:9064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9064   rm -rf conftest*
9065   samba_cv_HAVE_FUNCTION_MACRO=yes
9066 else
9067   echo "configure: failed program was:" >&5
9068   cat conftest.$ac_ext >&5
9069   rm -rf conftest*
9070   samba_cv_HAVE_FUNCTION_MACRO=no
9071 fi
9072 rm -f conftest*
9073 fi
9074
9075 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9076 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9077     cat >> confdefs.h <<\EOF
9078 #define HAVE_FUNCTION_MACRO 1
9079 EOF
9080
9081 fi
9082
9083 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9084 echo "configure:9085: checking if gettimeofday takes tz argument" >&5
9085 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9086   echo $ac_n "(cached) $ac_c" 1>&6
9087 else
9088   
9089 if test "$cross_compiling" = yes; then
9090   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9091 else
9092   cat > conftest.$ac_ext <<EOF
9093 #line 9094 "configure"
9094 #include "confdefs.h"
9095
9096 #include <sys/time.h>
9097 #include <unistd.h>
9098 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9099 EOF
9100 if { (eval echo configure:9101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9101 then
9102   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9103 else
9104   echo "configure: failed program was:" >&5
9105   cat conftest.$ac_ext >&5
9106   rm -fr conftest*
9107   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9108 fi
9109 rm -fr conftest*
9110 fi
9111
9112 fi
9113
9114 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9115 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9116     cat >> confdefs.h <<\EOF
9117 #define HAVE_GETTIMEOFDAY_TZ 1
9118 EOF
9119
9120 fi
9121
9122 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9123 echo "configure:9124: checking for C99 vsnprintf" >&5
9124 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9125   echo $ac_n "(cached) $ac_c" 1>&6
9126 else
9127   
9128 if test "$cross_compiling" = yes; then
9129   samba_cv_HAVE_C99_VSNPRINTF=cross
9130 else
9131   cat > conftest.$ac_ext <<EOF
9132 #line 9133 "configure"
9133 #include "confdefs.h"
9134
9135 #include <sys/types.h>
9136 #include <stdarg.h>
9137 void foo(const char *format, ...) { 
9138        va_list ap;
9139        int len;
9140        char buf[5];
9141
9142        va_start(ap, format);
9143        len = vsnprintf(0, 0, format, ap);
9144        va_end(ap);
9145        if (len != 5) exit(1);
9146
9147        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9148
9149        exit(0);
9150 }
9151 main() { foo("hello"); }
9152
9153 EOF
9154 if { (eval echo configure:9155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9155 then
9156   samba_cv_HAVE_C99_VSNPRINTF=yes
9157 else
9158   echo "configure: failed program was:" >&5
9159   cat conftest.$ac_ext >&5
9160   rm -fr conftest*
9161   samba_cv_HAVE_C99_VSNPRINTF=no
9162 fi
9163 rm -fr conftest*
9164 fi
9165
9166 fi
9167
9168 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9169 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9170     cat >> confdefs.h <<\EOF
9171 #define HAVE_C99_VSNPRINTF 1
9172 EOF
9173
9174 fi
9175
9176 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9177 echo "configure:9178: checking for broken readdir" >&5
9178 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9179   echo $ac_n "(cached) $ac_c" 1>&6
9180 else
9181   
9182 if test "$cross_compiling" = yes; then
9183   samba_cv_HAVE_BROKEN_READDIR=cross
9184 else
9185   cat > conftest.$ac_ext <<EOF
9186 #line 9187 "configure"
9187 #include "confdefs.h"
9188 #include <sys/types.h>
9189 #include <dirent.h>
9190 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9191 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9192 di->d_name[0] == 0) exit(0); exit(1);} 
9193 EOF
9194 if { (eval echo configure:9195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9195 then
9196   samba_cv_HAVE_BROKEN_READDIR=yes
9197 else
9198   echo "configure: failed program was:" >&5
9199   cat conftest.$ac_ext >&5
9200   rm -fr conftest*
9201   samba_cv_HAVE_BROKEN_READDIR=no
9202 fi
9203 rm -fr conftest*
9204 fi
9205
9206 fi
9207
9208 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9209 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9210     cat >> confdefs.h <<\EOF
9211 #define HAVE_BROKEN_READDIR 1
9212 EOF
9213
9214 fi
9215
9216 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9217 echo "configure:9218: checking for utimbuf" >&5
9218 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9219   echo $ac_n "(cached) $ac_c" 1>&6
9220 else
9221   
9222 cat > conftest.$ac_ext <<EOF
9223 #line 9224 "configure"
9224 #include "confdefs.h"
9225 #include <sys/types.h>
9226 #include <utime.h>
9227 int main() {
9228 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9229 ; return 0; }
9230 EOF
9231 if { (eval echo configure:9232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9232   rm -rf conftest*
9233   samba_cv_HAVE_UTIMBUF=yes
9234 else
9235   echo "configure: failed program was:" >&5
9236   cat conftest.$ac_ext >&5
9237   rm -rf conftest*
9238   samba_cv_HAVE_UTIMBUF=no
9239 fi
9240 rm -f conftest*
9241 fi
9242
9243 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9244 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9245     cat >> confdefs.h <<\EOF
9246 #define HAVE_UTIMBUF 1
9247 EOF
9248
9249 fi
9250
9251
9252 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9253 do
9254 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9255 echo "configure:9256: checking for $ac_func" >&5
9256 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9257   echo $ac_n "(cached) $ac_c" 1>&6
9258 else
9259   cat > conftest.$ac_ext <<EOF
9260 #line 9261 "configure"
9261 #include "confdefs.h"
9262 /* System header to define __stub macros and hopefully few prototypes,
9263     which can conflict with char $ac_func(); below.  */
9264 #include <assert.h>
9265 /* Override any gcc2 internal prototype to avoid an error.  */
9266 /* We use char because int might match the return type of a gcc2
9267     builtin and then its argument prototype would still apply.  */
9268 char $ac_func();
9269
9270 int main() {
9271
9272 /* The GNU C library defines this for functions which it implements
9273     to always fail with ENOSYS.  Some functions are actually named
9274     something starting with __ and the normal name is an alias.  */
9275 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9276 choke me
9277 #else
9278 $ac_func();
9279 #endif
9280
9281 ; return 0; }
9282 EOF
9283 if { (eval echo configure:9284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9284   rm -rf conftest*
9285   eval "ac_cv_func_$ac_func=yes"
9286 else
9287   echo "configure: failed program was:" >&5
9288   cat conftest.$ac_ext >&5
9289   rm -rf conftest*
9290   eval "ac_cv_func_$ac_func=no"
9291 fi
9292 rm -f conftest*
9293 fi
9294
9295 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9296   echo "$ac_t""yes" 1>&6
9297     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9298   cat >> confdefs.h <<EOF
9299 #define $ac_tr_func 1
9300 EOF
9301  
9302 else
9303   echo "$ac_t""no" 1>&6
9304 fi
9305 done
9306
9307
9308 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9309 echo "configure:9310: checking for ut_name in utmp" >&5
9310 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9311   echo $ac_n "(cached) $ac_c" 1>&6
9312 else
9313   
9314 cat > conftest.$ac_ext <<EOF
9315 #line 9316 "configure"
9316 #include "confdefs.h"
9317 #include <sys/types.h>
9318 #include <utmp.h>
9319 int main() {
9320 struct utmp ut;  ut.ut_name[0] = 'a';
9321 ; return 0; }
9322 EOF
9323 if { (eval echo configure:9324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9324   rm -rf conftest*
9325   samba_cv_HAVE_UT_UT_NAME=yes
9326 else
9327   echo "configure: failed program was:" >&5
9328   cat conftest.$ac_ext >&5
9329   rm -rf conftest*
9330   samba_cv_HAVE_UT_UT_NAME=no
9331 fi
9332 rm -f conftest*
9333 fi
9334
9335 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9336 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9337     cat >> confdefs.h <<\EOF
9338 #define HAVE_UT_UT_NAME 1
9339 EOF
9340
9341 fi 
9342
9343 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9344 echo "configure:9345: checking for ut_user in utmp" >&5
9345 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9346   echo $ac_n "(cached) $ac_c" 1>&6
9347 else
9348   
9349 cat > conftest.$ac_ext <<EOF
9350 #line 9351 "configure"
9351 #include "confdefs.h"
9352 #include <sys/types.h>
9353 #include <utmp.h>
9354 int main() {
9355 struct utmp ut;  ut.ut_user[0] = 'a';
9356 ; return 0; }
9357 EOF
9358 if { (eval echo configure:9359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9359   rm -rf conftest*
9360   samba_cv_HAVE_UT_UT_USER=yes
9361 else
9362   echo "configure: failed program was:" >&5
9363   cat conftest.$ac_ext >&5
9364   rm -rf conftest*
9365   samba_cv_HAVE_UT_UT_USER=no
9366 fi
9367 rm -f conftest*
9368 fi
9369
9370 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9371 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9372     cat >> confdefs.h <<\EOF
9373 #define HAVE_UT_UT_USER 1
9374 EOF
9375
9376 fi 
9377
9378 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9379 echo "configure:9380: checking for ut_id in utmp" >&5
9380 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9381   echo $ac_n "(cached) $ac_c" 1>&6
9382 else
9383   
9384 cat > conftest.$ac_ext <<EOF
9385 #line 9386 "configure"
9386 #include "confdefs.h"
9387 #include <sys/types.h>
9388 #include <utmp.h>
9389 int main() {
9390 struct utmp ut;  ut.ut_id[0] = 'a';
9391 ; return 0; }
9392 EOF
9393 if { (eval echo configure:9394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9394   rm -rf conftest*
9395   samba_cv_HAVE_UT_UT_ID=yes
9396 else
9397   echo "configure: failed program was:" >&5
9398   cat conftest.$ac_ext >&5
9399   rm -rf conftest*
9400   samba_cv_HAVE_UT_UT_ID=no
9401 fi
9402 rm -f conftest*
9403 fi
9404
9405 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9406 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9407     cat >> confdefs.h <<\EOF
9408 #define HAVE_UT_UT_ID 1
9409 EOF
9410
9411 fi 
9412
9413 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9414 echo "configure:9415: checking for ut_host in utmp" >&5
9415 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9416   echo $ac_n "(cached) $ac_c" 1>&6
9417 else
9418   
9419 cat > conftest.$ac_ext <<EOF
9420 #line 9421 "configure"
9421 #include "confdefs.h"
9422 #include <sys/types.h>
9423 #include <utmp.h>
9424 int main() {
9425 struct utmp ut;  ut.ut_host[0] = 'a';
9426 ; return 0; }
9427 EOF
9428 if { (eval echo configure:9429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9429   rm -rf conftest*
9430   samba_cv_HAVE_UT_UT_HOST=yes
9431 else
9432   echo "configure: failed program was:" >&5
9433   cat conftest.$ac_ext >&5
9434   rm -rf conftest*
9435   samba_cv_HAVE_UT_UT_HOST=no
9436 fi
9437 rm -f conftest*
9438 fi
9439
9440 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9441 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9442     cat >> confdefs.h <<\EOF
9443 #define HAVE_UT_UT_HOST 1
9444 EOF
9445
9446 fi 
9447
9448 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9449 echo "configure:9450: checking for ut_time in utmp" >&5
9450 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9451   echo $ac_n "(cached) $ac_c" 1>&6
9452 else
9453   
9454 cat > conftest.$ac_ext <<EOF
9455 #line 9456 "configure"
9456 #include "confdefs.h"
9457 #include <sys/types.h>
9458 #include <utmp.h>
9459 int main() {
9460 struct utmp ut;  time_t t; ut.ut_time = t;
9461 ; return 0; }
9462 EOF
9463 if { (eval echo configure:9464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9464   rm -rf conftest*
9465   samba_cv_HAVE_UT_UT_TIME=yes
9466 else
9467   echo "configure: failed program was:" >&5
9468   cat conftest.$ac_ext >&5
9469   rm -rf conftest*
9470   samba_cv_HAVE_UT_UT_TIME=no
9471 fi
9472 rm -f conftest*
9473 fi
9474
9475 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9476 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9477     cat >> confdefs.h <<\EOF
9478 #define HAVE_UT_UT_TIME 1
9479 EOF
9480
9481 fi 
9482
9483 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9484 echo "configure:9485: checking for ut_tv in utmp" >&5
9485 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9486   echo $ac_n "(cached) $ac_c" 1>&6
9487 else
9488   
9489 cat > conftest.$ac_ext <<EOF
9490 #line 9491 "configure"
9491 #include "confdefs.h"
9492 #include <sys/types.h>
9493 #include <utmp.h>
9494 int main() {
9495 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9496 ; return 0; }
9497 EOF
9498 if { (eval echo configure:9499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9499   rm -rf conftest*
9500   samba_cv_HAVE_UT_UT_TV=yes
9501 else
9502   echo "configure: failed program was:" >&5
9503   cat conftest.$ac_ext >&5
9504   rm -rf conftest*
9505   samba_cv_HAVE_UT_UT_TV=no
9506 fi
9507 rm -f conftest*
9508 fi
9509
9510 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9511 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9512     cat >> confdefs.h <<\EOF
9513 #define HAVE_UT_UT_TV 1
9514 EOF
9515
9516 fi 
9517
9518 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9519 echo "configure:9520: checking for ut_type in utmp" >&5
9520 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9521   echo $ac_n "(cached) $ac_c" 1>&6
9522 else
9523   
9524 cat > conftest.$ac_ext <<EOF
9525 #line 9526 "configure"
9526 #include "confdefs.h"
9527 #include <sys/types.h>
9528 #include <utmp.h>
9529 int main() {
9530 struct utmp ut;  ut.ut_type = 0;
9531 ; return 0; }
9532 EOF
9533 if { (eval echo configure:9534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9534   rm -rf conftest*
9535   samba_cv_HAVE_UT_UT_TYPE=yes
9536 else
9537   echo "configure: failed program was:" >&5
9538   cat conftest.$ac_ext >&5
9539   rm -rf conftest*
9540   samba_cv_HAVE_UT_UT_TYPE=no
9541 fi
9542 rm -f conftest*
9543 fi
9544
9545 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9546 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9547     cat >> confdefs.h <<\EOF
9548 #define HAVE_UT_UT_TYPE 1
9549 EOF
9550
9551 fi 
9552
9553 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9554 echo "configure:9555: checking for ut_pid in utmp" >&5
9555 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9556   echo $ac_n "(cached) $ac_c" 1>&6
9557 else
9558   
9559 cat > conftest.$ac_ext <<EOF
9560 #line 9561 "configure"
9561 #include "confdefs.h"
9562 #include <sys/types.h>
9563 #include <utmp.h>
9564 int main() {
9565 struct utmp ut;  ut.ut_pid = 0;
9566 ; return 0; }
9567 EOF
9568 if { (eval echo configure:9569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9569   rm -rf conftest*
9570   samba_cv_HAVE_UT_UT_PID=yes
9571 else
9572   echo "configure: failed program was:" >&5
9573   cat conftest.$ac_ext >&5
9574   rm -rf conftest*
9575   samba_cv_HAVE_UT_UT_PID=no
9576 fi
9577 rm -f conftest*
9578 fi
9579
9580 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9581 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9582     cat >> confdefs.h <<\EOF
9583 #define HAVE_UT_UT_PID 1
9584 EOF
9585
9586 fi 
9587
9588 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9589 echo "configure:9590: checking for ut_exit in utmp" >&5
9590 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9591   echo $ac_n "(cached) $ac_c" 1>&6
9592 else
9593   
9594 cat > conftest.$ac_ext <<EOF
9595 #line 9596 "configure"
9596 #include "confdefs.h"
9597 #include <sys/types.h>
9598 #include <utmp.h>
9599 int main() {
9600 struct utmp ut;  ut.ut_exit.e_exit = 0;
9601 ; return 0; }
9602 EOF
9603 if { (eval echo configure:9604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9604   rm -rf conftest*
9605   samba_cv_HAVE_UT_UT_EXIT=yes
9606 else
9607   echo "configure: failed program was:" >&5
9608   cat conftest.$ac_ext >&5
9609   rm -rf conftest*
9610   samba_cv_HAVE_UT_UT_EXIT=no
9611 fi
9612 rm -f conftest*
9613 fi
9614
9615 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9616 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9617     cat >> confdefs.h <<\EOF
9618 #define HAVE_UT_UT_EXIT 1
9619 EOF
9620
9621 fi 
9622
9623 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9624 echo "configure:9625: checking for ut_addr in utmp" >&5
9625 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9626   echo $ac_n "(cached) $ac_c" 1>&6
9627 else
9628   
9629 cat > conftest.$ac_ext <<EOF
9630 #line 9631 "configure"
9631 #include "confdefs.h"
9632 #include <sys/types.h>
9633 #include <utmp.h>
9634 int main() {
9635 struct utmp ut;  ut.ut_addr = 0;
9636 ; return 0; }
9637 EOF
9638 if { (eval echo configure:9639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9639   rm -rf conftest*
9640   samba_cv_HAVE_UT_UT_ADDR=yes
9641 else
9642   echo "configure: failed program was:" >&5
9643   cat conftest.$ac_ext >&5
9644   rm -rf conftest*
9645   samba_cv_HAVE_UT_UT_ADDR=no
9646 fi
9647 rm -f conftest*
9648 fi
9649
9650 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9651 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9652     cat >> confdefs.h <<\EOF
9653 #define HAVE_UT_UT_ADDR 1
9654 EOF
9655
9656 fi 
9657
9658 if test x$ac_cv_func_pututline = xyes ; then
9659   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9660 echo "configure:9661: checking whether pututline returns pointer" >&5
9661 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9662   echo $ac_n "(cached) $ac_c" 1>&6
9663 else
9664   
9665   cat > conftest.$ac_ext <<EOF
9666 #line 9667 "configure"
9667 #include "confdefs.h"
9668 #include <sys/types.h>
9669 #include <utmp.h>
9670 int main() {
9671 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9672 ; return 0; }
9673 EOF
9674 if { (eval echo configure:9675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9675   rm -rf conftest*
9676   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9677 else
9678   echo "configure: failed program was:" >&5
9679   cat conftest.$ac_ext >&5
9680   rm -rf conftest*
9681   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9682 fi
9683 rm -f conftest*
9684 fi
9685
9686 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9687   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9688       cat >> confdefs.h <<\EOF
9689 #define PUTUTLINE_RETURNS_UTMP 1
9690 EOF
9691
9692   fi
9693 fi
9694
9695 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9696 echo "configure:9697: checking for ut_syslen in utmpx" >&5
9697 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9698   echo $ac_n "(cached) $ac_c" 1>&6
9699 else
9700   
9701 cat > conftest.$ac_ext <<EOF
9702 #line 9703 "configure"
9703 #include "confdefs.h"
9704 #include <sys/types.h>
9705 #include <utmpx.h>
9706 int main() {
9707 struct utmpx ux;  ux.ut_syslen = 0;
9708 ; return 0; }
9709 EOF
9710 if { (eval echo configure:9711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9711   rm -rf conftest*
9712   samba_cv_HAVE_UX_UT_SYSLEN=yes
9713 else
9714   echo "configure: failed program was:" >&5
9715   cat conftest.$ac_ext >&5
9716   rm -rf conftest*
9717   samba_cv_HAVE_UX_UT_SYSLEN=no
9718 fi
9719 rm -f conftest*
9720 fi
9721
9722 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9723 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9724     cat >> confdefs.h <<\EOF
9725 #define HAVE_UX_UT_SYSLEN 1
9726 EOF
9727
9728 fi 
9729
9730
9731 #################################################
9732 # check for libiconv support
9733 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9734 echo "configure:9735: checking whether to use libiconv" >&5
9735 # Check whether --with-libiconv or --without-libiconv was given.
9736 if test "${with_libiconv+set}" = set; then
9737   withval="$with_libiconv"
9738    case "$withval" in
9739   no)
9740     echo "$ac_t""no" 1>&6
9741     ;;
9742   *)
9743     echo "$ac_t""yes" 1>&6
9744     CFLAGS="$CFLAGS -I$withval/include"
9745     LDFLAGS="$LDFLAGS -L$withval/lib"
9746     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9747 echo "configure:9748: checking for iconv_open in -liconv" >&5
9748 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9749 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9750   echo $ac_n "(cached) $ac_c" 1>&6
9751 else
9752   ac_save_LIBS="$LIBS"
9753 LIBS="-liconv  $LIBS"
9754 cat > conftest.$ac_ext <<EOF
9755 #line 9756 "configure"
9756 #include "confdefs.h"
9757 /* Override any gcc2 internal prototype to avoid an error.  */
9758 /* We use char because int might match the return type of a gcc2
9759     builtin and then its argument prototype would still apply.  */
9760 char iconv_open();
9761
9762 int main() {
9763 iconv_open()
9764 ; return 0; }
9765 EOF
9766 if { (eval echo configure:9767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9767   rm -rf conftest*
9768   eval "ac_cv_lib_$ac_lib_var=yes"
9769 else
9770   echo "configure: failed program was:" >&5
9771   cat conftest.$ac_ext >&5
9772   rm -rf conftest*
9773   eval "ac_cv_lib_$ac_lib_var=no"
9774 fi
9775 rm -f conftest*
9776 LIBS="$ac_save_LIBS"
9777
9778 fi
9779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9780   echo "$ac_t""yes" 1>&6
9781     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9782     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9783   cat >> confdefs.h <<EOF
9784 #define $ac_tr_lib 1
9785 EOF
9786
9787   LIBS="-liconv $LIBS"
9788
9789 else
9790   echo "$ac_t""no" 1>&6
9791 fi
9792
9793     cat >> confdefs.h <<EOF
9794 #define WITH_LIBICONV "${withval}"
9795 EOF
9796
9797     ;;
9798   esac 
9799 else
9800   echo "$ac_t""no" 1>&6
9801
9802 fi
9803
9804
9805
9806 ############
9807 # check for iconv in libc
9808 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9809 echo "configure:9810: checking for working iconv" >&5
9810 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9811   echo $ac_n "(cached) $ac_c" 1>&6
9812 else
9813   
9814 if test "$cross_compiling" = yes; then
9815   samba_cv_HAVE_NATIVE_ICONV=cross
9816 else
9817   cat > conftest.$ac_ext <<EOF
9818 #line 9819 "configure"
9819 #include "confdefs.h"
9820
9821 #include <iconv.h>
9822 main() {
9823        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9824        if (cd == 0 || cd == (iconv_t)-1) return -1;
9825        return 0;
9826 }
9827
9828 EOF
9829 if { (eval echo configure:9830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9830 then
9831   samba_cv_HAVE_NATIVE_ICONV=yes
9832 else
9833   echo "configure: failed program was:" >&5
9834   cat conftest.$ac_ext >&5
9835   rm -fr conftest*
9836   samba_cv_HAVE_NATIVE_ICONV=no
9837 fi
9838 rm -fr conftest*
9839 fi
9840
9841 fi
9842
9843 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9844 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9845     cat >> confdefs.h <<\EOF
9846 #define HAVE_NATIVE_ICONV 1
9847 EOF
9848
9849 fi
9850
9851
9852 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9853 echo "configure:9854: checking for Linux kernel oplocks" >&5
9854 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9855   echo $ac_n "(cached) $ac_c" 1>&6
9856 else
9857   
9858 if test "$cross_compiling" = yes; then
9859   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9860 else
9861   cat > conftest.$ac_ext <<EOF
9862 #line 9863 "configure"
9863 #include "confdefs.h"
9864
9865 #include <sys/types.h>
9866 #include <fcntl.h>
9867 #ifndef F_GETLEASE
9868 #define F_GETLEASE      1025
9869 #endif
9870 main() {
9871        int fd = open("/dev/null", O_RDONLY);
9872        return fcntl(fd, F_GETLEASE, 0) == -1;
9873 }
9874
9875 EOF
9876 if { (eval echo configure:9877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9877 then
9878   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9879 else
9880   echo "configure: failed program was:" >&5
9881   cat conftest.$ac_ext >&5
9882   rm -fr conftest*
9883   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9884 fi
9885 rm -fr conftest*
9886 fi
9887
9888 fi
9889
9890 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9891 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9892     cat >> confdefs.h <<\EOF
9893 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9894 EOF
9895
9896 fi
9897
9898 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9899 echo "configure:9900: checking for kernel change notify support" >&5
9900 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9901   echo $ac_n "(cached) $ac_c" 1>&6
9902 else
9903   
9904 if test "$cross_compiling" = yes; then
9905   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9906 else
9907   cat > conftest.$ac_ext <<EOF
9908 #line 9909 "configure"
9909 #include "confdefs.h"
9910
9911 #include <sys/types.h>
9912 #include <fcntl.h>
9913 #include <signal.h>
9914 #ifndef F_NOTIFY
9915 #define F_NOTIFY 1026
9916 #endif
9917 main() {
9918         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9919 }
9920
9921 EOF
9922 if { (eval echo configure:9923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9923 then
9924   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9925 else
9926   echo "configure: failed program was:" >&5
9927   cat conftest.$ac_ext >&5
9928   rm -fr conftest*
9929   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9930 fi
9931 rm -fr conftest*
9932 fi
9933
9934 fi
9935
9936 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9937 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9938     cat >> confdefs.h <<\EOF
9939 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9940 EOF
9941
9942 fi
9943
9944 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9945 echo "configure:9946: checking for kernel share modes" >&5
9946 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9947   echo $ac_n "(cached) $ac_c" 1>&6
9948 else
9949   
9950 if test "$cross_compiling" = yes; then
9951   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9952 else
9953   cat > conftest.$ac_ext <<EOF
9954 #line 9955 "configure"
9955 #include "confdefs.h"
9956
9957 #include <sys/types.h>
9958 #include <fcntl.h>
9959 #include <signal.h>
9960 #include <sys/file.h>
9961 #ifndef LOCK_MAND
9962 #define LOCK_MAND       32
9963 #define LOCK_READ       64
9964 #endif
9965 main() {
9966         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9967 }
9968
9969 EOF
9970 if { (eval echo configure:9971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9971 then
9972   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9973 else
9974   echo "configure: failed program was:" >&5
9975   cat conftest.$ac_ext >&5
9976   rm -fr conftest*
9977   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9978 fi
9979 rm -fr conftest*
9980 fi
9981
9982 fi
9983
9984 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9985 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9986     cat >> confdefs.h <<\EOF
9987 #define HAVE_KERNEL_SHARE_MODES 1
9988 EOF
9989
9990 fi
9991
9992
9993
9994
9995 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9996 echo "configure:9997: checking for IRIX kernel oplock type definitions" >&5
9997 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9998   echo $ac_n "(cached) $ac_c" 1>&6
9999 else
10000   
10001 cat > conftest.$ac_ext <<EOF
10002 #line 10003 "configure"
10003 #include "confdefs.h"
10004 #include <sys/types.h>
10005 #include <fcntl.h>
10006 int main() {
10007 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10008 ; return 0; }
10009 EOF
10010 if { (eval echo configure:10011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10011   rm -rf conftest*
10012   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10013 else
10014   echo "configure: failed program was:" >&5
10015   cat conftest.$ac_ext >&5
10016   rm -rf conftest*
10017   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10018 fi
10019 rm -f conftest*
10020 fi
10021
10022 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10023 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10024     cat >> confdefs.h <<\EOF
10025 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10026 EOF
10027
10028 fi
10029
10030 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10031 echo "configure:10032: checking for irix specific capabilities" >&5
10032 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10033   echo $ac_n "(cached) $ac_c" 1>&6
10034 else
10035   
10036 if test "$cross_compiling" = yes; then
10037   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10038 else
10039   cat > conftest.$ac_ext <<EOF
10040 #line 10041 "configure"
10041 #include "confdefs.h"
10042 #include <sys/types.h>
10043 #include <sys/capability.h>
10044 main() {
10045  cap_t cap;
10046  if ((cap = cap_get_proc()) == NULL)
10047    exit(1);
10048  cap->cap_effective |= CAP_NETWORK_MGT;
10049  cap->cap_inheritable |= CAP_NETWORK_MGT;
10050  cap_set_proc(cap);
10051  exit(0);
10052 }
10053
10054 EOF
10055 if { (eval echo configure:10056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10056 then
10057   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10058 else
10059   echo "configure: failed program was:" >&5
10060   cat conftest.$ac_ext >&5
10061   rm -fr conftest*
10062   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10063 fi
10064 rm -fr conftest*
10065 fi
10066
10067 fi
10068
10069 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10070 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10071     cat >> confdefs.h <<\EOF
10072 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10073 EOF
10074
10075 fi
10076
10077 #
10078 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10079 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10080 #
10081
10082 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10083 echo "configure:10084: checking for int16 typedef included by rpc/rpc.h" >&5
10084 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10085   echo $ac_n "(cached) $ac_c" 1>&6
10086 else
10087   
10088 cat > conftest.$ac_ext <<EOF
10089 #line 10090 "configure"
10090 #include "confdefs.h"
10091 #include <sys/types.h>
10092 #if defined(HAVE_RPC_RPC_H)
10093 #include <rpc/rpc.h>
10094 #endif
10095 int main() {
10096 int16 testvar;
10097 ; return 0; }
10098 EOF
10099 if { (eval echo configure:10100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10100   rm -rf conftest*
10101   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10102 else
10103   echo "configure: failed program was:" >&5
10104   cat conftest.$ac_ext >&5
10105   rm -rf conftest*
10106   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10107 fi
10108 rm -f conftest*
10109 fi
10110
10111 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10112 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10113     cat >> confdefs.h <<\EOF
10114 #define HAVE_INT16_FROM_RPC_RPC_H 1
10115 EOF
10116
10117 fi
10118
10119 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10120 echo "configure:10121: checking for uint16 typedef included by rpc/rpc.h" >&5
10121 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10122   echo $ac_n "(cached) $ac_c" 1>&6
10123 else
10124   
10125 cat > conftest.$ac_ext <<EOF
10126 #line 10127 "configure"
10127 #include "confdefs.h"
10128 #include <sys/types.h>
10129 #if defined(HAVE_RPC_RPC_H)
10130 #include <rpc/rpc.h>
10131 #endif
10132 int main() {
10133 uint16 testvar;
10134 ; return 0; }
10135 EOF
10136 if { (eval echo configure:10137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10137   rm -rf conftest*
10138   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10139 else
10140   echo "configure: failed program was:" >&5
10141   cat conftest.$ac_ext >&5
10142   rm -rf conftest*
10143   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10144 fi
10145 rm -f conftest*
10146 fi
10147
10148 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10149 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10150     cat >> confdefs.h <<\EOF
10151 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10152 EOF
10153
10154 fi
10155
10156 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10157 echo "configure:10158: checking for int32 typedef included by rpc/rpc.h" >&5
10158 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10159   echo $ac_n "(cached) $ac_c" 1>&6
10160 else
10161   
10162 cat > conftest.$ac_ext <<EOF
10163 #line 10164 "configure"
10164 #include "confdefs.h"
10165 #include <sys/types.h>
10166 #if defined(HAVE_RPC_RPC_H)
10167 #include <rpc/rpc.h>
10168 #endif
10169 int main() {
10170 int32 testvar;
10171 ; return 0; }
10172 EOF
10173 if { (eval echo configure:10174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10174   rm -rf conftest*
10175   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10176 else
10177   echo "configure: failed program was:" >&5
10178   cat conftest.$ac_ext >&5
10179   rm -rf conftest*
10180   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10181 fi
10182 rm -f conftest*
10183 fi
10184
10185 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10186 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10187     cat >> confdefs.h <<\EOF
10188 #define HAVE_INT32_FROM_RPC_RPC_H 1
10189 EOF
10190
10191 fi
10192
10193 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10194 echo "configure:10195: checking for uint32 typedef included by rpc/rpc.h" >&5
10195 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10196   echo $ac_n "(cached) $ac_c" 1>&6
10197 else
10198   
10199 cat > conftest.$ac_ext <<EOF
10200 #line 10201 "configure"
10201 #include "confdefs.h"
10202 #include <sys/types.h>
10203 #if defined(HAVE_RPC_RPC_H)
10204 #include <rpc/rpc.h>
10205 #endif
10206 int main() {
10207 uint32 testvar;
10208 ; return 0; }
10209 EOF
10210 if { (eval echo configure:10211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10211   rm -rf conftest*
10212   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10213 else
10214   echo "configure: failed program was:" >&5
10215   cat conftest.$ac_ext >&5
10216   rm -rf conftest*
10217   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10218 fi
10219 rm -f conftest*
10220 fi
10221
10222 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10223 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10224     cat >> confdefs.h <<\EOF
10225 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10226 EOF
10227
10228 fi
10229
10230
10231 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10232 echo "configure:10233: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10233 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10234   echo $ac_n "(cached) $ac_c" 1>&6
10235 else
10236   
10237 cat > conftest.$ac_ext <<EOF
10238 #line 10239 "configure"
10239 #include "confdefs.h"
10240 #include <sys/types.h>
10241 #ifdef HAVE_SYS_SECURITY_H
10242 #include <sys/security.h>
10243 #include <prot.h>
10244 #endif  /* HAVE_SYS_SECURITY_H */
10245 #if defined(HAVE_RPC_RPC_H)
10246 #include <rpc/rpc.h>
10247 #endif
10248 int main() {
10249 int testvar;
10250 ; return 0; }
10251 EOF
10252 if { (eval echo configure:10253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10253   rm -rf conftest*
10254   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10255 else
10256   echo "configure: failed program was:" >&5
10257   cat conftest.$ac_ext >&5
10258   rm -rf conftest*
10259   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10260 fi
10261 rm -f conftest*
10262 fi
10263
10264 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10265 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10266     cat >> confdefs.h <<\EOF
10267 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10268 EOF
10269
10270 fi
10271
10272 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10273 echo "configure:10274: checking for test routines" >&5
10274 if test "$cross_compiling" = yes; then
10275   echo "configure: warning: cannot run when cross-compiling" 1>&2
10276 else
10277   cat > conftest.$ac_ext <<EOF
10278 #line 10279 "configure"
10279 #include "confdefs.h"
10280 #include "${srcdir-.}/tests/trivial.c"
10281 EOF
10282 if { (eval echo configure:10283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10283 then
10284   echo "$ac_t""yes" 1>&6
10285 else
10286   echo "configure: failed program was:" >&5
10287   cat conftest.$ac_ext >&5
10288   rm -fr conftest*
10289   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10290 fi
10291 rm -fr conftest*
10292 fi
10293
10294
10295 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10296 echo "configure:10297: checking for ftruncate extend" >&5
10297 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10298   echo $ac_n "(cached) $ac_c" 1>&6
10299 else
10300   
10301 if test "$cross_compiling" = yes; then
10302   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10303 else
10304   cat > conftest.$ac_ext <<EOF
10305 #line 10306 "configure"
10306 #include "confdefs.h"
10307 #include "${srcdir-.}/tests/ftruncate.c"
10308 EOF
10309 if { (eval echo configure:10310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10310 then
10311   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10312 else
10313   echo "configure: failed program was:" >&5
10314   cat conftest.$ac_ext >&5
10315   rm -fr conftest*
10316   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10317 fi
10318 rm -fr conftest*
10319 fi
10320
10321 fi
10322
10323 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10324 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10325     cat >> confdefs.h <<\EOF
10326 #define HAVE_FTRUNCATE_EXTEND 1
10327 EOF
10328
10329 fi
10330
10331 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10332 echo "configure:10333: checking for AF_LOCAL socket support" >&5
10333 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10334   echo $ac_n "(cached) $ac_c" 1>&6
10335 else
10336   
10337 if test "$cross_compiling" = yes; then
10338   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10339 else
10340   cat > conftest.$ac_ext <<EOF
10341 #line 10342 "configure"
10342 #include "confdefs.h"
10343 #include "${srcdir-.}/tests/unixsock.c"
10344 EOF
10345 if { (eval echo configure:10346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10346 then
10347   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10348 else
10349   echo "configure: failed program was:" >&5
10350   cat conftest.$ac_ext >&5
10351   rm -fr conftest*
10352   samba_cv_HAVE_WORKING_AF_LOCAL=no
10353 fi
10354 rm -fr conftest*
10355 fi
10356
10357 fi
10358
10359 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10360 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10361 then
10362     cat >> confdefs.h <<\EOF
10363 #define HAVE_WORKING_AF_LOCAL 1
10364 EOF
10365
10366 fi
10367
10368 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10369 echo "configure:10370: checking for broken getgroups" >&5
10370 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10371   echo $ac_n "(cached) $ac_c" 1>&6
10372 else
10373   
10374 if test "$cross_compiling" = yes; then
10375   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10376 else
10377   cat > conftest.$ac_ext <<EOF
10378 #line 10379 "configure"
10379 #include "confdefs.h"
10380 #include "${srcdir-.}/tests/getgroups.c"
10381 EOF
10382 if { (eval echo configure:10383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10383 then
10384   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10385 else
10386   echo "configure: failed program was:" >&5
10387   cat conftest.$ac_ext >&5
10388   rm -fr conftest*
10389   samba_cv_HAVE_BROKEN_GETGROUPS=no
10390 fi
10391 rm -fr conftest*
10392 fi
10393
10394 fi
10395
10396 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10397 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10398     cat >> confdefs.h <<\EOF
10399 #define HAVE_BROKEN_GETGROUPS 1
10400 EOF
10401
10402 fi
10403
10404 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10405 echo "configure:10406: checking whether getpass should be replaced" >&5
10406 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10407   echo $ac_n "(cached) $ac_c" 1>&6
10408 else
10409   
10410 SAVE_CPPFLAGS="$CPPFLAGS"
10411 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10412 cat > conftest.$ac_ext <<EOF
10413 #line 10414 "configure"
10414 #include "confdefs.h"
10415
10416 #define REPLACE_GETPASS 1
10417 #define NO_CONFIG_H 1
10418 #define main dont_declare_main
10419 #include "${srcdir-.}/lib/getsmbpass.c"
10420 #undef main
10421
10422 int main() {
10423
10424 ; return 0; }
10425 EOF
10426 if { (eval echo configure:10427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10427   rm -rf conftest*
10428   samba_cv_REPLACE_GETPASS=yes
10429 else
10430   echo "configure: failed program was:" >&5
10431   cat conftest.$ac_ext >&5
10432   rm -rf conftest*
10433   samba_cv_REPLACE_GETPASS=no
10434 fi
10435 rm -f conftest*
10436 CPPFLAGS="$SAVE_CPPFLAGS"
10437
10438 fi
10439
10440 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10441 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10442         cat >> confdefs.h <<\EOF
10443 #define REPLACE_GETPASS 1
10444 EOF
10445
10446 fi
10447
10448 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10449 echo "configure:10450: checking for broken inet_ntoa" >&5
10450 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10451   echo $ac_n "(cached) $ac_c" 1>&6
10452 else
10453   
10454 if test "$cross_compiling" = yes; then
10455   samba_cv_REPLACE_INET_NTOA=cross
10456 else
10457   cat > conftest.$ac_ext <<EOF
10458 #line 10459 "configure"
10459 #include "confdefs.h"
10460
10461 #include <stdio.h>
10462 #include <sys/types.h>
10463 #include <netinet/in.h>
10464 #ifdef HAVE_ARPA_INET_H
10465 #include <arpa/inet.h>
10466 #endif
10467 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10468 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10469     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10470 exit(1);}
10471 EOF
10472 if { (eval echo configure:10473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10473 then
10474   samba_cv_REPLACE_INET_NTOA=yes
10475 else
10476   echo "configure: failed program was:" >&5
10477   cat conftest.$ac_ext >&5
10478   rm -fr conftest*
10479   samba_cv_REPLACE_INET_NTOA=no
10480 fi
10481 rm -fr conftest*
10482 fi
10483
10484 fi
10485
10486 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10487 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10488     cat >> confdefs.h <<\EOF
10489 #define REPLACE_INET_NTOA 1
10490 EOF
10491
10492 fi
10493
10494 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10495 echo "configure:10496: checking for secure mkstemp" >&5
10496 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10497   echo $ac_n "(cached) $ac_c" 1>&6
10498 else
10499   
10500 if test "$cross_compiling" = yes; then
10501   samba_cv_HAVE_SECURE_MKSTEMP=cross
10502 else
10503   cat > conftest.$ac_ext <<EOF
10504 #line 10505 "configure"
10505 #include "confdefs.h"
10506 #include <stdlib.h>
10507 #include <sys/types.h>
10508 #include <sys/stat.h>
10509 #include <unistd.h>
10510 main() { 
10511   struct stat st;
10512   char tpl[20]="/tmp/test.XXXXXX"; 
10513   int fd = mkstemp(tpl); 
10514   if (fd == -1) exit(1);
10515   unlink(tpl);
10516   if (fstat(fd, &st) != 0) exit(1);
10517   if ((st.st_mode & 0777) != 0600) exit(1);
10518   exit(0);
10519 }
10520 EOF
10521 if { (eval echo configure:10522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10522 then
10523   samba_cv_HAVE_SECURE_MKSTEMP=yes
10524 else
10525   echo "configure: failed program was:" >&5
10526   cat conftest.$ac_ext >&5
10527   rm -fr conftest*
10528   samba_cv_HAVE_SECURE_MKSTEMP=no
10529 fi
10530 rm -fr conftest*
10531 fi
10532
10533 fi
10534
10535 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10536 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10537     cat >> confdefs.h <<\EOF
10538 #define HAVE_SECURE_MKSTEMP 1
10539 EOF
10540
10541 fi
10542
10543 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10544 echo "configure:10545: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10545 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10546   echo $ac_n "(cached) $ac_c" 1>&6
10547 else
10548   
10549 if test "$cross_compiling" = yes; then
10550   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10551 else
10552   cat > conftest.$ac_ext <<EOF
10553 #line 10554 "configure"
10554 #include "confdefs.h"
10555 #include <unistd.h>
10556 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10557 EOF
10558 if { (eval echo configure:10559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10559 then
10560   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10561 else
10562   echo "configure: failed program was:" >&5
10563   cat conftest.$ac_ext >&5
10564   rm -fr conftest*
10565   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10566 fi
10567 rm -fr conftest*
10568 fi
10569
10570 fi
10571
10572 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10573 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10574     cat >> confdefs.h <<\EOF
10575 #define SYSCONF_SC_NGROUPS_MAX 1
10576 EOF
10577
10578 fi
10579
10580 echo $ac_n "checking for root""... $ac_c" 1>&6
10581 echo "configure:10582: checking for root" >&5
10582 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10583   echo $ac_n "(cached) $ac_c" 1>&6
10584 else
10585   
10586 if test "$cross_compiling" = yes; then
10587   samba_cv_HAVE_ROOT=cross
10588 else
10589   cat > conftest.$ac_ext <<EOF
10590 #line 10591 "configure"
10591 #include "confdefs.h"
10592 main() { exit(getuid() != 0); }
10593 EOF
10594 if { (eval echo configure:10595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10595 then
10596   samba_cv_HAVE_ROOT=yes
10597 else
10598   echo "configure: failed program was:" >&5
10599   cat conftest.$ac_ext >&5
10600   rm -fr conftest*
10601   samba_cv_HAVE_ROOT=no
10602 fi
10603 rm -fr conftest*
10604 fi
10605
10606 fi
10607
10608 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10609 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10610     cat >> confdefs.h <<\EOF
10611 #define HAVE_ROOT 1
10612 EOF
10613
10614 else
10615     echo "configure: warning: running as non-root will disable some tests" 1>&2
10616 fi
10617
10618 ##################
10619 # look for a method of finding the list of network interfaces
10620 iface=no;
10621 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10622 echo "configure:10623: checking for iface AIX" >&5
10623 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10624   echo $ac_n "(cached) $ac_c" 1>&6
10625 else
10626   
10627 if test "$cross_compiling" = yes; then
10628   samba_cv_HAVE_IFACE_AIX=cross
10629 else
10630   cat > conftest.$ac_ext <<EOF
10631 #line 10632 "configure"
10632 #include "confdefs.h"
10633
10634 #define HAVE_IFACE_AIX 1
10635 #define AUTOCONF_TEST 1
10636 #include "confdefs.h"
10637 #include "${srcdir-.}/lib/interfaces.c"
10638 EOF
10639 if { (eval echo configure:10640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10640 then
10641   samba_cv_HAVE_IFACE_AIX=yes
10642 else
10643   echo "configure: failed program was:" >&5
10644   cat conftest.$ac_ext >&5
10645   rm -fr conftest*
10646   samba_cv_HAVE_IFACE_AIX=no
10647 fi
10648 rm -fr conftest*
10649 fi
10650
10651 fi
10652
10653 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10654 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10655     iface=yes;cat >> confdefs.h <<\EOF
10656 #define HAVE_IFACE_AIX 1
10657 EOF
10658
10659 fi
10660
10661 if test $iface = no; then
10662 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10663 echo "configure:10664: checking for iface ifconf" >&5
10664 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10665   echo $ac_n "(cached) $ac_c" 1>&6
10666 else
10667   
10668 if test "$cross_compiling" = yes; then
10669   samba_cv_HAVE_IFACE_IFCONF=cross
10670 else
10671   cat > conftest.$ac_ext <<EOF
10672 #line 10673 "configure"
10673 #include "confdefs.h"
10674
10675 #define HAVE_IFACE_IFCONF 1
10676 #define AUTOCONF_TEST 1
10677 #include "confdefs.h"
10678 #include "${srcdir-.}/lib/interfaces.c"
10679 EOF
10680 if { (eval echo configure:10681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10681 then
10682   samba_cv_HAVE_IFACE_IFCONF=yes
10683 else
10684   echo "configure: failed program was:" >&5
10685   cat conftest.$ac_ext >&5
10686   rm -fr conftest*
10687   samba_cv_HAVE_IFACE_IFCONF=no
10688 fi
10689 rm -fr conftest*
10690 fi
10691
10692 fi
10693
10694 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10695 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10696     iface=yes;cat >> confdefs.h <<\EOF
10697 #define HAVE_IFACE_IFCONF 1
10698 EOF
10699
10700 fi
10701 fi
10702
10703 if test $iface = no; then
10704 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10705 echo "configure:10706: checking for iface ifreq" >&5
10706 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10707   echo $ac_n "(cached) $ac_c" 1>&6
10708 else
10709   
10710 if test "$cross_compiling" = yes; then
10711   samba_cv_HAVE_IFACE_IFREQ=cross
10712 else
10713   cat > conftest.$ac_ext <<EOF
10714 #line 10715 "configure"
10715 #include "confdefs.h"
10716
10717 #define HAVE_IFACE_IFREQ 1
10718 #define AUTOCONF_TEST 1
10719 #include "confdefs.h"
10720 #include "${srcdir-.}/lib/interfaces.c"
10721 EOF
10722 if { (eval echo configure:10723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10723 then
10724   samba_cv_HAVE_IFACE_IFREQ=yes
10725 else
10726   echo "configure: failed program was:" >&5
10727   cat conftest.$ac_ext >&5
10728   rm -fr conftest*
10729   samba_cv_HAVE_IFACE_IFREQ=no
10730 fi
10731 rm -fr conftest*
10732 fi
10733
10734 fi
10735
10736 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10737 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10738     iface=yes;cat >> confdefs.h <<\EOF
10739 #define HAVE_IFACE_IFREQ 1
10740 EOF
10741
10742 fi
10743 fi
10744
10745
10746 ################################################
10747 # look for a method of setting the effective uid
10748 seteuid=no;
10749 if test $seteuid = no; then
10750 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10751 echo "configure:10752: checking for setresuid" >&5
10752 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10753   echo $ac_n "(cached) $ac_c" 1>&6
10754 else
10755   
10756 if test "$cross_compiling" = yes; then
10757   samba_cv_USE_SETRESUID=cross
10758 else
10759   cat > conftest.$ac_ext <<EOF
10760 #line 10761 "configure"
10761 #include "confdefs.h"
10762
10763 #define AUTOCONF_TEST 1
10764 #define USE_SETRESUID 1
10765 #include "confdefs.h"
10766 #include "${srcdir-.}/lib/util_sec.c"
10767 EOF
10768 if { (eval echo configure:10769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10769 then
10770   samba_cv_USE_SETRESUID=yes
10771 else
10772   echo "configure: failed program was:" >&5
10773   cat conftest.$ac_ext >&5
10774   rm -fr conftest*
10775   samba_cv_USE_SETRESUID=no
10776 fi
10777 rm -fr conftest*
10778 fi
10779
10780 fi
10781
10782 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10783 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10784     seteuid=yes;cat >> confdefs.h <<\EOF
10785 #define USE_SETRESUID 1
10786 EOF
10787
10788 fi
10789 fi
10790
10791
10792 if test $seteuid = no; then
10793 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10794 echo "configure:10795: checking for setreuid" >&5
10795 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10796   echo $ac_n "(cached) $ac_c" 1>&6
10797 else
10798   
10799 if test "$cross_compiling" = yes; then
10800   samba_cv_USE_SETREUID=cross
10801 else
10802   cat > conftest.$ac_ext <<EOF
10803 #line 10804 "configure"
10804 #include "confdefs.h"
10805
10806 #define AUTOCONF_TEST 1
10807 #define USE_SETREUID 1
10808 #include "confdefs.h"
10809 #include "${srcdir-.}/lib/util_sec.c"
10810 EOF
10811 if { (eval echo configure:10812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10812 then
10813   samba_cv_USE_SETREUID=yes
10814 else
10815   echo "configure: failed program was:" >&5
10816   cat conftest.$ac_ext >&5
10817   rm -fr conftest*
10818   samba_cv_USE_SETREUID=no
10819 fi
10820 rm -fr conftest*
10821 fi
10822
10823 fi
10824
10825 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10826 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10827     seteuid=yes;cat >> confdefs.h <<\EOF
10828 #define USE_SETREUID 1
10829 EOF
10830
10831 fi
10832 fi
10833
10834 if test $seteuid = no; then
10835 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10836 echo "configure:10837: checking for seteuid" >&5
10837 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10838   echo $ac_n "(cached) $ac_c" 1>&6
10839 else
10840   
10841 if test "$cross_compiling" = yes; then
10842   samba_cv_USE_SETEUID=cross
10843 else
10844   cat > conftest.$ac_ext <<EOF
10845 #line 10846 "configure"
10846 #include "confdefs.h"
10847
10848 #define AUTOCONF_TEST 1
10849 #define USE_SETEUID 1
10850 #include "confdefs.h"
10851 #include "${srcdir-.}/lib/util_sec.c"
10852 EOF
10853 if { (eval echo configure:10854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10854 then
10855   samba_cv_USE_SETEUID=yes
10856 else
10857   echo "configure: failed program was:" >&5
10858   cat conftest.$ac_ext >&5
10859   rm -fr conftest*
10860   samba_cv_USE_SETEUID=no
10861 fi
10862 rm -fr conftest*
10863 fi
10864
10865 fi
10866
10867 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10868 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10869     seteuid=yes;cat >> confdefs.h <<\EOF
10870 #define USE_SETEUID 1
10871 EOF
10872
10873 fi
10874 fi
10875
10876 if test $seteuid = no; then
10877 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10878 echo "configure:10879: checking for setuidx" >&5
10879 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10880   echo $ac_n "(cached) $ac_c" 1>&6
10881 else
10882   
10883 if test "$cross_compiling" = yes; then
10884   samba_cv_USE_SETUIDX=cross
10885 else
10886   cat > conftest.$ac_ext <<EOF
10887 #line 10888 "configure"
10888 #include "confdefs.h"
10889
10890 #define AUTOCONF_TEST 1
10891 #define USE_SETUIDX 1
10892 #include "confdefs.h"
10893 #include "${srcdir-.}/lib/util_sec.c"
10894 EOF
10895 if { (eval echo configure:10896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10896 then
10897   samba_cv_USE_SETUIDX=yes
10898 else
10899   echo "configure: failed program was:" >&5
10900   cat conftest.$ac_ext >&5
10901   rm -fr conftest*
10902   samba_cv_USE_SETUIDX=no
10903 fi
10904 rm -fr conftest*
10905 fi
10906
10907 fi
10908
10909 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10910 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10911     seteuid=yes;cat >> confdefs.h <<\EOF
10912 #define USE_SETUIDX 1
10913 EOF
10914
10915 fi
10916 fi
10917
10918
10919 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10920 echo "configure:10921: checking for working mmap" >&5
10921 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10922   echo $ac_n "(cached) $ac_c" 1>&6
10923 else
10924   
10925 if test "$cross_compiling" = yes; then
10926   samba_cv_HAVE_MMAP=cross
10927 else
10928   cat > conftest.$ac_ext <<EOF
10929 #line 10930 "configure"
10930 #include "confdefs.h"
10931 #include "${srcdir-.}/tests/shared_mmap.c"
10932 EOF
10933 if { (eval echo configure:10934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10934 then
10935   samba_cv_HAVE_MMAP=yes
10936 else
10937   echo "configure: failed program was:" >&5
10938   cat conftest.$ac_ext >&5
10939   rm -fr conftest*
10940   samba_cv_HAVE_MMAP=no
10941 fi
10942 rm -fr conftest*
10943 fi
10944
10945 fi
10946
10947 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10948 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10949     cat >> confdefs.h <<\EOF
10950 #define HAVE_MMAP 1
10951 EOF
10952
10953 fi
10954
10955 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10956 echo "configure:10957: checking for ftruncate needs root" >&5
10957 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10958   echo $ac_n "(cached) $ac_c" 1>&6
10959 else
10960   
10961 if test "$cross_compiling" = yes; then
10962   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10963 else
10964   cat > conftest.$ac_ext <<EOF
10965 #line 10966 "configure"
10966 #include "confdefs.h"
10967 #include "${srcdir-.}/tests/ftruncroot.c"
10968 EOF
10969 if { (eval echo configure:10970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10970 then
10971   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10972 else
10973   echo "configure: failed program was:" >&5
10974   cat conftest.$ac_ext >&5
10975   rm -fr conftest*
10976   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10977 fi
10978 rm -fr conftest*
10979 fi
10980
10981 fi
10982
10983 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10984 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10985     cat >> confdefs.h <<\EOF
10986 #define FTRUNCATE_NEEDS_ROOT 1
10987 EOF
10988
10989 fi
10990
10991 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10992 echo "configure:10993: checking for fcntl locking" >&5
10993 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10994   echo $ac_n "(cached) $ac_c" 1>&6
10995 else
10996   
10997 if test "$cross_compiling" = yes; then
10998   samba_cv_HAVE_FCNTL_LOCK=cross
10999 else
11000   cat > conftest.$ac_ext <<EOF
11001 #line 11002 "configure"
11002 #include "confdefs.h"
11003 #include "${srcdir-.}/tests/fcntl_lock.c"
11004 EOF
11005 if { (eval echo configure:11006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11006 then
11007   samba_cv_HAVE_FCNTL_LOCK=yes
11008 else
11009   echo "configure: failed program was:" >&5
11010   cat conftest.$ac_ext >&5
11011   rm -fr conftest*
11012   samba_cv_HAVE_FCNTL_LOCK=no
11013 fi
11014 rm -fr conftest*
11015 fi
11016
11017 fi
11018
11019 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11020 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11021     cat >> confdefs.h <<\EOF
11022 #define HAVE_FCNTL_LOCK 1
11023 EOF
11024
11025 fi
11026
11027 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11028 echo "configure:11029: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11029 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11030   echo $ac_n "(cached) $ac_c" 1>&6
11031 else
11032   
11033 if test "$cross_compiling" = yes; then
11034   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11035 else
11036   cat > conftest.$ac_ext <<EOF
11037 #line 11038 "configure"
11038 #include "confdefs.h"
11039 #include "${srcdir-.}/tests/fcntl_lock64.c"
11040 EOF
11041 if { (eval echo configure:11042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11042 then
11043   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11044 else
11045   echo "configure: failed program was:" >&5
11046   cat conftest.$ac_ext >&5
11047   rm -fr conftest*
11048   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11049 fi
11050 rm -fr conftest*
11051 fi
11052
11053 fi
11054
11055 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11056 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11057     cat >> confdefs.h <<\EOF
11058 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11059 EOF
11060
11061
11062 else
11063
11064
11065   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11066 echo "configure:11067: checking for 64 bit fcntl locking" >&5
11067 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11068   echo $ac_n "(cached) $ac_c" 1>&6
11069 else
11070   
11071   if test "$cross_compiling" = yes; then
11072   samba_cv_HAVE_STRUCT_FLOCK64=cross
11073 else
11074   cat > conftest.$ac_ext <<EOF
11075 #line 11076 "configure"
11076 #include "confdefs.h"
11077
11078 #if defined(HAVE_UNISTD_H)
11079 #include <unistd.h>
11080 #endif
11081 #include <stdio.h>
11082 #include <stdlib.h>
11083
11084 #ifdef HAVE_FCNTL_H
11085 #include <fcntl.h>
11086 #endif
11087
11088 #ifdef HAVE_SYS_FCNTL_H
11089 #include <sys/fcntl.h>
11090 #endif
11091 main() { struct flock64 fl64;
11092 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11093 exit(0);
11094 #else
11095 exit(1);
11096 #endif
11097 }
11098 EOF
11099 if { (eval echo configure:11100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11100 then
11101   samba_cv_HAVE_STRUCT_FLOCK64=yes
11102 else
11103   echo "configure: failed program was:" >&5
11104   cat conftest.$ac_ext >&5
11105   rm -fr conftest*
11106   samba_cv_HAVE_STRUCT_FLOCK64=no
11107 fi
11108 rm -fr conftest*
11109 fi
11110
11111 fi
11112
11113 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11114
11115   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11116       cat >> confdefs.h <<\EOF
11117 #define HAVE_STRUCT_FLOCK64 1
11118 EOF
11119
11120   fi
11121 fi
11122
11123
11124 case "$host_os" in
11125 *linux*)
11126 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11127 echo "configure:11128: checking for broken RedHat 7.2 system header files" >&5
11128 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11129   echo $ac_n "(cached) $ac_c" 1>&6
11130 else
11131   
11132 cat > conftest.$ac_ext <<EOF
11133 #line 11134 "configure"
11134 #include "confdefs.h"
11135
11136 #ifdef HAVE_SYS_VFS_H
11137 #include <sys/vfs.h>
11138 #endif
11139 #ifdef HAVE_SYS_CAPABILITY_H
11140 #include <sys/capability.h>
11141 #endif
11142
11143 int main() {
11144 int i;
11145 ; return 0; }
11146 EOF
11147 if { (eval echo configure:11148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11148   rm -rf conftest*
11149   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11150 else
11151   echo "configure: failed program was:" >&5
11152   cat conftest.$ac_ext >&5
11153   rm -rf conftest*
11154   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11155 fi
11156 rm -f conftest*
11157 fi
11158
11159 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11160 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11161    cat >> confdefs.h <<\EOF
11162 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11163 EOF
11164
11165 fi
11166 ;;
11167 esac
11168
11169 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11170 echo "configure:11171: checking for broken nisplus include files" >&5
11171 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11172   echo $ac_n "(cached) $ac_c" 1>&6
11173 else
11174   
11175 cat > conftest.$ac_ext <<EOF
11176 #line 11177 "configure"
11177 #include "confdefs.h"
11178 #include <sys/acl.h>
11179 #if defined(HAVE_RPCSVC_NIS_H)
11180 #include <rpcsvc/nis.h>
11181 #endif
11182 int main() {
11183 int i;
11184 ; return 0; }
11185 EOF
11186 if { (eval echo configure:11187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11187   rm -rf conftest*
11188   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11189 else
11190   echo "configure: failed program was:" >&5
11191   cat conftest.$ac_ext >&5
11192   rm -rf conftest*
11193   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11194 fi
11195 rm -f conftest*
11196 fi
11197
11198 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11199 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11200     cat >> confdefs.h <<\EOF
11201 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11202 EOF
11203
11204 fi
11205
11206
11207 #################################################
11208 # check for smbwrapper support
11209 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11210 echo "configure:11211: checking whether to use smbwrapper" >&5
11211 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11212 if test "${with_smbwrapper+set}" = set; then
11213   withval="$with_smbwrapper"
11214    case "$withval" in
11215   yes)
11216     echo "$ac_t""yes" 1>&6
11217     cat >> confdefs.h <<\EOF
11218 #define WITH_SMBWRAPPER 1
11219 EOF
11220
11221         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11222
11223         if test x$ATTEMPT_WRAP32_BUILD = x; then
11224                 WRAP32=""
11225         else
11226                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11227         fi
11228
11229 # Conditions under which smbwrapper should not be built.
11230
11231         if test x$PICFLAG = x; then
11232            echo No support for PIC code - disabling smbwrapper and smbsh
11233            WRAP=""
11234            WRAP32=""
11235         elif test x$ac_cv_func_syscall = xno; then
11236            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11237            WRAP=""
11238            WRAP32=""
11239         fi
11240     ;;
11241   *)
11242     echo "$ac_t""no" 1>&6
11243     ;;
11244   esac 
11245 else
11246   echo "$ac_t""no" 1>&6
11247
11248 fi
11249
11250
11251 #################################################
11252 # check for AFS clear-text auth support
11253 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11254 echo "configure:11255: checking whether to use AFS clear-text auth" >&5
11255 # Check whether --with-afs or --without-afs was given.
11256 if test "${with_afs+set}" = set; then
11257   withval="$with_afs"
11258    case "$withval" in
11259   yes)
11260     echo "$ac_t""yes" 1>&6
11261     cat >> confdefs.h <<\EOF
11262 #define WITH_AFS 1
11263 EOF
11264
11265     ;;
11266   *)
11267     echo "$ac_t""no" 1>&6
11268     ;;
11269   esac 
11270 else
11271   echo "$ac_t""no" 1>&6
11272
11273 fi
11274
11275
11276
11277 #################################################
11278 # check for the DFS clear-text auth system
11279 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11280 echo "configure:11281: checking whether to use DFS clear-text auth" >&5
11281 # Check whether --with-dfs or --without-dfs was given.
11282 if test "${with_dfs+set}" = set; then
11283   withval="$with_dfs"
11284    case "$withval" in
11285   yes)
11286     echo "$ac_t""yes" 1>&6
11287     cat >> confdefs.h <<\EOF
11288 #define WITH_DFS 1
11289 EOF
11290
11291     ;;
11292   *)
11293     echo "$ac_t""no" 1>&6
11294     ;;
11295   esac 
11296 else
11297   echo "$ac_t""no" 1>&6
11298
11299 fi
11300
11301
11302
11303 #################################################
11304 # see if this box has the RedHat location for kerberos
11305 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11306 echo "configure:11307: checking for /usr/kerberos" >&5
11307 if test -d /usr/kerberos; then
11308     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11309     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11310     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11311     echo "$ac_t""yes" 1>&6
11312 else
11313     echo "$ac_t""no" 1>&6
11314 fi
11315
11316 #################################################
11317 # check for location of Kerberos 5 install
11318 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11319 echo "configure:11320: checking for kerberos 5 install path" >&5
11320 # Check whether --with-krb5 or --without-krb5 was given.
11321 if test "${with_krb5+set}" = set; then
11322   withval="$with_krb5"
11323    case "$withval" in
11324   no)
11325     echo "$ac_t""no" 1>&6
11326     ;;
11327   *)
11328     echo "$ac_t""yes" 1>&6
11329     LIBS="$LIBS -lkrb5"
11330     CFLAGS="$CFLAGS -I$withval/include"
11331     CPPFLAGS="$CPPFLAGS -I$withval/include"
11332     LDFLAGS="$LDFLAGS -L$withval/lib"
11333     ;;
11334   esac 
11335 else
11336   echo "$ac_t""no" 1>&6
11337
11338 fi
11339
11340
11341 # now check for krb5.h. Some systems have the libraries without the headers!
11342 # note that this check is done here to allow for different kerberos
11343 # include paths
11344 for ac_hdr in krb5.h
11345 do
11346 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11347 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11348 echo "configure:11349: checking for $ac_hdr" >&5
11349 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11350   echo $ac_n "(cached) $ac_c" 1>&6
11351 else
11352   cat > conftest.$ac_ext <<EOF
11353 #line 11354 "configure"
11354 #include "confdefs.h"
11355 #include <$ac_hdr>
11356 EOF
11357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11358 { (eval echo configure:11359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11360 if test -z "$ac_err"; then
11361   rm -rf conftest*
11362   eval "ac_cv_header_$ac_safe=yes"
11363 else
11364   echo "$ac_err" >&5
11365   echo "configure: failed program was:" >&5
11366   cat conftest.$ac_ext >&5
11367   rm -rf conftest*
11368   eval "ac_cv_header_$ac_safe=no"
11369 fi
11370 rm -f conftest*
11371 fi
11372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11373   echo "$ac_t""yes" 1>&6
11374     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11375   cat >> confdefs.h <<EOF
11376 #define $ac_tr_hdr 1
11377 EOF
11378  
11379 else
11380   echo "$ac_t""no" 1>&6
11381 fi
11382 done
11383
11384
11385 # now check for gssapi headers.  This is also done here to allow for
11386 # different kerberos include paths
11387 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
11388 do
11389 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11390 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11391 echo "configure:11392: checking for $ac_hdr" >&5
11392 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11393   echo $ac_n "(cached) $ac_c" 1>&6
11394 else
11395   cat > conftest.$ac_ext <<EOF
11396 #line 11397 "configure"
11397 #include "confdefs.h"
11398 #include <$ac_hdr>
11399 EOF
11400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11401 { (eval echo configure:11402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11403 if test -z "$ac_err"; then
11404   rm -rf conftest*
11405   eval "ac_cv_header_$ac_safe=yes"
11406 else
11407   echo "$ac_err" >&5
11408   echo "configure: failed program was:" >&5
11409   cat conftest.$ac_ext >&5
11410   rm -rf conftest*
11411   eval "ac_cv_header_$ac_safe=no"
11412 fi
11413 rm -f conftest*
11414 fi
11415 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11416   echo "$ac_t""yes" 1>&6
11417     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11418   cat >> confdefs.h <<EOF
11419 #define $ac_tr_hdr 1
11420 EOF
11421  
11422 else
11423   echo "$ac_t""no" 1>&6
11424 fi
11425 done
11426
11427
11428 ##################################################################
11429 # we might need the k5crypto and com_err libraries on some systems
11430 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11431 echo "configure:11432: checking for _et_list in -lcom_err" >&5
11432 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11433 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11434   echo $ac_n "(cached) $ac_c" 1>&6
11435 else
11436   ac_save_LIBS="$LIBS"
11437 LIBS="-lcom_err  $LIBS"
11438 cat > conftest.$ac_ext <<EOF
11439 #line 11440 "configure"
11440 #include "confdefs.h"
11441 /* Override any gcc2 internal prototype to avoid an error.  */
11442 /* We use char because int might match the return type of a gcc2
11443     builtin and then its argument prototype would still apply.  */
11444 char _et_list();
11445
11446 int main() {
11447 _et_list()
11448 ; return 0; }
11449 EOF
11450 if { (eval echo configure:11451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11451   rm -rf conftest*
11452   eval "ac_cv_lib_$ac_lib_var=yes"
11453 else
11454   echo "configure: failed program was:" >&5
11455   cat conftest.$ac_ext >&5
11456   rm -rf conftest*
11457   eval "ac_cv_lib_$ac_lib_var=no"
11458 fi
11459 rm -f conftest*
11460 LIBS="$ac_save_LIBS"
11461
11462 fi
11463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11464   echo "$ac_t""yes" 1>&6
11465   LIBS="$LIBS -lcom_err"
11466 else
11467   echo "$ac_t""no" 1>&6
11468 fi
11469
11470 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11471 echo "configure:11472: checking for krb5_encrypt_data in -lk5crypto" >&5
11472 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11473 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11474   echo $ac_n "(cached) $ac_c" 1>&6
11475 else
11476   ac_save_LIBS="$LIBS"
11477 LIBS="-lk5crypto  $LIBS"
11478 cat > conftest.$ac_ext <<EOF
11479 #line 11480 "configure"
11480 #include "confdefs.h"
11481 /* Override any gcc2 internal prototype to avoid an error.  */
11482 /* We use char because int might match the return type of a gcc2
11483     builtin and then its argument prototype would still apply.  */
11484 char krb5_encrypt_data();
11485
11486 int main() {
11487 krb5_encrypt_data()
11488 ; return 0; }
11489 EOF
11490 if { (eval echo configure:11491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11491   rm -rf conftest*
11492   eval "ac_cv_lib_$ac_lib_var=yes"
11493 else
11494   echo "configure: failed program was:" >&5
11495   cat conftest.$ac_ext >&5
11496   rm -rf conftest*
11497   eval "ac_cv_lib_$ac_lib_var=no"
11498 fi
11499 rm -f conftest*
11500 LIBS="$ac_save_LIBS"
11501
11502 fi
11503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11504   echo "$ac_t""yes" 1>&6
11505   LIBS="$LIBS -lk5crypto"
11506 else
11507   echo "$ac_t""no" 1>&6
11508 fi
11509
11510 echo $ac_n "checking for gss_import_name in -lgssapi_krb5""... $ac_c" 1>&6
11511 echo "configure:11512: checking for gss_import_name in -lgssapi_krb5" >&5
11512 ac_lib_var=`echo gssapi_krb5'_'gss_import_name | sed 'y%./+-%__p_%'`
11513 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11514   echo $ac_n "(cached) $ac_c" 1>&6
11515 else
11516   ac_save_LIBS="$LIBS"
11517 LIBS="-lgssapi_krb5  $LIBS"
11518 cat > conftest.$ac_ext <<EOF
11519 #line 11520 "configure"
11520 #include "confdefs.h"
11521 /* Override any gcc2 internal prototype to avoid an error.  */
11522 /* We use char because int might match the return type of a gcc2
11523     builtin and then its argument prototype would still apply.  */
11524 char gss_import_name();
11525
11526 int main() {
11527 gss_import_name()
11528 ; return 0; }
11529 EOF
11530 if { (eval echo configure:11531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11531   rm -rf conftest*
11532   eval "ac_cv_lib_$ac_lib_var=yes"
11533 else
11534   echo "configure: failed program was:" >&5
11535   cat conftest.$ac_ext >&5
11536   rm -rf conftest*
11537   eval "ac_cv_lib_$ac_lib_var=no"
11538 fi
11539 rm -f conftest*
11540 LIBS="$ac_save_LIBS"
11541
11542 fi
11543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11544   echo "$ac_t""yes" 1>&6
11545   LIBS="$LIBS -lgssapi_krb5"
11546 else
11547   echo "$ac_t""no" 1>&6
11548 fi
11549
11550
11551
11552 ########################################################
11553 # now see if we can find the krb5 libs in standard paths
11554 # or as specified above
11555 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11556 echo "configure:11557: checking for krb5_mk_req_extended in -lkrb5" >&5
11557 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11558 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11559   echo $ac_n "(cached) $ac_c" 1>&6
11560 else
11561   ac_save_LIBS="$LIBS"
11562 LIBS="-lkrb5  $LIBS"
11563 cat > conftest.$ac_ext <<EOF
11564 #line 11565 "configure"
11565 #include "confdefs.h"
11566 /* Override any gcc2 internal prototype to avoid an error.  */
11567 /* We use char because int might match the return type of a gcc2
11568     builtin and then its argument prototype would still apply.  */
11569 char krb5_mk_req_extended();
11570
11571 int main() {
11572 krb5_mk_req_extended()
11573 ; return 0; }
11574 EOF
11575 if { (eval echo configure:11576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11576   rm -rf conftest*
11577   eval "ac_cv_lib_$ac_lib_var=yes"
11578 else
11579   echo "configure: failed program was:" >&5
11580   cat conftest.$ac_ext >&5
11581   rm -rf conftest*
11582   eval "ac_cv_lib_$ac_lib_var=no"
11583 fi
11584 rm -f conftest*
11585 LIBS="$ac_save_LIBS"
11586
11587 fi
11588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11589   echo "$ac_t""yes" 1>&6
11590   LIBS="$LIBS -lkrb5";
11591         cat >> confdefs.h <<\EOF
11592 #define HAVE_KRB5 1
11593 EOF
11594
11595 else
11596   echo "$ac_t""no" 1>&6
11597 fi
11598
11599
11600
11601 ##################################################################
11602 # we might need the lber lib on some systems. To avoid link errors
11603 # this test must be before the libldap test
11604 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11605 echo "configure:11606: checking for ber_scanf in -llber" >&5
11606 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11607 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11608   echo $ac_n "(cached) $ac_c" 1>&6
11609 else
11610   ac_save_LIBS="$LIBS"
11611 LIBS="-llber  $LIBS"
11612 cat > conftest.$ac_ext <<EOF
11613 #line 11614 "configure"
11614 #include "confdefs.h"
11615 /* Override any gcc2 internal prototype to avoid an error.  */
11616 /* We use char because int might match the return type of a gcc2
11617     builtin and then its argument prototype would still apply.  */
11618 char ber_scanf();
11619
11620 int main() {
11621 ber_scanf()
11622 ; return 0; }
11623 EOF
11624 if { (eval echo configure:11625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11625   rm -rf conftest*
11626   eval "ac_cv_lib_$ac_lib_var=yes"
11627 else
11628   echo "configure: failed program was:" >&5
11629   cat conftest.$ac_ext >&5
11630   rm -rf conftest*
11631   eval "ac_cv_lib_$ac_lib_var=no"
11632 fi
11633 rm -f conftest*
11634 LIBS="$ac_save_LIBS"
11635
11636 fi
11637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11638   echo "$ac_t""yes" 1>&6
11639   LIBS="$LIBS -llber"
11640 else
11641   echo "$ac_t""no" 1>&6
11642 fi
11643
11644
11645 ########################################################
11646 # now see if we can find the ldap libs in standard paths
11647 if test x$have_ldap != xyes; then
11648 echo $ac_n "checking for ldap_open in -lldap""... $ac_c" 1>&6
11649 echo "configure:11650: checking for ldap_open in -lldap" >&5
11650 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
11651 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11652   echo $ac_n "(cached) $ac_c" 1>&6
11653 else
11654   ac_save_LIBS="$LIBS"
11655 LIBS="-lldap  $LIBS"
11656 cat > conftest.$ac_ext <<EOF
11657 #line 11658 "configure"
11658 #include "confdefs.h"
11659 /* Override any gcc2 internal prototype to avoid an error.  */
11660 /* We use char because int might match the return type of a gcc2
11661     builtin and then its argument prototype would still apply.  */
11662 char ldap_open();
11663
11664 int main() {
11665 ldap_open()
11666 ; return 0; }
11667 EOF
11668 if { (eval echo configure:11669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11669   rm -rf conftest*
11670   eval "ac_cv_lib_$ac_lib_var=yes"
11671 else
11672   echo "configure: failed program was:" >&5
11673   cat conftest.$ac_ext >&5
11674   rm -rf conftest*
11675   eval "ac_cv_lib_$ac_lib_var=no"
11676 fi
11677 rm -f conftest*
11678 LIBS="$ac_save_LIBS"
11679
11680 fi
11681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11682   echo "$ac_t""yes" 1>&6
11683   LIBS="$LIBS -lldap";
11684         cat >> confdefs.h <<\EOF
11685 #define HAVE_LDAP 1
11686 EOF
11687
11688 else
11689   echo "$ac_t""no" 1>&6
11690 fi
11691
11692 fi
11693
11694
11695 #################################################
11696 # check for automount support
11697 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11698 echo "configure:11699: checking whether to use AUTOMOUNT" >&5
11699 # Check whether --with-automount or --without-automount was given.
11700 if test "${with_automount+set}" = set; then
11701   withval="$with_automount"
11702    case "$withval" in
11703   yes)
11704     echo "$ac_t""yes" 1>&6
11705     cat >> confdefs.h <<\EOF
11706 #define WITH_AUTOMOUNT 1
11707 EOF
11708
11709     ;;
11710   *)
11711     echo "$ac_t""no" 1>&6
11712     ;;
11713   esac 
11714 else
11715   echo "$ac_t""no" 1>&6
11716
11717 fi
11718
11719
11720 #################################################
11721 # check for smbmount support
11722 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11723 echo "configure:11724: checking whether to use SMBMOUNT" >&5
11724 # Check whether --with-smbmount or --without-smbmount was given.
11725 if test "${with_smbmount+set}" = set; then
11726   withval="$with_smbmount"
11727    case "$withval" in
11728   yes)
11729         case "$host_os" in
11730         *linux*)
11731                 echo "$ac_t""yes" 1>&6
11732                 cat >> confdefs.h <<\EOF
11733 #define WITH_SMBMOUNT 1
11734 EOF
11735
11736                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11737                 ;;
11738         *)
11739                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
11740                 ;;
11741         esac
11742     ;;
11743   *)
11744     echo "$ac_t""no" 1>&6
11745     MPROGS=
11746     ;;
11747   esac 
11748 else
11749   echo "$ac_t""no" 1>&6
11750   MPROGS=
11751
11752 fi
11753
11754
11755
11756 #################################################
11757 # check for a PAM clear-text auth, accounts, password and session support
11758 with_pam_for_crypt=no
11759 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
11760 echo "configure:11761: checking whether to use PAM" >&5
11761 # Check whether --with-pam or --without-pam was given.
11762 if test "${with_pam+set}" = set; then
11763   withval="$with_pam"
11764    case "$withval" in
11765   yes)
11766     echo "$ac_t""yes" 1>&6
11767     cat >> confdefs.h <<\EOF
11768 #define WITH_PAM 1
11769 EOF
11770
11771     LIBS="$LIBS -lpam"
11772     with_pam_for_crypt=yes
11773     ;;
11774   *)
11775     echo "$ac_t""no" 1>&6
11776     ;;
11777   esac 
11778 else
11779   echo "$ac_t""no" 1>&6
11780
11781 fi
11782
11783
11784 # we can't build a pam module if we don't have pam.
11785 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11786 echo "configure:11787: checking for pam_get_data in -lpam" >&5
11787 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11788 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11789   echo $ac_n "(cached) $ac_c" 1>&6
11790 else
11791   ac_save_LIBS="$LIBS"
11792 LIBS="-lpam  $LIBS"
11793 cat > conftest.$ac_ext <<EOF
11794 #line 11795 "configure"
11795 #include "confdefs.h"
11796 /* Override any gcc2 internal prototype to avoid an error.  */
11797 /* We use char because int might match the return type of a gcc2
11798     builtin and then its argument prototype would still apply.  */
11799 char pam_get_data();
11800
11801 int main() {
11802 pam_get_data()
11803 ; return 0; }
11804 EOF
11805 if { (eval echo configure:11806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11806   rm -rf conftest*
11807   eval "ac_cv_lib_$ac_lib_var=yes"
11808 else
11809   echo "configure: failed program was:" >&5
11810   cat conftest.$ac_ext >&5
11811   rm -rf conftest*
11812   eval "ac_cv_lib_$ac_lib_var=no"
11813 fi
11814 rm -f conftest*
11815 LIBS="$ac_save_LIBS"
11816
11817 fi
11818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11819   echo "$ac_t""yes" 1>&6
11820   cat >> confdefs.h <<\EOF
11821 #define HAVE_LIBPAM 1
11822 EOF
11823
11824 else
11825   echo "$ac_t""no" 1>&6
11826 fi
11827
11828
11829 #################################################
11830 # check for pam_smbpass support
11831 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11832 echo "configure:11833: checking whether to use pam_smbpass" >&5
11833 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11834 if test "${with_pam_smbpass+set}" = set; then
11835   withval="$with_pam_smbpass"
11836    case "$withval" in
11837   yes)
11838     echo "$ac_t""yes" 1>&6
11839
11840 # Conditions under which pam_smbpass should not be built.
11841
11842        if test x$PICFLAG = x; then
11843           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11844           PAM_MOD=""
11845        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11846           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11847           PAM_MOD=""
11848        else
11849           PAM_MOD="bin/pam_smbpass.so"
11850        fi
11851     ;;
11852   *)
11853     echo "$ac_t""no" 1>&6
11854     ;;
11855   esac 
11856 else
11857   echo "$ac_t""no" 1>&6
11858
11859 fi
11860
11861
11862
11863 ###############################################
11864 # test for where we get crypt() from, but only
11865 # if not using PAM
11866 if test $with_pam_for_crypt = no; then
11867 for ac_func in crypt
11868 do
11869 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11870 echo "configure:11871: checking for $ac_func" >&5
11871 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11872   echo $ac_n "(cached) $ac_c" 1>&6
11873 else
11874   cat > conftest.$ac_ext <<EOF
11875 #line 11876 "configure"
11876 #include "confdefs.h"
11877 /* System header to define __stub macros and hopefully few prototypes,
11878     which can conflict with char $ac_func(); below.  */
11879 #include <assert.h>
11880 /* Override any gcc2 internal prototype to avoid an error.  */
11881 /* We use char because int might match the return type of a gcc2
11882     builtin and then its argument prototype would still apply.  */
11883 char $ac_func();
11884
11885 int main() {
11886
11887 /* The GNU C library defines this for functions which it implements
11888     to always fail with ENOSYS.  Some functions are actually named
11889     something starting with __ and the normal name is an alias.  */
11890 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11891 choke me
11892 #else
11893 $ac_func();
11894 #endif
11895
11896 ; return 0; }
11897 EOF
11898 if { (eval echo configure:11899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11899   rm -rf conftest*
11900   eval "ac_cv_func_$ac_func=yes"
11901 else
11902   echo "configure: failed program was:" >&5
11903   cat conftest.$ac_ext >&5
11904   rm -rf conftest*
11905   eval "ac_cv_func_$ac_func=no"
11906 fi
11907 rm -f conftest*
11908 fi
11909
11910 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11911   echo "$ac_t""yes" 1>&6
11912     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11913   cat >> confdefs.h <<EOF
11914 #define $ac_tr_func 1
11915 EOF
11916  
11917 else
11918   echo "$ac_t""no" 1>&6
11919 fi
11920 done
11921
11922 if test x"$ac_cv_func_crypt" = x"no"; then
11923     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11924 echo "configure:11925: checking for crypt in -lcrypt" >&5
11925 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11926 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11927   echo $ac_n "(cached) $ac_c" 1>&6
11928 else
11929   ac_save_LIBS="$LIBS"
11930 LIBS="-lcrypt  $LIBS"
11931 cat > conftest.$ac_ext <<EOF
11932 #line 11933 "configure"
11933 #include "confdefs.h"
11934 /* Override any gcc2 internal prototype to avoid an error.  */
11935 /* We use char because int might match the return type of a gcc2
11936     builtin and then its argument prototype would still apply.  */
11937 char crypt();
11938
11939 int main() {
11940 crypt()
11941 ; return 0; }
11942 EOF
11943 if { (eval echo configure:11944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11944   rm -rf conftest*
11945   eval "ac_cv_lib_$ac_lib_var=yes"
11946 else
11947   echo "configure: failed program was:" >&5
11948   cat conftest.$ac_ext >&5
11949   rm -rf conftest*
11950   eval "ac_cv_lib_$ac_lib_var=no"
11951 fi
11952 rm -f conftest*
11953 LIBS="$ac_save_LIBS"
11954
11955 fi
11956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11957   echo "$ac_t""yes" 1>&6
11958   LIBS="$LIBS -lcrypt";
11959         cat >> confdefs.h <<\EOF
11960 #define HAVE_CRYPT 1
11961 EOF
11962
11963 else
11964   echo "$ac_t""no" 1>&6
11965 fi
11966
11967 fi
11968 fi
11969
11970 ##
11971 ## moved after the check for -lcrypt in order to
11972 ## ensure that the necessary libraries are included
11973 ## check checking for truncated salt.  Wrapped by the
11974 ## $with_pam_for_crypt variable as above   --jerry
11975 ##
11976 if test $with_pam_for_crypt = no; then
11977 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
11978 echo "configure:11979: checking for a crypt that needs truncated salt" >&5
11979 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
11980   echo $ac_n "(cached) $ac_c" 1>&6
11981 else
11982   
11983 if test "$cross_compiling" = yes; then
11984   samba_cv_HAVE_TRUNCATED_SALT=cross
11985 else
11986   cat > conftest.$ac_ext <<EOF
11987 #line 11988 "configure"
11988 #include "confdefs.h"
11989 #include "${srcdir-.}/tests/crypttest.c"
11990 EOF
11991 if { (eval echo configure:11992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11992 then
11993   samba_cv_HAVE_TRUNCATED_SALT=no
11994 else
11995   echo "configure: failed program was:" >&5
11996   cat conftest.$ac_ext >&5
11997   rm -fr conftest*
11998   samba_cv_HAVE_TRUNCATED_SALT=yes
11999 fi
12000 rm -fr conftest*
12001 fi
12002
12003 fi
12004
12005 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12006 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12007         cat >> confdefs.h <<\EOF
12008 #define HAVE_TRUNCATED_SALT 1
12009 EOF
12010
12011 fi
12012 fi
12013
12014
12015
12016 ########################################################################################
12017 ##
12018 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12019 ##
12020 ########################################################################################
12021
12022 ## set the with_smbpasswd_sam as the default
12023 with_smbpasswd_sam=yes
12024
12025
12026 #################################################
12027 # check for a TDB password database
12028 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12029 echo "configure:12030: checking whether to use TDB SAM database" >&5
12030 # Check whether --with-tdbsam or --without-tdbsam was given.
12031 if test "${with_tdbsam+set}" = set; then
12032   withval="$with_tdbsam"
12033    case "$withval" in
12034   yes)
12035     echo "$ac_t""yes" 1>&6
12036     cat >> confdefs.h <<\EOF
12037 #define WITH_TDB_SAM 1
12038 EOF
12039
12040     with_smbpasswd_sam=no
12041     ;;
12042   *)
12043     echo "$ac_t""no" 1>&6
12044     ;;
12045   esac 
12046 else
12047   echo "$ac_t""no" 1>&6
12048
12049 fi
12050
12051
12052 #################################################
12053 # check for a LDAP password database
12054 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12055 echo "configure:12056: checking whether to use LDAP SAM database" >&5
12056 # Check whether --with-ldapsam or --without-ldapsam was given.
12057 if test "${with_ldapsam+set}" = set; then
12058   withval="$with_ldapsam"
12059    case "$withval" in
12060   yes)
12061     echo "$ac_t""yes" 1>&6
12062     cat >> confdefs.h <<\EOF
12063 #define WITH_LDAP_SAM 1
12064 EOF
12065
12066     LIBS="-lldap -llber $LIBS"
12067     with_smbpasswd_sam=no
12068     ;;
12069   *)
12070     echo "$ac_t""no" 1>&6
12071     ;;
12072   esac 
12073 else
12074   echo "$ac_t""no" 1>&6
12075
12076 fi
12077
12078
12079 #################################################
12080 # check for a NISPLUS password database
12081 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12082 echo "configure:12083: checking whether to use NISPLUS SAM database" >&5
12083 # Check whether --with-nisplussam or --without-nisplussam was given.
12084 if test "${with_nisplussam+set}" = set; then
12085   withval="$with_nisplussam"
12086    case "$withval" in
12087   yes)
12088     echo "$ac_t""yes" 1>&6
12089     cat >> confdefs.h <<\EOF
12090 #define WITH_NISPLUS_SAM 1
12091 EOF
12092
12093     with_smbpasswd_sam=no
12094     ;;
12095   *)
12096     echo "$ac_t""no" 1>&6
12097     ;;
12098   esac 
12099 else
12100   echo "$ac_t""no" 1>&6
12101
12102 fi
12103
12104
12105 ################################################
12106 # This test should come last because the
12107 # smbpasswd SAM is only used if another format
12108 # has not been defined
12109 echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6
12110 echo "configure:12111: checking whether to use traditional smbpasswd file" >&5
12111 if test $with_smbpasswd_sam = yes; then
12112         echo "$ac_t""yes" 1>&6
12113         cat >> confdefs.h <<\EOF
12114 #define WITH_SMBPASSWD_SAM 1
12115 EOF
12116
12117 else
12118         echo "$ac_t""no" 1>&6
12119 fi
12120
12121 ########################################################################################
12122 ##
12123 ## END OF TESTS FOR SAM BACKENDS.  
12124 ##
12125 ########################################################################################
12126
12127 #################################################
12128 # check for a NISPLUS_HOME support 
12129 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12130 echo "configure:12131: checking whether to use NISPLUS_HOME" >&5
12131 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12132 if test "${with_nisplus_home+set}" = set; then
12133   withval="$with_nisplus_home"
12134    case "$withval" in
12135   yes)
12136     echo "$ac_t""yes" 1>&6
12137     cat >> confdefs.h <<\EOF
12138 #define WITH_NISPLUS_HOME 1
12139 EOF
12140
12141     ;;
12142   *)
12143     echo "$ac_t""no" 1>&6
12144     ;;
12145   esac 
12146 else
12147   echo "$ac_t""no" 1>&6
12148
12149 fi
12150
12151
12152 #################################################
12153 # check for the secure socket layer
12154 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12155 echo "configure:12156: checking whether to use SSL" >&5
12156 # Check whether --with-ssl or --without-ssl was given.
12157 if test "${with_ssl+set}" = set; then
12158   withval="$with_ssl"
12159    case "$withval" in
12160   yes)
12161     echo "$ac_t""yes" 1>&6
12162     cat >> confdefs.h <<\EOF
12163 #define WITH_SSL 1
12164 EOF
12165
12166     withval="/usr/local/ssl"     # default
12167
12168     if test "${with_sslinc+set}" = set; then
12169
12170         withval="$with_sslinc"
12171         case "$withval" in
12172         yes|no)
12173           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12174           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12175         ;;
12176         * )
12177           CFLAGS="-I${withval} $CFLAGS"
12178         ;;
12179         esac
12180
12181     else
12182
12183         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12184
12185     fi
12186
12187     if test "${with_ssllib+set}" = set; then
12188
12189         withval="$with_ssllib"
12190         case "$withval" in
12191         yes|no)
12192           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12193           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12194         ;;
12195         * )
12196           LDFLAGS="-L${withval}/lib $LDFLAGS"
12197         ;;
12198         esac
12199
12200     else
12201
12202         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12203
12204     fi
12205
12206     LIBS="-lssl -lcrypto $LIBS"
12207
12208 #    if test ! -d ${withval}; then
12209 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12210 #      exit 1
12211 #    fi 
12212
12213     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12214
12215     ;;
12216   *)
12217     echo "$ac_t""no" 1>&6
12218     ;;
12219   esac 
12220 else
12221   echo "$ac_t""no" 1>&6
12222
12223 fi
12224
12225
12226 #################################################
12227 # check for syslog logging
12228 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12229 echo "configure:12230: checking whether to use syslog logging" >&5
12230 # Check whether --with-syslog or --without-syslog was given.
12231 if test "${with_syslog+set}" = set; then
12232   withval="$with_syslog"
12233    case "$withval" in
12234   yes)
12235     echo "$ac_t""yes" 1>&6
12236     cat >> confdefs.h <<\EOF
12237 #define WITH_SYSLOG 1
12238 EOF
12239
12240     ;;
12241   *)
12242     echo "$ac_t""no" 1>&6
12243     ;;
12244   esac 
12245 else
12246   echo "$ac_t""no" 1>&6
12247
12248 fi
12249
12250
12251 #################################################
12252 # check for a shared memory profiling support
12253 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12254 echo "configure:12255: checking whether to use profiling" >&5
12255 # Check whether --with-profiling-data or --without-profiling-data was given.
12256 if test "${with_profiling_data+set}" = set; then
12257   withval="$with_profiling_data"
12258    case "$withval" in
12259   yes)
12260     echo "$ac_t""yes" 1>&6
12261     cat >> confdefs.h <<\EOF
12262 #define WITH_PROFILE 1
12263 EOF
12264
12265     ;;
12266   *)
12267     echo "$ac_t""no" 1>&6
12268     ;;
12269   esac 
12270 else
12271   echo "$ac_t""no" 1>&6
12272
12273 fi
12274
12275
12276
12277 #################################################
12278 # check for experimental disk-quotas support
12279 QUOTAOBJS=smbd/noquotas.o
12280
12281 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12282 echo "configure:12283: checking whether to support disk-quotas" >&5
12283 # Check whether --with-quotas or --without-quotas was given.
12284 if test "${with_quotas+set}" = set; then
12285   withval="$with_quotas"
12286    case "$withval" in
12287   yes)
12288     echo "$ac_t""yes" 1>&6
12289     case "$host_os" in
12290       *linux*)
12291         # Check for kernel 2.4.x quota braindamage...
12292         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12293 echo "configure:12294: checking for linux 2.4.x quota braindamage.." >&5
12294 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12295   echo $ac_n "(cached) $ac_c" 1>&6
12296 else
12297   
12298         cat > conftest.$ac_ext <<EOF
12299 #line 12300 "configure"
12300 #include "confdefs.h"
12301 #include <stdio.h>
12302 #include <sys/types.h>
12303 #include <asm/types.h>
12304 #include <linux/quota.h>
12305 #include <mntent.h>
12306 #include <linux/unistd.h>
12307 int main() {
12308 struct mem_dqblk D;
12309 ; return 0; }
12310 EOF
12311 if { (eval echo configure:12312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12312   rm -rf conftest*
12313   samba_cv_linux_2_4_quota_braindamage=yes
12314 else
12315   echo "configure: failed program was:" >&5
12316   cat conftest.$ac_ext >&5
12317   rm -rf conftest*
12318   samba_cv_linux_2_4_quota_braindamage=no
12319 fi
12320 rm -f conftest*
12321 fi
12322
12323 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12324 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12325         cat >> confdefs.h <<\EOF
12326 #define LINUX_QUOTAS_2 1
12327 EOF
12328
12329 else
12330         cat >> confdefs.h <<\EOF
12331 #define LINUX_QUOTAS_1 1
12332 EOF
12333
12334 fi
12335         ;;
12336       *)
12337         ;;
12338     esac
12339     QUOTAOBJS=smbd/quotas.o
12340     cat >> confdefs.h <<\EOF
12341 #define WITH_QUOTAS 1
12342 EOF
12343
12344     ;;
12345   *)
12346     echo "$ac_t""no" 1>&6
12347     ;;
12348   esac 
12349 else
12350   echo "$ac_t""no" 1>&6
12351
12352 fi
12353
12354
12355
12356 #################################################
12357 # check for experimental utmp accounting
12358
12359 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12360 echo "configure:12361: checking whether to support utmp accounting" >&5
12361 # Check whether --with-utmp or --without-utmp was given.
12362 if test "${with_utmp+set}" = set; then
12363   withval="$with_utmp"
12364    case "$withval" in
12365   yes)
12366     echo "$ac_t""yes" 1>&6
12367     cat >> confdefs.h <<\EOF
12368 #define WITH_UTMP 1
12369 EOF
12370
12371     ;;
12372   *)
12373     echo "$ac_t""no" 1>&6
12374     ;;
12375   esac 
12376 else
12377   echo "$ac_t""no" 1>&6
12378
12379 fi
12380
12381
12382 #################################################
12383 # set private directory location
12384 # Check whether --with-privatedir or --without-privatedir was given.
12385 if test "${with_privatedir+set}" = set; then
12386   withval="$with_privatedir"
12387    case "$withval" in
12388   yes|no)
12389   #
12390   # Just in case anybody calls it without argument
12391   #
12392     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12393     privatedir='${prefix}/private'
12394   ;;
12395   * )
12396     privatedir="$withval"
12397     ;;
12398   esac
12399   
12400 else
12401   privatedir='${prefix}/private'
12402    
12403
12404 fi
12405
12406
12407 #################################################
12408 # set lock directory location
12409 # Check whether --with-lockdir or --without-lockdir was given.
12410 if test "${with_lockdir+set}" = set; then
12411   withval="$with_lockdir"
12412    case "$withval" in
12413   yes|no)
12414   #
12415   # Just in case anybody calls it without argument
12416   #
12417     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12418     lockdir='$(VARDIR)/locks'
12419   ;;
12420   * )
12421     lockdir="$withval"
12422     ;;
12423   esac
12424   
12425 else
12426   lockdir='$(VARDIR)/locks'
12427    
12428
12429 fi
12430
12431
12432 #################################################
12433 # set SWAT directory location
12434 # Check whether --with-swatdir or --without-swatdir was given.
12435 if test "${with_swatdir+set}" = set; then
12436   withval="$with_swatdir"
12437    case "$withval" in
12438   yes|no)
12439   #
12440   # Just in case anybody does it
12441   #
12442     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12443     swatdir='${prefix}/swat'
12444   ;;
12445   * )
12446     swatdir="$withval"
12447     ;;
12448   esac
12449   
12450 else
12451   swatdir='${prefix}/swat'
12452    
12453
12454 fi
12455
12456
12457 #################################################
12458 # choose native language(s) of man pages
12459 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12460 echo "configure:12461: checking chosen man pages' language(s)" >&5
12461 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12462 if test "${with_manpages_langs+set}" = set; then
12463   withval="$with_manpages_langs"
12464    case "$withval" in
12465   yes|no)
12466     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12467     manlangs="en"
12468   ;;
12469   *)
12470     manlangs="$withval"
12471   ;;
12472   esac
12473
12474   echo "$ac_t""$manlangs" 1>&6
12475   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12476   
12477 else
12478   manlangs="en"
12479   echo "$ac_t""$manlangs" 1>&6
12480   
12481
12482 fi
12483
12484
12485 #################################################
12486 # these tests are taken from the GNU fileutils package
12487 echo "checking how to get filesystem space usage" 1>&6
12488 echo "configure:12489: checking how to get filesystem space usage" >&5
12489 space=no
12490
12491 # Test for statvfs64.
12492 if test $space = no; then
12493   # SVR4
12494   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12495 echo "configure:12496: checking statvfs64 function (SVR4)" >&5
12496 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12497   echo $ac_n "(cached) $ac_c" 1>&6
12498 else
12499   if test "$cross_compiling" = yes; then
12500   fu_cv_sys_stat_statvfs64=cross
12501 else
12502   cat > conftest.$ac_ext <<EOF
12503 #line 12504 "configure"
12504 #include "confdefs.h"
12505
12506 #if defined(HAVE_UNISTD_H)
12507 #include <unistd.h>
12508 #endif
12509 #include <sys/types.h>
12510 #include <sys/statvfs.h>
12511   main ()
12512   {
12513     struct statvfs64 fsd;
12514     exit (statvfs64 (".", &fsd));
12515   }
12516 EOF
12517 if { (eval echo configure:12518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12518 then
12519   fu_cv_sys_stat_statvfs64=yes
12520 else
12521   echo "configure: failed program was:" >&5
12522   cat conftest.$ac_ext >&5
12523   rm -fr conftest*
12524   fu_cv_sys_stat_statvfs64=no
12525 fi
12526 rm -fr conftest*
12527 fi
12528
12529 fi
12530
12531 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12532   if test $fu_cv_sys_stat_statvfs64 = yes; then
12533     space=yes
12534     cat >> confdefs.h <<\EOF
12535 #define STAT_STATVFS64 1
12536 EOF
12537
12538   fi
12539 fi
12540
12541 # Perform only the link test since it seems there are no variants of the
12542 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12543 # because that got a false positive on SCO OSR5.  Adding the declaration
12544 # of a `struct statvfs' causes this test to fail (as it should) on such
12545 # systems.  That system is reported to work fine with STAT_STATFS4 which
12546 # is what it gets when this test fails.
12547 if test $space = no; then
12548   # SVR4
12549   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12550 echo "configure:12551: checking statvfs function (SVR4)" >&5
12551 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12552   echo $ac_n "(cached) $ac_c" 1>&6
12553 else
12554   cat > conftest.$ac_ext <<EOF
12555 #line 12556 "configure"
12556 #include "confdefs.h"
12557 #include <sys/types.h>
12558 #include <sys/statvfs.h>
12559 int main() {
12560 struct statvfs fsd; statvfs (0, &fsd);
12561 ; return 0; }
12562 EOF
12563 if { (eval echo configure:12564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12564   rm -rf conftest*
12565   fu_cv_sys_stat_statvfs=yes
12566 else
12567   echo "configure: failed program was:" >&5
12568   cat conftest.$ac_ext >&5
12569   rm -rf conftest*
12570   fu_cv_sys_stat_statvfs=no
12571 fi
12572 rm -f conftest*
12573 fi
12574
12575 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12576   if test $fu_cv_sys_stat_statvfs = yes; then
12577     space=yes
12578     cat >> confdefs.h <<\EOF
12579 #define STAT_STATVFS 1
12580 EOF
12581
12582   fi
12583 fi
12584
12585 if test $space = no; then
12586   # DEC Alpha running OSF/1
12587   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12588 echo "configure:12589: checking for 3-argument statfs function (DEC OSF/1)" >&5
12589   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12590   echo $ac_n "(cached) $ac_c" 1>&6
12591 else
12592   if test "$cross_compiling" = yes; then
12593   fu_cv_sys_stat_statfs3_osf1=no
12594 else
12595   cat > conftest.$ac_ext <<EOF
12596 #line 12597 "configure"
12597 #include "confdefs.h"
12598
12599 #include <sys/param.h>
12600 #include <sys/types.h>
12601 #include <sys/mount.h>
12602   main ()
12603   {
12604     struct statfs fsd;
12605     fsd.f_fsize = 0;
12606     exit (statfs (".", &fsd, sizeof (struct statfs)));
12607   }
12608 EOF
12609 if { (eval echo configure:12610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12610 then
12611   fu_cv_sys_stat_statfs3_osf1=yes
12612 else
12613   echo "configure: failed program was:" >&5
12614   cat conftest.$ac_ext >&5
12615   rm -fr conftest*
12616   fu_cv_sys_stat_statfs3_osf1=no
12617 fi
12618 rm -fr conftest*
12619 fi
12620
12621 fi
12622
12623   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12624   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12625     space=yes
12626     cat >> confdefs.h <<\EOF
12627 #define STAT_STATFS3_OSF1 1
12628 EOF
12629
12630   fi
12631 fi
12632
12633 if test $space = no; then
12634 # AIX
12635   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12636 echo "configure:12637: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12637   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12638   echo $ac_n "(cached) $ac_c" 1>&6
12639 else
12640   if test "$cross_compiling" = yes; then
12641   fu_cv_sys_stat_statfs2_bsize=no
12642 else
12643   cat > conftest.$ac_ext <<EOF
12644 #line 12645 "configure"
12645 #include "confdefs.h"
12646
12647 #ifdef HAVE_SYS_PARAM_H
12648 #include <sys/param.h>
12649 #endif
12650 #ifdef HAVE_SYS_MOUNT_H
12651 #include <sys/mount.h>
12652 #endif
12653 #ifdef HAVE_SYS_VFS_H
12654 #include <sys/vfs.h>
12655 #endif
12656   main ()
12657   {
12658   struct statfs fsd;
12659   fsd.f_bsize = 0;
12660   exit (statfs (".", &fsd));
12661   }
12662 EOF
12663 if { (eval echo configure:12664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12664 then
12665   fu_cv_sys_stat_statfs2_bsize=yes
12666 else
12667   echo "configure: failed program was:" >&5
12668   cat conftest.$ac_ext >&5
12669   rm -fr conftest*
12670   fu_cv_sys_stat_statfs2_bsize=no
12671 fi
12672 rm -fr conftest*
12673 fi
12674
12675 fi
12676
12677   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12678   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12679     space=yes
12680     cat >> confdefs.h <<\EOF
12681 #define STAT_STATFS2_BSIZE 1
12682 EOF
12683
12684   fi
12685 fi
12686
12687 if test $space = no; then
12688 # SVR3
12689   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12690 echo "configure:12691: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12691   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12692   echo $ac_n "(cached) $ac_c" 1>&6
12693 else
12694   if test "$cross_compiling" = yes; then
12695   fu_cv_sys_stat_statfs4=no
12696 else
12697   cat > conftest.$ac_ext <<EOF
12698 #line 12699 "configure"
12699 #include "confdefs.h"
12700 #include <sys/types.h>
12701 #include <sys/statfs.h>
12702   main ()
12703   {
12704   struct statfs fsd;
12705   exit (statfs (".", &fsd, sizeof fsd, 0));
12706   }
12707 EOF
12708 if { (eval echo configure:12709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12709 then
12710   fu_cv_sys_stat_statfs4=yes
12711 else
12712   echo "configure: failed program was:" >&5
12713   cat conftest.$ac_ext >&5
12714   rm -fr conftest*
12715   fu_cv_sys_stat_statfs4=no
12716 fi
12717 rm -fr conftest*
12718 fi
12719
12720 fi
12721
12722   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12723   if test $fu_cv_sys_stat_statfs4 = yes; then
12724     space=yes
12725     cat >> confdefs.h <<\EOF
12726 #define STAT_STATFS4 1
12727 EOF
12728
12729   fi
12730 fi
12731
12732 if test $space = no; then
12733 # 4.4BSD and NetBSD
12734   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12735 echo "configure:12736: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12736   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12737   echo $ac_n "(cached) $ac_c" 1>&6
12738 else
12739   if test "$cross_compiling" = yes; then
12740   fu_cv_sys_stat_statfs2_fsize=no
12741 else
12742   cat > conftest.$ac_ext <<EOF
12743 #line 12744 "configure"
12744 #include "confdefs.h"
12745 #include <sys/types.h>
12746 #ifdef HAVE_SYS_PARAM_H
12747 #include <sys/param.h>
12748 #endif
12749 #ifdef HAVE_SYS_MOUNT_H
12750 #include <sys/mount.h>
12751 #endif
12752   main ()
12753   {
12754   struct statfs fsd;
12755   fsd.f_fsize = 0;
12756   exit (statfs (".", &fsd));
12757   }
12758 EOF
12759 if { (eval echo configure:12760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12760 then
12761   fu_cv_sys_stat_statfs2_fsize=yes
12762 else
12763   echo "configure: failed program was:" >&5
12764   cat conftest.$ac_ext >&5
12765   rm -fr conftest*
12766   fu_cv_sys_stat_statfs2_fsize=no
12767 fi
12768 rm -fr conftest*
12769 fi
12770
12771 fi
12772
12773   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12774   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12775     space=yes
12776     cat >> confdefs.h <<\EOF
12777 #define STAT_STATFS2_FSIZE 1
12778 EOF
12779
12780   fi
12781 fi
12782
12783 if test $space = no; then
12784   # Ultrix
12785   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12786 echo "configure:12787: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12787   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12788   echo $ac_n "(cached) $ac_c" 1>&6
12789 else
12790   if test "$cross_compiling" = yes; then
12791   fu_cv_sys_stat_fs_data=no
12792 else
12793   cat > conftest.$ac_ext <<EOF
12794 #line 12795 "configure"
12795 #include "confdefs.h"
12796 #include <sys/types.h>
12797 #ifdef HAVE_SYS_PARAM_H
12798 #include <sys/param.h>
12799 #endif
12800 #ifdef HAVE_SYS_MOUNT_H
12801 #include <sys/mount.h>
12802 #endif
12803 #ifdef HAVE_SYS_FS_TYPES_H
12804 #include <sys/fs_types.h>
12805 #endif
12806   main ()
12807   {
12808   struct fs_data fsd;
12809   /* Ultrix's statfs returns 1 for success,
12810      0 for not mounted, -1 for failure.  */
12811   exit (statfs (".", &fsd) != 1);
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_fs_data=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_fs_data=no
12822 fi
12823 rm -fr conftest*
12824 fi
12825
12826 fi
12827
12828   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12829   if test $fu_cv_sys_stat_fs_data = yes; then
12830     space=yes
12831     cat >> confdefs.h <<\EOF
12832 #define STAT_STATFS2_FS_DATA 1
12833 EOF
12834
12835   fi
12836 fi
12837
12838 #
12839 # As a gating factor for large file support, in order to
12840 # use <4GB files we must have the following minimal support
12841 # available.
12842 # long long, and a 64 bit off_t or off64_t.
12843 # If we don't have all of these then disable large
12844 # file support.
12845 #
12846 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12847 echo "configure:12848: checking if large file support can be enabled" >&5
12848 cat > conftest.$ac_ext <<EOF
12849 #line 12850 "configure"
12850 #include "confdefs.h"
12851
12852 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12853 #include <sys/types.h>
12854 #else
12855 __COMPILE_ERROR_
12856 #endif
12857
12858 int main() {
12859 int i
12860 ; return 0; }
12861 EOF
12862 if { (eval echo configure:12863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12863   rm -rf conftest*
12864   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12865 else
12866   echo "configure: failed program was:" >&5
12867   cat conftest.$ac_ext >&5
12868   rm -rf conftest*
12869   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12870 fi
12871 rm -f conftest*
12872 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12873     cat >> confdefs.h <<\EOF
12874 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12875 EOF
12876
12877 fi
12878 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12879
12880 # Check whether --with-spinlocks or --without-spinlocks was given.
12881 if test "${with_spinlocks+set}" = set; then
12882   withval="$with_spinlocks"
12883   :
12884 fi
12885
12886 if test "x$with_spinlocks" = "xyes"; then
12887     cat >> confdefs.h <<\EOF
12888 #define USE_SPINLOCKS 1
12889 EOF
12890
12891
12892     case "$host_cpu" in
12893         sparc)
12894             cat >> confdefs.h <<\EOF
12895 #define SPARC_SPINLOCKS 1
12896 EOF
12897
12898             ;;
12899
12900         i386|i486|i586|i686)
12901             cat >> confdefs.h <<\EOF
12902 #define INTEL_SPINLOCKS 1
12903 EOF
12904
12905             ;;
12906
12907         mips)
12908             cat >> confdefs.h <<\EOF
12909 #define MIPS_SPINLOCKS 1
12910 EOF
12911
12912             ;;
12913
12914         powerpc)
12915             cat >> confdefs.h <<\EOF
12916 #define POWERPC_SPINLOCKS 1
12917 EOF
12918
12919             ;;
12920     esac
12921 fi
12922
12923 #################################################
12924 # check for ACL support
12925
12926 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12927 echo "configure:12928: checking whether to support ACLs" >&5
12928 # Check whether --with-acl-support or --without-acl-support was given.
12929 if test "${with_acl_support+set}" = set; then
12930   withval="$with_acl_support"
12931    case "$withval" in
12932   yes)
12933
12934         case "$host_os" in
12935         *sysv5*)
12936             echo "$ac_t""Using UnixWare ACLs" 1>&6
12937             cat >> confdefs.h <<\EOF
12938 #define HAVE_UNIXWARE_ACLS 1
12939 EOF
12940
12941             ;;
12942         *solaris*)
12943             echo "$ac_t""Using solaris ACLs" 1>&6
12944             cat >> confdefs.h <<\EOF
12945 #define HAVE_SOLARIS_ACLS 1
12946 EOF
12947
12948             ;;
12949                 *irix*)
12950                         echo "$ac_t""Using IRIX ACLs" 1>&6
12951                         cat >> confdefs.h <<\EOF
12952 #define HAVE_IRIX_ACLS 1
12953 EOF
12954
12955                         ;;
12956                 *aix*)
12957                         echo "$ac_t""Using AIX ACLs" 1>&6
12958                         cat >> confdefs.h <<\EOF
12959 #define HAVE_AIX_ACLS 1
12960 EOF
12961
12962                         ;;
12963                 *osf*)
12964                         echo "$ac_t""Using Tru64 ACLs" 1>&6
12965                         cat >> confdefs.h <<\EOF
12966 #define HAVE_TRU64_ACLS 1
12967 EOF
12968
12969                         LIBS="$LIBS -lpacl"
12970                         ;;
12971         *)
12972                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12973 echo "configure:12974: checking for acl_get_file in -lacl" >&5
12974 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12975 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12976   echo $ac_n "(cached) $ac_c" 1>&6
12977 else
12978   ac_save_LIBS="$LIBS"
12979 LIBS="-lacl  $LIBS"
12980 cat > conftest.$ac_ext <<EOF
12981 #line 12982 "configure"
12982 #include "confdefs.h"
12983 /* Override any gcc2 internal prototype to avoid an error.  */
12984 /* We use char because int might match the return type of a gcc2
12985     builtin and then its argument prototype would still apply.  */
12986 char acl_get_file();
12987
12988 int main() {
12989 acl_get_file()
12990 ; return 0; }
12991 EOF
12992 if { (eval echo configure:12993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12993   rm -rf conftest*
12994   eval "ac_cv_lib_$ac_lib_var=yes"
12995 else
12996   echo "configure: failed program was:" >&5
12997   cat conftest.$ac_ext >&5
12998   rm -rf conftest*
12999   eval "ac_cv_lib_$ac_lib_var=no"
13000 fi
13001 rm -f conftest*
13002 LIBS="$ac_save_LIBS"
13003
13004 fi
13005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13006   echo "$ac_t""yes" 1>&6
13007     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13008     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13009   cat >> confdefs.h <<EOF
13010 #define $ac_tr_lib 1
13011 EOF
13012
13013   LIBS="-lacl $LIBS"
13014
13015 else
13016   echo "$ac_t""no" 1>&6
13017 fi
13018
13019                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13020 echo "configure:13021: checking for ACL support" >&5
13021 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13022   echo $ac_n "(cached) $ac_c" 1>&6
13023 else
13024   
13025                         cat > conftest.$ac_ext <<EOF
13026 #line 13027 "configure"
13027 #include "confdefs.h"
13028 #include <sys/types.h>
13029 #include <sys/acl.h>
13030 int main() {
13031  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13032 ; return 0; }
13033 EOF
13034 if { (eval echo configure:13035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13035   rm -rf conftest*
13036   samba_cv_HAVE_POSIX_ACLS=yes
13037 else
13038   echo "configure: failed program was:" >&5
13039   cat conftest.$ac_ext >&5
13040   rm -rf conftest*
13041   samba_cv_HAVE_POSIX_ACLS=no
13042 fi
13043 rm -f conftest*
13044 fi
13045
13046 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13047                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13048                                 echo "$ac_t""Using posix ACLs" 1>&6
13049                                 cat >> confdefs.h <<\EOF
13050 #define HAVE_POSIX_ACLS 1
13051 EOF
13052
13053                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13054 echo "configure:13055: checking for acl_get_perm_np" >&5
13055 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13056   echo $ac_n "(cached) $ac_c" 1>&6
13057 else
13058   
13059                                 cat > conftest.$ac_ext <<EOF
13060 #line 13061 "configure"
13061 #include "confdefs.h"
13062 #include <sys/types.h>
13063 #include <sys/acl.h>
13064 int main() {
13065  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13066 ; return 0; }
13067 EOF
13068 if { (eval echo configure:13069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13069   rm -rf conftest*
13070   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13071 else
13072   echo "configure: failed program was:" >&5
13073   cat conftest.$ac_ext >&5
13074   rm -rf conftest*
13075   samba_cv_HAVE_ACL_GET_PERM_NP=no
13076 fi
13077 rm -f conftest*
13078 fi
13079
13080 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13081                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13082                                         cat >> confdefs.h <<\EOF
13083 #define HAVE_ACL_GET_PERM_NP 1
13084 EOF
13085
13086                                 fi
13087                         fi
13088             ;;
13089         esac
13090         ;;
13091   *)
13092     echo "$ac_t""no" 1>&6
13093     cat >> confdefs.h <<\EOF
13094 #define HAVE_NO_ACLS 1
13095 EOF
13096
13097     ;;
13098   esac 
13099 else
13100   cat >> confdefs.h <<\EOF
13101 #define HAVE_NO_ACLS 1
13102 EOF
13103
13104   echo "$ac_t""no" 1>&6
13105
13106 fi
13107
13108
13109 #################################################
13110 # Check whether winbind is supported on this platform.  If so we need to
13111 # build and install client programs (WINBIND_TARGETS), sbin programs
13112 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13113
13114 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13115 echo "configure:13116: checking whether to build winbind" >&5
13116
13117 # Initially, the value of $host_os decides whether winbind is supported
13118
13119 case "$host_os" in 
13120         *linux*|*solaris*)
13121                 HAVE_WINBIND=yes
13122                 ;;
13123         *)
13124                 HAVE_WINBIND=no
13125                 winbind_no_reason=", unsupported on $host_os"
13126                 ;;
13127 esac
13128
13129 # Check the setting of --with-winbindd
13130
13131 # Check whether --with-winbind or --without-winbind was given.
13132 if test "${with_winbind+set}" = set; then
13133   withval="$with_winbind"
13134    
13135   case "$withval" in
13136         yes)
13137                 HAVE_WINBIND=yes
13138                 ;;
13139         no)
13140                 HAVE_WINBIND=no
13141                 winbind_reason=""
13142                 ;;
13143   esac 
13144 fi
13145
13146
13147 # We need unix domain sockets for winbind
13148
13149 if test x"$HAVE_WINBIND" = x"yes"; then
13150         if test x"$samba_cv_unixsocket" = x"no"; then
13151                 winbind_no_reason=", no unix domain socket support on $host_os"
13152                 HAVE_WINBIND=no
13153         fi
13154 fi
13155
13156 # Display test results
13157
13158 if test x"$HAVE_WINBIND" = x"yes"; then
13159
13160         echo "$ac_t""yes" 1>&6
13161
13162         WINBIND_TARGETS="bin/wbinfo"
13163         WINBIND_STARGETS="bin/winbindd"
13164         WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13165         case "$with_pam" in
13166                 yes)
13167                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13168                 ;;
13169         esac
13170 else
13171         echo "$ac_t""no$winbind_no_reason" 1>&6
13172
13173         WINBIND_TARGETS=""
13174         WINBIND_STARGETS=""
13175         WINBIND_LTARGETS=""
13176         WINBIND_PAM_PROGS=""
13177 fi
13178
13179 # Substitution time!
13180
13181
13182
13183
13184
13185
13186 #################################################
13187 # Check to see if we should use the included popt 
13188
13189 # Check whether --with-included-popt or --without-included-popt was given.
13190 if test "${with_included_popt+set}" = set; then
13191   withval="$with_included_popt"
13192    
13193   case "$withval" in
13194         yes)
13195                 INCLUDED_POPT=yes
13196                 ;;
13197         no)
13198                 INCLUDED_POPT=no
13199                 ;;
13200   esac 
13201 fi
13202
13203 if test x"$INCLUDED_POPT" != x"yes"; then
13204     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13205 echo "configure:13206: checking for poptGetContext in -lpopt" >&5
13206 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13207 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13208   echo $ac_n "(cached) $ac_c" 1>&6
13209 else
13210   ac_save_LIBS="$LIBS"
13211 LIBS="-lpopt  $LIBS"
13212 cat > conftest.$ac_ext <<EOF
13213 #line 13214 "configure"
13214 #include "confdefs.h"
13215 /* Override any gcc2 internal prototype to avoid an error.  */
13216 /* We use char because int might match the return type of a gcc2
13217     builtin and then its argument prototype would still apply.  */
13218 char poptGetContext();
13219
13220 int main() {
13221 poptGetContext()
13222 ; return 0; }
13223 EOF
13224 if { (eval echo configure:13225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13225   rm -rf conftest*
13226   eval "ac_cv_lib_$ac_lib_var=yes"
13227 else
13228   echo "configure: failed program was:" >&5
13229   cat conftest.$ac_ext >&5
13230   rm -rf conftest*
13231   eval "ac_cv_lib_$ac_lib_var=no"
13232 fi
13233 rm -f conftest*
13234 LIBS="$ac_save_LIBS"
13235
13236 fi
13237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13238   echo "$ac_t""yes" 1>&6
13239   INCLUDED_POPT=no
13240 else
13241   echo "$ac_t""no" 1>&6
13242 INCLUDED_POPT=yes
13243 fi
13244
13245 fi
13246
13247 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13248 echo "configure:13249: checking whether to use included popt" >&5
13249 if test x"$INCLUDED_POPT" = x"yes"; then
13250     echo "$ac_t""$srcdir/popt" 1>&6
13251     BUILD_POPT='$(POPT_OBJS)'
13252     FLAGS1="-I$srcdir/popt"
13253 else
13254     echo "$ac_t""no" 1>&6
13255     LIBS="$LIBS -lpopt"
13256 fi
13257
13258
13259
13260 #################################################
13261 # final configure stuff
13262
13263 echo "checking configure summary"
13264 if test "$cross_compiling" = yes; then
13265   :
13266 else
13267   cat > conftest.$ac_ext <<EOF
13268 #line 13269 "configure"
13269 #include "confdefs.h"
13270 #include "${srcdir-.}/tests/summary.c"
13271 EOF
13272 if { (eval echo configure:13273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13273 then
13274   echo "configure OK";
13275 else
13276   echo "configure: failed program was:" >&5
13277   cat conftest.$ac_ext >&5
13278   rm -fr conftest*
13279   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
13280 fi
13281 rm -fr conftest*
13282 fi
13283
13284
13285 builddir=`pwd`
13286
13287
13288 trap '' 1 2 15
13289 cat > confcache <<\EOF
13290 # This file is a shell script that caches the results of configure
13291 # tests run on this system so they can be shared between configure
13292 # scripts and configure runs.  It is not useful on other systems.
13293 # If it contains results you don't want to keep, you may remove or edit it.
13294 #
13295 # By default, configure uses ./config.cache as the cache file,
13296 # creating it if it does not exist already.  You can give configure
13297 # the --cache-file=FILE option to use a different cache file; that is
13298 # what configure does when it calls configure scripts in
13299 # subdirectories, so they share the cache.
13300 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13301 # config.status only pays attention to the cache file if you give it the
13302 # --recheck option to rerun configure.
13303 #
13304 EOF
13305 # The following way of writing the cache mishandles newlines in values,
13306 # but we know of no workaround that is simple, portable, and efficient.
13307 # So, don't put newlines in cache variables' values.
13308 # Ultrix sh set writes to stderr and can't be redirected directly,
13309 # and sets the high bit in the cache file unless we assign to the vars.
13310 (set) 2>&1 |
13311   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13312   *ac_space=\ *)
13313     # `set' does not quote correctly, so add quotes (double-quote substitution
13314     # turns \\\\ into \\, and sed turns \\ into \).
13315     sed -n \
13316       -e "s/'/'\\\\''/g" \
13317       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13318     ;;
13319   *)
13320     # `set' quotes correctly as required by POSIX, so do not add quotes.
13321     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13322     ;;
13323   esac >> confcache
13324 if cmp -s $cache_file confcache; then
13325   :
13326 else
13327   if test -w $cache_file; then
13328     echo "updating cache $cache_file"
13329     cat confcache > $cache_file
13330   else
13331     echo "not updating unwritable cache $cache_file"
13332   fi
13333 fi
13334 rm -f confcache
13335
13336 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13337
13338 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13339 # Let make expand exec_prefix.
13340 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13341
13342 # Any assignment to VPATH causes Sun make to only execute
13343 # the first set of double-colon rules, so remove it if not needed.
13344 # If there is a colon in the path, we need to keep it.
13345 if test "x$srcdir" = x.; then
13346   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13347 fi
13348
13349 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13350
13351 DEFS=-DHAVE_CONFIG_H
13352
13353 # Without the "./", some shells look in PATH for config.status.
13354 : ${CONFIG_STATUS=./config.status}
13355
13356 echo creating $CONFIG_STATUS
13357 rm -f $CONFIG_STATUS
13358 cat > $CONFIG_STATUS <<EOF
13359 #! /bin/sh
13360 # Generated automatically by configure.
13361 # Run this file to recreate the current configuration.
13362 # This directory was configured as follows,
13363 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13364 #
13365 # $0 $ac_configure_args
13366 #
13367 # Compiler output produced by configure, useful for debugging
13368 # configure, is in ./config.log if it exists.
13369
13370 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13371 for ac_option
13372 do
13373   case "\$ac_option" in
13374   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13375     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13376     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13377   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13378     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13379     exit 0 ;;
13380   -help | --help | --hel | --he | --h)
13381     echo "\$ac_cs_usage"; exit 0 ;;
13382   *) echo "\$ac_cs_usage"; exit 1 ;;
13383   esac
13384 done
13385
13386 ac_given_srcdir=$srcdir
13387 ac_given_INSTALL="$INSTALL"
13388
13389 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13390 EOF
13391 cat >> $CONFIG_STATUS <<EOF
13392
13393 # Protect against being on the right side of a sed subst in config.status.
13394 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13395  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13396 $ac_vpsub
13397 $extrasub
13398 s%@SHELL@%$SHELL%g
13399 s%@CFLAGS@%$CFLAGS%g
13400 s%@CPPFLAGS@%$CPPFLAGS%g
13401 s%@CXXFLAGS@%$CXXFLAGS%g
13402 s%@FFLAGS@%$FFLAGS%g
13403 s%@DEFS@%$DEFS%g
13404 s%@LDFLAGS@%$LDFLAGS%g
13405 s%@LIBS@%$LIBS%g
13406 s%@exec_prefix@%$exec_prefix%g
13407 s%@prefix@%$prefix%g
13408 s%@program_transform_name@%$program_transform_name%g
13409 s%@bindir@%$bindir%g
13410 s%@sbindir@%$sbindir%g
13411 s%@libexecdir@%$libexecdir%g
13412 s%@datadir@%$datadir%g
13413 s%@sysconfdir@%$sysconfdir%g
13414 s%@sharedstatedir@%$sharedstatedir%g
13415 s%@localstatedir@%$localstatedir%g
13416 s%@libdir@%$libdir%g
13417 s%@includedir@%$includedir%g
13418 s%@oldincludedir@%$oldincludedir%g
13419 s%@infodir@%$infodir%g
13420 s%@mandir@%$mandir%g
13421 s%@RUNPROG@%$RUNPROG%g
13422 s%@MPROGS@%$MPROGS%g
13423 s%@LDSHFLAGS@%$LDSHFLAGS%g
13424 s%@SHLD@%$SHLD%g
13425 s%@HOST_OS@%$HOST_OS%g
13426 s%@PAM_MOD@%$PAM_MOD%g
13427 s%@WRAP@%$WRAP%g
13428 s%@WRAP32@%$WRAP32%g
13429 s%@PICFLAG@%$PICFLAG%g
13430 s%@PICSUFFIX@%$PICSUFFIX%g
13431 s%@POBAD_CC@%$POBAD_CC%g
13432 s%@SHLIBEXT@%$SHLIBEXT%g
13433 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13434 s%@CC@%$CC%g
13435 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13436 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13437 s%@INSTALL_DATA@%$INSTALL_DATA%g
13438 s%@AWK@%$AWK%g
13439 s%@BROKEN_CC@%$BROKEN_CC%g
13440 s%@host@%$host%g
13441 s%@host_alias@%$host_alias%g
13442 s%@host_cpu@%$host_cpu%g
13443 s%@host_vendor@%$host_vendor%g
13444 s%@host_os@%$host_os%g
13445 s%@target@%$target%g
13446 s%@target_alias@%$target_alias%g
13447 s%@target_cpu@%$target_cpu%g
13448 s%@target_vendor@%$target_vendor%g
13449 s%@target_os@%$target_os%g
13450 s%@build@%$build%g
13451 s%@build_alias@%$build_alias%g
13452 s%@build_cpu@%$build_cpu%g
13453 s%@build_vendor@%$build_vendor%g
13454 s%@build_os@%$build_os%g
13455 s%@CPP@%$CPP%g
13456 s%@LIBOBJS@%$LIBOBJS%g
13457 s%@TERMLIBS@%$TERMLIBS%g
13458 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13459 s%@ROFF@%$ROFF%g
13460 s%@QUOTAOBJS@%$QUOTAOBJS%g
13461 s%@privatedir@%$privatedir%g
13462 s%@lockdir@%$lockdir%g
13463 s%@swatdir@%$swatdir%g
13464 s%@manlangs@%$manlangs%g
13465 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13466 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13467 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13468 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
13469 s%@BUILD_POPT@%$BUILD_POPT%g
13470 s%@FLAGS1@%$FLAGS1%g
13471 s%@builddir@%$builddir%g
13472
13473 CEOF
13474 EOF
13475
13476 cat >> $CONFIG_STATUS <<\EOF
13477
13478 # Split the substitutions into bite-sized pieces for seds with
13479 # small command number limits, like on Digital OSF/1 and HP-UX.
13480 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13481 ac_file=1 # Number of current file.
13482 ac_beg=1 # First line for current file.
13483 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13484 ac_more_lines=:
13485 ac_sed_cmds=""
13486 while $ac_more_lines; do
13487   if test $ac_beg -gt 1; then
13488     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13489   else
13490     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13491   fi
13492   if test ! -s conftest.s$ac_file; then
13493     ac_more_lines=false
13494     rm -f conftest.s$ac_file
13495   else
13496     if test -z "$ac_sed_cmds"; then
13497       ac_sed_cmds="sed -f conftest.s$ac_file"
13498     else
13499       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13500     fi
13501     ac_file=`expr $ac_file + 1`
13502     ac_beg=$ac_end
13503     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13504   fi
13505 done
13506 if test -z "$ac_sed_cmds"; then
13507   ac_sed_cmds=cat
13508 fi
13509 EOF
13510
13511 cat >> $CONFIG_STATUS <<EOF
13512
13513 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13514 EOF
13515 cat >> $CONFIG_STATUS <<\EOF
13516 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13517   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13518   case "$ac_file" in
13519   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13520        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13521   *) ac_file_in="${ac_file}.in" ;;
13522   esac
13523
13524   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13525
13526   # Remove last slash and all that follows it.  Not all systems have dirname.
13527   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13528   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13529     # The file is in a subdirectory.
13530     test ! -d "$ac_dir" && mkdir "$ac_dir"
13531     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13532     # A "../" for each directory in $ac_dir_suffix.
13533     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13534   else
13535     ac_dir_suffix= ac_dots=
13536   fi
13537
13538   case "$ac_given_srcdir" in
13539   .)  srcdir=.
13540       if test -z "$ac_dots"; then top_srcdir=.
13541       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13542   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13543   *) # Relative path.
13544     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13545     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13546   esac
13547
13548   case "$ac_given_INSTALL" in
13549   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13550   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13551   esac
13552
13553   echo creating "$ac_file"
13554   rm -f "$ac_file"
13555   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13556   case "$ac_file" in
13557   *Makefile*) ac_comsub="1i\\
13558 # $configure_input" ;;
13559   *) ac_comsub= ;;
13560   esac
13561
13562   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13563   sed -e "$ac_comsub
13564 s%@configure_input@%$configure_input%g
13565 s%@srcdir@%$srcdir%g
13566 s%@top_srcdir@%$top_srcdir%g
13567 s%@INSTALL@%$INSTALL%g
13568 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13569 fi; done
13570 rm -f conftest.s*
13571
13572 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13573 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13574 #
13575 # ac_d sets the value in "#define NAME VALUE" lines.
13576 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13577 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13578 ac_dC='\3'
13579 ac_dD='%g'
13580 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13581 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13582 ac_uB='\([      ]\)%\1#\2define\3'
13583 ac_uC=' '
13584 ac_uD='\4%g'
13585 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13586 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13587 ac_eB='$%\1#\2define\3'
13588 ac_eC=' '
13589 ac_eD='%g'
13590
13591 if test "${CONFIG_HEADERS+set}" != set; then
13592 EOF
13593 cat >> $CONFIG_STATUS <<EOF
13594   CONFIG_HEADERS="include/config.h"
13595 EOF
13596 cat >> $CONFIG_STATUS <<\EOF
13597 fi
13598 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13599   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13600   case "$ac_file" in
13601   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13602        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13603   *) ac_file_in="${ac_file}.in" ;;
13604   esac
13605
13606   echo creating $ac_file
13607
13608   rm -f conftest.frag conftest.in conftest.out
13609   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13610   cat $ac_file_inputs > conftest.in
13611
13612 EOF
13613
13614 # Transform confdefs.h into a sed script conftest.vals that substitutes
13615 # the proper values into config.h.in to produce config.h.  And first:
13616 # Protect against being on the right side of a sed subst in config.status.
13617 # Protect against being in an unquoted here document in config.status.
13618 rm -f conftest.vals
13619 cat > conftest.hdr <<\EOF
13620 s/[\\&%]/\\&/g
13621 s%[\\$`]%\\&%g
13622 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13623 s%ac_d%ac_u%gp
13624 s%ac_u%ac_e%gp
13625 EOF
13626 sed -n -f conftest.hdr confdefs.h > conftest.vals
13627 rm -f conftest.hdr
13628
13629 # This sed command replaces #undef with comments.  This is necessary, for
13630 # example, in the case of _POSIX_SOURCE, which is predefined and required
13631 # on some systems where configure will not decide to define it.
13632 cat >> conftest.vals <<\EOF
13633 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13634 EOF
13635
13636 # Break up conftest.vals because some shells have a limit on
13637 # the size of here documents, and old seds have small limits too.
13638
13639 rm -f conftest.tail
13640 while :
13641 do
13642   ac_lines=`grep -c . conftest.vals`
13643   # grep -c gives empty output for an empty file on some AIX systems.
13644   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13645   # Write a limited-size here document to conftest.frag.
13646   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13647   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13648   echo 'CEOF
13649   sed -f conftest.frag conftest.in > conftest.out
13650   rm -f conftest.in
13651   mv conftest.out conftest.in
13652 ' >> $CONFIG_STATUS
13653   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13654   rm -f conftest.vals
13655   mv conftest.tail conftest.vals
13656 done
13657 rm -f conftest.vals
13658
13659 cat >> $CONFIG_STATUS <<\EOF
13660   rm -f conftest.frag conftest.h
13661   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13662   cat conftest.in >> conftest.h
13663   rm -f conftest.in
13664   if cmp -s $ac_file conftest.h 2>/dev/null; then
13665     echo "$ac_file is unchanged"
13666     rm -f conftest.h
13667   else
13668     # Remove last slash and all that follows it.  Not all systems have dirname.
13669       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13670       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13671       # The file is in a subdirectory.
13672       test ! -d "$ac_dir" && mkdir "$ac_dir"
13673     fi
13674     rm -f $ac_file
13675     mv conftest.h $ac_file
13676   fi
13677 fi; done
13678
13679 EOF
13680 cat >> $CONFIG_STATUS <<EOF
13681
13682 EOF
13683 cat >> $CONFIG_STATUS <<\EOF
13684
13685 exit 0
13686 EOF
13687 chmod +x $CONFIG_STATUS
13688 rm -fr confdefs* $ac_clean_files
13689 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13690