dont add -I./popt to CFLAGS it really belongs in FLAGS1 with other include
[ira/wip.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --enable-debug          turn on debugging [default=no]"
17 ac_help="$ac_help
18   --enable-developer      turn on developer warnings and debugging [default=no]"
19 ac_help="$ac_help
20   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
21 ac_help="$ac_help
22   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
23 ac_help="$ac_help
24   --with-smbwrapper       Include SMB wrapper support (default=no) "
25 ac_help="$ac_help
26   --with-afs              Include AFS clear-text auth support (default=no) "
27 ac_help="$ac_help
28   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
29 ac_help="$ac_help
30   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
31 ac_help="$ac_help
32   --with-automount        Include AUTOMOUNT support (default=no)"
33 ac_help="$ac_help
34   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
35 ac_help="$ac_help
36   --with-pam              Include PAM support (default=no)"
37 ac_help="$ac_help
38   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
39 ac_help="$ac_help
40   --with-tdbsam           Include experimental TDB SAM support (default=no)"
41 ac_help="$ac_help
42   --with-ldapsam          Include experimental LDAP SAM support (default=no)"
43 ac_help="$ac_help
44   --with-nisplussam       Include NISPLUS SAM support (default=no)"
45 ac_help="$ac_help
46   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
47 ac_help="$ac_help
48   --with-ssl              Include SSL support (default=no)
49   --with-sslinc=DIR          Where the SSL includes are (defaults to /usr/local/ssl/include)
50   --with-ssllib=DIR          Where the SSL libraries are (defaults to /usr/local/ssl/lib)"
51 ac_help="$ac_help
52   --with-syslog           Include experimental SYSLOG support (default=no)"
53 ac_help="$ac_help
54   --with-profiling-data   Include gathering source code profile information (default=no)"
55 ac_help="$ac_help
56   --with-quotas           Include experimental disk-quota support (default=no)"
57 ac_help="$ac_help
58   --with-utmp             Include experimental utmp accounting (default=no)"
59 ac_help="$ac_help
60   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
61 ac_help="$ac_help
62   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
63 ac_help="$ac_help
64   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
65 ac_help="$ac_help
66   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
67 ac_help="$ac_help
68   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
69 ac_help="$ac_help
70   --with-acl-support      Include ACL support (default=no)"
71 ac_help="$ac_help
72   --with-winbind          Build winbind (default, if supported by OS)"
73 ac_help="$ac_help
74   --with-included-popt    use bundled popt library, not from system"
75
76 # Initialize some variables set by options.
77 # The variables have the same names as the options, with
78 # dashes changed to underlines.
79 build=NONE
80 cache_file=./config.cache
81 exec_prefix=NONE
82 host=NONE
83 no_create=
84 nonopt=NONE
85 no_recursion=
86 prefix=NONE
87 program_prefix=NONE
88 program_suffix=NONE
89 program_transform_name=s,x,x,
90 silent=
91 site=
92 srcdir=
93 target=NONE
94 verbose=
95 x_includes=NONE
96 x_libraries=NONE
97 bindir='${exec_prefix}/bin'
98 sbindir='${exec_prefix}/sbin'
99 libexecdir='${exec_prefix}/libexec'
100 datadir='${prefix}/share'
101 sysconfdir='${prefix}/etc'
102 sharedstatedir='${prefix}/com'
103 localstatedir='${prefix}/var'
104 libdir='${exec_prefix}/lib'
105 includedir='${prefix}/include'
106 oldincludedir='/usr/include'
107 infodir='${prefix}/info'
108 mandir='${prefix}/man'
109
110 # Initialize some other variables.
111 subdirs=
112 MFLAGS= MAKEFLAGS=
113 SHELL=${CONFIG_SHELL-/bin/sh}
114 # Maximum number of lines to put in a shell here document.
115 ac_max_here_lines=12
116
117 ac_prev=
118 for ac_option
119 do
120
121   # If the previous option needs an argument, assign it.
122   if test -n "$ac_prev"; then
123     eval "$ac_prev=\$ac_option"
124     ac_prev=
125     continue
126   fi
127
128   case "$ac_option" in
129   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
130   *) ac_optarg= ;;
131   esac
132
133   # Accept the important Cygnus configure options, so we can diagnose typos.
134
135   case "$ac_option" in
136
137   -bindir | --bindir | --bindi | --bind | --bin | --bi)
138     ac_prev=bindir ;;
139   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
140     bindir="$ac_optarg" ;;
141
142   -build | --build | --buil | --bui | --bu)
143     ac_prev=build ;;
144   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
145     build="$ac_optarg" ;;
146
147   -cache-file | --cache-file | --cache-fil | --cache-fi \
148   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
149     ac_prev=cache_file ;;
150   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
151   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
152     cache_file="$ac_optarg" ;;
153
154   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
155     ac_prev=datadir ;;
156   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
157   | --da=*)
158     datadir="$ac_optarg" ;;
159
160   -disable-* | --disable-*)
161     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
162     # Reject names that are not valid shell variable names.
163     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
164       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165     fi
166     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167     eval "enable_${ac_feature}=no" ;;
168
169   -enable-* | --enable-*)
170     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
171     # Reject names that are not valid shell variable names.
172     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
173       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
174     fi
175     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
176     case "$ac_option" in
177       *=*) ;;
178       *) ac_optarg=yes ;;
179     esac
180     eval "enable_${ac_feature}='$ac_optarg'" ;;
181
182   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
183   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
184   | --exec | --exe | --ex)
185     ac_prev=exec_prefix ;;
186   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
187   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
188   | --exec=* | --exe=* | --ex=*)
189     exec_prefix="$ac_optarg" ;;
190
191   -gas | --gas | --ga | --g)
192     # Obsolete; use --with-gas.
193     with_gas=yes ;;
194
195   -help | --help | --hel | --he)
196     # Omit some internal or obsolete options to make the list less imposing.
197     # This message is too long to be a string in the A/UX 3.1 sh.
198     cat << EOF
199 Usage: configure [options] [host]
200 Options: [defaults in brackets after descriptions]
201 Configuration:
202   --cache-file=FILE       cache test results in FILE
203   --help                  print this message
204   --no-create             do not create output files
205   --quiet, --silent       do not print \`checking...' messages
206   --version               print the version of autoconf that created configure
207 Directory and file names:
208   --prefix=PREFIX         install architecture-independent files in PREFIX
209                           [$ac_default_prefix]
210   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
211                           [same as prefix]
212   --bindir=DIR            user executables in DIR [EPREFIX/bin]
213   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
214   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
215   --datadir=DIR           read-only architecture-independent data in DIR
216                           [PREFIX/share]
217   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
218   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
219                           [PREFIX/com]
220   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
221   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
222   --includedir=DIR        C header files in DIR [PREFIX/include]
223   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
224   --infodir=DIR           info documentation in DIR [PREFIX/info]
225   --mandir=DIR            man documentation in DIR [PREFIX/man]
226   --srcdir=DIR            find the sources in DIR [configure dir or ..]
227   --program-prefix=PREFIX prepend PREFIX to installed program names
228   --program-suffix=SUFFIX append SUFFIX to installed program names
229   --program-transform-name=PROGRAM
230                           run sed PROGRAM on installed program names
231 EOF
232     cat << EOF
233 Host type:
234   --build=BUILD           configure for building on BUILD [BUILD=HOST]
235   --host=HOST             configure for HOST [guessed]
236   --target=TARGET         configure for TARGET [TARGET=HOST]
237 Features and packages:
238   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
239   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
240   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
241   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
242   --x-includes=DIR        X include files are in DIR
243   --x-libraries=DIR       X library files are in DIR
244 EOF
245     if test -n "$ac_help"; then
246       echo "--enable and --with options recognized:$ac_help"
247     fi
248     exit 0 ;;
249
250   -host | --host | --hos | --ho)
251     ac_prev=host ;;
252   -host=* | --host=* | --hos=* | --ho=*)
253     host="$ac_optarg" ;;
254
255   -includedir | --includedir | --includedi | --included | --include \
256   | --includ | --inclu | --incl | --inc)
257     ac_prev=includedir ;;
258   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
259   | --includ=* | --inclu=* | --incl=* | --inc=*)
260     includedir="$ac_optarg" ;;
261
262   -infodir | --infodir | --infodi | --infod | --info | --inf)
263     ac_prev=infodir ;;
264   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
265     infodir="$ac_optarg" ;;
266
267   -libdir | --libdir | --libdi | --libd)
268     ac_prev=libdir ;;
269   -libdir=* | --libdir=* | --libdi=* | --libd=*)
270     libdir="$ac_optarg" ;;
271
272   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
273   | --libexe | --libex | --libe)
274     ac_prev=libexecdir ;;
275   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
276   | --libexe=* | --libex=* | --libe=*)
277     libexecdir="$ac_optarg" ;;
278
279   -localstatedir | --localstatedir | --localstatedi | --localstated \
280   | --localstate | --localstat | --localsta | --localst \
281   | --locals | --local | --loca | --loc | --lo)
282     ac_prev=localstatedir ;;
283   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
284   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
285   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
286     localstatedir="$ac_optarg" ;;
287
288   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
289     ac_prev=mandir ;;
290   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
291     mandir="$ac_optarg" ;;
292
293   -nfp | --nfp | --nf)
294     # Obsolete; use --without-fp.
295     with_fp=no ;;
296
297   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
298   | --no-cr | --no-c)
299     no_create=yes ;;
300
301   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
302   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
303     no_recursion=yes ;;
304
305   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
306   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
307   | --oldin | --oldi | --old | --ol | --o)
308     ac_prev=oldincludedir ;;
309   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
310   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
311   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
312     oldincludedir="$ac_optarg" ;;
313
314   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
315     ac_prev=prefix ;;
316   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
317     prefix="$ac_optarg" ;;
318
319   -program-prefix | --program-prefix | --program-prefi | --program-pref \
320   | --program-pre | --program-pr | --program-p)
321     ac_prev=program_prefix ;;
322   -program-prefix=* | --program-prefix=* | --program-prefi=* \
323   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
324     program_prefix="$ac_optarg" ;;
325
326   -program-suffix | --program-suffix | --program-suffi | --program-suff \
327   | --program-suf | --program-su | --program-s)
328     ac_prev=program_suffix ;;
329   -program-suffix=* | --program-suffix=* | --program-suffi=* \
330   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
331     program_suffix="$ac_optarg" ;;
332
333   -program-transform-name | --program-transform-name \
334   | --program-transform-nam | --program-transform-na \
335   | --program-transform-n | --program-transform- \
336   | --program-transform | --program-transfor \
337   | --program-transfo | --program-transf \
338   | --program-trans | --program-tran \
339   | --progr-tra | --program-tr | --program-t)
340     ac_prev=program_transform_name ;;
341   -program-transform-name=* | --program-transform-name=* \
342   | --program-transform-nam=* | --program-transform-na=* \
343   | --program-transform-n=* | --program-transform-=* \
344   | --program-transform=* | --program-transfor=* \
345   | --program-transfo=* | --program-transf=* \
346   | --program-trans=* | --program-tran=* \
347   | --progr-tra=* | --program-tr=* | --program-t=*)
348     program_transform_name="$ac_optarg" ;;
349
350   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
351   | -silent | --silent | --silen | --sile | --sil)
352     silent=yes ;;
353
354   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
355     ac_prev=sbindir ;;
356   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
357   | --sbi=* | --sb=*)
358     sbindir="$ac_optarg" ;;
359
360   -sharedstatedir | --sharedstatedir | --sharedstatedi \
361   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
362   | --sharedst | --shareds | --shared | --share | --shar \
363   | --sha | --sh)
364     ac_prev=sharedstatedir ;;
365   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
366   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
367   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
368   | --sha=* | --sh=*)
369     sharedstatedir="$ac_optarg" ;;
370
371   -site | --site | --sit)
372     ac_prev=site ;;
373   -site=* | --site=* | --sit=*)
374     site="$ac_optarg" ;;
375
376   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
377     ac_prev=srcdir ;;
378   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
379     srcdir="$ac_optarg" ;;
380
381   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
382   | --syscon | --sysco | --sysc | --sys | --sy)
383     ac_prev=sysconfdir ;;
384   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
385   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
386     sysconfdir="$ac_optarg" ;;
387
388   -target | --target | --targe | --targ | --tar | --ta | --t)
389     ac_prev=target ;;
390   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
391     target="$ac_optarg" ;;
392
393   -v | -verbose | --verbose | --verbos | --verbo | --verb)
394     verbose=yes ;;
395
396   -version | --version | --versio | --versi | --vers)
397     echo "configure generated by autoconf version 2.13"
398     exit 0 ;;
399
400   -with-* | --with-*)
401     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
402     # Reject names that are not valid shell variable names.
403     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
404       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
405     fi
406     ac_package=`echo $ac_package| sed 's/-/_/g'`
407     case "$ac_option" in
408       *=*) ;;
409       *) ac_optarg=yes ;;
410     esac
411     eval "with_${ac_package}='$ac_optarg'" ;;
412
413   -without-* | --without-*)
414     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
417       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
418     fi
419     ac_package=`echo $ac_package| sed 's/-/_/g'`
420     eval "with_${ac_package}=no" ;;
421
422   --x)
423     # Obsolete; use --with-x.
424     with_x=yes ;;
425
426   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
427   | --x-incl | --x-inc | --x-in | --x-i)
428     ac_prev=x_includes ;;
429   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
430   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
431     x_includes="$ac_optarg" ;;
432
433   -x-libraries | --x-libraries | --x-librarie | --x-librari \
434   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
435     ac_prev=x_libraries ;;
436   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
437   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
438     x_libraries="$ac_optarg" ;;
439
440   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
441     ;;
442
443   *)
444     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
445       echo "configure: warning: $ac_option: invalid host type" 1>&2
446     fi
447     if test "x$nonopt" != xNONE; then
448       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
449     fi
450     nonopt="$ac_option"
451     ;;
452
453   esac
454 done
455
456 if test -n "$ac_prev"; then
457   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
458 fi
459
460 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
461
462 # File descriptor usage:
463 # 0 standard input
464 # 1 file creation
465 # 2 errors and warnings
466 # 3 some systems may open it to /dev/tty
467 # 4 used on the Kubota Titan
468 # 6 checking for... messages and results
469 # 5 compiler messages saved in config.log
470 if test "$silent" = yes; then
471   exec 6>/dev/null
472 else
473   exec 6>&1
474 fi
475 exec 5>./config.log
476
477 echo "\
478 This file contains any messages produced by compilers while
479 running configure, to aid debugging if configure makes a mistake.
480 " 1>&5
481
482 # Strip out --no-create and --no-recursion so they do not pile up.
483 # Also quote any args containing shell metacharacters.
484 ac_configure_args=
485 for ac_arg
486 do
487   case "$ac_arg" in
488   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
489   | --no-cr | --no-c) ;;
490   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
491   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
492   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
493   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
494   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
495   esac
496 done
497
498 # NLS nuisances.
499 # Only set these to C if already set.  These must not be set unconditionally
500 # because not all systems understand e.g. LANG=C (notably SCO).
501 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
502 # Non-C LC_CTYPE values break the ctype check.
503 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
504 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
505 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
506 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
507
508 # confdefs.h avoids OS command line length limits that DEFS can exceed.
509 rm -rf conftest* confdefs.h
510 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
511 echo > confdefs.h
512
513 # A filename unique to this package, relative to the directory that
514 # configure is in, which we can look for to find out if srcdir is correct.
515 ac_unique_file=include/includes.h
516
517 # Find the source files, if location was not specified.
518 if test -z "$srcdir"; then
519   ac_srcdir_defaulted=yes
520   # Try the directory containing this script, then its parent.
521   ac_prog=$0
522   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
523   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
524   srcdir=$ac_confdir
525   if test ! -r $srcdir/$ac_unique_file; then
526     srcdir=..
527   fi
528 else
529   ac_srcdir_defaulted=no
530 fi
531 if test ! -r $srcdir/$ac_unique_file; then
532   if test "$ac_srcdir_defaulted" = yes; then
533     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
534   else
535     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
536   fi
537 fi
538 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
539
540 # Prefer explicitly selected file to automatically selected ones.
541 if test -z "$CONFIG_SITE"; then
542   if test "x$prefix" != xNONE; then
543     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
544   else
545     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
546   fi
547 fi
548 for ac_site_file in $CONFIG_SITE; do
549   if test -r "$ac_site_file"; then
550     echo "loading site script $ac_site_file"
551     . "$ac_site_file"
552   fi
553 done
554
555 if test -r "$cache_file"; then
556   echo "loading cache $cache_file"
557   . $cache_file
558 else
559   echo "creating cache $cache_file"
560   > $cache_file
561 fi
562
563 ac_ext=c
564 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
565 ac_cpp='$CPP $CPPFLAGS'
566 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
567 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
568 cross_compiling=$ac_cv_prog_cc_cross
569
570 ac_exeext=
571 ac_objext=o
572 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
573   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
574   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
575     ac_n= ac_c='
576 ' ac_t='        '
577   else
578     ac_n=-n ac_c= ac_t=
579   fi
580 else
581   ac_n= ac_c='\c' ac_t=
582 fi
583
584
585
586 # we want to be compatibe with older versions of Samba
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604 # compile with optimisation and without debugging by default
605 CFLAGS="-O ${CFLAGS}"
606
607 # Check whether --enable-debug or --disable-debug was given.
608 if test "${enable_debug+set}" = set; then
609   enableval="$enable_debug"
610   if eval "test x$enable_debug = xyes"; then
611         CFLAGS="${CFLAGS} -g"
612     fi
613 fi
614
615
616 # Check whether --enable-developer or --disable-developer was given.
617 if test "${enable_developer+set}" = set; then
618   enableval="$enable_developer"
619   if eval "test x$enable_developer = xyes"; then
620         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
621     fi
622 fi
623
624
625 # Extract the first word of "gcc", so it can be a program name with args.
626 set dummy gcc; ac_word=$2
627 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
628 echo "configure:629: checking for $ac_word" >&5
629 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
630   echo $ac_n "(cached) $ac_c" 1>&6
631 else
632   if test -n "$CC"; then
633   ac_cv_prog_CC="$CC" # Let the user override the test.
634 else
635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
636   ac_dummy="$PATH"
637   for ac_dir in $ac_dummy; do
638     test -z "$ac_dir" && ac_dir=.
639     if test -f $ac_dir/$ac_word; then
640       ac_cv_prog_CC="gcc"
641       break
642     fi
643   done
644   IFS="$ac_save_ifs"
645 fi
646 fi
647 CC="$ac_cv_prog_CC"
648 if test -n "$CC"; then
649   echo "$ac_t""$CC" 1>&6
650 else
651   echo "$ac_t""no" 1>&6
652 fi
653
654 if test -z "$CC"; then
655   # Extract the first word of "cc", so it can be a program name with args.
656 set dummy cc; ac_word=$2
657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
658 echo "configure:659: checking for $ac_word" >&5
659 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
660   echo $ac_n "(cached) $ac_c" 1>&6
661 else
662   if test -n "$CC"; then
663   ac_cv_prog_CC="$CC" # Let the user override the test.
664 else
665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
666   ac_prog_rejected=no
667   ac_dummy="$PATH"
668   for ac_dir in $ac_dummy; do
669     test -z "$ac_dir" && ac_dir=.
670     if test -f $ac_dir/$ac_word; then
671       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
672         ac_prog_rejected=yes
673         continue
674       fi
675       ac_cv_prog_CC="cc"
676       break
677     fi
678   done
679   IFS="$ac_save_ifs"
680 if test $ac_prog_rejected = yes; then
681   # We found a bogon in the path, so make sure we never use it.
682   set dummy $ac_cv_prog_CC
683   shift
684   if test $# -gt 0; then
685     # We chose a different compiler from the bogus one.
686     # However, it has the same basename, so the bogon will be chosen
687     # first if we set CC to just the basename; use the full file name.
688     shift
689     set dummy "$ac_dir/$ac_word" "$@"
690     shift
691     ac_cv_prog_CC="$@"
692   fi
693 fi
694 fi
695 fi
696 CC="$ac_cv_prog_CC"
697 if test -n "$CC"; then
698   echo "$ac_t""$CC" 1>&6
699 else
700   echo "$ac_t""no" 1>&6
701 fi
702
703   if test -z "$CC"; then
704     case "`uname -s`" in
705     *win32* | *WIN32*)
706       # Extract the first word of "cl", so it can be a program name with args.
707 set dummy cl; ac_word=$2
708 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
709 echo "configure:710: checking for $ac_word" >&5
710 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
711   echo $ac_n "(cached) $ac_c" 1>&6
712 else
713   if test -n "$CC"; then
714   ac_cv_prog_CC="$CC" # Let the user override the test.
715 else
716   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
717   ac_dummy="$PATH"
718   for ac_dir in $ac_dummy; do
719     test -z "$ac_dir" && ac_dir=.
720     if test -f $ac_dir/$ac_word; then
721       ac_cv_prog_CC="cl"
722       break
723     fi
724   done
725   IFS="$ac_save_ifs"
726 fi
727 fi
728 CC="$ac_cv_prog_CC"
729 if test -n "$CC"; then
730   echo "$ac_t""$CC" 1>&6
731 else
732   echo "$ac_t""no" 1>&6
733 fi
734  ;;
735     esac
736   fi
737   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
738 fi
739
740 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
741 echo "configure:742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
742
743 ac_ext=c
744 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
745 ac_cpp='$CPP $CPPFLAGS'
746 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
747 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
748 cross_compiling=$ac_cv_prog_cc_cross
749
750 cat > conftest.$ac_ext << EOF
751
752 #line 753 "configure"
753 #include "confdefs.h"
754
755 main(){return(0);}
756 EOF
757 if { (eval echo configure:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
758   ac_cv_prog_cc_works=yes
759   # If we can't run a trivial program, we are probably using a cross compiler.
760   if (./conftest; exit) 2>/dev/null; then
761     ac_cv_prog_cc_cross=no
762   else
763     ac_cv_prog_cc_cross=yes
764   fi
765 else
766   echo "configure: failed program was:" >&5
767   cat conftest.$ac_ext >&5
768   ac_cv_prog_cc_works=no
769 fi
770 rm -fr conftest*
771 ac_ext=c
772 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
773 ac_cpp='$CPP $CPPFLAGS'
774 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
775 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
776 cross_compiling=$ac_cv_prog_cc_cross
777
778 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
779 if test $ac_cv_prog_cc_works = no; then
780   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
781 fi
782 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
783 echo "configure:784: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
784 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
785 cross_compiling=$ac_cv_prog_cc_cross
786
787 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
788 echo "configure:789: checking whether we are using GNU C" >&5
789 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
790   echo $ac_n "(cached) $ac_c" 1>&6
791 else
792   cat > conftest.c <<EOF
793 #ifdef __GNUC__
794   yes;
795 #endif
796 EOF
797 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
798   ac_cv_prog_gcc=yes
799 else
800   ac_cv_prog_gcc=no
801 fi
802 fi
803
804 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
805
806 if test $ac_cv_prog_gcc = yes; then
807   GCC=yes
808 else
809   GCC=
810 fi
811
812 ac_test_CFLAGS="${CFLAGS+set}"
813 ac_save_CFLAGS="$CFLAGS"
814 CFLAGS=
815 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
816 echo "configure:817: checking whether ${CC-cc} accepts -g" >&5
817 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
818   echo $ac_n "(cached) $ac_c" 1>&6
819 else
820   echo 'void f(){}' > conftest.c
821 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
822   ac_cv_prog_cc_g=yes
823 else
824   ac_cv_prog_cc_g=no
825 fi
826 rm -f conftest*
827
828 fi
829
830 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
831 if test "$ac_test_CFLAGS" = set; then
832   CFLAGS="$ac_save_CFLAGS"
833 elif test $ac_cv_prog_cc_g = yes; then
834   if test "$GCC" = yes; then
835     CFLAGS="-g -O2"
836   else
837     CFLAGS="-g"
838   fi
839 else
840   if test "$GCC" = yes; then
841     CFLAGS="-O2"
842   else
843     CFLAGS=
844   fi
845 fi
846
847 ac_aux_dir=
848 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
849   if test -f $ac_dir/install-sh; then
850     ac_aux_dir=$ac_dir
851     ac_install_sh="$ac_aux_dir/install-sh -c"
852     break
853   elif test -f $ac_dir/install.sh; then
854     ac_aux_dir=$ac_dir
855     ac_install_sh="$ac_aux_dir/install.sh -c"
856     break
857   fi
858 done
859 if test -z "$ac_aux_dir"; then
860   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
861 fi
862 ac_config_guess=$ac_aux_dir/config.guess
863 ac_config_sub=$ac_aux_dir/config.sub
864 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
865
866 # Find a good install program.  We prefer a C program (faster),
867 # so one script is as good as another.  But avoid the broken or
868 # incompatible versions:
869 # SysV /etc/install, /usr/sbin/install
870 # SunOS /usr/etc/install
871 # IRIX /sbin/install
872 # AIX /bin/install
873 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
874 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
875 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
876 # ./install, which can be erroneously created by make from ./install.sh.
877 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
878 echo "configure:879: checking for a BSD compatible install" >&5
879 if test -z "$INSTALL"; then
880 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
881   echo $ac_n "(cached) $ac_c" 1>&6
882 else
883     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
884   for ac_dir in $PATH; do
885     # Account for people who put trailing slashes in PATH elements.
886     case "$ac_dir/" in
887     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
888     *)
889       # OSF1 and SCO ODT 3.0 have their own names for install.
890       # Don't use installbsd from OSF since it installs stuff as root
891       # by default.
892       for ac_prog in ginstall scoinst install; do
893         if test -f $ac_dir/$ac_prog; then
894           if test $ac_prog = install &&
895             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
896             # AIX install.  It has an incompatible calling convention.
897             :
898           else
899             ac_cv_path_install="$ac_dir/$ac_prog -c"
900             break 2
901           fi
902         fi
903       done
904       ;;
905     esac
906   done
907   IFS="$ac_save_IFS"
908
909 fi
910   if test "${ac_cv_path_install+set}" = set; then
911     INSTALL="$ac_cv_path_install"
912   else
913     # As a last resort, use the slow shell script.  We don't cache a
914     # path for INSTALL within a source directory, because that will
915     # break other packages using the cache if that directory is
916     # removed, or if the path is relative.
917     INSTALL="$ac_install_sh"
918   fi
919 fi
920 echo "$ac_t""$INSTALL" 1>&6
921
922 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
923 # It thinks the first close brace ends the variable substitution.
924 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
925
926 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
927
928 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
929
930 for ac_prog in mawk gawk 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 sasl.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 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 BLDSHARED="false"
8451
8452 # and these are for particular systems
8453 case "$host_os" in
8454                 *linux*)   cat >> confdefs.h <<\EOF
8455 #define LINUX 1
8456 EOF
8457
8458                         BLDSHARED="true"
8459                         LDSHFLAGS="-shared" 
8460                         PICFLAG="-fPIC"
8461                 ;;
8462                 *solaris*) cat >> confdefs.h <<\EOF
8463 #define SUNOS5 1
8464 EOF
8465
8466                         BLDSHARED="true"
8467                         LDSHFLAGS="-Wl,-h,\$@.so -G"
8468                         if test "${ac_cv_prog_CC}" = "gcc"; then
8469                                 PICFLAG="-fPIC"
8470                         else
8471                                 PICFLAG="-KPIC"
8472                                 POBAD_CC=""
8473                                 PICSUFFIX="po.o"
8474                         fi
8475                 ;;
8476                 *sunos*) cat >> confdefs.h <<\EOF
8477 #define SUNOS4 1
8478 EOF
8479
8480                         BLDSHARED="true"
8481                         LDSHFLAGS="-Wl,-h,\$@ -G"
8482                         PICFLAG="-KPIC"   # Is this correct for SunOS
8483                 ;;
8484                 *bsd*)  BLDSHARED="true"
8485                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8486                         PICFLAG="-fPIC"
8487                 ;;
8488                 *irix*) cat >> confdefs.h <<\EOF
8489 #define IRIX 1
8490 EOF
8491
8492                         case "$host_os" in
8493                         *irix6*) cat >> confdefs.h <<\EOF
8494 #define IRIX6 1
8495 EOF
8496
8497                         ;;
8498                         esac
8499                         ATTEMPT_WRAP32_BUILD=yes
8500                         BLDSHARED="true"
8501                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8502                         if test "${ac_cv_prog_CC}" = "gcc"; then
8503                                 PICFLAG="-fPIC"
8504                         else 
8505                                 PICFLAG="-KPIC"
8506                         fi
8507                 ;;
8508                 *aix*) cat >> confdefs.h <<\EOF
8509 #define AIX 1
8510 EOF
8511
8512                         BLDSHARED="true"
8513                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8514                         PICFLAG="-O2 -qmaxmem=6000"
8515                 ;;
8516                 *hpux*) cat >> confdefs.h <<\EOF
8517 #define HPUX 1
8518 EOF
8519
8520                         SHLIBEXT="sl"
8521                         # Use special PIC flags for the native HP-UX compiler.
8522                         if test $ac_cv_prog_cc_Ae = yes; then
8523                                 #BLDSHARED="true"
8524                                 LDSHFLAGS="-b -z +h \$@"
8525                                 PICFLAG="+z"
8526                         fi
8527                 ;;
8528                 *qnx*) cat >> confdefs.h <<\EOF
8529 #define QNX 1
8530 EOF
8531 ;;
8532                 *osf*) cat >> confdefs.h <<\EOF
8533 #define OSF1 1
8534 EOF
8535
8536                         BLDSHARED="true"
8537                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8538                         PICFLAG="-fPIC"
8539                 ;;
8540                 *sco*) cat >> confdefs.h <<\EOF
8541 #define SCO 1
8542 EOF
8543 ;;
8544                 *unixware*) cat >> confdefs.h <<\EOF
8545 #define UNIXWARE 1
8546 EOF
8547
8548                         BLDSHARED="true"
8549                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8550                         PICFLAG="-KPIC"
8551                 ;;
8552                 *next2*) cat >> confdefs.h <<\EOF
8553 #define NEXT2 1
8554 EOF
8555 ;;
8556                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8557 set dummy groff; ac_word=$2
8558 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8559 echo "configure:8560: checking for $ac_word" >&5
8560 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8561   echo $ac_n "(cached) $ac_c" 1>&6
8562 else
8563   if test -n "$ROFF"; then
8564   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8565 else
8566   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8567   ac_dummy="$PATH"
8568   for ac_dir in $ac_dummy; do
8569     test -z "$ac_dir" && ac_dir=.
8570     if test -f $ac_dir/$ac_word; then
8571       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8572       break
8573     fi
8574   done
8575   IFS="$ac_save_ifs"
8576 fi
8577 fi
8578 ROFF="$ac_cv_prog_ROFF"
8579 if test -n "$ROFF"; then
8580   echo "$ac_t""$ROFF" 1>&6
8581 else
8582   echo "$ac_t""no" 1>&6
8583 fi
8584 ;;
8585                 *sysv4*)
8586                         case "$host" in
8587                                 *-univel-*)     if  test "$GCC" != yes ; then
8588                                                                         cat >> confdefs.h <<\EOF
8589 #define HAVE_MEMSET 1
8590 EOF
8591
8592                                                                 fi
8593                                                                 LDSHFLAGS="-G"
8594                                 ;;
8595                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8596 #define RELIANTUNIX 1
8597 EOF
8598 ;;
8599                         esac
8600                         ;;
8601                 *sysv5*)
8602                         if  test "$GCC" != yes ; then
8603                                 cat >> confdefs.h <<\EOF
8604 #define HAVE_MEMSET 1
8605 EOF
8606
8607                         fi
8608                         LDSHFLAGS="-G"
8609                         ;;
8610 esac
8611
8612 # this updates our target list if we can build shared libs
8613 if test $BLDSHARED = true; then
8614    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8615 else
8616    LIBSMBCLIENT_SHARED=
8617 fi
8618
8619 ################
8620
8621 echo $ac_n "checking for long long""... $ac_c" 1>&6
8622 echo "configure:8623: checking for long long" >&5
8623 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8624   echo $ac_n "(cached) $ac_c" 1>&6
8625 else
8626   
8627 if test "$cross_compiling" = yes; then
8628   samba_cv_have_longlong=cross
8629 else
8630   cat > conftest.$ac_ext <<EOF
8631 #line 8632 "configure"
8632 #include "confdefs.h"
8633 #include <stdio.h>
8634 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8635 EOF
8636 if { (eval echo configure:8637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8637 then
8638   samba_cv_have_longlong=yes
8639 else
8640   echo "configure: failed program was:" >&5
8641   cat conftest.$ac_ext >&5
8642   rm -fr conftest*
8643   samba_cv_have_longlong=no
8644 fi
8645 rm -fr conftest*
8646 fi
8647
8648 fi
8649
8650 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8651 if test x"$samba_cv_have_longlong" = x"yes"; then
8652     cat >> confdefs.h <<\EOF
8653 #define HAVE_LONGLONG 1
8654 EOF
8655
8656 fi
8657
8658 #
8659 # Check if the compiler supports the LL prefix on long long integers.
8660 # AIX needs this.
8661
8662 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8663 echo "configure:8664: checking for LL suffix on long long integers" >&5
8664 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8665   echo $ac_n "(cached) $ac_c" 1>&6
8666 else
8667   
8668     cat > conftest.$ac_ext <<EOF
8669 #line 8670 "configure"
8670 #include "confdefs.h"
8671 #include <stdio.h>
8672 int main() {
8673 long long i = 0x8000000000LL
8674 ; return 0; }
8675 EOF
8676 if { (eval echo configure:8677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8677   rm -rf conftest*
8678   samba_cv_compiler_supports_ll=yes
8679 else
8680   echo "configure: failed program was:" >&5
8681   cat conftest.$ac_ext >&5
8682   rm -rf conftest*
8683   samba_cv_compiler_supports_ll=no
8684 fi
8685 rm -f conftest*
8686 fi
8687
8688 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8689 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8690    cat >> confdefs.h <<\EOF
8691 #define COMPILER_SUPPORTS_LL 1
8692 EOF
8693
8694 fi
8695
8696   
8697 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8698 echo "configure:8699: checking for 64 bit off_t" >&5
8699 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8700   echo $ac_n "(cached) $ac_c" 1>&6
8701 else
8702   
8703 if test "$cross_compiling" = yes; then
8704   samba_cv_SIZEOF_OFF_T=cross
8705 else
8706   cat > conftest.$ac_ext <<EOF
8707 #line 8708 "configure"
8708 #include "confdefs.h"
8709 #include <stdio.h>
8710 #include <sys/stat.h>
8711 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8712 EOF
8713 if { (eval echo configure:8714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8714 then
8715   samba_cv_SIZEOF_OFF_T=yes
8716 else
8717   echo "configure: failed program was:" >&5
8718   cat conftest.$ac_ext >&5
8719   rm -fr conftest*
8720   samba_cv_SIZEOF_OFF_T=no
8721 fi
8722 rm -fr conftest*
8723 fi
8724
8725 fi
8726
8727 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8728 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8729     cat >> confdefs.h <<\EOF
8730 #define SIZEOF_OFF_T 8
8731 EOF
8732
8733 fi
8734
8735 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8736 echo "configure:8737: checking for off64_t" >&5
8737 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8738   echo $ac_n "(cached) $ac_c" 1>&6
8739 else
8740   
8741 if test "$cross_compiling" = yes; then
8742   samba_cv_HAVE_OFF64_T=cross
8743 else
8744   cat > conftest.$ac_ext <<EOF
8745 #line 8746 "configure"
8746 #include "confdefs.h"
8747
8748 #if defined(HAVE_UNISTD_H)
8749 #include <unistd.h>
8750 #endif
8751 #include <stdio.h>
8752 #include <sys/stat.h>
8753 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8754 EOF
8755 if { (eval echo configure:8756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8756 then
8757   samba_cv_HAVE_OFF64_T=yes
8758 else
8759   echo "configure: failed program was:" >&5
8760   cat conftest.$ac_ext >&5
8761   rm -fr conftest*
8762   samba_cv_HAVE_OFF64_T=no
8763 fi
8764 rm -fr conftest*
8765 fi
8766
8767 fi
8768
8769 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8770 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8771     cat >> confdefs.h <<\EOF
8772 #define HAVE_OFF64_T 1
8773 EOF
8774
8775 fi
8776
8777 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8778 echo "configure:8779: checking for 64 bit ino_t" >&5
8779 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8780   echo $ac_n "(cached) $ac_c" 1>&6
8781 else
8782   
8783 if test "$cross_compiling" = yes; then
8784   samba_cv_SIZEOF_INO_T=cross
8785 else
8786   cat > conftest.$ac_ext <<EOF
8787 #line 8788 "configure"
8788 #include "confdefs.h"
8789 #include <stdio.h>
8790 #include <sys/stat.h>
8791 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8792 EOF
8793 if { (eval echo configure:8794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8794 then
8795   samba_cv_SIZEOF_INO_T=yes
8796 else
8797   echo "configure: failed program was:" >&5
8798   cat conftest.$ac_ext >&5
8799   rm -fr conftest*
8800   samba_cv_SIZEOF_INO_T=no
8801 fi
8802 rm -fr conftest*
8803 fi
8804
8805 fi
8806
8807 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8808 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8809     cat >> confdefs.h <<\EOF
8810 #define SIZEOF_INO_T 8
8811 EOF
8812
8813 fi
8814
8815 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8816 echo "configure:8817: checking for ino64_t" >&5
8817 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8818   echo $ac_n "(cached) $ac_c" 1>&6
8819 else
8820   
8821 if test "$cross_compiling" = yes; then
8822   samba_cv_HAVE_INO64_T=cross
8823 else
8824   cat > conftest.$ac_ext <<EOF
8825 #line 8826 "configure"
8826 #include "confdefs.h"
8827
8828 #if defined(HAVE_UNISTD_H)
8829 #include <unistd.h>
8830 #endif
8831 #include <stdio.h>
8832 #include <sys/stat.h>
8833 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8834 EOF
8835 if { (eval echo configure:8836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8836 then
8837   samba_cv_HAVE_INO64_T=yes
8838 else
8839   echo "configure: failed program was:" >&5
8840   cat conftest.$ac_ext >&5
8841   rm -fr conftest*
8842   samba_cv_HAVE_INO64_T=no
8843 fi
8844 rm -fr conftest*
8845 fi
8846
8847 fi
8848
8849 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8850 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8851     cat >> confdefs.h <<\EOF
8852 #define HAVE_INO64_T 1
8853 EOF
8854
8855 fi
8856
8857 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8858 echo "configure:8859: checking for struct dirent64" >&5
8859 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8860   echo $ac_n "(cached) $ac_c" 1>&6
8861 else
8862   
8863 cat > conftest.$ac_ext <<EOF
8864 #line 8865 "configure"
8865 #include "confdefs.h"
8866
8867 #if defined(HAVE_UNISTD_H)
8868 #include <unistd.h>
8869 #endif
8870 #include <sys/types.h>
8871 #include <dirent.h>
8872 int main() {
8873 struct dirent64 de;
8874 ; return 0; }
8875 EOF
8876 if { (eval echo configure:8877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8877   rm -rf conftest*
8878   samba_cv_HAVE_STRUCT_DIRENT64=yes
8879 else
8880   echo "configure: failed program was:" >&5
8881   cat conftest.$ac_ext >&5
8882   rm -rf conftest*
8883   samba_cv_HAVE_STRUCT_DIRENT64=no
8884 fi
8885 rm -f conftest*
8886 fi
8887
8888 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8889 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8890     cat >> confdefs.h <<\EOF
8891 #define HAVE_STRUCT_DIRENT64 1
8892 EOF
8893
8894 fi
8895
8896 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8897 echo "configure:8898: checking for unsigned char" >&5
8898 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8899   echo $ac_n "(cached) $ac_c" 1>&6
8900 else
8901   
8902 if test "$cross_compiling" = yes; then
8903   samba_cv_HAVE_UNSIGNED_CHAR=cross
8904 else
8905   cat > conftest.$ac_ext <<EOF
8906 #line 8907 "configure"
8907 #include "confdefs.h"
8908 #include <stdio.h>
8909 main() { char c; c=250; exit((c > 0)?0:1); }
8910 EOF
8911 if { (eval echo configure:8912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8912 then
8913   samba_cv_HAVE_UNSIGNED_CHAR=yes
8914 else
8915   echo "configure: failed program was:" >&5
8916   cat conftest.$ac_ext >&5
8917   rm -fr conftest*
8918   samba_cv_HAVE_UNSIGNED_CHAR=no
8919 fi
8920 rm -fr conftest*
8921 fi
8922
8923 fi
8924
8925 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8926 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8927     cat >> confdefs.h <<\EOF
8928 #define HAVE_UNSIGNED_CHAR 1
8929 EOF
8930
8931 fi
8932
8933 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8934 echo "configure:8935: checking for sin_len in sock" >&5
8935 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8936   echo $ac_n "(cached) $ac_c" 1>&6
8937 else
8938   
8939 cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942 #include <sys/types.h>
8943 #include <sys/socket.h>
8944 #include <netinet/in.h>
8945 int main() {
8946 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8947 ; return 0; }
8948 EOF
8949 if { (eval echo configure:8950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8950   rm -rf conftest*
8951   samba_cv_HAVE_SOCK_SIN_LEN=yes
8952 else
8953   echo "configure: failed program was:" >&5
8954   cat conftest.$ac_ext >&5
8955   rm -rf conftest*
8956   samba_cv_HAVE_SOCK_SIN_LEN=no
8957 fi
8958 rm -f conftest*
8959 fi
8960
8961 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8962 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8963     cat >> confdefs.h <<\EOF
8964 #define HAVE_SOCK_SIN_LEN 1
8965 EOF
8966
8967 fi
8968
8969 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8970 echo "configure:8971: checking whether seekdir returns void" >&5
8971 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8972   echo $ac_n "(cached) $ac_c" 1>&6
8973 else
8974   
8975 cat > conftest.$ac_ext <<EOF
8976 #line 8977 "configure"
8977 #include "confdefs.h"
8978 #include <sys/types.h>
8979 #include <dirent.h>
8980 void seekdir(DIR *d, long loc) { return; }
8981 int main() {
8982 return 0;
8983 ; return 0; }
8984 EOF
8985 if { (eval echo configure:8986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8986   rm -rf conftest*
8987   samba_cv_SEEKDIR_RETURNS_VOID=yes
8988 else
8989   echo "configure: failed program was:" >&5
8990   cat conftest.$ac_ext >&5
8991   rm -rf conftest*
8992   samba_cv_SEEKDIR_RETURNS_VOID=no
8993 fi
8994 rm -f conftest*
8995 fi
8996
8997 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8998 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8999     cat >> confdefs.h <<\EOF
9000 #define SEEKDIR_RETURNS_VOID 1
9001 EOF
9002
9003 fi
9004
9005 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9006 echo "configure:9007: checking for __FILE__ macro" >&5
9007 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9008   echo $ac_n "(cached) $ac_c" 1>&6
9009 else
9010   
9011 cat > conftest.$ac_ext <<EOF
9012 #line 9013 "configure"
9013 #include "confdefs.h"
9014 #include <stdio.h>
9015 int main() {
9016 printf("%s\n", __FILE__);
9017 ; return 0; }
9018 EOF
9019 if { (eval echo configure:9020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9020   rm -rf conftest*
9021   samba_cv_HAVE_FILE_MACRO=yes
9022 else
9023   echo "configure: failed program was:" >&5
9024   cat conftest.$ac_ext >&5
9025   rm -rf conftest*
9026   samba_cv_HAVE_FILE_MACRO=no
9027 fi
9028 rm -f conftest*
9029 fi
9030
9031 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9032 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9033     cat >> confdefs.h <<\EOF
9034 #define HAVE_FILE_MACRO 1
9035 EOF
9036
9037 fi
9038
9039 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9040 echo "configure:9041: checking for __FUNCTION__ macro" >&5
9041 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9042   echo $ac_n "(cached) $ac_c" 1>&6
9043 else
9044   
9045 cat > conftest.$ac_ext <<EOF
9046 #line 9047 "configure"
9047 #include "confdefs.h"
9048 #include <stdio.h>
9049 int main() {
9050 printf("%s\n", __FUNCTION__);
9051 ; return 0; }
9052 EOF
9053 if { (eval echo configure:9054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9054   rm -rf conftest*
9055   samba_cv_HAVE_FUNCTION_MACRO=yes
9056 else
9057   echo "configure: failed program was:" >&5
9058   cat conftest.$ac_ext >&5
9059   rm -rf conftest*
9060   samba_cv_HAVE_FUNCTION_MACRO=no
9061 fi
9062 rm -f conftest*
9063 fi
9064
9065 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9066 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9067     cat >> confdefs.h <<\EOF
9068 #define HAVE_FUNCTION_MACRO 1
9069 EOF
9070
9071 fi
9072
9073 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9074 echo "configure:9075: checking if gettimeofday takes tz argument" >&5
9075 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9076   echo $ac_n "(cached) $ac_c" 1>&6
9077 else
9078   
9079 if test "$cross_compiling" = yes; then
9080   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9081 else
9082   cat > conftest.$ac_ext <<EOF
9083 #line 9084 "configure"
9084 #include "confdefs.h"
9085
9086 #include <sys/time.h>
9087 #include <unistd.h>
9088 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9089 EOF
9090 if { (eval echo configure:9091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9091 then
9092   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9093 else
9094   echo "configure: failed program was:" >&5
9095   cat conftest.$ac_ext >&5
9096   rm -fr conftest*
9097   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9098 fi
9099 rm -fr conftest*
9100 fi
9101
9102 fi
9103
9104 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9105 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9106     cat >> confdefs.h <<\EOF
9107 #define HAVE_GETTIMEOFDAY_TZ 1
9108 EOF
9109
9110 fi
9111
9112 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9113 echo "configure:9114: checking for C99 vsnprintf" >&5
9114 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9115   echo $ac_n "(cached) $ac_c" 1>&6
9116 else
9117   
9118 if test "$cross_compiling" = yes; then
9119   samba_cv_HAVE_C99_VSNPRINTF=cross
9120 else
9121   cat > conftest.$ac_ext <<EOF
9122 #line 9123 "configure"
9123 #include "confdefs.h"
9124
9125 #include <sys/types.h>
9126 #include <stdarg.h>
9127 void foo(const char *format, ...) { 
9128        va_list ap;
9129        int len;
9130        char buf[5];
9131
9132        va_start(ap, format);
9133        len = vsnprintf(0, 0, format, ap);
9134        va_end(ap);
9135        if (len != 5) exit(1);
9136
9137        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9138
9139        exit(0);
9140 }
9141 main() { foo("hello"); }
9142
9143 EOF
9144 if { (eval echo configure:9145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9145 then
9146   samba_cv_HAVE_C99_VSNPRINTF=yes
9147 else
9148   echo "configure: failed program was:" >&5
9149   cat conftest.$ac_ext >&5
9150   rm -fr conftest*
9151   samba_cv_HAVE_C99_VSNPRINTF=no
9152 fi
9153 rm -fr conftest*
9154 fi
9155
9156 fi
9157
9158 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9159 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9160     cat >> confdefs.h <<\EOF
9161 #define HAVE_C99_VSNPRINTF 1
9162 EOF
9163
9164 fi
9165
9166 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9167 echo "configure:9168: checking for broken readdir" >&5
9168 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9169   echo $ac_n "(cached) $ac_c" 1>&6
9170 else
9171   
9172 if test "$cross_compiling" = yes; then
9173   samba_cv_HAVE_BROKEN_READDIR=cross
9174 else
9175   cat > conftest.$ac_ext <<EOF
9176 #line 9177 "configure"
9177 #include "confdefs.h"
9178 #include <sys/types.h>
9179 #include <dirent.h>
9180 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9181 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9182 di->d_name[0] == 0) exit(0); exit(1);} 
9183 EOF
9184 if { (eval echo configure:9185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9185 then
9186   samba_cv_HAVE_BROKEN_READDIR=yes
9187 else
9188   echo "configure: failed program was:" >&5
9189   cat conftest.$ac_ext >&5
9190   rm -fr conftest*
9191   samba_cv_HAVE_BROKEN_READDIR=no
9192 fi
9193 rm -fr conftest*
9194 fi
9195
9196 fi
9197
9198 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9199 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9200     cat >> confdefs.h <<\EOF
9201 #define HAVE_BROKEN_READDIR 1
9202 EOF
9203
9204 fi
9205
9206 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9207 echo "configure:9208: checking for utimbuf" >&5
9208 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9209   echo $ac_n "(cached) $ac_c" 1>&6
9210 else
9211   
9212 cat > conftest.$ac_ext <<EOF
9213 #line 9214 "configure"
9214 #include "confdefs.h"
9215 #include <sys/types.h>
9216 #include <utime.h>
9217 int main() {
9218 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9219 ; return 0; }
9220 EOF
9221 if { (eval echo configure:9222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9222   rm -rf conftest*
9223   samba_cv_HAVE_UTIMBUF=yes
9224 else
9225   echo "configure: failed program was:" >&5
9226   cat conftest.$ac_ext >&5
9227   rm -rf conftest*
9228   samba_cv_HAVE_UTIMBUF=no
9229 fi
9230 rm -f conftest*
9231 fi
9232
9233 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9234 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9235     cat >> confdefs.h <<\EOF
9236 #define HAVE_UTIMBUF 1
9237 EOF
9238
9239 fi
9240
9241
9242 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9243 do
9244 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9245 echo "configure:9246: checking for $ac_func" >&5
9246 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9247   echo $ac_n "(cached) $ac_c" 1>&6
9248 else
9249   cat > conftest.$ac_ext <<EOF
9250 #line 9251 "configure"
9251 #include "confdefs.h"
9252 /* System header to define __stub macros and hopefully few prototypes,
9253     which can conflict with char $ac_func(); below.  */
9254 #include <assert.h>
9255 /* Override any gcc2 internal prototype to avoid an error.  */
9256 /* We use char because int might match the return type of a gcc2
9257     builtin and then its argument prototype would still apply.  */
9258 char $ac_func();
9259
9260 int main() {
9261
9262 /* The GNU C library defines this for functions which it implements
9263     to always fail with ENOSYS.  Some functions are actually named
9264     something starting with __ and the normal name is an alias.  */
9265 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9266 choke me
9267 #else
9268 $ac_func();
9269 #endif
9270
9271 ; return 0; }
9272 EOF
9273 if { (eval echo configure:9274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9274   rm -rf conftest*
9275   eval "ac_cv_func_$ac_func=yes"
9276 else
9277   echo "configure: failed program was:" >&5
9278   cat conftest.$ac_ext >&5
9279   rm -rf conftest*
9280   eval "ac_cv_func_$ac_func=no"
9281 fi
9282 rm -f conftest*
9283 fi
9284
9285 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9286   echo "$ac_t""yes" 1>&6
9287     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9288   cat >> confdefs.h <<EOF
9289 #define $ac_tr_func 1
9290 EOF
9291  
9292 else
9293   echo "$ac_t""no" 1>&6
9294 fi
9295 done
9296
9297
9298 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9299 echo "configure:9300: checking for ut_name in utmp" >&5
9300 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9301   echo $ac_n "(cached) $ac_c" 1>&6
9302 else
9303   
9304 cat > conftest.$ac_ext <<EOF
9305 #line 9306 "configure"
9306 #include "confdefs.h"
9307 #include <sys/types.h>
9308 #include <utmp.h>
9309 int main() {
9310 struct utmp ut;  ut.ut_name[0] = 'a';
9311 ; return 0; }
9312 EOF
9313 if { (eval echo configure:9314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9314   rm -rf conftest*
9315   samba_cv_HAVE_UT_UT_NAME=yes
9316 else
9317   echo "configure: failed program was:" >&5
9318   cat conftest.$ac_ext >&5
9319   rm -rf conftest*
9320   samba_cv_HAVE_UT_UT_NAME=no
9321 fi
9322 rm -f conftest*
9323 fi
9324
9325 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9326 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9327     cat >> confdefs.h <<\EOF
9328 #define HAVE_UT_UT_NAME 1
9329 EOF
9330
9331 fi 
9332
9333 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9334 echo "configure:9335: checking for ut_user in utmp" >&5
9335 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9336   echo $ac_n "(cached) $ac_c" 1>&6
9337 else
9338   
9339 cat > conftest.$ac_ext <<EOF
9340 #line 9341 "configure"
9341 #include "confdefs.h"
9342 #include <sys/types.h>
9343 #include <utmp.h>
9344 int main() {
9345 struct utmp ut;  ut.ut_user[0] = 'a';
9346 ; return 0; }
9347 EOF
9348 if { (eval echo configure:9349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9349   rm -rf conftest*
9350   samba_cv_HAVE_UT_UT_USER=yes
9351 else
9352   echo "configure: failed program was:" >&5
9353   cat conftest.$ac_ext >&5
9354   rm -rf conftest*
9355   samba_cv_HAVE_UT_UT_USER=no
9356 fi
9357 rm -f conftest*
9358 fi
9359
9360 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9361 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9362     cat >> confdefs.h <<\EOF
9363 #define HAVE_UT_UT_USER 1
9364 EOF
9365
9366 fi 
9367
9368 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9369 echo "configure:9370: checking for ut_id in utmp" >&5
9370 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9371   echo $ac_n "(cached) $ac_c" 1>&6
9372 else
9373   
9374 cat > conftest.$ac_ext <<EOF
9375 #line 9376 "configure"
9376 #include "confdefs.h"
9377 #include <sys/types.h>
9378 #include <utmp.h>
9379 int main() {
9380 struct utmp ut;  ut.ut_id[0] = 'a';
9381 ; return 0; }
9382 EOF
9383 if { (eval echo configure:9384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9384   rm -rf conftest*
9385   samba_cv_HAVE_UT_UT_ID=yes
9386 else
9387   echo "configure: failed program was:" >&5
9388   cat conftest.$ac_ext >&5
9389   rm -rf conftest*
9390   samba_cv_HAVE_UT_UT_ID=no
9391 fi
9392 rm -f conftest*
9393 fi
9394
9395 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9396 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9397     cat >> confdefs.h <<\EOF
9398 #define HAVE_UT_UT_ID 1
9399 EOF
9400
9401 fi 
9402
9403 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9404 echo "configure:9405: checking for ut_host in utmp" >&5
9405 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9406   echo $ac_n "(cached) $ac_c" 1>&6
9407 else
9408   
9409 cat > conftest.$ac_ext <<EOF
9410 #line 9411 "configure"
9411 #include "confdefs.h"
9412 #include <sys/types.h>
9413 #include <utmp.h>
9414 int main() {
9415 struct utmp ut;  ut.ut_host[0] = 'a';
9416 ; return 0; }
9417 EOF
9418 if { (eval echo configure:9419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9419   rm -rf conftest*
9420   samba_cv_HAVE_UT_UT_HOST=yes
9421 else
9422   echo "configure: failed program was:" >&5
9423   cat conftest.$ac_ext >&5
9424   rm -rf conftest*
9425   samba_cv_HAVE_UT_UT_HOST=no
9426 fi
9427 rm -f conftest*
9428 fi
9429
9430 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9431 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9432     cat >> confdefs.h <<\EOF
9433 #define HAVE_UT_UT_HOST 1
9434 EOF
9435
9436 fi 
9437
9438 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9439 echo "configure:9440: checking for ut_time in utmp" >&5
9440 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9441   echo $ac_n "(cached) $ac_c" 1>&6
9442 else
9443   
9444 cat > conftest.$ac_ext <<EOF
9445 #line 9446 "configure"
9446 #include "confdefs.h"
9447 #include <sys/types.h>
9448 #include <utmp.h>
9449 int main() {
9450 struct utmp ut;  time_t t; ut.ut_time = t;
9451 ; return 0; }
9452 EOF
9453 if { (eval echo configure:9454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9454   rm -rf conftest*
9455   samba_cv_HAVE_UT_UT_TIME=yes
9456 else
9457   echo "configure: failed program was:" >&5
9458   cat conftest.$ac_ext >&5
9459   rm -rf conftest*
9460   samba_cv_HAVE_UT_UT_TIME=no
9461 fi
9462 rm -f conftest*
9463 fi
9464
9465 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9466 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9467     cat >> confdefs.h <<\EOF
9468 #define HAVE_UT_UT_TIME 1
9469 EOF
9470
9471 fi 
9472
9473 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9474 echo "configure:9475: checking for ut_tv in utmp" >&5
9475 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9476   echo $ac_n "(cached) $ac_c" 1>&6
9477 else
9478   
9479 cat > conftest.$ac_ext <<EOF
9480 #line 9481 "configure"
9481 #include "confdefs.h"
9482 #include <sys/types.h>
9483 #include <utmp.h>
9484 int main() {
9485 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9486 ; return 0; }
9487 EOF
9488 if { (eval echo configure:9489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9489   rm -rf conftest*
9490   samba_cv_HAVE_UT_UT_TV=yes
9491 else
9492   echo "configure: failed program was:" >&5
9493   cat conftest.$ac_ext >&5
9494   rm -rf conftest*
9495   samba_cv_HAVE_UT_UT_TV=no
9496 fi
9497 rm -f conftest*
9498 fi
9499
9500 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9501 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9502     cat >> confdefs.h <<\EOF
9503 #define HAVE_UT_UT_TV 1
9504 EOF
9505
9506 fi 
9507
9508 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9509 echo "configure:9510: checking for ut_type in utmp" >&5
9510 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9511   echo $ac_n "(cached) $ac_c" 1>&6
9512 else
9513   
9514 cat > conftest.$ac_ext <<EOF
9515 #line 9516 "configure"
9516 #include "confdefs.h"
9517 #include <sys/types.h>
9518 #include <utmp.h>
9519 int main() {
9520 struct utmp ut;  ut.ut_type = 0;
9521 ; return 0; }
9522 EOF
9523 if { (eval echo configure:9524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9524   rm -rf conftest*
9525   samba_cv_HAVE_UT_UT_TYPE=yes
9526 else
9527   echo "configure: failed program was:" >&5
9528   cat conftest.$ac_ext >&5
9529   rm -rf conftest*
9530   samba_cv_HAVE_UT_UT_TYPE=no
9531 fi
9532 rm -f conftest*
9533 fi
9534
9535 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9536 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9537     cat >> confdefs.h <<\EOF
9538 #define HAVE_UT_UT_TYPE 1
9539 EOF
9540
9541 fi 
9542
9543 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9544 echo "configure:9545: checking for ut_pid in utmp" >&5
9545 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9546   echo $ac_n "(cached) $ac_c" 1>&6
9547 else
9548   
9549 cat > conftest.$ac_ext <<EOF
9550 #line 9551 "configure"
9551 #include "confdefs.h"
9552 #include <sys/types.h>
9553 #include <utmp.h>
9554 int main() {
9555 struct utmp ut;  ut.ut_pid = 0;
9556 ; return 0; }
9557 EOF
9558 if { (eval echo configure:9559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9559   rm -rf conftest*
9560   samba_cv_HAVE_UT_UT_PID=yes
9561 else
9562   echo "configure: failed program was:" >&5
9563   cat conftest.$ac_ext >&5
9564   rm -rf conftest*
9565   samba_cv_HAVE_UT_UT_PID=no
9566 fi
9567 rm -f conftest*
9568 fi
9569
9570 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9571 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9572     cat >> confdefs.h <<\EOF
9573 #define HAVE_UT_UT_PID 1
9574 EOF
9575
9576 fi 
9577
9578 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9579 echo "configure:9580: checking for ut_exit in utmp" >&5
9580 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9581   echo $ac_n "(cached) $ac_c" 1>&6
9582 else
9583   
9584 cat > conftest.$ac_ext <<EOF
9585 #line 9586 "configure"
9586 #include "confdefs.h"
9587 #include <sys/types.h>
9588 #include <utmp.h>
9589 int main() {
9590 struct utmp ut;  ut.ut_exit.e_exit = 0;
9591 ; return 0; }
9592 EOF
9593 if { (eval echo configure:9594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9594   rm -rf conftest*
9595   samba_cv_HAVE_UT_UT_EXIT=yes
9596 else
9597   echo "configure: failed program was:" >&5
9598   cat conftest.$ac_ext >&5
9599   rm -rf conftest*
9600   samba_cv_HAVE_UT_UT_EXIT=no
9601 fi
9602 rm -f conftest*
9603 fi
9604
9605 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9606 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9607     cat >> confdefs.h <<\EOF
9608 #define HAVE_UT_UT_EXIT 1
9609 EOF
9610
9611 fi 
9612
9613 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9614 echo "configure:9615: checking for ut_addr in utmp" >&5
9615 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9616   echo $ac_n "(cached) $ac_c" 1>&6
9617 else
9618   
9619 cat > conftest.$ac_ext <<EOF
9620 #line 9621 "configure"
9621 #include "confdefs.h"
9622 #include <sys/types.h>
9623 #include <utmp.h>
9624 int main() {
9625 struct utmp ut;  ut.ut_addr = 0;
9626 ; return 0; }
9627 EOF
9628 if { (eval echo configure:9629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9629   rm -rf conftest*
9630   samba_cv_HAVE_UT_UT_ADDR=yes
9631 else
9632   echo "configure: failed program was:" >&5
9633   cat conftest.$ac_ext >&5
9634   rm -rf conftest*
9635   samba_cv_HAVE_UT_UT_ADDR=no
9636 fi
9637 rm -f conftest*
9638 fi
9639
9640 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9641 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9642     cat >> confdefs.h <<\EOF
9643 #define HAVE_UT_UT_ADDR 1
9644 EOF
9645
9646 fi 
9647
9648 if test x$ac_cv_func_pututline = xyes ; then
9649   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9650 echo "configure:9651: checking whether pututline returns pointer" >&5
9651 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9652   echo $ac_n "(cached) $ac_c" 1>&6
9653 else
9654   
9655   cat > conftest.$ac_ext <<EOF
9656 #line 9657 "configure"
9657 #include "confdefs.h"
9658 #include <sys/types.h>
9659 #include <utmp.h>
9660 int main() {
9661 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9662 ; return 0; }
9663 EOF
9664 if { (eval echo configure:9665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9665   rm -rf conftest*
9666   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9667 else
9668   echo "configure: failed program was:" >&5
9669   cat conftest.$ac_ext >&5
9670   rm -rf conftest*
9671   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9672 fi
9673 rm -f conftest*
9674 fi
9675
9676 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9677   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9678       cat >> confdefs.h <<\EOF
9679 #define PUTUTLINE_RETURNS_UTMP 1
9680 EOF
9681
9682   fi
9683 fi
9684
9685 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9686 echo "configure:9687: checking for ut_syslen in utmpx" >&5
9687 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9688   echo $ac_n "(cached) $ac_c" 1>&6
9689 else
9690   
9691 cat > conftest.$ac_ext <<EOF
9692 #line 9693 "configure"
9693 #include "confdefs.h"
9694 #include <sys/types.h>
9695 #include <utmpx.h>
9696 int main() {
9697 struct utmpx ux;  ux.ut_syslen = 0;
9698 ; return 0; }
9699 EOF
9700 if { (eval echo configure:9701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9701   rm -rf conftest*
9702   samba_cv_HAVE_UX_UT_SYSLEN=yes
9703 else
9704   echo "configure: failed program was:" >&5
9705   cat conftest.$ac_ext >&5
9706   rm -rf conftest*
9707   samba_cv_HAVE_UX_UT_SYSLEN=no
9708 fi
9709 rm -f conftest*
9710 fi
9711
9712 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9713 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9714     cat >> confdefs.h <<\EOF
9715 #define HAVE_UX_UT_SYSLEN 1
9716 EOF
9717
9718 fi 
9719
9720
9721 #################################################
9722 # check for libiconv support
9723 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9724 echo "configure:9725: checking whether to use libiconv" >&5
9725 # Check whether --with-libiconv or --without-libiconv was given.
9726 if test "${with_libiconv+set}" = set; then
9727   withval="$with_libiconv"
9728    case "$withval" in
9729   no)
9730     echo "$ac_t""no" 1>&6
9731     ;;
9732   *)
9733     echo "$ac_t""yes" 1>&6
9734     CFLAGS="$CFLAGS -I$withval/include"
9735     LDFLAGS="$LDFLAGS -L$withval/lib"
9736     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9737 echo "configure:9738: checking for iconv_open in -liconv" >&5
9738 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9739 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9740   echo $ac_n "(cached) $ac_c" 1>&6
9741 else
9742   ac_save_LIBS="$LIBS"
9743 LIBS="-liconv  $LIBS"
9744 cat > conftest.$ac_ext <<EOF
9745 #line 9746 "configure"
9746 #include "confdefs.h"
9747 /* Override any gcc2 internal prototype to avoid an error.  */
9748 /* We use char because int might match the return type of a gcc2
9749     builtin and then its argument prototype would still apply.  */
9750 char iconv_open();
9751
9752 int main() {
9753 iconv_open()
9754 ; return 0; }
9755 EOF
9756 if { (eval echo configure:9757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9757   rm -rf conftest*
9758   eval "ac_cv_lib_$ac_lib_var=yes"
9759 else
9760   echo "configure: failed program was:" >&5
9761   cat conftest.$ac_ext >&5
9762   rm -rf conftest*
9763   eval "ac_cv_lib_$ac_lib_var=no"
9764 fi
9765 rm -f conftest*
9766 LIBS="$ac_save_LIBS"
9767
9768 fi
9769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9770   echo "$ac_t""yes" 1>&6
9771     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9772     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9773   cat >> confdefs.h <<EOF
9774 #define $ac_tr_lib 1
9775 EOF
9776
9777   LIBS="-liconv $LIBS"
9778
9779 else
9780   echo "$ac_t""no" 1>&6
9781 fi
9782
9783     cat >> confdefs.h <<EOF
9784 #define WITH_LIBICONV "${withval}"
9785 EOF
9786
9787     ;;
9788   esac 
9789 else
9790   echo "$ac_t""no" 1>&6
9791
9792 fi
9793
9794
9795
9796 ############
9797 # check for iconv in libc
9798 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9799 echo "configure:9800: checking for working iconv" >&5
9800 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9801   echo $ac_n "(cached) $ac_c" 1>&6
9802 else
9803   
9804 if test "$cross_compiling" = yes; then
9805   samba_cv_HAVE_NATIVE_ICONV=cross
9806 else
9807   cat > conftest.$ac_ext <<EOF
9808 #line 9809 "configure"
9809 #include "confdefs.h"
9810
9811 #include <iconv.h>
9812 main() {
9813        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9814        if (cd == 0 || cd == (iconv_t)-1) return -1;
9815        return 0;
9816 }
9817
9818 EOF
9819 if { (eval echo configure:9820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9820 then
9821   samba_cv_HAVE_NATIVE_ICONV=yes
9822 else
9823   echo "configure: failed program was:" >&5
9824   cat conftest.$ac_ext >&5
9825   rm -fr conftest*
9826   samba_cv_HAVE_NATIVE_ICONV=no
9827 fi
9828 rm -fr conftest*
9829 fi
9830
9831 fi
9832
9833 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9834 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9835     cat >> confdefs.h <<\EOF
9836 #define HAVE_NATIVE_ICONV 1
9837 EOF
9838
9839 fi
9840
9841
9842 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9843 echo "configure:9844: checking for Linux kernel oplocks" >&5
9844 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9845   echo $ac_n "(cached) $ac_c" 1>&6
9846 else
9847   
9848 if test "$cross_compiling" = yes; then
9849   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9850 else
9851   cat > conftest.$ac_ext <<EOF
9852 #line 9853 "configure"
9853 #include "confdefs.h"
9854
9855 #include <sys/types.h>
9856 #include <fcntl.h>
9857 #ifndef F_GETLEASE
9858 #define F_GETLEASE      1025
9859 #endif
9860 main() {
9861        int fd = open("/dev/null", O_RDONLY);
9862        return fcntl(fd, F_GETLEASE, 0) == -1;
9863 }
9864
9865 EOF
9866 if { (eval echo configure:9867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9867 then
9868   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9869 else
9870   echo "configure: failed program was:" >&5
9871   cat conftest.$ac_ext >&5
9872   rm -fr conftest*
9873   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9874 fi
9875 rm -fr conftest*
9876 fi
9877
9878 fi
9879
9880 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9881 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9882     cat >> confdefs.h <<\EOF
9883 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9884 EOF
9885
9886 fi
9887
9888 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9889 echo "configure:9890: checking for kernel change notify support" >&5
9890 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9891   echo $ac_n "(cached) $ac_c" 1>&6
9892 else
9893   
9894 if test "$cross_compiling" = yes; then
9895   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9896 else
9897   cat > conftest.$ac_ext <<EOF
9898 #line 9899 "configure"
9899 #include "confdefs.h"
9900
9901 #include <sys/types.h>
9902 #include <fcntl.h>
9903 #include <signal.h>
9904 #ifndef F_NOTIFY
9905 #define F_NOTIFY 1026
9906 #endif
9907 main() {
9908         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9909 }
9910
9911 EOF
9912 if { (eval echo configure:9913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9913 then
9914   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9915 else
9916   echo "configure: failed program was:" >&5
9917   cat conftest.$ac_ext >&5
9918   rm -fr conftest*
9919   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9920 fi
9921 rm -fr conftest*
9922 fi
9923
9924 fi
9925
9926 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9927 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9928     cat >> confdefs.h <<\EOF
9929 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9930 EOF
9931
9932 fi
9933
9934 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9935 echo "configure:9936: checking for kernel share modes" >&5
9936 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9937   echo $ac_n "(cached) $ac_c" 1>&6
9938 else
9939   
9940 if test "$cross_compiling" = yes; then
9941   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9942 else
9943   cat > conftest.$ac_ext <<EOF
9944 #line 9945 "configure"
9945 #include "confdefs.h"
9946
9947 #include <sys/types.h>
9948 #include <fcntl.h>
9949 #include <signal.h>
9950 #include <sys/file.h>
9951 #ifndef LOCK_MAND
9952 #define LOCK_MAND       32
9953 #define LOCK_READ       64
9954 #endif
9955 main() {
9956         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9957 }
9958
9959 EOF
9960 if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9961 then
9962   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9963 else
9964   echo "configure: failed program was:" >&5
9965   cat conftest.$ac_ext >&5
9966   rm -fr conftest*
9967   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9968 fi
9969 rm -fr conftest*
9970 fi
9971
9972 fi
9973
9974 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9975 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9976     cat >> confdefs.h <<\EOF
9977 #define HAVE_KERNEL_SHARE_MODES 1
9978 EOF
9979
9980 fi
9981
9982
9983
9984
9985 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9986 echo "configure:9987: checking for IRIX kernel oplock type definitions" >&5
9987 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9988   echo $ac_n "(cached) $ac_c" 1>&6
9989 else
9990   
9991 cat > conftest.$ac_ext <<EOF
9992 #line 9993 "configure"
9993 #include "confdefs.h"
9994 #include <sys/types.h>
9995 #include <fcntl.h>
9996 int main() {
9997 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
9998 ; return 0; }
9999 EOF
10000 if { (eval echo configure:10001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10001   rm -rf conftest*
10002   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10003 else
10004   echo "configure: failed program was:" >&5
10005   cat conftest.$ac_ext >&5
10006   rm -rf conftest*
10007   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10008 fi
10009 rm -f conftest*
10010 fi
10011
10012 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10013 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10014     cat >> confdefs.h <<\EOF
10015 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10016 EOF
10017
10018 fi
10019
10020 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10021 echo "configure:10022: checking for irix specific capabilities" >&5
10022 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10023   echo $ac_n "(cached) $ac_c" 1>&6
10024 else
10025   
10026 if test "$cross_compiling" = yes; then
10027   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10028 else
10029   cat > conftest.$ac_ext <<EOF
10030 #line 10031 "configure"
10031 #include "confdefs.h"
10032 #include <sys/types.h>
10033 #include <sys/capability.h>
10034 main() {
10035  cap_t cap;
10036  if ((cap = cap_get_proc()) == NULL)
10037    exit(1);
10038  cap->cap_effective |= CAP_NETWORK_MGT;
10039  cap->cap_inheritable |= CAP_NETWORK_MGT;
10040  cap_set_proc(cap);
10041  exit(0);
10042 }
10043
10044 EOF
10045 if { (eval echo configure:10046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10046 then
10047   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10048 else
10049   echo "configure: failed program was:" >&5
10050   cat conftest.$ac_ext >&5
10051   rm -fr conftest*
10052   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10053 fi
10054 rm -fr conftest*
10055 fi
10056
10057 fi
10058
10059 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10060 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10061     cat >> confdefs.h <<\EOF
10062 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10063 EOF
10064
10065 fi
10066
10067 #
10068 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10069 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10070 #
10071
10072 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10073 echo "configure:10074: checking for int16 typedef included by rpc/rpc.h" >&5
10074 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10075   echo $ac_n "(cached) $ac_c" 1>&6
10076 else
10077   
10078 cat > conftest.$ac_ext <<EOF
10079 #line 10080 "configure"
10080 #include "confdefs.h"
10081 #include <sys/types.h>
10082 #if defined(HAVE_RPC_RPC_H)
10083 #include <rpc/rpc.h>
10084 #endif
10085 int main() {
10086 int16 testvar;
10087 ; return 0; }
10088 EOF
10089 if { (eval echo configure:10090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10090   rm -rf conftest*
10091   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10092 else
10093   echo "configure: failed program was:" >&5
10094   cat conftest.$ac_ext >&5
10095   rm -rf conftest*
10096   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10097 fi
10098 rm -f conftest*
10099 fi
10100
10101 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10102 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10103     cat >> confdefs.h <<\EOF
10104 #define HAVE_INT16_FROM_RPC_RPC_H 1
10105 EOF
10106
10107 fi
10108
10109 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10110 echo "configure:10111: checking for uint16 typedef included by rpc/rpc.h" >&5
10111 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10112   echo $ac_n "(cached) $ac_c" 1>&6
10113 else
10114   
10115 cat > conftest.$ac_ext <<EOF
10116 #line 10117 "configure"
10117 #include "confdefs.h"
10118 #include <sys/types.h>
10119 #if defined(HAVE_RPC_RPC_H)
10120 #include <rpc/rpc.h>
10121 #endif
10122 int main() {
10123 uint16 testvar;
10124 ; return 0; }
10125 EOF
10126 if { (eval echo configure:10127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10127   rm -rf conftest*
10128   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10129 else
10130   echo "configure: failed program was:" >&5
10131   cat conftest.$ac_ext >&5
10132   rm -rf conftest*
10133   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10134 fi
10135 rm -f conftest*
10136 fi
10137
10138 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10139 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10140     cat >> confdefs.h <<\EOF
10141 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10142 EOF
10143
10144 fi
10145
10146 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10147 echo "configure:10148: checking for int32 typedef included by rpc/rpc.h" >&5
10148 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10149   echo $ac_n "(cached) $ac_c" 1>&6
10150 else
10151   
10152 cat > conftest.$ac_ext <<EOF
10153 #line 10154 "configure"
10154 #include "confdefs.h"
10155 #include <sys/types.h>
10156 #if defined(HAVE_RPC_RPC_H)
10157 #include <rpc/rpc.h>
10158 #endif
10159 int main() {
10160 int32 testvar;
10161 ; return 0; }
10162 EOF
10163 if { (eval echo configure:10164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10164   rm -rf conftest*
10165   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10166 else
10167   echo "configure: failed program was:" >&5
10168   cat conftest.$ac_ext >&5
10169   rm -rf conftest*
10170   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10171 fi
10172 rm -f conftest*
10173 fi
10174
10175 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10176 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10177     cat >> confdefs.h <<\EOF
10178 #define HAVE_INT32_FROM_RPC_RPC_H 1
10179 EOF
10180
10181 fi
10182
10183 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10184 echo "configure:10185: checking for uint32 typedef included by rpc/rpc.h" >&5
10185 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10186   echo $ac_n "(cached) $ac_c" 1>&6
10187 else
10188   
10189 cat > conftest.$ac_ext <<EOF
10190 #line 10191 "configure"
10191 #include "confdefs.h"
10192 #include <sys/types.h>
10193 #if defined(HAVE_RPC_RPC_H)
10194 #include <rpc/rpc.h>
10195 #endif
10196 int main() {
10197 uint32 testvar;
10198 ; return 0; }
10199 EOF
10200 if { (eval echo configure:10201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10201   rm -rf conftest*
10202   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10203 else
10204   echo "configure: failed program was:" >&5
10205   cat conftest.$ac_ext >&5
10206   rm -rf conftest*
10207   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10208 fi
10209 rm -f conftest*
10210 fi
10211
10212 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10213 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10214     cat >> confdefs.h <<\EOF
10215 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10216 EOF
10217
10218 fi
10219
10220
10221 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10222 echo "configure:10223: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10223 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10224   echo $ac_n "(cached) $ac_c" 1>&6
10225 else
10226   
10227 cat > conftest.$ac_ext <<EOF
10228 #line 10229 "configure"
10229 #include "confdefs.h"
10230 #include <sys/types.h>
10231 #ifdef HAVE_SYS_SECURITY_H
10232 #include <sys/security.h>
10233 #include <prot.h>
10234 #endif  /* HAVE_SYS_SECURITY_H */
10235 #if defined(HAVE_RPC_RPC_H)
10236 #include <rpc/rpc.h>
10237 #endif
10238 int main() {
10239 int testvar;
10240 ; return 0; }
10241 EOF
10242 if { (eval echo configure:10243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10243   rm -rf conftest*
10244   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10245 else
10246   echo "configure: failed program was:" >&5
10247   cat conftest.$ac_ext >&5
10248   rm -rf conftest*
10249   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10250 fi
10251 rm -f conftest*
10252 fi
10253
10254 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10255 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10256     cat >> confdefs.h <<\EOF
10257 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10258 EOF
10259
10260 fi
10261
10262 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10263 echo "configure:10264: checking for test routines" >&5
10264 if test "$cross_compiling" = yes; then
10265   echo "configure: warning: cannot run when cross-compiling" 1>&2
10266 else
10267   cat > conftest.$ac_ext <<EOF
10268 #line 10269 "configure"
10269 #include "confdefs.h"
10270 #include "${srcdir-.}/tests/trivial.c"
10271 EOF
10272 if { (eval echo configure:10273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10273 then
10274   echo "$ac_t""yes" 1>&6
10275 else
10276   echo "configure: failed program was:" >&5
10277   cat conftest.$ac_ext >&5
10278   rm -fr conftest*
10279   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10280 fi
10281 rm -fr conftest*
10282 fi
10283
10284
10285 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10286 echo "configure:10287: checking for ftruncate extend" >&5
10287 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10288   echo $ac_n "(cached) $ac_c" 1>&6
10289 else
10290   
10291 if test "$cross_compiling" = yes; then
10292   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10293 else
10294   cat > conftest.$ac_ext <<EOF
10295 #line 10296 "configure"
10296 #include "confdefs.h"
10297 #include "${srcdir-.}/tests/ftruncate.c"
10298 EOF
10299 if { (eval echo configure:10300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10300 then
10301   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10302 else
10303   echo "configure: failed program was:" >&5
10304   cat conftest.$ac_ext >&5
10305   rm -fr conftest*
10306   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10307 fi
10308 rm -fr conftest*
10309 fi
10310
10311 fi
10312
10313 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10314 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10315     cat >> confdefs.h <<\EOF
10316 #define HAVE_FTRUNCATE_EXTEND 1
10317 EOF
10318
10319 fi
10320
10321 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10322 echo "configure:10323: checking for AF_LOCAL socket support" >&5
10323 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10324   echo $ac_n "(cached) $ac_c" 1>&6
10325 else
10326   
10327 if test "$cross_compiling" = yes; then
10328   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10329 else
10330   cat > conftest.$ac_ext <<EOF
10331 #line 10332 "configure"
10332 #include "confdefs.h"
10333 #include "${srcdir-.}/tests/unixsock.c"
10334 EOF
10335 if { (eval echo configure:10336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10336 then
10337   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10338 else
10339   echo "configure: failed program was:" >&5
10340   cat conftest.$ac_ext >&5
10341   rm -fr conftest*
10342   samba_cv_HAVE_WORKING_AF_LOCAL=no
10343 fi
10344 rm -fr conftest*
10345 fi
10346
10347 fi
10348
10349 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10350 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10351 then
10352     cat >> confdefs.h <<\EOF
10353 #define HAVE_WORKING_AF_LOCAL 1
10354 EOF
10355
10356 fi
10357
10358 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10359 echo "configure:10360: checking for broken getgroups" >&5
10360 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10361   echo $ac_n "(cached) $ac_c" 1>&6
10362 else
10363   
10364 if test "$cross_compiling" = yes; then
10365   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10366 else
10367   cat > conftest.$ac_ext <<EOF
10368 #line 10369 "configure"
10369 #include "confdefs.h"
10370 #include "${srcdir-.}/tests/getgroups.c"
10371 EOF
10372 if { (eval echo configure:10373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10373 then
10374   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10375 else
10376   echo "configure: failed program was:" >&5
10377   cat conftest.$ac_ext >&5
10378   rm -fr conftest*
10379   samba_cv_HAVE_BROKEN_GETGROUPS=no
10380 fi
10381 rm -fr conftest*
10382 fi
10383
10384 fi
10385
10386 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10387 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10388     cat >> confdefs.h <<\EOF
10389 #define HAVE_BROKEN_GETGROUPS 1
10390 EOF
10391
10392 fi
10393
10394 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10395 echo "configure:10396: checking whether getpass should be replaced" >&5
10396 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10397   echo $ac_n "(cached) $ac_c" 1>&6
10398 else
10399   
10400 SAVE_CPPFLAGS="$CPPFLAGS"
10401 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10402 cat > conftest.$ac_ext <<EOF
10403 #line 10404 "configure"
10404 #include "confdefs.h"
10405
10406 #define REPLACE_GETPASS 1
10407 #define NO_CONFIG_H 1
10408 #define main dont_declare_main
10409 #include "${srcdir-.}/lib/getsmbpass.c"
10410 #undef main
10411
10412 int main() {
10413
10414 ; return 0; }
10415 EOF
10416 if { (eval echo configure:10417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10417   rm -rf conftest*
10418   samba_cv_REPLACE_GETPASS=yes
10419 else
10420   echo "configure: failed program was:" >&5
10421   cat conftest.$ac_ext >&5
10422   rm -rf conftest*
10423   samba_cv_REPLACE_GETPASS=no
10424 fi
10425 rm -f conftest*
10426 CPPFLAGS="$SAVE_CPPFLAGS"
10427
10428 fi
10429
10430 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10431 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10432         cat >> confdefs.h <<\EOF
10433 #define REPLACE_GETPASS 1
10434 EOF
10435
10436 fi
10437
10438 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10439 echo "configure:10440: checking for broken inet_ntoa" >&5
10440 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10441   echo $ac_n "(cached) $ac_c" 1>&6
10442 else
10443   
10444 if test "$cross_compiling" = yes; then
10445   samba_cv_REPLACE_INET_NTOA=cross
10446 else
10447   cat > conftest.$ac_ext <<EOF
10448 #line 10449 "configure"
10449 #include "confdefs.h"
10450
10451 #include <stdio.h>
10452 #include <sys/types.h>
10453 #include <netinet/in.h>
10454 #ifdef HAVE_ARPA_INET_H
10455 #include <arpa/inet.h>
10456 #endif
10457 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10458 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10459     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10460 exit(1);}
10461 EOF
10462 if { (eval echo configure:10463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10463 then
10464   samba_cv_REPLACE_INET_NTOA=yes
10465 else
10466   echo "configure: failed program was:" >&5
10467   cat conftest.$ac_ext >&5
10468   rm -fr conftest*
10469   samba_cv_REPLACE_INET_NTOA=no
10470 fi
10471 rm -fr conftest*
10472 fi
10473
10474 fi
10475
10476 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10477 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10478     cat >> confdefs.h <<\EOF
10479 #define REPLACE_INET_NTOA 1
10480 EOF
10481
10482 fi
10483
10484 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10485 echo "configure:10486: checking for secure mkstemp" >&5
10486 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10487   echo $ac_n "(cached) $ac_c" 1>&6
10488 else
10489   
10490 if test "$cross_compiling" = yes; then
10491   samba_cv_HAVE_SECURE_MKSTEMP=cross
10492 else
10493   cat > conftest.$ac_ext <<EOF
10494 #line 10495 "configure"
10495 #include "confdefs.h"
10496 #include <stdlib.h>
10497 #include <sys/types.h>
10498 #include <sys/stat.h>
10499 #include <unistd.h>
10500 main() { 
10501   struct stat st;
10502   char tpl[20]="/tmp/test.XXXXXX"; 
10503   int fd = mkstemp(tpl); 
10504   if (fd == -1) exit(1);
10505   unlink(tpl);
10506   if (fstat(fd, &st) != 0) exit(1);
10507   if ((st.st_mode & 0777) != 0600) exit(1);
10508   exit(0);
10509 }
10510 EOF
10511 if { (eval echo configure:10512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10512 then
10513   samba_cv_HAVE_SECURE_MKSTEMP=yes
10514 else
10515   echo "configure: failed program was:" >&5
10516   cat conftest.$ac_ext >&5
10517   rm -fr conftest*
10518   samba_cv_HAVE_SECURE_MKSTEMP=no
10519 fi
10520 rm -fr conftest*
10521 fi
10522
10523 fi
10524
10525 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10526 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10527     cat >> confdefs.h <<\EOF
10528 #define HAVE_SECURE_MKSTEMP 1
10529 EOF
10530
10531 fi
10532
10533 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10534 echo "configure:10535: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10535 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10536   echo $ac_n "(cached) $ac_c" 1>&6
10537 else
10538   
10539 if test "$cross_compiling" = yes; then
10540   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10541 else
10542   cat > conftest.$ac_ext <<EOF
10543 #line 10544 "configure"
10544 #include "confdefs.h"
10545 #include <unistd.h>
10546 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10547 EOF
10548 if { (eval echo configure:10549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10549 then
10550   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10551 else
10552   echo "configure: failed program was:" >&5
10553   cat conftest.$ac_ext >&5
10554   rm -fr conftest*
10555   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10556 fi
10557 rm -fr conftest*
10558 fi
10559
10560 fi
10561
10562 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10563 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10564     cat >> confdefs.h <<\EOF
10565 #define SYSCONF_SC_NGROUPS_MAX 1
10566 EOF
10567
10568 fi
10569
10570 echo $ac_n "checking for root""... $ac_c" 1>&6
10571 echo "configure:10572: checking for root" >&5
10572 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10573   echo $ac_n "(cached) $ac_c" 1>&6
10574 else
10575   
10576 if test "$cross_compiling" = yes; then
10577   samba_cv_HAVE_ROOT=cross
10578 else
10579   cat > conftest.$ac_ext <<EOF
10580 #line 10581 "configure"
10581 #include "confdefs.h"
10582 main() { exit(getuid() != 0); }
10583 EOF
10584 if { (eval echo configure:10585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10585 then
10586   samba_cv_HAVE_ROOT=yes
10587 else
10588   echo "configure: failed program was:" >&5
10589   cat conftest.$ac_ext >&5
10590   rm -fr conftest*
10591   samba_cv_HAVE_ROOT=no
10592 fi
10593 rm -fr conftest*
10594 fi
10595
10596 fi
10597
10598 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10599 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10600     cat >> confdefs.h <<\EOF
10601 #define HAVE_ROOT 1
10602 EOF
10603
10604 else
10605     echo "configure: warning: running as non-root will disable some tests" 1>&2
10606 fi
10607
10608 ##################
10609 # look for a method of finding the list of network interfaces
10610 iface=no;
10611 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10612 echo "configure:10613: checking for iface AIX" >&5
10613 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10614   echo $ac_n "(cached) $ac_c" 1>&6
10615 else
10616   
10617 if test "$cross_compiling" = yes; then
10618   samba_cv_HAVE_IFACE_AIX=cross
10619 else
10620   cat > conftest.$ac_ext <<EOF
10621 #line 10622 "configure"
10622 #include "confdefs.h"
10623
10624 #define HAVE_IFACE_AIX 1
10625 #define AUTOCONF_TEST 1
10626 #include "confdefs.h"
10627 #include "${srcdir-.}/lib/interfaces.c"
10628 EOF
10629 if { (eval echo configure:10630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10630 then
10631   samba_cv_HAVE_IFACE_AIX=yes
10632 else
10633   echo "configure: failed program was:" >&5
10634   cat conftest.$ac_ext >&5
10635   rm -fr conftest*
10636   samba_cv_HAVE_IFACE_AIX=no
10637 fi
10638 rm -fr conftest*
10639 fi
10640
10641 fi
10642
10643 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10644 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10645     iface=yes;cat >> confdefs.h <<\EOF
10646 #define HAVE_IFACE_AIX 1
10647 EOF
10648
10649 fi
10650
10651 if test $iface = no; then
10652 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10653 echo "configure:10654: checking for iface ifconf" >&5
10654 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10655   echo $ac_n "(cached) $ac_c" 1>&6
10656 else
10657   
10658 if test "$cross_compiling" = yes; then
10659   samba_cv_HAVE_IFACE_IFCONF=cross
10660 else
10661   cat > conftest.$ac_ext <<EOF
10662 #line 10663 "configure"
10663 #include "confdefs.h"
10664
10665 #define HAVE_IFACE_IFCONF 1
10666 #define AUTOCONF_TEST 1
10667 #include "confdefs.h"
10668 #include "${srcdir-.}/lib/interfaces.c"
10669 EOF
10670 if { (eval echo configure:10671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10671 then
10672   samba_cv_HAVE_IFACE_IFCONF=yes
10673 else
10674   echo "configure: failed program was:" >&5
10675   cat conftest.$ac_ext >&5
10676   rm -fr conftest*
10677   samba_cv_HAVE_IFACE_IFCONF=no
10678 fi
10679 rm -fr conftest*
10680 fi
10681
10682 fi
10683
10684 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10685 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10686     iface=yes;cat >> confdefs.h <<\EOF
10687 #define HAVE_IFACE_IFCONF 1
10688 EOF
10689
10690 fi
10691 fi
10692
10693 if test $iface = no; then
10694 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10695 echo "configure:10696: checking for iface ifreq" >&5
10696 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10697   echo $ac_n "(cached) $ac_c" 1>&6
10698 else
10699   
10700 if test "$cross_compiling" = yes; then
10701   samba_cv_HAVE_IFACE_IFREQ=cross
10702 else
10703   cat > conftest.$ac_ext <<EOF
10704 #line 10705 "configure"
10705 #include "confdefs.h"
10706
10707 #define HAVE_IFACE_IFREQ 1
10708 #define AUTOCONF_TEST 1
10709 #include "confdefs.h"
10710 #include "${srcdir-.}/lib/interfaces.c"
10711 EOF
10712 if { (eval echo configure:10713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10713 then
10714   samba_cv_HAVE_IFACE_IFREQ=yes
10715 else
10716   echo "configure: failed program was:" >&5
10717   cat conftest.$ac_ext >&5
10718   rm -fr conftest*
10719   samba_cv_HAVE_IFACE_IFREQ=no
10720 fi
10721 rm -fr conftest*
10722 fi
10723
10724 fi
10725
10726 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10727 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10728     iface=yes;cat >> confdefs.h <<\EOF
10729 #define HAVE_IFACE_IFREQ 1
10730 EOF
10731
10732 fi
10733 fi
10734
10735
10736 ################################################
10737 # look for a method of setting the effective uid
10738 seteuid=no;
10739 if test $seteuid = no; then
10740 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10741 echo "configure:10742: checking for setresuid" >&5
10742 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10743   echo $ac_n "(cached) $ac_c" 1>&6
10744 else
10745   
10746 if test "$cross_compiling" = yes; then
10747   samba_cv_USE_SETRESUID=cross
10748 else
10749   cat > conftest.$ac_ext <<EOF
10750 #line 10751 "configure"
10751 #include "confdefs.h"
10752
10753 #define AUTOCONF_TEST 1
10754 #define USE_SETRESUID 1
10755 #include "confdefs.h"
10756 #include "${srcdir-.}/lib/util_sec.c"
10757 EOF
10758 if { (eval echo configure:10759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10759 then
10760   samba_cv_USE_SETRESUID=yes
10761 else
10762   echo "configure: failed program was:" >&5
10763   cat conftest.$ac_ext >&5
10764   rm -fr conftest*
10765   samba_cv_USE_SETRESUID=no
10766 fi
10767 rm -fr conftest*
10768 fi
10769
10770 fi
10771
10772 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10773 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10774     seteuid=yes;cat >> confdefs.h <<\EOF
10775 #define USE_SETRESUID 1
10776 EOF
10777
10778 fi
10779 fi
10780
10781
10782 if test $seteuid = no; then
10783 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10784 echo "configure:10785: checking for setreuid" >&5
10785 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10786   echo $ac_n "(cached) $ac_c" 1>&6
10787 else
10788   
10789 if test "$cross_compiling" = yes; then
10790   samba_cv_USE_SETREUID=cross
10791 else
10792   cat > conftest.$ac_ext <<EOF
10793 #line 10794 "configure"
10794 #include "confdefs.h"
10795
10796 #define AUTOCONF_TEST 1
10797 #define USE_SETREUID 1
10798 #include "confdefs.h"
10799 #include "${srcdir-.}/lib/util_sec.c"
10800 EOF
10801 if { (eval echo configure:10802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10802 then
10803   samba_cv_USE_SETREUID=yes
10804 else
10805   echo "configure: failed program was:" >&5
10806   cat conftest.$ac_ext >&5
10807   rm -fr conftest*
10808   samba_cv_USE_SETREUID=no
10809 fi
10810 rm -fr conftest*
10811 fi
10812
10813 fi
10814
10815 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10816 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10817     seteuid=yes;cat >> confdefs.h <<\EOF
10818 #define USE_SETREUID 1
10819 EOF
10820
10821 fi
10822 fi
10823
10824 if test $seteuid = no; then
10825 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10826 echo "configure:10827: checking for seteuid" >&5
10827 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10828   echo $ac_n "(cached) $ac_c" 1>&6
10829 else
10830   
10831 if test "$cross_compiling" = yes; then
10832   samba_cv_USE_SETEUID=cross
10833 else
10834   cat > conftest.$ac_ext <<EOF
10835 #line 10836 "configure"
10836 #include "confdefs.h"
10837
10838 #define AUTOCONF_TEST 1
10839 #define USE_SETEUID 1
10840 #include "confdefs.h"
10841 #include "${srcdir-.}/lib/util_sec.c"
10842 EOF
10843 if { (eval echo configure:10844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10844 then
10845   samba_cv_USE_SETEUID=yes
10846 else
10847   echo "configure: failed program was:" >&5
10848   cat conftest.$ac_ext >&5
10849   rm -fr conftest*
10850   samba_cv_USE_SETEUID=no
10851 fi
10852 rm -fr conftest*
10853 fi
10854
10855 fi
10856
10857 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10858 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10859     seteuid=yes;cat >> confdefs.h <<\EOF
10860 #define USE_SETEUID 1
10861 EOF
10862
10863 fi
10864 fi
10865
10866 if test $seteuid = no; then
10867 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10868 echo "configure:10869: checking for setuidx" >&5
10869 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10870   echo $ac_n "(cached) $ac_c" 1>&6
10871 else
10872   
10873 if test "$cross_compiling" = yes; then
10874   samba_cv_USE_SETUIDX=cross
10875 else
10876   cat > conftest.$ac_ext <<EOF
10877 #line 10878 "configure"
10878 #include "confdefs.h"
10879
10880 #define AUTOCONF_TEST 1
10881 #define USE_SETUIDX 1
10882 #include "confdefs.h"
10883 #include "${srcdir-.}/lib/util_sec.c"
10884 EOF
10885 if { (eval echo configure:10886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10886 then
10887   samba_cv_USE_SETUIDX=yes
10888 else
10889   echo "configure: failed program was:" >&5
10890   cat conftest.$ac_ext >&5
10891   rm -fr conftest*
10892   samba_cv_USE_SETUIDX=no
10893 fi
10894 rm -fr conftest*
10895 fi
10896
10897 fi
10898
10899 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10900 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10901     seteuid=yes;cat >> confdefs.h <<\EOF
10902 #define USE_SETUIDX 1
10903 EOF
10904
10905 fi
10906 fi
10907
10908
10909 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10910 echo "configure:10911: checking for working mmap" >&5
10911 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10912   echo $ac_n "(cached) $ac_c" 1>&6
10913 else
10914   
10915 if test "$cross_compiling" = yes; then
10916   samba_cv_HAVE_MMAP=cross
10917 else
10918   cat > conftest.$ac_ext <<EOF
10919 #line 10920 "configure"
10920 #include "confdefs.h"
10921 #include "${srcdir-.}/tests/shared_mmap.c"
10922 EOF
10923 if { (eval echo configure:10924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10924 then
10925   samba_cv_HAVE_MMAP=yes
10926 else
10927   echo "configure: failed program was:" >&5
10928   cat conftest.$ac_ext >&5
10929   rm -fr conftest*
10930   samba_cv_HAVE_MMAP=no
10931 fi
10932 rm -fr conftest*
10933 fi
10934
10935 fi
10936
10937 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10938 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10939     cat >> confdefs.h <<\EOF
10940 #define HAVE_MMAP 1
10941 EOF
10942
10943 fi
10944
10945 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10946 echo "configure:10947: checking for ftruncate needs root" >&5
10947 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10948   echo $ac_n "(cached) $ac_c" 1>&6
10949 else
10950   
10951 if test "$cross_compiling" = yes; then
10952   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10953 else
10954   cat > conftest.$ac_ext <<EOF
10955 #line 10956 "configure"
10956 #include "confdefs.h"
10957 #include "${srcdir-.}/tests/ftruncroot.c"
10958 EOF
10959 if { (eval echo configure:10960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10960 then
10961   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10962 else
10963   echo "configure: failed program was:" >&5
10964   cat conftest.$ac_ext >&5
10965   rm -fr conftest*
10966   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10967 fi
10968 rm -fr conftest*
10969 fi
10970
10971 fi
10972
10973 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10974 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10975     cat >> confdefs.h <<\EOF
10976 #define FTRUNCATE_NEEDS_ROOT 1
10977 EOF
10978
10979 fi
10980
10981 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10982 echo "configure:10983: checking for fcntl locking" >&5
10983 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10984   echo $ac_n "(cached) $ac_c" 1>&6
10985 else
10986   
10987 if test "$cross_compiling" = yes; then
10988   samba_cv_HAVE_FCNTL_LOCK=cross
10989 else
10990   cat > conftest.$ac_ext <<EOF
10991 #line 10992 "configure"
10992 #include "confdefs.h"
10993 #include "${srcdir-.}/tests/fcntl_lock.c"
10994 EOF
10995 if { (eval echo configure:10996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10996 then
10997   samba_cv_HAVE_FCNTL_LOCK=yes
10998 else
10999   echo "configure: failed program was:" >&5
11000   cat conftest.$ac_ext >&5
11001   rm -fr conftest*
11002   samba_cv_HAVE_FCNTL_LOCK=no
11003 fi
11004 rm -fr conftest*
11005 fi
11006
11007 fi
11008
11009 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11010 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11011     cat >> confdefs.h <<\EOF
11012 #define HAVE_FCNTL_LOCK 1
11013 EOF
11014
11015 fi
11016
11017 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11018 echo "configure:11019: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11019 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11020   echo $ac_n "(cached) $ac_c" 1>&6
11021 else
11022   
11023 if test "$cross_compiling" = yes; then
11024   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11025 else
11026   cat > conftest.$ac_ext <<EOF
11027 #line 11028 "configure"
11028 #include "confdefs.h"
11029 #include "${srcdir-.}/tests/fcntl_lock64.c"
11030 EOF
11031 if { (eval echo configure:11032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11032 then
11033   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11034 else
11035   echo "configure: failed program was:" >&5
11036   cat conftest.$ac_ext >&5
11037   rm -fr conftest*
11038   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11039 fi
11040 rm -fr conftest*
11041 fi
11042
11043 fi
11044
11045 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11046 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11047     cat >> confdefs.h <<\EOF
11048 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11049 EOF
11050
11051
11052 else
11053
11054
11055   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11056 echo "configure:11057: checking for 64 bit fcntl locking" >&5
11057 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11058   echo $ac_n "(cached) $ac_c" 1>&6
11059 else
11060   
11061   if test "$cross_compiling" = yes; then
11062   samba_cv_HAVE_STRUCT_FLOCK64=cross
11063 else
11064   cat > conftest.$ac_ext <<EOF
11065 #line 11066 "configure"
11066 #include "confdefs.h"
11067
11068 #if defined(HAVE_UNISTD_H)
11069 #include <unistd.h>
11070 #endif
11071 #include <stdio.h>
11072 #include <stdlib.h>
11073
11074 #ifdef HAVE_FCNTL_H
11075 #include <fcntl.h>
11076 #endif
11077
11078 #ifdef HAVE_SYS_FCNTL_H
11079 #include <sys/fcntl.h>
11080 #endif
11081 main() { struct flock64 fl64;
11082 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11083 exit(0);
11084 #else
11085 exit(1);
11086 #endif
11087 }
11088 EOF
11089 if { (eval echo configure:11090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11090 then
11091   samba_cv_HAVE_STRUCT_FLOCK64=yes
11092 else
11093   echo "configure: failed program was:" >&5
11094   cat conftest.$ac_ext >&5
11095   rm -fr conftest*
11096   samba_cv_HAVE_STRUCT_FLOCK64=no
11097 fi
11098 rm -fr conftest*
11099 fi
11100
11101 fi
11102
11103 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11104
11105   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11106       cat >> confdefs.h <<\EOF
11107 #define HAVE_STRUCT_FLOCK64 1
11108 EOF
11109
11110   fi
11111 fi
11112
11113
11114 case "$host_os" in
11115 *linux*)
11116 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11117 echo "configure:11118: checking for broken RedHat 7.2 system header files" >&5
11118 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11119   echo $ac_n "(cached) $ac_c" 1>&6
11120 else
11121   
11122 cat > conftest.$ac_ext <<EOF
11123 #line 11124 "configure"
11124 #include "confdefs.h"
11125
11126 #ifdef HAVE_SYS_VFS_H
11127 #include <sys/vfs.h>
11128 #endif
11129 #ifdef HAVE_SYS_CAPABILITY_H
11130 #include <sys/capability.h>
11131 #endif
11132
11133 int main() {
11134 int i;
11135 ; return 0; }
11136 EOF
11137 if { (eval echo configure:11138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11138   rm -rf conftest*
11139   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11140 else
11141   echo "configure: failed program was:" >&5
11142   cat conftest.$ac_ext >&5
11143   rm -rf conftest*
11144   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11145 fi
11146 rm -f conftest*
11147 fi
11148
11149 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11150 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11151    cat >> confdefs.h <<\EOF
11152 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11153 EOF
11154
11155 fi
11156 ;;
11157 esac
11158
11159 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11160 echo "configure:11161: checking for broken nisplus include files" >&5
11161 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11162   echo $ac_n "(cached) $ac_c" 1>&6
11163 else
11164   
11165 cat > conftest.$ac_ext <<EOF
11166 #line 11167 "configure"
11167 #include "confdefs.h"
11168 #include <sys/acl.h>
11169 #if defined(HAVE_RPCSVC_NIS_H)
11170 #include <rpcsvc/nis.h>
11171 #endif
11172 int main() {
11173 int i;
11174 ; return 0; }
11175 EOF
11176 if { (eval echo configure:11177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11177   rm -rf conftest*
11178   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11179 else
11180   echo "configure: failed program was:" >&5
11181   cat conftest.$ac_ext >&5
11182   rm -rf conftest*
11183   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11184 fi
11185 rm -f conftest*
11186 fi
11187
11188 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11189 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11190     cat >> confdefs.h <<\EOF
11191 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11192 EOF
11193
11194 fi
11195
11196
11197 #################################################
11198 # check for smbwrapper support
11199 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11200 echo "configure:11201: checking whether to use smbwrapper" >&5
11201 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11202 if test "${with_smbwrapper+set}" = set; then
11203   withval="$with_smbwrapper"
11204    case "$withval" in
11205   yes)
11206     echo "$ac_t""yes" 1>&6
11207     cat >> confdefs.h <<\EOF
11208 #define WITH_SMBWRAPPER 1
11209 EOF
11210
11211         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11212
11213         if test x$ATTEMPT_WRAP32_BUILD = x; then
11214                 WRAP32=""
11215         else
11216                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11217         fi
11218
11219 # Conditions under which smbwrapper should not be built.
11220
11221         if test x$PICFLAG = x; then
11222            echo No support for PIC code - disabling smbwrapper and smbsh
11223            WRAP=""
11224            WRAP32=""
11225         elif test x$ac_cv_func_syscall = xno; then
11226            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11227            WRAP=""
11228            WRAP32=""
11229         fi
11230     ;;
11231   *)
11232     echo "$ac_t""no" 1>&6
11233     ;;
11234   esac 
11235 else
11236   echo "$ac_t""no" 1>&6
11237
11238 fi
11239
11240
11241 #################################################
11242 # check for AFS clear-text auth support
11243 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11244 echo "configure:11245: checking whether to use AFS clear-text auth" >&5
11245 # Check whether --with-afs or --without-afs was given.
11246 if test "${with_afs+set}" = set; then
11247   withval="$with_afs"
11248    case "$withval" in
11249   yes)
11250     echo "$ac_t""yes" 1>&6
11251     cat >> confdefs.h <<\EOF
11252 #define WITH_AFS 1
11253 EOF
11254
11255     ;;
11256   *)
11257     echo "$ac_t""no" 1>&6
11258     ;;
11259   esac 
11260 else
11261   echo "$ac_t""no" 1>&6
11262
11263 fi
11264
11265
11266
11267 #################################################
11268 # check for the DFS clear-text auth system
11269 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11270 echo "configure:11271: checking whether to use DFS clear-text auth" >&5
11271 # Check whether --with-dfs or --without-dfs was given.
11272 if test "${with_dfs+set}" = set; then
11273   withval="$with_dfs"
11274    case "$withval" in
11275   yes)
11276     echo "$ac_t""yes" 1>&6
11277     cat >> confdefs.h <<\EOF
11278 #define WITH_DFS 1
11279 EOF
11280
11281     ;;
11282   *)
11283     echo "$ac_t""no" 1>&6
11284     ;;
11285   esac 
11286 else
11287   echo "$ac_t""no" 1>&6
11288
11289 fi
11290
11291
11292
11293 #################################################
11294 # see if this box has the RedHat location for kerberos
11295 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11296 echo "configure:11297: checking for /usr/kerberos" >&5
11297 if test -d /usr/kerberos; then
11298     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11299     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11300     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11301     echo "$ac_t""yes" 1>&6
11302 else
11303     echo "$ac_t""no" 1>&6
11304 fi
11305
11306 #################################################
11307 # check for location of Kerberos 5 install
11308 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11309 echo "configure:11310: checking for kerberos 5 install path" >&5
11310 # Check whether --with-krb5 or --without-krb5 was given.
11311 if test "${with_krb5+set}" = set; then
11312   withval="$with_krb5"
11313    case "$withval" in
11314   no)
11315     echo "$ac_t""no" 1>&6
11316     ;;
11317   *)
11318     echo "$ac_t""yes" 1>&6
11319     LIBS="$LIBS -lkrb5"
11320     CFLAGS="$CFLAGS -I$withval/include"
11321     CPPFLAGS="$CPPFLAGS -I$withval/include"
11322     LDFLAGS="$LDFLAGS -L$withval/lib"
11323     ;;
11324   esac 
11325 else
11326   echo "$ac_t""no" 1>&6
11327
11328 fi
11329
11330
11331 # now check for krb5.h. Some systems have the libraries without the headers!
11332 # note that this check is done here to allow for different kerberos
11333 # include paths
11334 for ac_hdr in krb5.h
11335 do
11336 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11337 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11338 echo "configure:11339: checking for $ac_hdr" >&5
11339 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11340   echo $ac_n "(cached) $ac_c" 1>&6
11341 else
11342   cat > conftest.$ac_ext <<EOF
11343 #line 11344 "configure"
11344 #include "confdefs.h"
11345 #include <$ac_hdr>
11346 EOF
11347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11348 { (eval echo configure:11349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11350 if test -z "$ac_err"; then
11351   rm -rf conftest*
11352   eval "ac_cv_header_$ac_safe=yes"
11353 else
11354   echo "$ac_err" >&5
11355   echo "configure: failed program was:" >&5
11356   cat conftest.$ac_ext >&5
11357   rm -rf conftest*
11358   eval "ac_cv_header_$ac_safe=no"
11359 fi
11360 rm -f conftest*
11361 fi
11362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11363   echo "$ac_t""yes" 1>&6
11364     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11365   cat >> confdefs.h <<EOF
11366 #define $ac_tr_hdr 1
11367 EOF
11368  
11369 else
11370   echo "$ac_t""no" 1>&6
11371 fi
11372 done
11373
11374
11375 ##################################################################
11376 # we might need the k5crypto and com_err libraries on some systems
11377 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11378 echo "configure:11379: checking for _et_list in -lcom_err" >&5
11379 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11380 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11381   echo $ac_n "(cached) $ac_c" 1>&6
11382 else
11383   ac_save_LIBS="$LIBS"
11384 LIBS="-lcom_err  $LIBS"
11385 cat > conftest.$ac_ext <<EOF
11386 #line 11387 "configure"
11387 #include "confdefs.h"
11388 /* Override any gcc2 internal prototype to avoid an error.  */
11389 /* We use char because int might match the return type of a gcc2
11390     builtin and then its argument prototype would still apply.  */
11391 char _et_list();
11392
11393 int main() {
11394 _et_list()
11395 ; return 0; }
11396 EOF
11397 if { (eval echo configure:11398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11398   rm -rf conftest*
11399   eval "ac_cv_lib_$ac_lib_var=yes"
11400 else
11401   echo "configure: failed program was:" >&5
11402   cat conftest.$ac_ext >&5
11403   rm -rf conftest*
11404   eval "ac_cv_lib_$ac_lib_var=no"
11405 fi
11406 rm -f conftest*
11407 LIBS="$ac_save_LIBS"
11408
11409 fi
11410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11411   echo "$ac_t""yes" 1>&6
11412   LIBS="$LIBS -lcom_err"
11413 else
11414   echo "$ac_t""no" 1>&6
11415 fi
11416
11417 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11418 echo "configure:11419: checking for krb5_encrypt_data in -lk5crypto" >&5
11419 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11420 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11421   echo $ac_n "(cached) $ac_c" 1>&6
11422 else
11423   ac_save_LIBS="$LIBS"
11424 LIBS="-lk5crypto  $LIBS"
11425 cat > conftest.$ac_ext <<EOF
11426 #line 11427 "configure"
11427 #include "confdefs.h"
11428 /* Override any gcc2 internal prototype to avoid an error.  */
11429 /* We use char because int might match the return type of a gcc2
11430     builtin and then its argument prototype would still apply.  */
11431 char krb5_encrypt_data();
11432
11433 int main() {
11434 krb5_encrypt_data()
11435 ; return 0; }
11436 EOF
11437 if { (eval echo configure:11438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11438   rm -rf conftest*
11439   eval "ac_cv_lib_$ac_lib_var=yes"
11440 else
11441   echo "configure: failed program was:" >&5
11442   cat conftest.$ac_ext >&5
11443   rm -rf conftest*
11444   eval "ac_cv_lib_$ac_lib_var=no"
11445 fi
11446 rm -f conftest*
11447 LIBS="$ac_save_LIBS"
11448
11449 fi
11450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11451   echo "$ac_t""yes" 1>&6
11452   LIBS="$LIBS -lk5crypto"
11453 else
11454   echo "$ac_t""no" 1>&6
11455 fi
11456
11457
11458
11459 ########################################################
11460 # now see if we can find the krb5 libs in standard paths
11461 # or as specified above
11462 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11463 echo "configure:11464: checking for krb5_mk_req_extended in -lkrb5" >&5
11464 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11465 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11466   echo $ac_n "(cached) $ac_c" 1>&6
11467 else
11468   ac_save_LIBS="$LIBS"
11469 LIBS="-lkrb5  $LIBS"
11470 cat > conftest.$ac_ext <<EOF
11471 #line 11472 "configure"
11472 #include "confdefs.h"
11473 /* Override any gcc2 internal prototype to avoid an error.  */
11474 /* We use char because int might match the return type of a gcc2
11475     builtin and then its argument prototype would still apply.  */
11476 char krb5_mk_req_extended();
11477
11478 int main() {
11479 krb5_mk_req_extended()
11480 ; return 0; }
11481 EOF
11482 if { (eval echo configure:11483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11483   rm -rf conftest*
11484   eval "ac_cv_lib_$ac_lib_var=yes"
11485 else
11486   echo "configure: failed program was:" >&5
11487   cat conftest.$ac_ext >&5
11488   rm -rf conftest*
11489   eval "ac_cv_lib_$ac_lib_var=no"
11490 fi
11491 rm -f conftest*
11492 LIBS="$ac_save_LIBS"
11493
11494 fi
11495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11496   echo "$ac_t""yes" 1>&6
11497   LIBS="$LIBS -lkrb5";
11498         cat >> confdefs.h <<\EOF
11499 #define HAVE_KRB5 1
11500 EOF
11501
11502 else
11503   echo "$ac_t""no" 1>&6
11504 fi
11505
11506
11507
11508 ##################################################################
11509 # we might need the lber lib on some systems. To avoid link errors
11510 # this test must be before the libldap test
11511 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11512 echo "configure:11513: checking for ber_scanf in -llber" >&5
11513 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11514 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11515   echo $ac_n "(cached) $ac_c" 1>&6
11516 else
11517   ac_save_LIBS="$LIBS"
11518 LIBS="-llber  $LIBS"
11519 cat > conftest.$ac_ext <<EOF
11520 #line 11521 "configure"
11521 #include "confdefs.h"
11522 /* Override any gcc2 internal prototype to avoid an error.  */
11523 /* We use char because int might match the return type of a gcc2
11524     builtin and then its argument prototype would still apply.  */
11525 char ber_scanf();
11526
11527 int main() {
11528 ber_scanf()
11529 ; return 0; }
11530 EOF
11531 if { (eval echo configure:11532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11532   rm -rf conftest*
11533   eval "ac_cv_lib_$ac_lib_var=yes"
11534 else
11535   echo "configure: failed program was:" >&5
11536   cat conftest.$ac_ext >&5
11537   rm -rf conftest*
11538   eval "ac_cv_lib_$ac_lib_var=no"
11539 fi
11540 rm -f conftest*
11541 LIBS="$ac_save_LIBS"
11542
11543 fi
11544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11545   echo "$ac_t""yes" 1>&6
11546   LIBS="$LIBS -llber"
11547 else
11548   echo "$ac_t""no" 1>&6
11549 fi
11550
11551
11552 ########################################################
11553 # now see if we can find the ldap libs in standard paths
11554 if test x$have_ldap != xyes; then
11555 echo $ac_n "checking for ldap_open in -lldap""... $ac_c" 1>&6
11556 echo "configure:11557: checking for ldap_open in -lldap" >&5
11557 ac_lib_var=`echo ldap'_'ldap_open | 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="-lldap  $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 ldap_open();
11570
11571 int main() {
11572 ldap_open()
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 -lldap";
11591         cat >> confdefs.h <<\EOF
11592 #define HAVE_LDAP 1
11593 EOF
11594
11595 else
11596   echo "$ac_t""no" 1>&6
11597 fi
11598
11599 fi
11600
11601
11602 #################################################
11603 # check for automount support
11604 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11605 echo "configure:11606: checking whether to use AUTOMOUNT" >&5
11606 # Check whether --with-automount or --without-automount was given.
11607 if test "${with_automount+set}" = set; then
11608   withval="$with_automount"
11609    case "$withval" in
11610   yes)
11611     echo "$ac_t""yes" 1>&6
11612     cat >> confdefs.h <<\EOF
11613 #define WITH_AUTOMOUNT 1
11614 EOF
11615
11616     ;;
11617   *)
11618     echo "$ac_t""no" 1>&6
11619     ;;
11620   esac 
11621 else
11622   echo "$ac_t""no" 1>&6
11623
11624 fi
11625
11626
11627 #################################################
11628 # check for smbmount support
11629 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11630 echo "configure:11631: checking whether to use SMBMOUNT" >&5
11631 # Check whether --with-smbmount or --without-smbmount was given.
11632 if test "${with_smbmount+set}" = set; then
11633   withval="$with_smbmount"
11634    case "$withval" in
11635   yes)
11636         case "$host_os" in
11637         *linux*)
11638                 echo "$ac_t""yes" 1>&6
11639                 cat >> confdefs.h <<\EOF
11640 #define WITH_SMBMOUNT 1
11641 EOF
11642
11643                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11644                 ;;
11645         *)
11646                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
11647                 ;;
11648         esac
11649     ;;
11650   *)
11651     echo "$ac_t""no" 1>&6
11652     MPROGS=
11653     ;;
11654   esac 
11655 else
11656   echo "$ac_t""no" 1>&6
11657   MPROGS=
11658
11659 fi
11660
11661
11662
11663 #################################################
11664 # check for a PAM clear-text auth, accounts, password and session support
11665 with_pam_for_crypt=no
11666 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
11667 echo "configure:11668: checking whether to use PAM" >&5
11668 # Check whether --with-pam or --without-pam was given.
11669 if test "${with_pam+set}" = set; then
11670   withval="$with_pam"
11671    case "$withval" in
11672   yes)
11673     echo "$ac_t""yes" 1>&6
11674     cat >> confdefs.h <<\EOF
11675 #define WITH_PAM 1
11676 EOF
11677
11678     LIBS="$LIBS -lpam"
11679     with_pam_for_crypt=yes
11680     ;;
11681   *)
11682     echo "$ac_t""no" 1>&6
11683     ;;
11684   esac 
11685 else
11686   echo "$ac_t""no" 1>&6
11687
11688 fi
11689
11690
11691 # we can't build a pam module if we don't have pam.
11692 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11693 echo "configure:11694: checking for pam_get_data in -lpam" >&5
11694 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11695 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11696   echo $ac_n "(cached) $ac_c" 1>&6
11697 else
11698   ac_save_LIBS="$LIBS"
11699 LIBS="-lpam  $LIBS"
11700 cat > conftest.$ac_ext <<EOF
11701 #line 11702 "configure"
11702 #include "confdefs.h"
11703 /* Override any gcc2 internal prototype to avoid an error.  */
11704 /* We use char because int might match the return type of a gcc2
11705     builtin and then its argument prototype would still apply.  */
11706 char pam_get_data();
11707
11708 int main() {
11709 pam_get_data()
11710 ; return 0; }
11711 EOF
11712 if { (eval echo configure:11713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11713   rm -rf conftest*
11714   eval "ac_cv_lib_$ac_lib_var=yes"
11715 else
11716   echo "configure: failed program was:" >&5
11717   cat conftest.$ac_ext >&5
11718   rm -rf conftest*
11719   eval "ac_cv_lib_$ac_lib_var=no"
11720 fi
11721 rm -f conftest*
11722 LIBS="$ac_save_LIBS"
11723
11724 fi
11725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11726   echo "$ac_t""yes" 1>&6
11727   cat >> confdefs.h <<\EOF
11728 #define HAVE_LIBPAM 1
11729 EOF
11730
11731 else
11732   echo "$ac_t""no" 1>&6
11733 fi
11734
11735
11736 #################################################
11737 # check for pam_smbpass support
11738 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11739 echo "configure:11740: checking whether to use pam_smbpass" >&5
11740 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11741 if test "${with_pam_smbpass+set}" = set; then
11742   withval="$with_pam_smbpass"
11743    case "$withval" in
11744   yes)
11745     echo "$ac_t""yes" 1>&6
11746
11747 # Conditions under which pam_smbpass should not be built.
11748
11749        if test x$PICFLAG = x; then
11750           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11751           PAM_MOD=""
11752        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11753           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11754           PAM_MOD=""
11755        else
11756           PAM_MOD="bin/pam_smbpass.so"
11757        fi
11758     ;;
11759   *)
11760     echo "$ac_t""no" 1>&6
11761     ;;
11762   esac 
11763 else
11764   echo "$ac_t""no" 1>&6
11765
11766 fi
11767
11768
11769
11770 ###############################################
11771 # test for where we get crypt() from, but only
11772 # if not using PAM
11773 if test $with_pam_for_crypt = no; then
11774 for ac_func in crypt
11775 do
11776 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11777 echo "configure:11778: checking for $ac_func" >&5
11778 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11779   echo $ac_n "(cached) $ac_c" 1>&6
11780 else
11781   cat > conftest.$ac_ext <<EOF
11782 #line 11783 "configure"
11783 #include "confdefs.h"
11784 /* System header to define __stub macros and hopefully few prototypes,
11785     which can conflict with char $ac_func(); below.  */
11786 #include <assert.h>
11787 /* Override any gcc2 internal prototype to avoid an error.  */
11788 /* We use char because int might match the return type of a gcc2
11789     builtin and then its argument prototype would still apply.  */
11790 char $ac_func();
11791
11792 int main() {
11793
11794 /* The GNU C library defines this for functions which it implements
11795     to always fail with ENOSYS.  Some functions are actually named
11796     something starting with __ and the normal name is an alias.  */
11797 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11798 choke me
11799 #else
11800 $ac_func();
11801 #endif
11802
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_func_$ac_func=yes"
11808 else
11809   echo "configure: failed program was:" >&5
11810   cat conftest.$ac_ext >&5
11811   rm -rf conftest*
11812   eval "ac_cv_func_$ac_func=no"
11813 fi
11814 rm -f conftest*
11815 fi
11816
11817 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11818   echo "$ac_t""yes" 1>&6
11819     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11820   cat >> confdefs.h <<EOF
11821 #define $ac_tr_func 1
11822 EOF
11823  
11824 else
11825   echo "$ac_t""no" 1>&6
11826 fi
11827 done
11828
11829 if test x"$ac_cv_func_crypt" = x"no"; then
11830     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11831 echo "configure:11832: checking for crypt in -lcrypt" >&5
11832 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11833 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11834   echo $ac_n "(cached) $ac_c" 1>&6
11835 else
11836   ac_save_LIBS="$LIBS"
11837 LIBS="-lcrypt  $LIBS"
11838 cat > conftest.$ac_ext <<EOF
11839 #line 11840 "configure"
11840 #include "confdefs.h"
11841 /* Override any gcc2 internal prototype to avoid an error.  */
11842 /* We use char because int might match the return type of a gcc2
11843     builtin and then its argument prototype would still apply.  */
11844 char crypt();
11845
11846 int main() {
11847 crypt()
11848 ; return 0; }
11849 EOF
11850 if { (eval echo configure:11851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11851   rm -rf conftest*
11852   eval "ac_cv_lib_$ac_lib_var=yes"
11853 else
11854   echo "configure: failed program was:" >&5
11855   cat conftest.$ac_ext >&5
11856   rm -rf conftest*
11857   eval "ac_cv_lib_$ac_lib_var=no"
11858 fi
11859 rm -f conftest*
11860 LIBS="$ac_save_LIBS"
11861
11862 fi
11863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11864   echo "$ac_t""yes" 1>&6
11865   LIBS="$LIBS -lcrypt";
11866         cat >> confdefs.h <<\EOF
11867 #define HAVE_CRYPT 1
11868 EOF
11869
11870 else
11871   echo "$ac_t""no" 1>&6
11872 fi
11873
11874 fi
11875 fi
11876
11877 ##
11878 ## moved after the check for -lcrypt in order to
11879 ## ensure that the necessary libraries are included
11880 ## check checking for truncated salt.  Wrapped by the
11881 ## $with_pam_for_crypt variable as above   --jerry
11882 ##
11883 if test $with_pam_for_crypt = no; then
11884 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
11885 echo "configure:11886: checking for a crypt that needs truncated salt" >&5
11886 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
11887   echo $ac_n "(cached) $ac_c" 1>&6
11888 else
11889   
11890 if test "$cross_compiling" = yes; then
11891   samba_cv_HAVE_TRUNCATED_SALT=cross
11892 else
11893   cat > conftest.$ac_ext <<EOF
11894 #line 11895 "configure"
11895 #include "confdefs.h"
11896 #include "${srcdir-.}/tests/crypttest.c"
11897 EOF
11898 if { (eval echo configure:11899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11899 then
11900   samba_cv_HAVE_TRUNCATED_SALT=no
11901 else
11902   echo "configure: failed program was:" >&5
11903   cat conftest.$ac_ext >&5
11904   rm -fr conftest*
11905   samba_cv_HAVE_TRUNCATED_SALT=yes
11906 fi
11907 rm -fr conftest*
11908 fi
11909
11910 fi
11911
11912 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
11913 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
11914         cat >> confdefs.h <<\EOF
11915 #define HAVE_TRUNCATED_SALT 1
11916 EOF
11917
11918 fi
11919 fi
11920
11921
11922
11923 ########################################################################################
11924 ##
11925 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
11926 ##
11927 ########################################################################################
11928
11929 ## set the with_smbpasswd_sam as the default
11930 with_smbpasswd_sam=yes
11931
11932
11933 #################################################
11934 # check for a TDB password database
11935 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
11936 echo "configure:11937: checking whether to use TDB SAM database" >&5
11937 # Check whether --with-tdbsam or --without-tdbsam was given.
11938 if test "${with_tdbsam+set}" = set; then
11939   withval="$with_tdbsam"
11940    case "$withval" in
11941   yes)
11942     echo "$ac_t""yes" 1>&6
11943     cat >> confdefs.h <<\EOF
11944 #define WITH_TDB_SAM 1
11945 EOF
11946
11947     with_smbpasswd_sam=no
11948     ;;
11949   *)
11950     echo "$ac_t""no" 1>&6
11951     ;;
11952   esac 
11953 else
11954   echo "$ac_t""no" 1>&6
11955
11956 fi
11957
11958
11959 #################################################
11960 # check for a LDAP password database
11961 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
11962 echo "configure:11963: checking whether to use LDAP SAM database" >&5
11963 # Check whether --with-ldapsam or --without-ldapsam was given.
11964 if test "${with_ldapsam+set}" = set; then
11965   withval="$with_ldapsam"
11966    case "$withval" in
11967   yes)
11968     echo "$ac_t""yes" 1>&6
11969     cat >> confdefs.h <<\EOF
11970 #define WITH_LDAP_SAM 1
11971 EOF
11972
11973     LIBS="-lldap -llber $LIBS"
11974     with_smbpasswd_sam=no
11975     ;;
11976   *)
11977     echo "$ac_t""no" 1>&6
11978     ;;
11979   esac 
11980 else
11981   echo "$ac_t""no" 1>&6
11982
11983 fi
11984
11985
11986 #################################################
11987 # check for a NISPLUS password database
11988 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
11989 echo "configure:11990: checking whether to use NISPLUS SAM database" >&5
11990 # Check whether --with-nisplussam or --without-nisplussam was given.
11991 if test "${with_nisplussam+set}" = set; then
11992   withval="$with_nisplussam"
11993    case "$withval" in
11994   yes)
11995     echo "$ac_t""yes" 1>&6
11996     cat >> confdefs.h <<\EOF
11997 #define WITH_NISPLUS_SAM 1
11998 EOF
11999
12000     with_smbpasswd_sam=no
12001     ;;
12002   *)
12003     echo "$ac_t""no" 1>&6
12004     ;;
12005   esac 
12006 else
12007   echo "$ac_t""no" 1>&6
12008
12009 fi
12010
12011
12012 ################################################
12013 # This test should come last because the
12014 # smbpasswd SAM is only used if another format
12015 # has not been defined
12016 echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6
12017 echo "configure:12018: checking whether to use traditional smbpasswd file" >&5
12018 if test $with_smbpasswd_sam = yes; then
12019         echo "$ac_t""yes" 1>&6
12020         cat >> confdefs.h <<\EOF
12021 #define WITH_SMBPASSWD_SAM 1
12022 EOF
12023
12024 else
12025         echo "$ac_t""no" 1>&6
12026 fi
12027
12028 ########################################################################################
12029 ##
12030 ## END OF TESTS FOR SAM BACKENDS.  
12031 ##
12032 ########################################################################################
12033
12034 #################################################
12035 # check for a NISPLUS_HOME support 
12036 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12037 echo "configure:12038: checking whether to use NISPLUS_HOME" >&5
12038 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12039 if test "${with_nisplus_home+set}" = set; then
12040   withval="$with_nisplus_home"
12041    case "$withval" in
12042   yes)
12043     echo "$ac_t""yes" 1>&6
12044     cat >> confdefs.h <<\EOF
12045 #define WITH_NISPLUS_HOME 1
12046 EOF
12047
12048     ;;
12049   *)
12050     echo "$ac_t""no" 1>&6
12051     ;;
12052   esac 
12053 else
12054   echo "$ac_t""no" 1>&6
12055
12056 fi
12057
12058
12059 #################################################
12060 # check for the secure socket layer
12061 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12062 echo "configure:12063: checking whether to use SSL" >&5
12063 # Check whether --with-ssl or --without-ssl was given.
12064 if test "${with_ssl+set}" = set; then
12065   withval="$with_ssl"
12066    case "$withval" in
12067   yes)
12068     echo "$ac_t""yes" 1>&6
12069     cat >> confdefs.h <<\EOF
12070 #define WITH_SSL 1
12071 EOF
12072
12073     withval="/usr/local/ssl"     # default
12074
12075     if test "${with_sslinc+set}" = set; then
12076
12077         withval="$with_sslinc"
12078         case "$withval" in
12079         yes|no)
12080           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12081           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12082         ;;
12083         * )
12084           CFLAGS="-I${withval} $CFLAGS"
12085         ;;
12086         esac
12087
12088     else
12089
12090         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12091
12092     fi
12093
12094     if test "${with_ssllib+set}" = set; then
12095
12096         withval="$with_ssllib"
12097         case "$withval" in
12098         yes|no)
12099           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12100           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12101         ;;
12102         * )
12103           LDFLAGS="-L${withval}/lib $LDFLAGS"
12104         ;;
12105         esac
12106
12107     else
12108
12109         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12110
12111     fi
12112
12113     LIBS="-lssl -lcrypto $LIBS"
12114
12115 #    if test ! -d ${withval}; then
12116 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12117 #      exit 1
12118 #    fi 
12119
12120     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12121
12122     ;;
12123   *)
12124     echo "$ac_t""no" 1>&6
12125     ;;
12126   esac 
12127 else
12128   echo "$ac_t""no" 1>&6
12129
12130 fi
12131
12132
12133 #################################################
12134 # check for syslog logging
12135 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12136 echo "configure:12137: checking whether to use syslog logging" >&5
12137 # Check whether --with-syslog or --without-syslog was given.
12138 if test "${with_syslog+set}" = set; then
12139   withval="$with_syslog"
12140    case "$withval" in
12141   yes)
12142     echo "$ac_t""yes" 1>&6
12143     cat >> confdefs.h <<\EOF
12144 #define WITH_SYSLOG 1
12145 EOF
12146
12147     ;;
12148   *)
12149     echo "$ac_t""no" 1>&6
12150     ;;
12151   esac 
12152 else
12153   echo "$ac_t""no" 1>&6
12154
12155 fi
12156
12157
12158 #################################################
12159 # check for a shared memory profiling support
12160 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12161 echo "configure:12162: checking whether to use profiling" >&5
12162 # Check whether --with-profiling-data or --without-profiling-data was given.
12163 if test "${with_profiling_data+set}" = set; then
12164   withval="$with_profiling_data"
12165    case "$withval" in
12166   yes)
12167     echo "$ac_t""yes" 1>&6
12168     cat >> confdefs.h <<\EOF
12169 #define WITH_PROFILE 1
12170 EOF
12171
12172     ;;
12173   *)
12174     echo "$ac_t""no" 1>&6
12175     ;;
12176   esac 
12177 else
12178   echo "$ac_t""no" 1>&6
12179
12180 fi
12181
12182
12183
12184 #################################################
12185 # check for experimental disk-quotas support
12186 QUOTAOBJS=smbd/noquotas.o
12187
12188 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12189 echo "configure:12190: checking whether to support disk-quotas" >&5
12190 # Check whether --with-quotas or --without-quotas was given.
12191 if test "${with_quotas+set}" = set; then
12192   withval="$with_quotas"
12193    case "$withval" in
12194   yes)
12195     echo "$ac_t""yes" 1>&6
12196     case "$host_os" in
12197       *linux*)
12198         # Check for kernel 2.4.x quota braindamage...
12199         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12200 echo "configure:12201: checking for linux 2.4.x quota braindamage.." >&5
12201 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12202   echo $ac_n "(cached) $ac_c" 1>&6
12203 else
12204   
12205         cat > conftest.$ac_ext <<EOF
12206 #line 12207 "configure"
12207 #include "confdefs.h"
12208 #include <stdio.h>
12209 #include <sys/types.h>
12210 #include <asm/types.h>
12211 #include <linux/quota.h>
12212 #include <mntent.h>
12213 #include <linux/unistd.h>
12214 int main() {
12215 struct mem_dqblk D;
12216 ; return 0; }
12217 EOF
12218 if { (eval echo configure:12219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12219   rm -rf conftest*
12220   samba_cv_linux_2_4_quota_braindamage=yes
12221 else
12222   echo "configure: failed program was:" >&5
12223   cat conftest.$ac_ext >&5
12224   rm -rf conftest*
12225   samba_cv_linux_2_4_quota_braindamage=no
12226 fi
12227 rm -f conftest*
12228 fi
12229
12230 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12231 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12232         cat >> confdefs.h <<\EOF
12233 #define LINUX_QUOTAS_2 1
12234 EOF
12235
12236 else
12237         cat >> confdefs.h <<\EOF
12238 #define LINUX_QUOTAS_1 1
12239 EOF
12240
12241 fi
12242         ;;
12243       *)
12244         ;;
12245     esac
12246     QUOTAOBJS=smbd/quotas.o
12247     cat >> confdefs.h <<\EOF
12248 #define WITH_QUOTAS 1
12249 EOF
12250
12251     ;;
12252   *)
12253     echo "$ac_t""no" 1>&6
12254     ;;
12255   esac 
12256 else
12257   echo "$ac_t""no" 1>&6
12258
12259 fi
12260
12261
12262
12263 #################################################
12264 # check for experimental utmp accounting
12265
12266 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12267 echo "configure:12268: checking whether to support utmp accounting" >&5
12268 # Check whether --with-utmp or --without-utmp was given.
12269 if test "${with_utmp+set}" = set; then
12270   withval="$with_utmp"
12271    case "$withval" in
12272   yes)
12273     echo "$ac_t""yes" 1>&6
12274     cat >> confdefs.h <<\EOF
12275 #define WITH_UTMP 1
12276 EOF
12277
12278     ;;
12279   *)
12280     echo "$ac_t""no" 1>&6
12281     ;;
12282   esac 
12283 else
12284   echo "$ac_t""no" 1>&6
12285
12286 fi
12287
12288
12289 #################################################
12290 # set private directory location
12291 # Check whether --with-privatedir or --without-privatedir was given.
12292 if test "${with_privatedir+set}" = set; then
12293   withval="$with_privatedir"
12294    case "$withval" in
12295   yes|no)
12296   #
12297   # Just in case anybody calls it without argument
12298   #
12299     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12300     privatedir='${prefix}/private'
12301   ;;
12302   * )
12303     privatedir="$withval"
12304     ;;
12305   esac
12306   
12307 else
12308   privatedir='${prefix}/private'
12309    
12310
12311 fi
12312
12313
12314 #################################################
12315 # set lock directory location
12316 # Check whether --with-lockdir or --without-lockdir was given.
12317 if test "${with_lockdir+set}" = set; then
12318   withval="$with_lockdir"
12319    case "$withval" in
12320   yes|no)
12321   #
12322   # Just in case anybody calls it without argument
12323   #
12324     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12325     lockdir='$(VARDIR)/locks'
12326   ;;
12327   * )
12328     lockdir="$withval"
12329     ;;
12330   esac
12331   
12332 else
12333   lockdir='$(VARDIR)/locks'
12334    
12335
12336 fi
12337
12338
12339 #################################################
12340 # set SWAT directory location
12341 # Check whether --with-swatdir or --without-swatdir was given.
12342 if test "${with_swatdir+set}" = set; then
12343   withval="$with_swatdir"
12344    case "$withval" in
12345   yes|no)
12346   #
12347   # Just in case anybody does it
12348   #
12349     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12350     swatdir='${prefix}/swat'
12351   ;;
12352   * )
12353     swatdir="$withval"
12354     ;;
12355   esac
12356   
12357 else
12358   swatdir='${prefix}/swat'
12359    
12360
12361 fi
12362
12363
12364 #################################################
12365 # choose native language(s) of man pages
12366 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12367 echo "configure:12368: checking chosen man pages' language(s)" >&5
12368 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12369 if test "${with_manpages_langs+set}" = set; then
12370   withval="$with_manpages_langs"
12371    case "$withval" in
12372   yes|no)
12373     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12374     manlangs="en"
12375   ;;
12376   *)
12377     manlangs="$withval"
12378   ;;
12379   esac
12380
12381   echo "$ac_t""$manlangs" 1>&6
12382   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12383   
12384 else
12385   manlangs="en"
12386   echo "$ac_t""$manlangs" 1>&6
12387   
12388
12389 fi
12390
12391
12392 #################################################
12393 # these tests are taken from the GNU fileutils package
12394 echo "checking how to get filesystem space usage" 1>&6
12395 echo "configure:12396: checking how to get filesystem space usage" >&5
12396 space=no
12397
12398 # Test for statvfs64.
12399 if test $space = no; then
12400   # SVR4
12401   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12402 echo "configure:12403: checking statvfs64 function (SVR4)" >&5
12403 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12404   echo $ac_n "(cached) $ac_c" 1>&6
12405 else
12406   if test "$cross_compiling" = yes; then
12407   fu_cv_sys_stat_statvfs64=cross
12408 else
12409   cat > conftest.$ac_ext <<EOF
12410 #line 12411 "configure"
12411 #include "confdefs.h"
12412
12413 #if defined(HAVE_UNISTD_H)
12414 #include <unistd.h>
12415 #endif
12416 #include <sys/types.h>
12417 #include <sys/statvfs.h>
12418   main ()
12419   {
12420     struct statvfs64 fsd;
12421     exit (statvfs64 (".", &fsd));
12422   }
12423 EOF
12424 if { (eval echo configure:12425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12425 then
12426   fu_cv_sys_stat_statvfs64=yes
12427 else
12428   echo "configure: failed program was:" >&5
12429   cat conftest.$ac_ext >&5
12430   rm -fr conftest*
12431   fu_cv_sys_stat_statvfs64=no
12432 fi
12433 rm -fr conftest*
12434 fi
12435
12436 fi
12437
12438 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12439   if test $fu_cv_sys_stat_statvfs64 = yes; then
12440     space=yes
12441     cat >> confdefs.h <<\EOF
12442 #define STAT_STATVFS64 1
12443 EOF
12444
12445   fi
12446 fi
12447
12448 # Perform only the link test since it seems there are no variants of the
12449 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12450 # because that got a false positive on SCO OSR5.  Adding the declaration
12451 # of a `struct statvfs' causes this test to fail (as it should) on such
12452 # systems.  That system is reported to work fine with STAT_STATFS4 which
12453 # is what it gets when this test fails.
12454 if test $space = no; then
12455   # SVR4
12456   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12457 echo "configure:12458: checking statvfs function (SVR4)" >&5
12458 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12459   echo $ac_n "(cached) $ac_c" 1>&6
12460 else
12461   cat > conftest.$ac_ext <<EOF
12462 #line 12463 "configure"
12463 #include "confdefs.h"
12464 #include <sys/types.h>
12465 #include <sys/statvfs.h>
12466 int main() {
12467 struct statvfs fsd; statvfs (0, &fsd);
12468 ; return 0; }
12469 EOF
12470 if { (eval echo configure:12471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12471   rm -rf conftest*
12472   fu_cv_sys_stat_statvfs=yes
12473 else
12474   echo "configure: failed program was:" >&5
12475   cat conftest.$ac_ext >&5
12476   rm -rf conftest*
12477   fu_cv_sys_stat_statvfs=no
12478 fi
12479 rm -f conftest*
12480 fi
12481
12482 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12483   if test $fu_cv_sys_stat_statvfs = yes; then
12484     space=yes
12485     cat >> confdefs.h <<\EOF
12486 #define STAT_STATVFS 1
12487 EOF
12488
12489   fi
12490 fi
12491
12492 if test $space = no; then
12493   # DEC Alpha running OSF/1
12494   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12495 echo "configure:12496: checking for 3-argument statfs function (DEC OSF/1)" >&5
12496   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+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_statfs3_osf1=no
12501 else
12502   cat > conftest.$ac_ext <<EOF
12503 #line 12504 "configure"
12504 #include "confdefs.h"
12505
12506 #include <sys/param.h>
12507 #include <sys/types.h>
12508 #include <sys/mount.h>
12509   main ()
12510   {
12511     struct statfs fsd;
12512     fsd.f_fsize = 0;
12513     exit (statfs (".", &fsd, sizeof (struct statfs)));
12514   }
12515 EOF
12516 if { (eval echo configure:12517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12517 then
12518   fu_cv_sys_stat_statfs3_osf1=yes
12519 else
12520   echo "configure: failed program was:" >&5
12521   cat conftest.$ac_ext >&5
12522   rm -fr conftest*
12523   fu_cv_sys_stat_statfs3_osf1=no
12524 fi
12525 rm -fr conftest*
12526 fi
12527
12528 fi
12529
12530   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12531   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12532     space=yes
12533     cat >> confdefs.h <<\EOF
12534 #define STAT_STATFS3_OSF1 1
12535 EOF
12536
12537   fi
12538 fi
12539
12540 if test $space = no; then
12541 # AIX
12542   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12543 echo "configure:12544: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12544   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12545   echo $ac_n "(cached) $ac_c" 1>&6
12546 else
12547   if test "$cross_compiling" = yes; then
12548   fu_cv_sys_stat_statfs2_bsize=no
12549 else
12550   cat > conftest.$ac_ext <<EOF
12551 #line 12552 "configure"
12552 #include "confdefs.h"
12553
12554 #ifdef HAVE_SYS_PARAM_H
12555 #include <sys/param.h>
12556 #endif
12557 #ifdef HAVE_SYS_MOUNT_H
12558 #include <sys/mount.h>
12559 #endif
12560 #ifdef HAVE_SYS_VFS_H
12561 #include <sys/vfs.h>
12562 #endif
12563   main ()
12564   {
12565   struct statfs fsd;
12566   fsd.f_bsize = 0;
12567   exit (statfs (".", &fsd));
12568   }
12569 EOF
12570 if { (eval echo configure:12571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12571 then
12572   fu_cv_sys_stat_statfs2_bsize=yes
12573 else
12574   echo "configure: failed program was:" >&5
12575   cat conftest.$ac_ext >&5
12576   rm -fr conftest*
12577   fu_cv_sys_stat_statfs2_bsize=no
12578 fi
12579 rm -fr conftest*
12580 fi
12581
12582 fi
12583
12584   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12585   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12586     space=yes
12587     cat >> confdefs.h <<\EOF
12588 #define STAT_STATFS2_BSIZE 1
12589 EOF
12590
12591   fi
12592 fi
12593
12594 if test $space = no; then
12595 # SVR3
12596   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12597 echo "configure:12598: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12598   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12599   echo $ac_n "(cached) $ac_c" 1>&6
12600 else
12601   if test "$cross_compiling" = yes; then
12602   fu_cv_sys_stat_statfs4=no
12603 else
12604   cat > conftest.$ac_ext <<EOF
12605 #line 12606 "configure"
12606 #include "confdefs.h"
12607 #include <sys/types.h>
12608 #include <sys/statfs.h>
12609   main ()
12610   {
12611   struct statfs fsd;
12612   exit (statfs (".", &fsd, sizeof fsd, 0));
12613   }
12614 EOF
12615 if { (eval echo configure:12616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12616 then
12617   fu_cv_sys_stat_statfs4=yes
12618 else
12619   echo "configure: failed program was:" >&5
12620   cat conftest.$ac_ext >&5
12621   rm -fr conftest*
12622   fu_cv_sys_stat_statfs4=no
12623 fi
12624 rm -fr conftest*
12625 fi
12626
12627 fi
12628
12629   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12630   if test $fu_cv_sys_stat_statfs4 = yes; then
12631     space=yes
12632     cat >> confdefs.h <<\EOF
12633 #define STAT_STATFS4 1
12634 EOF
12635
12636   fi
12637 fi
12638
12639 if test $space = no; then
12640 # 4.4BSD and NetBSD
12641   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12642 echo "configure:12643: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12643   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12644   echo $ac_n "(cached) $ac_c" 1>&6
12645 else
12646   if test "$cross_compiling" = yes; then
12647   fu_cv_sys_stat_statfs2_fsize=no
12648 else
12649   cat > conftest.$ac_ext <<EOF
12650 #line 12651 "configure"
12651 #include "confdefs.h"
12652 #include <sys/types.h>
12653 #ifdef HAVE_SYS_PARAM_H
12654 #include <sys/param.h>
12655 #endif
12656 #ifdef HAVE_SYS_MOUNT_H
12657 #include <sys/mount.h>
12658 #endif
12659   main ()
12660   {
12661   struct statfs fsd;
12662   fsd.f_fsize = 0;
12663   exit (statfs (".", &fsd));
12664   }
12665 EOF
12666 if { (eval echo configure:12667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12667 then
12668   fu_cv_sys_stat_statfs2_fsize=yes
12669 else
12670   echo "configure: failed program was:" >&5
12671   cat conftest.$ac_ext >&5
12672   rm -fr conftest*
12673   fu_cv_sys_stat_statfs2_fsize=no
12674 fi
12675 rm -fr conftest*
12676 fi
12677
12678 fi
12679
12680   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12681   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12682     space=yes
12683     cat >> confdefs.h <<\EOF
12684 #define STAT_STATFS2_FSIZE 1
12685 EOF
12686
12687   fi
12688 fi
12689
12690 if test $space = no; then
12691   # Ultrix
12692   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12693 echo "configure:12694: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12694   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12695   echo $ac_n "(cached) $ac_c" 1>&6
12696 else
12697   if test "$cross_compiling" = yes; then
12698   fu_cv_sys_stat_fs_data=no
12699 else
12700   cat > conftest.$ac_ext <<EOF
12701 #line 12702 "configure"
12702 #include "confdefs.h"
12703 #include <sys/types.h>
12704 #ifdef HAVE_SYS_PARAM_H
12705 #include <sys/param.h>
12706 #endif
12707 #ifdef HAVE_SYS_MOUNT_H
12708 #include <sys/mount.h>
12709 #endif
12710 #ifdef HAVE_SYS_FS_TYPES_H
12711 #include <sys/fs_types.h>
12712 #endif
12713   main ()
12714   {
12715   struct fs_data fsd;
12716   /* Ultrix's statfs returns 1 for success,
12717      0 for not mounted, -1 for failure.  */
12718   exit (statfs (".", &fsd) != 1);
12719   }
12720 EOF
12721 if { (eval echo configure:12722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12722 then
12723   fu_cv_sys_stat_fs_data=yes
12724 else
12725   echo "configure: failed program was:" >&5
12726   cat conftest.$ac_ext >&5
12727   rm -fr conftest*
12728   fu_cv_sys_stat_fs_data=no
12729 fi
12730 rm -fr conftest*
12731 fi
12732
12733 fi
12734
12735   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12736   if test $fu_cv_sys_stat_fs_data = yes; then
12737     space=yes
12738     cat >> confdefs.h <<\EOF
12739 #define STAT_STATFS2_FS_DATA 1
12740 EOF
12741
12742   fi
12743 fi
12744
12745 #
12746 # As a gating factor for large file support, in order to
12747 # use <4GB files we must have the following minimal support
12748 # available.
12749 # long long, and a 64 bit off_t or off64_t.
12750 # If we don't have all of these then disable large
12751 # file support.
12752 #
12753 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12754 echo "configure:12755: checking if large file support can be enabled" >&5
12755 cat > conftest.$ac_ext <<EOF
12756 #line 12757 "configure"
12757 #include "confdefs.h"
12758
12759 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12760 #include <sys/types.h>
12761 #else
12762 __COMPILE_ERROR_
12763 #endif
12764
12765 int main() {
12766 int i
12767 ; return 0; }
12768 EOF
12769 if { (eval echo configure:12770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12770   rm -rf conftest*
12771   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12772 else
12773   echo "configure: failed program was:" >&5
12774   cat conftest.$ac_ext >&5
12775   rm -rf conftest*
12776   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12777 fi
12778 rm -f conftest*
12779 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12780     cat >> confdefs.h <<\EOF
12781 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12782 EOF
12783
12784 fi
12785 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12786
12787 # Check whether --with-spinlocks or --without-spinlocks was given.
12788 if test "${with_spinlocks+set}" = set; then
12789   withval="$with_spinlocks"
12790   :
12791 fi
12792
12793 if test "x$with_spinlocks" = "xyes"; then
12794     cat >> confdefs.h <<\EOF
12795 #define USE_SPINLOCKS 1
12796 EOF
12797
12798
12799     case "$host_cpu" in
12800         sparc)
12801             cat >> confdefs.h <<\EOF
12802 #define SPARC_SPINLOCKS 1
12803 EOF
12804
12805             ;;
12806
12807         i386|i486|i586|i686)
12808             cat >> confdefs.h <<\EOF
12809 #define INTEL_SPINLOCKS 1
12810 EOF
12811
12812             ;;
12813
12814         mips)
12815             cat >> confdefs.h <<\EOF
12816 #define MIPS_SPINLOCKS 1
12817 EOF
12818
12819             ;;
12820
12821         powerpc)
12822             cat >> confdefs.h <<\EOF
12823 #define POWERPC_SPINLOCKS 1
12824 EOF
12825
12826             ;;
12827     esac
12828 fi
12829
12830 #################################################
12831 # check for ACL support
12832
12833 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12834 echo "configure:12835: checking whether to support ACLs" >&5
12835 # Check whether --with-acl-support or --without-acl-support was given.
12836 if test "${with_acl_support+set}" = set; then
12837   withval="$with_acl_support"
12838    case "$withval" in
12839   yes)
12840
12841         case "$host_os" in
12842         *sysv5*)
12843             echo "$ac_t""Using UnixWare ACLs" 1>&6
12844             cat >> confdefs.h <<\EOF
12845 #define HAVE_UNIXWARE_ACLS 1
12846 EOF
12847
12848             ;;
12849         *solaris*)
12850             echo "$ac_t""Using solaris ACLs" 1>&6
12851             cat >> confdefs.h <<\EOF
12852 #define HAVE_SOLARIS_ACLS 1
12853 EOF
12854
12855             ;;
12856                 *irix*)
12857                         echo "$ac_t""Using IRIX ACLs" 1>&6
12858                         cat >> confdefs.h <<\EOF
12859 #define HAVE_IRIX_ACLS 1
12860 EOF
12861
12862                         ;;
12863                 *aix*)
12864                         echo "$ac_t""Using AIX ACLs" 1>&6
12865                         cat >> confdefs.h <<\EOF
12866 #define HAVE_AIX_ACLS 1
12867 EOF
12868
12869                         ;;
12870                 *osf*)
12871                         echo "$ac_t""Using Tru64 ACLs" 1>&6
12872                         cat >> confdefs.h <<\EOF
12873 #define HAVE_TRU64_ACLS 1
12874 EOF
12875
12876                         LIBS="$LIBS -lpacl"
12877                         ;;
12878         *)
12879                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12880 echo "configure:12881: checking for acl_get_file in -lacl" >&5
12881 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12882 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12883   echo $ac_n "(cached) $ac_c" 1>&6
12884 else
12885   ac_save_LIBS="$LIBS"
12886 LIBS="-lacl  $LIBS"
12887 cat > conftest.$ac_ext <<EOF
12888 #line 12889 "configure"
12889 #include "confdefs.h"
12890 /* Override any gcc2 internal prototype to avoid an error.  */
12891 /* We use char because int might match the return type of a gcc2
12892     builtin and then its argument prototype would still apply.  */
12893 char acl_get_file();
12894
12895 int main() {
12896 acl_get_file()
12897 ; return 0; }
12898 EOF
12899 if { (eval echo configure:12900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12900   rm -rf conftest*
12901   eval "ac_cv_lib_$ac_lib_var=yes"
12902 else
12903   echo "configure: failed program was:" >&5
12904   cat conftest.$ac_ext >&5
12905   rm -rf conftest*
12906   eval "ac_cv_lib_$ac_lib_var=no"
12907 fi
12908 rm -f conftest*
12909 LIBS="$ac_save_LIBS"
12910
12911 fi
12912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12913   echo "$ac_t""yes" 1>&6
12914     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12915     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12916   cat >> confdefs.h <<EOF
12917 #define $ac_tr_lib 1
12918 EOF
12919
12920   LIBS="-lacl $LIBS"
12921
12922 else
12923   echo "$ac_t""no" 1>&6
12924 fi
12925
12926                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12927 echo "configure:12928: checking for ACL support" >&5
12928 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12929   echo $ac_n "(cached) $ac_c" 1>&6
12930 else
12931   
12932                         cat > conftest.$ac_ext <<EOF
12933 #line 12934 "configure"
12934 #include "confdefs.h"
12935 #include <sys/types.h>
12936 #include <sys/acl.h>
12937 int main() {
12938  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12939 ; return 0; }
12940 EOF
12941 if { (eval echo configure:12942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12942   rm -rf conftest*
12943   samba_cv_HAVE_POSIX_ACLS=yes
12944 else
12945   echo "configure: failed program was:" >&5
12946   cat conftest.$ac_ext >&5
12947   rm -rf conftest*
12948   samba_cv_HAVE_POSIX_ACLS=no
12949 fi
12950 rm -f conftest*
12951 fi
12952
12953 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12954                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12955                                 echo "$ac_t""Using posix ACLs" 1>&6
12956                                 cat >> confdefs.h <<\EOF
12957 #define HAVE_POSIX_ACLS 1
12958 EOF
12959
12960                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12961 echo "configure:12962: checking for acl_get_perm_np" >&5
12962 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12963   echo $ac_n "(cached) $ac_c" 1>&6
12964 else
12965   
12966                                 cat > conftest.$ac_ext <<EOF
12967 #line 12968 "configure"
12968 #include "confdefs.h"
12969 #include <sys/types.h>
12970 #include <sys/acl.h>
12971 int main() {
12972  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12973 ; return 0; }
12974 EOF
12975 if { (eval echo configure:12976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12976   rm -rf conftest*
12977   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12978 else
12979   echo "configure: failed program was:" >&5
12980   cat conftest.$ac_ext >&5
12981   rm -rf conftest*
12982   samba_cv_HAVE_ACL_GET_PERM_NP=no
12983 fi
12984 rm -f conftest*
12985 fi
12986
12987 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12988                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12989                                         cat >> confdefs.h <<\EOF
12990 #define HAVE_ACL_GET_PERM_NP 1
12991 EOF
12992
12993                                 fi
12994                         fi
12995             ;;
12996         esac
12997         ;;
12998   *)
12999     echo "$ac_t""no" 1>&6
13000     cat >> confdefs.h <<\EOF
13001 #define HAVE_NO_ACLS 1
13002 EOF
13003
13004     ;;
13005   esac 
13006 else
13007   cat >> confdefs.h <<\EOF
13008 #define HAVE_NO_ACLS 1
13009 EOF
13010
13011   echo "$ac_t""no" 1>&6
13012
13013 fi
13014
13015
13016 #################################################
13017 # Check whether winbind is supported on this platform.  If so we need to
13018 # build and install client programs (WINBIND_TARGETS), sbin programs
13019 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13020
13021 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13022 echo "configure:13023: checking whether to build winbind" >&5
13023
13024 # Initially, the value of $host_os decides whether winbind is supported
13025
13026 case "$host_os" in 
13027         *linux*|*solaris*)
13028                 HAVE_WINBIND=yes
13029                 ;;
13030         *)
13031                 HAVE_WINBIND=no
13032                 winbind_no_reason=", unsupported on $host_os"
13033                 ;;
13034 esac
13035
13036 # Check the setting of --with-winbindd
13037
13038 # Check whether --with-winbind or --without-winbind was given.
13039 if test "${with_winbind+set}" = set; then
13040   withval="$with_winbind"
13041    
13042   case "$withval" in
13043         yes)
13044                 HAVE_WINBIND=yes
13045                 ;;
13046         no)
13047                 HAVE_WINBIND=no
13048                 winbind_reason=""
13049                 ;;
13050   esac 
13051 fi
13052
13053
13054 # We need unix domain sockets for winbind
13055
13056 if test x"$HAVE_WINBIND" = x"yes"; then
13057         if test x"$samba_cv_unixsocket" = x"no"; then
13058                 winbind_no_reason=", no unix domain socket support on $host_os"
13059                 HAVE_WINBIND=no
13060         fi
13061 fi
13062
13063 # Display test results
13064
13065 if test x"$HAVE_WINBIND" = x"yes"; then
13066
13067         echo "$ac_t""yes" 1>&6
13068
13069         WINBIND_TARGETS="\$(WINBIND_PROGS)"
13070         WINBIND_STARGETS="\$(WINBIND_SPROGS)"
13071         WINBIND_LTARGETS="\$(WINBIND_LPROGS)"
13072         case "$with_pam" in
13073                 yes)
13074                         WINBIND_PAM_PROGS="\$(WINBIND_PAM_PROGS)"
13075                 ;;
13076         esac
13077 else
13078         echo "$ac_t""no$winbind_no_reason" 1>&6
13079
13080         WINBIND_TARGETS=""
13081         WINBIND_STARGETS=""
13082         WINBIND_LTARGETS=""
13083         WINBIND_PAM_PROGS=""
13084 fi
13085
13086 # Substitution time!
13087
13088
13089
13090
13091
13092
13093 #################################################
13094 # Check to see if we should use the included popt 
13095
13096 # Check whether --with-included-popt or --without-included-popt was given.
13097 if test "${with_included_popt+set}" = set; then
13098   withval="$with_included_popt"
13099    
13100   case "$withval" in
13101         yes)
13102                 INCLUDED_POPT=yes
13103                 ;;
13104         no)
13105                 INCLUDED_POPT=no
13106                 ;;
13107   esac 
13108 fi
13109
13110 if test x"$INCLUDED_POPT" != x"yes"; then
13111     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13112 echo "configure:13113: checking for poptGetContext in -lpopt" >&5
13113 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13114 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13115   echo $ac_n "(cached) $ac_c" 1>&6
13116 else
13117   ac_save_LIBS="$LIBS"
13118 LIBS="-lpopt  $LIBS"
13119 cat > conftest.$ac_ext <<EOF
13120 #line 13121 "configure"
13121 #include "confdefs.h"
13122 /* Override any gcc2 internal prototype to avoid an error.  */
13123 /* We use char because int might match the return type of a gcc2
13124     builtin and then its argument prototype would still apply.  */
13125 char poptGetContext();
13126
13127 int main() {
13128 poptGetContext()
13129 ; return 0; }
13130 EOF
13131 if { (eval echo configure:13132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13132   rm -rf conftest*
13133   eval "ac_cv_lib_$ac_lib_var=yes"
13134 else
13135   echo "configure: failed program was:" >&5
13136   cat conftest.$ac_ext >&5
13137   rm -rf conftest*
13138   eval "ac_cv_lib_$ac_lib_var=no"
13139 fi
13140 rm -f conftest*
13141 LIBS="$ac_save_LIBS"
13142
13143 fi
13144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13145   echo "$ac_t""yes" 1>&6
13146   INCLUDED_POPT=no
13147 else
13148   echo "$ac_t""no" 1>&6
13149 INCLUDED_POPT=yes
13150 fi
13151
13152 fi
13153
13154 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13155 echo "configure:13156: checking whether to use included popt" >&5
13156 if test x"$INCLUDED_POPT" = x"yes"; then
13157     echo "$ac_t""$srcdir/popt" 1>&6
13158     BUILD_POPT='$(POPT_OBJS)'
13159     FLAGS1="-I$srcdir/popt"
13160 else
13161     echo "$ac_t""no" 1>&6
13162     LIBS="$LIBS -lpopt"
13163 fi
13164
13165
13166
13167 #################################################
13168 # final configure stuff
13169
13170 echo "checking configure summary"
13171 if test "$cross_compiling" = yes; then
13172   :
13173 else
13174   cat > conftest.$ac_ext <<EOF
13175 #line 13176 "configure"
13176 #include "confdefs.h"
13177 #include "${srcdir-.}/tests/summary.c"
13178 EOF
13179 if { (eval echo configure:13180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13180 then
13181   echo "configure OK";
13182 else
13183   echo "configure: failed program was:" >&5
13184   cat conftest.$ac_ext >&5
13185   rm -fr conftest*
13186   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
13187 fi
13188 rm -fr conftest*
13189 fi
13190
13191
13192 builddir=`pwd`
13193
13194
13195 trap '' 1 2 15
13196 cat > confcache <<\EOF
13197 # This file is a shell script that caches the results of configure
13198 # tests run on this system so they can be shared between configure
13199 # scripts and configure runs.  It is not useful on other systems.
13200 # If it contains results you don't want to keep, you may remove or edit it.
13201 #
13202 # By default, configure uses ./config.cache as the cache file,
13203 # creating it if it does not exist already.  You can give configure
13204 # the --cache-file=FILE option to use a different cache file; that is
13205 # what configure does when it calls configure scripts in
13206 # subdirectories, so they share the cache.
13207 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13208 # config.status only pays attention to the cache file if you give it the
13209 # --recheck option to rerun configure.
13210 #
13211 EOF
13212 # The following way of writing the cache mishandles newlines in values,
13213 # but we know of no workaround that is simple, portable, and efficient.
13214 # So, don't put newlines in cache variables' values.
13215 # Ultrix sh set writes to stderr and can't be redirected directly,
13216 # and sets the high bit in the cache file unless we assign to the vars.
13217 (set) 2>&1 |
13218   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13219   *ac_space=\ *)
13220     # `set' does not quote correctly, so add quotes (double-quote substitution
13221     # turns \\\\ into \\, and sed turns \\ into \).
13222     sed -n \
13223       -e "s/'/'\\\\''/g" \
13224       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13225     ;;
13226   *)
13227     # `set' quotes correctly as required by POSIX, so do not add quotes.
13228     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13229     ;;
13230   esac >> confcache
13231 if cmp -s $cache_file confcache; then
13232   :
13233 else
13234   if test -w $cache_file; then
13235     echo "updating cache $cache_file"
13236     cat confcache > $cache_file
13237   else
13238     echo "not updating unwritable cache $cache_file"
13239   fi
13240 fi
13241 rm -f confcache
13242
13243 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13244
13245 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13246 # Let make expand exec_prefix.
13247 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13248
13249 # Any assignment to VPATH causes Sun make to only execute
13250 # the first set of double-colon rules, so remove it if not needed.
13251 # If there is a colon in the path, we need to keep it.
13252 if test "x$srcdir" = x.; then
13253   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13254 fi
13255
13256 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13257
13258 DEFS=-DHAVE_CONFIG_H
13259
13260 # Without the "./", some shells look in PATH for config.status.
13261 : ${CONFIG_STATUS=./config.status}
13262
13263 echo creating $CONFIG_STATUS
13264 rm -f $CONFIG_STATUS
13265 cat > $CONFIG_STATUS <<EOF
13266 #! /bin/sh
13267 # Generated automatically by configure.
13268 # Run this file to recreate the current configuration.
13269 # This directory was configured as follows,
13270 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13271 #
13272 # $0 $ac_configure_args
13273 #
13274 # Compiler output produced by configure, useful for debugging
13275 # configure, is in ./config.log if it exists.
13276
13277 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13278 for ac_option
13279 do
13280   case "\$ac_option" in
13281   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13282     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13283     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13284   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13285     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13286     exit 0 ;;
13287   -help | --help | --hel | --he | --h)
13288     echo "\$ac_cs_usage"; exit 0 ;;
13289   *) echo "\$ac_cs_usage"; exit 1 ;;
13290   esac
13291 done
13292
13293 ac_given_srcdir=$srcdir
13294 ac_given_INSTALL="$INSTALL"
13295
13296 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13297 EOF
13298 cat >> $CONFIG_STATUS <<EOF
13299
13300 # Protect against being on the right side of a sed subst in config.status.
13301 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13302  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13303 $ac_vpsub
13304 $extrasub
13305 s%@SHELL@%$SHELL%g
13306 s%@CFLAGS@%$CFLAGS%g
13307 s%@CPPFLAGS@%$CPPFLAGS%g
13308 s%@CXXFLAGS@%$CXXFLAGS%g
13309 s%@FFLAGS@%$FFLAGS%g
13310 s%@DEFS@%$DEFS%g
13311 s%@LDFLAGS@%$LDFLAGS%g
13312 s%@LIBS@%$LIBS%g
13313 s%@exec_prefix@%$exec_prefix%g
13314 s%@prefix@%$prefix%g
13315 s%@program_transform_name@%$program_transform_name%g
13316 s%@bindir@%$bindir%g
13317 s%@sbindir@%$sbindir%g
13318 s%@libexecdir@%$libexecdir%g
13319 s%@datadir@%$datadir%g
13320 s%@sysconfdir@%$sysconfdir%g
13321 s%@sharedstatedir@%$sharedstatedir%g
13322 s%@localstatedir@%$localstatedir%g
13323 s%@libdir@%$libdir%g
13324 s%@includedir@%$includedir%g
13325 s%@oldincludedir@%$oldincludedir%g
13326 s%@infodir@%$infodir%g
13327 s%@mandir@%$mandir%g
13328 s%@RUNPROG@%$RUNPROG%g
13329 s%@MPROGS@%$MPROGS%g
13330 s%@LDSHFLAGS@%$LDSHFLAGS%g
13331 s%@SHLD@%$SHLD%g
13332 s%@HOST_OS@%$HOST_OS%g
13333 s%@PAM_MOD@%$PAM_MOD%g
13334 s%@WRAP@%$WRAP%g
13335 s%@WRAP32@%$WRAP32%g
13336 s%@PICFLAG@%$PICFLAG%g
13337 s%@PICSUFFIX@%$PICSUFFIX%g
13338 s%@POBAD_CC@%$POBAD_CC%g
13339 s%@SHLIBEXT@%$SHLIBEXT%g
13340 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13341 s%@CC@%$CC%g
13342 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13343 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13344 s%@INSTALL_DATA@%$INSTALL_DATA%g
13345 s%@AWK@%$AWK%g
13346 s%@BROKEN_CC@%$BROKEN_CC%g
13347 s%@host@%$host%g
13348 s%@host_alias@%$host_alias%g
13349 s%@host_cpu@%$host_cpu%g
13350 s%@host_vendor@%$host_vendor%g
13351 s%@host_os@%$host_os%g
13352 s%@target@%$target%g
13353 s%@target_alias@%$target_alias%g
13354 s%@target_cpu@%$target_cpu%g
13355 s%@target_vendor@%$target_vendor%g
13356 s%@target_os@%$target_os%g
13357 s%@build@%$build%g
13358 s%@build_alias@%$build_alias%g
13359 s%@build_cpu@%$build_cpu%g
13360 s%@build_vendor@%$build_vendor%g
13361 s%@build_os@%$build_os%g
13362 s%@CPP@%$CPP%g
13363 s%@LIBOBJS@%$LIBOBJS%g
13364 s%@TERMLIBS@%$TERMLIBS%g
13365 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13366 s%@ROFF@%$ROFF%g
13367 s%@QUOTAOBJS@%$QUOTAOBJS%g
13368 s%@privatedir@%$privatedir%g
13369 s%@lockdir@%$lockdir%g
13370 s%@swatdir@%$swatdir%g
13371 s%@manlangs@%$manlangs%g
13372 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13373 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13374 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13375 s%@WINBIND_PAM_PROGS@%$WINBIND_PAM_PROGS%g
13376 s%@BUILD_POPT@%$BUILD_POPT%g
13377 s%@FLAGS1@%$FLAGS1%g
13378 s%@builddir@%$builddir%g
13379
13380 CEOF
13381 EOF
13382
13383 cat >> $CONFIG_STATUS <<\EOF
13384
13385 # Split the substitutions into bite-sized pieces for seds with
13386 # small command number limits, like on Digital OSF/1 and HP-UX.
13387 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13388 ac_file=1 # Number of current file.
13389 ac_beg=1 # First line for current file.
13390 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13391 ac_more_lines=:
13392 ac_sed_cmds=""
13393 while $ac_more_lines; do
13394   if test $ac_beg -gt 1; then
13395     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13396   else
13397     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13398   fi
13399   if test ! -s conftest.s$ac_file; then
13400     ac_more_lines=false
13401     rm -f conftest.s$ac_file
13402   else
13403     if test -z "$ac_sed_cmds"; then
13404       ac_sed_cmds="sed -f conftest.s$ac_file"
13405     else
13406       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13407     fi
13408     ac_file=`expr $ac_file + 1`
13409     ac_beg=$ac_end
13410     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13411   fi
13412 done
13413 if test -z "$ac_sed_cmds"; then
13414   ac_sed_cmds=cat
13415 fi
13416 EOF
13417
13418 cat >> $CONFIG_STATUS <<EOF
13419
13420 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13421 EOF
13422 cat >> $CONFIG_STATUS <<\EOF
13423 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13424   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13425   case "$ac_file" in
13426   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13427        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13428   *) ac_file_in="${ac_file}.in" ;;
13429   esac
13430
13431   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13432
13433   # Remove last slash and all that follows it.  Not all systems have dirname.
13434   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13435   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13436     # The file is in a subdirectory.
13437     test ! -d "$ac_dir" && mkdir "$ac_dir"
13438     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13439     # A "../" for each directory in $ac_dir_suffix.
13440     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13441   else
13442     ac_dir_suffix= ac_dots=
13443   fi
13444
13445   case "$ac_given_srcdir" in
13446   .)  srcdir=.
13447       if test -z "$ac_dots"; then top_srcdir=.
13448       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13449   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13450   *) # Relative path.
13451     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13452     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13453   esac
13454
13455   case "$ac_given_INSTALL" in
13456   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13457   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13458   esac
13459
13460   echo creating "$ac_file"
13461   rm -f "$ac_file"
13462   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13463   case "$ac_file" in
13464   *Makefile*) ac_comsub="1i\\
13465 # $configure_input" ;;
13466   *) ac_comsub= ;;
13467   esac
13468
13469   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13470   sed -e "$ac_comsub
13471 s%@configure_input@%$configure_input%g
13472 s%@srcdir@%$srcdir%g
13473 s%@top_srcdir@%$top_srcdir%g
13474 s%@INSTALL@%$INSTALL%g
13475 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13476 fi; done
13477 rm -f conftest.s*
13478
13479 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13480 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13481 #
13482 # ac_d sets the value in "#define NAME VALUE" lines.
13483 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13484 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13485 ac_dC='\3'
13486 ac_dD='%g'
13487 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13488 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13489 ac_uB='\([      ]\)%\1#\2define\3'
13490 ac_uC=' '
13491 ac_uD='\4%g'
13492 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13493 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13494 ac_eB='$%\1#\2define\3'
13495 ac_eC=' '
13496 ac_eD='%g'
13497
13498 if test "${CONFIG_HEADERS+set}" != set; then
13499 EOF
13500 cat >> $CONFIG_STATUS <<EOF
13501   CONFIG_HEADERS="include/config.h"
13502 EOF
13503 cat >> $CONFIG_STATUS <<\EOF
13504 fi
13505 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13506   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13507   case "$ac_file" in
13508   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13509        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13510   *) ac_file_in="${ac_file}.in" ;;
13511   esac
13512
13513   echo creating $ac_file
13514
13515   rm -f conftest.frag conftest.in conftest.out
13516   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13517   cat $ac_file_inputs > conftest.in
13518
13519 EOF
13520
13521 # Transform confdefs.h into a sed script conftest.vals that substitutes
13522 # the proper values into config.h.in to produce config.h.  And first:
13523 # Protect against being on the right side of a sed subst in config.status.
13524 # Protect against being in an unquoted here document in config.status.
13525 rm -f conftest.vals
13526 cat > conftest.hdr <<\EOF
13527 s/[\\&%]/\\&/g
13528 s%[\\$`]%\\&%g
13529 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13530 s%ac_d%ac_u%gp
13531 s%ac_u%ac_e%gp
13532 EOF
13533 sed -n -f conftest.hdr confdefs.h > conftest.vals
13534 rm -f conftest.hdr
13535
13536 # This sed command replaces #undef with comments.  This is necessary, for
13537 # example, in the case of _POSIX_SOURCE, which is predefined and required
13538 # on some systems where configure will not decide to define it.
13539 cat >> conftest.vals <<\EOF
13540 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13541 EOF
13542
13543 # Break up conftest.vals because some shells have a limit on
13544 # the size of here documents, and old seds have small limits too.
13545
13546 rm -f conftest.tail
13547 while :
13548 do
13549   ac_lines=`grep -c . conftest.vals`
13550   # grep -c gives empty output for an empty file on some AIX systems.
13551   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13552   # Write a limited-size here document to conftest.frag.
13553   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13554   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13555   echo 'CEOF
13556   sed -f conftest.frag conftest.in > conftest.out
13557   rm -f conftest.in
13558   mv conftest.out conftest.in
13559 ' >> $CONFIG_STATUS
13560   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13561   rm -f conftest.vals
13562   mv conftest.tail conftest.vals
13563 done
13564 rm -f conftest.vals
13565
13566 cat >> $CONFIG_STATUS <<\EOF
13567   rm -f conftest.frag conftest.h
13568   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13569   cat conftest.in >> conftest.h
13570   rm -f conftest.in
13571   if cmp -s $ac_file conftest.h 2>/dev/null; then
13572     echo "$ac_file is unchanged"
13573     rm -f conftest.h
13574   else
13575     # Remove last slash and all that follows it.  Not all systems have dirname.
13576       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13577       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13578       # The file is in a subdirectory.
13579       test ! -d "$ac_dir" && mkdir "$ac_dir"
13580     fi
13581     rm -f $ac_file
13582     mv conftest.h $ac_file
13583   fi
13584 fi; done
13585
13586 EOF
13587 cat >> $CONFIG_STATUS <<EOF
13588
13589 EOF
13590 cat >> $CONFIG_STATUS <<\EOF
13591
13592 exit 0
13593 EOF
13594 chmod +x $CONFIG_STATUS
13595 rm -fr confdefs* $ac_clean_files
13596 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13597