fixed finding the resolv library
[sfrench/samba-autobuild/.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 support (default=no) "
27 ac_help="$ac_help
28   --with-dce-dfs          Include DCE/DFS support (default=no)"
29 ac_help="$ac_help
30   --with-krb4=base-dir    Include Kerberos IV support (default=no)"
31 ac_help="$ac_help
32   --with-krb5=base-dir    Include Kerberos 5 support (default=no)"
33 ac_help="$ac_help
34   --with-automount        Include AUTOMOUNT support (default=no)"
35 ac_help="$ac_help
36   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
37 ac_help="$ac_help
38   --with-pam              Include PAM password database support (default=no)"
39 ac_help="$ac_help
40   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
41 ac_help="$ac_help
42   --with-tdbsam           Include experimental TDB SAM support (default=no)"
43 ac_help="$ac_help
44   --with-ldapsam          Include experimental LDAP SAM support (default=no)"
45 ac_help="$ac_help
46   --with-nisplussam       Include NISPLUS SAM support (default=no)"
47 ac_help="$ac_help
48   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
49 ac_help="$ac_help
50   --with-ssl              Include SSL support (default=no)
51   --with-sslinc=DIR          Where the SSL includes are (defaults to /usr/local/ssl/include)
52   --with-ssllib=DIR          Where the SSL libraries are (defaults to /usr/local/ssl/lib)"
53 ac_help="$ac_help
54   --with-syslog           Include experimental SYSLOG support (default=no)"
55 ac_help="$ac_help
56   --with-profiling-data   Include gathering source code profile information (default=no)"
57 ac_help="$ac_help
58   --with-quotas           Include experimental disk-quota support (default=no)"
59 ac_help="$ac_help
60   --with-utmp             Include experimental utmp accounting (default=no)"
61 ac_help="$ac_help
62   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
63 ac_help="$ac_help
64   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
65 ac_help="$ac_help
66   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
67 ac_help="$ac_help
68   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
69 ac_help="$ac_help
70   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
71 ac_help="$ac_help
72   --with-acl-support      Include ACL support (default=no)"
73 ac_help="$ac_help
74   --with-winbind          Build winbind (default, if supported by OS)"
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
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 echo $ac_n "checking size of int""... $ac_c" 1>&6
2516 echo "configure:2517: checking size of int" >&5
2517 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2518   echo $ac_n "(cached) $ac_c" 1>&6
2519 else
2520   if test "$cross_compiling" = yes; then
2521   ac_cv_sizeof_int=cross
2522 else
2523   cat > conftest.$ac_ext <<EOF
2524 #line 2525 "configure"
2525 #include "confdefs.h"
2526 #include <stdio.h>
2527 #include <sys/types.h>
2528 main()
2529 {
2530   FILE *f=fopen("conftestval", "w");
2531   if (!f) exit(1);
2532   fprintf(f, "%d\n", sizeof(int));
2533   exit(0);
2534 }
2535 EOF
2536 if { (eval echo configure:2537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2537 then
2538   ac_cv_sizeof_int=`cat conftestval`
2539 else
2540   echo "configure: failed program was:" >&5
2541   cat conftest.$ac_ext >&5
2542   rm -fr conftest*
2543   ac_cv_sizeof_int=0
2544 fi
2545 rm -fr conftest*
2546 fi
2547
2548 fi
2549 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2550 cat >> confdefs.h <<EOF
2551 #define SIZEOF_INT $ac_cv_sizeof_int
2552 EOF
2553
2554
2555 echo $ac_n "checking size of long""... $ac_c" 1>&6
2556 echo "configure:2557: checking size of long" >&5
2557 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2558   echo $ac_n "(cached) $ac_c" 1>&6
2559 else
2560   if test "$cross_compiling" = yes; then
2561   ac_cv_sizeof_long=cross
2562 else
2563   cat > conftest.$ac_ext <<EOF
2564 #line 2565 "configure"
2565 #include "confdefs.h"
2566 #include <stdio.h>
2567 #include <sys/types.h>
2568 main()
2569 {
2570   FILE *f=fopen("conftestval", "w");
2571   if (!f) exit(1);
2572   fprintf(f, "%d\n", sizeof(long));
2573   exit(0);
2574 }
2575 EOF
2576 if { (eval echo configure:2577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2577 then
2578   ac_cv_sizeof_long=`cat conftestval`
2579 else
2580   echo "configure: failed program was:" >&5
2581   cat conftest.$ac_ext >&5
2582   rm -fr conftest*
2583   ac_cv_sizeof_long=0
2584 fi
2585 rm -fr conftest*
2586 fi
2587
2588 fi
2589 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2590 cat >> confdefs.h <<EOF
2591 #define SIZEOF_LONG $ac_cv_sizeof_long
2592 EOF
2593
2594
2595 echo $ac_n "checking size of short""... $ac_c" 1>&6
2596 echo "configure:2597: checking size of short" >&5
2597 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2598   echo $ac_n "(cached) $ac_c" 1>&6
2599 else
2600   if test "$cross_compiling" = yes; then
2601   ac_cv_sizeof_short=cross
2602 else
2603   cat > conftest.$ac_ext <<EOF
2604 #line 2605 "configure"
2605 #include "confdefs.h"
2606 #include <stdio.h>
2607 #include <sys/types.h>
2608 main()
2609 {
2610   FILE *f=fopen("conftestval", "w");
2611   if (!f) exit(1);
2612   fprintf(f, "%d\n", sizeof(short));
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_short=`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_short=0
2624 fi
2625 rm -fr conftest*
2626 fi
2627
2628 fi
2629 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2630 cat >> confdefs.h <<EOF
2631 #define SIZEOF_SHORT $ac_cv_sizeof_short
2632 EOF
2633
2634
2635
2636 echo $ac_n "checking for working const""... $ac_c" 1>&6
2637 echo "configure:2638: checking for working const" >&5
2638 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2639   echo $ac_n "(cached) $ac_c" 1>&6
2640 else
2641   cat > conftest.$ac_ext <<EOF
2642 #line 2643 "configure"
2643 #include "confdefs.h"
2644
2645 int main() {
2646
2647 /* Ultrix mips cc rejects this.  */
2648 typedef int charset[2]; const charset x;
2649 /* SunOS 4.1.1 cc rejects this.  */
2650 char const *const *ccp;
2651 char **p;
2652 /* NEC SVR4.0.2 mips cc rejects this.  */
2653 struct point {int x, y;};
2654 static struct point const zero = {0,0};
2655 /* AIX XL C 1.02.0.0 rejects this.
2656    It does not let you subtract one const X* pointer from another in an arm
2657    of an if-expression whose if-part is not a constant expression */
2658 const char *g = "string";
2659 ccp = &g + (g ? g-g : 0);
2660 /* HPUX 7.0 cc rejects these. */
2661 ++ccp;
2662 p = (char**) ccp;
2663 ccp = (char const *const *) p;
2664 { /* SCO 3.2v4 cc rejects this.  */
2665   char *t;
2666   char const *s = 0 ? (char *) 0 : (char const *) 0;
2667
2668   *t++ = 0;
2669 }
2670 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2671   int x[] = {25, 17};
2672   const int *foo = &x[0];
2673   ++foo;
2674 }
2675 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2676   typedef const int *iptr;
2677   iptr p = 0;
2678   ++p;
2679 }
2680 { /* AIX XL C 1.02.0.0 rejects this saying
2681      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2682   struct s { int j; const int *ap[3]; };
2683   struct s *b; b->j = 5;
2684 }
2685 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2686   const int foo = 10;
2687 }
2688
2689 ; return 0; }
2690 EOF
2691 if { (eval echo configure:2692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2692   rm -rf conftest*
2693   ac_cv_c_const=yes
2694 else
2695   echo "configure: failed program was:" >&5
2696   cat conftest.$ac_ext >&5
2697   rm -rf conftest*
2698   ac_cv_c_const=no
2699 fi
2700 rm -f conftest*
2701 fi
2702
2703 echo "$ac_t""$ac_cv_c_const" 1>&6
2704 if test $ac_cv_c_const = no; then
2705   cat >> confdefs.h <<\EOF
2706 #define const 
2707 EOF
2708
2709 fi
2710
2711 echo $ac_n "checking for inline""... $ac_c" 1>&6
2712 echo "configure:2713: checking for inline" >&5
2713 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2714   echo $ac_n "(cached) $ac_c" 1>&6
2715 else
2716   ac_cv_c_inline=no
2717 for ac_kw in inline __inline__ __inline; do
2718   cat > conftest.$ac_ext <<EOF
2719 #line 2720 "configure"
2720 #include "confdefs.h"
2721
2722 int main() {
2723 } $ac_kw foo() {
2724 ; return 0; }
2725 EOF
2726 if { (eval echo configure:2727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2727   rm -rf conftest*
2728   ac_cv_c_inline=$ac_kw; break
2729 else
2730   echo "configure: failed program was:" >&5
2731   cat conftest.$ac_ext >&5
2732 fi
2733 rm -f conftest*
2734 done
2735
2736 fi
2737
2738 echo "$ac_t""$ac_cv_c_inline" 1>&6
2739 case "$ac_cv_c_inline" in
2740   inline | yes) ;;
2741   no) cat >> confdefs.h <<\EOF
2742 #define inline 
2743 EOF
2744  ;;
2745   *)  cat >> confdefs.h <<EOF
2746 #define inline $ac_cv_c_inline
2747 EOF
2748  ;;
2749 esac
2750
2751 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2752 echo "configure:2753: checking whether byte ordering is bigendian" >&5
2753 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2754   echo $ac_n "(cached) $ac_c" 1>&6
2755 else
2756   ac_cv_c_bigendian=unknown
2757 # See if sys/param.h defines the BYTE_ORDER macro.
2758 cat > conftest.$ac_ext <<EOF
2759 #line 2760 "configure"
2760 #include "confdefs.h"
2761 #include <sys/types.h>
2762 #include <sys/param.h>
2763 int main() {
2764
2765 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2766  bogus endian macros
2767 #endif
2768 ; return 0; }
2769 EOF
2770 if { (eval echo configure:2771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2771   rm -rf conftest*
2772   # It does; now see whether it defined to BIG_ENDIAN or not.
2773 cat > conftest.$ac_ext <<EOF
2774 #line 2775 "configure"
2775 #include "confdefs.h"
2776 #include <sys/types.h>
2777 #include <sys/param.h>
2778 int main() {
2779
2780 #if BYTE_ORDER != BIG_ENDIAN
2781  not big endian
2782 #endif
2783 ; return 0; }
2784 EOF
2785 if { (eval echo configure:2786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2786   rm -rf conftest*
2787   ac_cv_c_bigendian=yes
2788 else
2789   echo "configure: failed program was:" >&5
2790   cat conftest.$ac_ext >&5
2791   rm -rf conftest*
2792   ac_cv_c_bigendian=no
2793 fi
2794 rm -f conftest*
2795 else
2796   echo "configure: failed program was:" >&5
2797   cat conftest.$ac_ext >&5
2798 fi
2799 rm -f conftest*
2800 if test $ac_cv_c_bigendian = unknown; then
2801 if test "$cross_compiling" = yes; then
2802     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2803 else
2804   cat > conftest.$ac_ext <<EOF
2805 #line 2806 "configure"
2806 #include "confdefs.h"
2807 main () {
2808   /* Are we little or big endian?  From Harbison&Steele.  */
2809   union
2810   {
2811     long l;
2812     char c[sizeof (long)];
2813   } u;
2814   u.l = 1;
2815   exit (u.c[sizeof (long) - 1] == 1);
2816 }
2817 EOF
2818 if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2819 then
2820   ac_cv_c_bigendian=no
2821 else
2822   echo "configure: failed program was:" >&5
2823   cat conftest.$ac_ext >&5
2824   rm -fr conftest*
2825   ac_cv_c_bigendian=yes
2826 fi
2827 rm -fr conftest*
2828 fi
2829
2830 fi
2831 fi
2832
2833 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2834 if test $ac_cv_c_bigendian = yes; then
2835   cat >> confdefs.h <<\EOF
2836 #define WORDS_BIGENDIAN 1
2837 EOF
2838
2839 fi
2840
2841 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2842 echo "configure:2843: checking whether char is unsigned" >&5
2843 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2844   echo $ac_n "(cached) $ac_c" 1>&6
2845 else
2846   if test "$GCC" = yes; then
2847   # GCC predefines this symbol on systems where it applies.
2848 cat > conftest.$ac_ext <<EOF
2849 #line 2850 "configure"
2850 #include "confdefs.h"
2851 #ifdef __CHAR_UNSIGNED__
2852   yes
2853 #endif
2854
2855 EOF
2856 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2857   egrep "yes" >/dev/null 2>&1; then
2858   rm -rf conftest*
2859   ac_cv_c_char_unsigned=yes
2860 else
2861   rm -rf conftest*
2862   ac_cv_c_char_unsigned=no
2863 fi
2864 rm -f conftest*
2865
2866 else
2867 if test "$cross_compiling" = yes; then
2868     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2869 else
2870   cat > conftest.$ac_ext <<EOF
2871 #line 2872 "configure"
2872 #include "confdefs.h"
2873 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2874 #if !defined(__STDC__) || __STDC__ != 1
2875 #define volatile
2876 #endif
2877 main() {
2878   volatile char c = 255; exit(c < 0);
2879 }
2880 EOF
2881 if { (eval echo configure:2882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2882 then
2883   ac_cv_c_char_unsigned=yes
2884 else
2885   echo "configure: failed program was:" >&5
2886   cat conftest.$ac_ext >&5
2887   rm -fr conftest*
2888   ac_cv_c_char_unsigned=no
2889 fi
2890 rm -fr conftest*
2891 fi
2892
2893 fi
2894 fi
2895
2896 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2897 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2898   cat >> confdefs.h <<\EOF
2899 #define __CHAR_UNSIGNED__ 1
2900 EOF
2901
2902 fi
2903
2904
2905 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2906 echo "configure:2907: checking return type of signal handlers" >&5
2907 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2908   echo $ac_n "(cached) $ac_c" 1>&6
2909 else
2910   cat > conftest.$ac_ext <<EOF
2911 #line 2912 "configure"
2912 #include "confdefs.h"
2913 #include <sys/types.h>
2914 #include <signal.h>
2915 #ifdef signal
2916 #undef signal
2917 #endif
2918 #ifdef __cplusplus
2919 extern "C" void (*signal (int, void (*)(int)))(int);
2920 #else
2921 void (*signal ()) ();
2922 #endif
2923
2924 int main() {
2925 int i;
2926 ; return 0; }
2927 EOF
2928 if { (eval echo configure:2929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2929   rm -rf conftest*
2930   ac_cv_type_signal=void
2931 else
2932   echo "configure: failed program was:" >&5
2933   cat conftest.$ac_ext >&5
2934   rm -rf conftest*
2935   ac_cv_type_signal=int
2936 fi
2937 rm -f conftest*
2938 fi
2939
2940 echo "$ac_t""$ac_cv_type_signal" 1>&6
2941 cat >> confdefs.h <<EOF
2942 #define RETSIGTYPE $ac_cv_type_signal
2943 EOF
2944
2945
2946 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2947 echo "configure:2948: checking for uid_t in sys/types.h" >&5
2948 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2949   echo $ac_n "(cached) $ac_c" 1>&6
2950 else
2951   cat > conftest.$ac_ext <<EOF
2952 #line 2953 "configure"
2953 #include "confdefs.h"
2954 #include <sys/types.h>
2955 EOF
2956 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2957   egrep "uid_t" >/dev/null 2>&1; then
2958   rm -rf conftest*
2959   ac_cv_type_uid_t=yes
2960 else
2961   rm -rf conftest*
2962   ac_cv_type_uid_t=no
2963 fi
2964 rm -f conftest*
2965
2966 fi
2967
2968 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2969 if test $ac_cv_type_uid_t = no; then
2970   cat >> confdefs.h <<\EOF
2971 #define uid_t int
2972 EOF
2973
2974   cat >> confdefs.h <<\EOF
2975 #define gid_t int
2976 EOF
2977
2978 fi
2979
2980 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2981 echo "configure:2982: checking for mode_t" >&5
2982 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2983   echo $ac_n "(cached) $ac_c" 1>&6
2984 else
2985   cat > conftest.$ac_ext <<EOF
2986 #line 2987 "configure"
2987 #include "confdefs.h"
2988 #include <sys/types.h>
2989 #if STDC_HEADERS
2990 #include <stdlib.h>
2991 #include <stddef.h>
2992 #endif
2993 EOF
2994 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2995   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2996   rm -rf conftest*
2997   ac_cv_type_mode_t=yes
2998 else
2999   rm -rf conftest*
3000   ac_cv_type_mode_t=no
3001 fi
3002 rm -f conftest*
3003
3004 fi
3005 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3006 if test $ac_cv_type_mode_t = no; then
3007   cat >> confdefs.h <<\EOF
3008 #define mode_t int
3009 EOF
3010
3011 fi
3012
3013 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3014 echo "configure:3015: checking for off_t" >&5
3015 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3016   echo $ac_n "(cached) $ac_c" 1>&6
3017 else
3018   cat > conftest.$ac_ext <<EOF
3019 #line 3020 "configure"
3020 #include "confdefs.h"
3021 #include <sys/types.h>
3022 #if STDC_HEADERS
3023 #include <stdlib.h>
3024 #include <stddef.h>
3025 #endif
3026 EOF
3027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3028   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3029   rm -rf conftest*
3030   ac_cv_type_off_t=yes
3031 else
3032   rm -rf conftest*
3033   ac_cv_type_off_t=no
3034 fi
3035 rm -f conftest*
3036
3037 fi
3038 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3039 if test $ac_cv_type_off_t = no; then
3040   cat >> confdefs.h <<\EOF
3041 #define off_t long
3042 EOF
3043
3044 fi
3045
3046 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3047 echo "configure:3048: checking for size_t" >&5
3048 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3049   echo $ac_n "(cached) $ac_c" 1>&6
3050 else
3051   cat > conftest.$ac_ext <<EOF
3052 #line 3053 "configure"
3053 #include "confdefs.h"
3054 #include <sys/types.h>
3055 #if STDC_HEADERS
3056 #include <stdlib.h>
3057 #include <stddef.h>
3058 #endif
3059 EOF
3060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3061   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3062   rm -rf conftest*
3063   ac_cv_type_size_t=yes
3064 else
3065   rm -rf conftest*
3066   ac_cv_type_size_t=no
3067 fi
3068 rm -f conftest*
3069
3070 fi
3071 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3072 if test $ac_cv_type_size_t = no; then
3073   cat >> confdefs.h <<\EOF
3074 #define size_t unsigned
3075 EOF
3076
3077 fi
3078
3079 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3080 echo "configure:3081: checking for pid_t" >&5
3081 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   cat > conftest.$ac_ext <<EOF
3085 #line 3086 "configure"
3086 #include "confdefs.h"
3087 #include <sys/types.h>
3088 #if STDC_HEADERS
3089 #include <stdlib.h>
3090 #include <stddef.h>
3091 #endif
3092 EOF
3093 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3094   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3095   rm -rf conftest*
3096   ac_cv_type_pid_t=yes
3097 else
3098   rm -rf conftest*
3099   ac_cv_type_pid_t=no
3100 fi
3101 rm -f conftest*
3102
3103 fi
3104 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3105 if test $ac_cv_type_pid_t = no; then
3106   cat >> confdefs.h <<\EOF
3107 #define pid_t int
3108 EOF
3109
3110 fi
3111
3112 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3113 echo "configure:3114: checking for st_rdev in struct stat" >&5
3114 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3115   echo $ac_n "(cached) $ac_c" 1>&6
3116 else
3117   cat > conftest.$ac_ext <<EOF
3118 #line 3119 "configure"
3119 #include "confdefs.h"
3120 #include <sys/types.h>
3121 #include <sys/stat.h>
3122 int main() {
3123 struct stat s; s.st_rdev;
3124 ; return 0; }
3125 EOF
3126 if { (eval echo configure:3127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3127   rm -rf conftest*
3128   ac_cv_struct_st_rdev=yes
3129 else
3130   echo "configure: failed program was:" >&5
3131   cat conftest.$ac_ext >&5
3132   rm -rf conftest*
3133   ac_cv_struct_st_rdev=no
3134 fi
3135 rm -f conftest*
3136 fi
3137
3138 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3139 if test $ac_cv_struct_st_rdev = yes; then
3140   cat >> confdefs.h <<\EOF
3141 #define HAVE_ST_RDEV 1
3142 EOF
3143
3144 fi
3145
3146 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3147 echo "configure:3148: checking for d_off in dirent" >&5
3148 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3149   echo $ac_n "(cached) $ac_c" 1>&6
3150 else
3151   cat > conftest.$ac_ext <<EOF
3152 #line 3153 "configure"
3153 #include "confdefs.h"
3154
3155 #include <unistd.h>
3156 #include <sys/types.h>
3157 #include <dirent.h>
3158 int main() {
3159 struct dirent d; d.d_off;
3160 ; return 0; }
3161 EOF
3162 if { (eval echo configure:3163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3163   rm -rf conftest*
3164   ac_cv_dirent_d_off=yes
3165 else
3166   echo "configure: failed program was:" >&5
3167   cat conftest.$ac_ext >&5
3168   rm -rf conftest*
3169   ac_cv_dirent_d_off=no
3170 fi
3171 rm -f conftest*
3172 fi
3173
3174 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3175 if test $ac_cv_dirent_d_off = yes; then
3176   cat >> confdefs.h <<\EOF
3177 #define HAVE_DIRENT_D_OFF 1
3178 EOF
3179
3180 fi
3181
3182 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3183 echo "configure:3184: checking for ino_t" >&5
3184 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3185   echo $ac_n "(cached) $ac_c" 1>&6
3186 else
3187   cat > conftest.$ac_ext <<EOF
3188 #line 3189 "configure"
3189 #include "confdefs.h"
3190 #include <sys/types.h>
3191 #if STDC_HEADERS
3192 #include <stdlib.h>
3193 #include <stddef.h>
3194 #endif
3195 EOF
3196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3197   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3198   rm -rf conftest*
3199   ac_cv_type_ino_t=yes
3200 else
3201   rm -rf conftest*
3202   ac_cv_type_ino_t=no
3203 fi
3204 rm -f conftest*
3205
3206 fi
3207 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3208 if test $ac_cv_type_ino_t = no; then
3209   cat >> confdefs.h <<\EOF
3210 #define ino_t unsigned
3211 EOF
3212
3213 fi
3214
3215 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3216 echo "configure:3217: checking for loff_t" >&5
3217 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3218   echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220   cat > conftest.$ac_ext <<EOF
3221 #line 3222 "configure"
3222 #include "confdefs.h"
3223 #include <sys/types.h>
3224 #if STDC_HEADERS
3225 #include <stdlib.h>
3226 #include <stddef.h>
3227 #endif
3228 EOF
3229 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3230   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3231   rm -rf conftest*
3232   ac_cv_type_loff_t=yes
3233 else
3234   rm -rf conftest*
3235   ac_cv_type_loff_t=no
3236 fi
3237 rm -f conftest*
3238
3239 fi
3240 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3241 if test $ac_cv_type_loff_t = no; then
3242   cat >> confdefs.h <<\EOF
3243 #define loff_t off_t
3244 EOF
3245
3246 fi
3247
3248 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3249 echo "configure:3250: checking for offset_t" >&5
3250 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3251   echo $ac_n "(cached) $ac_c" 1>&6
3252 else
3253   cat > conftest.$ac_ext <<EOF
3254 #line 3255 "configure"
3255 #include "confdefs.h"
3256 #include <sys/types.h>
3257 #if STDC_HEADERS
3258 #include <stdlib.h>
3259 #include <stddef.h>
3260 #endif
3261 EOF
3262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3263   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3264   rm -rf conftest*
3265   ac_cv_type_offset_t=yes
3266 else
3267   rm -rf conftest*
3268   ac_cv_type_offset_t=no
3269 fi
3270 rm -f conftest*
3271
3272 fi
3273 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3274 if test $ac_cv_type_offset_t = no; then
3275   cat >> confdefs.h <<\EOF
3276 #define offset_t loff_t
3277 EOF
3278
3279 fi
3280
3281 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3282 echo "configure:3283: checking for ssize_t" >&5
3283 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3284   echo $ac_n "(cached) $ac_c" 1>&6
3285 else
3286   cat > conftest.$ac_ext <<EOF
3287 #line 3288 "configure"
3288 #include "confdefs.h"
3289 #include <sys/types.h>
3290 #if STDC_HEADERS
3291 #include <stdlib.h>
3292 #include <stddef.h>
3293 #endif
3294 EOF
3295 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3296   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3297   rm -rf conftest*
3298   ac_cv_type_ssize_t=yes
3299 else
3300   rm -rf conftest*
3301   ac_cv_type_ssize_t=no
3302 fi
3303 rm -f conftest*
3304
3305 fi
3306 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3307 if test $ac_cv_type_ssize_t = no; then
3308   cat >> confdefs.h <<\EOF
3309 #define ssize_t int
3310 EOF
3311
3312 fi
3313
3314 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3315 echo "configure:3316: checking for wchar_t" >&5
3316 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3317   echo $ac_n "(cached) $ac_c" 1>&6
3318 else
3319   cat > conftest.$ac_ext <<EOF
3320 #line 3321 "configure"
3321 #include "confdefs.h"
3322 #include <sys/types.h>
3323 #if STDC_HEADERS
3324 #include <stdlib.h>
3325 #include <stddef.h>
3326 #endif
3327 EOF
3328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3329   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3330   rm -rf conftest*
3331   ac_cv_type_wchar_t=yes
3332 else
3333   rm -rf conftest*
3334   ac_cv_type_wchar_t=no
3335 fi
3336 rm -f conftest*
3337
3338 fi
3339 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3340 if test $ac_cv_type_wchar_t = no; then
3341   cat >> confdefs.h <<\EOF
3342 #define wchar_t unsigned short
3343 EOF
3344
3345 fi
3346
3347
3348 ############################################
3349 # for cups support we need libcups, and a handful of header files
3350
3351 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3352 echo "configure:3353: checking for httpConnect in -lcups" >&5
3353 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3354 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3355   echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357   ac_save_LIBS="$LIBS"
3358 LIBS="-lcups  $LIBS"
3359 cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362 /* Override any gcc2 internal prototype to avoid an error.  */
3363 /* We use char because int might match the return type of a gcc2
3364     builtin and then its argument prototype would still apply.  */
3365 char httpConnect();
3366
3367 int main() {
3368 httpConnect()
3369 ; return 0; }
3370 EOF
3371 if { (eval echo configure:3372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3372   rm -rf conftest*
3373   eval "ac_cv_lib_$ac_lib_var=yes"
3374 else
3375   echo "configure: failed program was:" >&5
3376   cat conftest.$ac_ext >&5
3377   rm -rf conftest*
3378   eval "ac_cv_lib_$ac_lib_var=no"
3379 fi
3380 rm -f conftest*
3381 LIBS="$ac_save_LIBS"
3382
3383 fi
3384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3385   echo "$ac_t""yes" 1>&6
3386     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3387     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3388   cat >> confdefs.h <<EOF
3389 #define $ac_tr_lib 1
3390 EOF
3391
3392   LIBS="-lcups $LIBS"
3393
3394 else
3395   echo "$ac_t""no" 1>&6
3396 fi
3397
3398
3399 # I wonder if there is a nicer way of doing this?
3400
3401 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3402         for ac_hdr in cups/cups.h cups/language.h
3403 do
3404 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3405 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3406 echo "configure:3407: checking for $ac_hdr" >&5
3407 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <$ac_hdr>
3414 EOF
3415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3416 { (eval echo configure:3417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3418 if test -z "$ac_err"; then
3419   rm -rf conftest*
3420   eval "ac_cv_header_$ac_safe=yes"
3421 else
3422   echo "$ac_err" >&5
3423   echo "configure: failed program was:" >&5
3424   cat conftest.$ac_ext >&5
3425   rm -rf conftest*
3426   eval "ac_cv_header_$ac_safe=no"
3427 fi
3428 rm -f conftest*
3429 fi
3430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3431   echo "$ac_t""yes" 1>&6
3432     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3433   cat >> confdefs.h <<EOF
3434 #define $ac_tr_hdr 1
3435 EOF
3436  
3437 else
3438   echo "$ac_t""no" 1>&6
3439 fi
3440 done
3441
3442         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3443                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3444                         cat >> confdefs.h <<\EOF
3445 #define HAVE_CUPS 1
3446 EOF
3447
3448                 fi
3449         fi
3450 fi
3451
3452 ############################################
3453 # we need libdl for PAM and the new VFS code
3454 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3455 echo "configure:3456: checking for dlopen in -ldl" >&5
3456 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3457 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3458   echo $ac_n "(cached) $ac_c" 1>&6
3459 else
3460   ac_save_LIBS="$LIBS"
3461 LIBS="-ldl  $LIBS"
3462 cat > conftest.$ac_ext <<EOF
3463 #line 3464 "configure"
3464 #include "confdefs.h"
3465 /* Override any gcc2 internal prototype to avoid an error.  */
3466 /* We use char because int might match the return type of a gcc2
3467     builtin and then its argument prototype would still apply.  */
3468 char dlopen();
3469
3470 int main() {
3471 dlopen()
3472 ; return 0; }
3473 EOF
3474 if { (eval echo configure:3475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3475   rm -rf conftest*
3476   eval "ac_cv_lib_$ac_lib_var=yes"
3477 else
3478   echo "configure: failed program was:" >&5
3479   cat conftest.$ac_ext >&5
3480   rm -rf conftest*
3481   eval "ac_cv_lib_$ac_lib_var=no"
3482 fi
3483 rm -f conftest*
3484 LIBS="$ac_save_LIBS"
3485
3486 fi
3487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3488   echo "$ac_t""yes" 1>&6
3489   LIBS="$LIBS -ldl";
3490         cat >> confdefs.h <<\EOF
3491 #define HAVE_LIBDL 1
3492 EOF
3493
3494 else
3495   echo "$ac_t""no" 1>&6
3496 fi
3497
3498
3499 ############################################
3500 # check if the compiler can do immediate structures
3501 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3502 echo "configure:3503: checking for immediate structures" >&5
3503 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3504   echo $ac_n "(cached) $ac_c" 1>&6
3505 else
3506   
3507     cat > conftest.$ac_ext <<EOF
3508 #line 3509 "configure"
3509 #include "confdefs.h"
3510
3511 #include <stdio.h>
3512 int main() {
3513
3514    #define X_FOOBAR(x) ((FOOBAR) { x })
3515    typedef struct {unsigned x;} FOOBAR;
3516    FOOBAR f = X_FOOBAR(1);   
3517
3518 ; return 0; }
3519 EOF
3520 if { (eval echo configure:3521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3521   rm -rf conftest*
3522   samba_cv_immediate_structures=yes
3523 else
3524   echo "configure: failed program was:" >&5
3525   cat conftest.$ac_ext >&5
3526   rm -rf conftest*
3527   samba_cv_immediate_structures=no
3528 fi
3529 rm -f conftest*
3530 fi
3531
3532 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3533 if test x"$samba_cv_immediate_structures" = x"yes"; then
3534    cat >> confdefs.h <<\EOF
3535 #define HAVE_IMMEDIATE_STRUCTURES 1
3536 EOF
3537
3538 fi
3539
3540 ############################################
3541 # check for unix domain sockets
3542 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3543 echo "configure:3544: checking for unix domain sockets" >&5
3544 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3545   echo $ac_n "(cached) $ac_c" 1>&6
3546 else
3547   
3548     cat > conftest.$ac_ext <<EOF
3549 #line 3550 "configure"
3550 #include "confdefs.h"
3551
3552 #include <sys/types.h>
3553 #include <stdlib.h>
3554 #include <stddef.h>
3555 #include <sys/socket.h>
3556 #include <sys/un.h>
3557 int main() {
3558
3559   struct sockaddr_un sunaddr; 
3560   sunaddr.sun_family = AF_UNIX;
3561
3562 ; return 0; }
3563 EOF
3564 if { (eval echo configure:3565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3565   rm -rf conftest*
3566   samba_cv_unixsocket=yes
3567 else
3568   echo "configure: failed program was:" >&5
3569   cat conftest.$ac_ext >&5
3570   rm -rf conftest*
3571   samba_cv_unixsocket=no
3572 fi
3573 rm -f conftest*
3574 fi
3575
3576 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3577 if test x"$samba_cv_unixsocket" = x"yes"; then
3578    cat >> confdefs.h <<\EOF
3579 #define HAVE_UNIXSOCKET 1
3580 EOF
3581
3582 fi
3583
3584
3585 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3586 echo "configure:3587: checking for socklen_t type" >&5
3587 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3588   echo $ac_n "(cached) $ac_c" 1>&6
3589 else
3590   
3591     cat > conftest.$ac_ext <<EOF
3592 #line 3593 "configure"
3593 #include "confdefs.h"
3594
3595 #include <sys/types.h>
3596 #if STDC_HEADERS
3597 #include <stdlib.h>
3598 #include <stddef.h>
3599 #endif
3600 #include <sys/socket.h>
3601 int main() {
3602 socklen_t i = 0
3603 ; return 0; }
3604 EOF
3605 if { (eval echo configure:3606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3606   rm -rf conftest*
3607   samba_cv_socklen_t=yes
3608 else
3609   echo "configure: failed program was:" >&5
3610   cat conftest.$ac_ext >&5
3611   rm -rf conftest*
3612   samba_cv_socklen_t=no
3613 fi
3614 rm -f conftest*
3615 fi
3616
3617 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3618 if test x"$samba_cv_socklen_t" = x"yes"; then
3619    cat >> confdefs.h <<\EOF
3620 #define HAVE_SOCKLEN_T_TYPE 1
3621 EOF
3622
3623 fi
3624
3625 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3626 echo "configure:3627: checking for sig_atomic_t type" >&5
3627 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3628   echo $ac_n "(cached) $ac_c" 1>&6
3629 else
3630   
3631     cat > conftest.$ac_ext <<EOF
3632 #line 3633 "configure"
3633 #include "confdefs.h"
3634
3635 #include <sys/types.h>
3636 #if STDC_HEADERS
3637 #include <stdlib.h>
3638 #include <stddef.h>
3639 #endif
3640 #include <signal.h>
3641 int main() {
3642 sig_atomic_t i = 0
3643 ; return 0; }
3644 EOF
3645 if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3646   rm -rf conftest*
3647   samba_cv_sig_atomic_t=yes
3648 else
3649   echo "configure: failed program was:" >&5
3650   cat conftest.$ac_ext >&5
3651   rm -rf conftest*
3652   samba_cv_sig_atomic_t=no
3653 fi
3654 rm -f conftest*
3655 fi
3656
3657 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3658 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3659    cat >> confdefs.h <<\EOF
3660 #define HAVE_SIG_ATOMIC_T_TYPE 1
3661 EOF
3662
3663 fi
3664
3665 # stupid headers have the functions but no declaration. grrrr.
3666
3667  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3668 echo "configure:3669: checking for errno declaration" >&5
3669 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3670   echo $ac_n "(cached) $ac_c" 1>&6
3671 else
3672   
3673     cat > conftest.$ac_ext <<EOF
3674 #line 3675 "configure"
3675 #include "confdefs.h"
3676 #include <errno.h>
3677 int main() {
3678 int i = (int)errno
3679 ; return 0; }
3680 EOF
3681 if { (eval echo configure:3682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3682   rm -rf conftest*
3683   ac_cv_have_errno_decl=yes
3684 else
3685   echo "configure: failed program was:" >&5
3686   cat conftest.$ac_ext >&5
3687   rm -rf conftest*
3688   ac_cv_have_errno_decl=no
3689 fi
3690 rm -f conftest*
3691 fi
3692
3693 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3694  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3695     cat >> confdefs.h <<\EOF
3696 #define HAVE_ERRNO_DECL 1
3697 EOF
3698
3699  fi
3700
3701
3702  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3703 echo "configure:3704: checking for setresuid declaration" >&5
3704 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3705   echo $ac_n "(cached) $ac_c" 1>&6
3706 else
3707   
3708     cat > conftest.$ac_ext <<EOF
3709 #line 3710 "configure"
3710 #include "confdefs.h"
3711 #include <unistd.h>
3712 int main() {
3713 int i = (int)setresuid
3714 ; return 0; }
3715 EOF
3716 if { (eval echo configure:3717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3717   rm -rf conftest*
3718   ac_cv_have_setresuid_decl=yes
3719 else
3720   echo "configure: failed program was:" >&5
3721   cat conftest.$ac_ext >&5
3722   rm -rf conftest*
3723   ac_cv_have_setresuid_decl=no
3724 fi
3725 rm -f conftest*
3726 fi
3727
3728 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3729  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3730     cat >> confdefs.h <<\EOF
3731 #define HAVE_SETRESUID_DECL 1
3732 EOF
3733
3734  fi
3735
3736
3737  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3738 echo "configure:3739: checking for setresgid declaration" >&5
3739 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3740   echo $ac_n "(cached) $ac_c" 1>&6
3741 else
3742   
3743     cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746 #include <unistd.h>
3747 int main() {
3748 int i = (int)setresgid
3749 ; return 0; }
3750 EOF
3751 if { (eval echo configure:3752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3752   rm -rf conftest*
3753   ac_cv_have_setresgid_decl=yes
3754 else
3755   echo "configure: failed program was:" >&5
3756   cat conftest.$ac_ext >&5
3757   rm -rf conftest*
3758   ac_cv_have_setresgid_decl=no
3759 fi
3760 rm -f conftest*
3761 fi
3762
3763 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3764  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3765     cat >> confdefs.h <<\EOF
3766 #define HAVE_SETRESGID_DECL 1
3767 EOF
3768
3769  fi
3770
3771
3772  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3773 echo "configure:3774: checking for asprintf declaration" >&5
3774 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3775   echo $ac_n "(cached) $ac_c" 1>&6
3776 else
3777   
3778     cat > conftest.$ac_ext <<EOF
3779 #line 3780 "configure"
3780 #include "confdefs.h"
3781 #include <stdio.h>
3782 int main() {
3783 int i = (int)asprintf
3784 ; return 0; }
3785 EOF
3786 if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3787   rm -rf conftest*
3788   ac_cv_have_asprintf_decl=yes
3789 else
3790   echo "configure: failed program was:" >&5
3791   cat conftest.$ac_ext >&5
3792   rm -rf conftest*
3793   ac_cv_have_asprintf_decl=no
3794 fi
3795 rm -f conftest*
3796 fi
3797
3798 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3799  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3800     cat >> confdefs.h <<\EOF
3801 #define HAVE_ASPRINTF_DECL 1
3802 EOF
3803
3804  fi
3805
3806
3807  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3808 echo "configure:3809: checking for vasprintf declaration" >&5
3809 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3810   echo $ac_n "(cached) $ac_c" 1>&6
3811 else
3812   
3813     cat > conftest.$ac_ext <<EOF
3814 #line 3815 "configure"
3815 #include "confdefs.h"
3816 #include <stdio.h>
3817 int main() {
3818 int i = (int)vasprintf
3819 ; return 0; }
3820 EOF
3821 if { (eval echo configure:3822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3822   rm -rf conftest*
3823   ac_cv_have_vasprintf_decl=yes
3824 else
3825   echo "configure: failed program was:" >&5
3826   cat conftest.$ac_ext >&5
3827   rm -rf conftest*
3828   ac_cv_have_vasprintf_decl=no
3829 fi
3830 rm -f conftest*
3831 fi
3832
3833 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3834  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3835     cat >> confdefs.h <<\EOF
3836 #define HAVE_VASPRINTF_DECL 1
3837 EOF
3838
3839  fi
3840
3841
3842  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3843 echo "configure:3844: checking for vsnprintf declaration" >&5
3844 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3845   echo $ac_n "(cached) $ac_c" 1>&6
3846 else
3847   
3848     cat > conftest.$ac_ext <<EOF
3849 #line 3850 "configure"
3850 #include "confdefs.h"
3851 #include <stdio.h>
3852 int main() {
3853 int i = (int)vsnprintf
3854 ; return 0; }
3855 EOF
3856 if { (eval echo configure:3857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3857   rm -rf conftest*
3858   ac_cv_have_vsnprintf_decl=yes
3859 else
3860   echo "configure: failed program was:" >&5
3861   cat conftest.$ac_ext >&5
3862   rm -rf conftest*
3863   ac_cv_have_vsnprintf_decl=no
3864 fi
3865 rm -f conftest*
3866 fi
3867
3868 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3869  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3870     cat >> confdefs.h <<\EOF
3871 #define HAVE_VSNPRINTF_DECL 1
3872 EOF
3873
3874  fi
3875
3876
3877  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3878 echo "configure:3879: checking for snprintf declaration" >&5
3879 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3880   echo $ac_n "(cached) $ac_c" 1>&6
3881 else
3882   
3883     cat > conftest.$ac_ext <<EOF
3884 #line 3885 "configure"
3885 #include "confdefs.h"
3886 #include <stdio.h>
3887 int main() {
3888 int i = (int)snprintf
3889 ; return 0; }
3890 EOF
3891 if { (eval echo configure:3892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3892   rm -rf conftest*
3893   ac_cv_have_snprintf_decl=yes
3894 else
3895   echo "configure: failed program was:" >&5
3896   cat conftest.$ac_ext >&5
3897   rm -rf conftest*
3898   ac_cv_have_snprintf_decl=no
3899 fi
3900 rm -f conftest*
3901 fi
3902
3903 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3904  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3905     cat >> confdefs.h <<\EOF
3906 #define HAVE_SNPRINTF_DECL 1
3907 EOF
3908
3909  fi
3910
3911
3912 # and glibc has setresuid under linux but the function does
3913 # nothing until kernel 2.1.44! very dumb.
3914 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3915 echo "configure:3916: checking for real setresuid" >&5
3916 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3917   echo $ac_n "(cached) $ac_c" 1>&6
3918 else
3919   
3920     if test "$cross_compiling" = yes; then
3921   samba_cv_have_setresuid=cross
3922 else
3923   cat > conftest.$ac_ext <<EOF
3924 #line 3925 "configure"
3925 #include "confdefs.h"
3926 #include <errno.h>
3927 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3928 EOF
3929 if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3930 then
3931   samba_cv_have_setresuid=yes
3932 else
3933   echo "configure: failed program was:" >&5
3934   cat conftest.$ac_ext >&5
3935   rm -fr conftest*
3936   samba_cv_have_setresuid=no
3937 fi
3938 rm -fr conftest*
3939 fi
3940
3941 fi
3942
3943 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3944 if test x"$samba_cv_have_setresuid" = x"yes"; then
3945     cat >> confdefs.h <<\EOF
3946 #define HAVE_SETRESUID 1
3947 EOF
3948
3949 fi
3950
3951 # Do the same check for setresguid...
3952 #
3953 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3954 echo "configure:3955: checking for real setresgid" >&5
3955 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+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_setresgid=cross
3961 else
3962   cat > conftest.$ac_ext <<EOF
3963 #line 3964 "configure"
3964 #include "confdefs.h"
3965 #include <unistd.h>
3966 #include <errno.h>
3967 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3968 EOF
3969 if { (eval echo configure:3970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3970 then
3971   samba_cv_have_setresgid=yes
3972 else
3973   echo "configure: failed program was:" >&5
3974   cat conftest.$ac_ext >&5
3975   rm -fr conftest*
3976   samba_cv_have_setresgid=no
3977 fi
3978 rm -fr conftest*
3979 fi
3980
3981 fi
3982
3983 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
3984 if test x"$samba_cv_have_setresgid" = x"yes"; then
3985     cat >> confdefs.h <<\EOF
3986 #define HAVE_SETRESGID 1
3987 EOF
3988
3989 fi
3990
3991 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3992 echo "configure:3993: checking for 8-bit clean memcmp" >&5
3993 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3994   echo $ac_n "(cached) $ac_c" 1>&6
3995 else
3996   if test "$cross_compiling" = yes; then
3997   ac_cv_func_memcmp_clean=no
3998 else
3999   cat > conftest.$ac_ext <<EOF
4000 #line 4001 "configure"
4001 #include "confdefs.h"
4002
4003 main()
4004 {
4005   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4006   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4007 }
4008
4009 EOF
4010 if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4011 then
4012   ac_cv_func_memcmp_clean=yes
4013 else
4014   echo "configure: failed program was:" >&5
4015   cat conftest.$ac_ext >&5
4016   rm -fr conftest*
4017   ac_cv_func_memcmp_clean=no
4018 fi
4019 rm -fr conftest*
4020 fi
4021
4022 fi
4023
4024 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4025 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4026
4027
4028 ###############################################
4029 # test for where we get crypt() from
4030 for ac_func in crypt
4031 do
4032 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4033 echo "configure:4034: checking for $ac_func" >&5
4034 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4035   echo $ac_n "(cached) $ac_c" 1>&6
4036 else
4037   cat > conftest.$ac_ext <<EOF
4038 #line 4039 "configure"
4039 #include "confdefs.h"
4040 /* System header to define __stub macros and hopefully few prototypes,
4041     which can conflict with char $ac_func(); below.  */
4042 #include <assert.h>
4043 /* Override any gcc2 internal prototype to avoid an error.  */
4044 /* We use char because int might match the return type of a gcc2
4045     builtin and then its argument prototype would still apply.  */
4046 char $ac_func();
4047
4048 int main() {
4049
4050 /* The GNU C library defines this for functions which it implements
4051     to always fail with ENOSYS.  Some functions are actually named
4052     something starting with __ and the normal name is an alias.  */
4053 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4054 choke me
4055 #else
4056 $ac_func();
4057 #endif
4058
4059 ; return 0; }
4060 EOF
4061 if { (eval echo configure:4062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4062   rm -rf conftest*
4063   eval "ac_cv_func_$ac_func=yes"
4064 else
4065   echo "configure: failed program was:" >&5
4066   cat conftest.$ac_ext >&5
4067   rm -rf conftest*
4068   eval "ac_cv_func_$ac_func=no"
4069 fi
4070 rm -f conftest*
4071 fi
4072
4073 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4074   echo "$ac_t""yes" 1>&6
4075     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4076   cat >> confdefs.h <<EOF
4077 #define $ac_tr_func 1
4078 EOF
4079  
4080 else
4081   echo "$ac_t""no" 1>&6
4082 fi
4083 done
4084
4085 if test x"$ac_cv_func_crypt" = x"no"; then
4086     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4087 echo "configure:4088: checking for crypt in -lcrypt" >&5
4088 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4089 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4090   echo $ac_n "(cached) $ac_c" 1>&6
4091 else
4092   ac_save_LIBS="$LIBS"
4093 LIBS="-lcrypt  $LIBS"
4094 cat > conftest.$ac_ext <<EOF
4095 #line 4096 "configure"
4096 #include "confdefs.h"
4097 /* Override any gcc2 internal prototype to avoid an error.  */
4098 /* We use char because int might match the return type of a gcc2
4099     builtin and then its argument prototype would still apply.  */
4100 char crypt();
4101
4102 int main() {
4103 crypt()
4104 ; return 0; }
4105 EOF
4106 if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4107   rm -rf conftest*
4108   eval "ac_cv_lib_$ac_lib_var=yes"
4109 else
4110   echo "configure: failed program was:" >&5
4111   cat conftest.$ac_ext >&5
4112   rm -rf conftest*
4113   eval "ac_cv_lib_$ac_lib_var=no"
4114 fi
4115 rm -f conftest*
4116 LIBS="$ac_save_LIBS"
4117
4118 fi
4119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4120   echo "$ac_t""yes" 1>&6
4121   LIBS="$LIBS -lcrypt";
4122         cat >> confdefs.h <<\EOF
4123 #define HAVE_CRYPT 1
4124 EOF
4125
4126 else
4127   echo "$ac_t""no" 1>&6
4128 fi
4129
4130 fi
4131
4132
4133 ###############################################
4134 # Readline included by default unless explicitly asked not to
4135 test "${with_readline+set}" != "set" && with_readline=yes
4136
4137 # test for where we get readline() from
4138 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4139 echo "configure:4140: checking whether to use readline" >&5
4140 # Check whether --with-readline or --without-readline was given.
4141 if test "${with_readline+set}" = set; then
4142   withval="$with_readline"
4143     case "$with_readline" in
4144   yes)
4145     echo "$ac_t""yes" 1>&6
4146
4147     for ac_hdr in readline.h history.h readline/readline.h
4148 do
4149 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4150 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4151 echo "configure:4152: checking for $ac_hdr" >&5
4152 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4153   echo $ac_n "(cached) $ac_c" 1>&6
4154 else
4155   cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 #include <$ac_hdr>
4159 EOF
4160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4161 { (eval echo configure:4162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4163 if test -z "$ac_err"; then
4164   rm -rf conftest*
4165   eval "ac_cv_header_$ac_safe=yes"
4166 else
4167   echo "$ac_err" >&5
4168   echo "configure: failed program was:" >&5
4169   cat conftest.$ac_ext >&5
4170   rm -rf conftest*
4171   eval "ac_cv_header_$ac_safe=no"
4172 fi
4173 rm -f conftest*
4174 fi
4175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4176   echo "$ac_t""yes" 1>&6
4177     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4178   cat >> confdefs.h <<EOF
4179 #define $ac_tr_hdr 1
4180 EOF
4181  
4182 else
4183   echo "$ac_t""no" 1>&6
4184 fi
4185 done
4186
4187     for ac_hdr in readline/history.h
4188 do
4189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4191 echo "configure:4192: checking for $ac_hdr" >&5
4192 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4193   echo $ac_n "(cached) $ac_c" 1>&6
4194 else
4195   cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198 #include <$ac_hdr>
4199 EOF
4200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4201 { (eval echo configure:4202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4203 if test -z "$ac_err"; then
4204   rm -rf conftest*
4205   eval "ac_cv_header_$ac_safe=yes"
4206 else
4207   echo "$ac_err" >&5
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   eval "ac_cv_header_$ac_safe=no"
4212 fi
4213 rm -f conftest*
4214 fi
4215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4216   echo "$ac_t""yes" 1>&6
4217     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4218   cat >> confdefs.h <<EOF
4219 #define $ac_tr_hdr 1
4220 EOF
4221  
4222 else
4223   echo "$ac_t""no" 1>&6
4224 fi
4225 done
4226
4227
4228     for ac_hdr in readline.h readline/readline.h
4229 do
4230 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4231 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4232 echo "configure:4233: checking for $ac_hdr" >&5
4233 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4234   echo $ac_n "(cached) $ac_c" 1>&6
4235 else
4236   cat > conftest.$ac_ext <<EOF
4237 #line 4238 "configure"
4238 #include "confdefs.h"
4239 #include <$ac_hdr>
4240 EOF
4241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4242 { (eval echo configure:4243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4244 if test -z "$ac_err"; then
4245   rm -rf conftest*
4246   eval "ac_cv_header_$ac_safe=yes"
4247 else
4248   echo "$ac_err" >&5
4249   echo "configure: failed program was:" >&5
4250   cat conftest.$ac_ext >&5
4251   rm -rf conftest*
4252   eval "ac_cv_header_$ac_safe=no"
4253 fi
4254 rm -f conftest*
4255 fi
4256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4257   echo "$ac_t""yes" 1>&6
4258     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4259   cat >> confdefs.h <<EOF
4260 #define $ac_tr_hdr 1
4261 EOF
4262  
4263       for termlib in ncurses curses termcap terminfo termlib; do
4264        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4265 echo "configure:4266: checking for tgetent in -l${termlib}" >&5
4266 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4267 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4268   echo $ac_n "(cached) $ac_c" 1>&6
4269 else
4270   ac_save_LIBS="$LIBS"
4271 LIBS="-l${termlib}  $LIBS"
4272 cat > conftest.$ac_ext <<EOF
4273 #line 4274 "configure"
4274 #include "confdefs.h"
4275 /* Override any gcc2 internal prototype to avoid an error.  */
4276 /* We use char because int might match the return type of a gcc2
4277     builtin and then its argument prototype would still apply.  */
4278 char tgetent();
4279
4280 int main() {
4281 tgetent()
4282 ; return 0; }
4283 EOF
4284 if { (eval echo configure:4285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4285   rm -rf conftest*
4286   eval "ac_cv_lib_$ac_lib_var=yes"
4287 else
4288   echo "configure: failed program was:" >&5
4289   cat conftest.$ac_ext >&5
4290   rm -rf conftest*
4291   eval "ac_cv_lib_$ac_lib_var=no"
4292 fi
4293 rm -f conftest*
4294 LIBS="$ac_save_LIBS"
4295
4296 fi
4297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4298   echo "$ac_t""yes" 1>&6
4299   TERMLIBS="-l${termlib}"; break
4300 else
4301   echo "$ac_t""no" 1>&6
4302 fi
4303
4304       done
4305       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4306 echo "configure:4307: checking for rl_callback_handler_install in -lreadline" >&5
4307 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4308 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4309   echo $ac_n "(cached) $ac_c" 1>&6
4310 else
4311   ac_save_LIBS="$LIBS"
4312 LIBS="-lreadline $TERMLIBS $LIBS"
4313 cat > conftest.$ac_ext <<EOF
4314 #line 4315 "configure"
4315 #include "confdefs.h"
4316 /* Override any gcc2 internal prototype to avoid an error.  */
4317 /* We use char because int might match the return type of a gcc2
4318     builtin and then its argument prototype would still apply.  */
4319 char rl_callback_handler_install();
4320
4321 int main() {
4322 rl_callback_handler_install()
4323 ; return 0; }
4324 EOF
4325 if { (eval echo configure:4326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4326   rm -rf conftest*
4327   eval "ac_cv_lib_$ac_lib_var=yes"
4328 else
4329   echo "configure: failed program was:" >&5
4330   cat conftest.$ac_ext >&5
4331   rm -rf conftest*
4332   eval "ac_cv_lib_$ac_lib_var=no"
4333 fi
4334 rm -f conftest*
4335 LIBS="$ac_save_LIBS"
4336
4337 fi
4338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4339   echo "$ac_t""yes" 1>&6
4340   TERMLIBS="-lreadline $TERMLIBS"
4341        cat >> confdefs.h <<\EOF
4342 #define HAVE_LIBREADLINE 1
4343 EOF
4344
4345        break
4346 else
4347   echo "$ac_t""no" 1>&6
4348 TERMLIBS=
4349 fi
4350
4351 else
4352   echo "$ac_t""no" 1>&6
4353 fi
4354 done
4355
4356     ;;
4357   no)
4358     echo "$ac_t""no" 1>&6
4359     ;;
4360   *)
4361     echo "$ac_t""yes" 1>&6
4362
4363     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4364     # alternate readline path
4365     _ldflags=${LDFLAGS}
4366     _cppflags=${CPPFLAGS}
4367
4368     # Add additional search path
4369     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4370     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4371
4372     for ac_hdr in readline.h history.h readline/readline.h
4373 do
4374 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4375 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4376 echo "configure:4377: checking for $ac_hdr" >&5
4377 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4378   echo $ac_n "(cached) $ac_c" 1>&6
4379 else
4380   cat > conftest.$ac_ext <<EOF
4381 #line 4382 "configure"
4382 #include "confdefs.h"
4383 #include <$ac_hdr>
4384 EOF
4385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4386 { (eval echo configure:4387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4388 if test -z "$ac_err"; then
4389   rm -rf conftest*
4390   eval "ac_cv_header_$ac_safe=yes"
4391 else
4392   echo "$ac_err" >&5
4393   echo "configure: failed program was:" >&5
4394   cat conftest.$ac_ext >&5
4395   rm -rf conftest*
4396   eval "ac_cv_header_$ac_safe=no"
4397 fi
4398 rm -f conftest*
4399 fi
4400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4401   echo "$ac_t""yes" 1>&6
4402     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4403   cat >> confdefs.h <<EOF
4404 #define $ac_tr_hdr 1
4405 EOF
4406  
4407 else
4408   echo "$ac_t""no" 1>&6
4409 fi
4410 done
4411
4412     for ac_hdr in readline/history.h
4413 do
4414 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4415 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4416 echo "configure:4417: checking for $ac_hdr" >&5
4417 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4418   echo $ac_n "(cached) $ac_c" 1>&6
4419 else
4420   cat > conftest.$ac_ext <<EOF
4421 #line 4422 "configure"
4422 #include "confdefs.h"
4423 #include <$ac_hdr>
4424 EOF
4425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4426 { (eval echo configure:4427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4428 if test -z "$ac_err"; then
4429   rm -rf conftest*
4430   eval "ac_cv_header_$ac_safe=yes"
4431 else
4432   echo "$ac_err" >&5
4433   echo "configure: failed program was:" >&5
4434   cat conftest.$ac_ext >&5
4435   rm -rf conftest*
4436   eval "ac_cv_header_$ac_safe=no"
4437 fi
4438 rm -f conftest*
4439 fi
4440 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4441   echo "$ac_t""yes" 1>&6
4442     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4443   cat >> confdefs.h <<EOF
4444 #define $ac_tr_hdr 1
4445 EOF
4446  
4447 else
4448   echo "$ac_t""no" 1>&6
4449 fi
4450 done
4451
4452
4453     for ac_hdr in readline.h readline/readline.h
4454 do
4455 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4456 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4457 echo "configure:4458: checking for $ac_hdr" >&5
4458 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4459   echo $ac_n "(cached) $ac_c" 1>&6
4460 else
4461   cat > conftest.$ac_ext <<EOF
4462 #line 4463 "configure"
4463 #include "confdefs.h"
4464 #include <$ac_hdr>
4465 EOF
4466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4467 { (eval echo configure:4468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4469 if test -z "$ac_err"; then
4470   rm -rf conftest*
4471   eval "ac_cv_header_$ac_safe=yes"
4472 else
4473   echo "$ac_err" >&5
4474   echo "configure: failed program was:" >&5
4475   cat conftest.$ac_ext >&5
4476   rm -rf conftest*
4477   eval "ac_cv_header_$ac_safe=no"
4478 fi
4479 rm -f conftest*
4480 fi
4481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4482   echo "$ac_t""yes" 1>&6
4483     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4484   cat >> confdefs.h <<EOF
4485 #define $ac_tr_hdr 1
4486 EOF
4487  
4488       for termlib in ncurses curses termcap terminfo termlib; do
4489        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4490 echo "configure:4491: checking for tgetent in -l${termlib}" >&5
4491 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4492 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4493   echo $ac_n "(cached) $ac_c" 1>&6
4494 else
4495   ac_save_LIBS="$LIBS"
4496 LIBS="-l${termlib}  $LIBS"
4497 cat > conftest.$ac_ext <<EOF
4498 #line 4499 "configure"
4499 #include "confdefs.h"
4500 /* Override any gcc2 internal prototype to avoid an error.  */
4501 /* We use char because int might match the return type of a gcc2
4502     builtin and then its argument prototype would still apply.  */
4503 char tgetent();
4504
4505 int main() {
4506 tgetent()
4507 ; return 0; }
4508 EOF
4509 if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4510   rm -rf conftest*
4511   eval "ac_cv_lib_$ac_lib_var=yes"
4512 else
4513   echo "configure: failed program was:" >&5
4514   cat conftest.$ac_ext >&5
4515   rm -rf conftest*
4516   eval "ac_cv_lib_$ac_lib_var=no"
4517 fi
4518 rm -f conftest*
4519 LIBS="$ac_save_LIBS"
4520
4521 fi
4522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4523   echo "$ac_t""yes" 1>&6
4524   TERMLIBS="-l${termlib}"; break
4525 else
4526   echo "$ac_t""no" 1>&6
4527 fi
4528
4529       done
4530       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4531 echo "configure:4532: checking for rl_callback_handler_install in -lreadline" >&5
4532 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4533 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4534   echo $ac_n "(cached) $ac_c" 1>&6
4535 else
4536   ac_save_LIBS="$LIBS"
4537 LIBS="-lreadline $TERMLIBS $LIBS"
4538 cat > conftest.$ac_ext <<EOF
4539 #line 4540 "configure"
4540 #include "confdefs.h"
4541 /* Override any gcc2 internal prototype to avoid an error.  */
4542 /* We use char because int might match the return type of a gcc2
4543     builtin and then its argument prototype would still apply.  */
4544 char rl_callback_handler_install();
4545
4546 int main() {
4547 rl_callback_handler_install()
4548 ; return 0; }
4549 EOF
4550 if { (eval echo configure:4551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4551   rm -rf conftest*
4552   eval "ac_cv_lib_$ac_lib_var=yes"
4553 else
4554   echo "configure: failed program was:" >&5
4555   cat conftest.$ac_ext >&5
4556   rm -rf conftest*
4557   eval "ac_cv_lib_$ac_lib_var=no"
4558 fi
4559 rm -f conftest*
4560 LIBS="$ac_save_LIBS"
4561
4562 fi
4563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4564   echo "$ac_t""yes" 1>&6
4565   TERMLDFLAGS="-L$with_readline/lib"
4566        TERMCPPFLAGS="-I$with_readline/include"
4567        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4568        TERMLIBS="-lreadline $TERMLIBS"
4569        cat >> confdefs.h <<\EOF
4570 #define HAVE_LIBREADLINE 1
4571 EOF
4572
4573        break
4574 else
4575   echo "$ac_t""no" 1>&6
4576 TERMLIBS= CPPFLAGS=$_cppflags
4577 fi
4578
4579 else
4580   echo "$ac_t""no" 1>&6
4581 fi
4582 done
4583
4584
4585     LDFLAGS=$_ldflags
4586     ;;
4587   esac
4588 else
4589   echo "$ac_t""no" 1>&6
4590
4591 fi
4592
4593
4594
4595
4596 # The following test taken from the cvs sources
4597 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4598 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4599 # libsocket.so which has a bad implementation of gethostbyname (it
4600 # only looks in /etc/hosts), so we only look for -lsocket if we need
4601 # it.
4602 for ac_func in connect
4603 do
4604 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4605 echo "configure:4606: checking for $ac_func" >&5
4606 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4607   echo $ac_n "(cached) $ac_c" 1>&6
4608 else
4609   cat > conftest.$ac_ext <<EOF
4610 #line 4611 "configure"
4611 #include "confdefs.h"
4612 /* System header to define __stub macros and hopefully few prototypes,
4613     which can conflict with char $ac_func(); below.  */
4614 #include <assert.h>
4615 /* Override any gcc2 internal prototype to avoid an error.  */
4616 /* We use char because int might match the return type of a gcc2
4617     builtin and then its argument prototype would still apply.  */
4618 char $ac_func();
4619
4620 int main() {
4621
4622 /* The GNU C library defines this for functions which it implements
4623     to always fail with ENOSYS.  Some functions are actually named
4624     something starting with __ and the normal name is an alias.  */
4625 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4626 choke me
4627 #else
4628 $ac_func();
4629 #endif
4630
4631 ; return 0; }
4632 EOF
4633 if { (eval echo configure:4634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4634   rm -rf conftest*
4635   eval "ac_cv_func_$ac_func=yes"
4636 else
4637   echo "configure: failed program was:" >&5
4638   cat conftest.$ac_ext >&5
4639   rm -rf conftest*
4640   eval "ac_cv_func_$ac_func=no"
4641 fi
4642 rm -f conftest*
4643 fi
4644
4645 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4646   echo "$ac_t""yes" 1>&6
4647     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4648   cat >> confdefs.h <<EOF
4649 #define $ac_tr_func 1
4650 EOF
4651  
4652 else
4653   echo "$ac_t""no" 1>&6
4654 fi
4655 done
4656
4657 if test x"$ac_cv_func_connect" = x"no"; then
4658     case "$LIBS" in
4659     *-lnsl*) ;;
4660     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4661 echo "configure:4662: checking for printf in -lnsl_s" >&5
4662 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4663 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4664   echo $ac_n "(cached) $ac_c" 1>&6
4665 else
4666   ac_save_LIBS="$LIBS"
4667 LIBS="-lnsl_s  $LIBS"
4668 cat > conftest.$ac_ext <<EOF
4669 #line 4670 "configure"
4670 #include "confdefs.h"
4671 /* Override any gcc2 internal prototype to avoid an error.  */
4672 /* We use char because int might match the return type of a gcc2
4673     builtin and then its argument prototype would still apply.  */
4674 char printf();
4675
4676 int main() {
4677 printf()
4678 ; return 0; }
4679 EOF
4680 if { (eval echo configure:4681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4681   rm -rf conftest*
4682   eval "ac_cv_lib_$ac_lib_var=yes"
4683 else
4684   echo "configure: failed program was:" >&5
4685   cat conftest.$ac_ext >&5
4686   rm -rf conftest*
4687   eval "ac_cv_lib_$ac_lib_var=no"
4688 fi
4689 rm -f conftest*
4690 LIBS="$ac_save_LIBS"
4691
4692 fi
4693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4694   echo "$ac_t""yes" 1>&6
4695     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4696     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4697   cat >> confdefs.h <<EOF
4698 #define $ac_tr_lib 1
4699 EOF
4700
4701   LIBS="-lnsl_s $LIBS"
4702
4703 else
4704   echo "$ac_t""no" 1>&6
4705 fi
4706  ;;
4707     esac
4708     case "$LIBS" in
4709     *-lnsl*) ;;
4710     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4711 echo "configure:4712: checking for printf in -lnsl" >&5
4712 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4713 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4714   echo $ac_n "(cached) $ac_c" 1>&6
4715 else
4716   ac_save_LIBS="$LIBS"
4717 LIBS="-lnsl  $LIBS"
4718 cat > conftest.$ac_ext <<EOF
4719 #line 4720 "configure"
4720 #include "confdefs.h"
4721 /* Override any gcc2 internal prototype to avoid an error.  */
4722 /* We use char because int might match the return type of a gcc2
4723     builtin and then its argument prototype would still apply.  */
4724 char printf();
4725
4726 int main() {
4727 printf()
4728 ; return 0; }
4729 EOF
4730 if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4731   rm -rf conftest*
4732   eval "ac_cv_lib_$ac_lib_var=yes"
4733 else
4734   echo "configure: failed program was:" >&5
4735   cat conftest.$ac_ext >&5
4736   rm -rf conftest*
4737   eval "ac_cv_lib_$ac_lib_var=no"
4738 fi
4739 rm -f conftest*
4740 LIBS="$ac_save_LIBS"
4741
4742 fi
4743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4744   echo "$ac_t""yes" 1>&6
4745     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4746     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4747   cat >> confdefs.h <<EOF
4748 #define $ac_tr_lib 1
4749 EOF
4750
4751   LIBS="-lnsl $LIBS"
4752
4753 else
4754   echo "$ac_t""no" 1>&6
4755 fi
4756  ;;
4757     esac
4758     case "$LIBS" in
4759     *-lsocket*) ;;
4760     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4761 echo "configure:4762: checking for connect in -lsocket" >&5
4762 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4763 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4764   echo $ac_n "(cached) $ac_c" 1>&6
4765 else
4766   ac_save_LIBS="$LIBS"
4767 LIBS="-lsocket  $LIBS"
4768 cat > conftest.$ac_ext <<EOF
4769 #line 4770 "configure"
4770 #include "confdefs.h"
4771 /* Override any gcc2 internal prototype to avoid an error.  */
4772 /* We use char because int might match the return type of a gcc2
4773     builtin and then its argument prototype would still apply.  */
4774 char connect();
4775
4776 int main() {
4777 connect()
4778 ; return 0; }
4779 EOF
4780 if { (eval echo configure:4781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4781   rm -rf conftest*
4782   eval "ac_cv_lib_$ac_lib_var=yes"
4783 else
4784   echo "configure: failed program was:" >&5
4785   cat conftest.$ac_ext >&5
4786   rm -rf conftest*
4787   eval "ac_cv_lib_$ac_lib_var=no"
4788 fi
4789 rm -f conftest*
4790 LIBS="$ac_save_LIBS"
4791
4792 fi
4793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4794   echo "$ac_t""yes" 1>&6
4795     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4796     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4797   cat >> confdefs.h <<EOF
4798 #define $ac_tr_lib 1
4799 EOF
4800
4801   LIBS="-lsocket $LIBS"
4802
4803 else
4804   echo "$ac_t""no" 1>&6
4805 fi
4806  ;;
4807     esac
4808     case "$LIBS" in
4809     *-linet*) ;;
4810     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4811 echo "configure:4812: checking for connect in -linet" >&5
4812 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4813 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4814   echo $ac_n "(cached) $ac_c" 1>&6
4815 else
4816   ac_save_LIBS="$LIBS"
4817 LIBS="-linet  $LIBS"
4818 cat > conftest.$ac_ext <<EOF
4819 #line 4820 "configure"
4820 #include "confdefs.h"
4821 /* Override any gcc2 internal prototype to avoid an error.  */
4822 /* We use char because int might match the return type of a gcc2
4823     builtin and then its argument prototype would still apply.  */
4824 char connect();
4825
4826 int main() {
4827 connect()
4828 ; return 0; }
4829 EOF
4830 if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4831   rm -rf conftest*
4832   eval "ac_cv_lib_$ac_lib_var=yes"
4833 else
4834   echo "configure: failed program was:" >&5
4835   cat conftest.$ac_ext >&5
4836   rm -rf conftest*
4837   eval "ac_cv_lib_$ac_lib_var=no"
4838 fi
4839 rm -f conftest*
4840 LIBS="$ac_save_LIBS"
4841
4842 fi
4843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4844   echo "$ac_t""yes" 1>&6
4845     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4846     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4847   cat >> confdefs.h <<EOF
4848 #define $ac_tr_lib 1
4849 EOF
4850
4851   LIBS="-linet $LIBS"
4852
4853 else
4854   echo "$ac_t""no" 1>&6
4855 fi
4856  ;;
4857     esac
4858             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4859        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4860         # ac_cv_func_connect=yes
4861         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4862         cat >> confdefs.h <<\EOF
4863 #define HAVE_CONNECT 1
4864 EOF
4865
4866     fi
4867 fi
4868
4869 ###############################################
4870 # test for where we get get_yp_default_domain() from
4871 for ac_func in yp_get_default_domain
4872 do
4873 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4874 echo "configure:4875: checking for $ac_func" >&5
4875 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4876   echo $ac_n "(cached) $ac_c" 1>&6
4877 else
4878   cat > conftest.$ac_ext <<EOF
4879 #line 4880 "configure"
4880 #include "confdefs.h"
4881 /* System header to define __stub macros and hopefully few prototypes,
4882     which can conflict with char $ac_func(); below.  */
4883 #include <assert.h>
4884 /* Override any gcc2 internal prototype to avoid an error.  */
4885 /* We use char because int might match the return type of a gcc2
4886     builtin and then its argument prototype would still apply.  */
4887 char $ac_func();
4888
4889 int main() {
4890
4891 /* The GNU C library defines this for functions which it implements
4892     to always fail with ENOSYS.  Some functions are actually named
4893     something starting with __ and the normal name is an alias.  */
4894 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4895 choke me
4896 #else
4897 $ac_func();
4898 #endif
4899
4900 ; return 0; }
4901 EOF
4902 if { (eval echo configure:4903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4903   rm -rf conftest*
4904   eval "ac_cv_func_$ac_func=yes"
4905 else
4906   echo "configure: failed program was:" >&5
4907   cat conftest.$ac_ext >&5
4908   rm -rf conftest*
4909   eval "ac_cv_func_$ac_func=no"
4910 fi
4911 rm -f conftest*
4912 fi
4913
4914 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4915   echo "$ac_t""yes" 1>&6
4916     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4917   cat >> confdefs.h <<EOF
4918 #define $ac_tr_func 1
4919 EOF
4920  
4921 else
4922   echo "$ac_t""no" 1>&6
4923 fi
4924 done
4925
4926 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
4927         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
4928 echo "configure:4929: checking for yp_get_default_domain in -lnsl" >&5
4929 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
4930 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4931   echo $ac_n "(cached) $ac_c" 1>&6
4932 else
4933   ac_save_LIBS="$LIBS"
4934 LIBS="-lnsl  $LIBS"
4935 cat > conftest.$ac_ext <<EOF
4936 #line 4937 "configure"
4937 #include "confdefs.h"
4938 /* Override any gcc2 internal prototype to avoid an error.  */
4939 /* We use char because int might match the return type of a gcc2
4940     builtin and then its argument prototype would still apply.  */
4941 char yp_get_default_domain();
4942
4943 int main() {
4944 yp_get_default_domain()
4945 ; return 0; }
4946 EOF
4947 if { (eval echo configure:4948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4948   rm -rf conftest*
4949   eval "ac_cv_lib_$ac_lib_var=yes"
4950 else
4951   echo "configure: failed program was:" >&5
4952   cat conftest.$ac_ext >&5
4953   rm -rf conftest*
4954   eval "ac_cv_lib_$ac_lib_var=no"
4955 fi
4956 rm -f conftest*
4957 LIBS="$ac_save_LIBS"
4958
4959 fi
4960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4961   echo "$ac_t""yes" 1>&6
4962   LIBS="$LIBS -lnsl";
4963         cat >> confdefs.h <<\EOF
4964 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
4965 EOF
4966
4967 else
4968   echo "$ac_t""no" 1>&6
4969 fi
4970  
4971 fi
4972
4973 # Check if we have execl, if not we need to compile smbrun.
4974 for ac_func in execl
4975 do
4976 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4977 echo "configure:4978: checking for $ac_func" >&5
4978 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4979   echo $ac_n "(cached) $ac_c" 1>&6
4980 else
4981   cat > conftest.$ac_ext <<EOF
4982 #line 4983 "configure"
4983 #include "confdefs.h"
4984 /* System header to define __stub macros and hopefully few prototypes,
4985     which can conflict with char $ac_func(); below.  */
4986 #include <assert.h>
4987 /* Override any gcc2 internal prototype to avoid an error.  */
4988 /* We use char because int might match the return type of a gcc2
4989     builtin and then its argument prototype would still apply.  */
4990 char $ac_func();
4991
4992 int main() {
4993
4994 /* The GNU C library defines this for functions which it implements
4995     to always fail with ENOSYS.  Some functions are actually named
4996     something starting with __ and the normal name is an alias.  */
4997 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4998 choke me
4999 #else
5000 $ac_func();
5001 #endif
5002
5003 ; return 0; }
5004 EOF
5005 if { (eval echo configure:5006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5006   rm -rf conftest*
5007   eval "ac_cv_func_$ac_func=yes"
5008 else
5009   echo "configure: failed program was:" >&5
5010   cat conftest.$ac_ext >&5
5011   rm -rf conftest*
5012   eval "ac_cv_func_$ac_func=no"
5013 fi
5014 rm -f conftest*
5015 fi
5016
5017 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5018   echo "$ac_t""yes" 1>&6
5019     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5020   cat >> confdefs.h <<EOF
5021 #define $ac_tr_func 1
5022 EOF
5023  
5024 else
5025   echo "$ac_t""no" 1>&6
5026 fi
5027 done
5028
5029 if test x"$ac_cv_func_execl" = x"no"; then
5030     RUNPROG="bin/smbrun"
5031 else
5032     RUNPROG=""
5033 fi
5034
5035 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
5036 do
5037 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5038 echo "configure:5039: checking for $ac_func" >&5
5039 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5040   echo $ac_n "(cached) $ac_c" 1>&6
5041 else
5042   cat > conftest.$ac_ext <<EOF
5043 #line 5044 "configure"
5044 #include "confdefs.h"
5045 /* System header to define __stub macros and hopefully few prototypes,
5046     which can conflict with char $ac_func(); below.  */
5047 #include <assert.h>
5048 /* Override any gcc2 internal prototype to avoid an error.  */
5049 /* We use char because int might match the return type of a gcc2
5050     builtin and then its argument prototype would still apply.  */
5051 char $ac_func();
5052
5053 int main() {
5054
5055 /* The GNU C library defines this for functions which it implements
5056     to always fail with ENOSYS.  Some functions are actually named
5057     something starting with __ and the normal name is an alias.  */
5058 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5059 choke me
5060 #else
5061 $ac_func();
5062 #endif
5063
5064 ; return 0; }
5065 EOF
5066 if { (eval echo configure:5067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5067   rm -rf conftest*
5068   eval "ac_cv_func_$ac_func=yes"
5069 else
5070   echo "configure: failed program was:" >&5
5071   cat conftest.$ac_ext >&5
5072   rm -rf conftest*
5073   eval "ac_cv_func_$ac_func=no"
5074 fi
5075 rm -f conftest*
5076 fi
5077
5078 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5079   echo "$ac_t""yes" 1>&6
5080     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5081   cat >> confdefs.h <<EOF
5082 #define $ac_tr_func 1
5083 EOF
5084  
5085 else
5086   echo "$ac_t""no" 1>&6
5087 fi
5088 done
5089
5090 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
5091 do
5092 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5093 echo "configure:5094: checking for $ac_func" >&5
5094 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5095   echo $ac_n "(cached) $ac_c" 1>&6
5096 else
5097   cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100 /* System header to define __stub macros and hopefully few prototypes,
5101     which can conflict with char $ac_func(); below.  */
5102 #include <assert.h>
5103 /* Override any gcc2 internal prototype to avoid an error.  */
5104 /* We use char because int might match the return type of a gcc2
5105     builtin and then its argument prototype would still apply.  */
5106 char $ac_func();
5107
5108 int main() {
5109
5110 /* The GNU C library defines this for functions which it implements
5111     to always fail with ENOSYS.  Some functions are actually named
5112     something starting with __ and the normal name is an alias.  */
5113 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5114 choke me
5115 #else
5116 $ac_func();
5117 #endif
5118
5119 ; return 0; }
5120 EOF
5121 if { (eval echo configure:5122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5122   rm -rf conftest*
5123   eval "ac_cv_func_$ac_func=yes"
5124 else
5125   echo "configure: failed program was:" >&5
5126   cat conftest.$ac_ext >&5
5127   rm -rf conftest*
5128   eval "ac_cv_func_$ac_func=no"
5129 fi
5130 rm -f conftest*
5131 fi
5132
5133 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5134   echo "$ac_t""yes" 1>&6
5135     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5136   cat >> confdefs.h <<EOF
5137 #define $ac_tr_func 1
5138 EOF
5139  
5140 else
5141   echo "$ac_t""no" 1>&6
5142 fi
5143 done
5144
5145 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5146 do
5147 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5148 echo "configure:5149: checking for $ac_func" >&5
5149 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5150   echo $ac_n "(cached) $ac_c" 1>&6
5151 else
5152   cat > conftest.$ac_ext <<EOF
5153 #line 5154 "configure"
5154 #include "confdefs.h"
5155 /* System header to define __stub macros and hopefully few prototypes,
5156     which can conflict with char $ac_func(); below.  */
5157 #include <assert.h>
5158 /* Override any gcc2 internal prototype to avoid an error.  */
5159 /* We use char because int might match the return type of a gcc2
5160     builtin and then its argument prototype would still apply.  */
5161 char $ac_func();
5162
5163 int main() {
5164
5165 /* The GNU C library defines this for functions which it implements
5166     to always fail with ENOSYS.  Some functions are actually named
5167     something starting with __ and the normal name is an alias.  */
5168 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5169 choke me
5170 #else
5171 $ac_func();
5172 #endif
5173
5174 ; return 0; }
5175 EOF
5176 if { (eval echo configure:5177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5177   rm -rf conftest*
5178   eval "ac_cv_func_$ac_func=yes"
5179 else
5180   echo "configure: failed program was:" >&5
5181   cat conftest.$ac_ext >&5
5182   rm -rf conftest*
5183   eval "ac_cv_func_$ac_func=no"
5184 fi
5185 rm -f conftest*
5186 fi
5187
5188 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5189   echo "$ac_t""yes" 1>&6
5190     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5191   cat >> confdefs.h <<EOF
5192 #define $ac_tr_func 1
5193 EOF
5194  
5195 else
5196   echo "$ac_t""no" 1>&6
5197 fi
5198 done
5199
5200 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5201 do
5202 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5203 echo "configure:5204: checking for $ac_func" >&5
5204 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5205   echo $ac_n "(cached) $ac_c" 1>&6
5206 else
5207   cat > conftest.$ac_ext <<EOF
5208 #line 5209 "configure"
5209 #include "confdefs.h"
5210 /* System header to define __stub macros and hopefully few prototypes,
5211     which can conflict with char $ac_func(); below.  */
5212 #include <assert.h>
5213 /* Override any gcc2 internal prototype to avoid an error.  */
5214 /* We use char because int might match the return type of a gcc2
5215     builtin and then its argument prototype would still apply.  */
5216 char $ac_func();
5217
5218 int main() {
5219
5220 /* The GNU C library defines this for functions which it implements
5221     to always fail with ENOSYS.  Some functions are actually named
5222     something starting with __ and the normal name is an alias.  */
5223 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5224 choke me
5225 #else
5226 $ac_func();
5227 #endif
5228
5229 ; return 0; }
5230 EOF
5231 if { (eval echo configure:5232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5232   rm -rf conftest*
5233   eval "ac_cv_func_$ac_func=yes"
5234 else
5235   echo "configure: failed program was:" >&5
5236   cat conftest.$ac_ext >&5
5237   rm -rf conftest*
5238   eval "ac_cv_func_$ac_func=no"
5239 fi
5240 rm -f conftest*
5241 fi
5242
5243 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5244   echo "$ac_t""yes" 1>&6
5245     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5246   cat >> confdefs.h <<EOF
5247 #define $ac_tr_func 1
5248 EOF
5249  
5250 else
5251   echo "$ac_t""no" 1>&6
5252 fi
5253 done
5254
5255 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5256 do
5257 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5258 echo "configure:5259: checking for $ac_func" >&5
5259 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5260   echo $ac_n "(cached) $ac_c" 1>&6
5261 else
5262   cat > conftest.$ac_ext <<EOF
5263 #line 5264 "configure"
5264 #include "confdefs.h"
5265 /* System header to define __stub macros and hopefully few prototypes,
5266     which can conflict with char $ac_func(); below.  */
5267 #include <assert.h>
5268 /* Override any gcc2 internal prototype to avoid an error.  */
5269 /* We use char because int might match the return type of a gcc2
5270     builtin and then its argument prototype would still apply.  */
5271 char $ac_func();
5272
5273 int main() {
5274
5275 /* The GNU C library defines this for functions which it implements
5276     to always fail with ENOSYS.  Some functions are actually named
5277     something starting with __ and the normal name is an alias.  */
5278 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5279 choke me
5280 #else
5281 $ac_func();
5282 #endif
5283
5284 ; return 0; }
5285 EOF
5286 if { (eval echo configure:5287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5287   rm -rf conftest*
5288   eval "ac_cv_func_$ac_func=yes"
5289 else
5290   echo "configure: failed program was:" >&5
5291   cat conftest.$ac_ext >&5
5292   rm -rf conftest*
5293   eval "ac_cv_func_$ac_func=no"
5294 fi
5295 rm -f conftest*
5296 fi
5297
5298 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5299   echo "$ac_t""yes" 1>&6
5300     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5301   cat >> confdefs.h <<EOF
5302 #define $ac_tr_func 1
5303 EOF
5304  
5305 else
5306   echo "$ac_t""no" 1>&6
5307 fi
5308 done
5309
5310 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5311 do
5312 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5313 echo "configure:5314: checking for $ac_func" >&5
5314 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5315   echo $ac_n "(cached) $ac_c" 1>&6
5316 else
5317   cat > conftest.$ac_ext <<EOF
5318 #line 5319 "configure"
5319 #include "confdefs.h"
5320 /* System header to define __stub macros and hopefully few prototypes,
5321     which can conflict with char $ac_func(); below.  */
5322 #include <assert.h>
5323 /* Override any gcc2 internal prototype to avoid an error.  */
5324 /* We use char because int might match the return type of a gcc2
5325     builtin and then its argument prototype would still apply.  */
5326 char $ac_func();
5327
5328 int main() {
5329
5330 /* The GNU C library defines this for functions which it implements
5331     to always fail with ENOSYS.  Some functions are actually named
5332     something starting with __ and the normal name is an alias.  */
5333 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5334 choke me
5335 #else
5336 $ac_func();
5337 #endif
5338
5339 ; return 0; }
5340 EOF
5341 if { (eval echo configure:5342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5342   rm -rf conftest*
5343   eval "ac_cv_func_$ac_func=yes"
5344 else
5345   echo "configure: failed program was:" >&5
5346   cat conftest.$ac_ext >&5
5347   rm -rf conftest*
5348   eval "ac_cv_func_$ac_func=no"
5349 fi
5350 rm -f conftest*
5351 fi
5352
5353 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5354   echo "$ac_t""yes" 1>&6
5355     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5356   cat >> confdefs.h <<EOF
5357 #define $ac_tr_func 1
5358 EOF
5359  
5360 else
5361   echo "$ac_t""no" 1>&6
5362 fi
5363 done
5364
5365 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5366 do
5367 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5368 echo "configure:5369: checking for $ac_func" >&5
5369 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5370   echo $ac_n "(cached) $ac_c" 1>&6
5371 else
5372   cat > conftest.$ac_ext <<EOF
5373 #line 5374 "configure"
5374 #include "confdefs.h"
5375 /* System header to define __stub macros and hopefully few prototypes,
5376     which can conflict with char $ac_func(); below.  */
5377 #include <assert.h>
5378 /* Override any gcc2 internal prototype to avoid an error.  */
5379 /* We use char because int might match the return type of a gcc2
5380     builtin and then its argument prototype would still apply.  */
5381 char $ac_func();
5382
5383 int main() {
5384
5385 /* The GNU C library defines this for functions which it implements
5386     to always fail with ENOSYS.  Some functions are actually named
5387     something starting with __ and the normal name is an alias.  */
5388 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5389 choke me
5390 #else
5391 $ac_func();
5392 #endif
5393
5394 ; return 0; }
5395 EOF
5396 if { (eval echo configure:5397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5397   rm -rf conftest*
5398   eval "ac_cv_func_$ac_func=yes"
5399 else
5400   echo "configure: failed program was:" >&5
5401   cat conftest.$ac_ext >&5
5402   rm -rf conftest*
5403   eval "ac_cv_func_$ac_func=no"
5404 fi
5405 rm -f conftest*
5406 fi
5407
5408 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5409   echo "$ac_t""yes" 1>&6
5410     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5411   cat >> confdefs.h <<EOF
5412 #define $ac_tr_func 1
5413 EOF
5414  
5415 else
5416   echo "$ac_t""no" 1>&6
5417 fi
5418 done
5419
5420 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5421 do
5422 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5423 echo "configure:5424: checking for $ac_func" >&5
5424 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5425   echo $ac_n "(cached) $ac_c" 1>&6
5426 else
5427   cat > conftest.$ac_ext <<EOF
5428 #line 5429 "configure"
5429 #include "confdefs.h"
5430 /* System header to define __stub macros and hopefully few prototypes,
5431     which can conflict with char $ac_func(); below.  */
5432 #include <assert.h>
5433 /* Override any gcc2 internal prototype to avoid an error.  */
5434 /* We use char because int might match the return type of a gcc2
5435     builtin and then its argument prototype would still apply.  */
5436 char $ac_func();
5437
5438 int main() {
5439
5440 /* The GNU C library defines this for functions which it implements
5441     to always fail with ENOSYS.  Some functions are actually named
5442     something starting with __ and the normal name is an alias.  */
5443 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5444 choke me
5445 #else
5446 $ac_func();
5447 #endif
5448
5449 ; return 0; }
5450 EOF
5451 if { (eval echo configure:5452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5452   rm -rf conftest*
5453   eval "ac_cv_func_$ac_func=yes"
5454 else
5455   echo "configure: failed program was:" >&5
5456   cat conftest.$ac_ext >&5
5457   rm -rf conftest*
5458   eval "ac_cv_func_$ac_func=no"
5459 fi
5460 rm -f conftest*
5461 fi
5462
5463 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5464   echo "$ac_t""yes" 1>&6
5465     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5466   cat >> confdefs.h <<EOF
5467 #define $ac_tr_func 1
5468 EOF
5469  
5470 else
5471   echo "$ac_t""no" 1>&6
5472 fi
5473 done
5474
5475 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5476 do
5477 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5478 echo "configure:5479: checking for $ac_func" >&5
5479 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5480   echo $ac_n "(cached) $ac_c" 1>&6
5481 else
5482   cat > conftest.$ac_ext <<EOF
5483 #line 5484 "configure"
5484 #include "confdefs.h"
5485 /* System header to define __stub macros and hopefully few prototypes,
5486     which can conflict with char $ac_func(); below.  */
5487 #include <assert.h>
5488 /* Override any gcc2 internal prototype to avoid an error.  */
5489 /* We use char because int might match the return type of a gcc2
5490     builtin and then its argument prototype would still apply.  */
5491 char $ac_func();
5492
5493 int main() {
5494
5495 /* The GNU C library defines this for functions which it implements
5496     to always fail with ENOSYS.  Some functions are actually named
5497     something starting with __ and the normal name is an alias.  */
5498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5499 choke me
5500 #else
5501 $ac_func();
5502 #endif
5503
5504 ; return 0; }
5505 EOF
5506 if { (eval echo configure:5507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5507   rm -rf conftest*
5508   eval "ac_cv_func_$ac_func=yes"
5509 else
5510   echo "configure: failed program was:" >&5
5511   cat conftest.$ac_ext >&5
5512   rm -rf conftest*
5513   eval "ac_cv_func_$ac_func=no"
5514 fi
5515 rm -f conftest*
5516 fi
5517
5518 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5519   echo "$ac_t""yes" 1>&6
5520     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5521   cat >> confdefs.h <<EOF
5522 #define $ac_tr_func 1
5523 EOF
5524  
5525 else
5526   echo "$ac_t""no" 1>&6
5527 fi
5528 done
5529
5530 # setbuffer is needed for smbtorture
5531 for ac_func in setbuffer
5532 do
5533 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5534 echo "configure:5535: checking for $ac_func" >&5
5535 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5536   echo $ac_n "(cached) $ac_c" 1>&6
5537 else
5538   cat > conftest.$ac_ext <<EOF
5539 #line 5540 "configure"
5540 #include "confdefs.h"
5541 /* System header to define __stub macros and hopefully few prototypes,
5542     which can conflict with char $ac_func(); below.  */
5543 #include <assert.h>
5544 /* Override any gcc2 internal prototype to avoid an error.  */
5545 /* We use char because int might match the return type of a gcc2
5546     builtin and then its argument prototype would still apply.  */
5547 char $ac_func();
5548
5549 int main() {
5550
5551 /* The GNU C library defines this for functions which it implements
5552     to always fail with ENOSYS.  Some functions are actually named
5553     something starting with __ and the normal name is an alias.  */
5554 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5555 choke me
5556 #else
5557 $ac_func();
5558 #endif
5559
5560 ; return 0; }
5561 EOF
5562 if { (eval echo configure:5563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5563   rm -rf conftest*
5564   eval "ac_cv_func_$ac_func=yes"
5565 else
5566   echo "configure: failed program was:" >&5
5567   cat conftest.$ac_ext >&5
5568   rm -rf conftest*
5569   eval "ac_cv_func_$ac_func=no"
5570 fi
5571 rm -f conftest*
5572 fi
5573
5574 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5575   echo "$ac_t""yes" 1>&6
5576     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5577   cat >> confdefs.h <<EOF
5578 #define $ac_tr_func 1
5579 EOF
5580  
5581 else
5582   echo "$ac_t""no" 1>&6
5583 fi
5584 done
5585
5586
5587 # syscall() is needed for smbwrapper.
5588 for ac_func in syscall
5589 do
5590 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5591 echo "configure:5592: checking for $ac_func" >&5
5592 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5593   echo $ac_n "(cached) $ac_c" 1>&6
5594 else
5595   cat > conftest.$ac_ext <<EOF
5596 #line 5597 "configure"
5597 #include "confdefs.h"
5598 /* System header to define __stub macros and hopefully few prototypes,
5599     which can conflict with char $ac_func(); below.  */
5600 #include <assert.h>
5601 /* Override any gcc2 internal prototype to avoid an error.  */
5602 /* We use char because int might match the return type of a gcc2
5603     builtin and then its argument prototype would still apply.  */
5604 char $ac_func();
5605
5606 int main() {
5607
5608 /* The GNU C library defines this for functions which it implements
5609     to always fail with ENOSYS.  Some functions are actually named
5610     something starting with __ and the normal name is an alias.  */
5611 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5612 choke me
5613 #else
5614 $ac_func();
5615 #endif
5616
5617 ; return 0; }
5618 EOF
5619 if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5620   rm -rf conftest*
5621   eval "ac_cv_func_$ac_func=yes"
5622 else
5623   echo "configure: failed program was:" >&5
5624   cat conftest.$ac_ext >&5
5625   rm -rf conftest*
5626   eval "ac_cv_func_$ac_func=no"
5627 fi
5628 rm -f conftest*
5629 fi
5630
5631 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5632   echo "$ac_t""yes" 1>&6
5633     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5634   cat >> confdefs.h <<EOF
5635 #define $ac_tr_func 1
5636 EOF
5637  
5638 else
5639   echo "$ac_t""no" 1>&6
5640 fi
5641 done
5642
5643
5644 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5645 do
5646 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5647 echo "configure:5648: checking for $ac_func" >&5
5648 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5649   echo $ac_n "(cached) $ac_c" 1>&6
5650 else
5651   cat > conftest.$ac_ext <<EOF
5652 #line 5653 "configure"
5653 #include "confdefs.h"
5654 /* System header to define __stub macros and hopefully few prototypes,
5655     which can conflict with char $ac_func(); below.  */
5656 #include <assert.h>
5657 /* Override any gcc2 internal prototype to avoid an error.  */
5658 /* We use char because int might match the return type of a gcc2
5659     builtin and then its argument prototype would still apply.  */
5660 char $ac_func();
5661
5662 int main() {
5663
5664 /* The GNU C library defines this for functions which it implements
5665     to always fail with ENOSYS.  Some functions are actually named
5666     something starting with __ and the normal name is an alias.  */
5667 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5668 choke me
5669 #else
5670 $ac_func();
5671 #endif
5672
5673 ; return 0; }
5674 EOF
5675 if { (eval echo configure:5676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5676   rm -rf conftest*
5677   eval "ac_cv_func_$ac_func=yes"
5678 else
5679   echo "configure: failed program was:" >&5
5680   cat conftest.$ac_ext >&5
5681   rm -rf conftest*
5682   eval "ac_cv_func_$ac_func=no"
5683 fi
5684 rm -f conftest*
5685 fi
5686
5687 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5688   echo "$ac_t""yes" 1>&6
5689     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5690   cat >> confdefs.h <<EOF
5691 #define $ac_tr_func 1
5692 EOF
5693  
5694 else
5695   echo "$ac_t""no" 1>&6
5696 fi
5697 done
5698
5699 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5700 do
5701 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5702 echo "configure:5703: checking for $ac_func" >&5
5703 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5704   echo $ac_n "(cached) $ac_c" 1>&6
5705 else
5706   cat > conftest.$ac_ext <<EOF
5707 #line 5708 "configure"
5708 #include "confdefs.h"
5709 /* System header to define __stub macros and hopefully few prototypes,
5710     which can conflict with char $ac_func(); below.  */
5711 #include <assert.h>
5712 /* Override any gcc2 internal prototype to avoid an error.  */
5713 /* We use char because int might match the return type of a gcc2
5714     builtin and then its argument prototype would still apply.  */
5715 char $ac_func();
5716
5717 int main() {
5718
5719 /* The GNU C library defines this for functions which it implements
5720     to always fail with ENOSYS.  Some functions are actually named
5721     something starting with __ and the normal name is an alias.  */
5722 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5723 choke me
5724 #else
5725 $ac_func();
5726 #endif
5727
5728 ; return 0; }
5729 EOF
5730 if { (eval echo configure:5731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5731   rm -rf conftest*
5732   eval "ac_cv_func_$ac_func=yes"
5733 else
5734   echo "configure: failed program was:" >&5
5735   cat conftest.$ac_ext >&5
5736   rm -rf conftest*
5737   eval "ac_cv_func_$ac_func=no"
5738 fi
5739 rm -f conftest*
5740 fi
5741
5742 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5743   echo "$ac_t""yes" 1>&6
5744     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5745   cat >> confdefs.h <<EOF
5746 #define $ac_tr_func 1
5747 EOF
5748  
5749 else
5750   echo "$ac_t""no" 1>&6
5751 fi
5752 done
5753
5754 for ac_func in __getcwd _getcwd
5755 do
5756 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5757 echo "configure:5758: checking for $ac_func" >&5
5758 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5759   echo $ac_n "(cached) $ac_c" 1>&6
5760 else
5761   cat > conftest.$ac_ext <<EOF
5762 #line 5763 "configure"
5763 #include "confdefs.h"
5764 /* System header to define __stub macros and hopefully few prototypes,
5765     which can conflict with char $ac_func(); below.  */
5766 #include <assert.h>
5767 /* Override any gcc2 internal prototype to avoid an error.  */
5768 /* We use char because int might match the return type of a gcc2
5769     builtin and then its argument prototype would still apply.  */
5770 char $ac_func();
5771
5772 int main() {
5773
5774 /* The GNU C library defines this for functions which it implements
5775     to always fail with ENOSYS.  Some functions are actually named
5776     something starting with __ and the normal name is an alias.  */
5777 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5778 choke me
5779 #else
5780 $ac_func();
5781 #endif
5782
5783 ; return 0; }
5784 EOF
5785 if { (eval echo configure:5786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5786   rm -rf conftest*
5787   eval "ac_cv_func_$ac_func=yes"
5788 else
5789   echo "configure: failed program was:" >&5
5790   cat conftest.$ac_ext >&5
5791   rm -rf conftest*
5792   eval "ac_cv_func_$ac_func=no"
5793 fi
5794 rm -f conftest*
5795 fi
5796
5797 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5798   echo "$ac_t""yes" 1>&6
5799     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5800   cat >> confdefs.h <<EOF
5801 #define $ac_tr_func 1
5802 EOF
5803  
5804 else
5805   echo "$ac_t""no" 1>&6
5806 fi
5807 done
5808
5809 for ac_func in __xstat __fxstat __lxstat
5810 do
5811 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5812 echo "configure:5813: checking for $ac_func" >&5
5813 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5814   echo $ac_n "(cached) $ac_c" 1>&6
5815 else
5816   cat > conftest.$ac_ext <<EOF
5817 #line 5818 "configure"
5818 #include "confdefs.h"
5819 /* System header to define __stub macros and hopefully few prototypes,
5820     which can conflict with char $ac_func(); below.  */
5821 #include <assert.h>
5822 /* Override any gcc2 internal prototype to avoid an error.  */
5823 /* We use char because int might match the return type of a gcc2
5824     builtin and then its argument prototype would still apply.  */
5825 char $ac_func();
5826
5827 int main() {
5828
5829 /* The GNU C library defines this for functions which it implements
5830     to always fail with ENOSYS.  Some functions are actually named
5831     something starting with __ and the normal name is an alias.  */
5832 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5833 choke me
5834 #else
5835 $ac_func();
5836 #endif
5837
5838 ; return 0; }
5839 EOF
5840 if { (eval echo configure:5841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5841   rm -rf conftest*
5842   eval "ac_cv_func_$ac_func=yes"
5843 else
5844   echo "configure: failed program was:" >&5
5845   cat conftest.$ac_ext >&5
5846   rm -rf conftest*
5847   eval "ac_cv_func_$ac_func=no"
5848 fi
5849 rm -f conftest*
5850 fi
5851
5852 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5853   echo "$ac_t""yes" 1>&6
5854     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5855   cat >> confdefs.h <<EOF
5856 #define $ac_tr_func 1
5857 EOF
5858  
5859 else
5860   echo "$ac_t""no" 1>&6
5861 fi
5862 done
5863
5864 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
5865 do
5866 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5867 echo "configure:5868: checking for $ac_func" >&5
5868 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5869   echo $ac_n "(cached) $ac_c" 1>&6
5870 else
5871   cat > conftest.$ac_ext <<EOF
5872 #line 5873 "configure"
5873 #include "confdefs.h"
5874 /* System header to define __stub macros and hopefully few prototypes,
5875     which can conflict with char $ac_func(); below.  */
5876 #include <assert.h>
5877 /* Override any gcc2 internal prototype to avoid an error.  */
5878 /* We use char because int might match the return type of a gcc2
5879     builtin and then its argument prototype would still apply.  */
5880 char $ac_func();
5881
5882 int main() {
5883
5884 /* The GNU C library defines this for functions which it implements
5885     to always fail with ENOSYS.  Some functions are actually named
5886     something starting with __ and the normal name is an alias.  */
5887 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5888 choke me
5889 #else
5890 $ac_func();
5891 #endif
5892
5893 ; return 0; }
5894 EOF
5895 if { (eval echo configure:5896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5896   rm -rf conftest*
5897   eval "ac_cv_func_$ac_func=yes"
5898 else
5899   echo "configure: failed program was:" >&5
5900   cat conftest.$ac_ext >&5
5901   rm -rf conftest*
5902   eval "ac_cv_func_$ac_func=no"
5903 fi
5904 rm -f conftest*
5905 fi
5906
5907 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5908   echo "$ac_t""yes" 1>&6
5909     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5910   cat >> confdefs.h <<EOF
5911 #define $ac_tr_func 1
5912 EOF
5913  
5914 else
5915   echo "$ac_t""no" 1>&6
5916 fi
5917 done
5918
5919 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
5920 do
5921 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5922 echo "configure:5923: checking for $ac_func" >&5
5923 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5924   echo $ac_n "(cached) $ac_c" 1>&6
5925 else
5926   cat > conftest.$ac_ext <<EOF
5927 #line 5928 "configure"
5928 #include "confdefs.h"
5929 /* System header to define __stub macros and hopefully few prototypes,
5930     which can conflict with char $ac_func(); below.  */
5931 #include <assert.h>
5932 /* Override any gcc2 internal prototype to avoid an error.  */
5933 /* We use char because int might match the return type of a gcc2
5934     builtin and then its argument prototype would still apply.  */
5935 char $ac_func();
5936
5937 int main() {
5938
5939 /* The GNU C library defines this for functions which it implements
5940     to always fail with ENOSYS.  Some functions are actually named
5941     something starting with __ and the normal name is an alias.  */
5942 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5943 choke me
5944 #else
5945 $ac_func();
5946 #endif
5947
5948 ; return 0; }
5949 EOF
5950 if { (eval echo configure:5951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5951   rm -rf conftest*
5952   eval "ac_cv_func_$ac_func=yes"
5953 else
5954   echo "configure: failed program was:" >&5
5955   cat conftest.$ac_ext >&5
5956   rm -rf conftest*
5957   eval "ac_cv_func_$ac_func=no"
5958 fi
5959 rm -f conftest*
5960 fi
5961
5962 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5963   echo "$ac_t""yes" 1>&6
5964     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5965   cat >> confdefs.h <<EOF
5966 #define $ac_tr_func 1
5967 EOF
5968  
5969 else
5970   echo "$ac_t""no" 1>&6
5971 fi
5972 done
5973
5974 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
5975 do
5976 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5977 echo "configure:5978: checking for $ac_func" >&5
5978 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5979   echo $ac_n "(cached) $ac_c" 1>&6
5980 else
5981   cat > conftest.$ac_ext <<EOF
5982 #line 5983 "configure"
5983 #include "confdefs.h"
5984 /* System header to define __stub macros and hopefully few prototypes,
5985     which can conflict with char $ac_func(); below.  */
5986 #include <assert.h>
5987 /* Override any gcc2 internal prototype to avoid an error.  */
5988 /* We use char because int might match the return type of a gcc2
5989     builtin and then its argument prototype would still apply.  */
5990 char $ac_func();
5991
5992 int main() {
5993
5994 /* The GNU C library defines this for functions which it implements
5995     to always fail with ENOSYS.  Some functions are actually named
5996     something starting with __ and the normal name is an alias.  */
5997 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5998 choke me
5999 #else
6000 $ac_func();
6001 #endif
6002
6003 ; return 0; }
6004 EOF
6005 if { (eval echo configure:6006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6006   rm -rf conftest*
6007   eval "ac_cv_func_$ac_func=yes"
6008 else
6009   echo "configure: failed program was:" >&5
6010   cat conftest.$ac_ext >&5
6011   rm -rf conftest*
6012   eval "ac_cv_func_$ac_func=no"
6013 fi
6014 rm -f conftest*
6015 fi
6016
6017 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6018   echo "$ac_t""yes" 1>&6
6019     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6020   cat >> confdefs.h <<EOF
6021 #define $ac_tr_func 1
6022 EOF
6023  
6024 else
6025   echo "$ac_t""no" 1>&6
6026 fi
6027 done
6028
6029 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6030 do
6031 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6032 echo "configure:6033: checking for $ac_func" >&5
6033 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6034   echo $ac_n "(cached) $ac_c" 1>&6
6035 else
6036   cat > conftest.$ac_ext <<EOF
6037 #line 6038 "configure"
6038 #include "confdefs.h"
6039 /* System header to define __stub macros and hopefully few prototypes,
6040     which can conflict with char $ac_func(); below.  */
6041 #include <assert.h>
6042 /* Override any gcc2 internal prototype to avoid an error.  */
6043 /* We use char because int might match the return type of a gcc2
6044     builtin and then its argument prototype would still apply.  */
6045 char $ac_func();
6046
6047 int main() {
6048
6049 /* The GNU C library defines this for functions which it implements
6050     to always fail with ENOSYS.  Some functions are actually named
6051     something starting with __ and the normal name is an alias.  */
6052 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6053 choke me
6054 #else
6055 $ac_func();
6056 #endif
6057
6058 ; return 0; }
6059 EOF
6060 if { (eval echo configure:6061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6061   rm -rf conftest*
6062   eval "ac_cv_func_$ac_func=yes"
6063 else
6064   echo "configure: failed program was:" >&5
6065   cat conftest.$ac_ext >&5
6066   rm -rf conftest*
6067   eval "ac_cv_func_$ac_func=no"
6068 fi
6069 rm -f conftest*
6070 fi
6071
6072 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6073   echo "$ac_t""yes" 1>&6
6074     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6075   cat >> confdefs.h <<EOF
6076 #define $ac_tr_func 1
6077 EOF
6078  
6079 else
6080   echo "$ac_t""no" 1>&6
6081 fi
6082 done
6083
6084 for ac_func in _write __write _fork __fork
6085 do
6086 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6087 echo "configure:6088: checking for $ac_func" >&5
6088 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6089   echo $ac_n "(cached) $ac_c" 1>&6
6090 else
6091   cat > conftest.$ac_ext <<EOF
6092 #line 6093 "configure"
6093 #include "confdefs.h"
6094 /* System header to define __stub macros and hopefully few prototypes,
6095     which can conflict with char $ac_func(); below.  */
6096 #include <assert.h>
6097 /* Override any gcc2 internal prototype to avoid an error.  */
6098 /* We use char because int might match the return type of a gcc2
6099     builtin and then its argument prototype would still apply.  */
6100 char $ac_func();
6101
6102 int main() {
6103
6104 /* The GNU C library defines this for functions which it implements
6105     to always fail with ENOSYS.  Some functions are actually named
6106     something starting with __ and the normal name is an alias.  */
6107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6108 choke me
6109 #else
6110 $ac_func();
6111 #endif
6112
6113 ; return 0; }
6114 EOF
6115 if { (eval echo configure:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6116   rm -rf conftest*
6117   eval "ac_cv_func_$ac_func=yes"
6118 else
6119   echo "configure: failed program was:" >&5
6120   cat conftest.$ac_ext >&5
6121   rm -rf conftest*
6122   eval "ac_cv_func_$ac_func=no"
6123 fi
6124 rm -f conftest*
6125 fi
6126
6127 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6128   echo "$ac_t""yes" 1>&6
6129     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6130   cat >> confdefs.h <<EOF
6131 #define $ac_tr_func 1
6132 EOF
6133  
6134 else
6135   echo "$ac_t""no" 1>&6
6136 fi
6137 done
6138
6139 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6140 do
6141 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6142 echo "configure:6143: checking for $ac_func" >&5
6143 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6144   echo $ac_n "(cached) $ac_c" 1>&6
6145 else
6146   cat > conftest.$ac_ext <<EOF
6147 #line 6148 "configure"
6148 #include "confdefs.h"
6149 /* System header to define __stub macros and hopefully few prototypes,
6150     which can conflict with char $ac_func(); below.  */
6151 #include <assert.h>
6152 /* Override any gcc2 internal prototype to avoid an error.  */
6153 /* We use char because int might match the return type of a gcc2
6154     builtin and then its argument prototype would still apply.  */
6155 char $ac_func();
6156
6157 int main() {
6158
6159 /* The GNU C library defines this for functions which it implements
6160     to always fail with ENOSYS.  Some functions are actually named
6161     something starting with __ and the normal name is an alias.  */
6162 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6163 choke me
6164 #else
6165 $ac_func();
6166 #endif
6167
6168 ; return 0; }
6169 EOF
6170 if { (eval echo configure:6171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6171   rm -rf conftest*
6172   eval "ac_cv_func_$ac_func=yes"
6173 else
6174   echo "configure: failed program was:" >&5
6175   cat conftest.$ac_ext >&5
6176   rm -rf conftest*
6177   eval "ac_cv_func_$ac_func=no"
6178 fi
6179 rm -f conftest*
6180 fi
6181
6182 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6183   echo "$ac_t""yes" 1>&6
6184     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6185   cat >> confdefs.h <<EOF
6186 #define $ac_tr_func 1
6187 EOF
6188  
6189 else
6190   echo "$ac_t""no" 1>&6
6191 fi
6192 done
6193
6194 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6195 do
6196 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6197 echo "configure:6198: checking for $ac_func" >&5
6198 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6199   echo $ac_n "(cached) $ac_c" 1>&6
6200 else
6201   cat > conftest.$ac_ext <<EOF
6202 #line 6203 "configure"
6203 #include "confdefs.h"
6204 /* System header to define __stub macros and hopefully few prototypes,
6205     which can conflict with char $ac_func(); below.  */
6206 #include <assert.h>
6207 /* Override any gcc2 internal prototype to avoid an error.  */
6208 /* We use char because int might match the return type of a gcc2
6209     builtin and then its argument prototype would still apply.  */
6210 char $ac_func();
6211
6212 int main() {
6213
6214 /* The GNU C library defines this for functions which it implements
6215     to always fail with ENOSYS.  Some functions are actually named
6216     something starting with __ and the normal name is an alias.  */
6217 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6218 choke me
6219 #else
6220 $ac_func();
6221 #endif
6222
6223 ; return 0; }
6224 EOF
6225 if { (eval echo configure:6226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6226   rm -rf conftest*
6227   eval "ac_cv_func_$ac_func=yes"
6228 else
6229   echo "configure: failed program was:" >&5
6230   cat conftest.$ac_ext >&5
6231   rm -rf conftest*
6232   eval "ac_cv_func_$ac_func=no"
6233 fi
6234 rm -f conftest*
6235 fi
6236
6237 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6238   echo "$ac_t""yes" 1>&6
6239     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6240   cat >> confdefs.h <<EOF
6241 #define $ac_tr_func 1
6242 EOF
6243  
6244 else
6245   echo "$ac_t""no" 1>&6
6246 fi
6247 done
6248
6249 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6250 do
6251 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6252 echo "configure:6253: checking for $ac_func" >&5
6253 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6254   echo $ac_n "(cached) $ac_c" 1>&6
6255 else
6256   cat > conftest.$ac_ext <<EOF
6257 #line 6258 "configure"
6258 #include "confdefs.h"
6259 /* System header to define __stub macros and hopefully few prototypes,
6260     which can conflict with char $ac_func(); below.  */
6261 #include <assert.h>
6262 /* Override any gcc2 internal prototype to avoid an error.  */
6263 /* We use char because int might match the return type of a gcc2
6264     builtin and then its argument prototype would still apply.  */
6265 char $ac_func();
6266
6267 int main() {
6268
6269 /* The GNU C library defines this for functions which it implements
6270     to always fail with ENOSYS.  Some functions are actually named
6271     something starting with __ and the normal name is an alias.  */
6272 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6273 choke me
6274 #else
6275 $ac_func();
6276 #endif
6277
6278 ; return 0; }
6279 EOF
6280 if { (eval echo configure:6281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6281   rm -rf conftest*
6282   eval "ac_cv_func_$ac_func=yes"
6283 else
6284   echo "configure: failed program was:" >&5
6285   cat conftest.$ac_ext >&5
6286   rm -rf conftest*
6287   eval "ac_cv_func_$ac_func=no"
6288 fi
6289 rm -f conftest*
6290 fi
6291
6292 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6293   echo "$ac_t""yes" 1>&6
6294     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6295   cat >> confdefs.h <<EOF
6296 #define $ac_tr_func 1
6297 EOF
6298  
6299 else
6300   echo "$ac_t""no" 1>&6
6301 fi
6302 done
6303
6304 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6305 do
6306 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6307 echo "configure:6308: checking for $ac_func" >&5
6308 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6309   echo $ac_n "(cached) $ac_c" 1>&6
6310 else
6311   cat > conftest.$ac_ext <<EOF
6312 #line 6313 "configure"
6313 #include "confdefs.h"
6314 /* System header to define __stub macros and hopefully few prototypes,
6315     which can conflict with char $ac_func(); below.  */
6316 #include <assert.h>
6317 /* Override any gcc2 internal prototype to avoid an error.  */
6318 /* We use char because int might match the return type of a gcc2
6319     builtin and then its argument prototype would still apply.  */
6320 char $ac_func();
6321
6322 int main() {
6323
6324 /* The GNU C library defines this for functions which it implements
6325     to always fail with ENOSYS.  Some functions are actually named
6326     something starting with __ and the normal name is an alias.  */
6327 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6328 choke me
6329 #else
6330 $ac_func();
6331 #endif
6332
6333 ; return 0; }
6334 EOF
6335 if { (eval echo configure:6336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6336   rm -rf conftest*
6337   eval "ac_cv_func_$ac_func=yes"
6338 else
6339   echo "configure: failed program was:" >&5
6340   cat conftest.$ac_ext >&5
6341   rm -rf conftest*
6342   eval "ac_cv_func_$ac_func=no"
6343 fi
6344 rm -f conftest*
6345 fi
6346
6347 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6348   echo "$ac_t""yes" 1>&6
6349     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6350   cat >> confdefs.h <<EOF
6351 #define $ac_tr_func 1
6352 EOF
6353  
6354 else
6355   echo "$ac_t""no" 1>&6
6356 fi
6357 done
6358
6359 for ac_func in open64 _open64 __open64 creat64
6360 do
6361 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6362 echo "configure:6363: checking for $ac_func" >&5
6363 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6364   echo $ac_n "(cached) $ac_c" 1>&6
6365 else
6366   cat > conftest.$ac_ext <<EOF
6367 #line 6368 "configure"
6368 #include "confdefs.h"
6369 /* System header to define __stub macros and hopefully few prototypes,
6370     which can conflict with char $ac_func(); below.  */
6371 #include <assert.h>
6372 /* Override any gcc2 internal prototype to avoid an error.  */
6373 /* We use char because int might match the return type of a gcc2
6374     builtin and then its argument prototype would still apply.  */
6375 char $ac_func();
6376
6377 int main() {
6378
6379 /* The GNU C library defines this for functions which it implements
6380     to always fail with ENOSYS.  Some functions are actually named
6381     something starting with __ and the normal name is an alias.  */
6382 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6383 choke me
6384 #else
6385 $ac_func();
6386 #endif
6387
6388 ; return 0; }
6389 EOF
6390 if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6391   rm -rf conftest*
6392   eval "ac_cv_func_$ac_func=yes"
6393 else
6394   echo "configure: failed program was:" >&5
6395   cat conftest.$ac_ext >&5
6396   rm -rf conftest*
6397   eval "ac_cv_func_$ac_func=no"
6398 fi
6399 rm -f conftest*
6400 fi
6401
6402 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6403   echo "$ac_t""yes" 1>&6
6404     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6405   cat >> confdefs.h <<EOF
6406 #define $ac_tr_func 1
6407 EOF
6408  
6409 else
6410   echo "$ac_t""no" 1>&6
6411 fi
6412 done
6413
6414
6415 #
6416 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6417 #
6418
6419 if test x$ac_cv_func_stat64 = xno ; then
6420   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6421 echo "configure:6422: checking for stat64 in <sys/stat.h>" >&5
6422   cat > conftest.$ac_ext <<EOF
6423 #line 6424 "configure"
6424 #include "confdefs.h"
6425
6426 #if defined(HAVE_UNISTD_H)
6427 #include <unistd.h>
6428 #endif
6429 #include <sys/stat.h>
6430
6431 int main() {
6432 struct stat64 st64; exit(stat64(".",&st64));
6433 ; return 0; }
6434 EOF
6435 if { (eval echo configure:6436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6436   rm -rf conftest*
6437   ac_cv_func_stat64=yes
6438 else
6439   echo "configure: failed program was:" >&5
6440   cat conftest.$ac_ext >&5
6441 fi
6442 rm -f conftest*
6443   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6444   if test x$ac_cv_func_stat64 = xyes ; then
6445     cat >> confdefs.h <<\EOF
6446 #define HAVE_STAT64 1
6447 EOF
6448
6449   fi
6450 fi
6451
6452 if test x$ac_cv_func_lstat64 = xno ; then
6453   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6454 echo "configure:6455: checking for lstat64 in <sys/stat.h>" >&5
6455   cat > conftest.$ac_ext <<EOF
6456 #line 6457 "configure"
6457 #include "confdefs.h"
6458
6459 #if defined(HAVE_UNISTD_H)
6460 #include <unistd.h>
6461 #endif
6462 #include <sys/stat.h>
6463
6464 int main() {
6465 struct stat64 st64; exit(lstat64(".",&st64));
6466 ; return 0; }
6467 EOF
6468 if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6469   rm -rf conftest*
6470   ac_cv_func_lstat64=yes
6471 else
6472   echo "configure: failed program was:" >&5
6473   cat conftest.$ac_ext >&5
6474 fi
6475 rm -f conftest*
6476   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6477   if test x$ac_cv_func_lstat64 = xyes ; then
6478     cat >> confdefs.h <<\EOF
6479 #define HAVE_LSTAT64 1
6480 EOF
6481
6482   fi
6483 fi
6484
6485 if test x$ac_cv_func_fstat64 = xno ; then
6486   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6487 echo "configure:6488: checking for fstat64 in <sys/stat.h>" >&5
6488   cat > conftest.$ac_ext <<EOF
6489 #line 6490 "configure"
6490 #include "confdefs.h"
6491
6492 #if defined(HAVE_UNISTD_H)
6493 #include <unistd.h>
6494 #endif
6495 #include <sys/stat.h>
6496
6497 int main() {
6498 struct stat64 st64; exit(fstat64(0,&st64));
6499 ; return 0; }
6500 EOF
6501 if { (eval echo configure:6502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6502   rm -rf conftest*
6503   ac_cv_func_fstat64=yes
6504 else
6505   echo "configure: failed program was:" >&5
6506   cat conftest.$ac_ext >&5
6507 fi
6508 rm -f conftest*
6509   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6510   if test x$ac_cv_func_fstat64 = xyes ; then
6511     cat >> confdefs.h <<\EOF
6512 #define HAVE_FSTAT64 1
6513 EOF
6514
6515   fi
6516 fi
6517
6518 #####################################
6519 # we might need the resolv library on some systems
6520 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6521 echo "configure:6522: checking for dn_expand in -lresolv" >&5
6522 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6523 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6524   echo $ac_n "(cached) $ac_c" 1>&6
6525 else
6526   ac_save_LIBS="$LIBS"
6527 LIBS="-lresolv  $LIBS"
6528 cat > conftest.$ac_ext <<EOF
6529 #line 6530 "configure"
6530 #include "confdefs.h"
6531 /* Override any gcc2 internal prototype to avoid an error.  */
6532 /* We use char because int might match the return type of a gcc2
6533     builtin and then its argument prototype would still apply.  */
6534 char dn_expand();
6535
6536 int main() {
6537 dn_expand()
6538 ; return 0; }
6539 EOF
6540 if { (eval echo configure:6541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6541   rm -rf conftest*
6542   eval "ac_cv_lib_$ac_lib_var=yes"
6543 else
6544   echo "configure: failed program was:" >&5
6545   cat conftest.$ac_ext >&5
6546   rm -rf conftest*
6547   eval "ac_cv_lib_$ac_lib_var=no"
6548 fi
6549 rm -f conftest*
6550 LIBS="$ac_save_LIBS"
6551
6552 fi
6553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6554   echo "$ac_t""yes" 1>&6
6555     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6556     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6557   cat >> confdefs.h <<EOF
6558 #define $ac_tr_lib 1
6559 EOF
6560
6561   LIBS="-lresolv $LIBS"
6562
6563 else
6564   echo "$ac_t""no" 1>&6
6565 fi
6566
6567
6568 #
6569 # Check for the functions putprpwnam, set_auth_parameters,
6570 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6571 # Needed for OSF1 and HPUX.
6572 #
6573
6574 case "$LIBS" in
6575   *-lsecurity*) for ac_func in putprpwnam
6576 do
6577 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6578 echo "configure:6579: checking for $ac_func" >&5
6579 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6580   echo $ac_n "(cached) $ac_c" 1>&6
6581 else
6582   cat > conftest.$ac_ext <<EOF
6583 #line 6584 "configure"
6584 #include "confdefs.h"
6585 /* System header to define __stub macros and hopefully few prototypes,
6586     which can conflict with char $ac_func(); below.  */
6587 #include <assert.h>
6588 /* Override any gcc2 internal prototype to avoid an error.  */
6589 /* We use char because int might match the return type of a gcc2
6590     builtin and then its argument prototype would still apply.  */
6591 char $ac_func();
6592
6593 int main() {
6594
6595 /* The GNU C library defines this for functions which it implements
6596     to always fail with ENOSYS.  Some functions are actually named
6597     something starting with __ and the normal name is an alias.  */
6598 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6599 choke me
6600 #else
6601 $ac_func();
6602 #endif
6603
6604 ; return 0; }
6605 EOF
6606 if { (eval echo configure:6607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6607   rm -rf conftest*
6608   eval "ac_cv_func_$ac_func=yes"
6609 else
6610   echo "configure: failed program was:" >&5
6611   cat conftest.$ac_ext >&5
6612   rm -rf conftest*
6613   eval "ac_cv_func_$ac_func=no"
6614 fi
6615 rm -f conftest*
6616 fi
6617
6618 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6619   echo "$ac_t""yes" 1>&6
6620     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6621   cat >> confdefs.h <<EOF
6622 #define $ac_tr_func 1
6623 EOF
6624  
6625 else
6626   echo "$ac_t""no" 1>&6
6627 fi
6628 done
6629  ;;
6630   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6631 echo "configure:6632: checking for putprpwnam in -lsecurity" >&5
6632 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6633 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6634   echo $ac_n "(cached) $ac_c" 1>&6
6635 else
6636   ac_save_LIBS="$LIBS"
6637 LIBS="-lsecurity  $LIBS"
6638 cat > conftest.$ac_ext <<EOF
6639 #line 6640 "configure"
6640 #include "confdefs.h"
6641 /* Override any gcc2 internal prototype to avoid an error.  */
6642 /* We use char because int might match the return type of a gcc2
6643     builtin and then its argument prototype would still apply.  */
6644 char putprpwnam();
6645
6646 int main() {
6647 putprpwnam()
6648 ; return 0; }
6649 EOF
6650 if { (eval echo configure:6651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6651   rm -rf conftest*
6652   eval "ac_cv_lib_$ac_lib_var=yes"
6653 else
6654   echo "configure: failed program was:" >&5
6655   cat conftest.$ac_ext >&5
6656   rm -rf conftest*
6657   eval "ac_cv_lib_$ac_lib_var=no"
6658 fi
6659 rm -f conftest*
6660 LIBS="$ac_save_LIBS"
6661
6662 fi
6663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6664   echo "$ac_t""yes" 1>&6
6665     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6666     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6667   cat >> confdefs.h <<EOF
6668 #define $ac_tr_lib 1
6669 EOF
6670
6671   LIBS="-lsecurity $LIBS"
6672
6673 else
6674   echo "$ac_t""no" 1>&6
6675 fi
6676  
6677      for ac_func in putprpwnam
6678 do
6679 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6680 echo "configure:6681: checking for $ac_func" >&5
6681 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6682   echo $ac_n "(cached) $ac_c" 1>&6
6683 else
6684   cat > conftest.$ac_ext <<EOF
6685 #line 6686 "configure"
6686 #include "confdefs.h"
6687 /* System header to define __stub macros and hopefully few prototypes,
6688     which can conflict with char $ac_func(); below.  */
6689 #include <assert.h>
6690 /* Override any gcc2 internal prototype to avoid an error.  */
6691 /* We use char because int might match the return type of a gcc2
6692     builtin and then its argument prototype would still apply.  */
6693 char $ac_func();
6694
6695 int main() {
6696
6697 /* The GNU C library defines this for functions which it implements
6698     to always fail with ENOSYS.  Some functions are actually named
6699     something starting with __ and the normal name is an alias.  */
6700 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6701 choke me
6702 #else
6703 $ac_func();
6704 #endif
6705
6706 ; return 0; }
6707 EOF
6708 if { (eval echo configure:6709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6709   rm -rf conftest*
6710   eval "ac_cv_func_$ac_func=yes"
6711 else
6712   echo "configure: failed program was:" >&5
6713   cat conftest.$ac_ext >&5
6714   rm -rf conftest*
6715   eval "ac_cv_func_$ac_func=no"
6716 fi
6717 rm -f conftest*
6718 fi
6719
6720 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6721   echo "$ac_t""yes" 1>&6
6722     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6723   cat >> confdefs.h <<EOF
6724 #define $ac_tr_func 1
6725 EOF
6726  
6727 else
6728   echo "$ac_t""no" 1>&6
6729 fi
6730 done
6731
6732   ;;
6733   esac
6734
6735 case "$LIBS" in
6736   *-lsec*) for ac_func in putprpwnam
6737 do
6738 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6739 echo "configure:6740: checking for $ac_func" >&5
6740 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6741   echo $ac_n "(cached) $ac_c" 1>&6
6742 else
6743   cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746 /* System header to define __stub macros and hopefully few prototypes,
6747     which can conflict with char $ac_func(); below.  */
6748 #include <assert.h>
6749 /* Override any gcc2 internal prototype to avoid an error.  */
6750 /* We use char because int might match the return type of a gcc2
6751     builtin and then its argument prototype would still apply.  */
6752 char $ac_func();
6753
6754 int main() {
6755
6756 /* The GNU C library defines this for functions which it implements
6757     to always fail with ENOSYS.  Some functions are actually named
6758     something starting with __ and the normal name is an alias.  */
6759 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6760 choke me
6761 #else
6762 $ac_func();
6763 #endif
6764
6765 ; return 0; }
6766 EOF
6767 if { (eval echo configure:6768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6768   rm -rf conftest*
6769   eval "ac_cv_func_$ac_func=yes"
6770 else
6771   echo "configure: failed program was:" >&5
6772   cat conftest.$ac_ext >&5
6773   rm -rf conftest*
6774   eval "ac_cv_func_$ac_func=no"
6775 fi
6776 rm -f conftest*
6777 fi
6778
6779 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6780   echo "$ac_t""yes" 1>&6
6781     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6782   cat >> confdefs.h <<EOF
6783 #define $ac_tr_func 1
6784 EOF
6785  
6786 else
6787   echo "$ac_t""no" 1>&6
6788 fi
6789 done
6790  ;;
6791   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6792 echo "configure:6793: checking for putprpwnam in -lsec" >&5
6793 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6794 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6795   echo $ac_n "(cached) $ac_c" 1>&6
6796 else
6797   ac_save_LIBS="$LIBS"
6798 LIBS="-lsec  $LIBS"
6799 cat > conftest.$ac_ext <<EOF
6800 #line 6801 "configure"
6801 #include "confdefs.h"
6802 /* Override any gcc2 internal prototype to avoid an error.  */
6803 /* We use char because int might match the return type of a gcc2
6804     builtin and then its argument prototype would still apply.  */
6805 char putprpwnam();
6806
6807 int main() {
6808 putprpwnam()
6809 ; return 0; }
6810 EOF
6811 if { (eval echo configure:6812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6812   rm -rf conftest*
6813   eval "ac_cv_lib_$ac_lib_var=yes"
6814 else
6815   echo "configure: failed program was:" >&5
6816   cat conftest.$ac_ext >&5
6817   rm -rf conftest*
6818   eval "ac_cv_lib_$ac_lib_var=no"
6819 fi
6820 rm -f conftest*
6821 LIBS="$ac_save_LIBS"
6822
6823 fi
6824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6825   echo "$ac_t""yes" 1>&6
6826     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6827     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6828   cat >> confdefs.h <<EOF
6829 #define $ac_tr_lib 1
6830 EOF
6831
6832   LIBS="-lsec $LIBS"
6833
6834 else
6835   echo "$ac_t""no" 1>&6
6836 fi
6837  
6838      for ac_func in putprpwnam
6839 do
6840 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6841 echo "configure:6842: checking for $ac_func" >&5
6842 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6843   echo $ac_n "(cached) $ac_c" 1>&6
6844 else
6845   cat > conftest.$ac_ext <<EOF
6846 #line 6847 "configure"
6847 #include "confdefs.h"
6848 /* System header to define __stub macros and hopefully few prototypes,
6849     which can conflict with char $ac_func(); below.  */
6850 #include <assert.h>
6851 /* Override any gcc2 internal prototype to avoid an error.  */
6852 /* We use char because int might match the return type of a gcc2
6853     builtin and then its argument prototype would still apply.  */
6854 char $ac_func();
6855
6856 int main() {
6857
6858 /* The GNU C library defines this for functions which it implements
6859     to always fail with ENOSYS.  Some functions are actually named
6860     something starting with __ and the normal name is an alias.  */
6861 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6862 choke me
6863 #else
6864 $ac_func();
6865 #endif
6866
6867 ; return 0; }
6868 EOF
6869 if { (eval echo configure:6870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6870   rm -rf conftest*
6871   eval "ac_cv_func_$ac_func=yes"
6872 else
6873   echo "configure: failed program was:" >&5
6874   cat conftest.$ac_ext >&5
6875   rm -rf conftest*
6876   eval "ac_cv_func_$ac_func=no"
6877 fi
6878 rm -f conftest*
6879 fi
6880
6881 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6882   echo "$ac_t""yes" 1>&6
6883     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6884   cat >> confdefs.h <<EOF
6885 #define $ac_tr_func 1
6886 EOF
6887  
6888 else
6889   echo "$ac_t""no" 1>&6
6890 fi
6891 done
6892
6893   ;;
6894   esac
6895
6896
6897 case "$LIBS" in
6898   *-lsecurity*) for ac_func in set_auth_parameters
6899 do
6900 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6901 echo "configure:6902: checking for $ac_func" >&5
6902 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6903   echo $ac_n "(cached) $ac_c" 1>&6
6904 else
6905   cat > conftest.$ac_ext <<EOF
6906 #line 6907 "configure"
6907 #include "confdefs.h"
6908 /* System header to define __stub macros and hopefully few prototypes,
6909     which can conflict with char $ac_func(); below.  */
6910 #include <assert.h>
6911 /* Override any gcc2 internal prototype to avoid an error.  */
6912 /* We use char because int might match the return type of a gcc2
6913     builtin and then its argument prototype would still apply.  */
6914 char $ac_func();
6915
6916 int main() {
6917
6918 /* The GNU C library defines this for functions which it implements
6919     to always fail with ENOSYS.  Some functions are actually named
6920     something starting with __ and the normal name is an alias.  */
6921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6922 choke me
6923 #else
6924 $ac_func();
6925 #endif
6926
6927 ; return 0; }
6928 EOF
6929 if { (eval echo configure:6930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6930   rm -rf conftest*
6931   eval "ac_cv_func_$ac_func=yes"
6932 else
6933   echo "configure: failed program was:" >&5
6934   cat conftest.$ac_ext >&5
6935   rm -rf conftest*
6936   eval "ac_cv_func_$ac_func=no"
6937 fi
6938 rm -f conftest*
6939 fi
6940
6941 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6942   echo "$ac_t""yes" 1>&6
6943     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6944   cat >> confdefs.h <<EOF
6945 #define $ac_tr_func 1
6946 EOF
6947  
6948 else
6949   echo "$ac_t""no" 1>&6
6950 fi
6951 done
6952  ;;
6953   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
6954 echo "configure:6955: checking for set_auth_parameters in -lsecurity" >&5
6955 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6956 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6957   echo $ac_n "(cached) $ac_c" 1>&6
6958 else
6959   ac_save_LIBS="$LIBS"
6960 LIBS="-lsecurity  $LIBS"
6961 cat > conftest.$ac_ext <<EOF
6962 #line 6963 "configure"
6963 #include "confdefs.h"
6964 /* Override any gcc2 internal prototype to avoid an error.  */
6965 /* We use char because int might match the return type of a gcc2
6966     builtin and then its argument prototype would still apply.  */
6967 char set_auth_parameters();
6968
6969 int main() {
6970 set_auth_parameters()
6971 ; return 0; }
6972 EOF
6973 if { (eval echo configure:6974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6974   rm -rf conftest*
6975   eval "ac_cv_lib_$ac_lib_var=yes"
6976 else
6977   echo "configure: failed program was:" >&5
6978   cat conftest.$ac_ext >&5
6979   rm -rf conftest*
6980   eval "ac_cv_lib_$ac_lib_var=no"
6981 fi
6982 rm -f conftest*
6983 LIBS="$ac_save_LIBS"
6984
6985 fi
6986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6987   echo "$ac_t""yes" 1>&6
6988     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6989     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6990   cat >> confdefs.h <<EOF
6991 #define $ac_tr_lib 1
6992 EOF
6993
6994   LIBS="-lsecurity $LIBS"
6995
6996 else
6997   echo "$ac_t""no" 1>&6
6998 fi
6999  
7000      for ac_func in set_auth_parameters
7001 do
7002 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7003 echo "configure:7004: checking for $ac_func" >&5
7004 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7005   echo $ac_n "(cached) $ac_c" 1>&6
7006 else
7007   cat > conftest.$ac_ext <<EOF
7008 #line 7009 "configure"
7009 #include "confdefs.h"
7010 /* System header to define __stub macros and hopefully few prototypes,
7011     which can conflict with char $ac_func(); below.  */
7012 #include <assert.h>
7013 /* Override any gcc2 internal prototype to avoid an error.  */
7014 /* We use char because int might match the return type of a gcc2
7015     builtin and then its argument prototype would still apply.  */
7016 char $ac_func();
7017
7018 int main() {
7019
7020 /* The GNU C library defines this for functions which it implements
7021     to always fail with ENOSYS.  Some functions are actually named
7022     something starting with __ and the normal name is an alias.  */
7023 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7024 choke me
7025 #else
7026 $ac_func();
7027 #endif
7028
7029 ; return 0; }
7030 EOF
7031 if { (eval echo configure:7032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7032   rm -rf conftest*
7033   eval "ac_cv_func_$ac_func=yes"
7034 else
7035   echo "configure: failed program was:" >&5
7036   cat conftest.$ac_ext >&5
7037   rm -rf conftest*
7038   eval "ac_cv_func_$ac_func=no"
7039 fi
7040 rm -f conftest*
7041 fi
7042
7043 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7044   echo "$ac_t""yes" 1>&6
7045     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7046   cat >> confdefs.h <<EOF
7047 #define $ac_tr_func 1
7048 EOF
7049  
7050 else
7051   echo "$ac_t""no" 1>&6
7052 fi
7053 done
7054
7055   ;;
7056   esac
7057
7058 case "$LIBS" in
7059   *-lsec*) for ac_func in set_auth_parameters
7060 do
7061 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7062 echo "configure:7063: checking for $ac_func" >&5
7063 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7064   echo $ac_n "(cached) $ac_c" 1>&6
7065 else
7066   cat > conftest.$ac_ext <<EOF
7067 #line 7068 "configure"
7068 #include "confdefs.h"
7069 /* System header to define __stub macros and hopefully few prototypes,
7070     which can conflict with char $ac_func(); below.  */
7071 #include <assert.h>
7072 /* Override any gcc2 internal prototype to avoid an error.  */
7073 /* We use char because int might match the return type of a gcc2
7074     builtin and then its argument prototype would still apply.  */
7075 char $ac_func();
7076
7077 int main() {
7078
7079 /* The GNU C library defines this for functions which it implements
7080     to always fail with ENOSYS.  Some functions are actually named
7081     something starting with __ and the normal name is an alias.  */
7082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7083 choke me
7084 #else
7085 $ac_func();
7086 #endif
7087
7088 ; return 0; }
7089 EOF
7090 if { (eval echo configure:7091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7091   rm -rf conftest*
7092   eval "ac_cv_func_$ac_func=yes"
7093 else
7094   echo "configure: failed program was:" >&5
7095   cat conftest.$ac_ext >&5
7096   rm -rf conftest*
7097   eval "ac_cv_func_$ac_func=no"
7098 fi
7099 rm -f conftest*
7100 fi
7101
7102 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7103   echo "$ac_t""yes" 1>&6
7104     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7105   cat >> confdefs.h <<EOF
7106 #define $ac_tr_func 1
7107 EOF
7108  
7109 else
7110   echo "$ac_t""no" 1>&6
7111 fi
7112 done
7113  ;;
7114   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7115 echo "configure:7116: checking for set_auth_parameters in -lsec" >&5
7116 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7117 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7118   echo $ac_n "(cached) $ac_c" 1>&6
7119 else
7120   ac_save_LIBS="$LIBS"
7121 LIBS="-lsec  $LIBS"
7122 cat > conftest.$ac_ext <<EOF
7123 #line 7124 "configure"
7124 #include "confdefs.h"
7125 /* Override any gcc2 internal prototype to avoid an error.  */
7126 /* We use char because int might match the return type of a gcc2
7127     builtin and then its argument prototype would still apply.  */
7128 char set_auth_parameters();
7129
7130 int main() {
7131 set_auth_parameters()
7132 ; return 0; }
7133 EOF
7134 if { (eval echo configure:7135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7135   rm -rf conftest*
7136   eval "ac_cv_lib_$ac_lib_var=yes"
7137 else
7138   echo "configure: failed program was:" >&5
7139   cat conftest.$ac_ext >&5
7140   rm -rf conftest*
7141   eval "ac_cv_lib_$ac_lib_var=no"
7142 fi
7143 rm -f conftest*
7144 LIBS="$ac_save_LIBS"
7145
7146 fi
7147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7148   echo "$ac_t""yes" 1>&6
7149     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7150     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7151   cat >> confdefs.h <<EOF
7152 #define $ac_tr_lib 1
7153 EOF
7154
7155   LIBS="-lsec $LIBS"
7156
7157 else
7158   echo "$ac_t""no" 1>&6
7159 fi
7160  
7161      for ac_func in set_auth_parameters
7162 do
7163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7164 echo "configure:7165: checking for $ac_func" >&5
7165 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7166   echo $ac_n "(cached) $ac_c" 1>&6
7167 else
7168   cat > conftest.$ac_ext <<EOF
7169 #line 7170 "configure"
7170 #include "confdefs.h"
7171 /* System header to define __stub macros and hopefully few prototypes,
7172     which can conflict with char $ac_func(); below.  */
7173 #include <assert.h>
7174 /* Override any gcc2 internal prototype to avoid an error.  */
7175 /* We use char because int might match the return type of a gcc2
7176     builtin and then its argument prototype would still apply.  */
7177 char $ac_func();
7178
7179 int main() {
7180
7181 /* The GNU C library defines this for functions which it implements
7182     to always fail with ENOSYS.  Some functions are actually named
7183     something starting with __ and the normal name is an alias.  */
7184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7185 choke me
7186 #else
7187 $ac_func();
7188 #endif
7189
7190 ; return 0; }
7191 EOF
7192 if { (eval echo configure:7193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7193   rm -rf conftest*
7194   eval "ac_cv_func_$ac_func=yes"
7195 else
7196   echo "configure: failed program was:" >&5
7197   cat conftest.$ac_ext >&5
7198   rm -rf conftest*
7199   eval "ac_cv_func_$ac_func=no"
7200 fi
7201 rm -f conftest*
7202 fi
7203
7204 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7205   echo "$ac_t""yes" 1>&6
7206     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7207   cat >> confdefs.h <<EOF
7208 #define $ac_tr_func 1
7209 EOF
7210  
7211 else
7212   echo "$ac_t""no" 1>&6
7213 fi
7214 done
7215
7216   ;;
7217   esac
7218
7219
7220 # UnixWare 7.x has its getspnam in -lgen
7221 case "$LIBS" in
7222   *-lgen*) for ac_func in getspnam
7223 do
7224 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7225 echo "configure:7226: checking for $ac_func" >&5
7226 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7227   echo $ac_n "(cached) $ac_c" 1>&6
7228 else
7229   cat > conftest.$ac_ext <<EOF
7230 #line 7231 "configure"
7231 #include "confdefs.h"
7232 /* System header to define __stub macros and hopefully few prototypes,
7233     which can conflict with char $ac_func(); below.  */
7234 #include <assert.h>
7235 /* Override any gcc2 internal prototype to avoid an error.  */
7236 /* We use char because int might match the return type of a gcc2
7237     builtin and then its argument prototype would still apply.  */
7238 char $ac_func();
7239
7240 int main() {
7241
7242 /* The GNU C library defines this for functions which it implements
7243     to always fail with ENOSYS.  Some functions are actually named
7244     something starting with __ and the normal name is an alias.  */
7245 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7246 choke me
7247 #else
7248 $ac_func();
7249 #endif
7250
7251 ; return 0; }
7252 EOF
7253 if { (eval echo configure:7254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7254   rm -rf conftest*
7255   eval "ac_cv_func_$ac_func=yes"
7256 else
7257   echo "configure: failed program was:" >&5
7258   cat conftest.$ac_ext >&5
7259   rm -rf conftest*
7260   eval "ac_cv_func_$ac_func=no"
7261 fi
7262 rm -f conftest*
7263 fi
7264
7265 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7266   echo "$ac_t""yes" 1>&6
7267     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7268   cat >> confdefs.h <<EOF
7269 #define $ac_tr_func 1
7270 EOF
7271  
7272 else
7273   echo "$ac_t""no" 1>&6
7274 fi
7275 done
7276  ;;
7277   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7278 echo "configure:7279: checking for getspnam in -lgen" >&5
7279 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7280 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7281   echo $ac_n "(cached) $ac_c" 1>&6
7282 else
7283   ac_save_LIBS="$LIBS"
7284 LIBS="-lgen  $LIBS"
7285 cat > conftest.$ac_ext <<EOF
7286 #line 7287 "configure"
7287 #include "confdefs.h"
7288 /* Override any gcc2 internal prototype to avoid an error.  */
7289 /* We use char because int might match the return type of a gcc2
7290     builtin and then its argument prototype would still apply.  */
7291 char getspnam();
7292
7293 int main() {
7294 getspnam()
7295 ; return 0; }
7296 EOF
7297 if { (eval echo configure:7298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7298   rm -rf conftest*
7299   eval "ac_cv_lib_$ac_lib_var=yes"
7300 else
7301   echo "configure: failed program was:" >&5
7302   cat conftest.$ac_ext >&5
7303   rm -rf conftest*
7304   eval "ac_cv_lib_$ac_lib_var=no"
7305 fi
7306 rm -f conftest*
7307 LIBS="$ac_save_LIBS"
7308
7309 fi
7310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7311   echo "$ac_t""yes" 1>&6
7312     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7313     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7314   cat >> confdefs.h <<EOF
7315 #define $ac_tr_lib 1
7316 EOF
7317
7318   LIBS="-lgen $LIBS"
7319
7320 else
7321   echo "$ac_t""no" 1>&6
7322 fi
7323  
7324      for ac_func in getspnam
7325 do
7326 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7327 echo "configure:7328: checking for $ac_func" >&5
7328 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7329   echo $ac_n "(cached) $ac_c" 1>&6
7330 else
7331   cat > conftest.$ac_ext <<EOF
7332 #line 7333 "configure"
7333 #include "confdefs.h"
7334 /* System header to define __stub macros and hopefully few prototypes,
7335     which can conflict with char $ac_func(); below.  */
7336 #include <assert.h>
7337 /* Override any gcc2 internal prototype to avoid an error.  */
7338 /* We use char because int might match the return type of a gcc2
7339     builtin and then its argument prototype would still apply.  */
7340 char $ac_func();
7341
7342 int main() {
7343
7344 /* The GNU C library defines this for functions which it implements
7345     to always fail with ENOSYS.  Some functions are actually named
7346     something starting with __ and the normal name is an alias.  */
7347 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7348 choke me
7349 #else
7350 $ac_func();
7351 #endif
7352
7353 ; return 0; }
7354 EOF
7355 if { (eval echo configure:7356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7356   rm -rf conftest*
7357   eval "ac_cv_func_$ac_func=yes"
7358 else
7359   echo "configure: failed program was:" >&5
7360   cat conftest.$ac_ext >&5
7361   rm -rf conftest*
7362   eval "ac_cv_func_$ac_func=no"
7363 fi
7364 rm -f conftest*
7365 fi
7366
7367 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7368   echo "$ac_t""yes" 1>&6
7369     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7370   cat >> confdefs.h <<EOF
7371 #define $ac_tr_func 1
7372 EOF
7373  
7374 else
7375   echo "$ac_t""no" 1>&6
7376 fi
7377 done
7378
7379   ;;
7380   esac
7381
7382
7383 case "$LIBS" in
7384   *-lsecurity*) for ac_func in getspnam
7385 do
7386 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7387 echo "configure:7388: checking for $ac_func" >&5
7388 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7389   echo $ac_n "(cached) $ac_c" 1>&6
7390 else
7391   cat > conftest.$ac_ext <<EOF
7392 #line 7393 "configure"
7393 #include "confdefs.h"
7394 /* System header to define __stub macros and hopefully few prototypes,
7395     which can conflict with char $ac_func(); below.  */
7396 #include <assert.h>
7397 /* Override any gcc2 internal prototype to avoid an error.  */
7398 /* We use char because int might match the return type of a gcc2
7399     builtin and then its argument prototype would still apply.  */
7400 char $ac_func();
7401
7402 int main() {
7403
7404 /* The GNU C library defines this for functions which it implements
7405     to always fail with ENOSYS.  Some functions are actually named
7406     something starting with __ and the normal name is an alias.  */
7407 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7408 choke me
7409 #else
7410 $ac_func();
7411 #endif
7412
7413 ; return 0; }
7414 EOF
7415 if { (eval echo configure:7416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7416   rm -rf conftest*
7417   eval "ac_cv_func_$ac_func=yes"
7418 else
7419   echo "configure: failed program was:" >&5
7420   cat conftest.$ac_ext >&5
7421   rm -rf conftest*
7422   eval "ac_cv_func_$ac_func=no"
7423 fi
7424 rm -f conftest*
7425 fi
7426
7427 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7428   echo "$ac_t""yes" 1>&6
7429     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7430   cat >> confdefs.h <<EOF
7431 #define $ac_tr_func 1
7432 EOF
7433  
7434 else
7435   echo "$ac_t""no" 1>&6
7436 fi
7437 done
7438  ;;
7439   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7440 echo "configure:7441: checking for getspnam in -lsecurity" >&5
7441 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7442 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7443   echo $ac_n "(cached) $ac_c" 1>&6
7444 else
7445   ac_save_LIBS="$LIBS"
7446 LIBS="-lsecurity  $LIBS"
7447 cat > conftest.$ac_ext <<EOF
7448 #line 7449 "configure"
7449 #include "confdefs.h"
7450 /* Override any gcc2 internal prototype to avoid an error.  */
7451 /* We use char because int might match the return type of a gcc2
7452     builtin and then its argument prototype would still apply.  */
7453 char getspnam();
7454
7455 int main() {
7456 getspnam()
7457 ; return 0; }
7458 EOF
7459 if { (eval echo configure:7460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7460   rm -rf conftest*
7461   eval "ac_cv_lib_$ac_lib_var=yes"
7462 else
7463   echo "configure: failed program was:" >&5
7464   cat conftest.$ac_ext >&5
7465   rm -rf conftest*
7466   eval "ac_cv_lib_$ac_lib_var=no"
7467 fi
7468 rm -f conftest*
7469 LIBS="$ac_save_LIBS"
7470
7471 fi
7472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7473   echo "$ac_t""yes" 1>&6
7474     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7475     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7476   cat >> confdefs.h <<EOF
7477 #define $ac_tr_lib 1
7478 EOF
7479
7480   LIBS="-lsecurity $LIBS"
7481
7482 else
7483   echo "$ac_t""no" 1>&6
7484 fi
7485  
7486      for ac_func in getspnam
7487 do
7488 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7489 echo "configure:7490: checking for $ac_func" >&5
7490 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7491   echo $ac_n "(cached) $ac_c" 1>&6
7492 else
7493   cat > conftest.$ac_ext <<EOF
7494 #line 7495 "configure"
7495 #include "confdefs.h"
7496 /* System header to define __stub macros and hopefully few prototypes,
7497     which can conflict with char $ac_func(); below.  */
7498 #include <assert.h>
7499 /* Override any gcc2 internal prototype to avoid an error.  */
7500 /* We use char because int might match the return type of a gcc2
7501     builtin and then its argument prototype would still apply.  */
7502 char $ac_func();
7503
7504 int main() {
7505
7506 /* The GNU C library defines this for functions which it implements
7507     to always fail with ENOSYS.  Some functions are actually named
7508     something starting with __ and the normal name is an alias.  */
7509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7510 choke me
7511 #else
7512 $ac_func();
7513 #endif
7514
7515 ; return 0; }
7516 EOF
7517 if { (eval echo configure:7518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7518   rm -rf conftest*
7519   eval "ac_cv_func_$ac_func=yes"
7520 else
7521   echo "configure: failed program was:" >&5
7522   cat conftest.$ac_ext >&5
7523   rm -rf conftest*
7524   eval "ac_cv_func_$ac_func=no"
7525 fi
7526 rm -f conftest*
7527 fi
7528
7529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7530   echo "$ac_t""yes" 1>&6
7531     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7532   cat >> confdefs.h <<EOF
7533 #define $ac_tr_func 1
7534 EOF
7535  
7536 else
7537   echo "$ac_t""no" 1>&6
7538 fi
7539 done
7540
7541   ;;
7542   esac
7543
7544 case "$LIBS" in
7545   *-lsec*) for ac_func in getspnam
7546 do
7547 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7548 echo "configure:7549: checking for $ac_func" >&5
7549 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7550   echo $ac_n "(cached) $ac_c" 1>&6
7551 else
7552   cat > conftest.$ac_ext <<EOF
7553 #line 7554 "configure"
7554 #include "confdefs.h"
7555 /* System header to define __stub macros and hopefully few prototypes,
7556     which can conflict with char $ac_func(); below.  */
7557 #include <assert.h>
7558 /* Override any gcc2 internal prototype to avoid an error.  */
7559 /* We use char because int might match the return type of a gcc2
7560     builtin and then its argument prototype would still apply.  */
7561 char $ac_func();
7562
7563 int main() {
7564
7565 /* The GNU C library defines this for functions which it implements
7566     to always fail with ENOSYS.  Some functions are actually named
7567     something starting with __ and the normal name is an alias.  */
7568 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7569 choke me
7570 #else
7571 $ac_func();
7572 #endif
7573
7574 ; return 0; }
7575 EOF
7576 if { (eval echo configure:7577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7577   rm -rf conftest*
7578   eval "ac_cv_func_$ac_func=yes"
7579 else
7580   echo "configure: failed program was:" >&5
7581   cat conftest.$ac_ext >&5
7582   rm -rf conftest*
7583   eval "ac_cv_func_$ac_func=no"
7584 fi
7585 rm -f conftest*
7586 fi
7587
7588 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7589   echo "$ac_t""yes" 1>&6
7590     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7591   cat >> confdefs.h <<EOF
7592 #define $ac_tr_func 1
7593 EOF
7594  
7595 else
7596   echo "$ac_t""no" 1>&6
7597 fi
7598 done
7599  ;;
7600   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7601 echo "configure:7602: checking for getspnam in -lsec" >&5
7602 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7603 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7604   echo $ac_n "(cached) $ac_c" 1>&6
7605 else
7606   ac_save_LIBS="$LIBS"
7607 LIBS="-lsec  $LIBS"
7608 cat > conftest.$ac_ext <<EOF
7609 #line 7610 "configure"
7610 #include "confdefs.h"
7611 /* Override any gcc2 internal prototype to avoid an error.  */
7612 /* We use char because int might match the return type of a gcc2
7613     builtin and then its argument prototype would still apply.  */
7614 char getspnam();
7615
7616 int main() {
7617 getspnam()
7618 ; return 0; }
7619 EOF
7620 if { (eval echo configure:7621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7621   rm -rf conftest*
7622   eval "ac_cv_lib_$ac_lib_var=yes"
7623 else
7624   echo "configure: failed program was:" >&5
7625   cat conftest.$ac_ext >&5
7626   rm -rf conftest*
7627   eval "ac_cv_lib_$ac_lib_var=no"
7628 fi
7629 rm -f conftest*
7630 LIBS="$ac_save_LIBS"
7631
7632 fi
7633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7634   echo "$ac_t""yes" 1>&6
7635     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7636     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7637   cat >> confdefs.h <<EOF
7638 #define $ac_tr_lib 1
7639 EOF
7640
7641   LIBS="-lsec $LIBS"
7642
7643 else
7644   echo "$ac_t""no" 1>&6
7645 fi
7646  
7647      for ac_func in getspnam
7648 do
7649 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7650 echo "configure:7651: checking for $ac_func" >&5
7651 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7652   echo $ac_n "(cached) $ac_c" 1>&6
7653 else
7654   cat > conftest.$ac_ext <<EOF
7655 #line 7656 "configure"
7656 #include "confdefs.h"
7657 /* System header to define __stub macros and hopefully few prototypes,
7658     which can conflict with char $ac_func(); below.  */
7659 #include <assert.h>
7660 /* Override any gcc2 internal prototype to avoid an error.  */
7661 /* We use char because int might match the return type of a gcc2
7662     builtin and then its argument prototype would still apply.  */
7663 char $ac_func();
7664
7665 int main() {
7666
7667 /* The GNU C library defines this for functions which it implements
7668     to always fail with ENOSYS.  Some functions are actually named
7669     something starting with __ and the normal name is an alias.  */
7670 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7671 choke me
7672 #else
7673 $ac_func();
7674 #endif
7675
7676 ; return 0; }
7677 EOF
7678 if { (eval echo configure:7679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7679   rm -rf conftest*
7680   eval "ac_cv_func_$ac_func=yes"
7681 else
7682   echo "configure: failed program was:" >&5
7683   cat conftest.$ac_ext >&5
7684   rm -rf conftest*
7685   eval "ac_cv_func_$ac_func=no"
7686 fi
7687 rm -f conftest*
7688 fi
7689
7690 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7691   echo "$ac_t""yes" 1>&6
7692     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7693   cat >> confdefs.h <<EOF
7694 #define $ac_tr_func 1
7695 EOF
7696  
7697 else
7698   echo "$ac_t""no" 1>&6
7699 fi
7700 done
7701
7702   ;;
7703   esac
7704
7705
7706 case "$LIBS" in
7707   *-lsecurity*) for ac_func in bigcrypt
7708 do
7709 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7710 echo "configure:7711: checking for $ac_func" >&5
7711 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7712   echo $ac_n "(cached) $ac_c" 1>&6
7713 else
7714   cat > conftest.$ac_ext <<EOF
7715 #line 7716 "configure"
7716 #include "confdefs.h"
7717 /* System header to define __stub macros and hopefully few prototypes,
7718     which can conflict with char $ac_func(); below.  */
7719 #include <assert.h>
7720 /* Override any gcc2 internal prototype to avoid an error.  */
7721 /* We use char because int might match the return type of a gcc2
7722     builtin and then its argument prototype would still apply.  */
7723 char $ac_func();
7724
7725 int main() {
7726
7727 /* The GNU C library defines this for functions which it implements
7728     to always fail with ENOSYS.  Some functions are actually named
7729     something starting with __ and the normal name is an alias.  */
7730 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7731 choke me
7732 #else
7733 $ac_func();
7734 #endif
7735
7736 ; return 0; }
7737 EOF
7738 if { (eval echo configure:7739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7739   rm -rf conftest*
7740   eval "ac_cv_func_$ac_func=yes"
7741 else
7742   echo "configure: failed program was:" >&5
7743   cat conftest.$ac_ext >&5
7744   rm -rf conftest*
7745   eval "ac_cv_func_$ac_func=no"
7746 fi
7747 rm -f conftest*
7748 fi
7749
7750 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7751   echo "$ac_t""yes" 1>&6
7752     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7753   cat >> confdefs.h <<EOF
7754 #define $ac_tr_func 1
7755 EOF
7756  
7757 else
7758   echo "$ac_t""no" 1>&6
7759 fi
7760 done
7761  ;;
7762   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7763 echo "configure:7764: checking for bigcrypt in -lsecurity" >&5
7764 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7765 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7766   echo $ac_n "(cached) $ac_c" 1>&6
7767 else
7768   ac_save_LIBS="$LIBS"
7769 LIBS="-lsecurity  $LIBS"
7770 cat > conftest.$ac_ext <<EOF
7771 #line 7772 "configure"
7772 #include "confdefs.h"
7773 /* Override any gcc2 internal prototype to avoid an error.  */
7774 /* We use char because int might match the return type of a gcc2
7775     builtin and then its argument prototype would still apply.  */
7776 char bigcrypt();
7777
7778 int main() {
7779 bigcrypt()
7780 ; return 0; }
7781 EOF
7782 if { (eval echo configure:7783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7783   rm -rf conftest*
7784   eval "ac_cv_lib_$ac_lib_var=yes"
7785 else
7786   echo "configure: failed program was:" >&5
7787   cat conftest.$ac_ext >&5
7788   rm -rf conftest*
7789   eval "ac_cv_lib_$ac_lib_var=no"
7790 fi
7791 rm -f conftest*
7792 LIBS="$ac_save_LIBS"
7793
7794 fi
7795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7796   echo "$ac_t""yes" 1>&6
7797     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7798     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7799   cat >> confdefs.h <<EOF
7800 #define $ac_tr_lib 1
7801 EOF
7802
7803   LIBS="-lsecurity $LIBS"
7804
7805 else
7806   echo "$ac_t""no" 1>&6
7807 fi
7808  
7809      for ac_func in bigcrypt
7810 do
7811 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7812 echo "configure:7813: checking for $ac_func" >&5
7813 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7814   echo $ac_n "(cached) $ac_c" 1>&6
7815 else
7816   cat > conftest.$ac_ext <<EOF
7817 #line 7818 "configure"
7818 #include "confdefs.h"
7819 /* System header to define __stub macros and hopefully few prototypes,
7820     which can conflict with char $ac_func(); below.  */
7821 #include <assert.h>
7822 /* Override any gcc2 internal prototype to avoid an error.  */
7823 /* We use char because int might match the return type of a gcc2
7824     builtin and then its argument prototype would still apply.  */
7825 char $ac_func();
7826
7827 int main() {
7828
7829 /* The GNU C library defines this for functions which it implements
7830     to always fail with ENOSYS.  Some functions are actually named
7831     something starting with __ and the normal name is an alias.  */
7832 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7833 choke me
7834 #else
7835 $ac_func();
7836 #endif
7837
7838 ; return 0; }
7839 EOF
7840 if { (eval echo configure:7841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7841   rm -rf conftest*
7842   eval "ac_cv_func_$ac_func=yes"
7843 else
7844   echo "configure: failed program was:" >&5
7845   cat conftest.$ac_ext >&5
7846   rm -rf conftest*
7847   eval "ac_cv_func_$ac_func=no"
7848 fi
7849 rm -f conftest*
7850 fi
7851
7852 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7853   echo "$ac_t""yes" 1>&6
7854     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7855   cat >> confdefs.h <<EOF
7856 #define $ac_tr_func 1
7857 EOF
7858  
7859 else
7860   echo "$ac_t""no" 1>&6
7861 fi
7862 done
7863
7864   ;;
7865   esac
7866
7867 case "$LIBS" in
7868   *-lsec*) for ac_func in bigcrypt
7869 do
7870 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7871 echo "configure:7872: checking for $ac_func" >&5
7872 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7873   echo $ac_n "(cached) $ac_c" 1>&6
7874 else
7875   cat > conftest.$ac_ext <<EOF
7876 #line 7877 "configure"
7877 #include "confdefs.h"
7878 /* System header to define __stub macros and hopefully few prototypes,
7879     which can conflict with char $ac_func(); below.  */
7880 #include <assert.h>
7881 /* Override any gcc2 internal prototype to avoid an error.  */
7882 /* We use char because int might match the return type of a gcc2
7883     builtin and then its argument prototype would still apply.  */
7884 char $ac_func();
7885
7886 int main() {
7887
7888 /* The GNU C library defines this for functions which it implements
7889     to always fail with ENOSYS.  Some functions are actually named
7890     something starting with __ and the normal name is an alias.  */
7891 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7892 choke me
7893 #else
7894 $ac_func();
7895 #endif
7896
7897 ; return 0; }
7898 EOF
7899 if { (eval echo configure:7900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7900   rm -rf conftest*
7901   eval "ac_cv_func_$ac_func=yes"
7902 else
7903   echo "configure: failed program was:" >&5
7904   cat conftest.$ac_ext >&5
7905   rm -rf conftest*
7906   eval "ac_cv_func_$ac_func=no"
7907 fi
7908 rm -f conftest*
7909 fi
7910
7911 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7912   echo "$ac_t""yes" 1>&6
7913     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7914   cat >> confdefs.h <<EOF
7915 #define $ac_tr_func 1
7916 EOF
7917  
7918 else
7919   echo "$ac_t""no" 1>&6
7920 fi
7921 done
7922  ;;
7923   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7924 echo "configure:7925: checking for bigcrypt in -lsec" >&5
7925 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7926 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7927   echo $ac_n "(cached) $ac_c" 1>&6
7928 else
7929   ac_save_LIBS="$LIBS"
7930 LIBS="-lsec  $LIBS"
7931 cat > conftest.$ac_ext <<EOF
7932 #line 7933 "configure"
7933 #include "confdefs.h"
7934 /* Override any gcc2 internal prototype to avoid an error.  */
7935 /* We use char because int might match the return type of a gcc2
7936     builtin and then its argument prototype would still apply.  */
7937 char bigcrypt();
7938
7939 int main() {
7940 bigcrypt()
7941 ; return 0; }
7942 EOF
7943 if { (eval echo configure:7944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7944   rm -rf conftest*
7945   eval "ac_cv_lib_$ac_lib_var=yes"
7946 else
7947   echo "configure: failed program was:" >&5
7948   cat conftest.$ac_ext >&5
7949   rm -rf conftest*
7950   eval "ac_cv_lib_$ac_lib_var=no"
7951 fi
7952 rm -f conftest*
7953 LIBS="$ac_save_LIBS"
7954
7955 fi
7956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7957   echo "$ac_t""yes" 1>&6
7958     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7959     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7960   cat >> confdefs.h <<EOF
7961 #define $ac_tr_lib 1
7962 EOF
7963
7964   LIBS="-lsec $LIBS"
7965
7966 else
7967   echo "$ac_t""no" 1>&6
7968 fi
7969  
7970      for ac_func in bigcrypt
7971 do
7972 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7973 echo "configure:7974: checking for $ac_func" >&5
7974 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7975   echo $ac_n "(cached) $ac_c" 1>&6
7976 else
7977   cat > conftest.$ac_ext <<EOF
7978 #line 7979 "configure"
7979 #include "confdefs.h"
7980 /* System header to define __stub macros and hopefully few prototypes,
7981     which can conflict with char $ac_func(); below.  */
7982 #include <assert.h>
7983 /* Override any gcc2 internal prototype to avoid an error.  */
7984 /* We use char because int might match the return type of a gcc2
7985     builtin and then its argument prototype would still apply.  */
7986 char $ac_func();
7987
7988 int main() {
7989
7990 /* The GNU C library defines this for functions which it implements
7991     to always fail with ENOSYS.  Some functions are actually named
7992     something starting with __ and the normal name is an alias.  */
7993 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7994 choke me
7995 #else
7996 $ac_func();
7997 #endif
7998
7999 ; return 0; }
8000 EOF
8001 if { (eval echo configure:8002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8002   rm -rf conftest*
8003   eval "ac_cv_func_$ac_func=yes"
8004 else
8005   echo "configure: failed program was:" >&5
8006   cat conftest.$ac_ext >&5
8007   rm -rf conftest*
8008   eval "ac_cv_func_$ac_func=no"
8009 fi
8010 rm -f conftest*
8011 fi
8012
8013 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8014   echo "$ac_t""yes" 1>&6
8015     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8016   cat >> confdefs.h <<EOF
8017 #define $ac_tr_func 1
8018 EOF
8019  
8020 else
8021   echo "$ac_t""no" 1>&6
8022 fi
8023 done
8024
8025   ;;
8026   esac
8027
8028
8029 case "$LIBS" in
8030   *-lsecurity*) for ac_func in getprpwnam
8031 do
8032 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8033 echo "configure:8034: checking for $ac_func" >&5
8034 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8035   echo $ac_n "(cached) $ac_c" 1>&6
8036 else
8037   cat > conftest.$ac_ext <<EOF
8038 #line 8039 "configure"
8039 #include "confdefs.h"
8040 /* System header to define __stub macros and hopefully few prototypes,
8041     which can conflict with char $ac_func(); below.  */
8042 #include <assert.h>
8043 /* Override any gcc2 internal prototype to avoid an error.  */
8044 /* We use char because int might match the return type of a gcc2
8045     builtin and then its argument prototype would still apply.  */
8046 char $ac_func();
8047
8048 int main() {
8049
8050 /* The GNU C library defines this for functions which it implements
8051     to always fail with ENOSYS.  Some functions are actually named
8052     something starting with __ and the normal name is an alias.  */
8053 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8054 choke me
8055 #else
8056 $ac_func();
8057 #endif
8058
8059 ; return 0; }
8060 EOF
8061 if { (eval echo configure:8062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8062   rm -rf conftest*
8063   eval "ac_cv_func_$ac_func=yes"
8064 else
8065   echo "configure: failed program was:" >&5
8066   cat conftest.$ac_ext >&5
8067   rm -rf conftest*
8068   eval "ac_cv_func_$ac_func=no"
8069 fi
8070 rm -f conftest*
8071 fi
8072
8073 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8074   echo "$ac_t""yes" 1>&6
8075     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8076   cat >> confdefs.h <<EOF
8077 #define $ac_tr_func 1
8078 EOF
8079  
8080 else
8081   echo "$ac_t""no" 1>&6
8082 fi
8083 done
8084  ;;
8085   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8086 echo "configure:8087: checking for getprpwnam in -lsecurity" >&5
8087 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8088 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8089   echo $ac_n "(cached) $ac_c" 1>&6
8090 else
8091   ac_save_LIBS="$LIBS"
8092 LIBS="-lsecurity  $LIBS"
8093 cat > conftest.$ac_ext <<EOF
8094 #line 8095 "configure"
8095 #include "confdefs.h"
8096 /* Override any gcc2 internal prototype to avoid an error.  */
8097 /* We use char because int might match the return type of a gcc2
8098     builtin and then its argument prototype would still apply.  */
8099 char getprpwnam();
8100
8101 int main() {
8102 getprpwnam()
8103 ; return 0; }
8104 EOF
8105 if { (eval echo configure:8106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8106   rm -rf conftest*
8107   eval "ac_cv_lib_$ac_lib_var=yes"
8108 else
8109   echo "configure: failed program was:" >&5
8110   cat conftest.$ac_ext >&5
8111   rm -rf conftest*
8112   eval "ac_cv_lib_$ac_lib_var=no"
8113 fi
8114 rm -f conftest*
8115 LIBS="$ac_save_LIBS"
8116
8117 fi
8118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8119   echo "$ac_t""yes" 1>&6
8120     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8121     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8122   cat >> confdefs.h <<EOF
8123 #define $ac_tr_lib 1
8124 EOF
8125
8126   LIBS="-lsecurity $LIBS"
8127
8128 else
8129   echo "$ac_t""no" 1>&6
8130 fi
8131  
8132      for ac_func in getprpwnam
8133 do
8134 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8135 echo "configure:8136: checking for $ac_func" >&5
8136 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8137   echo $ac_n "(cached) $ac_c" 1>&6
8138 else
8139   cat > conftest.$ac_ext <<EOF
8140 #line 8141 "configure"
8141 #include "confdefs.h"
8142 /* System header to define __stub macros and hopefully few prototypes,
8143     which can conflict with char $ac_func(); below.  */
8144 #include <assert.h>
8145 /* Override any gcc2 internal prototype to avoid an error.  */
8146 /* We use char because int might match the return type of a gcc2
8147     builtin and then its argument prototype would still apply.  */
8148 char $ac_func();
8149
8150 int main() {
8151
8152 /* The GNU C library defines this for functions which it implements
8153     to always fail with ENOSYS.  Some functions are actually named
8154     something starting with __ and the normal name is an alias.  */
8155 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8156 choke me
8157 #else
8158 $ac_func();
8159 #endif
8160
8161 ; return 0; }
8162 EOF
8163 if { (eval echo configure:8164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8164   rm -rf conftest*
8165   eval "ac_cv_func_$ac_func=yes"
8166 else
8167   echo "configure: failed program was:" >&5
8168   cat conftest.$ac_ext >&5
8169   rm -rf conftest*
8170   eval "ac_cv_func_$ac_func=no"
8171 fi
8172 rm -f conftest*
8173 fi
8174
8175 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8176   echo "$ac_t""yes" 1>&6
8177     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8178   cat >> confdefs.h <<EOF
8179 #define $ac_tr_func 1
8180 EOF
8181  
8182 else
8183   echo "$ac_t""no" 1>&6
8184 fi
8185 done
8186
8187   ;;
8188   esac
8189
8190 case "$LIBS" in
8191   *-lsec*) for ac_func in getprpwnam
8192 do
8193 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8194 echo "configure:8195: checking for $ac_func" >&5
8195 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8196   echo $ac_n "(cached) $ac_c" 1>&6
8197 else
8198   cat > conftest.$ac_ext <<EOF
8199 #line 8200 "configure"
8200 #include "confdefs.h"
8201 /* System header to define __stub macros and hopefully few prototypes,
8202     which can conflict with char $ac_func(); below.  */
8203 #include <assert.h>
8204 /* Override any gcc2 internal prototype to avoid an error.  */
8205 /* We use char because int might match the return type of a gcc2
8206     builtin and then its argument prototype would still apply.  */
8207 char $ac_func();
8208
8209 int main() {
8210
8211 /* The GNU C library defines this for functions which it implements
8212     to always fail with ENOSYS.  Some functions are actually named
8213     something starting with __ and the normal name is an alias.  */
8214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8215 choke me
8216 #else
8217 $ac_func();
8218 #endif
8219
8220 ; return 0; }
8221 EOF
8222 if { (eval echo configure:8223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8223   rm -rf conftest*
8224   eval "ac_cv_func_$ac_func=yes"
8225 else
8226   echo "configure: failed program was:" >&5
8227   cat conftest.$ac_ext >&5
8228   rm -rf conftest*
8229   eval "ac_cv_func_$ac_func=no"
8230 fi
8231 rm -f conftest*
8232 fi
8233
8234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8235   echo "$ac_t""yes" 1>&6
8236     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8237   cat >> confdefs.h <<EOF
8238 #define $ac_tr_func 1
8239 EOF
8240  
8241 else
8242   echo "$ac_t""no" 1>&6
8243 fi
8244 done
8245  ;;
8246   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8247 echo "configure:8248: checking for getprpwnam in -lsec" >&5
8248 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8249 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8250   echo $ac_n "(cached) $ac_c" 1>&6
8251 else
8252   ac_save_LIBS="$LIBS"
8253 LIBS="-lsec  $LIBS"
8254 cat > conftest.$ac_ext <<EOF
8255 #line 8256 "configure"
8256 #include "confdefs.h"
8257 /* Override any gcc2 internal prototype to avoid an error.  */
8258 /* We use char because int might match the return type of a gcc2
8259     builtin and then its argument prototype would still apply.  */
8260 char getprpwnam();
8261
8262 int main() {
8263 getprpwnam()
8264 ; return 0; }
8265 EOF
8266 if { (eval echo configure:8267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8267   rm -rf conftest*
8268   eval "ac_cv_lib_$ac_lib_var=yes"
8269 else
8270   echo "configure: failed program was:" >&5
8271   cat conftest.$ac_ext >&5
8272   rm -rf conftest*
8273   eval "ac_cv_lib_$ac_lib_var=no"
8274 fi
8275 rm -f conftest*
8276 LIBS="$ac_save_LIBS"
8277
8278 fi
8279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8280   echo "$ac_t""yes" 1>&6
8281     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8282     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8283   cat >> confdefs.h <<EOF
8284 #define $ac_tr_lib 1
8285 EOF
8286
8287   LIBS="-lsec $LIBS"
8288
8289 else
8290   echo "$ac_t""no" 1>&6
8291 fi
8292  
8293      for ac_func in getprpwnam
8294 do
8295 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8296 echo "configure:8297: checking for $ac_func" >&5
8297 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8298   echo $ac_n "(cached) $ac_c" 1>&6
8299 else
8300   cat > conftest.$ac_ext <<EOF
8301 #line 8302 "configure"
8302 #include "confdefs.h"
8303 /* System header to define __stub macros and hopefully few prototypes,
8304     which can conflict with char $ac_func(); below.  */
8305 #include <assert.h>
8306 /* Override any gcc2 internal prototype to avoid an error.  */
8307 /* We use char because int might match the return type of a gcc2
8308     builtin and then its argument prototype would still apply.  */
8309 char $ac_func();
8310
8311 int main() {
8312
8313 /* The GNU C library defines this for functions which it implements
8314     to always fail with ENOSYS.  Some functions are actually named
8315     something starting with __ and the normal name is an alias.  */
8316 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8317 choke me
8318 #else
8319 $ac_func();
8320 #endif
8321
8322 ; return 0; }
8323 EOF
8324 if { (eval echo configure:8325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8325   rm -rf conftest*
8326   eval "ac_cv_func_$ac_func=yes"
8327 else
8328   echo "configure: failed program was:" >&5
8329   cat conftest.$ac_ext >&5
8330   rm -rf conftest*
8331   eval "ac_cv_func_$ac_func=no"
8332 fi
8333 rm -f conftest*
8334 fi
8335
8336 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8337   echo "$ac_t""yes" 1>&6
8338     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8339   cat >> confdefs.h <<EOF
8340 #define $ac_tr_func 1
8341 EOF
8342  
8343 else
8344   echo "$ac_t""no" 1>&6
8345 fi
8346 done
8347
8348   ;;
8349   esac
8350
8351
8352 # this bit needs to be modified for each OS that is suported by
8353 # smbwrapper. You need to specify how to created a shared library and
8354 # how to compile C code to produce PIC object files
8355
8356 # these are the defaults, good for lots of systems
8357 HOST_OS="$host_os"
8358 LDSHFLAGS="-shared"
8359 SHLD="\${CC}"
8360 PICFLAG=""
8361 PICSUFFIX="po"
8362 POBAD_CC="#"
8363 SHLIBEXT="so"
8364 BLDSHARED="false"
8365
8366 # and these are for particular systems
8367 case "$host_os" in
8368                 *linux*)   cat >> confdefs.h <<\EOF
8369 #define LINUX 1
8370 EOF
8371
8372                         BLDSHARED="true"
8373                         LDSHFLAGS="-shared" 
8374                         PICFLAG="-fPIC"
8375                 ;;
8376                 *solaris*) cat >> confdefs.h <<\EOF
8377 #define SUNOS5 1
8378 EOF
8379
8380                         BLDSHARED="true"
8381                         LDSHFLAGS="-Wl,-h,\$@.so -G"
8382                         if test "${ac_cv_prog_CC}" = "gcc"; then
8383                                 PICFLAG="-fPIC"
8384                         else
8385                                 PICFLAG="-KPIC"
8386                                 POBAD_CC=""
8387                                 PICSUFFIX="po.o"
8388                         fi
8389                 ;;
8390                 *sunos*) cat >> confdefs.h <<\EOF
8391 #define SUNOS4 1
8392 EOF
8393
8394                         BLDSHARED="true"
8395                         LDSHFLAGS="-Wl,-h,\$@ -G"
8396                         PICFLAG="-KPIC"   # Is this correct for SunOS
8397                 ;;
8398                 *bsd*)  BLDSHARED="true"
8399                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8400                         PICFLAG="-fPIC"
8401                 ;;
8402                 *irix*) cat >> confdefs.h <<\EOF
8403 #define IRIX 1
8404 EOF
8405
8406                         case "$host_os" in
8407                         *irix6*) cat >> confdefs.h <<\EOF
8408 #define IRIX6 1
8409 EOF
8410
8411                         ;;
8412                         esac
8413                         ATTEMPT_WRAP32_BUILD=yes
8414                         BLDSHARED="true"
8415                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8416                         if test "${ac_cv_prog_CC}" = "gcc"; then
8417                                 PICFLAG="-fPIC"
8418                         else 
8419                                 PICFLAG="-KPIC"
8420                         fi
8421                 ;;
8422                 *aix*) cat >> confdefs.h <<\EOF
8423 #define AIX 1
8424 EOF
8425
8426                         BLDSHARED="true"
8427                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8428                         PICFLAG="-O2 -qmaxmem=6000"
8429                 ;;
8430                 *hpux*) cat >> confdefs.h <<\EOF
8431 #define HPUX 1
8432 EOF
8433
8434                         SHLIBEXT="sl"
8435                         # Use special PIC flags for the native HP-UX compiler.
8436                         if test $ac_cv_prog_cc_Ae = yes; then
8437                                 #BLDSHARED="true"
8438                                 LDSHFLAGS="-b -z +h \$@"
8439                                 PICFLAG="+z"
8440                         fi
8441                 ;;
8442                 *qnx*) cat >> confdefs.h <<\EOF
8443 #define QNX 1
8444 EOF
8445 ;;
8446                 *osf*) cat >> confdefs.h <<\EOF
8447 #define OSF1 1
8448 EOF
8449
8450                         BLDSHARED="true"
8451                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8452                         PICFLAG="-fPIC"
8453                 ;;
8454                 *sco*) cat >> confdefs.h <<\EOF
8455 #define SCO 1
8456 EOF
8457 ;;
8458                 *unixware*) cat >> confdefs.h <<\EOF
8459 #define UNIXWARE 1
8460 EOF
8461
8462                         BLDSHARED="true"
8463                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8464                         PICFLAG="-KPIC"
8465                 ;;
8466                 *next2*) cat >> confdefs.h <<\EOF
8467 #define NEXT2 1
8468 EOF
8469 ;;
8470                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8471 set dummy groff; ac_word=$2
8472 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8473 echo "configure:8474: checking for $ac_word" >&5
8474 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8475   echo $ac_n "(cached) $ac_c" 1>&6
8476 else
8477   if test -n "$ROFF"; then
8478   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8479 else
8480   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8481   ac_dummy="$PATH"
8482   for ac_dir in $ac_dummy; do
8483     test -z "$ac_dir" && ac_dir=.
8484     if test -f $ac_dir/$ac_word; then
8485       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8486       break
8487     fi
8488   done
8489   IFS="$ac_save_ifs"
8490 fi
8491 fi
8492 ROFF="$ac_cv_prog_ROFF"
8493 if test -n "$ROFF"; then
8494   echo "$ac_t""$ROFF" 1>&6
8495 else
8496   echo "$ac_t""no" 1>&6
8497 fi
8498 ;;
8499                 *sysv4*)
8500                         case "$host" in
8501                                 *-univel-*)     if  test "$GCC" != yes ; then
8502                                                                         cat >> confdefs.h <<\EOF
8503 #define HAVE_MEMSET 1
8504 EOF
8505
8506                                                                 fi
8507                                                                 LDSHFLAGS="-G"
8508                                 ;;
8509                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8510 #define RELIANTUNIX 1
8511 EOF
8512 ;;
8513                         esac
8514                         ;;
8515                 *sysv5*)
8516                         if  test "$GCC" != yes ; then
8517                                 cat >> confdefs.h <<\EOF
8518 #define HAVE_MEMSET 1
8519 EOF
8520
8521                         fi
8522                         LDSHFLAGS="-G"
8523                         ;;
8524 esac
8525
8526 # this updates our target list if we can build shared libs
8527 if test $BLDSHARED = true; then
8528    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8529 else
8530    LIBSMBCLIENT_SHARED=
8531 fi
8532
8533 ################
8534
8535 echo $ac_n "checking for long long""... $ac_c" 1>&6
8536 echo "configure:8537: checking for long long" >&5
8537 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8538   echo $ac_n "(cached) $ac_c" 1>&6
8539 else
8540   
8541 if test "$cross_compiling" = yes; then
8542   samba_cv_have_longlong=cross
8543 else
8544   cat > conftest.$ac_ext <<EOF
8545 #line 8546 "configure"
8546 #include "confdefs.h"
8547 #include <stdio.h>
8548 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8549 EOF
8550 if { (eval echo configure:8551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8551 then
8552   samba_cv_have_longlong=yes
8553 else
8554   echo "configure: failed program was:" >&5
8555   cat conftest.$ac_ext >&5
8556   rm -fr conftest*
8557   samba_cv_have_longlong=no
8558 fi
8559 rm -fr conftest*
8560 fi
8561
8562 fi
8563
8564 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8565 if test x"$samba_cv_have_longlong" = x"yes"; then
8566     cat >> confdefs.h <<\EOF
8567 #define HAVE_LONGLONG 1
8568 EOF
8569
8570 fi
8571
8572 #
8573 # Check if the compiler supports the LL prefix on long long integers.
8574 # AIX needs this.
8575
8576 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8577 echo "configure:8578: checking for LL suffix on long long integers" >&5
8578 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8579   echo $ac_n "(cached) $ac_c" 1>&6
8580 else
8581   
8582     cat > conftest.$ac_ext <<EOF
8583 #line 8584 "configure"
8584 #include "confdefs.h"
8585 #include <stdio.h>
8586 int main() {
8587 long long i = 0x8000000000LL
8588 ; return 0; }
8589 EOF
8590 if { (eval echo configure:8591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8591   rm -rf conftest*
8592   samba_cv_compiler_supports_ll=yes
8593 else
8594   echo "configure: failed program was:" >&5
8595   cat conftest.$ac_ext >&5
8596   rm -rf conftest*
8597   samba_cv_compiler_supports_ll=no
8598 fi
8599 rm -f conftest*
8600 fi
8601
8602 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8603 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8604    cat >> confdefs.h <<\EOF
8605 #define COMPILER_SUPPORTS_LL 1
8606 EOF
8607
8608 fi
8609
8610   
8611 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8612 echo "configure:8613: checking for 64 bit off_t" >&5
8613 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8614   echo $ac_n "(cached) $ac_c" 1>&6
8615 else
8616   
8617 if test "$cross_compiling" = yes; then
8618   samba_cv_SIZEOF_OFF_T=cross
8619 else
8620   cat > conftest.$ac_ext <<EOF
8621 #line 8622 "configure"
8622 #include "confdefs.h"
8623 #include <stdio.h>
8624 #include <sys/stat.h>
8625 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8626 EOF
8627 if { (eval echo configure:8628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8628 then
8629   samba_cv_SIZEOF_OFF_T=yes
8630 else
8631   echo "configure: failed program was:" >&5
8632   cat conftest.$ac_ext >&5
8633   rm -fr conftest*
8634   samba_cv_SIZEOF_OFF_T=no
8635 fi
8636 rm -fr conftest*
8637 fi
8638
8639 fi
8640
8641 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8642 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8643     cat >> confdefs.h <<\EOF
8644 #define SIZEOF_OFF_T 8
8645 EOF
8646
8647 fi
8648
8649 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8650 echo "configure:8651: checking for off64_t" >&5
8651 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8652   echo $ac_n "(cached) $ac_c" 1>&6
8653 else
8654   
8655 if test "$cross_compiling" = yes; then
8656   samba_cv_HAVE_OFF64_T=cross
8657 else
8658   cat > conftest.$ac_ext <<EOF
8659 #line 8660 "configure"
8660 #include "confdefs.h"
8661
8662 #if defined(HAVE_UNISTD_H)
8663 #include <unistd.h>
8664 #endif
8665 #include <stdio.h>
8666 #include <sys/stat.h>
8667 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8668 EOF
8669 if { (eval echo configure:8670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8670 then
8671   samba_cv_HAVE_OFF64_T=yes
8672 else
8673   echo "configure: failed program was:" >&5
8674   cat conftest.$ac_ext >&5
8675   rm -fr conftest*
8676   samba_cv_HAVE_OFF64_T=no
8677 fi
8678 rm -fr conftest*
8679 fi
8680
8681 fi
8682
8683 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8684 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8685     cat >> confdefs.h <<\EOF
8686 #define HAVE_OFF64_T 1
8687 EOF
8688
8689 fi
8690
8691 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8692 echo "configure:8693: checking for 64 bit ino_t" >&5
8693 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8694   echo $ac_n "(cached) $ac_c" 1>&6
8695 else
8696   
8697 if test "$cross_compiling" = yes; then
8698   samba_cv_SIZEOF_INO_T=cross
8699 else
8700   cat > conftest.$ac_ext <<EOF
8701 #line 8702 "configure"
8702 #include "confdefs.h"
8703 #include <stdio.h>
8704 #include <sys/stat.h>
8705 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8706 EOF
8707 if { (eval echo configure:8708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8708 then
8709   samba_cv_SIZEOF_INO_T=yes
8710 else
8711   echo "configure: failed program was:" >&5
8712   cat conftest.$ac_ext >&5
8713   rm -fr conftest*
8714   samba_cv_SIZEOF_INO_T=no
8715 fi
8716 rm -fr conftest*
8717 fi
8718
8719 fi
8720
8721 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8722 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8723     cat >> confdefs.h <<\EOF
8724 #define SIZEOF_INO_T 8
8725 EOF
8726
8727 fi
8728
8729 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8730 echo "configure:8731: checking for ino64_t" >&5
8731 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8732   echo $ac_n "(cached) $ac_c" 1>&6
8733 else
8734   
8735 if test "$cross_compiling" = yes; then
8736   samba_cv_HAVE_INO64_T=cross
8737 else
8738   cat > conftest.$ac_ext <<EOF
8739 #line 8740 "configure"
8740 #include "confdefs.h"
8741
8742 #if defined(HAVE_UNISTD_H)
8743 #include <unistd.h>
8744 #endif
8745 #include <stdio.h>
8746 #include <sys/stat.h>
8747 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8748 EOF
8749 if { (eval echo configure:8750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8750 then
8751   samba_cv_HAVE_INO64_T=yes
8752 else
8753   echo "configure: failed program was:" >&5
8754   cat conftest.$ac_ext >&5
8755   rm -fr conftest*
8756   samba_cv_HAVE_INO64_T=no
8757 fi
8758 rm -fr conftest*
8759 fi
8760
8761 fi
8762
8763 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8764 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8765     cat >> confdefs.h <<\EOF
8766 #define HAVE_INO64_T 1
8767 EOF
8768
8769 fi
8770
8771 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8772 echo "configure:8773: checking for struct dirent64" >&5
8773 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8774   echo $ac_n "(cached) $ac_c" 1>&6
8775 else
8776   
8777 cat > conftest.$ac_ext <<EOF
8778 #line 8779 "configure"
8779 #include "confdefs.h"
8780
8781 #if defined(HAVE_UNISTD_H)
8782 #include <unistd.h>
8783 #endif
8784 #include <sys/types.h>
8785 #include <dirent.h>
8786 int main() {
8787 struct dirent64 de;
8788 ; return 0; }
8789 EOF
8790 if { (eval echo configure:8791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8791   rm -rf conftest*
8792   samba_cv_HAVE_STRUCT_DIRENT64=yes
8793 else
8794   echo "configure: failed program was:" >&5
8795   cat conftest.$ac_ext >&5
8796   rm -rf conftest*
8797   samba_cv_HAVE_STRUCT_DIRENT64=no
8798 fi
8799 rm -f conftest*
8800 fi
8801
8802 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8803 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8804     cat >> confdefs.h <<\EOF
8805 #define HAVE_STRUCT_DIRENT64 1
8806 EOF
8807
8808 fi
8809
8810 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8811 echo "configure:8812: checking for unsigned char" >&5
8812 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8813   echo $ac_n "(cached) $ac_c" 1>&6
8814 else
8815   
8816 if test "$cross_compiling" = yes; then
8817   samba_cv_HAVE_UNSIGNED_CHAR=cross
8818 else
8819   cat > conftest.$ac_ext <<EOF
8820 #line 8821 "configure"
8821 #include "confdefs.h"
8822 #include <stdio.h>
8823 main() { char c; c=250; exit((c > 0)?0:1); }
8824 EOF
8825 if { (eval echo configure:8826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8826 then
8827   samba_cv_HAVE_UNSIGNED_CHAR=yes
8828 else
8829   echo "configure: failed program was:" >&5
8830   cat conftest.$ac_ext >&5
8831   rm -fr conftest*
8832   samba_cv_HAVE_UNSIGNED_CHAR=no
8833 fi
8834 rm -fr conftest*
8835 fi
8836
8837 fi
8838
8839 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8840 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8841     cat >> confdefs.h <<\EOF
8842 #define HAVE_UNSIGNED_CHAR 1
8843 EOF
8844
8845 fi
8846
8847 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8848 echo "configure:8849: checking for sin_len in sock" >&5
8849 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8850   echo $ac_n "(cached) $ac_c" 1>&6
8851 else
8852   
8853 cat > conftest.$ac_ext <<EOF
8854 #line 8855 "configure"
8855 #include "confdefs.h"
8856 #include <sys/types.h>
8857 #include <sys/socket.h>
8858 #include <netinet/in.h>
8859 int main() {
8860 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8861 ; return 0; }
8862 EOF
8863 if { (eval echo configure:8864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8864   rm -rf conftest*
8865   samba_cv_HAVE_SOCK_SIN_LEN=yes
8866 else
8867   echo "configure: failed program was:" >&5
8868   cat conftest.$ac_ext >&5
8869   rm -rf conftest*
8870   samba_cv_HAVE_SOCK_SIN_LEN=no
8871 fi
8872 rm -f conftest*
8873 fi
8874
8875 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8876 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8877     cat >> confdefs.h <<\EOF
8878 #define HAVE_SOCK_SIN_LEN 1
8879 EOF
8880
8881 fi
8882
8883 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8884 echo "configure:8885: checking whether seekdir returns void" >&5
8885 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8886   echo $ac_n "(cached) $ac_c" 1>&6
8887 else
8888   
8889 cat > conftest.$ac_ext <<EOF
8890 #line 8891 "configure"
8891 #include "confdefs.h"
8892 #include <sys/types.h>
8893 #include <dirent.h>
8894 void seekdir(DIR *d, long loc) { return; }
8895 int main() {
8896 return 0;
8897 ; return 0; }
8898 EOF
8899 if { (eval echo configure:8900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8900   rm -rf conftest*
8901   samba_cv_SEEKDIR_RETURNS_VOID=yes
8902 else
8903   echo "configure: failed program was:" >&5
8904   cat conftest.$ac_ext >&5
8905   rm -rf conftest*
8906   samba_cv_SEEKDIR_RETURNS_VOID=no
8907 fi
8908 rm -f conftest*
8909 fi
8910
8911 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8912 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8913     cat >> confdefs.h <<\EOF
8914 #define SEEKDIR_RETURNS_VOID 1
8915 EOF
8916
8917 fi
8918
8919 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
8920 echo "configure:8921: checking for __FILE__ macro" >&5
8921 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
8922   echo $ac_n "(cached) $ac_c" 1>&6
8923 else
8924   
8925 cat > conftest.$ac_ext <<EOF
8926 #line 8927 "configure"
8927 #include "confdefs.h"
8928 #include <stdio.h>
8929 int main() {
8930 printf("%s\n", __FILE__);
8931 ; return 0; }
8932 EOF
8933 if { (eval echo configure:8934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8934   rm -rf conftest*
8935   samba_cv_HAVE_FILE_MACRO=yes
8936 else
8937   echo "configure: failed program was:" >&5
8938   cat conftest.$ac_ext >&5
8939   rm -rf conftest*
8940   samba_cv_HAVE_FILE_MACRO=no
8941 fi
8942 rm -f conftest*
8943 fi
8944
8945 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8946 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8947     cat >> confdefs.h <<\EOF
8948 #define HAVE_FILE_MACRO 1
8949 EOF
8950
8951 fi
8952
8953 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
8954 echo "configure:8955: checking for __FUNCTION__ macro" >&5
8955 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
8956   echo $ac_n "(cached) $ac_c" 1>&6
8957 else
8958   
8959 cat > conftest.$ac_ext <<EOF
8960 #line 8961 "configure"
8961 #include "confdefs.h"
8962 #include <stdio.h>
8963 int main() {
8964 printf("%s\n", __FUNCTION__);
8965 ; return 0; }
8966 EOF
8967 if { (eval echo configure:8968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8968   rm -rf conftest*
8969   samba_cv_HAVE_FUNCTION_MACRO=yes
8970 else
8971   echo "configure: failed program was:" >&5
8972   cat conftest.$ac_ext >&5
8973   rm -rf conftest*
8974   samba_cv_HAVE_FUNCTION_MACRO=no
8975 fi
8976 rm -f conftest*
8977 fi
8978
8979 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
8980 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
8981     cat >> confdefs.h <<\EOF
8982 #define HAVE_FUNCTION_MACRO 1
8983 EOF
8984
8985 fi
8986
8987 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
8988 echo "configure:8989: checking if gettimeofday takes tz argument" >&5
8989 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
8990   echo $ac_n "(cached) $ac_c" 1>&6
8991 else
8992   
8993 if test "$cross_compiling" = yes; then
8994   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
8995 else
8996   cat > conftest.$ac_ext <<EOF
8997 #line 8998 "configure"
8998 #include "confdefs.h"
8999
9000 #include <sys/time.h>
9001 #include <unistd.h>
9002 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9003 EOF
9004 if { (eval echo configure:9005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9005 then
9006   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9007 else
9008   echo "configure: failed program was:" >&5
9009   cat conftest.$ac_ext >&5
9010   rm -fr conftest*
9011   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9012 fi
9013 rm -fr conftest*
9014 fi
9015
9016 fi
9017
9018 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9019 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9020     cat >> confdefs.h <<\EOF
9021 #define HAVE_GETTIMEOFDAY_TZ 1
9022 EOF
9023
9024 fi
9025
9026 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9027 echo "configure:9028: checking for C99 vsnprintf" >&5
9028 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9029   echo $ac_n "(cached) $ac_c" 1>&6
9030 else
9031   
9032 if test "$cross_compiling" = yes; then
9033   samba_cv_HAVE_C99_VSNPRINTF=cross
9034 else
9035   cat > conftest.$ac_ext <<EOF
9036 #line 9037 "configure"
9037 #include "confdefs.h"
9038
9039 #include <sys/types.h>
9040 #include <stdarg.h>
9041 void foo(const char *format, ...) { 
9042        va_list ap;
9043        int len;
9044        char buf[5];
9045
9046        va_start(ap, format);
9047        len = vsnprintf(0, 0, format, ap);
9048        va_end(ap);
9049        if (len != 5) exit(1);
9050
9051        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9052
9053        exit(0);
9054 }
9055 main() { foo("hello"); }
9056
9057 EOF
9058 if { (eval echo configure:9059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9059 then
9060   samba_cv_HAVE_C99_VSNPRINTF=yes
9061 else
9062   echo "configure: failed program was:" >&5
9063   cat conftest.$ac_ext >&5
9064   rm -fr conftest*
9065   samba_cv_HAVE_C99_VSNPRINTF=no
9066 fi
9067 rm -fr conftest*
9068 fi
9069
9070 fi
9071
9072 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9073 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9074     cat >> confdefs.h <<\EOF
9075 #define HAVE_C99_VSNPRINTF 1
9076 EOF
9077
9078 fi
9079
9080 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9081 echo "configure:9082: checking for broken readdir" >&5
9082 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9083   echo $ac_n "(cached) $ac_c" 1>&6
9084 else
9085   
9086 if test "$cross_compiling" = yes; then
9087   samba_cv_HAVE_BROKEN_READDIR=cross
9088 else
9089   cat > conftest.$ac_ext <<EOF
9090 #line 9091 "configure"
9091 #include "confdefs.h"
9092 #include <sys/types.h>
9093 #include <dirent.h>
9094 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9095 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9096 di->d_name[0] == 0) exit(0); exit(1);} 
9097 EOF
9098 if { (eval echo configure:9099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9099 then
9100   samba_cv_HAVE_BROKEN_READDIR=yes
9101 else
9102   echo "configure: failed program was:" >&5
9103   cat conftest.$ac_ext >&5
9104   rm -fr conftest*
9105   samba_cv_HAVE_BROKEN_READDIR=no
9106 fi
9107 rm -fr conftest*
9108 fi
9109
9110 fi
9111
9112 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9113 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9114     cat >> confdefs.h <<\EOF
9115 #define HAVE_BROKEN_READDIR 1
9116 EOF
9117
9118 fi
9119
9120 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9121 echo "configure:9122: checking for utimbuf" >&5
9122 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9123   echo $ac_n "(cached) $ac_c" 1>&6
9124 else
9125   
9126 cat > conftest.$ac_ext <<EOF
9127 #line 9128 "configure"
9128 #include "confdefs.h"
9129 #include <sys/types.h>
9130 #include <utime.h>
9131 int main() {
9132 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9133 ; return 0; }
9134 EOF
9135 if { (eval echo configure:9136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9136   rm -rf conftest*
9137   samba_cv_HAVE_UTIMBUF=yes
9138 else
9139   echo "configure: failed program was:" >&5
9140   cat conftest.$ac_ext >&5
9141   rm -rf conftest*
9142   samba_cv_HAVE_UTIMBUF=no
9143 fi
9144 rm -f conftest*
9145 fi
9146
9147 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9148 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9149     cat >> confdefs.h <<\EOF
9150 #define HAVE_UTIMBUF 1
9151 EOF
9152
9153 fi
9154
9155
9156 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9157 do
9158 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9159 echo "configure:9160: checking for $ac_func" >&5
9160 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9161   echo $ac_n "(cached) $ac_c" 1>&6
9162 else
9163   cat > conftest.$ac_ext <<EOF
9164 #line 9165 "configure"
9165 #include "confdefs.h"
9166 /* System header to define __stub macros and hopefully few prototypes,
9167     which can conflict with char $ac_func(); below.  */
9168 #include <assert.h>
9169 /* Override any gcc2 internal prototype to avoid an error.  */
9170 /* We use char because int might match the return type of a gcc2
9171     builtin and then its argument prototype would still apply.  */
9172 char $ac_func();
9173
9174 int main() {
9175
9176 /* The GNU C library defines this for functions which it implements
9177     to always fail with ENOSYS.  Some functions are actually named
9178     something starting with __ and the normal name is an alias.  */
9179 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9180 choke me
9181 #else
9182 $ac_func();
9183 #endif
9184
9185 ; return 0; }
9186 EOF
9187 if { (eval echo configure:9188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9188   rm -rf conftest*
9189   eval "ac_cv_func_$ac_func=yes"
9190 else
9191   echo "configure: failed program was:" >&5
9192   cat conftest.$ac_ext >&5
9193   rm -rf conftest*
9194   eval "ac_cv_func_$ac_func=no"
9195 fi
9196 rm -f conftest*
9197 fi
9198
9199 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9200   echo "$ac_t""yes" 1>&6
9201     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9202   cat >> confdefs.h <<EOF
9203 #define $ac_tr_func 1
9204 EOF
9205  
9206 else
9207   echo "$ac_t""no" 1>&6
9208 fi
9209 done
9210
9211
9212 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9213 echo "configure:9214: checking for ut_name in utmp" >&5
9214 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9215   echo $ac_n "(cached) $ac_c" 1>&6
9216 else
9217   
9218 cat > conftest.$ac_ext <<EOF
9219 #line 9220 "configure"
9220 #include "confdefs.h"
9221 #include <sys/types.h>
9222 #include <utmp.h>
9223 int main() {
9224 struct utmp ut;  ut.ut_name[0] = 'a';
9225 ; return 0; }
9226 EOF
9227 if { (eval echo configure:9228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9228   rm -rf conftest*
9229   samba_cv_HAVE_UT_UT_NAME=yes
9230 else
9231   echo "configure: failed program was:" >&5
9232   cat conftest.$ac_ext >&5
9233   rm -rf conftest*
9234   samba_cv_HAVE_UT_UT_NAME=no
9235 fi
9236 rm -f conftest*
9237 fi
9238
9239 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9240 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9241     cat >> confdefs.h <<\EOF
9242 #define HAVE_UT_UT_NAME 1
9243 EOF
9244
9245 fi 
9246
9247 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9248 echo "configure:9249: checking for ut_user in utmp" >&5
9249 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9250   echo $ac_n "(cached) $ac_c" 1>&6
9251 else
9252   
9253 cat > conftest.$ac_ext <<EOF
9254 #line 9255 "configure"
9255 #include "confdefs.h"
9256 #include <sys/types.h>
9257 #include <utmp.h>
9258 int main() {
9259 struct utmp ut;  ut.ut_user[0] = 'a';
9260 ; return 0; }
9261 EOF
9262 if { (eval echo configure:9263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9263   rm -rf conftest*
9264   samba_cv_HAVE_UT_UT_USER=yes
9265 else
9266   echo "configure: failed program was:" >&5
9267   cat conftest.$ac_ext >&5
9268   rm -rf conftest*
9269   samba_cv_HAVE_UT_UT_USER=no
9270 fi
9271 rm -f conftest*
9272 fi
9273
9274 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9275 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9276     cat >> confdefs.h <<\EOF
9277 #define HAVE_UT_UT_USER 1
9278 EOF
9279
9280 fi 
9281
9282 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9283 echo "configure:9284: checking for ut_id in utmp" >&5
9284 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9285   echo $ac_n "(cached) $ac_c" 1>&6
9286 else
9287   
9288 cat > conftest.$ac_ext <<EOF
9289 #line 9290 "configure"
9290 #include "confdefs.h"
9291 #include <sys/types.h>
9292 #include <utmp.h>
9293 int main() {
9294 struct utmp ut;  ut.ut_id[0] = 'a';
9295 ; return 0; }
9296 EOF
9297 if { (eval echo configure:9298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9298   rm -rf conftest*
9299   samba_cv_HAVE_UT_UT_ID=yes
9300 else
9301   echo "configure: failed program was:" >&5
9302   cat conftest.$ac_ext >&5
9303   rm -rf conftest*
9304   samba_cv_HAVE_UT_UT_ID=no
9305 fi
9306 rm -f conftest*
9307 fi
9308
9309 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9310 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9311     cat >> confdefs.h <<\EOF
9312 #define HAVE_UT_UT_ID 1
9313 EOF
9314
9315 fi 
9316
9317 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9318 echo "configure:9319: checking for ut_host in utmp" >&5
9319 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9320   echo $ac_n "(cached) $ac_c" 1>&6
9321 else
9322   
9323 cat > conftest.$ac_ext <<EOF
9324 #line 9325 "configure"
9325 #include "confdefs.h"
9326 #include <sys/types.h>
9327 #include <utmp.h>
9328 int main() {
9329 struct utmp ut;  ut.ut_host[0] = 'a';
9330 ; return 0; }
9331 EOF
9332 if { (eval echo configure:9333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9333   rm -rf conftest*
9334   samba_cv_HAVE_UT_UT_HOST=yes
9335 else
9336   echo "configure: failed program was:" >&5
9337   cat conftest.$ac_ext >&5
9338   rm -rf conftest*
9339   samba_cv_HAVE_UT_UT_HOST=no
9340 fi
9341 rm -f conftest*
9342 fi
9343
9344 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9345 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9346     cat >> confdefs.h <<\EOF
9347 #define HAVE_UT_UT_HOST 1
9348 EOF
9349
9350 fi 
9351
9352 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9353 echo "configure:9354: checking for ut_time in utmp" >&5
9354 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9355   echo $ac_n "(cached) $ac_c" 1>&6
9356 else
9357   
9358 cat > conftest.$ac_ext <<EOF
9359 #line 9360 "configure"
9360 #include "confdefs.h"
9361 #include <sys/types.h>
9362 #include <utmp.h>
9363 int main() {
9364 struct utmp ut;  time_t t; ut.ut_time = t;
9365 ; return 0; }
9366 EOF
9367 if { (eval echo configure:9368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9368   rm -rf conftest*
9369   samba_cv_HAVE_UT_UT_TIME=yes
9370 else
9371   echo "configure: failed program was:" >&5
9372   cat conftest.$ac_ext >&5
9373   rm -rf conftest*
9374   samba_cv_HAVE_UT_UT_TIME=no
9375 fi
9376 rm -f conftest*
9377 fi
9378
9379 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9380 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9381     cat >> confdefs.h <<\EOF
9382 #define HAVE_UT_UT_TIME 1
9383 EOF
9384
9385 fi 
9386
9387 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9388 echo "configure:9389: checking for ut_tv in utmp" >&5
9389 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9390   echo $ac_n "(cached) $ac_c" 1>&6
9391 else
9392   
9393 cat > conftest.$ac_ext <<EOF
9394 #line 9395 "configure"
9395 #include "confdefs.h"
9396 #include <sys/types.h>
9397 #include <utmp.h>
9398 int main() {
9399 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9400 ; return 0; }
9401 EOF
9402 if { (eval echo configure:9403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9403   rm -rf conftest*
9404   samba_cv_HAVE_UT_UT_TV=yes
9405 else
9406   echo "configure: failed program was:" >&5
9407   cat conftest.$ac_ext >&5
9408   rm -rf conftest*
9409   samba_cv_HAVE_UT_UT_TV=no
9410 fi
9411 rm -f conftest*
9412 fi
9413
9414 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9415 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9416     cat >> confdefs.h <<\EOF
9417 #define HAVE_UT_UT_TV 1
9418 EOF
9419
9420 fi 
9421
9422 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9423 echo "configure:9424: checking for ut_type in utmp" >&5
9424 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9425   echo $ac_n "(cached) $ac_c" 1>&6
9426 else
9427   
9428 cat > conftest.$ac_ext <<EOF
9429 #line 9430 "configure"
9430 #include "confdefs.h"
9431 #include <sys/types.h>
9432 #include <utmp.h>
9433 int main() {
9434 struct utmp ut;  ut.ut_type = 0;
9435 ; return 0; }
9436 EOF
9437 if { (eval echo configure:9438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9438   rm -rf conftest*
9439   samba_cv_HAVE_UT_UT_TYPE=yes
9440 else
9441   echo "configure: failed program was:" >&5
9442   cat conftest.$ac_ext >&5
9443   rm -rf conftest*
9444   samba_cv_HAVE_UT_UT_TYPE=no
9445 fi
9446 rm -f conftest*
9447 fi
9448
9449 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9450 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9451     cat >> confdefs.h <<\EOF
9452 #define HAVE_UT_UT_TYPE 1
9453 EOF
9454
9455 fi 
9456
9457 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9458 echo "configure:9459: checking for ut_pid in utmp" >&5
9459 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9460   echo $ac_n "(cached) $ac_c" 1>&6
9461 else
9462   
9463 cat > conftest.$ac_ext <<EOF
9464 #line 9465 "configure"
9465 #include "confdefs.h"
9466 #include <sys/types.h>
9467 #include <utmp.h>
9468 int main() {
9469 struct utmp ut;  ut.ut_pid = 0;
9470 ; return 0; }
9471 EOF
9472 if { (eval echo configure:9473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9473   rm -rf conftest*
9474   samba_cv_HAVE_UT_UT_PID=yes
9475 else
9476   echo "configure: failed program was:" >&5
9477   cat conftest.$ac_ext >&5
9478   rm -rf conftest*
9479   samba_cv_HAVE_UT_UT_PID=no
9480 fi
9481 rm -f conftest*
9482 fi
9483
9484 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9485 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9486     cat >> confdefs.h <<\EOF
9487 #define HAVE_UT_UT_PID 1
9488 EOF
9489
9490 fi 
9491
9492 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9493 echo "configure:9494: checking for ut_exit in utmp" >&5
9494 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9495   echo $ac_n "(cached) $ac_c" 1>&6
9496 else
9497   
9498 cat > conftest.$ac_ext <<EOF
9499 #line 9500 "configure"
9500 #include "confdefs.h"
9501 #include <sys/types.h>
9502 #include <utmp.h>
9503 int main() {
9504 struct utmp ut;  ut.ut_exit.e_exit = 0;
9505 ; return 0; }
9506 EOF
9507 if { (eval echo configure:9508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9508   rm -rf conftest*
9509   samba_cv_HAVE_UT_UT_EXIT=yes
9510 else
9511   echo "configure: failed program was:" >&5
9512   cat conftest.$ac_ext >&5
9513   rm -rf conftest*
9514   samba_cv_HAVE_UT_UT_EXIT=no
9515 fi
9516 rm -f conftest*
9517 fi
9518
9519 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9520 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9521     cat >> confdefs.h <<\EOF
9522 #define HAVE_UT_UT_EXIT 1
9523 EOF
9524
9525 fi 
9526
9527 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9528 echo "configure:9529: checking for ut_addr in utmp" >&5
9529 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9530   echo $ac_n "(cached) $ac_c" 1>&6
9531 else
9532   
9533 cat > conftest.$ac_ext <<EOF
9534 #line 9535 "configure"
9535 #include "confdefs.h"
9536 #include <sys/types.h>
9537 #include <utmp.h>
9538 int main() {
9539 struct utmp ut;  ut.ut_addr = 0;
9540 ; return 0; }
9541 EOF
9542 if { (eval echo configure:9543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9543   rm -rf conftest*
9544   samba_cv_HAVE_UT_UT_ADDR=yes
9545 else
9546   echo "configure: failed program was:" >&5
9547   cat conftest.$ac_ext >&5
9548   rm -rf conftest*
9549   samba_cv_HAVE_UT_UT_ADDR=no
9550 fi
9551 rm -f conftest*
9552 fi
9553
9554 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9555 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9556     cat >> confdefs.h <<\EOF
9557 #define HAVE_UT_UT_ADDR 1
9558 EOF
9559
9560 fi 
9561
9562 if test x$ac_cv_func_pututline = xyes ; then
9563   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9564 echo "configure:9565: checking whether pututline returns pointer" >&5
9565 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9566   echo $ac_n "(cached) $ac_c" 1>&6
9567 else
9568   
9569   cat > conftest.$ac_ext <<EOF
9570 #line 9571 "configure"
9571 #include "confdefs.h"
9572 #include <sys/types.h>
9573 #include <utmp.h>
9574 int main() {
9575 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9576 ; return 0; }
9577 EOF
9578 if { (eval echo configure:9579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9579   rm -rf conftest*
9580   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9581 else
9582   echo "configure: failed program was:" >&5
9583   cat conftest.$ac_ext >&5
9584   rm -rf conftest*
9585   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9586 fi
9587 rm -f conftest*
9588 fi
9589
9590 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9591   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9592       cat >> confdefs.h <<\EOF
9593 #define PUTUTLINE_RETURNS_UTMP 1
9594 EOF
9595
9596   fi
9597 fi
9598
9599 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9600 echo "configure:9601: checking for ut_syslen in utmpx" >&5
9601 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9602   echo $ac_n "(cached) $ac_c" 1>&6
9603 else
9604   
9605 cat > conftest.$ac_ext <<EOF
9606 #line 9607 "configure"
9607 #include "confdefs.h"
9608 #include <sys/types.h>
9609 #include <utmpx.h>
9610 int main() {
9611 struct utmpx ux;  ux.ut_syslen = 0;
9612 ; return 0; }
9613 EOF
9614 if { (eval echo configure:9615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9615   rm -rf conftest*
9616   samba_cv_HAVE_UX_UT_SYSLEN=yes
9617 else
9618   echo "configure: failed program was:" >&5
9619   cat conftest.$ac_ext >&5
9620   rm -rf conftest*
9621   samba_cv_HAVE_UX_UT_SYSLEN=no
9622 fi
9623 rm -f conftest*
9624 fi
9625
9626 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9627 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9628     cat >> confdefs.h <<\EOF
9629 #define HAVE_UX_UT_SYSLEN 1
9630 EOF
9631
9632 fi 
9633
9634
9635 #################################################
9636 # check for libiconv support
9637 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9638 echo "configure:9639: checking whether to use libiconv" >&5
9639 # Check whether --with-libiconv or --without-libiconv was given.
9640 if test "${with_libiconv+set}" = set; then
9641   withval="$with_libiconv"
9642    case "$withval" in
9643   no)
9644     echo "$ac_t""no" 1>&6
9645     ;;
9646   *)
9647     echo "$ac_t""yes" 1>&6
9648     CFLAGS="$CFLAGS -I$withval/include"
9649     LDFLAGS="$LDFLAGS -L$withval/lib"
9650     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9651 echo "configure:9652: checking for iconv_open in -liconv" >&5
9652 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9653 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9654   echo $ac_n "(cached) $ac_c" 1>&6
9655 else
9656   ac_save_LIBS="$LIBS"
9657 LIBS="-liconv  $LIBS"
9658 cat > conftest.$ac_ext <<EOF
9659 #line 9660 "configure"
9660 #include "confdefs.h"
9661 /* Override any gcc2 internal prototype to avoid an error.  */
9662 /* We use char because int might match the return type of a gcc2
9663     builtin and then its argument prototype would still apply.  */
9664 char iconv_open();
9665
9666 int main() {
9667 iconv_open()
9668 ; return 0; }
9669 EOF
9670 if { (eval echo configure:9671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9671   rm -rf conftest*
9672   eval "ac_cv_lib_$ac_lib_var=yes"
9673 else
9674   echo "configure: failed program was:" >&5
9675   cat conftest.$ac_ext >&5
9676   rm -rf conftest*
9677   eval "ac_cv_lib_$ac_lib_var=no"
9678 fi
9679 rm -f conftest*
9680 LIBS="$ac_save_LIBS"
9681
9682 fi
9683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9684   echo "$ac_t""yes" 1>&6
9685     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9686     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9687   cat >> confdefs.h <<EOF
9688 #define $ac_tr_lib 1
9689 EOF
9690
9691   LIBS="-liconv $LIBS"
9692
9693 else
9694   echo "$ac_t""no" 1>&6
9695 fi
9696
9697     cat >> confdefs.h <<EOF
9698 #define WITH_LIBICONV "${withval}"
9699 EOF
9700
9701     ;;
9702   esac 
9703 else
9704   echo "$ac_t""no" 1>&6
9705
9706 fi
9707
9708
9709
9710 ############
9711 # check for iconv in libc
9712 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9713 echo "configure:9714: checking for working iconv" >&5
9714 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9715   echo $ac_n "(cached) $ac_c" 1>&6
9716 else
9717   
9718 if test "$cross_compiling" = yes; then
9719   samba_cv_HAVE_NATIVE_ICONV=cross
9720 else
9721   cat > conftest.$ac_ext <<EOF
9722 #line 9723 "configure"
9723 #include "confdefs.h"
9724
9725 #include <iconv.h>
9726 main() {
9727        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9728        if (cd == 0 || cd == (iconv_t)-1) return -1;
9729        return 0;
9730 }
9731
9732 EOF
9733 if { (eval echo configure:9734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9734 then
9735   samba_cv_HAVE_NATIVE_ICONV=yes
9736 else
9737   echo "configure: failed program was:" >&5
9738   cat conftest.$ac_ext >&5
9739   rm -fr conftest*
9740   samba_cv_HAVE_NATIVE_ICONV=no
9741 fi
9742 rm -fr conftest*
9743 fi
9744
9745 fi
9746
9747 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9748 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9749     cat >> confdefs.h <<\EOF
9750 #define HAVE_NATIVE_ICONV 1
9751 EOF
9752
9753 fi
9754
9755
9756 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9757 echo "configure:9758: checking for Linux kernel oplocks" >&5
9758 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9759   echo $ac_n "(cached) $ac_c" 1>&6
9760 else
9761   
9762 if test "$cross_compiling" = yes; then
9763   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9764 else
9765   cat > conftest.$ac_ext <<EOF
9766 #line 9767 "configure"
9767 #include "confdefs.h"
9768
9769 #include <sys/types.h>
9770 #include <fcntl.h>
9771 #ifndef F_GETLEASE
9772 #define F_GETLEASE      1025
9773 #endif
9774 main() {
9775        int fd = open("/dev/null", O_RDONLY);
9776        return fcntl(fd, F_GETLEASE, 0) == -1;
9777 }
9778
9779 EOF
9780 if { (eval echo configure:9781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9781 then
9782   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9783 else
9784   echo "configure: failed program was:" >&5
9785   cat conftest.$ac_ext >&5
9786   rm -fr conftest*
9787   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9788 fi
9789 rm -fr conftest*
9790 fi
9791
9792 fi
9793
9794 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9795 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9796     cat >> confdefs.h <<\EOF
9797 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9798 EOF
9799
9800 fi
9801
9802 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9803 echo "configure:9804: checking for kernel change notify support" >&5
9804 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9805   echo $ac_n "(cached) $ac_c" 1>&6
9806 else
9807   
9808 if test "$cross_compiling" = yes; then
9809   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9810 else
9811   cat > conftest.$ac_ext <<EOF
9812 #line 9813 "configure"
9813 #include "confdefs.h"
9814
9815 #include <sys/types.h>
9816 #include <fcntl.h>
9817 #include <signal.h>
9818 #ifndef F_NOTIFY
9819 #define F_NOTIFY 1026
9820 #endif
9821 main() {
9822         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9823 }
9824
9825 EOF
9826 if { (eval echo configure:9827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9827 then
9828   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9829 else
9830   echo "configure: failed program was:" >&5
9831   cat conftest.$ac_ext >&5
9832   rm -fr conftest*
9833   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9834 fi
9835 rm -fr conftest*
9836 fi
9837
9838 fi
9839
9840 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9841 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9842     cat >> confdefs.h <<\EOF
9843 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9844 EOF
9845
9846 fi
9847
9848 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9849 echo "configure:9850: checking for kernel share modes" >&5
9850 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9851   echo $ac_n "(cached) $ac_c" 1>&6
9852 else
9853   
9854 if test "$cross_compiling" = yes; then
9855   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9856 else
9857   cat > conftest.$ac_ext <<EOF
9858 #line 9859 "configure"
9859 #include "confdefs.h"
9860
9861 #include <sys/types.h>
9862 #include <fcntl.h>
9863 #include <signal.h>
9864 #include <sys/file.h>
9865 #ifndef LOCK_MAND
9866 #define LOCK_MAND       32
9867 #define LOCK_READ       64
9868 #endif
9869 main() {
9870         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9871 }
9872
9873 EOF
9874 if { (eval echo configure:9875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9875 then
9876   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9877 else
9878   echo "configure: failed program was:" >&5
9879   cat conftest.$ac_ext >&5
9880   rm -fr conftest*
9881   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9882 fi
9883 rm -fr conftest*
9884 fi
9885
9886 fi
9887
9888 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9889 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9890     cat >> confdefs.h <<\EOF
9891 #define HAVE_KERNEL_SHARE_MODES 1
9892 EOF
9893
9894 fi
9895
9896
9897
9898
9899 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9900 echo "configure:9901: checking for IRIX kernel oplock type definitions" >&5
9901 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9902   echo $ac_n "(cached) $ac_c" 1>&6
9903 else
9904   
9905 cat > conftest.$ac_ext <<EOF
9906 #line 9907 "configure"
9907 #include "confdefs.h"
9908 #include <sys/types.h>
9909 #include <fcntl.h>
9910 int main() {
9911 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
9912 ; return 0; }
9913 EOF
9914 if { (eval echo configure:9915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9915   rm -rf conftest*
9916   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
9917 else
9918   echo "configure: failed program was:" >&5
9919   cat conftest.$ac_ext >&5
9920   rm -rf conftest*
9921   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
9922 fi
9923 rm -f conftest*
9924 fi
9925
9926 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
9927 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
9928     cat >> confdefs.h <<\EOF
9929 #define HAVE_KERNEL_OPLOCKS_IRIX 1
9930 EOF
9931
9932 fi
9933
9934 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
9935 echo "configure:9936: checking for irix specific capabilities" >&5
9936 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+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_IRIX_SPECIFIC_CAPABILITIES=cross
9942 else
9943   cat > conftest.$ac_ext <<EOF
9944 #line 9945 "configure"
9945 #include "confdefs.h"
9946 #include <sys/types.h>
9947 #include <sys/capability.h>
9948 main() {
9949  cap_t cap;
9950  if ((cap = cap_get_proc()) == NULL)
9951    exit(1);
9952  cap->cap_effective |= CAP_NETWORK_MGT;
9953  cap->cap_inheritable |= CAP_NETWORK_MGT;
9954  cap_set_proc(cap);
9955  exit(0);
9956 }
9957
9958 EOF
9959 if { (eval echo configure:9960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9960 then
9961   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
9962 else
9963   echo "configure: failed program was:" >&5
9964   cat conftest.$ac_ext >&5
9965   rm -fr conftest*
9966   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
9967 fi
9968 rm -fr conftest*
9969 fi
9970
9971 fi
9972
9973 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
9974 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
9975     cat >> confdefs.h <<\EOF
9976 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
9977 EOF
9978
9979 fi
9980
9981 #
9982 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
9983 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
9984 #
9985
9986 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9987 echo "configure:9988: checking for int16 typedef included by rpc/rpc.h" >&5
9988 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9989   echo $ac_n "(cached) $ac_c" 1>&6
9990 else
9991   
9992 cat > conftest.$ac_ext <<EOF
9993 #line 9994 "configure"
9994 #include "confdefs.h"
9995 #include <sys/types.h>
9996 #if defined(HAVE_RPC_RPC_H)
9997 #include <rpc/rpc.h>
9998 #endif
9999 int main() {
10000 int16 testvar;
10001 ; return 0; }
10002 EOF
10003 if { (eval echo configure:10004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10004   rm -rf conftest*
10005   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10006 else
10007   echo "configure: failed program was:" >&5
10008   cat conftest.$ac_ext >&5
10009   rm -rf conftest*
10010   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10011 fi
10012 rm -f conftest*
10013 fi
10014
10015 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10016 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10017     cat >> confdefs.h <<\EOF
10018 #define HAVE_INT16_FROM_RPC_RPC_H 1
10019 EOF
10020
10021 fi
10022
10023 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10024 echo "configure:10025: checking for uint16 typedef included by rpc/rpc.h" >&5
10025 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10026   echo $ac_n "(cached) $ac_c" 1>&6
10027 else
10028   
10029 cat > conftest.$ac_ext <<EOF
10030 #line 10031 "configure"
10031 #include "confdefs.h"
10032 #include <sys/types.h>
10033 #if defined(HAVE_RPC_RPC_H)
10034 #include <rpc/rpc.h>
10035 #endif
10036 int main() {
10037 uint16 testvar;
10038 ; return 0; }
10039 EOF
10040 if { (eval echo configure:10041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10041   rm -rf conftest*
10042   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10043 else
10044   echo "configure: failed program was:" >&5
10045   cat conftest.$ac_ext >&5
10046   rm -rf conftest*
10047   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10048 fi
10049 rm -f conftest*
10050 fi
10051
10052 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10053 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10054     cat >> confdefs.h <<\EOF
10055 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10056 EOF
10057
10058 fi
10059
10060 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10061 echo "configure:10062: checking for int32 typedef included by rpc/rpc.h" >&5
10062 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10063   echo $ac_n "(cached) $ac_c" 1>&6
10064 else
10065   
10066 cat > conftest.$ac_ext <<EOF
10067 #line 10068 "configure"
10068 #include "confdefs.h"
10069 #include <sys/types.h>
10070 #if defined(HAVE_RPC_RPC_H)
10071 #include <rpc/rpc.h>
10072 #endif
10073 int main() {
10074 int32 testvar;
10075 ; return 0; }
10076 EOF
10077 if { (eval echo configure:10078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10078   rm -rf conftest*
10079   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10080 else
10081   echo "configure: failed program was:" >&5
10082   cat conftest.$ac_ext >&5
10083   rm -rf conftest*
10084   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10085 fi
10086 rm -f conftest*
10087 fi
10088
10089 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10090 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10091     cat >> confdefs.h <<\EOF
10092 #define HAVE_INT32_FROM_RPC_RPC_H 1
10093 EOF
10094
10095 fi
10096
10097 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10098 echo "configure:10099: checking for uint32 typedef included by rpc/rpc.h" >&5
10099 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10100   echo $ac_n "(cached) $ac_c" 1>&6
10101 else
10102   
10103 cat > conftest.$ac_ext <<EOF
10104 #line 10105 "configure"
10105 #include "confdefs.h"
10106 #include <sys/types.h>
10107 #if defined(HAVE_RPC_RPC_H)
10108 #include <rpc/rpc.h>
10109 #endif
10110 int main() {
10111 uint32 testvar;
10112 ; return 0; }
10113 EOF
10114 if { (eval echo configure:10115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10115   rm -rf conftest*
10116   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10117 else
10118   echo "configure: failed program was:" >&5
10119   cat conftest.$ac_ext >&5
10120   rm -rf conftest*
10121   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10122 fi
10123 rm -f conftest*
10124 fi
10125
10126 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10127 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10128     cat >> confdefs.h <<\EOF
10129 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10130 EOF
10131
10132 fi
10133
10134
10135 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10136 echo "configure:10137: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10137 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10138   echo $ac_n "(cached) $ac_c" 1>&6
10139 else
10140   
10141 cat > conftest.$ac_ext <<EOF
10142 #line 10143 "configure"
10143 #include "confdefs.h"
10144 #include <sys/types.h>
10145 #ifdef HAVE_SYS_SECURITY_H
10146 #include <sys/security.h>
10147 #include <prot.h>
10148 #endif  /* HAVE_SYS_SECURITY_H */
10149 #if defined(HAVE_RPC_RPC_H)
10150 #include <rpc/rpc.h>
10151 #endif
10152 int main() {
10153 int testvar;
10154 ; return 0; }
10155 EOF
10156 if { (eval echo configure:10157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10157   rm -rf conftest*
10158   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10159 else
10160   echo "configure: failed program was:" >&5
10161   cat conftest.$ac_ext >&5
10162   rm -rf conftest*
10163   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10164 fi
10165 rm -f conftest*
10166 fi
10167
10168 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10169 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10170     cat >> confdefs.h <<\EOF
10171 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10172 EOF
10173
10174 fi
10175
10176 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10177 echo "configure:10178: checking for test routines" >&5
10178 if test "$cross_compiling" = yes; then
10179   echo "configure: warning: cannot run when cross-compiling" 1>&2
10180 else
10181   cat > conftest.$ac_ext <<EOF
10182 #line 10183 "configure"
10183 #include "confdefs.h"
10184 #include "${srcdir-.}/tests/trivial.c"
10185 EOF
10186 if { (eval echo configure:10187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10187 then
10188   echo "$ac_t""yes" 1>&6
10189 else
10190   echo "configure: failed program was:" >&5
10191   cat conftest.$ac_ext >&5
10192   rm -fr conftest*
10193   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10194 fi
10195 rm -fr conftest*
10196 fi
10197
10198
10199 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10200 echo "configure:10201: checking for ftruncate extend" >&5
10201 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10202   echo $ac_n "(cached) $ac_c" 1>&6
10203 else
10204   
10205 if test "$cross_compiling" = yes; then
10206   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10207 else
10208   cat > conftest.$ac_ext <<EOF
10209 #line 10210 "configure"
10210 #include "confdefs.h"
10211 #include "${srcdir-.}/tests/ftruncate.c"
10212 EOF
10213 if { (eval echo configure:10214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10214 then
10215   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10216 else
10217   echo "configure: failed program was:" >&5
10218   cat conftest.$ac_ext >&5
10219   rm -fr conftest*
10220   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10221 fi
10222 rm -fr conftest*
10223 fi
10224
10225 fi
10226
10227 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10228 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10229     cat >> confdefs.h <<\EOF
10230 #define HAVE_FTRUNCATE_EXTEND 1
10231 EOF
10232
10233 fi
10234
10235 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10236 echo "configure:10237: checking for AF_LOCAL socket support" >&5
10237 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10238   echo $ac_n "(cached) $ac_c" 1>&6
10239 else
10240   
10241 if test "$cross_compiling" = yes; then
10242   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10243 else
10244   cat > conftest.$ac_ext <<EOF
10245 #line 10246 "configure"
10246 #include "confdefs.h"
10247 #include "${srcdir-.}/tests/unixsock.c"
10248 EOF
10249 if { (eval echo configure:10250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10250 then
10251   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10252 else
10253   echo "configure: failed program was:" >&5
10254   cat conftest.$ac_ext >&5
10255   rm -fr conftest*
10256   samba_cv_HAVE_WORKING_AF_LOCAL=no
10257 fi
10258 rm -fr conftest*
10259 fi
10260
10261 fi
10262
10263 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10264 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10265 then
10266     cat >> confdefs.h <<\EOF
10267 #define HAVE_WORKING_AF_LOCAL 1
10268 EOF
10269
10270 fi
10271
10272 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10273 echo "configure:10274: checking for broken getgroups" >&5
10274 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10275   echo $ac_n "(cached) $ac_c" 1>&6
10276 else
10277   
10278 if test "$cross_compiling" = yes; then
10279   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10280 else
10281   cat > conftest.$ac_ext <<EOF
10282 #line 10283 "configure"
10283 #include "confdefs.h"
10284 #include "${srcdir-.}/tests/getgroups.c"
10285 EOF
10286 if { (eval echo configure:10287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10287 then
10288   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10289 else
10290   echo "configure: failed program was:" >&5
10291   cat conftest.$ac_ext >&5
10292   rm -fr conftest*
10293   samba_cv_HAVE_BROKEN_GETGROUPS=no
10294 fi
10295 rm -fr conftest*
10296 fi
10297
10298 fi
10299
10300 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10301 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10302     cat >> confdefs.h <<\EOF
10303 #define HAVE_BROKEN_GETGROUPS 1
10304 EOF
10305
10306 fi
10307
10308 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10309 echo "configure:10310: checking whether getpass should be replaced" >&5
10310 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10311   echo $ac_n "(cached) $ac_c" 1>&6
10312 else
10313   
10314 SAVE_CPPFLAGS="$CPPFLAGS"
10315 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10316 cat > conftest.$ac_ext <<EOF
10317 #line 10318 "configure"
10318 #include "confdefs.h"
10319
10320 #define REPLACE_GETPASS 1
10321 #define NO_CONFIG_H 1
10322 #define main dont_declare_main
10323 #include "${srcdir-.}/lib/getsmbpass.c"
10324 #undef main
10325
10326 int main() {
10327
10328 ; return 0; }
10329 EOF
10330 if { (eval echo configure:10331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10331   rm -rf conftest*
10332   samba_cv_REPLACE_GETPASS=yes
10333 else
10334   echo "configure: failed program was:" >&5
10335   cat conftest.$ac_ext >&5
10336   rm -rf conftest*
10337   samba_cv_REPLACE_GETPASS=no
10338 fi
10339 rm -f conftest*
10340 CPPFLAGS="$SAVE_CPPFLAGS"
10341
10342 fi
10343
10344 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10345 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10346         cat >> confdefs.h <<\EOF
10347 #define REPLACE_GETPASS 1
10348 EOF
10349
10350 fi
10351
10352 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10353 echo "configure:10354: checking for broken inet_ntoa" >&5
10354 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10355   echo $ac_n "(cached) $ac_c" 1>&6
10356 else
10357   
10358 if test "$cross_compiling" = yes; then
10359   samba_cv_REPLACE_INET_NTOA=cross
10360 else
10361   cat > conftest.$ac_ext <<EOF
10362 #line 10363 "configure"
10363 #include "confdefs.h"
10364
10365 #include <stdio.h>
10366 #include <sys/types.h>
10367 #include <netinet/in.h>
10368 #ifdef HAVE_ARPA_INET_H
10369 #include <arpa/inet.h>
10370 #endif
10371 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10372 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10373     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10374 exit(1);}
10375 EOF
10376 if { (eval echo configure:10377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10377 then
10378   samba_cv_REPLACE_INET_NTOA=yes
10379 else
10380   echo "configure: failed program was:" >&5
10381   cat conftest.$ac_ext >&5
10382   rm -fr conftest*
10383   samba_cv_REPLACE_INET_NTOA=no
10384 fi
10385 rm -fr conftest*
10386 fi
10387
10388 fi
10389
10390 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10391 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10392     cat >> confdefs.h <<\EOF
10393 #define REPLACE_INET_NTOA 1
10394 EOF
10395
10396 fi
10397
10398 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10399 echo "configure:10400: checking for secure mkstemp" >&5
10400 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10401   echo $ac_n "(cached) $ac_c" 1>&6
10402 else
10403   
10404 if test "$cross_compiling" = yes; then
10405   samba_cv_HAVE_SECURE_MKSTEMP=cross
10406 else
10407   cat > conftest.$ac_ext <<EOF
10408 #line 10409 "configure"
10409 #include "confdefs.h"
10410 #include <stdlib.h>
10411 #include <sys/types.h>
10412 #include <sys/stat.h>
10413 #include <unistd.h>
10414 main() { 
10415   struct stat st;
10416   char tpl[20]="/tmp/test.XXXXXX"; 
10417   int fd = mkstemp(tpl); 
10418   if (fd == -1) exit(1);
10419   unlink(tpl);
10420   if (fstat(fd, &st) != 0) exit(1);
10421   if ((st.st_mode & 0777) != 0600) exit(1);
10422   exit(0);
10423 }
10424 EOF
10425 if { (eval echo configure:10426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10426 then
10427   samba_cv_HAVE_SECURE_MKSTEMP=yes
10428 else
10429   echo "configure: failed program was:" >&5
10430   cat conftest.$ac_ext >&5
10431   rm -fr conftest*
10432   samba_cv_HAVE_SECURE_MKSTEMP=no
10433 fi
10434 rm -fr conftest*
10435 fi
10436
10437 fi
10438
10439 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10440 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10441     cat >> confdefs.h <<\EOF
10442 #define HAVE_SECURE_MKSTEMP 1
10443 EOF
10444
10445 fi
10446
10447 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10448 echo "configure:10449: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10449 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10450   echo $ac_n "(cached) $ac_c" 1>&6
10451 else
10452   
10453 if test "$cross_compiling" = yes; then
10454   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10455 else
10456   cat > conftest.$ac_ext <<EOF
10457 #line 10458 "configure"
10458 #include "confdefs.h"
10459 #include <unistd.h>
10460 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
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_SYSCONF_SC_NGROUPS_MAX=yes
10465 else
10466   echo "configure: failed program was:" >&5
10467   cat conftest.$ac_ext >&5
10468   rm -fr conftest*
10469   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10470 fi
10471 rm -fr conftest*
10472 fi
10473
10474 fi
10475
10476 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10477 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10478     cat >> confdefs.h <<\EOF
10479 #define SYSCONF_SC_NGROUPS_MAX 1
10480 EOF
10481
10482 fi
10483
10484 echo $ac_n "checking for root""... $ac_c" 1>&6
10485 echo "configure:10486: checking for root" >&5
10486 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+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_ROOT=cross
10492 else
10493   cat > conftest.$ac_ext <<EOF
10494 #line 10495 "configure"
10495 #include "confdefs.h"
10496 main() { exit(getuid() != 0); }
10497 EOF
10498 if { (eval echo configure:10499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10499 then
10500   samba_cv_HAVE_ROOT=yes
10501 else
10502   echo "configure: failed program was:" >&5
10503   cat conftest.$ac_ext >&5
10504   rm -fr conftest*
10505   samba_cv_HAVE_ROOT=no
10506 fi
10507 rm -fr conftest*
10508 fi
10509
10510 fi
10511
10512 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10513 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10514     cat >> confdefs.h <<\EOF
10515 #define HAVE_ROOT 1
10516 EOF
10517
10518 else
10519     echo "configure: warning: running as non-root will disable some tests" 1>&2
10520 fi
10521
10522 ##################
10523 # look for a method of finding the list of network interfaces
10524 iface=no;
10525 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10526 echo "configure:10527: checking for iface AIX" >&5
10527 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10528   echo $ac_n "(cached) $ac_c" 1>&6
10529 else
10530   
10531 if test "$cross_compiling" = yes; then
10532   samba_cv_HAVE_IFACE_AIX=cross
10533 else
10534   cat > conftest.$ac_ext <<EOF
10535 #line 10536 "configure"
10536 #include "confdefs.h"
10537
10538 #define HAVE_IFACE_AIX 1
10539 #define AUTOCONF_TEST 1
10540 #include "confdefs.h"
10541 #include "${srcdir-.}/lib/interfaces.c"
10542 EOF
10543 if { (eval echo configure:10544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10544 then
10545   samba_cv_HAVE_IFACE_AIX=yes
10546 else
10547   echo "configure: failed program was:" >&5
10548   cat conftest.$ac_ext >&5
10549   rm -fr conftest*
10550   samba_cv_HAVE_IFACE_AIX=no
10551 fi
10552 rm -fr conftest*
10553 fi
10554
10555 fi
10556
10557 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10558 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10559     iface=yes;cat >> confdefs.h <<\EOF
10560 #define HAVE_IFACE_AIX 1
10561 EOF
10562
10563 fi
10564
10565 if test $iface = no; then
10566 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10567 echo "configure:10568: checking for iface ifconf" >&5
10568 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10569   echo $ac_n "(cached) $ac_c" 1>&6
10570 else
10571   
10572 if test "$cross_compiling" = yes; then
10573   samba_cv_HAVE_IFACE_IFCONF=cross
10574 else
10575   cat > conftest.$ac_ext <<EOF
10576 #line 10577 "configure"
10577 #include "confdefs.h"
10578
10579 #define HAVE_IFACE_IFCONF 1
10580 #define AUTOCONF_TEST 1
10581 #include "confdefs.h"
10582 #include "${srcdir-.}/lib/interfaces.c"
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_IFACE_IFCONF=yes
10587 else
10588   echo "configure: failed program was:" >&5
10589   cat conftest.$ac_ext >&5
10590   rm -fr conftest*
10591   samba_cv_HAVE_IFACE_IFCONF=no
10592 fi
10593 rm -fr conftest*
10594 fi
10595
10596 fi
10597
10598 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10599 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10600     iface=yes;cat >> confdefs.h <<\EOF
10601 #define HAVE_IFACE_IFCONF 1
10602 EOF
10603
10604 fi
10605 fi
10606
10607 if test $iface = no; then
10608 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10609 echo "configure:10610: checking for iface ifreq" >&5
10610 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10611   echo $ac_n "(cached) $ac_c" 1>&6
10612 else
10613   
10614 if test "$cross_compiling" = yes; then
10615   samba_cv_HAVE_IFACE_IFREQ=cross
10616 else
10617   cat > conftest.$ac_ext <<EOF
10618 #line 10619 "configure"
10619 #include "confdefs.h"
10620
10621 #define HAVE_IFACE_IFREQ 1
10622 #define AUTOCONF_TEST 1
10623 #include "confdefs.h"
10624 #include "${srcdir-.}/lib/interfaces.c"
10625 EOF
10626 if { (eval echo configure:10627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10627 then
10628   samba_cv_HAVE_IFACE_IFREQ=yes
10629 else
10630   echo "configure: failed program was:" >&5
10631   cat conftest.$ac_ext >&5
10632   rm -fr conftest*
10633   samba_cv_HAVE_IFACE_IFREQ=no
10634 fi
10635 rm -fr conftest*
10636 fi
10637
10638 fi
10639
10640 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10641 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10642     iface=yes;cat >> confdefs.h <<\EOF
10643 #define HAVE_IFACE_IFREQ 1
10644 EOF
10645
10646 fi
10647 fi
10648
10649
10650 ################################################
10651 # look for a method of setting the effective uid
10652 seteuid=no;
10653 if test $seteuid = no; then
10654 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10655 echo "configure:10656: checking for setresuid" >&5
10656 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10657   echo $ac_n "(cached) $ac_c" 1>&6
10658 else
10659   
10660 if test "$cross_compiling" = yes; then
10661   samba_cv_USE_SETRESUID=cross
10662 else
10663   cat > conftest.$ac_ext <<EOF
10664 #line 10665 "configure"
10665 #include "confdefs.h"
10666
10667 #define AUTOCONF_TEST 1
10668 #define USE_SETRESUID 1
10669 #include "confdefs.h"
10670 #include "${srcdir-.}/lib/util_sec.c"
10671 EOF
10672 if { (eval echo configure:10673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10673 then
10674   samba_cv_USE_SETRESUID=yes
10675 else
10676   echo "configure: failed program was:" >&5
10677   cat conftest.$ac_ext >&5
10678   rm -fr conftest*
10679   samba_cv_USE_SETRESUID=no
10680 fi
10681 rm -fr conftest*
10682 fi
10683
10684 fi
10685
10686 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10687 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10688     seteuid=yes;cat >> confdefs.h <<\EOF
10689 #define USE_SETRESUID 1
10690 EOF
10691
10692 fi
10693 fi
10694
10695
10696 if test $seteuid = no; then
10697 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10698 echo "configure:10699: checking for setreuid" >&5
10699 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10700   echo $ac_n "(cached) $ac_c" 1>&6
10701 else
10702   
10703 if test "$cross_compiling" = yes; then
10704   samba_cv_USE_SETREUID=cross
10705 else
10706   cat > conftest.$ac_ext <<EOF
10707 #line 10708 "configure"
10708 #include "confdefs.h"
10709
10710 #define AUTOCONF_TEST 1
10711 #define USE_SETREUID 1
10712 #include "confdefs.h"
10713 #include "${srcdir-.}/lib/util_sec.c"
10714 EOF
10715 if { (eval echo configure:10716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10716 then
10717   samba_cv_USE_SETREUID=yes
10718 else
10719   echo "configure: failed program was:" >&5
10720   cat conftest.$ac_ext >&5
10721   rm -fr conftest*
10722   samba_cv_USE_SETREUID=no
10723 fi
10724 rm -fr conftest*
10725 fi
10726
10727 fi
10728
10729 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10730 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10731     seteuid=yes;cat >> confdefs.h <<\EOF
10732 #define USE_SETREUID 1
10733 EOF
10734
10735 fi
10736 fi
10737
10738 if test $seteuid = no; then
10739 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10740 echo "configure:10741: checking for seteuid" >&5
10741 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10742   echo $ac_n "(cached) $ac_c" 1>&6
10743 else
10744   
10745 if test "$cross_compiling" = yes; then
10746   samba_cv_USE_SETEUID=cross
10747 else
10748   cat > conftest.$ac_ext <<EOF
10749 #line 10750 "configure"
10750 #include "confdefs.h"
10751
10752 #define AUTOCONF_TEST 1
10753 #define USE_SETEUID 1
10754 #include "confdefs.h"
10755 #include "${srcdir-.}/lib/util_sec.c"
10756 EOF
10757 if { (eval echo configure:10758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10758 then
10759   samba_cv_USE_SETEUID=yes
10760 else
10761   echo "configure: failed program was:" >&5
10762   cat conftest.$ac_ext >&5
10763   rm -fr conftest*
10764   samba_cv_USE_SETEUID=no
10765 fi
10766 rm -fr conftest*
10767 fi
10768
10769 fi
10770
10771 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10772 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10773     seteuid=yes;cat >> confdefs.h <<\EOF
10774 #define USE_SETEUID 1
10775 EOF
10776
10777 fi
10778 fi
10779
10780 if test $seteuid = no; then
10781 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10782 echo "configure:10783: checking for setuidx" >&5
10783 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10784   echo $ac_n "(cached) $ac_c" 1>&6
10785 else
10786   
10787 if test "$cross_compiling" = yes; then
10788   samba_cv_USE_SETUIDX=cross
10789 else
10790   cat > conftest.$ac_ext <<EOF
10791 #line 10792 "configure"
10792 #include "confdefs.h"
10793
10794 #define AUTOCONF_TEST 1
10795 #define USE_SETUIDX 1
10796 #include "confdefs.h"
10797 #include "${srcdir-.}/lib/util_sec.c"
10798 EOF
10799 if { (eval echo configure:10800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10800 then
10801   samba_cv_USE_SETUIDX=yes
10802 else
10803   echo "configure: failed program was:" >&5
10804   cat conftest.$ac_ext >&5
10805   rm -fr conftest*
10806   samba_cv_USE_SETUIDX=no
10807 fi
10808 rm -fr conftest*
10809 fi
10810
10811 fi
10812
10813 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10814 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10815     seteuid=yes;cat >> confdefs.h <<\EOF
10816 #define USE_SETUIDX 1
10817 EOF
10818
10819 fi
10820 fi
10821
10822
10823 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10824 echo "configure:10825: checking for working mmap" >&5
10825 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10826   echo $ac_n "(cached) $ac_c" 1>&6
10827 else
10828   
10829 if test "$cross_compiling" = yes; then
10830   samba_cv_HAVE_MMAP=cross
10831 else
10832   cat > conftest.$ac_ext <<EOF
10833 #line 10834 "configure"
10834 #include "confdefs.h"
10835 #include "${srcdir-.}/tests/shared_mmap.c"
10836 EOF
10837 if { (eval echo configure:10838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10838 then
10839   samba_cv_HAVE_MMAP=yes
10840 else
10841   echo "configure: failed program was:" >&5
10842   cat conftest.$ac_ext >&5
10843   rm -fr conftest*
10844   samba_cv_HAVE_MMAP=no
10845 fi
10846 rm -fr conftest*
10847 fi
10848
10849 fi
10850
10851 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10852 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10853     cat >> confdefs.h <<\EOF
10854 #define HAVE_MMAP 1
10855 EOF
10856
10857 fi
10858
10859 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10860 echo "configure:10861: checking for ftruncate needs root" >&5
10861 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10862   echo $ac_n "(cached) $ac_c" 1>&6
10863 else
10864   
10865 if test "$cross_compiling" = yes; then
10866   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10867 else
10868   cat > conftest.$ac_ext <<EOF
10869 #line 10870 "configure"
10870 #include "confdefs.h"
10871 #include "${srcdir-.}/tests/ftruncroot.c"
10872 EOF
10873 if { (eval echo configure:10874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10874 then
10875   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10876 else
10877   echo "configure: failed program was:" >&5
10878   cat conftest.$ac_ext >&5
10879   rm -fr conftest*
10880   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10881 fi
10882 rm -fr conftest*
10883 fi
10884
10885 fi
10886
10887 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10888 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10889     cat >> confdefs.h <<\EOF
10890 #define FTRUNCATE_NEEDS_ROOT 1
10891 EOF
10892
10893 fi
10894
10895 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10896 echo "configure:10897: checking for fcntl locking" >&5
10897 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10898   echo $ac_n "(cached) $ac_c" 1>&6
10899 else
10900   
10901 if test "$cross_compiling" = yes; then
10902   samba_cv_HAVE_FCNTL_LOCK=cross
10903 else
10904   cat > conftest.$ac_ext <<EOF
10905 #line 10906 "configure"
10906 #include "confdefs.h"
10907 #include "${srcdir-.}/tests/fcntl_lock.c"
10908 EOF
10909 if { (eval echo configure:10910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10910 then
10911   samba_cv_HAVE_FCNTL_LOCK=yes
10912 else
10913   echo "configure: failed program was:" >&5
10914   cat conftest.$ac_ext >&5
10915   rm -fr conftest*
10916   samba_cv_HAVE_FCNTL_LOCK=no
10917 fi
10918 rm -fr conftest*
10919 fi
10920
10921 fi
10922
10923 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
10924 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
10925     cat >> confdefs.h <<\EOF
10926 #define HAVE_FCNTL_LOCK 1
10927 EOF
10928
10929 fi
10930
10931 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
10932 echo "configure:10933: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
10933 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
10934   echo $ac_n "(cached) $ac_c" 1>&6
10935 else
10936   
10937 if test "$cross_compiling" = yes; then
10938   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
10939 else
10940   cat > conftest.$ac_ext <<EOF
10941 #line 10942 "configure"
10942 #include "confdefs.h"
10943 #include "${srcdir-.}/tests/fcntl_lock64.c"
10944 EOF
10945 if { (eval echo configure:10946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10946 then
10947   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
10948 else
10949   echo "configure: failed program was:" >&5
10950   cat conftest.$ac_ext >&5
10951   rm -fr conftest*
10952   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
10953 fi
10954 rm -fr conftest*
10955 fi
10956
10957 fi
10958
10959 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
10960 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
10961     cat >> confdefs.h <<\EOF
10962 #define HAVE_BROKEN_FCNTL64_LOCKS 1
10963 EOF
10964
10965
10966 else
10967
10968
10969   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
10970 echo "configure:10971: checking for 64 bit fcntl locking" >&5
10971 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
10972   echo $ac_n "(cached) $ac_c" 1>&6
10973 else
10974   
10975   if test "$cross_compiling" = yes; then
10976   samba_cv_HAVE_STRUCT_FLOCK64=cross
10977 else
10978   cat > conftest.$ac_ext <<EOF
10979 #line 10980 "configure"
10980 #include "confdefs.h"
10981
10982 #if defined(HAVE_UNISTD_H)
10983 #include <unistd.h>
10984 #endif
10985 #include <stdio.h>
10986 #include <stdlib.h>
10987
10988 #ifdef HAVE_FCNTL_H
10989 #include <fcntl.h>
10990 #endif
10991
10992 #ifdef HAVE_SYS_FCNTL_H
10993 #include <sys/fcntl.h>
10994 #endif
10995 main() { struct flock64 fl64;
10996 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
10997 exit(0);
10998 #else
10999 exit(1);
11000 #endif
11001 }
11002 EOF
11003 if { (eval echo configure:11004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11004 then
11005   samba_cv_HAVE_STRUCT_FLOCK64=yes
11006 else
11007   echo "configure: failed program was:" >&5
11008   cat conftest.$ac_ext >&5
11009   rm -fr conftest*
11010   samba_cv_HAVE_STRUCT_FLOCK64=no
11011 fi
11012 rm -fr conftest*
11013 fi
11014
11015 fi
11016
11017 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11018
11019   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11020       cat >> confdefs.h <<\EOF
11021 #define HAVE_STRUCT_FLOCK64 1
11022 EOF
11023
11024   fi
11025 fi
11026
11027 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11028 echo "configure:11029: checking for broken nisplus include files" >&5
11029 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11030   echo $ac_n "(cached) $ac_c" 1>&6
11031 else
11032   
11033 cat > conftest.$ac_ext <<EOF
11034 #line 11035 "configure"
11035 #include "confdefs.h"
11036 #include <sys/acl.h>
11037 #if defined(HAVE_RPCSVC_NIS_H)
11038 #include <rpcsvc/nis.h>
11039 #endif
11040 int main() {
11041 return 0;
11042 ; return 0; }
11043 EOF
11044 if { (eval echo configure:11045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11045   rm -rf conftest*
11046   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11047 else
11048   echo "configure: failed program was:" >&5
11049   cat conftest.$ac_ext >&5
11050   rm -rf conftest*
11051   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11052 fi
11053 rm -f conftest*
11054 fi
11055
11056 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11057 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11058     cat >> confdefs.h <<\EOF
11059 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11060 EOF
11061
11062 fi
11063
11064
11065 #################################################
11066 # check for smbwrapper support
11067 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11068 echo "configure:11069: checking whether to use smbwrapper" >&5
11069 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11070 if test "${with_smbwrapper+set}" = set; then
11071   withval="$with_smbwrapper"
11072    case "$withval" in
11073   yes)
11074     echo "$ac_t""yes" 1>&6
11075     cat >> confdefs.h <<\EOF
11076 #define WITH_SMBWRAPPER 1
11077 EOF
11078
11079         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11080
11081         if test x$ATTEMPT_WRAP32_BUILD = x; then
11082                 WRAP32=""
11083         else
11084                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11085         fi
11086
11087 # Conditions under which smbwrapper should not be built.
11088
11089         if test x$PICFLAG = x; then
11090            echo No support for PIC code - disabling smbwrapper and smbsh
11091            WRAP=""
11092            WRAP32=""
11093         elif test x$ac_cv_func_syscall = xno; then
11094            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11095            WRAP=""
11096            WRAP32=""
11097         fi
11098     ;;
11099   *)
11100     echo "$ac_t""no" 1>&6
11101     ;;
11102   esac 
11103 else
11104   echo "$ac_t""no" 1>&6
11105
11106 fi
11107
11108
11109 #################################################
11110 # check for the AFS filesystem
11111 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
11112 echo "configure:11113: checking whether to use AFS" >&5
11113 # Check whether --with-afs or --without-afs was given.
11114 if test "${with_afs+set}" = set; then
11115   withval="$with_afs"
11116    case "$withval" in
11117   yes)
11118     echo "$ac_t""yes" 1>&6
11119     cat >> confdefs.h <<\EOF
11120 #define WITH_AFS 1
11121 EOF
11122
11123     ;;
11124   *)
11125     echo "$ac_t""no" 1>&6
11126     ;;
11127   esac 
11128 else
11129   echo "$ac_t""no" 1>&6
11130
11131 fi
11132
11133
11134
11135 #################################################
11136 # check for the DFS auth system
11137 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
11138 echo "configure:11139: checking whether to use DFS auth" >&5
11139 # Check whether --with-dfs or --without-dfs was given.
11140 if test "${with_dfs+set}" = set; then
11141   withval="$with_dfs"
11142    case "$withval" in
11143   yes)
11144     echo "$ac_t""yes" 1>&6
11145     cat >> confdefs.h <<\EOF
11146 #define WITH_DFS 1
11147 EOF
11148
11149     ;;
11150   *)
11151     echo "$ac_t""no" 1>&6
11152     ;;
11153   esac 
11154 else
11155   echo "$ac_t""no" 1>&6
11156
11157 fi
11158
11159
11160 #################################################
11161 # check for Kerberos IV auth system
11162 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
11163 echo "configure:11164: checking whether to use Kerberos IV" >&5
11164 # Check whether --with-krb4 or --without-krb4 was given.
11165 if test "${with_krb4+set}" = set; then
11166   withval="$with_krb4"
11167    case "$withval" in
11168   yes)
11169     echo "$ac_t""yes" 1>&6
11170     cat >> confdefs.h <<\EOF
11171 #define KRB4_AUTH 1
11172 EOF
11173
11174     LIBS="$LIBS -lkrb -ldes"
11175     CFLAGS="$CFLAGS -I$withval/include"
11176     LDFLAGS="$LDFLAGS -L$withval/lib"
11177     cat >> confdefs.h <<EOF
11178 #define KRB4_DIR ${withval}
11179 EOF
11180
11181     ;;
11182   *)
11183     echo "$ac_t""no" 1>&6
11184     ;;
11185   esac 
11186 else
11187   echo "$ac_t""no" 1>&6
11188
11189 fi
11190
11191
11192
11193
11194 #################################################
11195 # check for location of Kerberos 5 install
11196 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11197 echo "configure:11198: checking for kerberos 5 install path" >&5
11198 # Check whether --with-krb5 or --without-krb5 was given.
11199 if test "${with_krb5+set}" = set; then
11200   withval="$with_krb5"
11201    case "$withval" in
11202   no)
11203     echo "$ac_t""no" 1>&6
11204     ;;
11205   *)
11206     echo "$ac_t""yes" 1>&6
11207     cat >> confdefs.h <<\EOF
11208 #define KRB5_AUTH 1
11209 EOF
11210
11211     LIBS="$LIBS -lkrb5 -lk5crypto -lcom_err"
11212     CFLAGS="$CFLAGS -I$withval/include"
11213     LDFLAGS="$LDFLAGS -L$withval/lib"
11214     cat >> confdefs.h <<\EOF
11215 #define HAVE_KRB5 1
11216 EOF
11217
11218     cat >> confdefs.h <<EOF
11219 #define KRB5_DIR ${withval}
11220 EOF
11221
11222     have_krb5=yes;
11223     ;;
11224   esac 
11225 else
11226   echo "$ac_t""no" 1>&6
11227
11228 fi
11229
11230
11231
11232 ########################################################
11233 # now see if we can find the krb5 libs in standard paths
11234 if test x$have_krb5 != xyes; then
11235 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11236 echo "configure:11237: checking for krb5_mk_req_extended in -lkrb5" >&5
11237 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11238 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11239   echo $ac_n "(cached) $ac_c" 1>&6
11240 else
11241   ac_save_LIBS="$LIBS"
11242 LIBS="-lkrb5  $LIBS"
11243 cat > conftest.$ac_ext <<EOF
11244 #line 11245 "configure"
11245 #include "confdefs.h"
11246 /* Override any gcc2 internal prototype to avoid an error.  */
11247 /* We use char because int might match the return type of a gcc2
11248     builtin and then its argument prototype would still apply.  */
11249 char krb5_mk_req_extended();
11250
11251 int main() {
11252 krb5_mk_req_extended()
11253 ; return 0; }
11254 EOF
11255 if { (eval echo configure:11256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11256   rm -rf conftest*
11257   eval "ac_cv_lib_$ac_lib_var=yes"
11258 else
11259   echo "configure: failed program was:" >&5
11260   cat conftest.$ac_ext >&5
11261   rm -rf conftest*
11262   eval "ac_cv_lib_$ac_lib_var=no"
11263 fi
11264 rm -f conftest*
11265 LIBS="$ac_save_LIBS"
11266
11267 fi
11268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11269   echo "$ac_t""yes" 1>&6
11270   LIBS="$LIBS -lkrb5 -lk5crypto -lcom_err";
11271         cat >> confdefs.h <<\EOF
11272 #define HAVE_KRB5 1
11273 EOF
11274
11275 else
11276   echo "$ac_t""no" 1>&6
11277 fi
11278
11279 fi
11280
11281
11282 #################################################
11283 # check for automount support
11284 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11285 echo "configure:11286: checking whether to use AUTOMOUNT" >&5
11286 # Check whether --with-automount or --without-automount was given.
11287 if test "${with_automount+set}" = set; then
11288   withval="$with_automount"
11289    case "$withval" in
11290   yes)
11291     echo "$ac_t""yes" 1>&6
11292     cat >> confdefs.h <<\EOF
11293 #define WITH_AUTOMOUNT 1
11294 EOF
11295
11296     ;;
11297   *)
11298     echo "$ac_t""no" 1>&6
11299     ;;
11300   esac 
11301 else
11302   echo "$ac_t""no" 1>&6
11303
11304 fi
11305
11306
11307 #################################################
11308 # check for smbmount support
11309 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11310 echo "configure:11311: checking whether to use SMBMOUNT" >&5
11311 # Check whether --with-smbmount or --without-smbmount was given.
11312 if test "${with_smbmount+set}" = set; then
11313   withval="$with_smbmount"
11314    case "$withval" in
11315   yes)
11316         case "$host_os" in
11317         *linux*)
11318                 echo "$ac_t""yes" 1>&6
11319                 cat >> confdefs.h <<\EOF
11320 #define WITH_SMBMOUNT 1
11321 EOF
11322
11323                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11324                 ;;
11325         *)
11326                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
11327                 ;;
11328         esac
11329     ;;
11330   *)
11331     echo "$ac_t""no" 1>&6
11332     MPROGS=
11333     ;;
11334   esac 
11335 else
11336   echo "$ac_t""no" 1>&6
11337   MPROGS=
11338
11339 fi
11340
11341
11342
11343 #################################################
11344 # check for a PAM password database
11345 with_pam_for_crypt=no
11346 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11347 echo "configure:11348: checking whether to use PAM password database" >&5
11348 # Check whether --with-pam or --without-pam was given.
11349 if test "${with_pam+set}" = set; then
11350   withval="$with_pam"
11351    case "$withval" in
11352   yes)
11353     echo "$ac_t""yes" 1>&6
11354     cat >> confdefs.h <<\EOF
11355 #define WITH_PAM 1
11356 EOF
11357
11358     LIBS="$LIBS -lpam"
11359     with_pam_for_crypt=yes
11360     ;;
11361   *)
11362     echo "$ac_t""no" 1>&6
11363     ;;
11364   esac 
11365 else
11366   echo "$ac_t""no" 1>&6
11367
11368 fi
11369
11370
11371 # we can't build a pam module if we don't have pam.
11372 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11373 echo "configure:11374: checking for pam_get_data in -lpam" >&5
11374 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11375 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11376   echo $ac_n "(cached) $ac_c" 1>&6
11377 else
11378   ac_save_LIBS="$LIBS"
11379 LIBS="-lpam  $LIBS"
11380 cat > conftest.$ac_ext <<EOF
11381 #line 11382 "configure"
11382 #include "confdefs.h"
11383 /* Override any gcc2 internal prototype to avoid an error.  */
11384 /* We use char because int might match the return type of a gcc2
11385     builtin and then its argument prototype would still apply.  */
11386 char pam_get_data();
11387
11388 int main() {
11389 pam_get_data()
11390 ; return 0; }
11391 EOF
11392 if { (eval echo configure:11393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11393   rm -rf conftest*
11394   eval "ac_cv_lib_$ac_lib_var=yes"
11395 else
11396   echo "configure: failed program was:" >&5
11397   cat conftest.$ac_ext >&5
11398   rm -rf conftest*
11399   eval "ac_cv_lib_$ac_lib_var=no"
11400 fi
11401 rm -f conftest*
11402 LIBS="$ac_save_LIBS"
11403
11404 fi
11405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11406   echo "$ac_t""yes" 1>&6
11407   cat >> confdefs.h <<\EOF
11408 #define HAVE_LIBPAM 1
11409 EOF
11410
11411 else
11412   echo "$ac_t""no" 1>&6
11413 fi
11414
11415
11416 #################################################
11417 # check for pam_smbpass support
11418 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11419 echo "configure:11420: checking whether to use pam_smbpass" >&5
11420 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11421 if test "${with_pam_smbpass+set}" = set; then
11422   withval="$with_pam_smbpass"
11423    case "$withval" in
11424   yes)
11425     echo "$ac_t""yes" 1>&6
11426
11427 # Conditions under which pam_smbpass should not be built.
11428
11429        if test x$PICFLAG = x; then
11430           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11431           PAM_MOD=""
11432        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11433           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11434           PAM_MOD=""
11435        else
11436           PAM_MOD="bin/pam_smbpass.so"
11437        fi
11438     ;;
11439   *)
11440     echo "$ac_t""no" 1>&6
11441     ;;
11442   esac 
11443 else
11444   echo "$ac_t""no" 1>&6
11445
11446 fi
11447
11448
11449
11450 ###############################################
11451 # test for where we get crypt() from, but only
11452 # if not using PAM
11453 if test $with_pam_for_crypt = no; then
11454 for ac_func in crypt
11455 do
11456 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11457 echo "configure:11458: checking for $ac_func" >&5
11458 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11459   echo $ac_n "(cached) $ac_c" 1>&6
11460 else
11461   cat > conftest.$ac_ext <<EOF
11462 #line 11463 "configure"
11463 #include "confdefs.h"
11464 /* System header to define __stub macros and hopefully few prototypes,
11465     which can conflict with char $ac_func(); below.  */
11466 #include <assert.h>
11467 /* Override any gcc2 internal prototype to avoid an error.  */
11468 /* We use char because int might match the return type of a gcc2
11469     builtin and then its argument prototype would still apply.  */
11470 char $ac_func();
11471
11472 int main() {
11473
11474 /* The GNU C library defines this for functions which it implements
11475     to always fail with ENOSYS.  Some functions are actually named
11476     something starting with __ and the normal name is an alias.  */
11477 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11478 choke me
11479 #else
11480 $ac_func();
11481 #endif
11482
11483 ; return 0; }
11484 EOF
11485 if { (eval echo configure:11486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11486   rm -rf conftest*
11487   eval "ac_cv_func_$ac_func=yes"
11488 else
11489   echo "configure: failed program was:" >&5
11490   cat conftest.$ac_ext >&5
11491   rm -rf conftest*
11492   eval "ac_cv_func_$ac_func=no"
11493 fi
11494 rm -f conftest*
11495 fi
11496
11497 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11498   echo "$ac_t""yes" 1>&6
11499     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11500   cat >> confdefs.h <<EOF
11501 #define $ac_tr_func 1
11502 EOF
11503  
11504 else
11505   echo "$ac_t""no" 1>&6
11506 fi
11507 done
11508
11509 if test x"$ac_cv_func_crypt" = x"no"; then
11510     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11511 echo "configure:11512: checking for crypt in -lcrypt" >&5
11512 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11513 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11514   echo $ac_n "(cached) $ac_c" 1>&6
11515 else
11516   ac_save_LIBS="$LIBS"
11517 LIBS="-lcrypt  $LIBS"
11518 cat > conftest.$ac_ext <<EOF
11519 #line 11520 "configure"
11520 #include "confdefs.h"
11521 /* Override any gcc2 internal prototype to avoid an error.  */
11522 /* We use char because int might match the return type of a gcc2
11523     builtin and then its argument prototype would still apply.  */
11524 char crypt();
11525
11526 int main() {
11527 crypt()
11528 ; return 0; }
11529 EOF
11530 if { (eval echo configure:11531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11531   rm -rf conftest*
11532   eval "ac_cv_lib_$ac_lib_var=yes"
11533 else
11534   echo "configure: failed program was:" >&5
11535   cat conftest.$ac_ext >&5
11536   rm -rf conftest*
11537   eval "ac_cv_lib_$ac_lib_var=no"
11538 fi
11539 rm -f conftest*
11540 LIBS="$ac_save_LIBS"
11541
11542 fi
11543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11544   echo "$ac_t""yes" 1>&6
11545   LIBS="$LIBS -lcrypt";
11546         cat >> confdefs.h <<\EOF
11547 #define HAVE_CRYPT 1
11548 EOF
11549
11550 else
11551   echo "$ac_t""no" 1>&6
11552 fi
11553
11554 fi
11555 fi
11556
11557 ##
11558 ## moved after the check for -lcrypt in order to
11559 ## ensure that the necessary libraries are included
11560 ## check checking for truncated salt.  Wrapped by the
11561 ## $with_pam_for_crypt variable as above   --jerry
11562 ##
11563 if test $with_pam_for_crypt = no; then
11564 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
11565 echo "configure:11566: checking for a crypt that needs truncated salt" >&5
11566 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
11567   echo $ac_n "(cached) $ac_c" 1>&6
11568 else
11569   
11570 if test "$cross_compiling" = yes; then
11571   samba_cv_HAVE_TRUNCATED_SALT=cross
11572 else
11573   cat > conftest.$ac_ext <<EOF
11574 #line 11575 "configure"
11575 #include "confdefs.h"
11576 #include "${srcdir-.}/tests/crypttest.c"
11577 EOF
11578 if { (eval echo configure:11579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11579 then
11580   samba_cv_HAVE_TRUNCATED_SALT=no
11581 else
11582   echo "configure: failed program was:" >&5
11583   cat conftest.$ac_ext >&5
11584   rm -fr conftest*
11585   samba_cv_HAVE_TRUNCATED_SALT=yes
11586 fi
11587 rm -fr conftest*
11588 fi
11589
11590 fi
11591
11592 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
11593 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
11594         cat >> confdefs.h <<\EOF
11595 #define HAVE_TRUNCATED_SALT 1
11596 EOF
11597
11598 fi
11599 fi
11600
11601
11602
11603 ########################################################################################
11604 ##
11605 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
11606 ##
11607 ########################################################################################
11608
11609 ## set the with_smbpasswd_sam as the default
11610 with_smbpasswd_sam=yes
11611
11612
11613 #################################################
11614 # check for a TDB password database
11615 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
11616 echo "configure:11617: checking whether to use TDB SAM database" >&5
11617 # Check whether --with-tdbsam or --without-tdbsam was given.
11618 if test "${with_tdbsam+set}" = set; then
11619   withval="$with_tdbsam"
11620    case "$withval" in
11621   yes)
11622     echo "$ac_t""yes" 1>&6
11623     cat >> confdefs.h <<\EOF
11624 #define WITH_TDB_SAM 1
11625 EOF
11626
11627     with_smbpasswd_sam=no
11628     ;;
11629   *)
11630     echo "$ac_t""no" 1>&6
11631     ;;
11632   esac 
11633 else
11634   echo "$ac_t""no" 1>&6
11635
11636 fi
11637
11638
11639 #################################################
11640 # check for a LDAP password database
11641 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
11642 echo "configure:11643: checking whether to use LDAP SAM database" >&5
11643 # Check whether --with-ldapsam or --without-ldapsam was given.
11644 if test "${with_ldapsam+set}" = set; then
11645   withval="$with_ldapsam"
11646    case "$withval" in
11647   yes)
11648     echo "$ac_t""yes" 1>&6
11649     cat >> confdefs.h <<\EOF
11650 #define WITH_LDAP_SAM 1
11651 EOF
11652
11653     LIBS="-lldap -llber $LIBS"
11654     with_smbpasswd_sam=no
11655     ;;
11656   *)
11657     echo "$ac_t""no" 1>&6
11658     ;;
11659   esac 
11660 else
11661   echo "$ac_t""no" 1>&6
11662
11663 fi
11664
11665
11666 #################################################
11667 # check for a NISPLUS password database
11668 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
11669 echo "configure:11670: checking whether to use NISPLUS SAM database" >&5
11670 # Check whether --with-nisplussam or --without-nisplussam was given.
11671 if test "${with_nisplussam+set}" = set; then
11672   withval="$with_nisplussam"
11673    case "$withval" in
11674   yes)
11675     echo "$ac_t""yes" 1>&6
11676     cat >> confdefs.h <<\EOF
11677 #define WITH_NISPLUS_SAM 1
11678 EOF
11679
11680     with_smbpasswd_sam=no
11681     ;;
11682   *)
11683     echo "$ac_t""no" 1>&6
11684     ;;
11685   esac 
11686 else
11687   echo "$ac_t""no" 1>&6
11688
11689 fi
11690
11691
11692 ################################################
11693 # This test should come last because the
11694 # smbpasswd SAM is only used if another format
11695 # has not been defined
11696 echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6
11697 echo "configure:11698: checking whether to use traditional smbpasswd file" >&5
11698 if test $with_smbpasswd_sam = yes; then
11699         echo "$ac_t""yes" 1>&6
11700         cat >> confdefs.h <<\EOF
11701 #define WITH_SMBPASSWD_SAM 1
11702 EOF
11703
11704 else
11705         echo "$ac_t""no" 1>&6
11706 fi
11707
11708 ########################################################################################
11709 ##
11710 ## END OF TESTS FOR SAM BACKENDS.  
11711 ##
11712 ########################################################################################
11713
11714 #################################################
11715 # check for a NISPLUS_HOME support 
11716 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11717 echo "configure:11718: checking whether to use NISPLUS_HOME" >&5
11718 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11719 if test "${with_nisplus_home+set}" = set; then
11720   withval="$with_nisplus_home"
11721    case "$withval" in
11722   yes)
11723     echo "$ac_t""yes" 1>&6
11724     cat >> confdefs.h <<\EOF
11725 #define WITH_NISPLUS_HOME 1
11726 EOF
11727
11728     ;;
11729   *)
11730     echo "$ac_t""no" 1>&6
11731     ;;
11732   esac 
11733 else
11734   echo "$ac_t""no" 1>&6
11735
11736 fi
11737
11738
11739 #################################################
11740 # check for the secure socket layer
11741 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11742 echo "configure:11743: checking whether to use SSL" >&5
11743 # Check whether --with-ssl or --without-ssl was given.
11744 if test "${with_ssl+set}" = set; then
11745   withval="$with_ssl"
11746    case "$withval" in
11747   yes)
11748     echo "$ac_t""yes" 1>&6
11749     cat >> confdefs.h <<\EOF
11750 #define WITH_SSL 1
11751 EOF
11752
11753     withval="/usr/local/ssl"     # default
11754
11755     if test "${with_sslinc+set}" = set; then
11756
11757         withval="$with_sslinc"
11758         case "$withval" in
11759         yes|no)
11760           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11761           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11762         ;;
11763         * )
11764           CFLAGS="-I${withval} $CFLAGS"
11765         ;;
11766         esac
11767
11768     else
11769
11770         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11771
11772     fi
11773
11774     if test "${with_ssllib+set}" = set; then
11775
11776         withval="$with_ssllib"
11777         case "$withval" in
11778         yes|no)
11779           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
11780           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11781         ;;
11782         * )
11783           LDFLAGS="-L${withval}/lib $LDFLAGS"
11784         ;;
11785         esac
11786
11787     else
11788
11789         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11790
11791     fi
11792
11793     LIBS="-lssl -lcrypto $LIBS"
11794
11795 #    if test ! -d ${withval}; then
11796 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11797 #      exit 1
11798 #    fi 
11799
11800     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11801
11802     ;;
11803   *)
11804     echo "$ac_t""no" 1>&6
11805     ;;
11806   esac 
11807 else
11808   echo "$ac_t""no" 1>&6
11809
11810 fi
11811
11812
11813 #################################################
11814 # check for syslog logging
11815 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11816 echo "configure:11817: checking whether to use syslog logging" >&5
11817 # Check whether --with-syslog or --without-syslog was given.
11818 if test "${with_syslog+set}" = set; then
11819   withval="$with_syslog"
11820    case "$withval" in
11821   yes)
11822     echo "$ac_t""yes" 1>&6
11823     cat >> confdefs.h <<\EOF
11824 #define WITH_SYSLOG 1
11825 EOF
11826
11827     ;;
11828   *)
11829     echo "$ac_t""no" 1>&6
11830     ;;
11831   esac 
11832 else
11833   echo "$ac_t""no" 1>&6
11834
11835 fi
11836
11837
11838 #################################################
11839 # check for a shared memory profiling support
11840 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
11841 echo "configure:11842: checking whether to use profiling" >&5
11842 # Check whether --with-profiling-data or --without-profiling-data was given.
11843 if test "${with_profiling_data+set}" = set; then
11844   withval="$with_profiling_data"
11845    case "$withval" in
11846   yes)
11847     echo "$ac_t""yes" 1>&6
11848     cat >> confdefs.h <<\EOF
11849 #define WITH_PROFILE 1
11850 EOF
11851
11852     ;;
11853   *)
11854     echo "$ac_t""no" 1>&6
11855     ;;
11856   esac 
11857 else
11858   echo "$ac_t""no" 1>&6
11859
11860 fi
11861
11862
11863
11864 #################################################
11865 # check for experimental disk-quotas support
11866 QUOTAOBJS=smbd/noquotas.o
11867
11868 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
11869 echo "configure:11870: checking whether to support disk-quotas" >&5
11870 # Check whether --with-quotas or --without-quotas was given.
11871 if test "${with_quotas+set}" = set; then
11872   withval="$with_quotas"
11873    case "$withval" in
11874   yes)
11875     echo "$ac_t""yes" 1>&6
11876     case "$host_os" in
11877       *linux*)
11878         # Check for kernel 2.4.x quota braindamage...
11879         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
11880 echo "configure:11881: checking for linux 2.4.x quota braindamage.." >&5
11881 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
11882   echo $ac_n "(cached) $ac_c" 1>&6
11883 else
11884   
11885         cat > conftest.$ac_ext <<EOF
11886 #line 11887 "configure"
11887 #include "confdefs.h"
11888 #include <stdio.h>
11889 #include <sys/types.h>
11890 #include <asm/types.h>
11891 #include <linux/quota.h>
11892 #include <mntent.h>
11893 #include <linux/unistd.h>
11894 int main() {
11895 struct mem_dqblk D;
11896 ; return 0; }
11897 EOF
11898 if { (eval echo configure:11899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11899   rm -rf conftest*
11900   samba_cv_linux_2_4_quota_braindamage=yes
11901 else
11902   echo "configure: failed program was:" >&5
11903   cat conftest.$ac_ext >&5
11904   rm -rf conftest*
11905   samba_cv_linux_2_4_quota_braindamage=no
11906 fi
11907 rm -f conftest*
11908 fi
11909
11910 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
11911 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
11912         cat >> confdefs.h <<\EOF
11913 #define LINUX_QUOTAS_2 1
11914 EOF
11915
11916 else
11917         cat >> confdefs.h <<\EOF
11918 #define LINUX_QUOTAS_1 1
11919 EOF
11920
11921 fi
11922         ;;
11923       *)
11924         ;;
11925     esac
11926     QUOTAOBJS=smbd/quotas.o
11927     cat >> confdefs.h <<\EOF
11928 #define WITH_QUOTAS 1
11929 EOF
11930
11931     ;;
11932   *)
11933     echo "$ac_t""no" 1>&6
11934     ;;
11935   esac 
11936 else
11937   echo "$ac_t""no" 1>&6
11938
11939 fi
11940
11941
11942
11943 #################################################
11944 # check for experimental utmp accounting
11945
11946 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
11947 echo "configure:11948: checking whether to support utmp accounting" >&5
11948 # Check whether --with-utmp or --without-utmp was given.
11949 if test "${with_utmp+set}" = set; then
11950   withval="$with_utmp"
11951    case "$withval" in
11952   yes)
11953     echo "$ac_t""yes" 1>&6
11954     cat >> confdefs.h <<\EOF
11955 #define WITH_UTMP 1
11956 EOF
11957
11958     ;;
11959   *)
11960     echo "$ac_t""no" 1>&6
11961     ;;
11962   esac 
11963 else
11964   echo "$ac_t""no" 1>&6
11965
11966 fi
11967
11968
11969 #################################################
11970 # set private directory location
11971 # Check whether --with-privatedir or --without-privatedir was given.
11972 if test "${with_privatedir+set}" = set; then
11973   withval="$with_privatedir"
11974    case "$withval" in
11975   yes|no)
11976   #
11977   # Just in case anybody calls it without argument
11978   #
11979     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
11980     privatedir='${prefix}/private'
11981   ;;
11982   * )
11983     privatedir="$withval"
11984     ;;
11985   esac
11986   
11987 else
11988   privatedir='${prefix}/private'
11989    
11990
11991 fi
11992
11993
11994 #################################################
11995 # set lock directory location
11996 # Check whether --with-lockdir or --without-lockdir was given.
11997 if test "${with_lockdir+set}" = set; then
11998   withval="$with_lockdir"
11999    case "$withval" in
12000   yes|no)
12001   #
12002   # Just in case anybody calls it without argument
12003   #
12004     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12005     lockdir='$(VARDIR)/locks'
12006   ;;
12007   * )
12008     lockdir="$withval"
12009     ;;
12010   esac
12011   
12012 else
12013   lockdir='$(VARDIR)/locks'
12014    
12015
12016 fi
12017
12018
12019 #################################################
12020 # set SWAT directory location
12021 # Check whether --with-swatdir or --without-swatdir was given.
12022 if test "${with_swatdir+set}" = set; then
12023   withval="$with_swatdir"
12024    case "$withval" in
12025   yes|no)
12026   #
12027   # Just in case anybody does it
12028   #
12029     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12030     swatdir='${prefix}/swat'
12031   ;;
12032   * )
12033     swatdir="$withval"
12034     ;;
12035   esac
12036   
12037 else
12038   swatdir='${prefix}/swat'
12039    
12040
12041 fi
12042
12043
12044 #################################################
12045 # choose native language(s) of man pages
12046 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12047 echo "configure:12048: checking chosen man pages' language(s)" >&5
12048 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12049 if test "${with_manpages_langs+set}" = set; then
12050   withval="$with_manpages_langs"
12051    case "$withval" in
12052   yes|no)
12053     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12054     manlangs="en"
12055   ;;
12056   *)
12057     manlangs="$withval"
12058   ;;
12059   esac
12060
12061   echo "$ac_t""$manlangs" 1>&6
12062   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12063   
12064 else
12065   manlangs="en"
12066   echo "$ac_t""$manlangs" 1>&6
12067   
12068
12069 fi
12070
12071
12072 #################################################
12073 # these tests are taken from the GNU fileutils package
12074 echo "checking how to get filesystem space usage" 1>&6
12075 echo "configure:12076: checking how to get filesystem space usage" >&5
12076 space=no
12077
12078 # Test for statvfs64.
12079 if test $space = no; then
12080   # SVR4
12081   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12082 echo "configure:12083: checking statvfs64 function (SVR4)" >&5
12083 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12084   echo $ac_n "(cached) $ac_c" 1>&6
12085 else
12086   if test "$cross_compiling" = yes; then
12087   fu_cv_sys_stat_statvfs64=cross
12088 else
12089   cat > conftest.$ac_ext <<EOF
12090 #line 12091 "configure"
12091 #include "confdefs.h"
12092
12093 #if defined(HAVE_UNISTD_H)
12094 #include <unistd.h>
12095 #endif
12096 #include <sys/types.h>
12097 #include <sys/statvfs.h>
12098   main ()
12099   {
12100     struct statvfs64 fsd;
12101     exit (statvfs64 (".", &fsd));
12102   }
12103 EOF
12104 if { (eval echo configure:12105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12105 then
12106   fu_cv_sys_stat_statvfs64=yes
12107 else
12108   echo "configure: failed program was:" >&5
12109   cat conftest.$ac_ext >&5
12110   rm -fr conftest*
12111   fu_cv_sys_stat_statvfs64=no
12112 fi
12113 rm -fr conftest*
12114 fi
12115
12116 fi
12117
12118 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12119   if test $fu_cv_sys_stat_statvfs64 = yes; then
12120     space=yes
12121     cat >> confdefs.h <<\EOF
12122 #define STAT_STATVFS64 1
12123 EOF
12124
12125   fi
12126 fi
12127
12128 # Perform only the link test since it seems there are no variants of the
12129 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12130 # because that got a false positive on SCO OSR5.  Adding the declaration
12131 # of a `struct statvfs' causes this test to fail (as it should) on such
12132 # systems.  That system is reported to work fine with STAT_STATFS4 which
12133 # is what it gets when this test fails.
12134 if test $space = no; then
12135   # SVR4
12136   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12137 echo "configure:12138: checking statvfs function (SVR4)" >&5
12138 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12139   echo $ac_n "(cached) $ac_c" 1>&6
12140 else
12141   cat > conftest.$ac_ext <<EOF
12142 #line 12143 "configure"
12143 #include "confdefs.h"
12144 #include <sys/types.h>
12145 #include <sys/statvfs.h>
12146 int main() {
12147 struct statvfs fsd; statvfs (0, &fsd);
12148 ; return 0; }
12149 EOF
12150 if { (eval echo configure:12151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12151   rm -rf conftest*
12152   fu_cv_sys_stat_statvfs=yes
12153 else
12154   echo "configure: failed program was:" >&5
12155   cat conftest.$ac_ext >&5
12156   rm -rf conftest*
12157   fu_cv_sys_stat_statvfs=no
12158 fi
12159 rm -f conftest*
12160 fi
12161
12162 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12163   if test $fu_cv_sys_stat_statvfs = yes; then
12164     space=yes
12165     cat >> confdefs.h <<\EOF
12166 #define STAT_STATVFS 1
12167 EOF
12168
12169   fi
12170 fi
12171
12172 if test $space = no; then
12173   # DEC Alpha running OSF/1
12174   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12175 echo "configure:12176: checking for 3-argument statfs function (DEC OSF/1)" >&5
12176   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12177   echo $ac_n "(cached) $ac_c" 1>&6
12178 else
12179   if test "$cross_compiling" = yes; then
12180   fu_cv_sys_stat_statfs3_osf1=no
12181 else
12182   cat > conftest.$ac_ext <<EOF
12183 #line 12184 "configure"
12184 #include "confdefs.h"
12185
12186 #include <sys/param.h>
12187 #include <sys/types.h>
12188 #include <sys/mount.h>
12189   main ()
12190   {
12191     struct statfs fsd;
12192     fsd.f_fsize = 0;
12193     exit (statfs (".", &fsd, sizeof (struct statfs)));
12194   }
12195 EOF
12196 if { (eval echo configure:12197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12197 then
12198   fu_cv_sys_stat_statfs3_osf1=yes
12199 else
12200   echo "configure: failed program was:" >&5
12201   cat conftest.$ac_ext >&5
12202   rm -fr conftest*
12203   fu_cv_sys_stat_statfs3_osf1=no
12204 fi
12205 rm -fr conftest*
12206 fi
12207
12208 fi
12209
12210   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12211   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12212     space=yes
12213     cat >> confdefs.h <<\EOF
12214 #define STAT_STATFS3_OSF1 1
12215 EOF
12216
12217   fi
12218 fi
12219
12220 if test $space = no; then
12221 # AIX
12222   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12223 echo "configure:12224: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12224   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12225   echo $ac_n "(cached) $ac_c" 1>&6
12226 else
12227   if test "$cross_compiling" = yes; then
12228   fu_cv_sys_stat_statfs2_bsize=no
12229 else
12230   cat > conftest.$ac_ext <<EOF
12231 #line 12232 "configure"
12232 #include "confdefs.h"
12233
12234 #ifdef HAVE_SYS_PARAM_H
12235 #include <sys/param.h>
12236 #endif
12237 #ifdef HAVE_SYS_MOUNT_H
12238 #include <sys/mount.h>
12239 #endif
12240 #ifdef HAVE_SYS_VFS_H
12241 #include <sys/vfs.h>
12242 #endif
12243   main ()
12244   {
12245   struct statfs fsd;
12246   fsd.f_bsize = 0;
12247   exit (statfs (".", &fsd));
12248   }
12249 EOF
12250 if { (eval echo configure:12251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12251 then
12252   fu_cv_sys_stat_statfs2_bsize=yes
12253 else
12254   echo "configure: failed program was:" >&5
12255   cat conftest.$ac_ext >&5
12256   rm -fr conftest*
12257   fu_cv_sys_stat_statfs2_bsize=no
12258 fi
12259 rm -fr conftest*
12260 fi
12261
12262 fi
12263
12264   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12265   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12266     space=yes
12267     cat >> confdefs.h <<\EOF
12268 #define STAT_STATFS2_BSIZE 1
12269 EOF
12270
12271   fi
12272 fi
12273
12274 if test $space = no; then
12275 # SVR3
12276   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12277 echo "configure:12278: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12278   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12279   echo $ac_n "(cached) $ac_c" 1>&6
12280 else
12281   if test "$cross_compiling" = yes; then
12282   fu_cv_sys_stat_statfs4=no
12283 else
12284   cat > conftest.$ac_ext <<EOF
12285 #line 12286 "configure"
12286 #include "confdefs.h"
12287 #include <sys/types.h>
12288 #include <sys/statfs.h>
12289   main ()
12290   {
12291   struct statfs fsd;
12292   exit (statfs (".", &fsd, sizeof fsd, 0));
12293   }
12294 EOF
12295 if { (eval echo configure:12296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12296 then
12297   fu_cv_sys_stat_statfs4=yes
12298 else
12299   echo "configure: failed program was:" >&5
12300   cat conftest.$ac_ext >&5
12301   rm -fr conftest*
12302   fu_cv_sys_stat_statfs4=no
12303 fi
12304 rm -fr conftest*
12305 fi
12306
12307 fi
12308
12309   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12310   if test $fu_cv_sys_stat_statfs4 = yes; then
12311     space=yes
12312     cat >> confdefs.h <<\EOF
12313 #define STAT_STATFS4 1
12314 EOF
12315
12316   fi
12317 fi
12318
12319 if test $space = no; then
12320 # 4.4BSD and NetBSD
12321   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12322 echo "configure:12323: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12323   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12324   echo $ac_n "(cached) $ac_c" 1>&6
12325 else
12326   if test "$cross_compiling" = yes; then
12327   fu_cv_sys_stat_statfs2_fsize=no
12328 else
12329   cat > conftest.$ac_ext <<EOF
12330 #line 12331 "configure"
12331 #include "confdefs.h"
12332 #include <sys/types.h>
12333 #ifdef HAVE_SYS_PARAM_H
12334 #include <sys/param.h>
12335 #endif
12336 #ifdef HAVE_SYS_MOUNT_H
12337 #include <sys/mount.h>
12338 #endif
12339   main ()
12340   {
12341   struct statfs fsd;
12342   fsd.f_fsize = 0;
12343   exit (statfs (".", &fsd));
12344   }
12345 EOF
12346 if { (eval echo configure:12347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12347 then
12348   fu_cv_sys_stat_statfs2_fsize=yes
12349 else
12350   echo "configure: failed program was:" >&5
12351   cat conftest.$ac_ext >&5
12352   rm -fr conftest*
12353   fu_cv_sys_stat_statfs2_fsize=no
12354 fi
12355 rm -fr conftest*
12356 fi
12357
12358 fi
12359
12360   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12361   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12362     space=yes
12363     cat >> confdefs.h <<\EOF
12364 #define STAT_STATFS2_FSIZE 1
12365 EOF
12366
12367   fi
12368 fi
12369
12370 if test $space = no; then
12371   # Ultrix
12372   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12373 echo "configure:12374: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12374   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12375   echo $ac_n "(cached) $ac_c" 1>&6
12376 else
12377   if test "$cross_compiling" = yes; then
12378   fu_cv_sys_stat_fs_data=no
12379 else
12380   cat > conftest.$ac_ext <<EOF
12381 #line 12382 "configure"
12382 #include "confdefs.h"
12383 #include <sys/types.h>
12384 #ifdef HAVE_SYS_PARAM_H
12385 #include <sys/param.h>
12386 #endif
12387 #ifdef HAVE_SYS_MOUNT_H
12388 #include <sys/mount.h>
12389 #endif
12390 #ifdef HAVE_SYS_FS_TYPES_H
12391 #include <sys/fs_types.h>
12392 #endif
12393   main ()
12394   {
12395   struct fs_data fsd;
12396   /* Ultrix's statfs returns 1 for success,
12397      0 for not mounted, -1 for failure.  */
12398   exit (statfs (".", &fsd) != 1);
12399   }
12400 EOF
12401 if { (eval echo configure:12402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12402 then
12403   fu_cv_sys_stat_fs_data=yes
12404 else
12405   echo "configure: failed program was:" >&5
12406   cat conftest.$ac_ext >&5
12407   rm -fr conftest*
12408   fu_cv_sys_stat_fs_data=no
12409 fi
12410 rm -fr conftest*
12411 fi
12412
12413 fi
12414
12415   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12416   if test $fu_cv_sys_stat_fs_data = yes; then
12417     space=yes
12418     cat >> confdefs.h <<\EOF
12419 #define STAT_STATFS2_FS_DATA 1
12420 EOF
12421
12422   fi
12423 fi
12424
12425 #
12426 # As a gating factor for large file support, in order to
12427 # use <4GB files we must have the following minimal support
12428 # available.
12429 # long long, and a 64 bit off_t or off64_t.
12430 # If we don't have all of these then disable large
12431 # file support.
12432 #
12433 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12434 echo "configure:12435: checking if large file support can be enabled" >&5
12435 cat > conftest.$ac_ext <<EOF
12436 #line 12437 "configure"
12437 #include "confdefs.h"
12438
12439 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12440 #include <sys/types.h>
12441 #else
12442 __COMPILE_ERROR_
12443 #endif
12444
12445 int main() {
12446 int i
12447 ; return 0; }
12448 EOF
12449 if { (eval echo configure:12450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12450   rm -rf conftest*
12451   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12452 else
12453   echo "configure: failed program was:" >&5
12454   cat conftest.$ac_ext >&5
12455   rm -rf conftest*
12456   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12457 fi
12458 rm -f conftest*
12459 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12460     cat >> confdefs.h <<\EOF
12461 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12462 EOF
12463
12464 fi
12465 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12466
12467 # Check whether --with-spinlocks or --without-spinlocks was given.
12468 if test "${with_spinlocks+set}" = set; then
12469   withval="$with_spinlocks"
12470   :
12471 fi
12472
12473 if test "x$with_spinlocks" = "xyes"; then
12474     cat >> confdefs.h <<\EOF
12475 #define USE_SPINLOCKS 1
12476 EOF
12477
12478
12479     case "$host_cpu" in
12480         sparc)
12481             cat >> confdefs.h <<\EOF
12482 #define SPARC_SPINLOCKS 1
12483 EOF
12484
12485             ;;
12486
12487         i386|i486|i586|i686)
12488             cat >> confdefs.h <<\EOF
12489 #define INTEL_SPINLOCKS 1
12490 EOF
12491
12492             ;;
12493
12494         mips)
12495             cat >> confdefs.h <<\EOF
12496 #define MIPS_SPINLOCKS 1
12497 EOF
12498
12499             ;;
12500
12501         powerpc)
12502             cat >> confdefs.h <<\EOF
12503 #define POWERPC_SPINLOCKS 1
12504 EOF
12505
12506             ;;
12507     esac
12508 fi
12509
12510 #################################################
12511 # check for ACL support
12512
12513 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12514 echo "configure:12515: checking whether to support ACLs" >&5
12515 # Check whether --with-acl-support or --without-acl-support was given.
12516 if test "${with_acl_support+set}" = set; then
12517   withval="$with_acl_support"
12518    case "$withval" in
12519   yes)
12520
12521         case "$host_os" in
12522         *sysv5*)
12523             echo "$ac_t""Using UnixWare ACLs" 1>&6
12524             cat >> confdefs.h <<\EOF
12525 #define HAVE_UNIXWARE_ACLS 1
12526 EOF
12527
12528             ;;
12529         *solaris*)
12530             echo "$ac_t""Using solaris ACLs" 1>&6
12531             cat >> confdefs.h <<\EOF
12532 #define HAVE_SOLARIS_ACLS 1
12533 EOF
12534
12535             ;;
12536                 *irix*)
12537                         echo "$ac_t""Using IRIX ACLs" 1>&6
12538                         cat >> confdefs.h <<\EOF
12539 #define HAVE_IRIX_ACLS 1
12540 EOF
12541
12542                         ;;
12543                 *aix*)
12544                         echo "$ac_t""Using AIX ACLs" 1>&6
12545                         cat >> confdefs.h <<\EOF
12546 #define HAVE_AIX_ACLS 1
12547 EOF
12548
12549                         ;;
12550                 *osf*)
12551                         echo "$ac_t""Using Tru64 ACLs" 1>&6
12552                         cat >> confdefs.h <<\EOF
12553 #define HAVE_TRU64_ACLS 1
12554 EOF
12555
12556                         LIBS="$LIBS -lpacl"
12557                         ;;
12558         *)
12559                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12560 echo "configure:12561: checking for acl_get_file in -lacl" >&5
12561 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12562 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12563   echo $ac_n "(cached) $ac_c" 1>&6
12564 else
12565   ac_save_LIBS="$LIBS"
12566 LIBS="-lacl  $LIBS"
12567 cat > conftest.$ac_ext <<EOF
12568 #line 12569 "configure"
12569 #include "confdefs.h"
12570 /* Override any gcc2 internal prototype to avoid an error.  */
12571 /* We use char because int might match the return type of a gcc2
12572     builtin and then its argument prototype would still apply.  */
12573 char acl_get_file();
12574
12575 int main() {
12576 acl_get_file()
12577 ; return 0; }
12578 EOF
12579 if { (eval echo configure:12580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12580   rm -rf conftest*
12581   eval "ac_cv_lib_$ac_lib_var=yes"
12582 else
12583   echo "configure: failed program was:" >&5
12584   cat conftest.$ac_ext >&5
12585   rm -rf conftest*
12586   eval "ac_cv_lib_$ac_lib_var=no"
12587 fi
12588 rm -f conftest*
12589 LIBS="$ac_save_LIBS"
12590
12591 fi
12592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12593   echo "$ac_t""yes" 1>&6
12594     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12595     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12596   cat >> confdefs.h <<EOF
12597 #define $ac_tr_lib 1
12598 EOF
12599
12600   LIBS="-lacl $LIBS"
12601
12602 else
12603   echo "$ac_t""no" 1>&6
12604 fi
12605
12606                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12607 echo "configure:12608: checking for ACL support" >&5
12608 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12609   echo $ac_n "(cached) $ac_c" 1>&6
12610 else
12611   
12612                         cat > conftest.$ac_ext <<EOF
12613 #line 12614 "configure"
12614 #include "confdefs.h"
12615 #include <sys/types.h>
12616 #include <sys/acl.h>
12617 int main() {
12618  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12619 ; return 0; }
12620 EOF
12621 if { (eval echo configure:12622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12622   rm -rf conftest*
12623   samba_cv_HAVE_POSIX_ACLS=yes
12624 else
12625   echo "configure: failed program was:" >&5
12626   cat conftest.$ac_ext >&5
12627   rm -rf conftest*
12628   samba_cv_HAVE_POSIX_ACLS=no
12629 fi
12630 rm -f conftest*
12631 fi
12632
12633 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12634                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12635                                 echo "$ac_t""Using posix ACLs" 1>&6
12636                                 cat >> confdefs.h <<\EOF
12637 #define HAVE_POSIX_ACLS 1
12638 EOF
12639
12640                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12641 echo "configure:12642: checking for acl_get_perm_np" >&5
12642 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12643   echo $ac_n "(cached) $ac_c" 1>&6
12644 else
12645   
12646                                 cat > conftest.$ac_ext <<EOF
12647 #line 12648 "configure"
12648 #include "confdefs.h"
12649 #include <sys/types.h>
12650 #include <sys/acl.h>
12651 int main() {
12652  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12653 ; return 0; }
12654 EOF
12655 if { (eval echo configure:12656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12656   rm -rf conftest*
12657   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12658 else
12659   echo "configure: failed program was:" >&5
12660   cat conftest.$ac_ext >&5
12661   rm -rf conftest*
12662   samba_cv_HAVE_ACL_GET_PERM_NP=no
12663 fi
12664 rm -f conftest*
12665 fi
12666
12667 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12668                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12669                                         cat >> confdefs.h <<\EOF
12670 #define HAVE_ACL_GET_PERM_NP 1
12671 EOF
12672
12673                                 fi
12674                         fi
12675             ;;
12676         esac
12677         ;;
12678   *)
12679     echo "$ac_t""no" 1>&6
12680     cat >> confdefs.h <<\EOF
12681 #define HAVE_NO_ACLS 1
12682 EOF
12683
12684     ;;
12685   esac 
12686 else
12687   cat >> confdefs.h <<\EOF
12688 #define HAVE_NO_ACLS 1
12689 EOF
12690
12691   echo "$ac_t""no" 1>&6
12692
12693 fi
12694
12695
12696 #################################################
12697 # Check whether winbind is supported on this platform.  If so we need to
12698 # build and install client programs (WINBIND_TARGETS), sbin programs
12699 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
12700
12701 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
12702 echo "configure:12703: checking whether to build winbind" >&5
12703
12704 # Initially, the value of $host_os decides whether winbind is supported
12705
12706 case "$host_os" in 
12707         *linux*|*solaris*)
12708                 HAVE_WINBIND=yes
12709                 ;;
12710         *)
12711                 HAVE_WINBIND=no
12712                 winbind_no_reason=", unsupported on $host_os"
12713                 ;;
12714 esac
12715
12716 # Check the setting of --with-winbindd
12717
12718 # Check whether --with-winbind or --without-winbind was given.
12719 if test "${with_winbind+set}" = set; then
12720   withval="$with_winbind"
12721    
12722   case "$withval" in
12723         yes)
12724                 HAVE_WINBIND=yes
12725                 ;;
12726         no)
12727                 HAVE_WINBIND=no
12728                 winbind_reason=""
12729                 ;;
12730   esac 
12731 fi
12732
12733
12734 # We need unix domain sockets for winbind
12735
12736 if test x"$HAVE_WINBIND" = x"yes"; then
12737         if test x"$samba_cv_unixsocket" = x"no"; then
12738                 winbind_no_reason=", no unix domain socket support on $host_os"
12739                 HAVE_WINBIND=no
12740         fi
12741 fi
12742
12743 # Display test results
12744
12745 if test x"$HAVE_WINBIND" = x"yes"; then
12746
12747         echo "$ac_t""yes" 1>&6
12748
12749         WINBIND_TARGETS="\$(WINBIND_PROGS)"
12750         WINBIND_STARGETS="\$(WINBIND_SPROGS)"
12751         WINBIND_LTARGETS="\$(WINBIND_LPROGS)"
12752         case "$with_pam" in
12753                 yes)
12754                         WINBIND_PAM_PROGS="\$(WINBIND_PAM_PROGS)"
12755                 ;;
12756         esac
12757 else
12758         echo "$ac_t""no$winbind_no_reason" 1>&6
12759
12760         WINBIND_TARGETS=""
12761         WINBIND_STARGETS=""
12762         WINBIND_LTARGETS=""
12763         WINBIND_PAM_PROGS=""
12764 fi
12765
12766 # Substitution time!
12767
12768
12769
12770
12771
12772
12773 #################################################
12774 # final configure stuff
12775
12776 echo "checking configure summary"
12777 if test "$cross_compiling" = yes; then
12778   :
12779 else
12780   cat > conftest.$ac_ext <<EOF
12781 #line 12782 "configure"
12782 #include "confdefs.h"
12783 #include "${srcdir-.}/tests/summary.c"
12784 EOF
12785 if { (eval echo configure:12786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12786 then
12787   echo "configure OK";
12788 else
12789   echo "configure: failed program was:" >&5
12790   cat conftest.$ac_ext >&5
12791   rm -fr conftest*
12792   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
12793 fi
12794 rm -fr conftest*
12795 fi
12796
12797
12798 builddir=`pwd`
12799
12800
12801 trap '' 1 2 15
12802 cat > confcache <<\EOF
12803 # This file is a shell script that caches the results of configure
12804 # tests run on this system so they can be shared between configure
12805 # scripts and configure runs.  It is not useful on other systems.
12806 # If it contains results you don't want to keep, you may remove or edit it.
12807 #
12808 # By default, configure uses ./config.cache as the cache file,
12809 # creating it if it does not exist already.  You can give configure
12810 # the --cache-file=FILE option to use a different cache file; that is
12811 # what configure does when it calls configure scripts in
12812 # subdirectories, so they share the cache.
12813 # Giving --cache-file=/dev/null disables caching, for debugging configure.
12814 # config.status only pays attention to the cache file if you give it the
12815 # --recheck option to rerun configure.
12816 #
12817 EOF
12818 # The following way of writing the cache mishandles newlines in values,
12819 # but we know of no workaround that is simple, portable, and efficient.
12820 # So, don't put newlines in cache variables' values.
12821 # Ultrix sh set writes to stderr and can't be redirected directly,
12822 # and sets the high bit in the cache file unless we assign to the vars.
12823 (set) 2>&1 |
12824   case `(ac_space=' '; set | grep ac_space) 2>&1` in
12825   *ac_space=\ *)
12826     # `set' does not quote correctly, so add quotes (double-quote substitution
12827     # turns \\\\ into \\, and sed turns \\ into \).
12828     sed -n \
12829       -e "s/'/'\\\\''/g" \
12830       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
12831     ;;
12832   *)
12833     # `set' quotes correctly as required by POSIX, so do not add quotes.
12834     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
12835     ;;
12836   esac >> confcache
12837 if cmp -s $cache_file confcache; then
12838   :
12839 else
12840   if test -w $cache_file; then
12841     echo "updating cache $cache_file"
12842     cat confcache > $cache_file
12843   else
12844     echo "not updating unwritable cache $cache_file"
12845   fi
12846 fi
12847 rm -f confcache
12848
12849 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12850
12851 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12852 # Let make expand exec_prefix.
12853 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12854
12855 # Any assignment to VPATH causes Sun make to only execute
12856 # the first set of double-colon rules, so remove it if not needed.
12857 # If there is a colon in the path, we need to keep it.
12858 if test "x$srcdir" = x.; then
12859   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12860 fi
12861
12862 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12863
12864 DEFS=-DHAVE_CONFIG_H
12865
12866 # Without the "./", some shells look in PATH for config.status.
12867 : ${CONFIG_STATUS=./config.status}
12868
12869 echo creating $CONFIG_STATUS
12870 rm -f $CONFIG_STATUS
12871 cat > $CONFIG_STATUS <<EOF
12872 #! /bin/sh
12873 # Generated automatically by configure.
12874 # Run this file to recreate the current configuration.
12875 # This directory was configured as follows,
12876 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12877 #
12878 # $0 $ac_configure_args
12879 #
12880 # Compiler output produced by configure, useful for debugging
12881 # configure, is in ./config.log if it exists.
12882
12883 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12884 for ac_option
12885 do
12886   case "\$ac_option" in
12887   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12888     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12889     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12890   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12891     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12892     exit 0 ;;
12893   -help | --help | --hel | --he | --h)
12894     echo "\$ac_cs_usage"; exit 0 ;;
12895   *) echo "\$ac_cs_usage"; exit 1 ;;
12896   esac
12897 done
12898
12899 ac_given_srcdir=$srcdir
12900 ac_given_INSTALL="$INSTALL"
12901
12902 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12903 EOF
12904 cat >> $CONFIG_STATUS <<EOF
12905
12906 # Protect against being on the right side of a sed subst in config.status.
12907 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12908  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12909 $ac_vpsub
12910 $extrasub
12911 s%@SHELL@%$SHELL%g
12912 s%@CFLAGS@%$CFLAGS%g
12913 s%@CPPFLAGS@%$CPPFLAGS%g
12914 s%@CXXFLAGS@%$CXXFLAGS%g
12915 s%@FFLAGS@%$FFLAGS%g
12916 s%@DEFS@%$DEFS%g
12917 s%@LDFLAGS@%$LDFLAGS%g
12918 s%@LIBS@%$LIBS%g
12919 s%@exec_prefix@%$exec_prefix%g
12920 s%@prefix@%$prefix%g
12921 s%@program_transform_name@%$program_transform_name%g
12922 s%@bindir@%$bindir%g
12923 s%@sbindir@%$sbindir%g
12924 s%@libexecdir@%$libexecdir%g
12925 s%@datadir@%$datadir%g
12926 s%@sysconfdir@%$sysconfdir%g
12927 s%@sharedstatedir@%$sharedstatedir%g
12928 s%@localstatedir@%$localstatedir%g
12929 s%@libdir@%$libdir%g
12930 s%@includedir@%$includedir%g
12931 s%@oldincludedir@%$oldincludedir%g
12932 s%@infodir@%$infodir%g
12933 s%@mandir@%$mandir%g
12934 s%@RUNPROG@%$RUNPROG%g
12935 s%@MPROGS@%$MPROGS%g
12936 s%@LDSHFLAGS@%$LDSHFLAGS%g
12937 s%@SHLD@%$SHLD%g
12938 s%@HOST_OS@%$HOST_OS%g
12939 s%@PAM_MOD@%$PAM_MOD%g
12940 s%@WRAP@%$WRAP%g
12941 s%@WRAP32@%$WRAP32%g
12942 s%@PICFLAG@%$PICFLAG%g
12943 s%@PICSUFFIX@%$PICSUFFIX%g
12944 s%@POBAD_CC@%$POBAD_CC%g
12945 s%@SHLIBEXT@%$SHLIBEXT%g
12946 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
12947 s%@CC@%$CC%g
12948 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12949 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12950 s%@INSTALL_DATA@%$INSTALL_DATA%g
12951 s%@AWK@%$AWK%g
12952 s%@BROKEN_CC@%$BROKEN_CC%g
12953 s%@host@%$host%g
12954 s%@host_alias@%$host_alias%g
12955 s%@host_cpu@%$host_cpu%g
12956 s%@host_vendor@%$host_vendor%g
12957 s%@host_os@%$host_os%g
12958 s%@target@%$target%g
12959 s%@target_alias@%$target_alias%g
12960 s%@target_cpu@%$target_cpu%g
12961 s%@target_vendor@%$target_vendor%g
12962 s%@target_os@%$target_os%g
12963 s%@build@%$build%g
12964 s%@build_alias@%$build_alias%g
12965 s%@build_cpu@%$build_cpu%g
12966 s%@build_vendor@%$build_vendor%g
12967 s%@build_os@%$build_os%g
12968 s%@CPP@%$CPP%g
12969 s%@LIBOBJS@%$LIBOBJS%g
12970 s%@TERMLIBS@%$TERMLIBS%g
12971 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
12972 s%@ROFF@%$ROFF%g
12973 s%@QUOTAOBJS@%$QUOTAOBJS%g
12974 s%@privatedir@%$privatedir%g
12975 s%@lockdir@%$lockdir%g
12976 s%@swatdir@%$swatdir%g
12977 s%@manlangs@%$manlangs%g
12978 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
12979 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
12980 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
12981 s%@WINBIND_PAM_PROGS@%$WINBIND_PAM_PROGS%g
12982 s%@builddir@%$builddir%g
12983
12984 CEOF
12985 EOF
12986
12987 cat >> $CONFIG_STATUS <<\EOF
12988
12989 # Split the substitutions into bite-sized pieces for seds with
12990 # small command number limits, like on Digital OSF/1 and HP-UX.
12991 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12992 ac_file=1 # Number of current file.
12993 ac_beg=1 # First line for current file.
12994 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12995 ac_more_lines=:
12996 ac_sed_cmds=""
12997 while $ac_more_lines; do
12998   if test $ac_beg -gt 1; then
12999     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13000   else
13001     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13002   fi
13003   if test ! -s conftest.s$ac_file; then
13004     ac_more_lines=false
13005     rm -f conftest.s$ac_file
13006   else
13007     if test -z "$ac_sed_cmds"; then
13008       ac_sed_cmds="sed -f conftest.s$ac_file"
13009     else
13010       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13011     fi
13012     ac_file=`expr $ac_file + 1`
13013     ac_beg=$ac_end
13014     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13015   fi
13016 done
13017 if test -z "$ac_sed_cmds"; then
13018   ac_sed_cmds=cat
13019 fi
13020 EOF
13021
13022 cat >> $CONFIG_STATUS <<EOF
13023
13024 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13025 EOF
13026 cat >> $CONFIG_STATUS <<\EOF
13027 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13028   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13029   case "$ac_file" in
13030   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13031        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13032   *) ac_file_in="${ac_file}.in" ;;
13033   esac
13034
13035   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13036
13037   # Remove last slash and all that follows it.  Not all systems have dirname.
13038   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13039   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13040     # The file is in a subdirectory.
13041     test ! -d "$ac_dir" && mkdir "$ac_dir"
13042     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13043     # A "../" for each directory in $ac_dir_suffix.
13044     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13045   else
13046     ac_dir_suffix= ac_dots=
13047   fi
13048
13049   case "$ac_given_srcdir" in
13050   .)  srcdir=.
13051       if test -z "$ac_dots"; then top_srcdir=.
13052       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13053   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13054   *) # Relative path.
13055     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13056     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13057   esac
13058
13059   case "$ac_given_INSTALL" in
13060   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13061   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13062   esac
13063
13064   echo creating "$ac_file"
13065   rm -f "$ac_file"
13066   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13067   case "$ac_file" in
13068   *Makefile*) ac_comsub="1i\\
13069 # $configure_input" ;;
13070   *) ac_comsub= ;;
13071   esac
13072
13073   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13074   sed -e "$ac_comsub
13075 s%@configure_input@%$configure_input%g
13076 s%@srcdir@%$srcdir%g
13077 s%@top_srcdir@%$top_srcdir%g
13078 s%@INSTALL@%$INSTALL%g
13079 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13080 fi; done
13081 rm -f conftest.s*
13082
13083 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13084 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13085 #
13086 # ac_d sets the value in "#define NAME VALUE" lines.
13087 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13088 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13089 ac_dC='\3'
13090 ac_dD='%g'
13091 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13092 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13093 ac_uB='\([      ]\)%\1#\2define\3'
13094 ac_uC=' '
13095 ac_uD='\4%g'
13096 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13097 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13098 ac_eB='$%\1#\2define\3'
13099 ac_eC=' '
13100 ac_eD='%g'
13101
13102 if test "${CONFIG_HEADERS+set}" != set; then
13103 EOF
13104 cat >> $CONFIG_STATUS <<EOF
13105   CONFIG_HEADERS="include/config.h"
13106 EOF
13107 cat >> $CONFIG_STATUS <<\EOF
13108 fi
13109 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13110   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13111   case "$ac_file" in
13112   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13113        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13114   *) ac_file_in="${ac_file}.in" ;;
13115   esac
13116
13117   echo creating $ac_file
13118
13119   rm -f conftest.frag conftest.in conftest.out
13120   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13121   cat $ac_file_inputs > conftest.in
13122
13123 EOF
13124
13125 # Transform confdefs.h into a sed script conftest.vals that substitutes
13126 # the proper values into config.h.in to produce config.h.  And first:
13127 # Protect against being on the right side of a sed subst in config.status.
13128 # Protect against being in an unquoted here document in config.status.
13129 rm -f conftest.vals
13130 cat > conftest.hdr <<\EOF
13131 s/[\\&%]/\\&/g
13132 s%[\\$`]%\\&%g
13133 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13134 s%ac_d%ac_u%gp
13135 s%ac_u%ac_e%gp
13136 EOF
13137 sed -n -f conftest.hdr confdefs.h > conftest.vals
13138 rm -f conftest.hdr
13139
13140 # This sed command replaces #undef with comments.  This is necessary, for
13141 # example, in the case of _POSIX_SOURCE, which is predefined and required
13142 # on some systems where configure will not decide to define it.
13143 cat >> conftest.vals <<\EOF
13144 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13145 EOF
13146
13147 # Break up conftest.vals because some shells have a limit on
13148 # the size of here documents, and old seds have small limits too.
13149
13150 rm -f conftest.tail
13151 while :
13152 do
13153   ac_lines=`grep -c . conftest.vals`
13154   # grep -c gives empty output for an empty file on some AIX systems.
13155   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13156   # Write a limited-size here document to conftest.frag.
13157   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13158   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13159   echo 'CEOF
13160   sed -f conftest.frag conftest.in > conftest.out
13161   rm -f conftest.in
13162   mv conftest.out conftest.in
13163 ' >> $CONFIG_STATUS
13164   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13165   rm -f conftest.vals
13166   mv conftest.tail conftest.vals
13167 done
13168 rm -f conftest.vals
13169
13170 cat >> $CONFIG_STATUS <<\EOF
13171   rm -f conftest.frag conftest.h
13172   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13173   cat conftest.in >> conftest.h
13174   rm -f conftest.in
13175   if cmp -s $ac_file conftest.h 2>/dev/null; then
13176     echo "$ac_file is unchanged"
13177     rm -f conftest.h
13178   else
13179     # Remove last slash and all that follows it.  Not all systems have dirname.
13180       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13181       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13182       # The file is in a subdirectory.
13183       test ! -d "$ac_dir" && mkdir "$ac_dir"
13184     fi
13185     rm -f $ac_file
13186     mv conftest.h $ac_file
13187   fi
13188 fi; done
13189
13190 EOF
13191 cat >> $CONFIG_STATUS <<EOF
13192
13193 EOF
13194 cat >> $CONFIG_STATUS <<\EOF
13195
13196 exit 0
13197 EOF
13198 chmod +x $CONFIG_STATUS
13199 rm -fr confdefs* $ac_clean_files
13200 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13201